svgedit/dist/editor/system/index.js

589 lines
1.9 MiB
JavaScript
Raw Normal View History

2020-09-18 20:43:34 +00:00
System.register([],(function(Tn,Un){"use strict";return{execute:function(){var Tn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(Tn,Un,Qn){return Tn(Qn={path:Un,exports:{},require:function(Tn,Un){return function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==Un&&Qn.path)}},Qn.exports),Qn.exports}var check=function(Tn){return Tn&&Tn.Math==Math&&Tn},Qn=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof Tn&&Tn)||Function("return this")(),fails=function(Tn){try{return!!Tn()}catch(Tn){return!0}},Dn=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),Hn={}.propertyIsEnumerable,Gn=Object.getOwnPropertyDescriptor,zn={f:Gn&&!Hn.call({1:2},1)?function propertyIsEnumerable(Tn){var Un=Gn(this,Tn);return!!Un&&Un.enumerable}:Hn},createPropertyDescriptor=function(Tn,Un){return{enumerable:!(1&Tn),configurable:!(2&Tn),writable:!(4&Tn),value:Un}},Vn={}.toString,classofRaw=function(Tn){return Vn.call(Tn).slice(8,-1)},Kn="".split,Wn=fails((function(){return!Object("z").propertyIsEnumerable(0)}))?function(Tn){return"String"==classofRaw(Tn)?Kn.call(Tn,""):Object(Tn)}:Object,requireObjectCoercible=function(Tn){if(null==Tn)throw TypeError("Can't call method on "+Tn);return Tn},toIndexedObject=function(Tn){return Wn(requireObjectCoercible(Tn))},isObject=function(Tn){return"object"==typeof Tn?null!==Tn:"function"==typeof Tn},toPrimitive=function(Tn,Un){if(!isObject(Tn))return Tn;var Qn,Dn;if(Un&&"function"==typeof(Qn=Tn.toString)&&!isObject(Dn=Qn.call(Tn)))return Dn;if("function"==typeof(Qn=Tn.valueOf)&&!isObject(Dn=Qn.call(Tn)))return Dn;if(!Un&&"function"==typeof(Qn=Tn.toString)&&!isObject(Dn=Qn.call(Tn)))return Dn;throw TypeError("Can't convert object to primitive value")},Xn={}.hasOwnProperty,has=function(Tn,Un){return Xn.call(Tn,Un)},Yn=Qn.document,Jn=isObject(Yn)&&isObject(Yn.createElement),documentCreateElement=function(Tn){return Jn?Yn.createElement(Tn):{}},$n=!Dn&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),Zn=Object.getOwnPropertyDescriptor,er={f:Dn?Zn:function getOwnPropertyDescriptor(Tn,Un){if(Tn=toIndexedObject(Tn),Un=toPrimitive(Un,!0),$n)try{return Zn(Tn,Un)}catch(Tn){}if(has(Tn,Un))return createPropertyDescriptor(!zn.f.call(Tn,Un),Tn[Un])}},anObject=function(Tn){if(!isObject(Tn))throw TypeError(String(Tn)+" is not an object");return Tn},tr=Object.defineProperty,nr={f:Dn?tr:function defineProperty(Tn,Un,Qn){if(anObject(Tn),Un=toPrimitive(Un,!0),anObject(Qn),$n)try{return tr(Tn,Un,Qn)}catch(Tn){}if("get"in Qn||"set"in Qn)throw TypeError("Accessors not supported");return"value"in Qn&&(Tn[Un]=Qn.value),Tn}},rr=Dn?function(Tn,Un,Qn){return nr.f(Tn,Un,createPropertyDescriptor(1,Qn))}:function(Tn,Un,Qn){return Tn[Un]=Qn,Tn},setGlobal=function(Tn,Un){try{rr(Qn,Tn,Un)}catch(Dn){Qn[Tn]=Un}return Un},ir="__core-js_shared__",ar=Qn[ir]||setGlobal(ir,{}),or=Function.toString;"function"!=typeof ar.inspectSource&&(ar.inspectSource=function(Tn){return or.call(Tn)});var sr,lr,cr,ur=ar.inspectSource,dr=Qn.WeakMap,hr="function"==typeof dr&&/native code/.test(ur(dr)),pr=createCommonjsModule((function(Tn){(Tn.exports=function(Tn,Un){return ar[Tn]||(ar[Tn]=void 0!==Un?Un:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),Ar=0,fr=Math.random(),uid=function(Tn){return"Symbol("+String(void 0===Tn?"":Tn)+")_"+(++Ar+fr).toString(36)},gr=pr("keys"),sharedKey=function(Tn){return gr[Tn]||(gr[Tn]=uid(Tn))},mr={},_r=Qn.WeakMap;if(hr){var vr=new _r,yr=vr.get,br=vr.has,wr=vr.set;sr=function(Tn,Un){return wr.call(vr,Tn,Un),Un},lr=function(Tn){return yr.call(vr,Tn)||{}},cr=function(Tn){return br.call(vr,Tn)}}else{var xr=sharedKey("state");mr[xr]=!0,sr=function(Tn,Un){return rr(Tn,xr,Un),Un},lr=function(Tn){retur
/*! jQuery v1.7.1 jquery.com | jquery.org/license */_export({target:"String",proto:!0,forced:stringHtmlForced("sub")},{sub:function sub(){return createHtml(this,"sub","","")}}),_export({target:"URL",proto:!0,enumerable:!0},{toJSON:function toJSON(){return URL.prototype.toString.call(this)}}),function(Tn,Un){function cy(Tn){return Gn.isWindow(Tn)?Tn:9===Tn.nodeType&&(Tn.defaultView||Tn.parentWindow)}function cv(Tn){if(!Bi[Tn]){var Un=Qn.body,Dn=Gn("<"+Tn+">").appendTo(Un),Hn=Dn.css("display");Dn.remove(),"none"!==Hn&&""!==Hn||(xi||((xi=Qn.createElement("iframe")).frameBorder=xi.width=xi.height=0),Un.appendChild(xi),ki&&xi.createElement||((ki=(xi.contentWindow||xi.contentDocument).document).write(("CSS1Compat"===Qn.compatMode?"<!doctype html>":"")+"<html><body>"),ki.close()),Dn=ki.createElement(Tn),ki.body.appendChild(Dn),Hn=Gn.css(Dn,"display"),Un.removeChild(xi)),Bi[Tn]=Hn}return Bi[Tn]}function cu(Tn,Un){var Qn={};return Gn.each(Li.concat.apply([],Li.slice(0,Un)),(function(){Qn[this]=Tn})),Qn}function ct(){Ci=Un}function cs(){return setTimeout(ct,0),Ci=Gn.now()}function ci(){try{return new Tn.XMLHttpRequest}catch(Tn){}}function ca(Tn,Un,Qn,Dn){if(Gn.isArray(Un))Gn.each(Un,(function(Un,Hn){Qn||Zr.test(Tn)?Dn(Tn,Hn):ca(Tn+"["+("object"==_typeof(Hn)||Gn.isArray(Hn)?Un:"")+"]",Hn,Qn,Dn)}));else if(Qn||null==Un||"object"!=_typeof(Un))Dn(Tn,Un);else for(var Hn in Un)ca(Tn+"["+Hn+"]",Un[Hn],Qn,Dn)}function b_(Tn,Qn){var Dn,Hn,zn=Gn.ajaxSettings.flatOptions||{};for(Dn in Qn)Qn[Dn]!==Un&&((zn[Dn]?Tn:Hn||(Hn={}))[Dn]=Qn[Dn]);Hn&&Gn.extend(!0,Tn,Hn)}function b$(Tn,Qn,Dn,Hn,Gn,zn){(zn=zn||{})[Gn=Gn||Qn.dataTypes[0]]=!0;for(var Vn,Kn=Tn[Gn],Wn=0,Xn=Kn?Kn.length:0,Yn=Tn===Ai;Wn<Xn&&(Yn||!Vn);Wn++)"string"==typeof(Vn=Kn[Wn](Qn,Dn,Hn))&&(!Yn||zn[Vn]?Vn=Un:(Qn.dataTypes.unshift(Vn),Vn=b$(Tn,Qn,Dn,Hn,Vn,zn)));return(Yn||!Vn)&&!zn["*"]&&(Vn=b$(Tn,Qn,Dn,Hn,"*",zn)),Vn}function bZ(Tn){return function(Un,Qn){if("string"!=typeof Un&&(Qn=Un,Un="*"),Gn.isFunction(Qn))for(var Dn,Hn,zn=Un.toLowerCase().split(ui),Vn=0,Kn=zn.length;Vn<Kn;Vn++)Dn=zn[Vn],(Hn=/^\+/.test(Dn))&&(Dn=Dn.substr(1)||"*"),(Tn[Dn]=Tn[Dn]||[])[Hn?"unshift":"push"](Qn)}}function bC(Tn,Un,Qn){var Dn="width"===Un?Tn.offsetWidth:Tn.offsetHeight,Hn="width"===Un?Wr:Xr,zn=0,Vn=Hn.length;if(Dn>0){if("border"!==Qn)for(;zn<Vn;zn++)Qn||(Dn-=parseFloat(Gn.css(Tn,"padding"+Hn[zn]))||0),"margin"===Qn?Dn+=parseFloat(Gn.css(Tn,Qn+Hn[zn]))||0:Dn-=parseFloat(Gn.css(Tn,"border"+Hn[zn]+"Width"))||0;return Dn+"px"}if(((Dn=Qr(Tn,Un,Un))<0||null==Dn)&&(Dn=Tn.style[Un]||0),Dn=parseFloat(Dn)||0,Qn)for(;zn<Vn;zn++)Dn+=parseFloat(Gn.css(Tn,"padding"+Hn[zn]))||0,"padding"!==Qn&&(Dn+=parseFloat(Gn.css(Tn,"border"+Hn[zn]+"Width"))||0),"margin"===Qn&&(Dn+=parseFloat(Gn.css(Tn,Qn+Hn[zn]))||0);return Dn+"px"}function bp(Tn,Un){Un.src?Gn.ajax({url:Un.src,async:!1,dataType:"script"}):Gn.globalEval((Un.text||Un.textContent||Un.innerHTML||"").replace(Ir,"/*$0*/")),Un.parentNode&&Un.parentNode.removeChild(Un)}function bo(Tn){var Un=Qn.createElement("div");return Mr.appendChild(Un),Un.innerHTML=Tn.outerHTML,Un.firstChild}function bn(Tn){var Un=(Tn.nodeName||"").toLowerCase();"input"===Un?bm(Tn):"script"!==Un&&void 0!==Tn.getElementsByTagName&&Gn.grep(Tn.getElementsByTagName("input"),bm)}function bm(Tn){"checkbox"!==Tn.type&&"radio"!==Tn.type||(Tn.defaultChecked=Tn.checked)}function bl(Tn){return void 0!==Tn.getElementsByTagName?Tn.getElementsByTagName("*"):void 0!==Tn.querySelectorAll?Tn.querySelectorAll("*"):[]}function bk(Tn,Un){var Qn;1===Un.nodeType&&(Un.clearAttributes&&Un.clearAttributes(),Un.mergeAttributes&&Un.mergeAttributes(Tn),"object"===(Qn=Un.nodeName.toLowerCase())?Un.outerHTML=Tn.outerHTML:"input"!==Qn||"checkbox"!==Tn.type&&"radio"!==Tn.type?"option"===Qn?Un.selected=Tn.defaultSelected:"input"!==Qn&&"textarea"!==Qn||(Un.defaultValue=Tn.defaultValue):(Tn.checked&&(Un.defaultChecked=Un.checked=Tn.checked),Un.value!==Tn.value&&(Un.value=Tn.value)),Un.removeAttribute(Gn.expando))}function bj(Tn,Un){if(1===Un.nodeType&&Gn.hasData(Tn)){var Qn,Dn,Hn,zn=Gn._data(Tn),Vn=Gn._data(Un,zn),Kn=zn.events;if(Kn)fo
/*!
* jQuery UI 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI
*/!function(Tn,Un){function d(Un){return!Tn(Un).parents().andSelf().filter((function(){return"hidden"===Tn.curCSS(this,"visibility")||Tn.expr.filters.hidden(this)})).length}function c(Un,Qn){var Dn=Un.nodeName.toLowerCase();if("area"===Dn){var Hn,Gn=Un.parentNode,zn=Gn.name;return!(!Un.href||!zn||"map"!==Gn.nodeName.toLowerCase())&&(!!(Hn=Tn("img[usemap=#"+zn+"]")[0])&&d(Hn))}return(/input|select|textarea|button|object/.test(Dn)?!Un.disabled:"a"==Dn&&Un.href||Qn)&&d(Un)}Tn.ui=Tn.ui||{},Tn.ui.version||(Tn.extend(Tn.ui,{version:"1.8.17",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),Tn.fn.extend({propAttr:Tn.fn.prop||Tn.fn.attr,_focus:Tn.fn.focus,focus:function focus(Un,Qn){return"number"==typeof Un?this.each((function(){var Dn=this;setTimeout((function(){Tn(Dn).focus(),Qn&&Qn.call(Dn)}),Un)})):this._focus.apply(this,arguments)},scrollParent:function scrollParent(){var Un;return Un=Tn.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter((function(){return/(relative|absolute|fixed)/.test(Tn.curCSS(this,"position",1))&&/(auto|scroll)/.test(Tn.curCSS(this,"overflow",1)+Tn.curCSS(this,"overflow-y",1)+Tn.curCSS(this,"overflow-x",1))})).eq(0):this.parents().filter((function(){return/(auto|scroll)/.test(Tn.curCSS(this,"overflow",1)+Tn.curCSS(this,"overflow-y",1)+Tn.curCSS(this,"overflow-x",1))})).eq(0),/fixed/.test(this.css("position"))||!Un.length?Tn(document):Un},zIndex:function zIndex(Qn){if(Qn!==Un)return this.css("zIndex",Qn);if(this.length)for(var Dn,Hn,Gn=Tn(this[0]);Gn.length&&Gn[0]!==document;){if(("absolute"===(Dn=Gn.css("position"))||"relative"===Dn||"fixed"===Dn)&&(Hn=parseInt(Gn.css("zIndex"),10),!isNaN(Hn)&&0!==Hn))return Hn;Gn=Gn.parent()}return 0},disableSelection:function disableSelection(){return this.bind((Tn.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",(function(Tn){Tn.preventDefault()}))},enableSelection:function enableSelection(){return this.unbind(".ui-disableSelection")}}),Tn.each(["Width","Height"],(function(Qn,Dn){function h(Un,Qn,Dn,Gn){return Tn.each(Hn,(function(){Qn-=parseFloat(Tn.curCSS(Un,"padding"+this,!0))||0,Dn&&(Qn-=parseFloat(Tn.curCSS(Un,"border"+this+"Width",!0))||0),Gn&&(Qn-=parseFloat(Tn.curCSS(Un,"margin"+this,!0))||0)})),Qn}var Hn="Width"===Dn?["Left","Right"]:["Top","Bottom"],Gn=Dn.toLowerCase(),zn={innerWidth:Tn.fn.innerWidth,innerHeight:Tn.fn.innerHeight,outerWidth:Tn.fn.outerWidth,outerHeight:Tn.fn.outerHeight};Tn.fn["inner"+Dn]=function(Qn){return Qn===Un?zn["inner"+Dn].call(this):this.each((function(){Tn(this).css(Gn,h(this,Qn)+"px")}))},Tn.fn["outer"+Dn]=function(Un,Qn){return"number"!=typeof Un?zn["outer"+Dn].call(this,Un):this.each((function(){Tn(this).css(Gn,h(this,Un,!0,Qn)+"px")}))}})),Tn.extend(Tn.expr[":"],{data:function data(Un,Qn,Dn){return!!Tn.data(Un,Dn[3])},focusable:function focusable(Un){return c(Un,!isNaN(Tn.attr(Un,"tabindex")))},tabbable:function tabbable(Un){var Qn=Tn.attr(Un,"tabindex"),Dn=isNaN(Qn);return(Dn||Qn>=0)&&c(Un,!Dn)}}),Tn((function(){var Un=document.body,Qn=Un.appendChild(Qn=document.createElement("div"));Tn.extend(Qn.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),Tn.support.minHeight=100===Qn.offsetHeight,Tn.support.selectstart="onselectstart"in Qn,Un.removeChild(Qn).style.display="none"})),Tn.extend(Tn.ui,{plugin:{add:function add(Un,Qn,Dn){var Hn=Tn.ui[Un].prototype;for(var Gn in Dn)Hn.plugins[Gn]=Hn.plugins[Gn]||[],Hn.plugins[Gn].push([Qn,Dn[Gn]])},call:function call(Tn,Un,Qn){var Dn=Tn.plugins[Un];if(Dn&&Tn.element[0].parentNode)for(var Hn=0;Hn<Dn.length;Hn++)Tn.options[Dn[Hn][0]]&&Dn[Hn][1].apply(Tn.element,Qn)}},contains:function contains(Tn,Un){return document.compareDocumentPosition?16&Tn.compareDoc
/*!
* jQuery UI Widget 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Widget
*/
function(Tn,Un){if(Tn.cleanData){var Qn=Tn.cleanData;Tn.cleanData=function(Un){for(var Dn,Hn=0;null!=(Dn=Un[Hn]);Hn++)try{Tn(Dn).triggerHandler("remove")}catch(Tn){}Qn(Un)}}else{var Dn=Tn.fn.remove;Tn.fn.remove=function(Un,Qn){return this.each((function(){return Qn||(!Un||Tn.filter(Un,[this]).length)&&Tn("*",this).add([this]).each((function(){try{Tn(this).triggerHandler("remove")}catch(Tn){}})),Dn.call(Tn(this),Un,Qn)}))}}Tn.widget=function(Un,Qn,Dn){var Hn,Gn=Un.split(".")[0];Hn=Gn+"-"+(Un=Un.split(".")[1]),Dn||(Dn=Qn,Qn=Tn.Widget),Tn.expr[":"][Hn]=function(Qn){return!!Tn.data(Qn,Un)},Tn[Gn]=Tn[Gn]||{},Tn[Gn][Un]=function(Tn,Un){arguments.length&&this._createWidget(Tn,Un)};var zn=new Qn;zn.options=Tn.extend(!0,{},zn.options),Tn[Gn][Un].prototype=Tn.extend(!0,zn,{namespace:Gn,widgetName:Un,widgetEventPrefix:Tn[Gn][Un].prototype.widgetEventPrefix||Un,widgetBaseClass:Hn},Dn),Tn.widget.bridge(Un,Tn[Gn][Un])},Tn.widget.bridge=function(Qn,Dn){Tn.fn[Qn]=function(Hn){var Gn="string"==typeof Hn,zn=Array.prototype.slice.call(arguments,1),Vn=this;return Hn=!Gn&&zn.length?Tn.extend.apply(null,[!0,Hn].concat(zn)):Hn,Gn&&"_"===Hn.charAt(0)||(Gn?this.each((function(){var Dn=Tn.data(this,Qn),Gn=Dn&&Tn.isFunction(Dn[Hn])?Dn[Hn].apply(Dn,zn):Dn;if(Gn!==Dn&&Gn!==Un)return Vn=Gn,!1})):this.each((function(){var Un=Tn.data(this,Qn);Un?Un.option(Hn||{})._init():Tn.data(this,Qn,new Dn(Hn,this))}))),Vn}},Tn.Widget=function(Tn,Un){arguments.length&&this._createWidget(Tn,Un)},Tn.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function _createWidget(Un,Qn){Tn.data(Qn,this.widgetName,this),this.element=Tn(Qn),this.options=Tn.extend(!0,{},this.options,this._getCreateOptions(),Un);var Dn=this;this.element.bind("remove."+this.widgetName,(function(){Dn.destroy()})),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function _getCreateOptions(){return Tn.metadata&&Tn.metadata.get(this.element[0])[this.widgetName]},_create:function _create(){},_init:function _init(){},destroy:function destroy(){this.element.unbind("."+this.widgetName).removeData(this.widgetName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function widget(){return this.element},option:function option(Qn,Dn){var Hn=Qn;if(0===arguments.length)return Tn.extend({},this.options);if("string"==typeof Qn){if(Dn===Un)return this.options[Qn];(Hn={})[Qn]=Dn}return this._setOptions(Hn),this},_setOptions:function _setOptions(Un){var Qn=this;return Tn.each(Un,(function(Tn,Un){Qn._setOption(Tn,Un)})),this},_setOption:function _setOption(Tn,Un){return this.options[Tn]=Un,"disabled"===Tn&&this.widget()[Un?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",Un),this},enable:function enable(){return this._setOption("disabled",!1)},disable:function disable(){return this._setOption("disabled",!0)},_trigger:function _trigger(Un,Qn,Dn){var Hn,Gn,zn=this.options[Un];if(Dn=Dn||{},(Qn=Tn.Event(Qn)).type=(Un===this.widgetEventPrefix?Un:this.widgetEventPrefix+Un).toLowerCase(),Qn.target=this.element[0],Gn=Qn.originalEvent)for(Hn in Gn)Hn in Qn||(Qn[Hn]=Gn[Hn]);return this.element.trigger(Qn,Dn),!(Tn.isFunction(zn)&&!1===zn.call(this.element[0],Qn,Dn)||Qn.isDefaultPrevented())}}}(jQuery),
/*!
* jQuery UI Mouse 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Mouse
*
* Depends:
* jquery.ui.widget.js
*/
function(Tn,Un){var Qn=!1;Tn(document).mouseup((function(Tn){Qn=!1})),Tn.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function _mouseInit(){var Un=this;this.element.bind("mousedown."+this.widgetName,(function(Tn){return Un._mouseDown(Tn)})).bind("click."+this.widgetName,(function(Qn){if(!0===Tn.data(Qn.target,Un.widgetName+".preventClickEvent"))return Tn.removeData(Qn.target,Un.widgetName+".preventClickEvent"),Qn.stopImmediatePropagation(),!1})),this.started=!1},_mouseDestroy:function _mouseDestroy(){this.element.unbind("."+this.widgetName)},_mouseDown:function _mouseDown(Un){if(!Qn){this._mouseStarted&&this._mouseUp(Un),this._mouseDownEvent=Un;var Dn=this,Hn=1==Un.which,Gn=!("string"!=typeof this.options.cancel||!Un.target.nodeName)&&Tn(Un.target).closest(this.options.cancel).length;return!(Hn&&!Gn&&this._mouseCapture(Un))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout((function(){Dn.mouseDelayMet=!0}),this.options.delay)),this._mouseDistanceMet(Un)&&this._mouseDelayMet(Un)&&(this._mouseStarted=!1!==this._mouseStart(Un),!this._mouseStarted)?(Un.preventDefault(),!0):(!0===Tn.data(Un.target,this.widgetName+".preventClickEvent")&&Tn.removeData(Un.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(Tn){return Dn._mouseMove(Tn)},this._mouseUpDelegate=function(Tn){return Dn._mouseUp(Tn)},Tn(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),Un.preventDefault(),Qn=!0,!0))}},_mouseMove:function _mouseMove(Un){return!Tn.browser.msie||document.documentMode>=9||Un.button?this._mouseStarted?(this._mouseDrag(Un),Un.preventDefault()):(this._mouseDistanceMet(Un)&&this._mouseDelayMet(Un)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,Un),this._mouseStarted?this._mouseDrag(Un):this._mouseUp(Un)),!this._mouseStarted):this._mouseUp(Un)},_mouseUp:function _mouseUp(Un){return Tn(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,Un.target==this._mouseDownEvent.target&&Tn.data(Un.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(Un)),!1},_mouseDistanceMet:function _mouseDistanceMet(Tn){return Math.max(Math.abs(this._mouseDownEvent.pageX-Tn.pageX),Math.abs(this._mouseDownEvent.pageY-Tn.pageY))>=this.options.distance},_mouseDelayMet:function _mouseDelayMet(Tn){return this.mouseDelayMet},_mouseStart:function _mouseStart(Tn){},_mouseDrag:function _mouseDrag(Tn){},_mouseStop:function _mouseStop(Tn){},_mouseCapture:function _mouseCapture(Tn){return!0}})}(jQuery),function(Tn,Un){Tn.widget("ui.draggable",Tn.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function _create(){"original"==this.options.helper&&!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},destroy:function destroy(){if(this.element.data("draggable"))return this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy(),this},_mouseCapture:function _mouseCapture(Un){var Qn=this.options;return!(this.helper||Qn.disabled||Tn(Un.target).is(".ui-resizable-handle"))&&(this.handle=this._getHandle(Un),!!this.handle&&(Qn.iframeFix&&Tn(!0===Qn.iframeFix?"iframe":Qn.iframeFix).each((function(){Tn('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* Namespaces or tools therefor.
* @module namespaces
* @license MIT
*/
2020-09-18 20:43:34 +00:00
var qd={HTML:"http://www.w3.org/1999/xhtml",MATH:"http://www.w3.org/1998/Math/MathML",SE:"http://svg-edit.googlecode.com",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"},Wd=function getReverseNS(){var Tn={};return Object.entries(qd).forEach((function(Un){var Qn=_slicedToArray(Un,2),Dn=Qn[0],Hn=Qn[1];Tn[Hn]=Dn.toLowerCase()})),Tn};_export({target:"Object",stat:!0,forced:!Dn,sham:!Dn},{defineProperties:xi}),function(){if(!("SVGPathSeg"in window)){var Tn=function(){function _SVGPathSeg(Tn,Un,Qn){_classCallCheck(this,_SVGPathSeg),this.pathSegType=Tn,this.pathSegTypeAsLetter=Un,this._owningPathSegList=Qn}return _createClass(_SVGPathSeg,[{key:"_segmentChanged",value:function _segmentChanged(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)}}]),_SVGPathSeg}();Tn.prototype.classname="SVGPathSeg",Tn.PATHSEG_UNKNOWN=0,Tn.PATHSEG_CLOSEPATH=1,Tn.PATHSEG_MOVETO_ABS=2,Tn.PATHSEG_MOVETO_REL=3,Tn.PATHSEG_LINETO_ABS=4,Tn.PATHSEG_LINETO_REL=5,Tn.PATHSEG_CURVETO_CUBIC_ABS=6,Tn.PATHSEG_CURVETO_CUBIC_REL=7,Tn.PATHSEG_CURVETO_QUADRATIC_ABS=8,Tn.PATHSEG_CURVETO_QUADRATIC_REL=9,Tn.PATHSEG_ARC_ABS=10,Tn.PATHSEG_ARC_REL=11,Tn.PATHSEG_LINETO_HORIZONTAL_ABS=12,Tn.PATHSEG_LINETO_HORIZONTAL_REL=13,Tn.PATHSEG_LINETO_VERTICAL_ABS=14,Tn.PATHSEG_LINETO_VERTICAL_REL=15,Tn.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16,Tn.PATHSEG_CURVETO_CUBIC_SMOOTH_REL=17,Tn.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18,Tn.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19;var Un=function(Un){_inherits(_SVGPathSegClosePath,Un);var Qn=_createSuper(_SVGPathSegClosePath);function _SVGPathSegClosePath(Un){return _classCallCheck(this,_SVGPathSegClosePath),Qn.call(this,Tn.PATHSEG_CLOSEPATH,"z",Un)}return _createClass(_SVGPathSegClosePath,[{key:"toString",value:function toString(){return"[object SVGPathSegClosePath]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter}},{key:"clone",value:function clone(){return new _SVGPathSegClosePath(void 0)}}]),_SVGPathSegClosePath}(Tn),Qn=function(Un){_inherits(_SVGPathSegMovetoAbs,Un);var Qn=_createSuper(_SVGPathSegMovetoAbs);function _SVGPathSegMovetoAbs(Un,Dn,Hn){var Gn;return _classCallCheck(this,_SVGPathSegMovetoAbs),(Gn=Qn.call(this,Tn.PATHSEG_MOVETO_ABS,"M",Un))._x=Dn,Gn._y=Hn,Gn}return _createClass(_SVGPathSegMovetoAbs,[{key:"toString",value:function toString(){return"[object SVGPathSegMovetoAbs]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y}},{key:"clone",value:function clone(){return new _SVGPathSegMovetoAbs(void 0,this._x,this._y)}}]),_SVGPathSegMovetoAbs}(Tn);Object.defineProperties(Qn.prototype,{x:{get:function get(){return this._x},set:function set(Tn){this._x=Tn,this._segmentChanged()},enumerable:!0},y:{get:function get(){return this._y},set:function set(Tn){this._y=Tn,this._segmentChanged()},enumerable:!0}});var Dn=function(Un){_inherits(_SVGPathSegMovetoRel,Un);var Qn=_createSuper(_SVGPathSegMovetoRel);function _SVGPathSegMovetoRel(Un,Dn,Hn){var Gn;return _classCallCheck(this,_SVGPathSegMovetoRel),(Gn=Qn.call(this,Tn.PATHSEG_MOVETO_REL,"m",Un))._x=Dn,Gn._y=Hn,Gn}return _createClass(_SVGPathSegMovetoRel,[{key:"toString",value:function toString(){return"[object SVGPathSegMovetoRel]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y}},{key:"clone",value:function clone(){return new _SVGPathSegMovetoRel(void 0,this._x,this._y)}}]),_SVGPathSegMovetoRel}(Tn);Object.defineProperties(Dn.prototype,{x:{get:function get(){return this._x},set:function set(Tn){this._x=Tn,this._segmentChanged()},enumerable:!0},y:{get:function get(){return this._y},set:function set(Tn){this._y=Tn,this._segmentChanged()},enumerable:!0}});var Hn=function(Un){_inherits(_SVGPathSegLinetoAbs,Un);var Qn=_createSuper(_SVGPathSegLinetoAbs);function _SVGPathSegLinetoAbs(Un,Dn,Hn){var Gn;return _classCallCheck(this,_SVGPathSegLinetoAbs),(Gn=Qn.call(this,Tn.PATHSEG_LINETO_ABS,"L",Un))._x=Dn,Gn._y=Hn,Gn}return _cr
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* A jQuery module to work with SVG attributes.
* @module jQueryAttr
* @license MIT
*/
2020-09-18 20:43:34 +00:00
function jQueryPluginSVG(Tn){var Un=Tn.fn.attr;return Tn.fn.attr=function(Tn,Qn){var Dn=this.length;if(!Dn)return Un.call(this,Tn,Qn);for(var Hn=0;Hn<Dn;++Hn){var Gn=this[Hn];if("http://www.w3.org/2000/svg"!==Gn.namespaceURI)return Un.call(this,Tn,Qn);if(void 0!==Qn)Gn.setAttribute(Tn,Qn);else if(Array.isArray(Tn)){for(var zn={},Vn=Tn.length;Vn--;){var Kn=Tn[Vn],Wn=Gn.getAttribute(Kn);(Wn||"0"===Wn)&&(Wn=isNaN(Wn)?Wn:Wn-0),zn[Kn]=Wn}return zn}if("object"!==_typeof(Tn)){var Xn=Gn.getAttribute(Tn);return(Xn||"0"===Xn)&&(Xn=isNaN(Xn)?Xn:Xn-0),Xn}for(var Yn=0,Jn=Object.entries(Tn);Yn<Jn.length;Yn++){var $n=_slicedToArray(Jn[Yn],2),Zn=$n[0],er=$n[1];Gn.setAttribute(Zn,er)}}return this},Tn}MA("toString",DA,HA);var GA=document.createElementNS(qd.SVG,"svg");function transformToString(Tn){var Un=Tn.matrix,Qn="";switch(Tn.type){case 1:Qn="matrix("+[Un.a,Un.b,Un.c,Un.d,Un.e,Un.f].join(",")+")";break;case 2:Qn="translate("+Un.e+","+Un.f+")";break;case 3:Qn=Un.a===Un.d?"scale("+Un.a+")":"scale("+Un.a+","+Un.d+")";break;case 4:var Dn=0,Hn=0;if(0!==Tn.angle){var Gn=1-Un.a;Hn=(Gn*Un.f+Un.b*Un.e)/(Gn*Gn+Un.b*Un.b),Dn=(Un.e-Un.b*Hn)/Gn}Qn="rotate("+Tn.angle+" "+Dn+","+Hn+")"}return Qn}var zA,VA={},KA=function(){function SVGTransformList(Tn){_classCallCheck(this,SVGTransformList),this._elem=Tn||null,this._xforms=[],this._update=function(){for(var Tn="",Un=0;Un<this.numberOfItems;++Un){Tn+=transformToString(this._list.getItem(Un))+" "}this._elem.setAttribute("transform",Tn)},this._list=this,this._init=function(){var Tn=this,Un=this._elem.getAttribute("transform");if(Un)for(var Qn=/\s*((scale|matrix|rotate|translate)\s*\(.*?\))\s*,?\s*/,Dn=!0;Dn;)Dn=Un.match(Qn),Un=Un.replace(Qn,""),Dn&&Dn[1]&&function(){var Un=Dn[1].split(/\s*\(/),Qn=Un[0],Hn=Un[1].match(/\s*(.*?)\s*\)/);Hn[1]=Hn[1].replace(/(\d)-/g,"$1 -");var Gn=Hn[1].split(/[, ]+/),zn="abcdef".split(""),Vn=GA.createSVGMatrix();Object.values(Gn).forEach((function(Tn,Un){Gn[Un]=Number.parseFloat(Tn),"matrix"===Qn&&(Vn[zn[Un]]=Gn[Un])}));var Kn=GA.createSVGTransform(),Wn="set"+Qn.charAt(0).toUpperCase()+Qn.slice(1),Xn="matrix"===Qn?[Vn]:Gn;"scale"===Qn&&1===Xn.length?Xn.push(Xn[0]):"translate"===Qn&&1===Xn.length?Xn.push(0):"rotate"===Qn&&1===Xn.length&&Xn.push(0,0),Kn[Wn].apply(Kn,_toConsumableArray(Xn)),Tn._list.appendItem(Kn)}()},this._removeFromOtherLists=function(Tn){Tn&&Object.values(VA).some((function(Un){for(var Qn=0,Dn=Un._xforms.length;Qn<Dn;++Qn)if(Un._xforms[Qn]===Tn)return Un.removeItem(Qn),!0;return!1}))},this.numberOfItems=0}return _createClass(SVGTransformList,[{key:"clear",value:function clear(){this.numberOfItems=0,this._xforms=[]}},{key:"initialize",value:function initialize(Tn){this.numberOfItems=1,this._removeFromOtherLists(Tn),this._xforms=[Tn]}},{key:"getItem",value:function getItem(Tn){if(Tn<this.numberOfItems&&Tn>=0)return this._xforms[Tn];var Un=new Error("DOMException with code=INDEX_SIZE_ERR");throw Un.code=1,Un}},{key:"insertItemBefore",value:function insertItemBefore(Tn,Un){var Qn=null;if(Un>=0)if(Un<this.numberOfItems){this._removeFromOtherLists(Tn);var Dn,Hn=new Array(this.numberOfItems+1);for(Dn=0;Dn<Un;++Dn)Hn[Dn]=this._xforms[Dn];Hn[Dn]=Tn;for(var Gn=Dn+1;Dn<this.numberOfItems;++Gn,++Dn)Hn[Gn]=this._xforms[Dn];this.numberOfItems++,this._xforms=Hn,Qn=Tn,this._list._update()}else Qn=this._list.appendItem(Tn);return Qn}},{key:"replaceItem",value:function replaceItem(Tn,Un){var Qn=null;return Un<this.numberOfItems&&Un>=0&&(this._removeFromOtherLists(Tn),this._xforms[Un]=Tn,Qn=Tn,this._list._update()),Qn}},{key:"removeItem",value:function removeItem(Tn){if(Tn<this.numberOfItems&&Tn>=0){var Un,Qn=this._xforms[Tn],Dn=new Array(this.numberOfItems-1);for(Un=0;Un<Tn;++Un)Dn[Un]=this._xforms[Un];for(var Hn=Un;Hn<this.numberOfItems-1;++Hn,++Un)Dn[Hn]=this._xforms[Un+1];return this.numberOfItems--,this._xforms=Dn,this._list._update(),Qn}var Gn=new Error("DOMException with code=INDEX_SIZE_ERR");throw Gn.code=1,Gn}},{key:"appendItem",value:function appendItem(Tn){return this._removeFromOtherLists(Tn),this._xforms.push(Tn),this.numberOfItems++,this._list._update(),Tn}}])
2020-09-04 20:34:30 +00:00
/** @license
2020-09-08 23:35:47 +00:00
*
* jsPDF - PDF Document creation from JavaScript
* Version 2.1.1 Built on 2020-09-07T12:58:19.950Z
2020-09-08 23:35:47 +00:00
* CommitID 00000000
*
* Copyright (c) 2010-2020 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
* 2015-2020 yWorks GmbH, http://www.yworks.com
* 2015-2020 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, willow-systems.com
* 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
*/
2020-09-18 20:43:34 +00:00
var gg=function(){return"undefined"!=typeof window?window:void 0!==sg?sg:"undefined"!=typeof self?self:this}();function e(){gg.console&&"function"==typeof gg.console.log&&gg.console.log.apply(gg.console,arguments)}var mg={log:e,warn:function warn(Tn){gg.console&&("function"==typeof gg.console.warn?gg.console.warn.apply(gg.console,arguments):e.call(null,arguments))},error:function error(Tn){gg.console&&("function"==typeof gg.console.error?gg.console.error.apply(gg.console,arguments):e(Tn))}};
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @license
* FileSaver.js
* A saveAs() FileSaver implementation.
*
* By Eli Grey, http://eligrey.com
*
* License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT)
* source : http://purl.eligrey.com/github/FileSaver.js
2020-09-18 20:43:34 +00:00
*/function r(Tn,Un,Qn){var Dn=new XMLHttpRequest;Dn.open("GET",Tn),Dn.responseType="blob",Dn.onload=function(){yg(Dn.response,Un,Qn)},Dn.onerror=function(){mg.error("could not download file")},Dn.send()}function i(Tn){var Un=new XMLHttpRequest;Un.open("HEAD",Tn,!1);try{Un.send()}catch(Tn){}return Un.status>=200&&Un.status<=299}function a(Tn){try{Tn.dispatchEvent(new MouseEvent("click"))}catch(Qn){var Un=document.createEvent("MouseEvents");Un.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),Tn.dispatchEvent(Un)}}var _g,vg,yg=gg.saveAs||("object"!=("undefined"==typeof window?"undefined":_typeof(window))||window!==gg?function(){}:"download"in HTMLAnchorElement.prototype?function(Tn,Un,Qn){var Dn=gg.URL||gg.webkitURL,Hn=document.createElement("a");Un=Un||Tn.name||"download",Hn.download=Un,Hn.rel="noopener","string"==typeof Tn?(Hn.href=Tn,Hn.origin!==location.origin?i(Hn.href)?r(Tn,Un,Qn):a(Hn,Hn.target="_blank"):a(Hn)):(Hn.href=Dn.createObjectURL(Tn),setTimeout((function(){Dn.revokeObjectURL(Hn.href)}),4e4),setTimeout((function(){a(Hn)}),0))}:"msSaveOrOpenBlob"in navigator?function(Tn,Un,Qn){if(Un=Un||Tn.name||"download","string"==typeof Tn)if(i(Tn))r(Tn,Un,Qn);else{var Dn=document.createElement("a");Dn.href=Tn,Dn.target="_blank",setTimeout((function(){a(Dn)}))}else navigator.msSaveOrOpenBlob(function(Tn,Un){return void 0===Un?Un={autoBom:!1}:"object"!=_typeof(Un)&&(mg.warn("Deprecated: Expected third argument to be a object"),Un={autoBom:!Un}),Un.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(Tn.type)?new Blob([String.fromCharCode(65279),Tn],{type:Tn.type}):Tn}(Tn,Qn),Un)}:function(Tn,Un,Qn,Dn){if((Dn=Dn||open("","_blank"))&&(Dn.document.title=Dn.document.body.innerText="downloading..."),"string"==typeof Tn)return r(Tn,Un,Qn);var Hn="application/octet-stream"===Tn.type,Gn=/constructor/i.test(gg.HTMLElement)||gg.safari,zn=/CriOS\/[\d]+/.test(navigator.userAgent);if((zn||Hn&&Gn)&&"object"==("undefined"==typeof FileReader?"undefined":_typeof(FileReader))){var Vn=new FileReader;Vn.onloadend=function(){var Tn=Vn.result;Tn=zn?Tn:Tn.replace(/^data:[^;]*;/,"data:attachment/file;"),Dn?Dn.location.href=Tn:location=Tn,Dn=null},Vn.readAsDataURL(Tn)}else{var Kn=gg.URL||gg.webkitURL,Wn=Kn.createObjectURL(Tn);Dn?Dn.location=Wn:location.href=Wn,Dn=null,setTimeout((function(){Kn.revokeObjectURL(Wn)}),4e4)}});
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* 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
2020-09-18 20:43:34 +00:00
*/function c(Tn){var Un;Tn=Tn||"",this.ok=!1,"#"==Tn.charAt(0)&&(Tn=Tn.substr(1,6)),Tn={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"}[Tn=(Tn=Tn.replace(/ /g,"")).toLowerCase()]||Tn;for(var Qn=[{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(Tn){return[parseInt(Tn[1]),parseInt(Tn[2]),parseInt(Tn[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function process(Tn){return[parseInt(Tn[1],16),parseInt(Tn[2],16),parseInt(Tn[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function process(Tn){return[parseInt(Tn[1]+Tn[1],16),parseInt(Tn[2]+Tn[2],16),parseInt(Tn[3]+Tn[3],16)]}}],Dn=0;Dn<Qn.length;Dn++){var Hn=Qn[Dn].re,Gn=Qn[Dn].process,zn=Hn.exec(Tn);zn&&(Un=Gn(zn),this.r=Un[0],this.g=Un[1],this.b=Un[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 Tn=this.r.toString(16),Un=this.g.toString(16),Qn=this.b.toString(16);return 1==Tn.length&&(Tn="0"+Tn),1==Un.length&&(Un="0"+Un),1==Qn.length&&(Qn="0"+Qn),"#"+Tn+Un+Qn}}function h(Tn){if("object"!=_typeof(Tn))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var Un={};this.subscribe=function(Tn,Qn
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @license
* Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2020-09-18 20:43:34 +00:00
function(Tn){var Un=function e(Tn){if(void 0!==Tn&&""!=Tn)return!0};g.API.events.push(["addPage",function(Tn){this.internal.getPageInfo(Tn.pageNumber).pageContext.annotations=[]}]),Tn.events.push(["putPage",function(Tn){for(var Qn,Dn,Hn,Gn=this.internal.getCoordinateString,zn=this.internal.getVerticalCoordinateString,Vn=this.internal.getPageInfoByObjId(Tn.objId),Kn=Tn.pageContext.annotations,Wn=!1,Xn=0;Xn<Kn.length&&!Wn;Xn++)switch((Qn=Kn[Xn]).type){case"link":(Un(Qn.options.url)||Un(Qn.options.pageNumber))&&(Wn=!0);break;case"reference":case"text":case"freetext":Wn=!0}if(0!=Wn){this.internal.write("/Annots [");for(var Yn=0;Yn<Kn.length;Yn++)switch((Qn=Kn[Yn]).type){case"reference":this.internal.write(" "+Qn.object.objId+" 0 R ");break;case"text":var Jn=this.internal.newAdditionalObject(),$n=this.internal.newAdditionalObject(),Zn=Qn.title||"Note";Hn="<</Type /Annot /Subtype /Text "+(Dn="/Rect ["+Gn(Qn.bounds.x)+" "+zn(Qn.bounds.y+Qn.bounds.h)+" "+Gn(Qn.bounds.x+Qn.bounds.w)+" "+zn(Qn.bounds.y)+"] ")+"/Contents ("+Qn.contents+")",Hn+=" /Popup "+$n.objId+" 0 R",Hn+=" /P "+Vn.objId+" 0 R",Hn+=" /T ("+Zn+") >>",Jn.content=Hn;var er=Jn.objId+" 0 R";Hn="<</Type /Annot /Subtype /Popup "+(Dn="/Rect ["+Gn(Qn.bounds.x+30)+" "+zn(Qn.bounds.y+Qn.bounds.h)+" "+Gn(Qn.bounds.x+Qn.bounds.w+30)+" "+zn(Qn.bounds.y)+"] ")+" /Parent "+er,Qn.open&&(Hn+=" /Open true"),Hn+=" >>",$n.content=Hn,this.internal.write(Jn.objId,"0 R",$n.objId,"0 R");break;case"freetext":Dn="/Rect ["+Gn(Qn.bounds.x)+" "+zn(Qn.bounds.y)+" "+Gn(Qn.bounds.x+Qn.bounds.w)+" "+zn(Qn.bounds.y+Qn.bounds.h)+"] ";var tr=Qn.color||"#000000";Hn="<</Type /Annot /Subtype /FreeText "+Dn+"/Contents ("+Qn.contents+")",Hn+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+tr+")",Hn+=" /Border [0 0 0]",Hn+=" >>",this.internal.write(Hn);break;case"link":if(Qn.options.name){var nr=this.annotations._nameMap[Qn.options.name];Qn.options.pageNumber=nr.page,Qn.options.top=nr.y}else Qn.options.top||(Qn.options.top=0);if(Dn="/Rect ["+Gn(Qn.x)+" "+zn(Qn.y)+" "+Gn(Qn.x+Qn.w)+" "+zn(Qn.y+Qn.h)+"] ",Hn="",Qn.options.url)Hn="<</Type /Annot /Subtype /Link "+Dn+"/Border [0 0 0] /A <</S /URI /URI ("+Qn.options.url+") >>";else if(Qn.options.pageNumber)switch(Hn="<</Type /Annot /Subtype /Link "+Dn+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(Qn.options.pageNumber).objId+" 0 R",Qn.options.magFactor=Qn.options.magFactor||"XYZ",Qn.options.magFactor){case"Fit":Hn+=" /Fit]";break;case"FitH":Hn+=" /FitH "+Qn.options.top+"]";break;case"FitV":Qn.options.left=Qn.options.left||0,Hn+=" /FitV "+Qn.options.left+"]";break;case"XYZ":default:var rr=zn(Qn.options.top);Qn.options.left=Qn.options.left||0,void 0===Qn.options.zoom&&(Qn.options.zoom=0),Hn+=" /XYZ "+Qn.options.left+" "+rr+" "+Qn.options.zoom+"]"}""!=Hn&&(Hn+=" >>",this.internal.write(Hn))}this.internal.write("]")}}]),Tn.createAnnotation=function(Tn){var Un=this.internal.getCurrentPageInfo();switch(Tn.type){case"link":this.link(Tn.bounds.x,Tn.bounds.y,Tn.bounds.w,Tn.bounds.h,Tn);break;case"text":case"freetext":Un.pageContext.annotations.push(Tn)}},Tn.link=function(Tn,Un,Qn,Dn,Hn){this.internal.getCurrentPageInfo().pageContext.annotations.push({x:Tn,y:Un,w:Qn,h:Dn,options:Hn,type:"link"})},Tn.textWithLink=function(Tn,Un,Qn,Dn){var Hn=this.getTextWidth(Tn),Gn=this.internal.getLineHeight()/this.internal.scaleFactor;return this.text(Tn,Un,Qn,Dn),Qn+=.2*Gn,this.link(Un,Qn-Gn,Hn,Gn,Dn),Hn},Tn.getTextWidth=function(Tn){var Un=this.internal.getFontSize();return this.getStringUnitWidth(Tn)*Un/this.internal.scaleFactor}}(g.API),
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @license
* Copyright (c) 2017 Aras Abbasi
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2020-09-18 20:43:34 +00:00
function(Tn){var Un={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]},Qn={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}},Dn={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},Hn=[1570,1571,1573,1575];Tn.__arabicParser__={};var Gn=Tn.__arabicParser__.isInArabicSubstitutionA=function(Tn){return void 0!==Un[Tn.charCodeAt(0)]},zn=Tn.__arabicParser__.isArabicLetter=function(Tn){return"string"==typeof Tn&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(Tn)},Vn=Tn.__arabicParser__.isArabicEndLetter=function(Tn){return zn(Tn)&&Gn(Tn)&&Un[Tn.charCodeAt(0)].length<=2},Kn=Tn.__arabicParser__.isArabicAlfLetter=function(Tn){return zn(Tn)&&Hn.indexOf(Tn.charCodeAt(0))>=0};Tn.__arabicParser__.arabicLetterHasIsolatedForm=function(Tn){return zn(Tn)&&Gn(Tn)&&Un[Tn.charCodeAt(0)].length>=1};var Wn=Tn.__arabicParser__.arabicLetterHasFinalForm=function(Tn){return zn(Tn)&&Gn(Tn)&&Un[Tn.charCodeAt(0)].length>=2};Tn.__arabicParser__.arabicLetterHasInitialForm=function(Tn){return zn(Tn)&&Gn(Tn)&&Un[Tn.charCodeAt(0)].length>=3};var Xn=Tn.__arabicParser__.arabicLetterHasMedialForm=function(Tn){return zn(Tn)&&Gn(Tn)&&4==Un[Tn.charCodeAt(0)].length},Yn=Tn.__arabicParser__.resolveLigatures=function(Tn){var Un=0,Dn=Qn,Hn="",Gn=0;for(Un=0;Un<Tn.length;Un+=1)void 0!==Dn[Tn.charCodeAt(Un)]?(Gn++,"number"==typeof(Dn=Dn[Tn.charCodeAt(Un)])&&(Hn+=String.fromCharCode(Dn),Dn=Qn,Gn=0),Un===Tn.length-1&&(Dn=Qn,Hn+=Tn.charAt(Un-(Gn-1)),Un-=Gn-1,Gn=0)):(Dn=Qn,Hn+=Tn.charAt(Un-Gn),Un-=Gn,Gn=0);return Hn};Tn.__arabicParser__.isArabicDiacritic=function(Tn){return void 0!==Tn&&void 0!==Dn[Tn.charCodeAt(0)]};var Jn=Tn.__arabicParser__.getCorrectForm=function(Tn,Un,Qn){return zn(Tn)?!1===Gn(Tn)?-1:!Wn(Tn)||!zn(Un)&&!zn(Qn)||!zn(Qn)&&Vn(Un)||Vn(Tn)&&!zn(Un)||Vn(Tn)&&Kn(Un)||Vn(Tn)&&Vn(Un)?0:Xn(Tn)&&zn(Un)&&!Vn(Un)&&zn(Qn)&&Wn(Qn)?3:Vn(Tn)||!zn(Qn)?1:2:-1},$n=function d(Tn){var Qn=0,Dn=0,Hn=0,Gn="",Vn="",Kn="",Wn=(Tn=Tn||"").split("\\s+"),Xn=[];for(Qn=0;Qn<Wn.length;Qn+=1){fo
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @license
* Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2020-09-18 20:43:34 +00:00
function(Tn){var Un=function e(){var Tn=void 0;Object.defineProperty(this,"pdf",{get:function get(){return Tn},set:function set(Un){Tn=Un}});var e=150;Object.defineProperty(this,"width",{get:function get(){return e},set:function set(Tn){e=isNaN(Tn)||!1===Number.isInteger(Tn)||Tn<0?150:Tn,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=e+1)}});var Un=300;Object.defineProperty(this,"height",{get:function get(){return Un},set:function set(Tn){Un=isNaN(Tn)||!1===Number.isInteger(Tn)||Tn<0?300:Tn,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=Un+1)}});var Qn=[];Object.defineProperty(this,"childNodes",{get:function get(){return Qn},set:function set(Tn){Qn=Tn}});var Dn={};Object.defineProperty(this,"style",{get:function get(){return Dn},set:function set(Tn){Dn=Tn}}),Object.defineProperty(this,"parentNode",{})};Un.prototype.getContext=function(Tn,Un){var Qn;if("2d"!==(Tn=Tn||"2d"))return null;for(Qn in Un)this.pdf.context2d.hasOwnProperty(Qn)&&(this.pdf.context2d[Qn]=Un[Qn]);return this.pdf.context2d._canvas=this,this.pdf.context2d},Un.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},Tn.events.push(["initialized",function(){this.canvas=new Un,this.canvas.pdf=this}])}(g.API),
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @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.
* ====================================================================
*/
2020-09-18 20:43:34 +00:00
function(Tn){var Un={left:0,top:0,bottom:0,right:0},Qn=!1,Dn=function r(){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({},Un),this.internal.__cell__.margins.width=this.getPageWidth(),Hn.call(this))},Hn=function i(){this.internal.__cell__.lastCell=new Gn,this.internal.__cell__.pages=1},Gn=function a(){var Tn=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function get(){return Tn},set:function set(Un){Tn=Un}});var Un=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function get(){return Un},set:function set(Tn){Un=Tn}});var Qn=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function get(){return Qn},set:function set(Tn){Qn=Tn}});var Dn=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function get(){return Dn},set:function set(Tn){Dn=Tn}});var Hn=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function get(){return Hn},set:function set(Tn){Hn=Tn}});var a=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function get(){return a},set:function set(Tn){a=Tn}});var Gn=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function get(){return Gn},set:function set(Tn){Gn=Tn}}),this};Gn.prototype.clone=function(){return new Gn(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},Gn.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},Tn.setHeaderFunction=function(Tn){return Dn.call(this),this.internal.__cell__.headerFunction="function"==typeof Tn?Tn:void 0,this},Tn.getTextDimensions=function(Tn,Un){Dn.call(this);var Qn=(Un=Un||{}).fontSize||this.getFontSize(),Hn=Un.font||this.getFont(),Gn=Un.scaleFactor||this.internal.scaleFactor,zn=0,Vn=0,Kn=0;if(!Array.isArray(Tn)&&"string"!=typeof Tn){if("number"!=typeof Tn)throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");Tn=String(Tn)}var Wn=Un.maxWidth;Wn>0?"string"==typeof Tn?Tn=this.splitTextToSize(Tn,Wn):"[object Array]"===Object.prototype.toString.call(Tn)&&(Tn=this.splitTextToSize(Tn.join(" "),Wn)):Tn=Array.isArray(Tn)?Tn:[Tn];for(var Xn=0;Xn<Tn.length;Xn++)zn<(Kn=this.getStringUnitWidth(Tn[Xn],{font:Hn})*Qn)&&(zn=Kn);return 0!==zn&&(Vn=Tn.length),{w:zn/=Gn,h:Math.max((Vn*Qn*this.getLineHeightFactor()-Qn*(this.getLineHeightFactor()-1))/Gn,0)}},Tn.cellAddPage=function(){Dn.call(this),this.addPage();var Tn=this.internal.__cell__.margins||Un;return this.internal.__cell__.lastCell=new Gn(Tn.left,Tn.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var zn=Tn.cell=function(){var Tn;Tn=arguments[0]instanceof Gn?arguments[0]:new Gn(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),Dn.call(this);var Hn=this.internal.__cell__.lastCell,zn=this.internal.__cell__.padding,Vn=this.internal.__cell__.margins||Un,Kn=this.internal.__cell__.tableHeaderRow,Wn=this.internal.__cell__.printHeaders;return void 0!==Hn.lineNumber&&(Hn.lineNumber===Tn.lineNumber?(Tn.x=(Hn.x||0)+(Hn.width||0),Tn.y=Hn.y||0):Hn.y+Hn.height+Tn.height+Vn.bottom>this.getPageHeight()?(this.cellAddPage(),Tn.y=Vn.top,Wn&&Kn&&(this.printHeaderRow(Tn.lineNumber,!0),Tn.y+=Kn[0].height)):Tn.y=Hn.y+Hn.height||Tn.y),void 0!==Tn.text[0]&&(this.rect(Tn.x,Tn.y,Tn.width,Tn.height,!0===Qn?"FD":void 0),"right"===Tn.align?this.text(Tn.text,Tn.x+Tn.width-zn,Tn.y+zn,{align:"right",baseline:"top"}):"center"===Tn.align?this.text(Tn.text,Tn.x+Tn.width/2,Tn.y+zn,{align:"center",baseline:"top",maxWidth:Tn.width-zn-zn}):this.text(Tn.text,Tn.x+zn,Tn.y+zn,{align:"left",baseline:"top",maxWidth:Tn.width-zn-zn})),this.internal.__cell__.lastCell=Tn,this};Tn.table=function(Tn,Qn,Kn,Wn,Xn){if(Dn.call(this),!Kn)throw new Error("No data for PDF table.");var Yn,Jn,$n,Zn,er=[],tr=[],nr=[],rr={},ir={},ar=[],or=[],sr=(Xn=Xn||{}).autoSize||!1,lr=!1!==Xn.printHeaders,cr=Xn.css&&void 0!==Xn.css["font-size"]?16*Xn.css["font-size"]:
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @license
Copyright (c) 2013 Gildas Lormeau. All rights reserved.
2020-08-28 22:07:07 +00:00
2020-09-08 23:35:47 +00:00
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
2020-08-28 22:07:07 +00:00
2020-09-08 23:35:47 +00:00
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2020-08-28 22:07:07 +00:00
2020-09-08 23:35:47 +00:00
2. 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.
2020-08-28 22:07:07 +00:00
2020-09-08 23:35:47 +00:00
3. The names of the authors may not be used to endorse or promote products
derived from this software without specific prior written permission.
2020-08-28 22:07:07 +00:00
2020-09-08 23:35:47 +00:00
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 JCRAFT,
INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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.
*/
2020-09-18 20:43:34 +00:00
var fm=[0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,16,17,18,18,19,19,20,20,20,20,21,21,21,21,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29];function ft(){var Tn=this;function e(Tn,Un){var Qn=0;do{Qn|=1&Tn,Tn>>>=1,Qn<<=1}while(--Un>0);return Qn>>>1}Tn.build_tree=function(Un){var Qn,Dn,Hn,Gn=Tn.dyn_tree,zn=Tn.stat_desc.static_tree,Vn=Tn.stat_desc.elems,Kn=-1;for(Un.heap_len=0,Un.heap_max=573,Qn=0;Qn<Vn;Qn++)0!==Gn[2*Qn]?(Un.heap[++Un.heap_len]=Kn=Qn,Un.depth[Qn]=0):Gn[2*Qn+1]=0;for(;Un.heap_len<2;)Gn[2*(Hn=Un.heap[++Un.heap_len]=Kn<2?++Kn:0)]=1,Un.depth[Hn]=0,Un.opt_len--,zn&&(Un.static_len-=zn[2*Hn+1]);for(Tn.max_code=Kn,Qn=Math.floor(Un.heap_len/2);Qn>=1;Qn--)Un.pqdownheap(Gn,Qn);Hn=Vn;do{Qn=Un.heap[1],Un.heap[1]=Un.heap[Un.heap_len--],Un.pqdownheap(Gn,1),Dn=Un.heap[1],Un.heap[--Un.heap_max]=Qn,Un.heap[--Un.heap_max]=Dn,Gn[2*Hn]=Gn[2*Qn]+Gn[2*Dn],Un.depth[Hn]=Math.max(Un.depth[Qn],Un.depth[Dn])+1,Gn[2*Qn+1]=Gn[2*Dn+1]=Hn,Un.heap[1]=Hn++,Un.pqdownheap(Gn,1)}while(Un.heap_len>=2);Un.heap[--Un.heap_max]=Un.heap[1],function(Un){var Qn,Dn,Hn,Gn,zn,Vn,Kn=Tn.dyn_tree,Wn=Tn.stat_desc.static_tree,Xn=Tn.stat_desc.extra_bits,Yn=Tn.stat_desc.extra_base,Jn=Tn.stat_desc.max_length,$n=0;for(Gn=0;Gn<=15;Gn++)Un.bl_count[Gn]=0;for(Kn[2*Un.heap[Un.heap_max]+1]=0,Qn=Un.heap_max+1;Qn<573;Qn++)(Gn=Kn[2*Kn[2*(Dn=Un.heap[Qn])+1]+1]+1)>Jn&&(Gn=Jn,$n++),Kn[2*Dn+1]=Gn,Dn>Tn.max_code||(Un.bl_count[Gn]++,zn=0,Dn>=Yn&&(zn=Xn[Dn-Yn]),Vn=Kn[2*Dn],Un.opt_len+=Vn*(Gn+zn),Wn&&(Un.static_len+=Vn*(Wn[2*Dn+1]+zn)));if(0!==$n){do{for(Gn=Jn-1;0===Un.bl_count[Gn];)Gn--;Un.bl_count[Gn]--,Un.bl_count[Gn+1]+=2,Un.bl_count[Jn]--,$n-=2}while($n>0);for(Gn=Jn;0!==Gn;Gn--)for(Dn=Un.bl_count[Gn];0!==Dn;)(Hn=Un.heap[--Qn])>Tn.max_code||(Kn[2*Hn+1]!==Gn&&(Un.opt_len+=(Gn-Kn[2*Hn+1])*Kn[2*Hn],Kn[2*Hn+1]=Gn),Dn--)}}(Un),function(Tn,Un,Qn){var Dn,Hn,Gn,zn=[],Vn=0;for(Dn=1;Dn<=15;Dn++)zn[Dn]=Vn=Vn+Qn[Dn-1]<<1;for(Hn=0;Hn<=Un;Hn++)0!==(Gn=Tn[2*Hn+1])&&(Tn[2*Hn]=e(zn[Gn]++,Gn))}(Gn,Tn.max_code,Un.bl_count)}}function dt(Tn,Un,Qn,Dn,Hn){this.static_tree=Tn,this.extra_bits=Un,this.extra_base=Qn,this.elems=Dn,this.max_length=Hn}function pt(Tn,Un,Qn,Dn,Hn){this.good_length=Tn,this.max_lazy=Un,this.nice_length=Qn,this.max_chain=Dn,this.func=Hn}ft._length_code=[0,1,2,3,4,5,6,7,8,8,9,9,10,10,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @license
* jsPDF filters PlugIn
* Copyright (c) 2014 Aras Abbasi
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
2020-09-18 20:43:34 +00:00
*/Lt.prototype={deflateInit:function deflateInit(Tn,Un){return this.dstate=new Nt,Un||(Un=15),this.dstate.deflateInit(this,Tn,Un)},deflate:function deflate(Tn){return this.dstate?this.dstate.deflate(this,Tn):-2},deflateEnd:function deflateEnd(){if(!this.dstate)return-2;var Tn=this.dstate.deflateEnd();return this.dstate=null,Tn},deflateParams:function deflateParams(Tn,Un){return this.dstate?this.dstate.deflateParams(this,Tn,Un):-2},deflateSetDictionary:function deflateSetDictionary(Tn,Un){return this.dstate?this.dstate.deflateSetDictionary(this,Tn,Un):-2},read_buf:function read_buf(Tn,Un,Qn){var Dn=this.avail_in;return Dn>Qn&&(Dn=Qn),0===Dn?0:(this.avail_in-=Dn,Tn.set(this.next_in.subarray(this.next_in_index,this.next_in_index+Dn),Un),this.next_in_index+=Dn,this.total_in+=Dn,Dn)},flush_pending:function flush_pending(){var Tn=this.dstate.pending;Tn>this.avail_out&&(Tn=this.avail_out),0!==Tn&&(this.next_out.set(this.dstate.pending_buf.subarray(this.dstate.pending_out,this.dstate.pending_out+Tn),this.next_out_index),this.next_out_index+=Tn,this.dstate.pending_out+=Tn,this.total_out+=Tn,this.avail_out-=Tn,this.dstate.pending-=Tn,0===this.dstate.pending&&(this.dstate.pending_out=0))}},function(Tn){var Un=function e(Tn){var e,Un,Qn,Dn,Hn,Gn,zn,Vn,Kn,Wn;for(/[^\x00-\xFF]/.test(Tn),Un=[],Qn=0,Dn=(Tn+=e="\0\0\0\0".slice(Tn.length%4||4)).length;Dn>Qn;Qn+=4)0!==(Hn=(Tn.charCodeAt(Qn)<<24)+(Tn.charCodeAt(Qn+1)<<16)+(Tn.charCodeAt(Qn+2)<<8)+Tn.charCodeAt(Qn+3))?(Gn=(Hn=((Hn=((Hn=((Hn=(Hn-(Wn=Hn%85))/85)-(Kn=Hn%85))/85)-(Vn=Hn%85))/85)-(zn=Hn%85))/85)%85,Un.push(Gn+33,zn+33,Vn+33,Kn+33,Wn+33)):Un.push(122);return function(Tn,Un){for(var Qn=Un;Qn>0;Qn--)Tn.pop()}(Un,e.length),String.fromCharCode.apply(String,Un)+"~>"},Qn=function n(Tn){var Un,n,Qn,Dn,Hn,Gn=String,zn="length",Vn=255,Kn="charCodeAt",Wn="slice",Xn="replace";for(Tn[Wn](-2),Tn=Tn[Wn](0,-2)[Xn](/\s/g,"")[Xn]("z","!!!!!"),Qn=[],Dn=0,Hn=(Tn+=Un="uuuuu"[Wn](Tn[zn]%5||5))[zn];Hn>Dn;Dn+=5)n=52200625*(Tn[Kn](Dn)-33)+614125*(Tn[Kn](Dn+1)-33)+7225*(Tn[Kn](Dn+2)-33)+85*(Tn[Kn](Dn+3)-33)+(Tn[Kn](Dn+4)-33),Qn.push(Vn&n>>24,Vn&n>>16,Vn&n>>8,Vn&n);return function(Tn,Un){for(var Qn=Un;Qn>0;Qn--)Tn.pop()}(Qn,Un[zn]),Gn.fromCharCode.apply(Gn,Qn)},Dn=function r(Tn){var Un=new RegExp(/^([0-9A-Fa-f]{2})+$/);if(-1!==(Tn=Tn.replace(/\s/g,"")).indexOf(">")&&(Tn=Tn.substr(0,Tn.indexOf(">"))),Tn.length%2&&(Tn+="0"),!1===Un.test(Tn))return"";for(var Qn="",r=0;r<Tn.length;r+=2)Qn+=String.fromCharCode("0x"+(Tn[r]+Tn[r+1]));return Qn},Hn=function i(Un){for(var Qn,Dn,i,Hn,Gn,zn=[],Vn=Un.length;Vn--;)zn[Vn]=Un.charCodeAt(Vn);return Qn=Tn.adler32cs.from(Un),i=Un=(Dn=new xt(6)).append(new Uint8Array(zn)),Hn=Dn.flush(),(Gn=new Uint8Array(i.byteLength+Hn.byteLength)).set(new Uint8Array(i),0),Gn.set(new Uint8Array(Hn),i.byteLength),Un=Gn,(zn=new Uint8Array(Un.byteLength+6)).set(new Uint8Array([120,156])),zn.set(Un,2),zn.set(new Uint8Array([255&Qn,Qn>>8&255,Qn>>16&255,Qn>>24&255]),Un.byteLength+2),zn.reduce((function(Tn,Un){return Tn+String.fromCharCode(Un)}),"")};Tn.processDataByFilters=function(Tn,Gn){var zn=0,Vn=Tn||"",Kn=[];for("string"==typeof(Gn=Gn||[])&&(Gn=[Gn]),zn=0;zn<Gn.length;zn+=1)switch(Gn[zn]){case"ASCII85Decode":case"/ASCII85Decode":Vn=Qn(Vn),Kn.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":Vn=Un(Vn),Kn.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":Vn=Dn(Vn),Kn.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":Vn=Vn.split("").map((function(Tn){return("0"+Tn.charCodeAt().toString(16)).slice(-2)})).join("")+">",Kn.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":Vn=Hn(Vn),Kn.push("/FlateDecode");break;default:throw new Error('The filter: "'+Gn[zn]+'" is not implemented')}return{data:Vn,reverseChain:Kn.reverse().join(" ")}}}(g.API),
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @license
* jsPDF fileloading PlugIn
* Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2020-09-18 20:43:34 +00:00
function(Tn){Tn.loadFile=function(Tn,Un,Qn){return function(Tn,Un,Qn){Un=!1!==Un,Qn="function"==typeof Qn?Qn:function(){};var Dn=void 0;try{Dn=function(Tn,Un,Qn){var Dn=new XMLHttpRequest,Hn=0,Gn=function a(Tn){var Un=Tn.length,Qn=[],Dn=String.fromCharCode;for(Hn=0;Hn<Un;Hn+=1)Qn.push(Dn(255&Tn.charCodeAt(Hn)));return Qn.join("")};if(Dn.open("GET",Tn,!Un),Dn.overrideMimeType("text/plain; charset=x-user-defined"),!1===Un&&(Dn.onload=function(){200===Dn.status?Qn(Gn(this.responseText)):Qn(void 0)}),Dn.send(null),Un&&200===Dn.status)return Gn(Dn.responseText)}(Tn,Un,Qn)}catch(Tn){}return Dn}(Tn,Un,Qn)},Tn.loadImageFile=Tn.loadFile}(g.API),
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @license
* Copyright (c) 2018 Erik Koopmans
* Released under the MIT License.
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2020-09-18 20:43:34 +00:00
function(Tn){function n(){return(gg.html2canvas?Promise.resolve(gg.html2canvas):Promise.resolve().then((function(){return Wk}))).catch((function(Tn){return Promise.reject(new Error("Could not load dompurify: "+Tn))})).then((function(Tn){return Tn.default?Tn.default:Tn}))}function r(){return(gg.DOMPurify?Promise.resolve(gg.DOMPurify):Promise.resolve().then((function(){return tS}))).catch((function(Tn){return Promise.reject(new Error("Could not load dompurify: "+Tn))})).then((function(Tn){return Tn.default?Tn.default:Tn}))}var Un=function i(Tn){var Un=_typeof(Tn);return"undefined"===Un?"undefined":"string"===Un||Tn instanceof String?"string":"number"===Un||Tn instanceof Number?"number":"function"===Un||Tn instanceof Function?"function":Tn&&Tn.constructor===Array?"array":Tn&&1===Tn.nodeType?"element":"object"===Un?"object":"unknown"},Qn=function a(Tn,Un){var Qn=document.createElement(Tn);for(var Dn in Un.className&&(Qn.className=Un.className),Un.innerHTML&&Un.dompurify&&(Qn.innerHTML=Un.dompurify.sanitize(Un.innerHTML)),Un.style)Qn.style[Dn]=Un.style[Dn];return Qn},Dn=function t(Tn){var Un=Object.assign(t.convert(Promise.resolve()),JSON.parse(JSON.stringify(t.template))),Qn=t.convert(Promise.resolve(),Un);return(Qn=Qn.setProgress(1,t,1,[t])).set(Tn)};(Dn.prototype=Object.create(Promise.prototype)).constructor=Dn,Dn.convert=function(Tn,Un){return Tn.__proto__=Un||Dn.prototype,Tn},Dn.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:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},Dn.prototype.from=function(Tn,Dn){return this.then((function(){switch(Dn=Dn||function(Tn){switch(Un(Tn)){case"string":return"string";case"element":return"canvas"===Tn.nodeName.toLowerCase?"canvas":"element";default:return"unknown"}}(Tn)){case"string":return this.then(r).then((function(Un){return this.set({src:Qn("div",{innerHTML:Tn,dompurify:Un})})}));case"element":return this.set({src:Tn});case"canvas":return this.set({canvas:Tn});case"img":return this.set({img:Tn});default:return this.error("Unknown source type.")}}))},Dn.prototype.to=function(Tn){switch(Tn){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.")}},Dn.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 Tn={position:"relative",display:"inline-block",width: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},Un=function o(Tn,Un){for(var Qn=3===Tn.nodeType?document.createTextNode(Tn.nodeValue):Tn.cloneNode(!1),Dn=Tn.firstChild;Dn;Dn=Dn.nextSibling)!0!==Un&&1===Dn.nodeType&&"SCRIPT"===Dn.nodeName||Qn.appendChild(o(Dn,Un));return 1===Tn.nodeType&&("CANVAS"===Tn.nodeName?(Qn.width=Tn.width,Qn.height=Tn.height,Qn.getContext("2d").drawImage(Tn,0,0)):"TEXTAREA"!==Tn.nodeName&&"SELECT"!==Tn.nodeName||(Qn.value=Tn.value),Qn.addEventListener("load",(function(){Qn.scrollTop=Tn.scrollTop,Qn.scrollLeft=Tn.scrollLeft}),!0)),Qn}(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===Un.tagName&&(Tn.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=Qn("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=Qn("div",{className:"html2pdf__container",style:Tn}),this.prop.container.appendChild(Un),this.prop.container.firstChild.appendChild(Qn("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.sty
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @license
* Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2020-09-18 20:43:34 +00:00
function(Tn){var Un;Tn.events.push(["postPutResources",function(){var Tn=this,Qn=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var Dn=Tn.outline.render().split(/\r\n/),Hn=0;Hn<Dn.length;Hn++){var Gn=Dn[Hn],zn=Qn.exec(Gn);if(null!=zn){var Vn=zn[1];Tn.internal.newObjectDeferredBegin(Vn,!1)}Tn.internal.write(Gn)}if(this.outline.createNamedDestinations){var Kn=this.internal.pages.length,Wn=[];for(Hn=0;Hn<Kn;Hn++){var Xn=Tn.internal.newObject();Wn.push(Xn);var Yn=Tn.internal.getPageInfo(Hn+1);Tn.internal.write("<< /D["+Yn.objId+" 0 R /XYZ null null null]>> endobj")}var Jn=Tn.internal.newObject();for(Tn.internal.write("<< /Names [ "),Hn=0;Hn<Wn.length;Hn++)Tn.internal.write("(page_"+(Hn+1)+")"+Wn[Hn]+" 0 R");Tn.internal.write(" ] >>","endobj"),Un=Tn.internal.newObject(),Tn.internal.write("<< /Dests "+Jn+" 0 R"),Tn.internal.write(">>","endobj")}}]),Tn.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 "+Un+" 0 R"))}]),Tn.events.push(["initialized",function(){var Tn=this;Tn.outline={createNamedDestinations:!1,root:{children:[]}},Tn.outline.add=function(Tn,Un,Qn){var Dn={title:Un,options:Qn,children:[]};return null==Tn&&(Tn=this.root),Tn.children.push(Dn),Dn},Tn.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=Tn,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},Tn.outline.genIds_r=function(Un){Un.id=Tn.internal.newObjectDeferred();for(var Qn=0;Qn<Un.children.length;Qn++)this.genIds_r(Un.children[Qn])},Tn.outline.renderRoot=function(Tn){this.objStart(Tn),this.line("/Type /Outlines"),Tn.children.length>0&&(this.line("/First "+this.makeRef(Tn.children[0])),this.line("/Last "+this.makeRef(Tn.children[Tn.children.length-1]))),this.line("/Count "+this.count_r({count:0},Tn)),this.objEnd()},Tn.outline.renderItems=function(Un){for(var Qn=this.ctx.pdf.internal.getVerticalCoordinateString,Dn=0;Dn<Un.children.length;Dn++){var Hn=Un.children[Dn];this.objStart(Hn),this.line("/Title "+this.makeString(Hn.title)),this.line("/Parent "+this.makeRef(Un)),Dn>0&&this.line("/Prev "+this.makeRef(Un.children[Dn-1])),Dn<Un.children.length-1&&this.line("/Next "+this.makeRef(Un.children[Dn+1])),Hn.children.length>0&&(this.line("/First "+this.makeRef(Hn.children[0])),this.line("/Last "+this.makeRef(Hn.children[Hn.children.length-1])));var Gn=this.count=this.count_r({count:0},Hn);if(Gn>0&&this.line("/Count "+Gn),Hn.options&&Hn.options.pageNumber){var zn=Tn.internal.getPageInfo(Hn.options.pageNumber);this.line("/Dest ["+zn.objId+" 0 R /XYZ 0 "+Qn(0)+" 0]")}this.objEnd()}for(var Vn=0;Vn<Un.children.length;Vn++)this.renderItems(Un.children[Vn])},Tn.outline.line=function(Tn){this.ctx.val+=Tn+"\r\n"},Tn.outline.makeRef=function(Tn){return Tn.id+" 0 R"},Tn.outline.makeString=function(Un){return"("+Tn.internal.pdfEscape(Un)+")"},Tn.outline.objStart=function(Tn){this.ctx.val+="\r\n"+Tn.id+" 0 obj\r\n<<\r\n"},Tn.outline.objEnd=function(){this.ctx.val+=">> \r\nendobj\r\n"},Tn.outline.count_r=function(Tn,Un){for(var Qn=0;Qn<Un.children.length;Qn++)Tn.count++,this.count_r(Tn,Un.children[Qn]);return Tn.count}}])}(g.API),
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @license
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2020-09-18 20:43:34 +00:00
function(Tn){var Un=[192,193,194,195,196,197,198,199];Tn.processJPEG=function(Tn,Qn,Dn,Hn,Gn,zn){var Vn,Kn=this.decode.DCT_DECODE,Wn=null;if("string"==typeof Tn||this.__addimage__.isArrayBuffer(Tn)||this.__addimage__.isArrayBufferView(Tn)){switch(Tn=Gn||Tn,Tn=this.__addimage__.isArrayBuffer(Tn)?new Uint8Array(Tn):Tn,(Vn=function(Tn){for(var Qn,Dn=256*Tn.charCodeAt(4)+Tn.charCodeAt(5),Hn=Tn.length,Gn={width:0,height:0,numcomponents:1},zn=4;zn<Hn;zn+=2){if(zn+=Dn,-1!==Un.indexOf(Tn.charCodeAt(zn+1))){Qn=256*Tn.charCodeAt(zn+5)+Tn.charCodeAt(zn+6),Gn={width:256*Tn.charCodeAt(zn+7)+Tn.charCodeAt(zn+8),height:Qn,numcomponents:Tn.charCodeAt(zn+9)};break}Dn=256*Tn.charCodeAt(zn+2)+Tn.charCodeAt(zn+3)}return Gn}(Tn=this.__addimage__.isArrayBufferView(Tn)?this.__addimage__.arrayBufferToBinaryString(Tn):Tn)).numcomponents){case 1:zn=this.color_spaces.DEVICE_GRAY;break;case 4:zn=this.color_spaces.DEVICE_CMYK;break;case 3:zn=this.color_spaces.DEVICE_RGB}Wn={data:Tn,width:Vn.width,height:Vn.height,colorSpace:zn,bitsPerComponent:8,filter:Kn,index:Qn,alias:Dn}}return Wn}}(g.API);
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @license
* Extracted from pdf.js
* https://github.com/andreasgal/pdf.js
*
* Copyright (c) 2011 Mozilla Foundation
*
* Contributors: Andreas Gal <gal@mozilla.com>
* Chris G Jones <cjones@mozilla.com>
* Shaon Barman <shaon.barman@gmail.com>
* Vivien Nicolas <21@vingtetun.org>
* Justin D'Arcangelo <justindarc@gmail.com>
* Yury Delendik
*
* 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.
*/
2020-09-18 20:43:34 +00:00
var xm,km,Sm,Cm,Bm,Em=function(){function t(){this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=null}return t.prototype={ensureBuffer:function ensureBuffer(Tn){var Un=this.buffer,Qn=Un?Un.byteLength:0;if(Tn<Qn)return Un;for(var Dn=512;Dn<Tn;)Dn<<=1;for(var Hn=new Uint8Array(Dn),Gn=0;Gn<Qn;++Gn)Hn[Gn]=Un[Gn];return this.buffer=Hn},getByte:function getByte(){for(var Tn=this.pos;this.bufferLength<=Tn;){if(this.eof)return null;this.readBlock()}return this.buffer[this.pos++]},getBytes:function getBytes(Tn){var Un=this.pos;if(Tn){this.ensureBuffer(Un+Tn);for(var Qn=Un+Tn;!this.eof&&this.bufferLength<Qn;)this.readBlock();var Dn=this.bufferLength;Qn>Dn&&(Qn=Dn)}else{for(;!this.eof;)this.readBlock();Qn=this.bufferLength}return this.pos=Qn,this.buffer.subarray(Un,Qn)},lookChar:function lookChar(){for(var Tn=this.pos;this.bufferLength<=Tn;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos])},getChar:function getChar(){for(var Tn=this.pos;this.bufferLength<=Tn;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos++])},makeSubStream:function makeSubStream(Tn,Un,Qn){for(var Dn=Tn+Un;this.bufferLength<=Dn&&!this.eof;)this.readBlock();return new Stream(this.buffer,Tn,Un,Qn)},skip:function skip(Tn){Tn||(Tn=1),this.pos+=Tn},reset:function reset(){this.pos=0}},t}(),Nm=("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||void 0!==sg&&sg||Function('return typeof this === "object" && this.content')()||Function("return this")()).FlateStream=function(){if("undefined"!=typeof Uint32Array){var Tn=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Un=new Uint32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),Qn=new Uint32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),Dn=[new Uint32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @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.
2020-09-18 20:43:34 +00:00
*/function jt(Tn){var Un=0;if(71!==Tn[Un++]||73!==Tn[Un++]||70!==Tn[Un++]||56!==Tn[Un++]||56!=(Tn[Un++]+1&253)||97!==Tn[Un++])throw new Error("Invalid GIF 87a/89a header.");var Qn=Tn[Un++]|Tn[Un++]<<8,Dn=Tn[Un++]|Tn[Un++]<<8,Hn=Tn[Un++],Gn=Hn>>7,zn=1<<1+(7&Hn);Tn[Un++],Tn[Un++];var Vn=null,Kn=null;Gn&&(Vn=Un,Kn=zn,Un+=3*zn);var Wn=!0,Xn=[],Yn=0,Jn=null,$n=0,Zn=null;for(this.width=Qn,this.height=Dn;Wn&&Un<Tn.length;)switch(Tn[Un++]){case 33:switch(Tn[Un++]){case 255:if(11!==Tn[Un]||78==Tn[Un+1]&&69==Tn[Un+2]&&84==Tn[Un+3]&&83==Tn[Un+4]&&67==Tn[Un+5]&&65==Tn[Un+6]&&80==Tn[Un+7]&&69==Tn[Un+8]&&50==Tn[Un+9]&&46==Tn[Un+10]&&48==Tn[Un+11]&&3==Tn[Un+12]&&1==Tn[Un+13]&&0==Tn[Un+16])Un+=14,Zn=Tn[Un++]|Tn[Un++]<<8,Un++;else for(Un+=12;;){if(!((hr=Tn[Un++])>=0))throw Error("Invalid block size");if(0===hr)break;Un+=hr}break;case 249:if(4!==Tn[Un++]||0!==Tn[Un+4])throw new Error("Invalid graphics extension block.");var er=Tn[Un++];Yn=Tn[Un++]|Tn[Un++]<<8,Jn=Tn[Un++],0==(1&er)&&(Jn=null),$n=er>>2&7,Un++;break;case 254:for(;;){if(!((hr=Tn[Un++])>=0))throw Error("Invalid block size");if(0===hr)break;Un+=hr}break;default:throw new Error("Unknown graphic control label: 0x"+Tn[Un-1].toString(16))}break;case 44:var tr=Tn[Un++]|Tn[Un++]<<8,nr=Tn[Un++]|Tn[Un++]<<8,rr=Tn[Un++]|Tn[Un++]<<8,ir=Tn[Un++]|Tn[Un++]<<8,ar=Tn[Un++],or=ar>>6&1,sr=1<<1+(7&ar),lr=Vn,cr=Kn,ur=!1;ar>>7&&(ur=!0,lr=Un,cr=sr,Un+=3*sr);var dr=Un;for(Un++;;){var hr;if(!((hr=Tn[Un++])>=0))throw Error("Invalid block size");if(0===hr)break;Un+=hr}Xn.push({x:tr,y:nr,width:rr,height:ir,has_local_palette:ur,palette_offset:lr,palette_size:cr,data_offset:dr,data_length:Un-dr,transparent_index:Jn,interlaced:!!or,delay:Yn,disposal:$n});break;case 59:Wn=!1;break;default:throw new Error("Unknown gif block: 0x"+Tn[Un-1].toString(16))}this.numFrames=function(){return Xn.length},this.loopCount=function(){return Zn},this.frameInfo=function(Tn){if(Tn<0||Tn>=Xn.length)throw new Error("Frame index out of range.");return Xn[Tn]},this.decodeAndBlitFrameBGRA=function(Un,Dn){var Hn=this.frameInfo(Un),Gn=Hn.width*Hn.height,zn=new Uint8Array(Gn);Bt(Tn,Hn.data_offset,zn,Gn);var Vn=Hn.palette_offset,Kn=Hn.transparent_index;null===Kn&&(Kn=256);var Wn=Hn.width,Xn=Qn-Wn,Yn=Wn,Jn=4*(Hn.y*Qn+Hn.x),$n=4*((Hn.y+Hn.height)*Qn+Hn.x),Zn=Jn,er=4*Xn;!0===Hn.interlaced&&(er+=4*Qn*7);for(var tr=8,nr=0,rr=zn.length;nr<rr;++nr){var ir=zn[nr];if(0===Yn&&(Yn=Wn,(Zn+=er)>=$n&&(er=4*Xn+4*Qn*(tr-1),Zn=Jn+(Wn+Xn)*(tr<<1),tr>>=1)),ir===Kn)Zn+=4;else{var ar=Tn[Vn+3*ir],or=Tn[Vn+3*ir+1],sr=Tn[Vn+3*ir+2];Dn[Zn++]=sr,Dn[Zn++]=or,Dn[Zn++]=ar,Dn[Zn++]=255}--Yn}},this.decodeAndBlitFrameRGBA=function(Un,Dn){var Hn=this.frameInfo(Un),Gn=Hn.width*Hn.height,zn=new Uint8Array(Gn);Bt(Tn,Hn.data_offset,zn,Gn);var Vn=Hn.palette_offset,Kn=Hn.transparent_index;null===Kn&&(Kn=256);var Wn=Hn.width,Xn=Qn-Wn,Yn=Wn,Jn=4*(Hn.y*Qn+Hn.x),$n=4*((Hn.y+Hn.height)*Qn+Hn.x),Zn=Jn,er=4*Xn;!0===Hn.interlaced&&(er+=4*Qn*7);for(var tr=8,nr=0,rr=zn.length;nr<rr;++nr){var ir=zn[nr];if(0===Yn&&(Yn=Wn,(Zn+=er)>=$n&&(er=4*Xn+4*Qn*(tr-1),Zn=Jn+(Wn+Xn)*(tr<<1),tr>>=1)),ir===Kn)Zn+=4;else{var ar=Tn[Vn+3*ir],or=Tn[Vn+3*ir+1],sr=Tn[Vn+3*ir+2];Dn[Zn++]=ar,Dn[Zn++]=or,Dn[Zn++]=sr,Dn[Zn++]=255}--Yn}}}function Bt(Tn,Un,Qn,Dn){for(var Hn=Tn[Un++],Gn=1<<Hn,zn=Gn+1,Vn=zn+1,Kn=Hn+1,Wn=(1<<Kn)-1,Xn=0,Yn=0,Jn=0,$n=Tn[Un++],Zn=new Int32Array(4096),er=null;;){for(;Xn<16&&0!==$n;)Yn|=Tn[Un++]<<Xn,Xn+=8,1===$n?$n=Tn[Un++]:--$n;if(Xn<Kn)break;var tr=Yn&Wn;if(Yn>>=Kn,Xn-=Kn,tr!==Gn){if(tr===zn)break;for(var nr=tr<Vn?tr:er,rr=0,ir=nr;ir>Gn;)ir=Zn[ir]>>8,++rr;var ar=ir;if(Jn+rr+(nr!==tr?1:0)>Dn)return void mg.log("Warning, gif stream longer than expected.");Qn[Jn++]=ar;var or=Jn+=rr;for(nr!==tr&&(Qn[Jn++]=ar),ir=nr;rr--;)ir=Zn[ir],Qn[--or]=255&ir,ir>>=8;null!==er&&Vn<4096&&(Zn[Vn++]=er<<8|ar,Vn>=Wn+1&&Kn<12&&(++Kn,Wn=Wn<<1|1)),er=tr}else Vn=zn+1,Wn=(1<<(Kn=Hn+1))-1,er=null}return Jn!==Dn&&mg.log("Warning, gif stream shorter than expected."),Qn
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @license
Copyright (c) 2008, Adobe Systems Incorporated
All rights reserved.
2020-08-28 22:07:07 +00:00
2020-09-08 23:35:47 +00:00
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
2020-08-28 22:07:07 +00:00
2020-09-08 23:35:47 +00:00
* 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.
2020-08-28 22:07:07 +00:00
2020-09-08 23:35:47 +00:00
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.
2020-09-18 20:43:34 +00:00
*/}function Ot(Tn){var Un,Qn,Dn,Hn,Gn,zn=Math.floor,Vn=new Array(64),Kn=new Array(64),Wn=new Array(64),Xn=new Array(64),Yn=new Array(65535),Jn=new Array(65535),$n=new Array(64),Zn=new Array(64),er=[],tr=0,nr=7,rr=new Array(64),ir=new Array(64),ar=new Array(64),or=new Array(256),sr=new Array(2048),lr=[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],cr=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],ur=[0,1,2,3,4,5,6,7,8,9,10,11],dr=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],hr=[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],pr=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],Ar=[0,1,2,3,4,5,6,7,8,9,10,11],fr=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],gr=[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(Tn,Un){for(var Qn=0,Dn=0,Hn=new Array,Gn=1;Gn<=16;Gn++){for(var zn=1;zn<=Tn[Gn];zn++)Hn[Un[Dn]]=[],Hn[Un[Dn]][0]=Qn,Hn[Un[Dn]][1]=Gn,Dn++,Qn++;Qn*=2}return Hn}function B(Tn){for(var Un=Tn[0],Qn=Tn[1]-1;Qn>=0;)Un&1<<Qn&&(tr|=1<<nr),Qn--,--nr<0&&(255==tr?(O(255),O(0)):O(tr),nr=7,tr=0)}function O(Tn){er.push(Tn)}function M(Tn){O(Tn>>8&255),O(255&Tn)}function E(Tn,Un,Qn,Dn,Hn){for(var Gn,zn=Hn[0],Vn=Hn[240],Kn=function(Tn,Un){var Qn,Dn,Hn,Gn,zn,Vn,Kn,Wn,Xn,Yn,Jn=0;for(Xn=0;Xn<8;++Xn){Qn=Tn[Jn],Dn=Tn[Jn+1],Hn=Tn[Jn+2],Gn=Tn[Jn+3],zn=Tn[Jn+4],Vn=Tn[Jn+5],Kn=Tn[Jn+6];var Zn=Qn+(Wn=Tn[Jn+7]),er=Qn-Wn,tr=Dn+Kn,nr=Dn-Kn,rr=Hn+Vn,ir=Hn-Vn,ar=Gn+zn,or=Gn-zn,sr=Zn+ar,lr=Zn-ar,cr=tr+rr,ur=tr-rr;Tn[Jn]=sr+cr,Tn[Jn+4]=sr-cr;var dr=.707106781*(ur+lr);Tn[Jn+2]=lr+dr,Tn[Jn+6]=lr-dr;var hr=.382683433*((sr=or+ir)-(ur=nr+er)),pr=.5411961*sr+hr,Ar=1.306562965*ur+hr,fr=.707106781*(cr=ir+nr),gr=er+fr,mr=er-fr;Tn[Jn+5]=mr+pr,Tn[Jn+3]=mr-pr,Tn[Jn+1]=gr+Ar,Tn[Jn+7]=gr-Ar,Jn+=8}for(Jn=0,Xn=0;Xn<8;++Xn){Qn=Tn[Jn],Dn=Tn[Jn+8],Hn=Tn[Jn+16],Gn=Tn[Jn+24],zn=Tn[Jn+32],Vn=Tn[Jn+40],Kn=Tn[Jn+48];var _r=Qn+(Wn=Tn[Jn+56]),vr=Qn-Wn,yr=Dn+Kn,br=Dn-Kn,wr=Hn+Vn,xr=Hn-Vn,kr=Gn+zn,Sr=Gn-zn,Cr=_r+kr,Br=_r-kr,Er=yr+wr,Nr=yr-wr;Tn[Jn]=Cr+Er,Tn[Jn+32]=Cr-Er;var Lr=.707106781*(Nr+Br);Tn[Jn+16]=Br+Lr,Tn[Jn+48]=Br-Lr;var Tr=.382683433*((Cr=Sr+xr)-(Nr=br+vr)),Pr=.5411961*Cr+Tr,Fr=1.306562965*Nr+Tr,Ur=.707106781*(Er=xr+br),Ir=vr+Ur,Rr=vr-Ur;Tn[Jn+40]=Rr+Pr,Tn[Jn+24]=Rr-Pr,Tn[Jn+8]=Ir+Fr,Tn[Jn+56]=Ir-Fr,Jn++}for(Xn=0;Xn<64;++Xn)Yn=Tn[Xn]*Un[Xn],$n[Xn]=Yn>0?Yn+.5|0:Yn-.5|0;return $n}(Tn,Un),Wn=0;Wn<64;++Wn)Zn[lr[Wn]]=Kn[Wn];var Xn=Zn[0]-Qn;Qn=Zn[0],0==Xn?B(Dn[0]):(B(Dn[Jn[Gn=32767+Xn]]),B(Yn[Gn]));for(var er=63;er>0&&0==Zn[er];)er--;if(0==er)return B(zn),Qn;for(var tr,nr=1;nr<=er;){for(var rr=nr;0==Zn[nr]&&nr<=er;)++nr;var ir=nr-rr;if(ir>=16){tr=ir>>4;for(var ar=1;ar<=tr;++ar)B(Vn);ir&=15}Gn=32767+Zn[nr],B(Hn[(ir<<4)+Jn[Gn]]),B(Yn[Gn]),nr++}return 63!=er&&B(zn),Qn}function q(Tn){Tn=Math.min(Math.max(Tn,1),100),Gn!=Tn&&(function(Tn){for(var Un=[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,
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @license
* Copyright (c) 2017 Aras Abbasi
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
2020-09-18 20:43:34 +00:00
*/function Mt(Tn,Un){if(this.pos=0,this.buffer=Tn,this.datav=new DataView(Tn.buffer),this.is_with_alpha=!!Un,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 Et(Tn){function e(Tn){if(!Tn)throw Error("assert :P")}function n(Tn,Un,Qn){for(var Dn=0;4>Dn;Dn++)if(Tn[Un+Dn]!=Qn.charCodeAt(Dn))return!0;return!1}function r(Tn,Un,Qn,Dn,Hn){for(var Gn=0;Gn<Hn;Gn++)Tn[Un+Gn]=Qn[Dn+Gn]}function i(Tn,Un,Qn,Dn){for(var Hn=0;Hn<Dn;Hn++)Tn[Un+Hn]=Qn}function a(Tn){return new Int32Array(Tn)}function o(Tn,Un){for(var Qn=[],Dn=0;Dn<Tn;Dn++)Qn.push(new Un);return Qn}function s(Tn,Un){var Qn=[];return function t(Tn,Qn,Dn){for(var Hn=Dn[Qn],Gn=0;Gn<Hn&&(Tn.push(Dn.length>Qn+1?[]:new Un),!(Dn.length<Qn+1));Gn++)t(Tn[Gn],Qn+1,Dn)}(Qn,0,Tn),Qn}function u(Tn,Un){for(var Qn="",Dn=0;Dn<4;Dn++)Qn+=String.fromCharCode(Tn[Un++]);return Qn}function c(Tn,Un){return(Tn[Un+0]<<0|Tn[Un+1]<<8|Tn[Un+2]<<16)>>>0}function h(Tn,Un){return(Tn[Un+0]<<0|Tn[Un+1]<<8|Tn[Un+2]<<16|Tn[Un+3]<<24)>>>0}new(Et=function Et(){var Tn=this;function u(Tn,Un){for(var Qn=1<<Un-1>>>0;Tn&Qn;)Qn>>>=1;return Qn?(Tn&Qn-1)+Qn:Tn}function c(Tn,Un,Qn,Dn,Hn){e(!(Dn%Qn));do{Tn[Un+(Dn-=Qn)]=Hn}while(0<Dn)}function h(Tn,Un,Qn,Dn,Hn){if(e(2328>=Hn),512>=Hn)var Gn=a(512);else if(null==(Gn=a(Hn)))return 0;return function(Tn,Un,Qn,Dn,Hn,Gn){var zn,Vn,Kn=Un,Wn=1<<Qn,Xn=a(16),Yn=a(16);for(e(0!=Hn),e(null!=Dn),e(null!=Tn),e(0<Qn),Vn=0;Vn<Hn;++Vn){if(15<Dn[Vn])return 0;++Xn[Dn[Vn]]}if(Xn[0]==Hn)return 0;for(Yn[1]=0,zn=1;15>zn;++zn){if(Xn[zn]>1<<zn)return 0;Yn[zn+1]=Yn[zn]+Xn[zn]}for(Vn=0;Vn<Hn;++Vn)zn=Dn[Vn],0<Dn[Vn]&&(Gn[Yn[zn]++]=Vn);if(1==Yn[15])return(Dn=new l).g=0,Dn.value=Gn[0],c(Tn,Kn,1,Wn,Dn),Wn;var Jn,$n=-1,Zn=Wn-1,er=0,tr=1,nr=1,rr=1<<Qn;for(Vn=0,zn=1,Hn=2;zn<=Qn;++zn,Hn<<=1){if(tr+=nr<<=1,0>(nr-=Xn[zn]))return 0;for(;0<Xn[zn];--Xn[zn])(Dn=new l).g=zn,Dn.value=Gn[Vn++],c(Tn,Kn+er,Hn,rr,Dn),er=u(er,zn)}for(zn=Qn+1,Hn=2;15>=zn;++zn,Hn<<=1){if(tr+=nr<<=1,0>(nr-=Xn[zn]))return 0;for(;0<Xn[zn];--Xn[zn]){if(Dn=new l,(er&Zn)!=$n){for(Kn+=rr,Jn=1<<($n=zn)-Qn;15>$n&&!(0>=(Jn-=Xn[$n]));)++$n,Jn<<=1;Wn+=rr=1<<(Jn=$n-Qn),Tn[Un+($n=er&Zn)].g=Jn+Qn,Tn[Un+$n].value=Kn-Un-$n}Dn.g=zn-Qn,Dn.value=Gn[Vn++],c(Tn,Kn+(er>>Qn),Hn,rr,Dn),er=u(er,zn)}}return tr!=2*Yn[15]-1?0:Wn}(Tn,Un,Qn,Dn,Hn,Gn)}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(Un,f)}function p(Tn,Un,Qn,Dn){e(null!=Tn),e(null!=Un),e(2147483648>Dn),Tn.Ca=254,Tn.I=0,Tn.b=-8,Tn.Ka=0,Tn.oa=Un,Tn.pa=Qn,Tn.Jd=Un,Tn.Yc=Qn+Dn,Tn.Zc=4<=Dn?Qn+Dn-4+1:Qn,S(Tn)}function g(Tn,Un){for(var Qn=0;0<Un--;)Qn|=k(Tn,128)<<Un;return Qn}function m(Tn,Un){var Qn=g(Tn,Un);return P(Tn)?-Qn:Qn}function v(Tn,Un,Qn,Dn){var Hn,Gn=0;for(e(null!=Tn),e(null!=Un),e(4294967288>Dn),Tn.Sb=Dn,Tn.Ra=0,Tn.u=0,Tn.h=0,4<Dn&&(Dn=4),Hn=0;Hn<Dn;++Hn)Gn+=Un[Qn+Hn]<<8*Hn;Tn.Ra=Gn,Tn.bb=Dn,Tn.oa=Un,Tn.pa=Qn}function b(Tn){for(;8<=Tn.u&&Tn.bb<Tn.Sb;)Tn.Ra>>>=8,Tn.Ra+=Tn.oa[Tn.pa+Tn.bb]<<Hn-8>>>0,++Tn.bb,Tn.u-=8;x(Tn)&&(Tn.h=1,Tn.u=0)}function y(Tn,Un){if(e(0<=Un),!Tn.h&&Un<=Dn){var Hn=L(Tn)&Qn[Un];return Tn.u+=Un,b(Tn),Hn}return Tn.h=1,Tn.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(Tn){return Tn.Ra>>>(Tn.u&Hn-1)>>>0}function x(Tn){return e(Tn.bb<=Tn.Sb),Tn.h||Tn.bb==Tn.Sb&&Tn.u>Hn}function A(Tn,Un){Tn.u=Un,Tn.h=x(Tn)}function _(Tn){Tn.u>=Gn&&(e(Tn.u>=Gn),b(Tn))}function S(Tn){e(null!=Tn&&null!=Tn.oa),Tn.pa<Tn.Zc?(Tn.I=(Tn.oa[Tn.pa++]|Tn.I<<8)>>>0,Tn.b+=8):(e(null!=Tn&&null!=Tn.oa),Tn.pa<Tn.Yc?(Tn.b+=8,Tn.I=Tn.oa[Tn.pa++]|Tn.I<<8):Tn.Ka?Tn.b=0:(Tn.I<<=8,Tn.b+=8,Tn.Ka=1))}function P(Tn){return g(Tn,1)}function k(Tn,Un){var Qn=Tn.Ca;0>Tn.b&&S(Tn);var Dn=Tn.b,Hn=Qn*Un>>>8,Gn=(Tn.I>>>Dn>Hn)+0;for(Gn?(Qn-=Hn,Tn.I-=Hn+1<<Dn>>>0):Qn=Hn+1,Dn=Qn,Hn=0;256<=Dn;)Hn+
2020-09-04 20:34:30 +00:00
/** @license
2020-09-08 23:35:47 +00:00
* 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
*/
2020-09-18 20:43:34 +00:00
function(Tn,Un,Qn,Dn){for(var Hn=0;Hn<4;Hn++)if(Tn[Un+Hn]!="RIFF".charCodeAt(Hn))return!0;return!1}(Tn,Un)){var Vn,Kn;for(h(Tn,Un+=4),Un+=8;Un<Tn.length;){var Wn=u(Tn,Un),Xn=h(Tn,Un+=4);Un+=4;var Yn=Xn+(1&Xn);switch(Wn){case"VP8 ":case"VP8L":void 0===Qn.frames[Dn]&&(Qn.frames[Dn]={}),(Zn=Qn.frames[Dn]).src_off=Hn?zn:Un-8,Zn.src_size=Gn+Xn+8,Dn++,Hn&&(Hn=!1,Gn=0,zn=0);break;case"VP8X":(Zn=Qn.header={}).feature_flags=Tn[Un];var Jn=Un+4;Zn.canvas_width=1+c(Tn,Jn),Jn+=3,Zn.canvas_height=1+c(Tn,Jn),Jn+=3;break;case"ALPH":Hn=!0,Gn=Yn+8,zn=Un-8;break;case"ANIM":(Zn=Qn.header).bgcolor=h(Tn,Un),Jn=Un+4,Zn.loop_count=(Vn=Tn)[(Kn=Jn)+0]<<0|Vn[Kn+1]<<8,Jn+=2;break;case"ANMF":var $n,Zn;(Zn=Qn.frames[Dn]={}).offset_x=2*c(Tn,Un),Un+=3,Zn.offset_y=2*c(Tn,Un),Un+=3,Zn.width=1+c(Tn,Un),Un+=3,Zn.height=1+c(Tn,Un),Un+=3,Zn.duration=c(Tn,Un),Un+=3,$n=Tn[Un++],Zn.dispose=1&$n,Zn.blend=$n>>1&1}"ANMF"!=Wn&&(Un+=Yn)}return Qn}}(Gn,0);zn.response=Gn,zn.rgbaoutput=!0,zn.dataurl=!1;var Vn=zn.header?zn.header:null,Kn=zn.frames?zn.frames:null;if(Vn){Vn.loop_counter=Vn.loop_count,Un=[Vn.canvas_height],Qn=[Vn.canvas_width];for(var Wn=0;Wn<Kn.length&&0!=Kn[Wn].blend;Wn++);}var Xn=Kn[0],Yn=Hn.WebPDecodeRGBA(Gn,Xn.src_off,Xn.src_size,Qn,Un);Xn.rgba=Yn,Xn.imgwidth=Qn[0],Xn.imgheight=Un[0];for(var Jn=0;Jn<Qn[0]*Un[0]*4;Jn++)Dn[Jn]=Yn[Jn];return this.width=Qn,this.height=Un,this.data=Dn,this
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @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.
* ====================================================================
2020-09-18 20:43:34 +00:00
*/}!function(Tn){var Un=function n(Un,Hn,Wn,Xn){var Yn=5,Jn=zn;switch(Xn){case Tn.image_compression.FAST:Yn=3,Jn=Gn;break;case Tn.image_compression.MEDIUM:Yn=6,Jn=Vn;break;case Tn.image_compression.SLOW:Yn=9,Jn=Kn}Un=Dn(Un,Hn,Wn,Jn);var $n=new Uint8Array(Qn(Yn)),Zn=g.API.adler32cs.fromBuffer(Un.buffer),er=new xt(Yn),tr=er.append(Un),nr=er.flush(),rr=$n.length+tr.length+nr.length,ir=new Uint8Array(rr+4);return ir.set($n),ir.set(tr,$n.length),ir.set(nr,$n.length+tr.length),ir[rr++]=Zn>>>24&255,ir[rr++]=Zn>>>16&255,ir[rr++]=Zn>>>8&255,ir[rr++]=255&Zn,Tn.__addimage__.arrayBufferToBinaryString(ir)},Qn=function r(Tn){var Un=30720;return Un|=Math.min(3,(Tn-1&255)>>1)<<6,Un|=0,[120,255&(Un+=31-Un%31)]},Dn=function i(Tn,Un,Qn,Dn){for(var i,Hn,Gn,zn=Tn.length/Un,Vn=new Uint8Array(Tn.length+zn),Kn=Xn(),Wn=0;Wn<zn;Wn+=1){if(Gn=Wn*Un,i=Tn.subarray(Gn,Gn+Un),Dn)Vn.set(Dn(i,Qn,Hn),Gn+Wn);else{for(var Jn,$n=Kn.length,Zn=[];Jn<$n;Jn+=1)Zn[Jn]=Kn[Jn](i,Qn,Hn);var er=Yn(Zn.concat());Vn.set(Zn[er],Gn+Wn)}Hn=i}return Vn},Hn=function a(Tn){var Un=Array.apply([],Tn);return Un.unshift(0),Un},Gn=function o(Tn,Un){var Qn,Dn=[],Hn=Tn.length;Dn[0]=1;for(var Gn=0;Gn<Hn;Gn+=1)Qn=Tn[Gn-Un]||0,Dn[Gn+1]=Tn[Gn]-Qn+256&255;return Dn},zn=function s(Tn,Un,Qn){var Dn,Hn=[],Gn=Tn.length;Hn[0]=2;for(var zn=0;zn<Gn;zn+=1)Dn=Qn&&Qn[zn]||0,Hn[zn+1]=Tn[zn]-Dn+256&255;return Hn},Vn=function u(Tn,Un,Qn){var Dn,Hn,Gn=[],zn=Tn.length;Gn[0]=3;for(var Vn=0;Vn<zn;Vn+=1)Dn=Tn[Vn-Un]||0,Hn=Qn&&Qn[Vn]||0,Gn[Vn+1]=Tn[Vn]+256-(Dn+Hn>>>1)&255;return Gn},Kn=function c(Tn,Un,Qn){var Dn,Hn,Gn,zn,Vn=[],Kn=Tn.length;Vn[0]=4;for(var c=0;c<Kn;c+=1)Dn=Tn[c-Un]||0,Hn=Qn&&Qn[c]||0,Gn=Qn&&Qn[c-Un]||0,zn=Wn(Dn,Hn,Gn),Vn[c+1]=Tn[c]-zn+256&255;return Vn},Wn=function h(Tn,Un,Qn){if(Tn===Un&&Un===Qn)return Tn;var Dn=Math.abs(Un-Qn),Hn=Math.abs(Tn-Qn),Gn=Math.abs(Tn+Un-Qn-Qn);return Dn<=Hn&&Dn<=Gn?Tn:Hn<=Gn?Un:Qn},Xn=function l(){return[Hn,Gn,zn,Vn,Kn]},Yn=function f(Tn){var Un=Tn.map((function(Tn){return Tn.reduce((function(Tn,Un){return Tn+Math.abs(Un)}),0)}));return Un.indexOf(Math.min.apply(null,Un))};Tn.processPNG=function(Qn,Dn,Hn,Gn){var zn,Vn,Kn,Wn,Xn,Yn,Jn,$n,Zn,er,tr,nr,rr,ir,ar,or=this.decode.FLATE_DECODE,sr="";if(this.__addimage__.isArrayBuffer(Qn)&&(Qn=new Uint8Array(Qn)),this.__addimage__.isArrayBufferView(Qn)){if(Qn=(Kn=new Lm(Qn)).imgData,Vn=Kn.bits,zn=Kn.colorSpace,Xn=Kn.colors,-1!==[4,6].indexOf(Kn.colorType)){if(8===Kn.bits){Zn=($n=32==Kn.pixelBitlength?new Uint32Array(Kn.decodePixels().buffer):16==Kn.pixelBitlength?new Uint16Array(Kn.decodePixels().buffer):new Uint8Array(Kn.decodePixels().buffer)).length,tr=new Uint8Array(Zn*Kn.colors),er=new Uint8Array(Zn);var lr,cr=Kn.pixelBitlength-Kn.bits;for(ir=0,ar=0;ir<Zn;ir++){for(rr=$n[ir],lr=0;lr<cr;)tr[ar++]=rr>>>lr&255,lr+=Kn.bits;er[ir]=rr>>>lr&255}}if(16===Kn.bits){Zn=($n=new Uint32Array(Kn.decodePixels().buffer)).length,tr=new Uint8Array(Zn*(32/Kn.pixelBitlength)*Kn.colors),er=new Uint8Array(Zn*(32/Kn.pixelBitlength)),nr=Kn.colors>1,ir=0,ar=0;for(var ur=0;ir<Zn;)rr=$n[ir++],tr[ar++]=rr>>>0&255,nr&&(tr[ar++]=rr>>>16&255,rr=$n[ir++],tr[ar++]=rr>>>0&255),er[ur++]=rr>>>16&255;Vn=8}Gn!==Tn.image_compression.NONE?(Qn=Un(tr,Kn.width*Kn.colors,Kn.colors,Gn),Jn=Un(er,Kn.width,1,Gn)):(Qn=tr,Jn=er,or=void 0)}if(3===Kn.colorType&&(zn=this.color_spaces.INDEXED,Yn=Kn.palette,Kn.transparency.indexed)){var dr=Kn.transparency.indexed,hr=0;for(ir=0,Zn=dr.length;ir<Zn;++ir)hr+=dr[ir];if((hr/=255)==Zn-1&&-1!==dr.indexOf(0))Wn=[dr.indexOf(0)];else if(hr!==Zn){for($n=Kn.decodePixels(),er=new Uint8Array($n.length),ir=0,Zn=$n.length;ir<Zn;ir++)er[ir]=dr[$n[ir]];Jn=Un(er,Kn.width,1)}}var pr=function(Un){var Qn;switch(Un){case Tn.image_compression.FAST:Qn=11;break;case Tn.image_compression.MEDIUM:Qn=13;break;case Tn.image_compression.SLOW:Qn=14;break;default:Qn=12}return Qn}(Gn);return or===this.decode.FLATE_DECODE&&(sr="/Predictor "+pr+" "),sr+="/Colors "+Xn+" /BitsPerComponent "+Vn+" /Columns "+Kn.width,(this.__addimage__.isArrayBuffer(Qn)||this.__addimage__.isArrayBufferView(Qn))&&(Qn=this.__addimage__.arrayBufferToBinaryString(Qn)),(Jn&&this.
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @license
* Copyright (c) 2018 Aras Abbasi
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2020-09-18 20:43:34 +00:00
function(Tn){Tn.processBMP=function(Un,Qn,Dn,Hn){var Gn=new Mt(Un,!1),zn=Gn.width,Vn=Gn.height,Kn={data:Gn.getData(),width:zn,height:Vn},Wn=new Ot(100).encode(Kn,100);return Tn.processJPEG.call(this,Wn,Qn,Dn,Hn)}}(g.API),Et.prototype.getData=function(){return this.data},
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @license
* Copyright (c) 2019 Aras Abbasi
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2020-09-18 20:43:34 +00:00
function(Tn){Tn.processWEBP=function(Un,Qn,Dn,Hn){var Gn=new Et(Un,!1),zn=Gn.width,Vn=Gn.height,Kn={data:Gn.getData(),width:zn,height:Vn},Wn=new Ot(100).encode(Kn,100);return Tn.processJPEG.call(this,Wn,Qn,Dn,Hn)}}(g.API),g.API.setLanguage=function(Tn){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:"FYRO Macedonian",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"
2020-09-04 20:34:30 +00:00
/** @license
2020-09-08 23:35:47 +00:00
* MIT license.
* Copyright (c) 2012 Willow Systems Corporation, willow-systems.com
* 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.
* ====================================================================
*/
2020-09-18 20:43:34 +00:00
xm=g.API,km=xm.getCharWidthsArray=function(Tn,Un){var Qn,Dn,Hn=(Un=Un||{}).font||this.internal.getFont(),Gn=Un.fontSize||this.internal.getFontSize(),zn=Un.charSpace||this.internal.getCharSpace(),Vn=Un.widths?Un.widths:Hn.metadata.Unicode.widths,Kn=Vn.fof?Vn.fof:1,Wn=Un.kerning?Un.kerning:Hn.metadata.Unicode.kerning,Xn=Wn.fof?Wn.fof:1,Yn=!1!==Un.doKerning,Jn=0,$n=Tn.length,Zn=0,er=Vn[0]||Kn,tr=[];for(Qn=0;Qn<$n;Qn++)Dn=Tn.charCodeAt(Qn),"function"==typeof Hn.metadata.widthOfString?tr.push((Hn.metadata.widthOfGlyph(Hn.metadata.characterToGlyph(Dn))+zn*(1e3/Gn)||0)/1e3):(Jn=Yn&&"object"==_typeof(Wn[Dn])&&!isNaN(parseInt(Wn[Dn][Zn],10))?Wn[Dn][Zn]/Xn:0,tr.push((Vn[Dn]||er)/Kn+Jn)),Zn=Dn;return tr},Sm=xm.getStringUnitWidth=function(Tn,Un){var Qn=(Un=Un||{}).fontSize||this.internal.getFontSize(),Dn=Un.font||this.internal.getFont(),Hn=Un.charSpace||this.internal.getCharSpace();return xm.processArabic&&(Tn=xm.processArabic(Tn)),"function"==typeof Dn.metadata.widthOfString?Dn.metadata.widthOfString(Tn,Qn,Hn)/Qn:km.apply(this,arguments).reduce((function(Tn,Un){return Tn+Un}),0)},Cm=function Pt(Tn,Un,Qn,Dn){for(var Hn=[],Gn=0,zn=Tn.length,Vn=0;Gn!==zn&&Vn+Un[Gn]<Qn;)Vn+=Un[Gn],Gn++;Hn.push(Tn.slice(0,Gn));var Kn=Gn;for(Vn=0;Gn!==zn;)Vn+Un[Gn]>Dn&&(Hn.push(Tn.slice(Kn,Gn)),Vn=0,Kn=Gn),Vn+=Un[Gn],Gn++;return Kn!==Gn&&Hn.push(Tn.slice(Kn,Gn)),Hn},Bm=function kt(Tn,Un,Qn){Qn||(Qn={});var Dn,Hn,Gn,zn,Vn,Kn,Wn,Xn=[],Yn=[Xn],Jn=Qn.textIndent||0,$n=0,Zn=0,er=Tn.split(" "),tr=km.apply(this,[" ",Qn])[0];if(Kn=-1===Qn.lineIndent?er[0].length+2:Qn.lineIndent||0){var nr=Array(Kn).join(" "),rr=[];er.map((function(Tn){(Tn=Tn.split(/\s*\n/)).length>1?rr=rr.concat(Tn.map((function(Tn,Un){return(Un&&Tn.length?"\n":"")+Tn}))):rr.push(Tn[0])})),er=rr,Kn=Sm.apply(this,[nr,Qn])}for(Gn=0,zn=er.length;Gn<zn;Gn++){var ir=0;if(Dn=er[Gn],Kn&&"\n"==Dn[0]&&(Dn=Dn.substr(1),ir=1),Jn+$n+(Zn=(Hn=km.apply(this,[Dn,Qn])).reduce((function(Tn,Un){return Tn+Un}),0))>Un||ir){if(Zn>Un){for(Vn=Cm.apply(this,[Dn,Hn,Un-(Jn+$n),Un]),Xn.push(Vn.shift()),Xn=[Vn.pop()];Vn.length;)Yn.push([Vn.shift()]);Zn=Hn.slice(Dn.length-(Xn[0]?Xn[0].length:0)).reduce((function(Tn,Un){return Tn+Un}),0)}else Xn=[Dn];Yn.push(Xn),Jn=Zn+Kn,$n=tr}else Xn.push(Dn),Jn+=$n+Zn,$n=tr}return Wn=Kn?function(Tn,Un){return(Un?nr:"")+Tn.join(" ")}:function(Tn){return Tn.join(" ")},Yn.map(Wn)},xm.splitTextToSize=function(Tn,Un,Qn){var Dn,Hn=(Qn=Qn||{}).fontSize||this.internal.getFontSize(),Gn=function(Tn){if(Tn.widths&&Tn.kerning)return{widths:Tn.widths,kerning:Tn.kerning};var Un=this.internal.getFont(Tn.fontName,Tn.fontStyle);return Un.metadata.Unicode?{widths:Un.metadata.Unicode.widths||{0:1},kerning:Un.metadata.Unicode.kerning||{}}:{font:Un.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,Qn);Dn=Array.isArray(Tn)?Tn:String(Tn).split(/\r?\n/);var zn=1*this.internal.scaleFactor*Un/Hn;Gn.textIndent=Qn.textIndent?1*Qn.textIndent*this.internal.scaleFactor/Hn:0,Gn.lineIndent=Qn.lineIndent;var Vn,Kn,Wn=[];for(Vn=0,Kn=Dn.length;Vn<Kn;Vn++)Wn=Wn.concat(Bm.apply(this,[Dn[Vn],zn,Gn]));return Wn},
2020-09-04 20:34:30 +00:00
/** @license
2020-09-08 23:35:47 +00:00
jsPDF standard_fonts_metrics plugin
* Copyright (c) 2012 Willow Systems Corporation, willow-systems.com
* 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.
* ====================================================================
*/
2020-09-18 20:43:34 +00:00
function(Tn){Tn.__fontmetrics__=Tn.__fontmetrics__||{};for(var Un="klmnopqrstuvwxyz",Qn={},Dn={},Hn=0;Hn<Un.length;Hn++)Qn[Un[Hn]]="0123456789abcdef"[Hn],Dn["0123456789abcdef"[Hn]]=Un[Hn];var Gn=function a(Tn){return"0x"+parseInt(Tn,10).toString(16)},zn=Tn.__fontmetrics__.compress=function(Tn){var Un,Qn,Hn,Vn,Kn=["{"];for(var Wn in Tn){if(Un=Tn[Wn],isNaN(parseInt(Wn,10))?Qn="'"+Wn+"'":(Wn=parseInt(Wn,10),Qn=(Qn=Gn(Wn).slice(2)).slice(0,-1)+Dn[Qn.slice(-1)]),"number"==typeof Un)Un<0?(Hn=Gn(Un).slice(3),Vn="-"):(Hn=Gn(Un).slice(2),Vn=""),Hn=Vn+Hn.slice(0,-1)+Dn[Hn.slice(-1)];else{if("object"!=_typeof(Un))throw new Error("Don't know what to do with value type "+_typeof(Un)+".");Hn=zn(Un)}Kn.push(Qn+Hn)}return Kn.push("}"),Kn.join("")},Vn=Tn.__fontmetrics__.uncompress=function(Tn){if("string"!=typeof Tn)throw new Error("Invalid argument passed to uncompress.");for(var Un,Dn,Hn,Gn,zn={},Vn=1,Kn=zn,Wn=[],Xn="",Yn="",Jn=Tn.length-1,$n=1;$n<Jn;$n+=1)"'"==(Gn=Tn[$n])?Un?(Hn=Un.join(""),Un=void 0):Un=[]:Un?Un.push(Gn):"{"==Gn?(Wn.push([Kn,Hn]),Kn={},Hn=void 0):"}"==Gn?((Dn=Wn.pop())[0][Dn[1]]=Kn,Hn=void 0,Kn=Dn[0]):"-"==Gn?Vn=-1:void 0===Hn?Qn.hasOwnProperty(Gn)?(Xn+=Qn[Gn],Hn=parseInt(Xn,16)*Vn,Vn=1,Xn=""):Xn+=Gn:Qn.hasOwnProperty(Gn)?(Yn+=Qn[Gn],Kn[Hn]=parseInt(Yn,16)*Vn,Vn=1,Hn=void 0,Yn=""):Yn+=Gn;return zn},Kn={codePages:["WinAnsiEncoding"],WinAnsiEncoding:Vn("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},Wn={Unicode:{Courier:Kn,"Courier-Bold":Kn,"Courier-BoldOblique":Kn,"Courier-Oblique":Kn,Helvetica:Kn,"Helvetica-Bold":Kn,"Helvetica-BoldOblique":Kn,"Helvetica-Oblique":Kn,"Times-Roman":Kn,"Times-Bold":Kn,"Times-BoldItalic":Kn,"Times-Italic":Kn}},Xn={Unicode:{"Courier-Oblique":Vn("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":Vn("{'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":Vn("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @license
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2020-09-18 20:43:34 +00:00
function(Tn){var Un=function e(Tn){for(var e=Tn.length,Un=new Uint8Array(e),Qn=0;Qn<e;Qn++)Un[Qn]=Tn.charCodeAt(Qn);return Un};Tn.API.events.push(["addFont",function(Qn){var Dn=void 0,Hn=Qn.font,Gn=Qn.instance;if(!Hn.isStandardFont){if(void 0===Gn)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+Hn.postScriptName+"').");if("string"!=typeof(Dn=!1===Gn.existsFileInVFS(Hn.postScriptName)?Gn.loadFile(Hn.postScriptName):Gn.getFileFromVFS(Hn.postScriptName)))throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+Hn.postScriptName+"').");!function(Qn,Dn){Dn=/^\x00\x01\x00\x00/.test(Dn)?Un(Dn):Un(_g(Dn)),Qn.metadata=Tn.API.TTFFont.open(Dn),Qn.metadata.Unicode=Qn.metadata.Unicode||{encoding:{},kerning:{},widths:[]},Qn.metadata.glyIdsUsed=[0]}(Hn,Dn)}}])}(g),
2020-09-04 20:34:30 +00:00
/** @license
2020-09-08 23:35:47 +00:00
* Copyright (c) 2012 Willow Systems Corporation, willow-systems.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.
* ====================================================================
*/
2020-09-18 20:43:34 +00:00
function(Tn){function r(){return(gg.canvg?Promise.resolve(gg.canvg):Promise.resolve().then((function(){return _w}))).catch((function(Tn){return Promise.reject(new Error("Could not load dompurify: "+Tn))})).then((function(Tn){return Tn.default?Tn.default:Tn}))}g.API.addSvgAsImage=function(Tn,Un,Qn,Dn,Hn,Gn,zn,Vn){if(isNaN(Un)||isNaN(Qn))throw mg.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(Dn)||isNaN(Hn))throw mg.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var Kn=document.createElement("canvas");Kn.width=Dn,Kn.height=Hn;var Wn=Kn.getContext("2d");Wn.fillStyle="#fff",Wn.fillRect(0,0,Kn.width,Kn.height);var Xn={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},Yn=this;return r().then((function(Un){return Un.Canvg.fromString(Wn,Tn,Xn)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(Tn){return Tn.render(Xn)})).then((function(){Yn.addImage(Kn.toDataURL("image/jpeg",1),Un,Qn,Dn,Hn,zn,Vn)}))}}(),g.API.putTotalPages=function(Tn){var Un,Qn=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(Un=new RegExp(Tn,"g"),Qn=this.internal.getNumberOfPages()):(Un=new RegExp(this.pdfEscape16(Tn,this.internal.getFont()),"g"),Qn=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var Dn=1;Dn<=this.internal.getNumberOfPages();Dn++)for(var Hn=0;Hn<this.internal.pages[Dn].length;Hn++)this.internal.pages[Dn][Hn]=this.internal.pages[Dn][Hn].replace(Un,Qn);return this},g.API.viewerPreferences=function(Tn,Un){var Qn;Tn=Tn||{},Un=Un||!1;var Dn,Hn,Gn,zn={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}},Vn=Object.keys(zn),Kn=[],Wn=0,Xn=0,Yn=0;function f(Tn,Un){var Qn,Dn=!1;for(Qn=0;Qn<Tn.length;Qn+=1)Tn[Qn]===Un&&(Dn=!0);return Dn}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(zn)),this.int
2020-09-04 20:34:30 +00:00
/** ====================================================================
2020-09-08 23:35:47 +00:00
* @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.
* ====================================================================
*/
2020-09-18 20:43:34 +00:00
function(Tn){var Un=function e(){var Tn='<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/">')),Un=unescape(encodeURIComponent(Tn)),Qn=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),Dn=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),Hn=unescape(encodeURIComponent("</x:xmpmeta>")),Gn=Un.length+Qn.length+Dn.length+e.length+Hn.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+Gn+" >>"),this.internal.write("stream"),this.internal.write(e+Un+Qn+Dn+Hn),this.internal.write("endstream"),this.internal.write("endobj")},Qn=function n(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};Tn.addMetadata=function(Tn,Dn){return void 0===this.internal.__metadata__&&(this.internal.__metadata__={metadata:Tn,namespaceuri:Dn||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",Qn),this.internal.events.subscribe("postPutResources",Un)),this}}(g.API),function(Tn){var Un=Tn.API,Qn=Un.pdfEscape16=function(Tn,Un){for(var Qn,Dn=Un.metadata.Unicode.widths,Hn=["","0","00","000","0000"],Gn=[""],zn=0,Vn=Tn.length;zn<Vn;++zn){if(Qn=Un.metadata.characterToGlyph(Tn.charCodeAt(zn)),Un.metadata.glyIdsUsed.push(Qn),Un.metadata.toUnicode[Qn]=Tn.charCodeAt(zn),-1==Dn.indexOf(Qn)&&(Dn.push(Qn),Dn.push([parseInt(Un.metadata.widthOfGlyph(Qn),10)])),"0"==Qn)return Gn.join("");Qn=Qn.toString(16),Gn.push(Hn[4-Qn.length],Qn)}return Gn.join("")},Dn=function r(Tn){var Un,Qn,r,Dn,Hn,Gn,zn;for(Hn="/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",r=[],Gn=0,zn=(Qn=Object.keys(Tn).sort((function(Tn,Un){return Tn-Un}))).length;Gn<zn;Gn++)Un=Qn[Gn],r.length>=100&&(Hn+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar",r=[]),void 0!==Tn[Un]&&null!==Tn[Un]&&"function"==typeof Tn[Un].toString&&(Dn=("0000"+Tn[Un].toString(16)).slice(-4),Un=("0000"+(+Un).toString(16)).slice(-4),r.push("<"+Un+"><"+Dn+">"));return r.length&&(Hn+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar\n"),Hn+"endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"};Un.events.push(["putFont",function(Un){!function(Un){var Qn=Un.font,Hn=Un.out,Gn=Un.newObject,zn=Un.putStream,Vn=Un.pdfEscapeWithNeededParanthesis;if(Qn.metadata instanceof Tn.API.TTFFont&&"Identity-H"===Qn.encoding){for(var Kn=Qn.metadata.Unicode.widths,Wn=Qn.metadata.subset.encode(Qn.metadata.glyIdsUsed,1),Xn="",Yn=0;Yn<Wn.length;Yn++)Xn+=String.fromCharCode(Wn[Yn]);var Jn=Gn();zn({data:Xn,addLength1:!0}),Hn("endobj");var $n=Gn();zn({data:Dn(Qn.metadata.toUnicode),addLength1:!0}),Hn("endobj");var Zn=Gn();Hn("<<"),Hn("/Type /FontDescriptor"),Hn("/FontName /"+Vn(Qn.fontName)),Hn("/FontFile2 "+Jn+" 0 R"),Hn("/FontBBox "+Tn.API.PDFObject.convert(Qn.metadata.bbox)),Hn("/Flags "+Qn.metadata.flags),Hn("/StemV "+Qn.metadata.stemV),Hn("/ItalicAngle "+Qn.metadata.italicAngle),Hn("/Ascent "+Qn.metadata.ascender),Hn("/Descent "+Qn.metadata.decender),Hn("/CapHeight "+Qn.metadata.capHeight),Hn(">>"),Hn("endobj");var er=Gn();Hn("<<"),Hn("/Type /Font"),Hn("/BaseFont /"+Vn(Qn.fontName)),Hn("/FontDescriptor "+Zn+" 0 R"),Hn("/W "+Tn.API.PDFObject.convert(Kn)),Hn("/CIDToGIDMap /Identity"),Hn("/DW 1000"),Hn("/Subtype /CIDFontType2"),Hn("/CIDSystemInfo"),Hn("<<"),Hn("/Supplement 0"),Hn("/Registry (Adobe)"),Hn("/Ordering ("+Qn.encoding+")"),Hn(">>"),Hn(">>"),Hn("endobj"),Qn.objectNumber=Gn(),Hn("<<"),Hn("/Type /Font"),Hn("/Subtype /Type0"),Hn("/ToUnicode "+$n+" 0 R"),Hn("/BaseFont /"+Vn(Qn.fontName)),Hn("/Encoding /"+Qn.encoding),Hn("/DescendantFonts ["+er+" 0 R]"),Hn(">>"),Hn("endobj"),Qn.i
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @license
* jsPDF virtual FileSystem functionality
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2020-09-18 20:43:34 +00:00
function(Tn){var Un=function e(){return void 0===this.internal.vFS&&(this.internal.vFS={}),!0};Tn.existsFileInVFS=function(Tn){return Un.call(this),void 0!==this.internal.vFS[Tn]},Tn.addFileToVFS=function(Tn,Qn){return Un.call(this),this.internal.vFS[Tn]=Qn,this},Tn.getFileFromVFS=function(Tn){return Un.call(this),void 0!==this.internal.vFS[Tn]?this.internal.vFS[Tn]:null}}(g.API),
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @license
* Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)
* MIT License
*/
2020-09-18 20:43:34 +00:00
function(Tn){Tn.__bidiEngine__=Tn.prototype.__bidiEngine__=function(Tn){var Qn,Dn,Hn,Gn,zn,Vn,Kn,Wn=Un,Xn=[[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]],Yn=[[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]],Jn={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},$n={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},Zn=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","","","","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],er=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)$/),tr=!1,nr=0;this.__bidiEngine__={};var rr=function b(Tn){var Un=Tn.charCodeAt(),Qn=Un>>8,Dn=$n[Qn];return void 0!==Dn?Wn[256*Dn+(255&Un)]:252===Qn||253===Qn?"AL":er.test(Qn)?"L":8===Qn?"R":"N"},ir=function y(Tn){for(var Un,Qn=0;Qn<Tn.length;Qn++){if("L"===(Un=rr(Tn.charAt(Qn))))return!1;if("R"===Un)return!0}return!1},ar=function w(Tn,Un,zn,Vn){var Kn,Wn,Xn,Yn,Jn=Un[Vn];switch(Jn){case"L":case"R":tr=!1;break;case"N":case"AN":break;case"EN":tr&&(Jn="AN");break;case"AL":tr=!0,Jn="R";break;case"WS":Jn="N";break;case"CS":Vn<1||Vn+1>=Un.length||"EN"!==(Kn=zn[Vn-1])&&"AN"!==Kn||"EN"!==(Wn=Un[Vn+1])&&"AN"!==Wn?Jn="N":tr&&(Wn="AN"),Jn=Wn===Kn?Wn:"N";break;case"ES":Jn="EN"===(Kn=Vn>0?zn[Vn-1]:"B")&&Vn+1<Un.length&&"EN"===Un[Vn+1]?"EN":"N";break;case"ET":if(Vn>0&&"EN"===zn[Vn-1]){Jn="EN";break}if(tr){Jn="N";break}for(Xn=Vn+1,Yn=Un.length;Xn<Yn&&"ET"===Un[Xn];)Xn++;Jn=Xn<Yn&&"EN"===Un[Xn]?"EN":"N";break;case"NSM":if(Hn&&!Gn){for(Yn=Un.length,Xn=Vn+1;Xn<Yn&&"NSM"===Un[Xn];)Xn++;if(Xn<Yn){var $n=Tn[Vn],Zn=$n>=1425&&$n<=2303||64286===$n;if(Kn=Un[Xn],Zn&&("R"===Kn||"AL"===Kn)){Jn="R";break}}}Jn=Vn<1||"B"===(Kn=Un[Vn-1])?"N":zn[Vn-1];break;case"B":tr=!1,Qn=!0,Jn=nr;break;case"S":Dn=!0,Jn="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":tr=!1;break;case"BN":Jn="N"}return Jn},or=function N(Tn,Un,Qn){var Dn=Tn.split("");return Qn&&sr(Dn,Qn,{hiLevel:nr}),Dn.reverse(),Un&&Un.reverse(),Dn.join("")},sr=function L(Tn,Un,Hn){var Gn,zn,Vn,Kn,Wn,$n=-1,Zn=Tn.length,er=0,ir=[],or=nr?Yn:Xn,L=[];for(tr=!1,Qn=!1,Dn=!1,zn=0;zn<Zn;zn++)L[zn]=rr(Tn[zn]);for(Vn=0;Vn<Zn;Vn++){if(Wn=er,ir[Vn]=ar(Tn,L,ir,Vn),Gn=240&(er=or[Wn][Jn[ir[Vn]]]),er&=15,Un[Vn]=Kn=or[er][5],Gn>0)if(16===Gn){for(zn=$n;zn<Vn;zn++)Un[zn]=1;$n=-1}else $n=-1;if(or[er][6])-1===$n&&($n=Vn);else if($n>-1){for(zn=$n;zn<Vn;zn++)Un[zn]=Kn;$n=-1}"B"===L[Vn]&&(Un[Vn]=0),Hn.hiLevel|=Kn}Dn&&function(Tn,Un,Qn){for(var Dn=0;Dn<Qn;Dn++)if("S"===Tn[Dn]){Un[Dn]=nr;for(var Hn=Dn-1;Hn>=0&&"WS"===Tn[Hn];Hn--)Un[Hn]=nr}}(L,Un,Zn)},lr=function x(Tn,Un,Dn,Hn,Gn){if(!(Gn.hiLevel<Tn)){if(1===Tn&&1===nr&&!Qn)return Un.reverse(),void(Dn&&Dn.reverse());for(var zn,Vn,Kn,Wn,Xn=Un.length,Yn=0;Yn<Xn;){if(Hn[Yn]>=Tn){for(Kn=Yn+1;Kn<Xn&&Hn[Kn]>=Tn;)Kn++;for(Wn=Yn,Vn=Kn-1;Wn<Vn;Wn++,Vn--)zn=Un[Wn],Un[Wn]=Un[Vn],Un[Vn]=zn,Dn&&(zn=Dn[Wn],Dn[Wn]=Dn[Vn],Dn[Vn]=zn);Yn=Kn}Yn++}}},cr=function A(Tn,Un,Qn){var Dn=Tn.split(""),Hn={hiLevel:nr};return Qn||(Qn=[]),sr(Dn,Qn,Hn),function(Tn,Un,Qn){if(0!==Qn.hiLevel&&Kn)for(var Dn,Hn=0;Hn<Tn.length;Hn++)1===Un[Hn]&&(Dn=Zn.indexOf(Tn[Hn]))>=0&&(Tn[Hn]=Zn[Dn+1])}(Dn,Qn,Hn),lr(2,Dn,Un,Qn,Hn),lr(1,Dn,Un,Qn,Hn),Dn.join("")};return this.__bidiEngine__.doBidiReorder=function(Tn,Un,Qn){if(function(Tn,Un){if(Un)for(var Qn=0;Qn<Tn.length;Qn++)Un[Qn]=Qn;void 0===Gn&&(Gn=ir(Tn)),void 0===Vn&&(Vn=ir(Tn))}(Tn,Un),Hn||!zn||Vn)if(Hn&&zn&&Gn^Vn)nr=Gn?1:0,Tn=or(Tn,Un,Qn);else if(!Hn&&zn&&Vn)nr=Gn?1:0,Tn=cr(Tn,Un,Qn),Tn=or(Tn,Un);else if(!Hn||Gn||zn||Vn){if(Hn&&!zn&&Gn^Vn)Tn=or(Tn,Un),Gn?(nr=0,Tn=cr(Tn,Un,Qn)):(nr=1,Tn=cr(Tn,Un,Qn),Tn=or(Tn,Un));else if(Hn&&Gn&&!zn&&Vn)nr=1,Tn=cr(Tn,Un,Qn),Tn=or(Tn,Un);else if(!Hn&&!zn&&Gn^Vn){var Dn=Kn;Gn?(nr=1,Tn=cr(Tn,Un,Qn),nr=0,Kn=!1,Tn=cr(Tn,Un,Qn),Kn=Dn):(nr=0,Tn=cr(Tn,Un,Qn),Tn=or(Tn,Un),nr=1,Kn=!1,Tn=cr(Tn,Un,Qn),Kn=Dn,Tn=or(Tn,Un))}}else nr=0,Tn=cr(Tn,Un,Qn);else nr=Gn?1:0,Tn=cr(Tn,Un,Qn);return Tn},this.__bidiEngine__.setOptions=function(Tn){Tn&&(
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @license
* Copyright (c) 2012 chick307 <chick307@gmail.com>
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2020-09-18 20:43:34 +00:00
function(Tn,Un){Tn.API.adler32cs=function(){var Tn,Un,Qn,Dn,Hn,Gn="function"==typeof ArrayBuffer&&"function"==typeof Uint8Array,zn=null,Vn=function(){if(!Gn)return function(){return!1};try{var Tn={};"function"==typeof Tn.Buffer&&(zn=Tn.Buffer)}catch(Tn){}return function(Tn){return Tn instanceof ArrayBuffer||null!==zn&&Tn instanceof zn}}(),Kn=null!==zn?function(Tn){return new zn(Tn,"utf8").toString("binary")}:function(Tn){return unescape(encodeURIComponent(Tn))},Wn=function i(Tn,Un){for(var Qn=65535&Tn,Dn=Tn>>>16,i=0,Hn=Un.length;i<Hn;i++)Dn=(Dn+(Qn=(Qn+(255&Un.charCodeAt(i)))%65521))%65521;return(Dn<<16|Qn)>>>0},Xn=function a(Tn,Un){for(var Qn=65535&Tn,Dn=Tn>>>16,Hn=0,a=Un.length;Hn<a;Hn++)Dn=(Dn+(Qn=(Qn+Un[Hn])%65521))%65521;return(Dn<<16|Qn)>>>0},Yn={},Jn=Yn.Adler32=((Hn=(Dn=function l(Tn){if(!(this instanceof Dn))throw new TypeError("Constructor cannot called be as a function.");if(!isFinite(Tn=null===Tn?1:+Tn))throw new Error("First arguments needs to be a finite number.");this.checksum=Tn>>>0}).prototype={}).constructor=Dn,Dn.from=((Tn=function u(Tn){if(!(this instanceof Dn))throw new TypeError("Constructor cannot called be as a function.");if(null===Tn)throw new Error("First argument needs to be a string.");this.checksum=Wn(1,Tn.toString())}).prototype=Hn,Tn),Dn.fromUtf8=((Un=function c(Tn){if(!(this instanceof Dn))throw new TypeError("Constructor cannot called be as a function.");if(null===Tn)throw new Error("First argument needs to be a string.");var Un=Kn(Tn.toString());this.checksum=Wn(1,Un)}).prototype=Hn,Un),Gn&&(Dn.fromBuffer=((Qn=function h(Tn){if(!(this instanceof Dn))throw new TypeError("Constructor cannot called be as a function.");if(!Vn(Tn))throw new Error("First argument needs to be ArrayBuffer.");var Un=new Uint8Array(Tn);return this.checksum=Xn(1,Un)}).prototype=Hn,Qn)),Hn.update=function(Tn){if(null===Tn)throw new Error("First argument needs to be a string.");return Tn=Tn.toString(),this.checksum=Wn(this.checksum,Tn)},Hn.updateUtf8=function(Tn){if(null===Tn)throw new Error("First argument needs to be a string.");var Un=Kn(Tn.toString());return this.checksum=Wn(this.checksum,Un)},Gn&&(Hn.updateBuffer=function(Tn){if(!Vn(Tn))throw new Error("First argument needs to be ArrayBuffer.");var Un=new Uint8Array(Tn);return this.checksum=Xn(this.checksum,Un)}),Hn.clone=function(){return new Jn(this.checksum)},Dn);return Yn.from=function(Tn){if(null===Tn)throw new Error("First argument needs to be a string.");return Wn(1,Tn.toString())},Yn.fromUtf8=function(Tn){if(null===Tn)throw new Error("First argument needs to be a string.");var Un=Kn(Tn.toString());return Wn(1,Un)},Gn&&(Yn.fromBuffer=function(Tn){if(!Vn(Tn))throw new Error("First argument need to be ArrayBuffer.");var Un=new Uint8Array(Tn);return Xn(1,Un)}),Yn}()}(g),_export({target:"Array",proto:!0,forced:cA!==[].lastIndexOf},{lastIndexOf:cA}),_export({target:"String",proto:!0,forced:stringHtmlForced("anchor")},{anchor:function anchor(Tn){return createHtml(this,"a","name",Tn)}});
2020-09-04 20:34:30 +00:00
/*! https://mths.be/cssesc v3.0.0 by @mathias */
2020-09-18 20:43:34 +00:00
var $m={}.hasOwnProperty,Zm=/[ -,\.\/:-@\[-\^`\{-~]/,e_=/[ -,\.\/:-@\[\]\^`\{-~]/,t_=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,n_=function cssesc(Tn,Un){"single"!=(Un=function merge(Tn,Un){if(!Tn)return Un;var Qn={};for(var Dn in Un)Qn[Dn]=$m.call(Tn,Dn)?Tn[Dn]:Un[Dn];return Qn}(Un,cssesc.options)).quotes&&"double"!=Un.quotes&&(Un.quotes="single");for(var Qn="double"==Un.quotes?'"':"'",Dn=Un.isIdentifier,Hn=Tn.charAt(0),Gn="",zn=0,Vn=Tn.length;zn<Vn;){var Kn=Tn.charAt(zn++),Wn=Kn.charCodeAt(),Xn=void 0;if(Wn<32||Wn>126){if(Wn>=55296&&Wn<=56319&&zn<Vn){var Yn=Tn.charCodeAt(zn++);56320==(64512&Yn)?Wn=((1023&Wn)<<10)+(1023&Yn)+65536:zn--}Xn="\\"+Wn.toString(16).toUpperCase()+" "}else Xn=Un.escapeEverything?Zm.test(Kn)?"\\"+Kn:"\\"+Wn.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(Kn)?"\\"+Wn.toString(16).toUpperCase()+" ":"\\"==Kn||!Dn&&('"'==Kn&&Qn==Kn||"'"==Kn&&Qn==Kn)||Dn&&e_.test(Kn)?"\\"+Kn:Kn;Gn+=Xn}return Dn&&(/^-[-\d]/.test(Gn)?Gn="\\-"+Gn.slice(1):/\d/.test(Hn)&&(Gn="\\3"+Hn+" "+Gn.slice(1))),Gn=Gn.replace(t_,(function(Tn,Un,Qn){return Un&&Un.length%2?Tn:(Un||"")+Qn})),!Dn&&Un.wrap?Qn+Gn+Qn:Gn};n_.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1},n_.version="3.0.0";var r_=n_,i_=/[a-z0-9_-]/i,a_=/[\s\t]/,o_=function parse(Tn){for(var Un,Qn,Dn=!0,Hn=0,Gn="",zn=0,Vn=[];;){if(Qn=Tn[zn],0===Hn){if(!Qn&&Dn)break;if(!Qn&&!Dn)throw new Error("Parse error");if('"'===Qn||"'"===Qn)Un=Qn,Hn=1,Dn=!1;else if(a_.test(Qn));else{if(!i_.test(Qn))throw new Error("Parse error");Hn=3,Dn=!1,zn--}}else if(1===Hn){if(!Qn)throw new Error("Parse Error");"\\"===Qn?Hn=2:Qn===Un?(Vn.push(Gn),Gn="",Hn=4):Gn+=Qn}else if(2===Hn){if(Qn!==Un&&"\\"!==Qn)throw new Error("Parse error");Gn+=Qn,Hn=1}else if(3===Hn){if(!Qn){Vn.push(Gn);break}if(i_.test(Qn))Gn+=Qn;else if(","===Qn)Vn.push(Gn),Gn="",Hn=0;else{if(!a_.test(Qn))throw new Error("Parse error");Hn=5}}else if(5===Hn){if(!Qn){Vn.push(Gn);break}if(i_.test(Qn))Gn+=" "+Qn,Hn=3;else if(","===Qn)Vn.push(Gn),Gn="",Hn=0;else if(!a_.test(Qn))throw new Error("Parse error")}else if(4===Hn){if(!Qn)break;if(","===Qn)Hn=0;else if(!a_.test(Qn))throw new Error("Parse error")}zn++}return Vn},s_={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},l_=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function isDigit(Tn){return Tn>=48&&Tn<=57}function State(Tn){this.index=0,this.path=Tn,this.max=Tn.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function skipSpaces(Tn){for(;Tn.index<Tn.max&&(10===(Un=Tn.path.charCodeAt(Tn.index))||13===Un||8232===Un||8233===Un||32===Un||9===Un||11===Un||12===Un||160===Un||Un>=5760&&l_.indexOf(Un)>=0);)Tn.index++;var Un}function scanFlag(Tn){var Un=Tn.path.charCodeAt(Tn.index);return 48===Un?(Tn.param=0,void Tn.index++):49===Un?(Tn.param=1,void Tn.index++):void(Tn.err="SvgPath: arc flag can be 0 or 1 only (at pos "+Tn.index+")")}function scanParam(Tn){var Un,Qn=Tn.index,Dn=Qn,Hn=Tn.max,Gn=!1,zn=!1,Vn=!1,Kn=!1;if(Dn>=Hn)Tn.err="SvgPath: missed param (at pos "+Dn+")";else if(43!==(Un=Tn.path.charCodeAt(Dn))&&45!==Un||(Un=++Dn<Hn?Tn.path.charCodeAt(Dn):0),isDigit(Un)||46===Un){if(46!==Un){if(Gn=48===Un,Un=++Dn<Hn?Tn.path.charCodeAt(Dn):0,Gn&&Dn<Hn&&Un&&isDigit(Un))return void(Tn.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+Qn+")");for(;Dn<Hn&&isDigit(Tn.path.charCodeAt(Dn));)Dn++,zn=!0;Un=Dn<Hn?Tn.path.charCodeAt(Dn):0}if(46===Un){for(Kn=!0,Dn++;isDigit(Tn.path.charCodeAt(Dn));)Dn++,Vn=!0;Un=Dn<Hn?Tn.path.charCodeAt(Dn):0}if(101===Un||69===Un){if(Kn&&!zn&&!Vn)return void(Tn.err="SvgPath: invalid float exponent (at pos "+Dn+")");if(43!==(Un=++Dn<Hn?Tn.path.charCodeAt(Dn):0)&&45!==Un||Dn++,!(Dn<Hn&&isDigit(Tn.path.charCodeAt(Dn))))return void(Tn.err="SvgPath: invalid float exponent (at pos "+Dn+")");for(;Dn<Hn&&isDigit(Tn.path.charCodeAt(Dn));)Dn++}Tn.index=Dn,Tn.param=parseFloat(Tn.path.slice(Qn,Dn))+0}else Tn.err="SvgPath: param should start with 0..9 or `.` (at pos "+Dn+")"}function finalizeSegment(Tn){var Un,Qn;Qn=(Un=Tn.path[Tn.segmentStart]).toLowerCase(
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @file jGraduate 0.4
*
* jQuery Plugin for a gradient picker
*
* @module jGraduate
* @copyright 2010 Jeff Schiller {@link http://blog.codedread.com/}, 2010 Alexis Deveria {@link http://a.deveria.com/}
*
* @license Apache-2.0
* @example
* // The Paint object is described below.
* $.jGraduate.Paint(); // constructs a 'none' color
* @example $.jGraduate.Paint({copy: o}); // creates a copy of the paint o
* @example $.jGraduate.Paint({hex: '#rrggbb'}); // creates a solid color paint with hex = "#rrggbb"
* @example $.jGraduate.Paint({linearGradient: o, a: 50}); // creates a linear gradient paint with opacity=0.5
* @example $.jGraduate.Paint({radialGradient: o, a: 7}); // creates a radial gradient paint with opacity=0.07
* @example $.jGraduate.Paint({hex: '#rrggbb', linearGradient: o}); // throws an exception?
*/
2020-09-18 20:43:34 +00:00
var _k="http://www.w3.org/2000/svg",vk="http://www.w3.org/1999/xlink";
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* @file jPicker (Adapted from version 1.1.6)
*
* jQuery Plugin for Photoshop style color picker
*
* @module jPicker
* @copyright (c) 2010 Christopher T. Tillman
* Digital Magic Productions, Inc. ({@link http://www.digitalmagicpro.com/})
* FREE to use, alter, copy, sell, and especially ENHANCE
* @license MIT
*
* Painstakingly ported from John Dyers' excellent work on his own color picker based on the Prototype framework.
*
* John Dyers' website: {@link http://johndyer.name}
* Color Picker page: {@link http://johndyer.name/photoshop-like-javascript-color-picker/}
*/
2020-09-18 20:43:34 +00:00
function toFixedNumeric(Tn,Un){return void 0===Un&&(Un=0),Math.round(Tn*Math.pow(10,Un))/Math.pow(10,Un)}window.console||(window.console={log:function log(Tn){},dir:function dir(Tn){}});var yk=function isNullish(Tn){return null==Tn};function __variableDynamicImportRuntime0__(Tn){switch(Tn){case"./locale/lang.af.js":return Promise.resolve().then((function(){return nS}));case"./locale/lang.ar.js":return Promise.resolve().then((function(){return rS}));case"./locale/lang.az.js":return Promise.resolve().then((function(){return iS}));case"./locale/lang.be.js":return Promise.resolve().then((function(){return aS}));case"./locale/lang.bg.js":return Promise.resolve().then((function(){return oS}));case"./locale/lang.ca.js":return Promise.resolve().then((function(){return sS}));case"./locale/lang.cs.js":return Promise.resolve().then((function(){return lS}));case"./locale/lang.cy.js":return Promise.resolve().then((function(){return cS}));case"./locale/lang.da.js":return Promise.resolve().then((function(){return uS}));case"./locale/lang.de.js":return Promise.resolve().then((function(){return dS}));case"./locale/lang.el.js":return Promise.resolve().then((function(){return hS}));case"./locale/lang.en.js":return Promise.resolve().then((function(){return pS}));case"./locale/lang.es.js":return Promise.resolve().then((function(){return AS}));case"./locale/lang.et.js":return Promise.resolve().then((function(){return fS}));case"./locale/lang.fa.js":return Promise.resolve().then((function(){return gS}));case"./locale/lang.fi.js":return Promise.resolve().then((function(){return mS}));case"./locale/lang.fr.js":return Promise.resolve().then((function(){return _S}));case"./locale/lang.fy.js":return Promise.resolve().then((function(){return vS}));case"./locale/lang.ga.js":return Promise.resolve().then((function(){return yS}));case"./locale/lang.gl.js":return Promise.resolve().then((function(){return bS}));case"./locale/lang.he.js":return Promise.resolve().then((function(){return wS}));case"./locale/lang.hi.js":return Promise.resolve().then((function(){return xS}));case"./locale/lang.hr.js":return Promise.resolve().then((function(){return kS}));case"./locale/lang.hu.js":return Promise.resolve().then((function(){return SS}));case"./locale/lang.hy.js":return Promise.resolve().then((function(){return CS}));case"./locale/lang.id.js":return Promise.resolve().then((function(){return BS}));case"./locale/lang.is.js":return Promise.resolve().then((function(){return ES}));case"./locale/lang.it.js":return Promise.resolve().then((function(){return NS}));case"./locale/lang.ja.js":return Promise.resolve().then((function(){return LS}));case"./locale/lang.ko.js":return Promise.resolve().then((function(){return TS}));case"./locale/lang.lt.js":return Promise.resolve().then((function(){return PS}));case"./locale/lang.lv.js":return Promise.resolve().then((function(){return FS}));case"./locale/lang.mk.js":return Promise.resolve().then((function(){return US}));case"./locale/lang.ms.js":return Promise.resolve().then((function(){return IS}));case"./locale/lang.mt.js":return Promise.resolve().then((function(){return RS}));case"./locale/lang.nl.js":return Promise.resolve().then((function(){return MS}));case"./locale/lang.no.js":return Promise.resolve().then((function(){return QS}));case"./locale/lang.pl.js":return Promise.resolve().then((function(){return OS}));case"./locale/lang.pt-BR.js":return Promise.resolve().then((function(){return DS}));case"./locale/lang.pt-PT.js":return Promise.resolve().then((function(){return jS}));case"./locale/lang.ro.js":return Promise.resolve().then((function(){return HS}));case"./locale/lang.ru.js":return Promise.resolve().then((function(){return GS}));case"./locale/lang.sk.js":return Promise.resolve().then((function(){return zS}));case"./locale/lang.sl.js":return Promise.resolve().then((function(){return VS}));case"./locale/lang.sq.js":return Promise.resolve().then((function(){return KS}));case"./locale/lang.sr.js":return Promise.resolve().then((function(){return qS}));case"./locale/lang.sv.js":return Promise.resolve().then((function(){retu
2020-09-04 20:34:30 +00:00
/**
2020-09-08 23:35:47 +00:00
* Localizing script for SVG-edit UI.
* @module locale
* @license MIT
*
* @copyright 2010 Narendra Sisodya
* @copyright 2010 Alexis Deveria
*
2020-09-18 20:43:34 +00:00
*/_export({target:"String",proto:!0,forced:stringHtmlForced("bold")},{bold:function bold(){return createHtml(this,"b","","")}});var wk,xk=jQuery,kk=function setStrings(Tn,Un,Qn){var Dn=xk("#svg_editor").parent();Object.entries(Un).forEach((function(Un){var Hn=_slicedToArray(Un,2),Gn=Hn[0],zn=Hn[1];if(zn){Qn&&(Gn="#"+Gn);var Vn=Dn.find(Gn);if(Vn.length){var Kn=Vn[0];switch(Tn){case"aria-label":Kn.setAttribute("aria-label",zn);break;case"content":_toConsumableArray(Kn.childNodes).some((function(Tn){return!(3!==Tn.nodeType||!Tn.textContent.trim())&&(Tn.textContent=zn,!0)}));break;case"title":Kn.title=zn}}else console.log("Missing element for localization: "+Gn)}else console.log(Gn)}))},Sk=function readLang(Tn){var Un=Tn.tools,Qn=Tn.properties,Dn=Tn.config,Hn=Tn.layers,Gn=Tn.common,zn=Tn.ui;kk("content",{curve_segments:Qn.curve_segments,fitToContent:Un.fitToContent,fit_to_all:Un.fit_to_all,fit_to_canvas:Un.fit_to_canvas,fit_to_layer_content:Un.fit_to_layer_content,fit_to_sel:Un.fit_to_sel,icon_large:Dn.icon_large,icon_medium:Dn.icon_medium,icon_small:Dn.icon_small,icon_xlarge:Dn.icon_xlarge,image_opt_embed:Dn.image_opt_embed,image_opt_ref:Dn.image_opt_ref,includedImages:Dn.included_images,largest_object:Un.largest_object,layersLabel:Hn.layers,page:Un.page,relativeToLabel:Un.relativeTo,selLayerLabel:Hn.move_elems_to,selectedPredefined:Dn.select_predefined,selected_objects:Un.selected_objects,smallest_object:Un.smallest_object,straight_segments:Qn.straight_segments,svginfo_bg_url:Dn.editor_img_url+":",svginfo_bg_note:Dn.editor_bg_note,svginfo_change_background:Dn.background,svginfo_dim:Dn.doc_dims,svginfo_editor_prefs:Dn.editor_prefs,svginfo_height:Gn.height,svginfo_icons:Dn.icon_size,svginfo_image_props:Dn.image_props,svginfo_lang:Dn.language,svginfo_title:Dn.doc_title,svginfo_width:Gn.width,tool_docprops_cancel:Gn.cancel,tool_docprops_save:Gn.ok,tool_source_cancel:Gn.cancel,tool_source_save:Gn.ok,tool_prefs_cancel:Gn.cancel,tool_prefs_save:Gn.ok,sidepanel_handle:Hn.layers.split("").join(" "),tool_clear:Un.new_doc,tool_docprops:Un.docprops,tool_export:Un.export_img,tool_import:Un.import_doc,tool_open:Un.open_doc,tool_save:Un.save_doc,tool_editor_prefs:Dn.editor_prefs,tool_editor_homepage:Un.editor_homepage,svginfo_units_rulers:Dn.units_and_rulers,svginfo_rulers_onoff:Dn.show_rulers,svginfo_unit:Dn.base_unit,svginfo_grid_settings:Dn.grid,svginfo_snap_onoff:Dn.snapping_onoff,svginfo_snap_step:Dn.snapping_stepsize,svginfo_grid_color:Dn.grid_color},!0);var Vn={};["cut","copy","paste","paste_in_place","delete","group","ungroup","move_front","move_up","move_down","move_back"].forEach((function(Tn){Vn['#cmenu_canvas a[href="#'+Tn+'"]']=Un[Tn]})),["dupe","merge_down","merge_all"].forEach((function(Tn){Vn['#cmenu_layers a[href="#'+Tn+'"]']=Hn[Tn]})),Vn['#cmenu_layers a[href="#delete"]']=Hn.del,kk("content",Vn);var Kn={};return Object.entries({tool_blur:Qn.blur,tool_position:Un.align_to_page,tool_font_family:Qn.font_family,zoom_panel:zn.zoom_level,stroke_linejoin:Qn.linejoin_miter,stroke_linecap:Qn.linecap_butt,tool_opacity:Qn.opacity}).forEach((function(Tn){var Un=_slicedToArray(Tn,2),Qn=Un[0],Dn=Un[1];Kn["#"+Qn+" button"]=Dn})),Object.entries({group_opacity:Qn.opacity,zoom:zn.zoom_level}).forEach((function(Tn){var Un=_slicedToArray(Tn,2),Qn=Un[0],Dn=Un[1];Kn["#"+Qn]=Dn})),kk("aria-label",Kn),kk("title",{align_relative_to:Un.align_relative_to,circle_cx:Qn.circle_cx,circle_cy:Qn.circle_cy,circle_r:Qn.circle_r,cornerRadiusLabel:Qn.corner_radius,ellipse_cx:Qn.ellipse_cx,ellipse_cy:Qn.ellipse_cy,ellipse_rx:Qn.ellipse_rx,ellipse_ry:Qn.ellipse_ry,fill_color:Qn.fill_color,font_family:Qn.font_family,idLabel:Qn.id,image_height:Qn.image_height,image_url:Qn.image_url,image_width:Qn.image_width,layer_delete:Hn.del,layer_down:Hn.move_down,layer_new:Hn.new,layer_rename:Hn.rename,layer_moreopts:Gn.more_opts,layer_up:Hn.move_up,line_x1:Qn.line_x1,line_x2:Qn.line_x2,line_y1:Qn.line_y1,line_y2:Qn.line_y2,linecap_butt:Qn.linecap_butt,linecap_round:Qn.linecap_round,linecap_square:Qn.linecap_square,linejoin_bevel:Qn.linejoin_bevel,linejoin_miter:Qn.l
2020-09-04 20:34:30 +00:00
/*!
2020-09-08 23:35:47 +00:00
* html2canvas 1.0.0-rc.7 <https://html2canvas.hertzen.com>
* Copyright (c) 2020 Niklas von Hertzen <https://hertzen.com>
* Released under MIT License
*/
2020-09-18 20:43:34 +00:00
Tn.exports=function(){
2020-09-04 20:34:30 +00:00
/*! *****************************************************************************
2020-09-08 23:35:47 +00:00
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
2020-09-18 20:43:34 +00:00
var Tn=function extendStatics(Un,Qn){return(Tn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Tn,Un){Tn.__proto__=Un}||function(Tn,Un){for(var Qn in Un)Un.hasOwnProperty(Qn)&&(Tn[Qn]=Un[Qn])})(Un,Qn)};function __extends(Un,Qn){function __(){this.constructor=Un}Tn(Un,Qn),Un.prototype=null===Qn?Object.create(Qn):(__.prototype=Qn.prototype,new __)}var Un=function __assign(){return(Un=Object.assign||function __assign(Tn){for(var Un,Qn=1,Dn=arguments.length;Qn<Dn;Qn++)for(var Hn in Un=arguments[Qn])Object.prototype.hasOwnProperty.call(Un,Hn)&&(Tn[Hn]=Un[Hn]);return Tn}).apply(this,arguments)};function __awaiter(Tn,Un,Qn,Dn){return new(Qn||(Qn=Promise))((function(Hn,Gn){function fulfilled(Tn){try{step(Dn.next(Tn))}catch(Tn){Gn(Tn)}}function rejected(Tn){try{step(Dn.throw(Tn))}catch(Tn){Gn(Tn)}}function step(Tn){Tn.done?Hn(Tn.value):new Qn((function(Un){Un(Tn.value)})).then(fulfilled,rejected)}step((Dn=Dn.apply(Tn,Un||[])).next())}))}function __generator(Tn,Un){var Qn,Dn,Hn,Gn,zn={label:0,sent:function sent(){if(1&Hn[0])throw Hn[1];return Hn[1]},trys:[],ops:[]};return Gn={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(Gn[Symbol.iterator]=function(){return this}),Gn;function verb(Tn){return function(Un){return step([Tn,Un])}}function step(Gn){if(Qn)throw new TypeError("Generator is already executing.");for(;zn;)try{if(Qn=1,Dn&&(Hn=2&Gn[0]?Dn.return:Gn[0]?Dn.throw||((Hn=Dn.return)&&Hn.call(Dn),0):Dn.next)&&!(Hn=Hn.call(Dn,Gn[1])).done)return Hn;switch(Dn=0,Hn&&(Gn=[2&Gn[0],Hn.value]),Gn[0]){case 0:case 1:Hn=Gn;break;case 4:return zn.label++,{value:Gn[1],done:!1};case 5:zn.label++,Dn=Gn[1],Gn=[0];continue;case 7:Gn=zn.ops.pop(),zn.trys.pop();continue;default:if(!((Hn=(Hn=zn.trys).length>0&&Hn[Hn.length-1])||6!==Gn[0]&&2!==Gn[0])){zn=0;continue}if(3===Gn[0]&&(!Hn||Gn[1]>Hn[0]&&Gn[1]<Hn[3])){zn.label=Gn[1];break}if(6===Gn[0]&&zn.label<Hn[1]){zn.label=Hn[1],Hn=Gn;break}if(Hn&&zn.label<Hn[2]){zn.label=Hn[2],zn.ops.push(Gn);break}Hn[2]&&zn.ops.pop(),zn.trys.pop();continue}Gn=Un.call(Tn,zn)}catch(Tn){Gn=[6,Tn],Dn=0}finally{Qn=Hn=0}if(5&Gn[0])throw Gn[1];return{value:Gn[0]?Gn[1]:void 0,done:!0}}}for(var Qn=function(){function Bounds(Tn,Un,Qn,Dn){this.left=Tn,this.top=Un,this.width=Qn,this.height=Dn}return Bounds.prototype.add=function(Tn,Un,Qn,Dn){return new Bounds(this.left+Tn,this.top+Un,this.width+Qn,this.height+Dn)},Bounds.fromClientRect=function(Tn){return new Bounds(Tn.left,Tn.top,Tn.width,Tn.height)},Bounds}(),Dn=function parseBounds(Tn){return Qn.fromClientRect(Tn.getBoundingClientRect())},Hn=function parseDocumentSize(Tn){var Un=Tn.body,Dn=Tn.documentElement;if(!Un||!Dn)throw new Error("Unable to get document size");var Hn=Math.max(Math.max(Un.scrollWidth,Dn.scrollWidth),Math.max(Un.offsetWidth,Dn.offsetWidth),Math.max(Un.clientWidth,Dn.clientWidth)),Gn=Math.max(Math.max(Un.scrollHeight,Dn.scrollHeight),Math.max(Un.offsetHeight,Dn.offsetHeight),Math.max(Un.clientHeight,Dn.clientHeight));return new Qn(0,0,Hn,Gn)},Gn=function toCodePoints(Tn){for(var Un=[],Qn=0,Dn=Tn.length;Qn<Dn;){var Hn=Tn.charCodeAt(Qn++);if(Hn>=55296&&Hn<=56319&&Qn<Dn){var Gn=Tn.charCodeAt(Qn++);56320==(64512&Gn)?Un.push(((1023&Hn)<<10)+(1023&Gn)+65536):(Un.push(Hn),Qn--)}else Un.push(Hn)}return Un},zn=function fromCodePoint(){for(var Tn=[],Un=0;Un<arguments.length;Un++)Tn[Un]=arguments[Un];if(String.fromCodePoint)return String.fromCodePoint.apply(String,Tn);var Qn=Tn.length;if(!Qn)return"";for(var Dn=[],Hn=-1,Gn="";++Hn<Qn;){var zn=Tn[Hn];zn<=65535?Dn.push(zn):(zn-=65536,Dn.push(55296+(zn>>10),zn%1024+56320)),(Hn+1===Qn||Dn.length>16384)&&(Gn+=String.fromCharCode.apply(String,Dn),Dn.length=0)}return Gn},Vn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Kn="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Wn=0;Wn<Vn.length;Wn++)Kn[Vn.charCodeAt(Wn)]=Wn;var Xn,Yn=function decode(Tn){var Un,Qn,Dn,Hn,Gn,zn=.75*Tn.length,Vn=Tn.length,Wn=0;"="===Tn[Tn.length-1]&&(zn--,"="===Tn[Tn.length-2]&&zn--);var Xn="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.sli
2020-09-04 20:34:30 +00:00
/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.0.8/LICENSE */
2020-09-18 20:43:34 +00:00
Tn.exports=function(){function _toConsumableArray(Tn){if(Array.isArray(Tn)){for(var Un=0,Qn=Array(Tn.length);Un<Tn.length;Un++)Qn[Un]=Tn[Un];return Qn}return Array.from(Tn)}var Tn=Object.hasOwnProperty,Un=Object.setPrototypeOf,Qn=Object.isFrozen,Dn=Object.keys,Hn=Object.freeze,Gn=Object.seal,zn="undefined"!=typeof Reflect&&Reflect,Vn=zn.apply,Kn=zn.construct;Vn||(Vn=function apply(Tn,Un,Qn){return Tn.apply(Un,Qn)}),Hn||(Hn=function freeze(Tn){return Tn}),Gn||(Gn=function seal(Tn){return Tn}),Kn||(Kn=function construct(Tn,Un){return new(Function.prototype.bind.apply(Tn,[null].concat(_toConsumableArray(Un))))});var Wn=unapply(Array.prototype.forEach),Xn=unapply(Array.prototype.indexOf),Yn=unapply(Array.prototype.join),Jn=unapply(Array.prototype.pop),$n=unapply(Array.prototype.push),Zn=unapply(Array.prototype.slice),er=unapply(String.prototype.toLowerCase),tr=unapply(String.prototype.match),nr=unapply(String.prototype.replace),rr=unapply(String.prototype.indexOf),ir=unapply(String.prototype.trim),ar=unapply(RegExp.prototype.test),or=unconstruct(RegExp),sr=unconstruct(TypeError);function unapply(Tn){return function(Un){for(var Qn=arguments.length,Dn=Array(Qn>1?Qn-1:0),Hn=1;Hn<Qn;Hn++)Dn[Hn-1]=arguments[Hn];return Vn(Tn,Un,Dn)}}function unconstruct(Tn){return function(){for(var Un=arguments.length,Qn=Array(Un),Dn=0;Dn<Un;Dn++)Qn[Dn]=arguments[Dn];return Kn(Tn,Qn)}}function addToSet(Tn,Dn){Un&&Un(Tn,null);for(var Hn=Dn.length;Hn--;){var Gn=Dn[Hn];if("string"==typeof Gn){var zn=er(Gn);zn!==Gn&&(Qn(Dn)||(Dn[Hn]=zn),Gn=zn)}Tn[Gn]=!0}return Tn}function clone(Un){var Qn={},Dn=void 0;for(Dn in Un)Vn(Tn,Un,[Dn])&&(Qn[Dn]=Un[Dn]);return Qn}var lr=Hn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),cr=Hn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"]),ur=Hn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),dr=Hn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),hr=Hn(["#text"]),pr=Hn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","i