
/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&j.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(D),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split("").sort(D).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var j,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",y.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Ee(){return!1}function Se(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function ke(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)ke(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ee;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Ae(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,Ce)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=Te.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=Te.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ae(t,"click",Ce),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ae(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:Ee,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Ee,isPropagationStopped:Ee,isImmediatePropagationStopped:Ee,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&be.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&we.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Ae(this,e,Se),!1},trigger:function(){return Ae(this,e),!0},delegateType:t}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return ke(this,e,t,n,r)},one:function(e,t,n,r){return ke(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ee),this.each(function(){S.event.remove(this,e,n,t)})}});var Ne=/<script|<style|<link/i,De=/checked\s*(?:[^=]|=\s*.checked.)/i,je=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function Pe(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&De.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Pe(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,"script"),Le)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,He),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(je,""),u,l))}return n}function Re(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(n&&ie(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Oe(o[r],a[r]);else Oe(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Re(this,e,!0)},remove:function(e){return Re(this,e)},text:function(e){return $(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Pe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,e).appendChild(e)})},prepend:function(){return Pe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=qe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ne.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Pe(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Me=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Ie=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},We=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Fe=new RegExp(ne.join("|"),"i");function Be(e,t,n){var r,i,o,a,s=e.style;return(n=n||Ie(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Me.test(a)&&Fe.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function $e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px",t.style.height="1px",n.style.height="9px",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=3<parseInt(r.height),re.removeChild(e)),a}}))}();var _e=["Webkit","Moz","ms"],ze=E.createElement("div").style,Ue={};function Xe(e){var t=S.cssProps[e]||Ue[e];return t||(e in ze?e:Ue[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=_e.length;while(n--)if((e=_e[n]+t)in ze)return e}(e)||e)}var Ve=/^(none|table(?!-c[ea]).+)/,Ge=/^--/,Ye={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ke(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Ze(e,t,n){var r=Ie(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=Be(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Me.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ke(e,t,n||(i?"border":"content"),o,r,a)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Ge.test(t),l=e.style;if(u||(t=Xe(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Ge.test(t)||(t=Xe(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Be(e,t,r)),"normal"===i&&t in Qe&&(i=Qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ve.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,u,n):We(e,Ye,function(){return Ze(e,u,n)})},set:function(e,t,n){var r,i=Ie(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Ke(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Ke(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Je(0,t,s)}}}),S.cssHooks.marginLeft=$e(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Be(e,"marginLeft"))||e.getBoundingClientRect().left-We(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Je)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ie(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=et).prototype={constructor:et,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[Xe(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=et.prototype.init,S.fx.step={};var tt,nt,rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(st):C.setTimeout(st,S.fx.interval),S.fx.tick())}function ut(){return C.setTimeout(function(){tt=void 0}),tt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ft(o,e,t){var n,a,r=0,i=ft.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=tt||ut(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:tt||ut(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=ft.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ct,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ft.tweeners[n]=ft.tweeners[n]||[],ft.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ct(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=ft(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&at.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(lt(r,!0),e,t,n)}}),S.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),tt=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){nt||(nt=!0,st())},S.fx.stop=function(){nt=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},rt=E.createElement("input"),it=E.createElement("select").appendChild(E.createElement("option")),rt.type="checkbox",y.checkOn=""!==rt.value,y.optSelected=it.selected,(rt=E.createElement("input")).value="t",rt.type="radio",y.radioValue="t"===rt.value;var pt,dt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=dt[t]||S.find.attr;dt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=dt[o],dt[o]=r,r=null!=a(e,t,n)?o:null,dt[o]=i),r}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function vt(e){return(e.match(P)||[]).join(" ")}function yt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,yt(this)))});if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,yt(this)))});if(!arguments.length)return this.attr("class","");if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,yt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=mt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=yt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+vt(yt(n))+" ").indexOf(t))return!0;return!1}});var xt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(xt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:vt(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!bt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,bt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,wt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,wt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var Tt=C.location,Ct={guid:Date.now()},Et=/\?/;S.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||S.error("Invalid XML: "+e),t};var St=/\[\]$/,kt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function Dt(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||St.test(n)?i(n,t):Dt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)Dt(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)Dt(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&Nt.test(this.nodeName)&&!At.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var jt=/%20/g,qt=/#.*$/,Lt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,Pt=/^\/\//,Rt={},Mt={},It="*/".concat("*"),Wt=E.createElement("a");function Ft(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Bt(t,i,o,a){var s={},u=t===Mt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function $t(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Wt.href=Tt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$t($t(e,S.ajaxSettings),t):$t(S.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Mt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Ht.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Tt.href)+"").replace(Pt,Tt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Wt.protocol+"//"+Wt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Bt(Rt,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ot.test(v.type),f=v.url.replace(qt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(jt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Et.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Lt,"$1"),o=(Et.test(f)?"&":"?")+"_="+Ct.guid+++o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+It+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Bt(Mt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray("script",v.dataTypes)&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var _t={0:200,1223:204},zt=S.ajaxSettings.xhr();y.cors=!!zt&&"withCredentials"in zt,y.ajax=zt=!!zt,S.ajaxTransport(function(i){var o,a;if(y.cors||zt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(_t[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=vt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Gt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Gt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Yt=C.jQuery,Qt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Qt),e&&C.jQuery===S&&(C.jQuery=Yt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});

$.fn.exists=function(){return this.length!==0};function _invisibleDimensions(_el){$(_el).css({display:"block",visibility:"hidden"});var _dim={height:$(_el).outerHeight(),width:$(_el).outerWidth()};$(_el).css({display:"none",visibility:"visible"});return _dim}
/*!
  * Bootstrap v4.5.0 (https://getbootstrap.com/)
  * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],e):e((t=t||self).bootstrap={},t.jQuery)}(this,(function(t,e){"use strict";function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function i(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;function a(t){var n=this,i=!1;return e(this).one(l.TRANSITION_END,(function(){i=!0})),setTimeout((function(){i||l.triggerTransitionEnd(n)}),t),this}var l={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var n=e(t).css("transition-duration"),i=e(t).css("transition-delay"),o=parseFloat(n),r=parseFloat(i);return o||r?(n=n.split(",")[0],i=i.split(",")[0],1e3*(parseFloat(n)+parseFloat(i))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){e(t).trigger("transitionend")},supportsTransitionEnd:function(){return Boolean("transitionend")},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],r=e[i],s=r&&l.isElement(r)?"element":null===(a=r)||"undefined"==typeof a?""+a:{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(o).test(s))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+s+'" but expected type "'+o+'".')}var a},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?l.findShadowRoot(t.parentNode):null},jQueryDetection:function(){if("undefined"==typeof e)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};l.jQueryDetection(),e.fn.emulateTransitionEnd=a,e.event.special[l.TRANSITION_END]={bindType:"transitionend",delegateType:"transitionend",handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var c="alert",u=e.fn[c],h=function(){function t(t){this._element=t}var n=t.prototype;return n.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},n.dispose=function(){e.removeData(this._element,"bs.alert"),this._element=null},n._getRootElement=function(t){var n=l.getSelectorFromElement(t),i=!1;return n&&(i=document.querySelector(n)),i||(i=e(t).closest(".alert")[0]),i},n._triggerCloseEvent=function(t){var n=e.Event("close.bs.alert");return e(t).trigger(n),n},n._removeElement=function(t){var n=this;if(e(t).removeClass("show"),e(t).hasClass("fade")){var i=l.getTransitionDurationFromElement(t);e(t).one(l.TRANSITION_END,(function(e){return n._destroyElement(t,e)})).emulateTransitionEnd(i)}else this._destroyElement(t)},n._destroyElement=function(t){e(t).detach().trigger("closed.bs.alert").remove()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.alert");o||(o=new t(this),i.data("bs.alert",o)),"close"===n&&o[n](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},i(t,null,[{key:"VERSION",get:function(){return"4.5.0"}}]),t}();e(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',h._handleDismiss(new h)),e.fn[c]=h._jQueryInterface,e.fn[c].Constructor=h,e.fn[c].noConflict=function(){return e.fn[c]=u,h._jQueryInterface};var f=e.fn.button,d=function(){function t(t){this._element=t}var n=t.prototype;return n.toggle=function(){var t=!0,n=!0,i=e(this._element).closest('[data-toggle="buttons"]')[0];if(i){var o=this._element.querySelector('input:not([type="hidden"])');if(o){if("radio"===o.type)if(o.checked&&this._element.classList.contains("active"))t=!1;else{var r=i.querySelector(".active");r&&e(r).removeClass("active")}t&&("checkbox"!==o.type&&"radio"!==o.type||(o.checked=!this._element.classList.contains("active")),e(o).trigger("change")),o.focus(),n=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(n&&this._element.setAttribute("aria-pressed",!this._element.classList.contains("active")),t&&e(this._element).toggleClass("active"))},n.dispose=function(){e.removeData(this._element,"bs.button"),this._element=null},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.button");i||(i=new t(this),e(this).data("bs.button",i)),"toggle"===n&&i[n]()}))},i(t,null,[{key:"VERSION",get:function(){return"4.5.0"}}]),t}();e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var n=t.target,i=n;if(e(n).hasClass("btn")||(n=e(n).closest(".btn")[0]),!n||n.hasAttribute("disabled")||n.classList.contains("disabled"))t.preventDefault();else{var o=n.querySelector('input:not([type="hidden"])');if(o&&(o.hasAttribute("disabled")||o.classList.contains("disabled")))return void t.preventDefault();"LABEL"===i.tagName&&o&&"checkbox"===o.type&&t.preventDefault(),d._jQueryInterface.call(e(n),"toggle")}})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){var n=e(t.target).closest(".btn")[0];e(n).toggleClass("focus",/^focus(in)?$/.test(t.type))})),e(window).on("load.bs.button.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e<n;e++){var i=t[e],o=i.querySelector('input:not([type="hidden"])');o.checked||o.hasAttribute("checked")?i.classList.add("active"):i.classList.remove("active")}for(var r=0,s=(t=[].slice.call(document.querySelectorAll('[data-toggle="button"]'))).length;r<s;r++){var a=t[r];"true"===a.getAttribute("aria-pressed")?a.classList.add("active"):a.classList.remove("active")}})),e.fn.button=d._jQueryInterface,e.fn.button.Constructor=d,e.fn.button.noConflict=function(){return e.fn.button=f,d._jQueryInterface};var p="carousel",m=".bs.carousel",g=e.fn[p],v={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},_={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},b={TOUCH:"touch",PEN:"pen"},y=function(){function t(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=this._element.querySelector(".carousel-indicators"),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var n=t.prototype;return n.next=function(){this._isSliding||this._slide("next")},n.nextWhenVisible=function(){!document.hidden&&e(this._element).is(":visible")&&"hidden"!==e(this._element).css("visibility")&&this.next()},n.prev=function(){this._isSliding||this._slide("prev")},n.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(l.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},n.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},n.to=function(t){var n=this;this._activeElement=this._element.querySelector(".active.carousel-item");var i=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)e(this._element).one("slid.bs.carousel",(function(){return n.to(t)}));else{if(i===t)return this.pause(),void this.cycle();var o=t>i?"next":"prev";this._slide(o,this._items[t])}},n.dispose=function(){e(this._element).off(m),e.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},n._getConfig=function(t){return t=s(s({},v),t),l.typeCheckConfig(p,t,_),t},n._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},n._addEventListeners=function(){var t=this;this._config.keyboard&&e(this._element).on("keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&e(this._element).on("mouseenter.bs.carousel",(function(e){return t.pause(e)})).on("mouseleave.bs.carousel",(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},n._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var n=function(e){t._pointerEvent&&b[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},i=function(e){t._pointerEvent&&b[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};e(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(function(t){return t.preventDefault()})),this._pointerEvent?(e(this._element).on("pointerdown.bs.carousel",(function(t){return n(t)})),e(this._element).on("pointerup.bs.carousel",(function(t){return i(t)})),this._element.classList.add("pointer-event")):(e(this._element).on("touchstart.bs.carousel",(function(t){return n(t)})),e(this._element).on("touchmove.bs.carousel",(function(e){return function(e){e.originalEvent.touches&&e.originalEvent.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.originalEvent.touches[0].clientX-t.touchStartX}(e)})),e(this._element).on("touchend.bs.carousel",(function(t){return i(t)})))}},n._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},n._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},n._getItemByDirection=function(t,e){var n="next"===t,i="prev"===t,o=this._getItemIndex(e),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config.wrap)return e;var s=(o+("prev"===t?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},n._triggerSlideEvent=function(t,n){var i=this._getItemIndex(t),o=this._getItemIndex(this._element.querySelector(".active.carousel-item")),r=e.Event("slide.bs.carousel",{relatedTarget:t,direction:n,from:o,to:i});return e(this._element).trigger(r),r},n._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var n=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));e(n).removeClass("active");var i=this._indicatorsElement.children[this._getItemIndex(t)];i&&e(i).addClass("active")}},n._slide=function(t,n){var i,o,r,s=this,a=this._element.querySelector(".active.carousel-item"),c=this._getItemIndex(a),u=n||a&&this._getItemByDirection(t,a),h=this._getItemIndex(u),f=Boolean(this._interval);if("next"===t?(i="carousel-item-left",o="carousel-item-next",r="left"):(i="carousel-item-right",o="carousel-item-prev",r="right"),u&&e(u).hasClass("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(u,r).isDefaultPrevented()&&a&&u){this._isSliding=!0,f&&this.pause(),this._setActiveIndicatorElement(u);var d=e.Event("slid.bs.carousel",{relatedTarget:u,direction:r,from:c,to:h});if(e(this._element).hasClass("slide")){e(u).addClass(o),l.reflow(u),e(a).addClass(i),e(u).addClass(i);var p=parseInt(u.getAttribute("data-interval"),10);p?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=p):this._config.interval=this._config.defaultInterval||this._config.interval;var m=l.getTransitionDurationFromElement(a);e(a).one(l.TRANSITION_END,(function(){e(u).removeClass(i+" "+o).addClass("active"),e(a).removeClass("active "+o+" "+i),s._isSliding=!1,setTimeout((function(){return e(s._element).trigger(d)}),0)})).emulateTransitionEnd(m)}else e(a).removeClass("active"),e(u).addClass("active"),this._isSliding=!1,e(this._element).trigger(d);f&&this.cycle()}},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.carousel"),o=s(s({},v),e(this).data());"object"==typeof n&&(o=s(s({},o),n));var r="string"==typeof n?n:o.slide;if(i||(i=new t(this,o),e(this).data("bs.carousel",i)),"number"==typeof n)i.to(n);else if("string"==typeof r){if("undefined"==typeof i[r])throw new TypeError('No method named "'+r+'"');i[r]()}else o.interval&&o.ride&&(i.pause(),i.cycle())}))},t._dataApiClickHandler=function(n){var i=l.getSelectorFromElement(this);if(i){var o=e(i)[0];if(o&&e(o).hasClass("carousel")){var r=s(s({},e(o).data()),e(this).data()),a=this.getAttribute("data-slide-to");a&&(r.interval=!1),t._jQueryInterface.call(e(o),r),a&&e(o).data("bs.carousel").to(a),n.preventDefault()}}},i(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return v}}]),t}();e(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",y._dataApiClickHandler),e(window).on("load.bs.carousel.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),n=0,i=t.length;n<i;n++){var o=e(t[n]);y._jQueryInterface.call(o,o.data())}})),e.fn[p]=y._jQueryInterface,e.fn[p].Constructor=y,e.fn[p].noConflict=function(){return e.fn[p]=g,y._jQueryInterface};var w="collapse",E=e.fn[w],T={toggle:!0,parent:""},C={toggle:"boolean",parent:"(string|element)"},S=function(){function t(t,e){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var n=[].slice.call(document.querySelectorAll('[data-toggle="collapse"]')),i=0,o=n.length;i<o;i++){var r=n[i],s=l.getSelectorFromElement(r),a=[].slice.call(document.querySelectorAll(s)).filter((function(e){return e===t}));null!==s&&a.length>0&&(this._selector=s,this._triggerArray.push(r))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var n=t.prototype;return n.toggle=function(){e(this._element).hasClass("show")?this.hide():this.show()},n.show=function(){var n,i,o=this;if(!this._isTransitioning&&!e(this._element).hasClass("show")&&(this._parent&&0===(n=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(t){return"string"==typeof o._config.parent?t.getAttribute("data-parent")===o._config.parent:t.classList.contains("collapse")}))).length&&(n=null),!(n&&(i=e(n).not(this._selector).data("bs.collapse"))&&i._isTransitioning))){var r=e.Event("show.bs.collapse");if(e(this._element).trigger(r),!r.isDefaultPrevented()){n&&(t._jQueryInterface.call(e(n).not(this._selector),"hide"),i||e(n).data("bs.collapse",null));var s=this._getDimension();e(this._element).removeClass("collapse").addClass("collapsing"),this._element.style[s]=0,this._triggerArray.length&&e(this._triggerArray).removeClass("collapsed").attr("aria-expanded",!0),this.setTransitioning(!0);var a="scroll"+(s[0].toUpperCase()+s.slice(1)),c=l.getTransitionDurationFromElement(this._element);e(this._element).one(l.TRANSITION_END,(function(){e(o._element).removeClass("collapsing").addClass("collapse show"),o._element.style[s]="",o.setTransitioning(!1),e(o._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(c),this._element.style[s]=this._element[a]+"px"}}},n.hide=function(){var t=this;if(!this._isTransitioning&&e(this._element).hasClass("show")){var n=e.Event("hide.bs.collapse");if(e(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",l.reflow(this._element),e(this._element).addClass("collapsing").removeClass("collapse show");var o=this._triggerArray.length;if(o>0)for(var r=0;r<o;r++){var s=this._triggerArray[r],a=l.getSelectorFromElement(s);if(null!==a)e([].slice.call(document.querySelectorAll(a))).hasClass("show")||e(s).addClass("collapsed").attr("aria-expanded",!1)}this.setTransitioning(!0);this._element.style[i]="";var c=l.getTransitionDurationFromElement(this._element);e(this._element).one(l.TRANSITION_END,(function(){t.setTransitioning(!1),e(t._element).removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")})).emulateTransitionEnd(c)}}},n.setTransitioning=function(t){this._isTransitioning=t},n.dispose=function(){e.removeData(this._element,"bs.collapse"),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},n._getConfig=function(t){return(t=s(s({},T),t)).toggle=Boolean(t.toggle),l.typeCheckConfig(w,t,C),t},n._getDimension=function(){return e(this._element).hasClass("width")?"width":"height"},n._getParent=function(){var n,i=this;l.isElement(this._config.parent)?(n=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(n=this._config.parent[0])):n=document.querySelector(this._config.parent);var o='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',r=[].slice.call(n.querySelectorAll(o));return e(r).each((function(e,n){i._addAriaAndCollapsedClass(t._getTargetFromElement(n),[n])})),n},n._addAriaAndCollapsedClass=function(t,n){var i=e(t).hasClass("show");n.length&&e(n).toggleClass("collapsed",!i).attr("aria-expanded",i)},t._getTargetFromElement=function(t){var e=l.getSelectorFromElement(t);return e?document.querySelector(e):null},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.collapse"),r=s(s(s({},T),i.data()),"object"==typeof n&&n?n:{});if(!o&&r.toggle&&"string"==typeof n&&/show|hide/.test(n)&&(r.toggle=!1),o||(o=new t(this,r),i.data("bs.collapse",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n]()}}))},i(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return T}}]),t}();e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var n=e(this),i=l.getSelectorFromElement(this),o=[].slice.call(document.querySelectorAll(i));e(o).each((function(){var t=e(this),i=t.data("bs.collapse")?"toggle":n.data();S._jQueryInterface.call(t,i)}))})),e.fn[w]=S._jQueryInterface,e.fn[w].Constructor=S,e.fn[w].noConflict=function(){return e.fn[w]=E,S._jQueryInterface};var D="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,k=function(){for(var t=["Edge","Trident","Firefox"],e=0;e<t.length;e+=1)if(D&&navigator.userAgent.indexOf(t[e])>=0)return 1;return 0}();var N=D&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),k))}};function O(t){return t&&"[object Function]"==={}.toString.call(t)}function A(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function I(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function x(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=A(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/(auto|scroll|overlay)/.test(n+o+i)?t:x(I(t))}function j(t){return t&&t.referenceNode?t.referenceNode:t}var L=D&&!(!window.MSInputMethodContext||!document.documentMode),P=D&&/MSIE 10/.test(navigator.userAgent);function F(t){return 11===t?L:10===t?P:L||P}function R(t){if(!t)return document.documentElement;for(var e=F(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===A(n,"position")?R(n):n:t?t.ownerDocument.documentElement:document.documentElement}function M(t){return null!==t.parentNode?M(t.parentNode):t}function B(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,o=n?e:t,r=document.createRange();r.setStart(i,0),r.setEnd(o,0);var s,a,l=r.commonAncestorContainer;if(t!==l&&e!==l||i.contains(o))return"BODY"===(a=(s=l).nodeName)||"HTML"!==a&&R(s.firstElementChild)!==s?R(l):l;var c=M(t);return c.host?B(c.host,e):B(t,M(e).host)}function q(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===e?"scrollTop":"scrollLeft",i=t.nodeName;if("BODY"===i||"HTML"===i){var o=t.ownerDocument.documentElement,r=t.ownerDocument.scrollingElement||o;return r[n]}return t[n]}function H(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=q(e,"top"),o=q(e,"left"),r=n?-1:1;return t.top+=i*r,t.bottom+=i*r,t.left+=o*r,t.right+=o*r,t}function Q(t,e){var n="x"===e?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"],10)+parseFloat(t["border"+i+"Width"],10)}function W(t,e,n,i){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],F(10)?parseInt(n["offset"+t])+parseInt(i["margin"+("Height"===t?"Top":"Left")])+parseInt(i["margin"+("Height"===t?"Bottom":"Right")]):0)}function U(t){var e=t.body,n=t.documentElement,i=F(10)&&getComputedStyle(n);return{height:W("Height",e,n,i),width:W("Width",e,n,i)}}var V=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Y=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),z=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},X=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function K(t){return X({},t,{right:t.left+t.width,bottom:t.top+t.height})}function G(t){var e={};try{if(F(10)){e=t.getBoundingClientRect();var n=q(t,"top"),i=q(t,"left");e.top+=n,e.left+=i,e.bottom+=n,e.right+=i}else e=t.getBoundingClientRect()}catch(t){}var o={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},r="HTML"===t.nodeName?U(t.ownerDocument):{},s=r.width||t.clientWidth||o.width,a=r.height||t.clientHeight||o.height,l=t.offsetWidth-s,c=t.offsetHeight-a;if(l||c){var u=A(t);l-=Q(u,"x"),c-=Q(u,"y"),o.width-=l,o.height-=c}return K(o)}function $(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=F(10),o="HTML"===e.nodeName,r=G(t),s=G(e),a=x(t),l=A(e),c=parseFloat(l.borderTopWidth,10),u=parseFloat(l.borderLeftWidth,10);n&&o&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var h=K({top:r.top-s.top-c,left:r.left-s.left-u,width:r.width,height:r.height});if(h.marginTop=0,h.marginLeft=0,!i&&o){var f=parseFloat(l.marginTop,10),d=parseFloat(l.marginLeft,10);h.top-=c-f,h.bottom-=c-f,h.left-=u-d,h.right-=u-d,h.marginTop=f,h.marginLeft=d}return(i&&!n?e.contains(a):e===a&&"BODY"!==a.nodeName)&&(h=H(h,e)),h}function J(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,i=$(t,n),o=Math.max(n.clientWidth,window.innerWidth||0),r=Math.max(n.clientHeight,window.innerHeight||0),s=e?0:q(n),a=e?0:q(n,"left"),l={top:s-i.top+i.marginTop,left:a-i.left+i.marginLeft,width:o,height:r};return K(l)}function Z(t){var e=t.nodeName;if("BODY"===e||"HTML"===e)return!1;if("fixed"===A(t,"position"))return!0;var n=I(t);return!!n&&Z(n)}function tt(t){if(!t||!t.parentElement||F())return document.documentElement;for(var e=t.parentElement;e&&"none"===A(e,"transform");)e=e.parentElement;return e||document.documentElement}function et(t,e,n,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r={top:0,left:0},s=o?tt(t):B(t,j(e));if("viewport"===i)r=J(s,o);else{var a=void 0;"scrollParent"===i?"BODY"===(a=x(I(e))).nodeName&&(a=t.ownerDocument.documentElement):a="window"===i?t.ownerDocument.documentElement:i;var l=$(a,s,o);if("HTML"!==a.nodeName||Z(s))r=l;else{var c=U(t.ownerDocument),u=c.height,h=c.width;r.top+=l.top-l.marginTop,r.bottom=u+l.top,r.left+=l.left-l.marginLeft,r.right=h+l.left}}var f="number"==typeof(n=n||0);return r.left+=f?n:n.left||0,r.top+=f?n:n.top||0,r.right-=f?n:n.right||0,r.bottom-=f?n:n.bottom||0,r}function nt(t){return t.width*t.height}function it(t,e,n,i,o){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var s=et(n,i,r,o),a={top:{width:s.width,height:e.top-s.top},right:{width:s.right-e.right,height:s.height},bottom:{width:s.width,height:s.bottom-e.bottom},left:{width:e.left-s.left,height:s.height}},l=Object.keys(a).map((function(t){return X({key:t},a[t],{area:nt(a[t])})})).sort((function(t,e){return e.area-t.area})),c=l.filter((function(t){var e=t.width,i=t.height;return e>=n.clientWidth&&i>=n.clientHeight})),u=c.length>0?c[0].key:l[0].key,h=t.split("-")[1];return u+(h?"-"+h:"")}function ot(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=i?tt(e):B(e,j(n));return $(n,o,i)}function rt(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),i=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+i,height:t.offsetHeight+n}}function st(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function at(t,e,n){n=n.split("-")[0];var i=rt(t),o={width:i.width,height:i.height},r=-1!==["right","left"].indexOf(n),s=r?"top":"left",a=r?"left":"top",l=r?"height":"width",c=r?"width":"height";return o[s]=e[s]+e[l]/2-i[l]/2,o[a]=n===a?e[a]-i[c]:e[st(a)],o}function lt(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function ct(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===n}));var i=lt(t,(function(t){return t[e]===n}));return t.indexOf(i)}(t,"name",n))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&O(n)&&(e.offsets.popper=K(e.offsets.popper),e.offsets.reference=K(e.offsets.reference),e=n(e,t))})),e}function ut(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=ot(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=it(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=at(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=ct(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function ht(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))}function ft(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<e.length;i++){var o=e[i],r=o?""+o+n:t;if("undefined"!=typeof document.body.style[r])return r}return null}function dt(){return this.state.isDestroyed=!0,ht(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[ft("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function pt(t){var e=t.ownerDocument;return e?e.defaultView:window}function mt(t,e,n,i){n.updateBound=i,pt(t).addEventListener("resize",n.updateBound,{passive:!0});var o=x(t);return function t(e,n,i,o){var r="BODY"===e.nodeName,s=r?e.ownerDocument.defaultView:e;s.addEventListener(n,i,{passive:!0}),r||t(x(s.parentNode),n,i,o),o.push(s)}(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function gt(){this.state.eventsEnabled||(this.state=mt(this.reference,this.options,this.state,this.scheduleUpdate))}function vt(){var t,e;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(t=this.reference,e=this.state,pt(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach((function(t){t.removeEventListener("scroll",e.updateBound)})),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e))}function _t(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function bt(t,e){Object.keys(e).forEach((function(n){var i="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&_t(e[n])&&(i="px"),t.style[n]=e[n]+i}))}var yt=D&&/Firefox/i.test(navigator.userAgent);function wt(t,e,n){var i=lt(t,(function(t){return t.name===e})),o=!!i&&t.some((function(t){return t.name===n&&t.enabled&&t.order<i.order}));if(!o){var r="`"+e+"`",s="`"+n+"`";console.warn(s+" modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")}return o}var Et=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Tt=Et.slice(3);function Ct(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Tt.indexOf(t),i=Tt.slice(n+1).concat(Tt.slice(0,n));return e?i.reverse():i}var St="flip",Dt="clockwise",kt="counterclockwise";function Nt(t,e,n,i){var o=[0,0],r=-1!==["right","left"].indexOf(i),s=t.split(/(\+|\-)/).map((function(t){return t.trim()})),a=s.indexOf(lt(s,(function(t){return-1!==t.search(/,|\s/)})));s[a]&&-1===s[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==a?[s.slice(0,a).concat([s[a].split(l)[0]]),[s[a].split(l)[1]].concat(s.slice(a+1))]:[s];return(c=c.map((function(t,i){var o=(1===i?!r:r)?"height":"width",s=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,s=!0,t):s?(t[t.length-1]+=e,s=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,n,i){var o=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+o[1],s=o[2];if(!r)return t;if(0===s.indexOf("%")){var a=void 0;switch(s){case"%p":a=n;break;case"%":case"%r":default:a=i}return K(a)[e]/100*r}if("vh"===s||"vw"===s){return("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r}return r}(t,o,e,n)}))}))).forEach((function(t,e){t.forEach((function(n,i){_t(n)&&(o[e]+=n*("-"===t[i-1]?-1:1))}))})),o}var Ot={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],i=e.split("-")[1];if(i){var o=t.offsets,r=o.reference,s=o.popper,a=-1!==["bottom","top"].indexOf(n),l=a?"left":"top",c=a?"width":"height",u={start:z({},l,r[l]),end:z({},l,r[l]+r[c]-s[c])};t.offsets.popper=X({},s,u[i])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n=e.offset,i=t.placement,o=t.offsets,r=o.popper,s=o.reference,a=i.split("-")[0],l=void 0;return l=_t(+n)?[+n,0]:Nt(n,r,s,a),"left"===a?(r.top+=l[0],r.left-=l[1]):"right"===a?(r.top+=l[0],r.left+=l[1]):"top"===a?(r.left+=l[0],r.top-=l[1]):"bottom"===a&&(r.left+=l[0],r.top+=l[1]),t.popper=r,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||R(t.instance.popper);t.instance.reference===n&&(n=R(n));var i=ft("transform"),o=t.instance.popper.style,r=o.top,s=o.left,a=o[i];o.top="",o.left="",o[i]="";var l=et(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);o.top=r,o.left=s,o[i]=a,e.boundaries=l;var c=e.priority,u=t.offsets.popper,h={primary:function(t){var n=u[t];return u[t]<l[t]&&!e.escapeWithReference&&(n=Math.max(u[t],l[t])),z({},t,n)},secondary:function(t){var n="right"===t?"left":"top",i=u[n];return u[t]>l[t]&&!e.escapeWithReference&&(i=Math.min(u[n],l[t]-("right"===t?u.width:u.height))),z({},n,i)}};return c.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";u=X({},u,h[e](t))})),t.offsets.popper=u,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,i=e.reference,o=t.placement.split("-")[0],r=Math.floor,s=-1!==["top","bottom"].indexOf(o),a=s?"right":"bottom",l=s?"left":"top",c=s?"width":"height";return n[a]<r(i[l])&&(t.offsets.popper[l]=r(i[l])-n[c]),n[l]>r(i[a])&&(t.offsets.popper[l]=r(i[a])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!wt(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element;if("string"==typeof i){if(!(i=t.instance.popper.querySelector(i)))return t}else if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],r=t.offsets,s=r.popper,a=r.reference,l=-1!==["left","right"].indexOf(o),c=l?"height":"width",u=l?"Top":"Left",h=u.toLowerCase(),f=l?"left":"top",d=l?"bottom":"right",p=rt(i)[c];a[d]-p<s[h]&&(t.offsets.popper[h]-=s[h]-(a[d]-p)),a[h]+p>s[d]&&(t.offsets.popper[h]+=a[h]+p-s[d]),t.offsets.popper=K(t.offsets.popper);var m=a[h]+a[c]/2-p/2,g=A(t.instance.popper),v=parseFloat(g["margin"+u],10),_=parseFloat(g["border"+u+"Width"],10),b=m-t.offsets.popper[h]-v-_;return b=Math.max(Math.min(s[c]-p,b),0),t.arrowElement=i,t.offsets.arrow=(z(n={},h,Math.round(b)),z(n,f,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(ht(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=et(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),i=t.placement.split("-")[0],o=st(i),r=t.placement.split("-")[1]||"",s=[];switch(e.behavior){case St:s=[i,o];break;case Dt:s=Ct(i);break;case kt:s=Ct(i,!0);break;default:s=e.behavior}return s.forEach((function(a,l){if(i!==a||s.length===l+1)return t;i=t.placement.split("-")[0],o=st(i);var c=t.offsets.popper,u=t.offsets.reference,h=Math.floor,f="left"===i&&h(c.right)>h(u.left)||"right"===i&&h(c.left)<h(u.right)||"top"===i&&h(c.bottom)>h(u.top)||"bottom"===i&&h(c.top)<h(u.bottom),d=h(c.left)<h(n.left),p=h(c.right)>h(n.right),m=h(c.top)<h(n.top),g=h(c.bottom)>h(n.bottom),v="left"===i&&d||"right"===i&&p||"top"===i&&m||"bottom"===i&&g,_=-1!==["top","bottom"].indexOf(i),b=!!e.flipVariations&&(_&&"start"===r&&d||_&&"end"===r&&p||!_&&"start"===r&&m||!_&&"end"===r&&g),y=!!e.flipVariationsByContent&&(_&&"start"===r&&p||_&&"end"===r&&d||!_&&"start"===r&&g||!_&&"end"===r&&m),w=b||y;(f||v||w)&&(t.flipped=!0,(f||v)&&(i=s[l+1]),w&&(r=function(t){return"end"===t?"start":"start"===t?"end":t}(r)),t.placement=i+(r?"-"+r:""),t.offsets.popper=X({},t.offsets.popper,at(t.instance.popper,t.offsets.reference,t.placement)),t=ct(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,o=i.popper,r=i.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return o[s?"left":"top"]=r[n]-(a?o[s?"width":"height"]:0),t.placement=st(e),t.offsets.popper=K(o),t}},hide:{order:800,enabled:!0,fn:function(t){if(!wt(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=lt(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottom<n.top||e.left>n.right||e.top>n.bottom||e.right<n.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}},computeStyle:{order:850,enabled:!0,fn:function(t,e){var n=e.x,i=e.y,o=t.offsets.popper,r=lt(t.instance.modifiers,(function(t){return"applyStyle"===t.name})).gpuAcceleration;void 0!==r&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var s=void 0!==r?r:e.gpuAcceleration,a=R(t.instance.popper),l=G(a),c={position:o.position},u=function(t,e){var n=t.offsets,i=n.popper,o=n.reference,r=Math.round,s=Math.floor,a=function(t){return t},l=r(o.width),c=r(i.width),u=-1!==["left","right"].indexOf(t.placement),h=-1!==t.placement.indexOf("-"),f=e?u||h||l%2==c%2?r:s:a,d=e?r:a;return{left:f(l%2==1&&c%2==1&&!h&&e?i.left-1:i.left),top:d(i.top),bottom:d(i.bottom),right:f(i.right)}}(t,window.devicePixelRatio<2||!yt),h="bottom"===n?"top":"bottom",f="right"===i?"left":"right",d=ft("transform"),p=void 0,m=void 0;if(m="bottom"===h?"HTML"===a.nodeName?-a.clientHeight+u.bottom:-l.height+u.bottom:u.top,p="right"===f?"HTML"===a.nodeName?-a.clientWidth+u.right:-l.width+u.right:u.left,s&&d)c[d]="translate3d("+p+"px, "+m+"px, 0)",c[h]=0,c[f]=0,c.willChange="transform";else{var g="bottom"===h?-1:1,v="right"===f?-1:1;c[h]=m*g,c[f]=p*v,c.willChange=h+", "+f}var _={"x-placement":t.placement};return t.attributes=X({},_,t.attributes),t.styles=X({},c,t.styles),t.arrowStyles=X({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(t){var e,n;return bt(t.instance.popper,t.styles),e=t.instance.popper,n=t.attributes,Object.keys(n).forEach((function(t){!1!==n[t]?e.setAttribute(t,n[t]):e.removeAttribute(t)})),t.arrowElement&&Object.keys(t.arrowStyles).length&&bt(t.arrowElement,t.arrowStyles),t},onLoad:function(t,e,n,i,o){var r=ot(o,e,t,n.positionFixed),s=it(n.placement,r,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return e.setAttribute("x-placement",s),bt(e,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},At=function(){function t(e,n){var i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};V(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=N(this.update.bind(this)),this.options=X({},t.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(X({},t.Defaults.modifiers,o.modifiers)).forEach((function(e){i.options.modifiers[e]=X({},t.Defaults.modifiers[e]||{},o.modifiers?o.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return X({name:t},i.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&O(t.onLoad)&&t.onLoad(i.reference,i.popper,i.options,t,i.state)})),this.update();var r=this.options.eventsEnabled;r&&this.enableEventListeners(),this.state.eventsEnabled=r}return Y(t,[{key:"update",value:function(){return ut.call(this)}},{key:"destroy",value:function(){return dt.call(this)}},{key:"enableEventListeners",value:function(){return gt.call(this)}},{key:"disableEventListeners",value:function(){return vt.call(this)}}]),t}();At.Utils=("undefined"!=typeof window?window:global).PopperUtils,At.placements=Et,At.Defaults=Ot;var It="dropdown",xt=e.fn[It],jt=new RegExp("38|40|27"),Lt={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},Pt={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},Ft=function(){function t(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var n=t.prototype;return n.toggle=function(){if(!this._element.disabled&&!e(this._element).hasClass("disabled")){var n=e(this._menu).hasClass("show");t._clearMenus(),n||this.show(!0)}},n.show=function(n){if(void 0===n&&(n=!1),!(this._element.disabled||e(this._element).hasClass("disabled")||e(this._menu).hasClass("show"))){var i={relatedTarget:this._element},o=e.Event("show.bs.dropdown",i),r=t._getParentFromElement(this._element);if(e(r).trigger(o),!o.isDefaultPrevented()){if(!this._inNavbar&&n){if("undefined"==typeof At)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)");var s=this._element;"parent"===this._config.reference?s=r:l.isElement(this._config.reference)&&(s=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(s=this._config.reference[0])),"scrollParent"!==this._config.boundary&&e(r).addClass("position-static"),this._popper=new At(s,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===e(r).closest(".navbar-nav").length&&e(document.body).children().on("mouseover",null,e.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),e(this._menu).toggleClass("show"),e(r).toggleClass("show").trigger(e.Event("shown.bs.dropdown",i))}}},n.hide=function(){if(!this._element.disabled&&!e(this._element).hasClass("disabled")&&e(this._menu).hasClass("show")){var n={relatedTarget:this._element},i=e.Event("hide.bs.dropdown",n),o=t._getParentFromElement(this._element);e(o).trigger(i),i.isDefaultPrevented()||(this._popper&&this._popper.destroy(),e(this._menu).toggleClass("show"),e(o).toggleClass("show").trigger(e.Event("hidden.bs.dropdown",n)))}},n.dispose=function(){e.removeData(this._element,"bs.dropdown"),e(this._element).off(".bs.dropdown"),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},n.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},n._addEventListeners=function(){var t=this;e(this._element).on("click.bs.dropdown",(function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}))},n._getConfig=function(t){return t=s(s(s({},this.constructor.Default),e(this._element).data()),t),l.typeCheckConfig(It,t,this.constructor.DefaultType),t},n._getMenuElement=function(){if(!this._menu){var e=t._getParentFromElement(this._element);e&&(this._menu=e.querySelector(".dropdown-menu"))}return this._menu},n._getPlacement=function(){var t=e(this._element.parentNode),n="bottom-start";return t.hasClass("dropup")?n=e(this._menu).hasClass("dropdown-menu-right")?"top-end":"top-start":t.hasClass("dropright")?n="right-start":t.hasClass("dropleft")?n="left-start":e(this._menu).hasClass("dropdown-menu-right")&&(n="bottom-end"),n},n._detectNavbar=function(){return e(this._element).closest(".navbar").length>0},n._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=s(s({},e.offsets),t._config.offset(e.offsets,t._element)||{}),e}:e.offset=this._config.offset,e},n._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),s(s({},t),this._config.popperConfig)},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.dropdown");if(i||(i=new t(this,"object"==typeof n?n:null),e(this).data("bs.dropdown",i)),"string"==typeof n){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},t._clearMenus=function(n){if(!n||3!==n.which&&("keyup"!==n.type||9===n.which))for(var i=[].slice.call(document.querySelectorAll('[data-toggle="dropdown"]')),o=0,r=i.length;o<r;o++){var s=t._getParentFromElement(i[o]),a=e(i[o]).data("bs.dropdown"),l={relatedTarget:i[o]};if(n&&"click"===n.type&&(l.clickEvent=n),a){var c=a._menu;if(e(s).hasClass("show")&&!(n&&("click"===n.type&&/input|textarea/i.test(n.target.tagName)||"keyup"===n.type&&9===n.which)&&e.contains(s,n.target))){var u=e.Event("hide.bs.dropdown",l);e(s).trigger(u),u.isDefaultPrevented()||("ontouchstart"in document.documentElement&&e(document.body).children().off("mouseover",null,e.noop),i[o].setAttribute("aria-expanded","false"),a._popper&&a._popper.destroy(),e(c).removeClass("show"),e(s).removeClass("show").trigger(e.Event("hidden.bs.dropdown",l)))}}}},t._getParentFromElement=function(t){var e,n=l.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},t._dataApiKeydownHandler=function(n){if(!(/input|textarea/i.test(n.target.tagName)?32===n.which||27!==n.which&&(40!==n.which&&38!==n.which||e(n.target).closest(".dropdown-menu").length):!jt.test(n.which))&&!this.disabled&&!e(this).hasClass("disabled")){var i=t._getParentFromElement(this),o=e(i).hasClass("show");if(o||27!==n.which){if(n.preventDefault(),n.stopPropagation(),!o||o&&(27===n.which||32===n.which))return 27===n.which&&e(i.querySelector('[data-toggle="dropdown"]')).trigger("focus"),void e(this).trigger("click");var r=[].slice.call(i.querySelectorAll(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)")).filter((function(t){return e(t).is(":visible")}));if(0!==r.length){var s=r.indexOf(n.target);38===n.which&&s>0&&s--,40===n.which&&s<r.length-1&&s++,s<0&&(s=0),r[s].focus()}}}},i(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return Lt}},{key:"DefaultType",get:function(){return Pt}}]),t}();e(document).on("keydown.bs.dropdown.data-api",'[data-toggle="dropdown"]',Ft._dataApiKeydownHandler).on("keydown.bs.dropdown.data-api",".dropdown-menu",Ft._dataApiKeydownHandler).on("click.bs.dropdown.data-api keyup.bs.dropdown.data-api",Ft._clearMenus).on("click.bs.dropdown.data-api",'[data-toggle="dropdown"]',(function(t){t.preventDefault(),t.stopPropagation(),Ft._jQueryInterface.call(e(this),"toggle")})).on("click.bs.dropdown.data-api",".dropdown form",(function(t){t.stopPropagation()})),e.fn[It]=Ft._jQueryInterface,e.fn[It].Constructor=Ft,e.fn[It].noConflict=function(){return e.fn[It]=xt,Ft._jQueryInterface};var Rt=e.fn.modal,Mt={backdrop:!0,keyboard:!0,focus:!0,show:!0},Bt={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},qt=function(){function t(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(".modal-dialog"),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var n=t.prototype;return n.toggle=function(t){return this._isShown?this.hide():this.show(t)},n.show=function(t){var n=this;if(!this._isShown&&!this._isTransitioning){e(this._element).hasClass("fade")&&(this._isTransitioning=!0);var i=e.Event("show.bs.modal",{relatedTarget:t});e(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),e(this._element).on("click.dismiss.bs.modal",'[data-dismiss="modal"]',(function(t){return n.hide(t)})),e(this._dialog).on("mousedown.dismiss.bs.modal",(function(){e(n._element).one("mouseup.dismiss.bs.modal",(function(t){e(t.target).is(n._element)&&(n._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return n._showElement(t)})))}},n.hide=function(t){var n=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning){var i=e.Event("hide.bs.modal");if(e(this._element).trigger(i),this._isShown&&!i.isDefaultPrevented()){this._isShown=!1;var o=e(this._element).hasClass("fade");if(o&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),e(document).off("focusin.bs.modal"),e(this._element).removeClass("show"),e(this._element).off("click.dismiss.bs.modal"),e(this._dialog).off("mousedown.dismiss.bs.modal"),o){var r=l.getTransitionDurationFromElement(this._element);e(this._element).one(l.TRANSITION_END,(function(t){return n._hideModal(t)})).emulateTransitionEnd(r)}else this._hideModal()}}},n.dispose=function(){[window,this._element,this._dialog].forEach((function(t){return e(t).off(".bs.modal")})),e(document).off("focusin.bs.modal"),e.removeData(this._element,"bs.modal"),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},n.handleUpdate=function(){this._adjustDialog()},n._getConfig=function(t){return t=s(s({},Mt),t),l.typeCheckConfig("modal",t,Bt),t},n._triggerBackdropTransition=function(){var t=this;if("static"===this._config.backdrop){var n=e.Event("hidePrevented.bs.modal");if(e(this._element).trigger(n),n.defaultPrevented)return;this._element.classList.add("modal-static");var i=l.getTransitionDurationFromElement(this._element);e(this._element).one(l.TRANSITION_END,(function(){t._element.classList.remove("modal-static")})).emulateTransitionEnd(i),this._element.focus()}else this.hide()},n._showElement=function(t){var n=this,i=e(this._element).hasClass("fade"),o=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),e(this._dialog).hasClass("modal-dialog-scrollable")&&o?o.scrollTop=0:this._element.scrollTop=0,i&&l.reflow(this._element),e(this._element).addClass("show"),this._config.focus&&this._enforceFocus();var r=e.Event("shown.bs.modal",{relatedTarget:t}),s=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,e(n._element).trigger(r)};if(i){var a=l.getTransitionDurationFromElement(this._dialog);e(this._dialog).one(l.TRANSITION_END,s).emulateTransitionEnd(a)}else s()},n._enforceFocus=function(){var t=this;e(document).off("focusin.bs.modal").on("focusin.bs.modal",(function(n){document!==n.target&&t._element!==n.target&&0===e(t._element).has(n.target).length&&t._element.focus()}))},n._setEscapeEvent=function(){var t=this;this._isShown?e(this._element).on("keydown.dismiss.bs.modal",(function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()})):this._isShown||e(this._element).off("keydown.dismiss.bs.modal")},n._setResizeEvent=function(){var t=this;this._isShown?e(window).on("resize.bs.modal",(function(e){return t.handleUpdate(e)})):e(window).off("resize.bs.modal")},n._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._isTransitioning=!1,this._showBackdrop((function(){e(document.body).removeClass("modal-open"),t._resetAdjustments(),t._resetScrollbar(),e(t._element).trigger("hidden.bs.modal")}))},n._removeBackdrop=function(){this._backdrop&&(e(this._backdrop).remove(),this._backdrop=null)},n._showBackdrop=function(t){var n=this,i=e(this._element).hasClass("fade")?"fade":"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",i&&this._backdrop.classList.add(i),e(this._backdrop).appendTo(document.body),e(this._element).on("click.dismiss.bs.modal",(function(t){n._ignoreBackdropClick?n._ignoreBackdropClick=!1:t.target===t.currentTarget&&n._triggerBackdropTransition()})),i&&l.reflow(this._backdrop),e(this._backdrop).addClass("show"),!t)return;if(!i)return void t();var o=l.getTransitionDurationFromElement(this._backdrop);e(this._backdrop).one(l.TRANSITION_END,t).emulateTransitionEnd(o)}else if(!this._isShown&&this._backdrop){e(this._backdrop).removeClass("show");var r=function(){n._removeBackdrop(),t&&t()};if(e(this._element).hasClass("fade")){var s=l.getTransitionDurationFromElement(this._backdrop);e(this._backdrop).one(l.TRANSITION_END,r).emulateTransitionEnd(s)}else r()}else t&&t()},n._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},n._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},n._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){var n=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")),i=[].slice.call(document.querySelectorAll(".sticky-top"));e(n).each((function(n,i){var o=i.style.paddingRight,r=e(i).css("padding-right");e(i).data("padding-right",o).css("padding-right",parseFloat(r)+t._scrollbarWidth+"px")})),e(i).each((function(n,i){var o=i.style.marginRight,r=e(i).css("margin-right");e(i).data("margin-right",o).css("margin-right",parseFloat(r)-t._scrollbarWidth+"px")}));var o=document.body.style.paddingRight,r=e(document.body).css("padding-right");e(document.body).data("padding-right",o).css("padding-right",parseFloat(r)+this._scrollbarWidth+"px")}e(document.body).addClass("modal-open")},n._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top"));e(t).each((function(t,n){var i=e(n).data("padding-right");e(n).removeData("padding-right"),n.style.paddingRight=i||""}));var n=[].slice.call(document.querySelectorAll(".sticky-top"));e(n).each((function(t,n){var i=e(n).data("margin-right");"undefined"!=typeof i&&e(n).css("margin-right",i).removeData("margin-right")}));var i=e(document.body).data("padding-right");e(document.body).removeData("padding-right"),document.body.style.paddingRight=i||""},n._getScrollbarWidth=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},t._jQueryInterface=function(n,i){return this.each((function(){var o=e(this).data("bs.modal"),r=s(s(s({},Mt),e(this).data()),"object"==typeof n&&n?n:{});if(o||(o=new t(this,r),e(this).data("bs.modal",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n](i)}else r.show&&o.show(i)}))},i(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return Mt}}]),t}();e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(t){var n,i=this,o=l.getSelectorFromElement(this);o&&(n=document.querySelector(o));var r=e(n).data("bs.modal")?"toggle":s(s({},e(n).data()),e(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var a=e(n).one("show.bs.modal",(function(t){t.isDefaultPrevented()||a.one("hidden.bs.modal",(function(){e(i).is(":visible")&&i.focus()}))}));qt._jQueryInterface.call(e(n),r,this)})),e.fn.modal=qt._jQueryInterface,e.fn.modal.Constructor=qt,e.fn.modal.noConflict=function(){return e.fn.modal=Rt,qt._jQueryInterface};var Ht=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],Qt={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Wt=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,Ut=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;function Vt(t,e,n){if(0===t.length)return t;if(n&&"function"==typeof n)return n(t);for(var i=(new window.DOMParser).parseFromString(t,"text/html"),o=Object.keys(e),r=[].slice.call(i.body.querySelectorAll("*")),s=function(t,n){var i=r[t],s=i.nodeName.toLowerCase();if(-1===o.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";var a=[].slice.call(i.attributes),l=[].concat(e["*"]||[],e[s]||[]);a.forEach((function(t){(function(t,e){var n=t.nodeName.toLowerCase();if(-1!==e.indexOf(n))return-1===Ht.indexOf(n)||Boolean(t.nodeValue.match(Wt)||t.nodeValue.match(Ut));for(var i=e.filter((function(t){return t instanceof RegExp})),o=0,r=i.length;o<r;o++)if(n.match(i[o]))return!0;return!1})(t,l)||i.removeAttribute(t.nodeName)}))},a=0,l=r.length;a<l;a++)s(a);return i.body.innerHTML}var Yt="tooltip",zt=e.fn[Yt],Xt=new RegExp("(^|\\s)bs-tooltip\\S+","g"),Kt=["sanitize","whiteList","sanitizeFn"],Gt={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},$t={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},Jt={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:Qt,popperConfig:null},Zt={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},te=function(){function t(t,e){if("undefined"==typeof At)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var n=t.prototype;return n.enable=function(){this._isEnabled=!0},n.disable=function(){this._isEnabled=!1},n.toggleEnabled=function(){this._isEnabled=!this._isEnabled},n.toggle=function(t){if(this._isEnabled)if(t){var n=this.constructor.DATA_KEY,i=e(t.currentTarget).data(n);i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(e(this.getTipElement()).hasClass("show"))return void this._leave(null,this);this._enter(null,this)}},n.dispose=function(){clearTimeout(this._timeout),e.removeData(this.element,this.constructor.DATA_KEY),e(this.element).off(this.constructor.EVENT_KEY),e(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&e(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},n.show=function(){var t=this;if("none"===e(this.element).css("display"))throw new Error("Please use show on visible elements");var n=e.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){e(this.element).trigger(n);var i=l.findShadowRoot(this.element),o=e.contains(null!==i?i:this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!o)return;var r=this.getTipElement(),s=l.getUID(this.constructor.NAME);r.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&e(r).addClass("fade");var a="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,c=this._getAttachment(a);this.addAttachmentClass(c);var u=this._getContainer();e(r).data(this.constructor.DATA_KEY,this),e.contains(this.element.ownerDocument.documentElement,this.tip)||e(r).appendTo(u),e(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new At(this.element,r,this._getPopperConfig(c)),e(r).addClass("show"),"ontouchstart"in document.documentElement&&e(document.body).children().on("mouseover",null,e.noop);var h=function(){t.config.animation&&t._fixTransition();var n=t._hoverState;t._hoverState=null,e(t.element).trigger(t.constructor.Event.SHOWN),"out"===n&&t._leave(null,t)};if(e(this.tip).hasClass("fade")){var f=l.getTransitionDurationFromElement(this.tip);e(this.tip).one(l.TRANSITION_END,h).emulateTransitionEnd(f)}else h()}},n.hide=function(t){var n=this,i=this.getTipElement(),o=e.Event(this.constructor.Event.HIDE),r=function(){"show"!==n._hoverState&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),e(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),t&&t()};if(e(this.element).trigger(o),!o.isDefaultPrevented()){if(e(i).removeClass("show"),"ontouchstart"in document.documentElement&&e(document.body).children().off("mouseover",null,e.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,e(this.tip).hasClass("fade")){var s=l.getTransitionDurationFromElement(i);e(i).one(l.TRANSITION_END,r).emulateTransitionEnd(s)}else r();this._hoverState=""}},n.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},n.isWithContent=function(){return Boolean(this.getTitle())},n.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-tooltip-"+t)},n.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},n.setContent=function(){var t=this.getTipElement();this.setElementContent(e(t.querySelectorAll(".tooltip-inner")),this.getTitle()),e(t).removeClass("fade show")},n.setElementContent=function(t,n){"object"!=typeof n||!n.nodeType&&!n.jquery?this.config.html?(this.config.sanitize&&(n=Vt(n,this.config.whiteList,this.config.sanitizeFn)),t.html(n)):t.text(n):this.config.html?e(n).parent().is(t)||t.empty().append(n):t.text(e(n).text())},n.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},n._getPopperConfig=function(t){var e=this;return s(s({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}}),this.config.popperConfig)},n._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=s(s({},e.offsets),t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},n._getContainer=function(){return!1===this.config.container?document.body:l.isElement(this.config.container)?e(this.config.container):e(document).find(this.config.container)},n._getAttachment=function(t){return $t[t.toUpperCase()]},n._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(n){if("click"===n)e(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==n){var i="hover"===n?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,o="hover"===n?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;e(t.element).on(i,t.config.selector,(function(e){return t._enter(e)})).on(o,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},e(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=s(s({},this.config),{},{trigger:"manual",selector:""}):this._fixTitle()},n._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},n._enter=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),e(n.getTipElement()).hasClass("show")||"show"===n._hoverState?n._hoverState="show":(clearTimeout(n._timeout),n._hoverState="show",n.config.delay&&n.config.delay.show?n._timeout=setTimeout((function(){"show"===n._hoverState&&n.show()}),n.config.delay.show):n.show())},n._leave=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState="out",n.config.delay&&n.config.delay.hide?n._timeout=setTimeout((function(){"out"===n._hoverState&&n.hide()}),n.config.delay.hide):n.hide())},n._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},n._getConfig=function(t){var n=e(this.element).data();return Object.keys(n).forEach((function(t){-1!==Kt.indexOf(t)&&delete n[t]})),"number"==typeof(t=s(s(s({},this.constructor.Default),n),"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),l.typeCheckConfig(Yt,t,this.constructor.DefaultType),t.sanitize&&(t.template=Vt(t.template,t.whiteList,t.sanitizeFn)),t},n._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},n._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(Xt);null!==n&&n.length&&t.removeClass(n.join(""))},n._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},n._fixTransition=function(){var t=this.getTipElement(),n=this.config.animation;null===t.getAttribute("x-placement")&&(e(t).removeClass("fade"),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.tooltip"),o="object"==typeof n&&n;if((i||!/dispose|hide/.test(n))&&(i||(i=new t(this,o),e(this).data("bs.tooltip",i)),"string"==typeof n)){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},i(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return Jt}},{key:"NAME",get:function(){return Yt}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return Zt}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return Gt}}]),t}();e.fn[Yt]=te._jQueryInterface,e.fn[Yt].Constructor=te,e.fn[Yt].noConflict=function(){return e.fn[Yt]=zt,te._jQueryInterface};var ee="popover",ne=e.fn[ee],ie=new RegExp("(^|\\s)bs-popover\\S+","g"),oe=s(s({},te.Default),{},{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),re=s(s({},te.DefaultType),{},{content:"(string|element|function)"}),se={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},ae=function(t){var n,o;function r(){return t.apply(this,arguments)||this}o=t,(n=r).prototype=Object.create(o.prototype),n.prototype.constructor=n,n.__proto__=o;var s=r.prototype;return s.isWithContent=function(){return this.getTitle()||this._getContent()},s.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-popover-"+t)},s.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},s.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(t.find(".popover-body"),n),t.removeClass("fade show")},s._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},s._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(ie);null!==n&&n.length>0&&t.removeClass(n.join(""))},r._jQueryInterface=function(t){return this.each((function(){var n=e(this).data("bs.popover"),i="object"==typeof t?t:null;if((n||!/dispose|hide/.test(t))&&(n||(n=new r(this,i),e(this).data("bs.popover",n)),"string"==typeof t)){if("undefined"==typeof n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},i(r,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return oe}},{key:"NAME",get:function(){return ee}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return se}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return re}}]),r}(te);e.fn[ee]=ae._jQueryInterface,e.fn[ee].Constructor=ae,e.fn[ee].noConflict=function(){return e.fn[ee]=ne,ae._jQueryInterface};var le="scrollspy",ce=e.fn[le],ue={offset:10,method:"auto",target:""},he={offset:"number",method:"string",target:"(string|element)"},fe=function(){function t(t,n){var i=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(n),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,e(this._scrollElement).on("scroll.bs.scrollspy",(function(t){return i._process(t)})),this.refresh(),this._process()}var n=t.prototype;return n.refresh=function(){var t=this,n=this._scrollElement===this._scrollElement.window?"offset":"position",i="auto"===this._config.method?n:this._config.method,o="position"===i?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var n,r=l.getSelectorFromElement(t);if(r&&(n=document.querySelector(r)),n){var s=n.getBoundingClientRect();if(s.width||s.height)return[e(n)[i]().top+o,r]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},n.dispose=function(){e.removeData(this._element,"bs.scrollspy"),e(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},n._getConfig=function(t){if("string"!=typeof(t=s(s({},ue),"object"==typeof t&&t?t:{})).target&&l.isElement(t.target)){var n=e(t.target).attr("id");n||(n=l.getUID(le),e(t.target).attr("id",n)),t.target="#"+n}return l.typeCheckConfig(le,t,he),t},n._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},n._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},n._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},n._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}}},n._activate=function(t){this._activeTarget=t,this._clear();var n=this._selector.split(",").map((function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'})),i=e([].slice.call(document.querySelectorAll(n.join(","))));i.hasClass("dropdown-item")?(i.closest(".dropdown").find(".dropdown-toggle").addClass("active"),i.addClass("active")):(i.addClass("active"),i.parents(".nav, .list-group").prev(".nav-link, .list-group-item").addClass("active"),i.parents(".nav, .list-group").prev(".nav-item").children(".nav-link").addClass("active")),e(this._scrollElement).trigger("activate.bs.scrollspy",{relatedTarget:t})},n._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter((function(t){return t.classList.contains("active")})).forEach((function(t){return t.classList.remove("active")}))},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.scrollspy");if(i||(i=new t(this,"object"==typeof n&&n),e(this).data("bs.scrollspy",i)),"string"==typeof n){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},i(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return ue}}]),t}();e(window).on("load.bs.scrollspy.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-spy="scroll"]')),n=t.length;n--;){var i=e(t[n]);fe._jQueryInterface.call(i,i.data())}})),e.fn[le]=fe._jQueryInterface,e.fn[le].Constructor=fe,e.fn[le].noConflict=function(){return e.fn[le]=ce,fe._jQueryInterface};var de=e.fn.tab,pe=function(){function t(t){this._element=t}var n=t.prototype;return n.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&e(this._element).hasClass("active")||e(this._element).hasClass("disabled"))){var n,i,o=e(this._element).closest(".nav, .list-group")[0],r=l.getSelectorFromElement(this._element);if(o){var s="UL"===o.nodeName||"OL"===o.nodeName?"> li > .active":".active";i=(i=e.makeArray(e(o).find(s)))[i.length-1]}var a=e.Event("hide.bs.tab",{relatedTarget:this._element}),c=e.Event("show.bs.tab",{relatedTarget:i});if(i&&e(i).trigger(a),e(this._element).trigger(c),!c.isDefaultPrevented()&&!a.isDefaultPrevented()){r&&(n=document.querySelector(r)),this._activate(this._element,o);var u=function(){var n=e.Event("hidden.bs.tab",{relatedTarget:t._element}),o=e.Event("shown.bs.tab",{relatedTarget:i});e(i).trigger(n),e(t._element).trigger(o)};n?this._activate(n,n.parentNode,u):u()}}},n.dispose=function(){e.removeData(this._element,"bs.tab"),this._element=null},n._activate=function(t,n,i){var o=this,r=(!n||"UL"!==n.nodeName&&"OL"!==n.nodeName?e(n).children(".active"):e(n).find("> li > .active"))[0],s=i&&r&&e(r).hasClass("fade"),a=function(){return o._transitionComplete(t,r,i)};if(r&&s){var c=l.getTransitionDurationFromElement(r);e(r).removeClass("show").one(l.TRANSITION_END,a).emulateTransitionEnd(c)}else a()},n._transitionComplete=function(t,n,i){if(n){e(n).removeClass("active");var o=e(n.parentNode).find("> .dropdown-menu .active")[0];o&&e(o).removeClass("active"),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(e(t).addClass("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),l.reflow(t),t.classList.contains("fade")&&t.classList.add("show"),t.parentNode&&e(t.parentNode).hasClass("dropdown-menu")){var r=e(t).closest(".dropdown")[0];if(r){var s=[].slice.call(r.querySelectorAll(".dropdown-toggle"));e(s).addClass("active")}t.setAttribute("aria-expanded",!0)}i&&i()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.tab");if(o||(o=new t(this),i.data("bs.tab",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n]()}}))},i(t,null,[{key:"VERSION",get:function(){return"4.5.0"}}]),t}();e(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),pe._jQueryInterface.call(e(this),"show")})),e.fn.tab=pe._jQueryInterface,e.fn.tab.Constructor=pe,e.fn.tab.noConflict=function(){return e.fn.tab=de,pe._jQueryInterface};var me=e.fn.toast,ge={animation:"boolean",autohide:"boolean",delay:"number"},ve={animation:!0,autohide:!0,delay:500},_e=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var n=t.prototype;return n.show=function(){var t=this,n=e.Event("show.bs.toast");if(e(this._element).trigger(n),!n.isDefaultPrevented()){this._config.animation&&this._element.classList.add("fade");var i=function(){t._element.classList.remove("showing"),t._element.classList.add("show"),e(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove("hide"),l.reflow(this._element),this._element.classList.add("showing"),this._config.animation){var o=l.getTransitionDurationFromElement(this._element);e(this._element).one(l.TRANSITION_END,i).emulateTransitionEnd(o)}else i()}},n.hide=function(){if(this._element.classList.contains("show")){var t=e.Event("hide.bs.toast");e(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},n.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains("show")&&this._element.classList.remove("show"),e(this._element).off("click.dismiss.bs.toast"),e.removeData(this._element,"bs.toast"),this._element=null,this._config=null},n._getConfig=function(t){return t=s(s(s({},ve),e(this._element).data()),"object"==typeof t&&t?t:{}),l.typeCheckConfig("toast",t,this.constructor.DefaultType),t},n._setListeners=function(){var t=this;e(this._element).on("click.dismiss.bs.toast",'[data-dismiss="toast"]',(function(){return t.hide()}))},n._close=function(){var t=this,n=function(){t._element.classList.add("hide"),e(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var i=l.getTransitionDurationFromElement(this._element);e(this._element).one(l.TRANSITION_END,n).emulateTransitionEnd(i)}else n()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.toast");if(o||(o=new t(this,"object"==typeof n&&n),i.data("bs.toast",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n](this)}}))},i(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"DefaultType",get:function(){return ge}},{key:"Default",get:function(){return ve}}]),t}();e.fn.toast=_e._jQueryInterface,e.fn.toast.Constructor=_e,e.fn.toast.noConflict=function(){return e.fn.toast=me,_e._jQueryInterface},t.Alert=h,t.Button=d,t.Carousel=y,t.Collapse=S,t.Dropdown=Ft,t.Modal=qt,t.Popover=ae,t.Scrollspy=fe,t.Tab=pe,t.Toast=_e,t.Tooltip=te,t.Util=l,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=bootstrap.bundle.min.js.map

/*! http://responsiveslides.com v1.55 by @viljamis */
(function(c,K,C){c.fn.responsiveSlides=function(m){var a=c.extend({auto:!0,speed:500,timeout:4E3,pager:!1,nav:!1,random:!1,pause:!1,pauseControls:!0,prevText:"Previous",nextText:"Next",maxwidth:"",navContainer:"",manualControls:"",namespace:"rslides",before:c.noop,after:c.noop},m);return this.each(function(){C++;var f=c(this),u,t,v,n,q,r,p=0,e=f.children(),D=e.length,h=parseFloat(a.speed),E=parseFloat(a.timeout),w=parseFloat(a.maxwidth),g=a.namespace,d=g+C,F=g+"_nav "+d+"_nav",x=g+"_here",k=d+"_on",
y=d+"_s",l=c("<ul class='"+g+"_tabs "+d+"_tabs' />"),z={"float":"left",position:"relative",opacity:1,zIndex:2},A={"float":"none",position:"absolute",opacity:0,zIndex:1},G=function(){var b=(document.body||document.documentElement).style,a="transition";if("string"===typeof b[a])return!0;u=["Moz","Webkit","Khtml","O","ms"];var a=a.charAt(0).toUpperCase()+a.substr(1),c;for(c=0;c<u.length;c++)if("string"===typeof b[u[c]+a])return!0;return!1}(),B=function(b){a.before(b);G?(e.removeClass(k).css(A).eq(b).addClass(k).css(z),
p=b,setTimeout(function(){a.after(b)},h)):e.stop().fadeOut(h,function(){c(this).removeClass(k).css(A).css("opacity",1)}).eq(b).fadeIn(h,function(){c(this).addClass(k).css(z);a.after(b);p=b})};a.random&&(e.sort(function(){return Math.round(Math.random())-.5}),f.empty().append(e));e.each(function(a){this.id=y+a});f.addClass(g+" "+d);m&&m.maxwidth&&f.css("max-width",w);e.hide().css(A).eq(0).addClass(k).css(z).show();G&&e.show().css({"-webkit-transition":"opacity "+h+"ms ease-in-out","-moz-transition":"opacity "+
h+"ms ease-in-out","-o-transition":"opacity "+h+"ms ease-in-out",transition:"opacity "+h+"ms ease-in-out"});if(1<e.length){if(E<h+100)return;if(a.pager&&!a.manualControls){var H=[];e.each(function(a){a+=1;H+="<li><a href='#' class='"+y+a+"'>"+a+"</a></li>"});l.append(H);m.navContainer?c(a.navContainer).append(l):f.after(l)}a.manualControls&&(l=c(a.manualControls),l.addClass(g+"_tabs "+d+"_tabs"));(a.pager||a.manualControls)&&l.find("li").each(function(a){c(this).addClass(y+(a+1))});if(a.pager||a.manualControls)r=
l.find("a"),t=function(a){r.closest("li").removeClass(x).eq(a).addClass(x)};a.auto&&(v=function(){q=setInterval(function(){e.stop(!0,!0);var b=p+1<D?p+1:0;(a.pager||a.manualControls)&&t(b);B(b)},E)},v());n=function(){a.auto&&(clearInterval(q),v())};a.pause&&f.hover(function(){clearInterval(q)},function(){n()});if(a.pager||a.manualControls)r.bind("click",function(b){b.preventDefault();a.pauseControls||n();b=r.index(this);p===b||c("."+k).queue("fx").length||(t(b),B(b))}).eq(0).closest("li").addClass(x),
a.pauseControls&&r.hover(function(){clearInterval(q)},function(){n()});if(a.nav){g="<a href='#' class='"+F+" prev'>"+a.prevText+"</a><a href='#' class='"+F+" next'>"+a.nextText+"</a>";m.navContainer?c(a.navContainer).append(g):f.after(g);var d=c("."+d+"_nav"),I=d.filter(".prev");d.bind("click",function(b){b.preventDefault();b=c("."+k);if(!b.queue("fx").length){var d=e.index(b);b=d-1;d=d+1<D?p+1:0;B(c(this)[0]===I[0]?b:d);(a.pager||a.manualControls)&&t(c(this)[0]===I[0]?b:d);a.pauseControls||n()}});
a.pauseControls&&d.hover(function(){clearInterval(q)},function(){n()})}}if("undefined"===typeof document.body.style.maxWidth&&m.maxwidth){var J=function(){f.css("width","100%");f.width()>w&&f.css("width",w)};J();c(K).bind("resize",function(){J()})}})}})(jQuery,this,0);

(function(root,factory){if(typeof define==="function"&&define.amd){define(["jquery"],function(jQuery){return root.Tablesaw=factory(jQuery,root)})}else if(typeof exports==="object"){if("document"in root){module.exports=factory(require("jquery"),root)}else{module.exports=factory(require("jquery")(root),root)}}else{root.Tablesaw=factory(jQuery,root)}})(typeof window!=="undefined"?window:this,function($,window){"use strict";var document=window.document;var domContentLoadedTriggered=/complete|loaded/.test(document.readyState);document.addEventListener("DOMContentLoaded",function(){domContentLoadedTriggered=true});var Tablesaw={i18n:{modeStack:"Stack",modeSwipe:"Swipe",modeToggle:"Toggle",modeSwitchColumnsAbbreviated:"Cols",modeSwitchColumns:"Columns",columnToggleButton:"Columns",columnToggleError:"No eligible columns.",sort:"Sort",swipePreviousColumn:"Previous column",swipeNextColumn:"Next column"},mustard:"head"in document&&(!window.blackberry||window.WebKitPoint)&&!window.operamini,$:$,_init:function(element){Tablesaw.$(element||document).trigger("enhance.tablesaw")},init:function(element){domContentLoadedTriggered=domContentLoadedTriggered||/complete|loaded/.test(document.readyState);if(!domContentLoadedTriggered){if("addEventListener"in document){document.addEventListener("DOMContentLoaded",function(){Tablesaw._init(element)})}}else{Tablesaw._init(element)}}};$(document).on("enhance.tablesaw",function(){if(typeof TablesawConfig!=="undefined"&&TablesawConfig.i18n){Tablesaw.i18n=$.extend(Tablesaw.i18n,TablesawConfig.i18n||{})}Tablesaw.i18n.modes=[Tablesaw.i18n.modeStack,Tablesaw.i18n.modeSwipe,Tablesaw.i18n.modeToggle]});if(Tablesaw.mustard){$(document.documentElement).addClass("tablesaw-enhanced")}(function(){var pluginName="tablesaw";var classes={toolbar:"tablesaw-bar"};var events={create:"tablesawcreate",destroy:"tablesawdestroy",refresh:"tablesawrefresh",resize:"tablesawresize"};var defaultMode="stack";var initSelector="table";var initFilterSelector="[data-tablesaw],[data-tablesaw-mode],[data-tablesaw-sortable]";var defaultConfig={};Tablesaw.events=events;var Table=function(element){if(!element){throw new Error("Tablesaw requires an element.")}this.table=element;this.$table=$(element);this.$thead=this.$table.children().filter("thead").eq(0);this.$tbody=this.$table.children().filter("tbody");this.mode=this.$table.attr("data-tablesaw-mode")||defaultMode;this.$toolbar=null;this.attributes={subrow:"data-tablesaw-subrow",ignorerow:"data-tablesaw-ignorerow"};this.init()};Table.prototype.init=function(){if(!this.$thead.length){throw new Error("tablesaw: a <thead> is required, but none was found.")}if(!this.$thead.find("th").length){throw new Error("tablesaw: no header cells found. Are you using <th> inside of <thead>?")}if(!this.$table.attr("id")){this.$table.attr("id",pluginName+"-"+Math.round(Math.random()*1e4))}this.createToolbar();this._initCells();this.$table.data(pluginName,this);this.$table.trigger(events.create,[this])};Table.prototype.getConfig=function(pluginSpecificConfig){var configs=$.extend(defaultConfig,pluginSpecificConfig||{});return $.extend(configs,typeof TablesawConfig!=="undefined"?TablesawConfig:{})};Table.prototype._getPrimaryHeaderRow=function(){return this._getHeaderRows().eq(0)};Table.prototype._getHeaderRows=function(){return this.$thead.children().filter("tr").filter(function(){return!$(this).is("[data-tablesaw-ignorerow]")})};Table.prototype._getRowIndex=function($row){return $row.prevAll().length};Table.prototype._getHeaderRowIndeces=function(){var self=this;var indeces=[];this._getHeaderRows().each(function(){indeces.push(self._getRowIndex($(this)))});return indeces};Table.prototype._getPrimaryHeaderCells=function($row){return($row||this._getPrimaryHeaderRow()).find("th")};Table.prototype._$getCells=function(th){var self=this;return $(th).add(th.cells).filter(function(){var $t=$(this);var $row=$t.parent();var hasColspan=$t.is("[colspan]");return!$row.is("["+self.attributes.subrow+"]")&&(!$row.is("["+self.attributes.ignorerow+"]")||!hasColspan)})};Table.prototype._getVisibleColspan=function(){var colspan=0;this._getPrimaryHeaderCells().each(function(){var $t=$(this);if($t.css("display")!=="none"){colspan+=parseInt($t.attr("colspan"),10)||1}});return colspan};Table.prototype.getColspanForCell=function($cell){var visibleColspan=this._getVisibleColspan();var visibleSiblingColumns=0;if($cell.closest("tr").data("tablesaw-rowspanned")){visibleSiblingColumns++}$cell.siblings().each(function(){var $t=$(this);var colColspan=parseInt($t.attr("colspan"),10)||1;if($t.css("display")!=="none"){visibleSiblingColumns+=colColspan}});return visibleColspan-visibleSiblingColumns};Table.prototype.isCellInColumn=function(header,cell){return $(header).add(header.cells).filter(function(){return this===cell}).length};Table.prototype.updateColspanCells=function(cls,header,userAction){var self=this;var primaryHeaderRow=self._getPrimaryHeaderRow();this.$table.find("[rowspan][data-tablesaw-priority]").each(function(){var $t=$(this);if($t.attr("data-tablesaw-priority")!=="persist"){return}var $row=$t.closest("tr");var rowspan=parseInt($t.attr("rowspan"),10);if(rowspan>1){$row=$row.next();$row.data("tablesaw-rowspanned",true);rowspan--}});this.$table.find("[colspan],[data-tablesaw-maxcolspan]").filter(function(){return $(this).closest("tr")[0]!==primaryHeaderRow[0]}).each(function(){var $cell=$(this);if(userAction===undefined||self.isCellInColumn(header,this)){}else{return}var colspan=self.getColspanForCell($cell);if(cls&&userAction!==undefined){$cell[colspan===0?"addClass":"removeClass"](cls)}var maxColspan=parseInt($cell.attr("data-tablesaw-maxcolspan"),10);if(!maxColspan){$cell.attr("data-tablesaw-maxcolspan",$cell.attr("colspan"))}else if(colspan>maxColspan){colspan=maxColspan}$cell.attr("colspan",colspan)})};Table.prototype._findPrimaryHeadersForCell=function(cell){var $headerRow=this._getPrimaryHeaderRow();var headerRowIndex=this._getRowIndex($headerRow);var results=[];for(var rowNumber=0;rowNumber<this.headerMapping.length;rowNumber++){if(rowNumber===headerRowIndex){continue}for(var colNumber=0;colNumber<this.headerMapping[rowNumber].length;colNumber++){if(this.headerMapping[rowNumber][colNumber]===cell){results.push(this.headerMapping[headerRowIndex][colNumber])}}}return results};Table.prototype.getRows=function(){var self=this;return this.$table.find("tr").filter(function(){return $(this).closest("table").is(self.$table)})};Table.prototype.getBodyRows=function(tbody){return(tbody?$(tbody):this.$tbody).children().filter("tr")};Table.prototype.getHeaderCellIndex=function(cell){var lookup=this.headerMapping[0];for(var colIndex=0;colIndex<lookup.length;colIndex++){if(lookup[colIndex]===cell){return colIndex}}return-1};Table.prototype._initCells=function(){this.$table.find("[data-tablesaw-maxcolspan]").each(function(){var $t=$(this);$t.attr("colspan",$t.attr("data-tablesaw-maxcolspan"))});var $rows=this.getRows();var columnLookup=[];$rows.each(function(rowNumber){columnLookup[rowNumber]=[]});$rows.each(function(rowNumber){var coltally=0;var $t=$(this);var children=$t.children();children.each(function(){var colspan=parseInt(this.getAttribute("data-tablesaw-maxcolspan")||this.getAttribute("colspan"),10);var rowspan=parseInt(this.getAttribute("rowspan"),10);while(columnLookup[rowNumber][coltally]){coltally++}columnLookup[rowNumber][coltally]=this;if(colspan){for(var k=0;k<colspan-1;k++){coltally++;columnLookup[rowNumber][coltally]=this}}if(rowspan){for(var j=1;j<rowspan;j++){columnLookup[rowNumber+j][coltally]=this}}coltally++})});var headerRowIndeces=this._getHeaderRowIndeces();for(var colNumber=0;colNumber<columnLookup[0].length;colNumber++){for(var headerIndex=0,k=headerRowIndeces.length;headerIndex<k;headerIndex++){var headerCol=columnLookup[headerRowIndeces[headerIndex]][colNumber];var rowNumber=headerRowIndeces[headerIndex];var rowCell;if(!headerCol.cells){headerCol.cells=[]}while(rowNumber<columnLookup.length){rowCell=columnLookup[rowNumber][colNumber];if(headerCol!==rowCell){headerCol.cells.push(rowCell)}rowNumber++}}}this.headerMapping=columnLookup};Table.prototype.refresh=function(){this._initCells();this.$table.trigger(events.refresh,[this])};Table.prototype._getToolbarAnchor=function(){var $parent=this.$table.parent();if($parent.is(".tablesaw-overflow")){return $parent}return this.$table};Table.prototype._getToolbar=function($anchor){if(!$anchor){$anchor=this._getToolbarAnchor()}return $anchor.prev().filter("."+classes.toolbar)};Table.prototype.createToolbar=function(){var $anchor=this._getToolbarAnchor();var $toolbar=this._getToolbar($anchor);if(!$toolbar.length){$toolbar=$("<div>").addClass(classes.toolbar).insertBefore($anchor)}this.$toolbar=$toolbar;if(this.mode){this.$toolbar.addClass("tablesaw-mode-"+this.mode)}};Table.prototype.destroy=function(){this._getToolbar().each(function(){this.className=this.className.replace(/\btablesaw-mode\-\w*\b/gi,"")});var tableId=this.$table.attr("id");$(document).off("."+tableId);$(window).off("."+tableId);this.$table.trigger(events.destroy,[this]);this.$table.removeData(pluginName)};$.fn[pluginName]=function(){return this.each(function(){var $t=$(this);if($t.data(pluginName)){return}new Table(this)})};var $doc=$(document);$doc.on("enhance.tablesaw",function(e){if(Tablesaw.mustard){var $target=$(e.target);if($target.parent().length){$target=$target.parent()}$target.find(initSelector).filter(initFilterSelector)[pluginName]()}});var isScrolling=false;var scrollTimeout;$doc.on("scroll.tablesaw",function(){isScrolling=true;window.clearTimeout(scrollTimeout);scrollTimeout=window.setTimeout(function(){isScrolling=false},300)});var resizeTimeout;$(window).on("resize",function(){if(!isScrolling){window.clearTimeout(resizeTimeout);resizeTimeout=window.setTimeout(function(){$doc.trigger(events.resize)},150)}});Tablesaw.Table=Table})();(function(){var classes={stackTable:"tablesaw-stack",cellLabels:"tablesaw-cell-label",cellContentLabels:"tablesaw-cell-content"};var data={key:"tablesaw-stack"};var attrs={labelless:"data-tablesaw-no-labels",hideempty:"data-tablesaw-hide-empty"};var Stack=function(element,tablesaw){this.tablesaw=tablesaw;this.$table=$(element);this.labelless=this.$table.is("["+attrs.labelless+"]");this.hideempty=this.$table.is("["+attrs.hideempty+"]");this.$table.data(data.key,this)};Stack.prototype.init=function(){this.$table.addClass(classes.stackTable);if(this.labelless){return}var self=this;this.$table.find("th, td").filter(function(){return!$(this).closest("thead").length}).filter(function(){return!$(this).is("["+attrs.labelless+"]")&&!$(this).closest("tr").is("["+attrs.labelless+"]")&&(!self.hideempty||!!$(this).html())}).each(function(){var $newHeader=$(document.createElement("b")).addClass(classes.cellLabels);var $cell=$(this);$(self.tablesaw._findPrimaryHeadersForCell(this)).each(function(index){var $header=$(this.cloneNode(true));var $sortableButton=$header.find(".tablesaw-sortable-btn");$header.find(".tablesaw-sortable-arrow").remove();var $checkall=$header.find("[data-tablesaw-checkall]");$checkall.closest("label").remove();if($checkall.length){$newHeader=$([]);return}if(index>0){$newHeader.append(document.createTextNode(", "))}var parentNode=$sortableButton.length?$sortableButton[0]:$header[0];var el;while(el=parentNode.firstChild){$newHeader[0].appendChild(el)}});if($newHeader.length&&!$cell.find("."+classes.cellContentLabels).length){$cell.wrapInner("<span class='"+classes.cellContentLabels+"'></span>")}var $label=$cell.find("."+classes.cellLabels);if(!$label.length){$cell.prepend(document.createTextNode(" "));$cell.prepend($newHeader)}else{$label.replaceWith($newHeader)}})};Stack.prototype.destroy=function(){this.$table.removeClass(classes.stackTable);this.$table.find("."+classes.cellLabels).remove();this.$table.find("."+classes.cellContentLabels).each(function(){$(this).replaceWith($(this.childNodes))})};$(document).on(Tablesaw.events.create,function(e,tablesaw){if(tablesaw.mode==="stack"){var table=new Stack(tablesaw.table,tablesaw);table.init()}}).on(Tablesaw.events.refresh,function(e,tablesaw){if(tablesaw.mode==="stack"){$(tablesaw.table).data(data.key).init()}}).on(Tablesaw.events.destroy,function(e,tablesaw){if(tablesaw.mode==="stack"){$(tablesaw.table).data(data.key).destroy()}});Tablesaw.Stack=Stack})();return Tablesaw});
window.ParsleyConfig={successClass:"has-success",errorClass:"has-error",focus:"first",classHandler:function(el){return el.$element.closest(".form-group")},errorsWrapper:"<ul class='help-block'></ul>"};
/*! jQuery UI - v1.12.1 - 2019-01-21
* http://jqueryui.com
* Includes: widget.js, position.js, keycode.js, unique-id.js, widgets/autocomplete.js, widgets/menu.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */

(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){t.ui=t.ui||{},t.ui.version="1.12.1";var e=0,i=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},l=e.split(".")[0];e=e.split(".")[1];var h=l+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][h.toLowerCase()]=function(e){return!!t.data(e,h)},t[l]=t[l]||{},n=t[l][e],o=t[l][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:l,widgetName:e,widgetFullName:h}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var s,n,o=i.call(arguments,1),a=0,r=o.length;r>a;a++)for(s in o[a])n=o[a][s],o[a].hasOwnProperty(s)&&void 0!==n&&(e[s]=t.isPlainObject(n)?t.isPlainObject(e[s])?t.widget.extend({},e[s],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,s){var n=s.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=i.call(arguments,1),l=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(l=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):l=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new s(o,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?n.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType,o=!s&&!n;return{element:i,isWindow:s,isDocument:n,offset:o?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(n){if(!n||!n.of)return d.apply(this,arguments);n=t.extend({},n);var u,p,f,g,m,_,v=t(n.of),b=t.position.getWithinInfo(n.within),y=t.position.getScrollInfo(b),w=(n.collision||"flip").split(" "),k={};return _=s(v),v[0].preventDefault&&(n.at="left top"),p=_.width,f=_.height,g=_.offset,m=t.extend({},g),t.each(["my","at"],function(){var t,e,i=(n[this]||"").split(" ");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):l.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=l.test(i[1])?i[1]:"center",t=h.exec(i[0]),e=h.exec(i[1]),k[this]=[t?t[0]:0,e?e[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===n.at[0]?m.left+=p:"center"===n.at[0]&&(m.left+=p/2),"bottom"===n.at[1]?m.top+=f:"center"===n.at[1]&&(m.top+=f/2),u=e(k.at,p,f),m.left+=u[0],m.top+=u[1],this.each(function(){var s,r,l=t(this),h=l.outerWidth(),c=l.outerHeight(),d=i(this,"marginLeft"),_=i(this,"marginTop"),x=h+d+i(this,"marginRight")+y.width,C=c+_+i(this,"marginBottom")+y.height,D=t.extend({},m),T=e(k.my,l.outerWidth(),l.outerHeight());"right"===n.my[0]?D.left-=h:"center"===n.my[0]&&(D.left-=h/2),"bottom"===n.my[1]?D.top-=c:"center"===n.my[1]&&(D.top-=c/2),D.left+=T[0],D.top+=T[1],s={marginLeft:d,marginTop:_},t.each(["left","top"],function(e,i){t.ui.position[w[e]]&&t.ui.position[w[e]][i](D,{targetWidth:p,targetHeight:f,elemWidth:h,elemHeight:c,collisionPosition:s,collisionWidth:x,collisionHeight:C,offset:[u[0]+T[0],u[1]+T[1]],my:n.my,at:n.at,within:b,elem:l})}),n.using&&(r=function(t){var e=g.left-D.left,i=e+p-h,s=g.top-D.top,r=s+f-c,u={target:{element:v,left:g.left,top:g.top,width:p,height:f},element:{element:l,left:D.left,top:D.top,width:h,height:c},horizontal:0>i?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};h>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),l.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("<span>").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=l.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))})}}),t.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<div>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete});
(function(root,factory){if(typeof define==="function"&&define.amd){define(factory)}else if(typeof exports==="object"){module.exports=factory()}else{root.PhotoSwipe=factory()}})(this,function(){"use strict";var PhotoSwipe=function(template,UiClass,items,options){var framework={features:null,bind:function(target,type,listener,unbind){var methodName=(unbind?"remove":"add")+"EventListener";type=type.split(" ");for(var i=0;i<type.length;i++){if(type[i]){target[methodName](type[i],listener,false)}}},isArray:function(obj){return obj instanceof Array},createEl:function(classes,tag){var el=document.createElement(tag||"div");if(classes){el.className=classes}return el},getScrollY:function(){var yOffset=window.pageYOffset;return yOffset!==undefined?yOffset:document.documentElement.scrollTop},unbind:function(target,type,listener){framework.bind(target,type,listener,true)},removeClass:function(el,className){var reg=new RegExp("(\\s|^)"+className+"(\\s|$)");el.className=el.className.replace(reg," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(el,className){if(!framework.hasClass(el,className)){el.className+=(el.className?" ":"")+className}},hasClass:function(el,className){return el.className&&new RegExp("(^|\\s)"+className+"(\\s|$)").test(el.className)},getChildByClass:function(parentEl,childClassName){var node=parentEl.firstChild;while(node){if(framework.hasClass(node,childClassName)){return node}node=node.nextSibling}},arraySearch:function(array,value,key){var i=array.length;while(i--){if(array[i][key]===value){return i}}return-1},extend:function(o1,o2,preventOverwrite){for(var prop in o2){if(o2.hasOwnProperty(prop)){if(preventOverwrite&&o1.hasOwnProperty(prop)){continue}o1[prop]=o2[prop]}}},easing:{sine:{out:function(k){return Math.sin(k*(Math.PI/2))},inOut:function(k){return-(Math.cos(Math.PI*k)-1)/2}},cubic:{out:function(k){return--k*k*k+1}}},detectFeatures:function(){if(framework.features){return framework.features}var helperEl=framework.createEl(),helperStyle=helperEl.style,vendor="",features={};features.oldIE=document.all&&!document.addEventListener;features.touch="ontouchstart"in window;if(window.requestAnimationFrame){features.raf=window.requestAnimationFrame;features.caf=window.cancelAnimationFrame}features.pointerEvent=!!window.PointerEvent||navigator.msPointerEnabled;if(!features.pointerEvent){var ua=navigator.userAgent;if(/iP(hone|od)/.test(navigator.platform)){var v=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);if(v&&v.length>0){v=parseInt(v[1],10);if(v>=1&&v<8){features.isOldIOSPhone=true}}}var match=ua.match(/Android\s([0-9\.]*)/);var androidversion=match?match[1]:0;androidversion=parseFloat(androidversion);if(androidversion>=1){if(androidversion<4.4){features.isOldAndroid=true}features.androidVersion=androidversion}features.isMobileOpera=/opera mini|opera mobi/i.test(ua)}var styleChecks=["transform","perspective","animationName"],vendors=["","webkit","Moz","ms","O"],styleCheckItem,styleName;for(var i=0;i<4;i++){vendor=vendors[i];for(var a=0;a<3;a++){styleCheckItem=styleChecks[a];styleName=vendor+(vendor?styleCheckItem.charAt(0).toUpperCase()+styleCheckItem.slice(1):styleCheckItem);if(!features[styleCheckItem]&&styleName in helperStyle){features[styleCheckItem]=styleName}}if(vendor&&!features.raf){vendor=vendor.toLowerCase();features.raf=window[vendor+"RequestAnimationFrame"];if(features.raf){features.caf=window[vendor+"CancelAnimationFrame"]||window[vendor+"CancelRequestAnimationFrame"]}}}if(!features.raf){var lastTime=0;features.raf=function(fn){var currTime=(new Date).getTime();var timeToCall=Math.max(0,16-(currTime-lastTime));var id=window.setTimeout(function(){fn(currTime+timeToCall)},timeToCall);lastTime=currTime+timeToCall;return id};features.caf=function(id){clearTimeout(id)}}features.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect;framework.features=features;return features}};framework.detectFeatures();if(framework.features.oldIE){framework.bind=function(target,type,listener,unbind){type=type.split(" ");var methodName=(unbind?"detach":"attach")+"Event",evName,_handleEv=function(){listener.handleEvent.call(listener)};for(var i=0;i<type.length;i++){evName=type[i];if(evName){if(typeof listener==="object"&&listener.handleEvent){if(!unbind){listener["oldIE"+evName]=_handleEv}else{if(!listener["oldIE"+evName]){return false}}target[methodName]("on"+evName,listener["oldIE"+evName])}else{target[methodName]("on"+evName,listener)}}}}}var self=this;var DOUBLE_TAP_RADIUS=25,NUM_HOLDERS=3;var _options={allowPanToNext:true,spacing:.12,bgOpacity:1,mouseUsed:false,loop:true,pinchToClose:true,closeOnScroll:true,closeOnVerticalDrag:true,verticalDragRange:.75,hideAnimationDuration:333,showAnimationDuration:333,showHideOpacity:false,focus:true,escKey:true,arrowKeys:true,mainScrollEndFriction:.35,panEndFriction:.35,isClickableElement:function(el){return el.tagName==="A"},getDoubleTapZoom:function(isMouseClick,item){if(isMouseClick){return 1}else{return item.initialZoomLevel<.7?1:1.33}},maxSpreadZoom:1.33,modal:true,scaleMode:"fit"};framework.extend(_options,options);var _getEmptyPoint=function(){return{x:0,y:0}};var _isOpen,_isDestroying,_closedByScroll,_currentItemIndex,_containerStyle,_containerShiftIndex,_currPanDist=_getEmptyPoint(),_startPanOffset=_getEmptyPoint(),_panOffset=_getEmptyPoint(),_upMoveEvents,_downEvents,_globalEventHandlers,_viewportSize={},_currZoomLevel,_startZoomLevel,_translatePrefix,_translateSufix,_updateSizeInterval,_itemsNeedUpdate,_currPositionIndex=0,_offset={},_slideSize=_getEmptyPoint(),_itemHolders,_prevItemIndex,_indexDiff=0,_dragStartEvent,_dragMoveEvent,_dragEndEvent,_dragCancelEvent,_transformKey,_pointerEventEnabled,_isFixedPosition=true,_likelyTouchDevice,_modules=[],_requestAF,_cancelAF,_initalClassName,_initalWindowScrollY,_oldIE,_currentWindowScrollY,_features,_windowVisibleSize={},_renderMaxResolution=false,_orientationChangeTimeout,_registerModule=function(name,module){framework.extend(self,module.publicMethods);_modules.push(name)},_getLoopedId=function(index){var numSlides=_getNumItems();if(index>numSlides-1){return index-numSlides}else if(index<0){return numSlides+index}return index},_listeners={},_listen=function(name,fn){if(!_listeners[name]){_listeners[name]=[]}return _listeners[name].push(fn)},_shout=function(name){var listeners=_listeners[name];if(listeners){var args=Array.prototype.slice.call(arguments);args.shift();for(var i=0;i<listeners.length;i++){listeners[i].apply(self,args)}}},_getCurrentTime=function(){return(new Date).getTime()},_applyBgOpacity=function(opacity){_bgOpacity=opacity;self.bg.style.opacity=opacity*_options.bgOpacity},_applyZoomTransform=function(styleObj,x,y,zoom,item){if(!_renderMaxResolution||item&&item!==self.currItem){zoom=zoom/(item?item.fitRatio:self.currItem.fitRatio)}styleObj[_transformKey]=_translatePrefix+x+"px, "+y+"px"+_translateSufix+" scale("+zoom+")"},_applyCurrentZoomPan=function(allowRenderResolution){if(_currZoomElementStyle){if(allowRenderResolution){if(_currZoomLevel>self.currItem.fitRatio){if(!_renderMaxResolution){_setImageSize(self.currItem,false,true);_renderMaxResolution=true}}else{if(_renderMaxResolution){_setImageSize(self.currItem);_renderMaxResolution=false}}}_applyZoomTransform(_currZoomElementStyle,_panOffset.x,_panOffset.y,_currZoomLevel)}},_applyZoomPanToItem=function(item){if(item.container){_applyZoomTransform(item.container.style,item.initialPosition.x,item.initialPosition.y,item.initialZoomLevel,item)}},_setTranslateX=function(x,elStyle){elStyle[_transformKey]=_translatePrefix+x+"px, 0px"+_translateSufix},_moveMainScroll=function(x,dragging){if(!_options.loop&&dragging){var newSlideIndexOffset=_currentItemIndex+(_slideSize.x*_currPositionIndex-x)/_slideSize.x,delta=Math.round(x-_mainScrollPos.x);if(newSlideIndexOffset<0&&delta>0||newSlideIndexOffset>=_getNumItems()-1&&delta<0){x=_mainScrollPos.x+delta*_options.mainScrollEndFriction}}_mainScrollPos.x=x;_setTranslateX(x,_containerStyle)},_calculatePanOffset=function(axis,zoomLevel){var m=_midZoomPoint[axis]-_offset[axis];return _startPanOffset[axis]+_currPanDist[axis]+m-m*(zoomLevel/_startZoomLevel)},_equalizePoints=function(p1,p2){p1.x=p2.x;p1.y=p2.y;if(p2.id){p1.id=p2.id}},_roundPoint=function(p){p.x=Math.round(p.x);p.y=Math.round(p.y)},_mouseMoveTimeout=null,_onFirstMouseMove=function(){if(_mouseMoveTimeout){framework.unbind(document,"mousemove",_onFirstMouseMove);framework.addClass(template,"pswp--has_mouse");_options.mouseUsed=true;_shout("mouseUsed")}_mouseMoveTimeout=setTimeout(function(){_mouseMoveTimeout=null},100)},_bindEvents=function(){framework.bind(document,"keydown",self);if(_features.transform){framework.bind(self.scrollWrap,"click",self)}if(!_options.mouseUsed){framework.bind(document,"mousemove",_onFirstMouseMove)}framework.bind(window,"resize scroll orientationchange",self);_shout("bindEvents")},_unbindEvents=function(){framework.unbind(window,"resize scroll orientationchange",self);framework.unbind(window,"scroll",_globalEventHandlers.scroll);framework.unbind(document,"keydown",self);framework.unbind(document,"mousemove",_onFirstMouseMove);if(_features.transform){framework.unbind(self.scrollWrap,"click",self)}if(_isDragging){framework.unbind(window,_upMoveEvents,self)}clearTimeout(_orientationChangeTimeout);_shout("unbindEvents")},_calculatePanBounds=function(zoomLevel,update){var bounds=_calculateItemSize(self.currItem,_viewportSize,zoomLevel);if(update){_currPanBounds=bounds}return bounds},_getMinZoomLevel=function(item){if(!item){item=self.currItem}return item.initialZoomLevel},_getMaxZoomLevel=function(item){if(!item){item=self.currItem}return item.w>0?_options.maxSpreadZoom:1},_modifyDestPanOffset=function(axis,destPanBounds,destPanOffset,destZoomLevel){if(destZoomLevel===self.currItem.initialZoomLevel){destPanOffset[axis]=self.currItem.initialPosition[axis];return true}else{destPanOffset[axis]=_calculatePanOffset(axis,destZoomLevel);if(destPanOffset[axis]>destPanBounds.min[axis]){destPanOffset[axis]=destPanBounds.min[axis];return true}else if(destPanOffset[axis]<destPanBounds.max[axis]){destPanOffset[axis]=destPanBounds.max[axis];return true}}return false},_setupTransforms=function(){if(_transformKey){var allow3dTransform=_features.perspective&&!_likelyTouchDevice;_translatePrefix="translate"+(allow3dTransform?"3d(":"(");_translateSufix=_features.perspective?", 0px)":")";return}_transformKey="left";framework.addClass(template,"pswp--ie");_setTranslateX=function(x,elStyle){elStyle.left=x+"px"};_applyZoomPanToItem=function(item){var zoomRatio=item.fitRatio>1?1:item.fitRatio,s=item.container.style,w=zoomRatio*item.w,h=zoomRatio*item.h;s.width=w+"px";s.height=h+"px";s.left=item.initialPosition.x+"px";s.top=item.initialPosition.y+"px"};_applyCurrentZoomPan=function(){if(_currZoomElementStyle){var s=_currZoomElementStyle,item=self.currItem,zoomRatio=item.fitRatio>1?1:item.fitRatio,w=zoomRatio*item.w,h=zoomRatio*item.h;s.width=w+"px";s.height=h+"px";s.left=_panOffset.x+"px";s.top=_panOffset.y+"px"}}},_onKeyDown=function(e){var keydownAction="";if(_options.escKey&&e.keyCode===27){keydownAction="close"}else if(_options.arrowKeys){if(e.keyCode===37){keydownAction="prev"}else if(e.keyCode===39){keydownAction="next"}}if(keydownAction){if(!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey){if(e.preventDefault){e.preventDefault()}else{e.returnValue=false}self[keydownAction]()}}},_onGlobalClick=function(e){if(!e){return}if(_moved||_zoomStarted||_mainScrollAnimating||_verticalDragInitiated){e.preventDefault();e.stopPropagation()}},_updatePageScrollOffset=function(){self.setScrollOffset(0,framework.getScrollY())};var _animations={},_numAnimations=0,_stopAnimation=function(name){if(_animations[name]){if(_animations[name].raf){_cancelAF(_animations[name].raf)}_numAnimations--;delete _animations[name]}},_registerStartAnimation=function(name){if(_animations[name]){_stopAnimation(name)}if(!_animations[name]){_numAnimations++;_animations[name]={}}},_stopAllAnimations=function(){for(var prop in _animations){if(_animations.hasOwnProperty(prop)){_stopAnimation(prop)}}},_animateProp=function(name,b,endProp,d,easingFn,onUpdate,onComplete){var startAnimTime=_getCurrentTime(),t;_registerStartAnimation(name);var animloop=function(){if(_animations[name]){t=_getCurrentTime()-startAnimTime;if(t>=d){_stopAnimation(name);onUpdate(endProp);if(onComplete){onComplete()}return}onUpdate((endProp-b)*easingFn(t/d)+b);_animations[name].raf=_requestAF(animloop)}};animloop()};var publicMethods={shout:_shout,listen:_listen,viewportSize:_viewportSize,options:_options,isMainScrollAnimating:function(){return _mainScrollAnimating},getZoomLevel:function(){return _currZoomLevel},getCurrentIndex:function(){return _currentItemIndex},isDragging:function(){return _isDragging},isZooming:function(){return _isZooming},setScrollOffset:function(x,y){_offset.x=x;_currentWindowScrollY=_offset.y=y;_shout("updateScrollOffset",_offset)},applyZoomPan:function(zoomLevel,panX,panY,allowRenderResolution){_panOffset.x=panX;_panOffset.y=panY;_currZoomLevel=zoomLevel;_applyCurrentZoomPan(allowRenderResolution)},init:function(){if(_isOpen||_isDestroying){return}var i;self.framework=framework;self.template=template;self.bg=framework.getChildByClass(template,"pswp__bg");_initalClassName=template.className;_isOpen=true;_features=framework.detectFeatures();_requestAF=_features.raf;_cancelAF=_features.caf;_transformKey=_features.transform;_oldIE=_features.oldIE;self.scrollWrap=framework.getChildByClass(template,"pswp__scroll-wrap");self.container=framework.getChildByClass(self.scrollWrap,"pswp__container");_containerStyle=self.container.style;self.itemHolders=_itemHolders=[{el:self.container.children[0],wrap:0,index:-1},{el:self.container.children[1],wrap:0,index:-1},{el:self.container.children[2],wrap:0,index:-1}];_itemHolders[0].el.style.display=_itemHolders[2].el.style.display="none";_setupTransforms();_globalEventHandlers={resize:self.updateSize,orientationchange:function(){clearTimeout(_orientationChangeTimeout);_orientationChangeTimeout=setTimeout(function(){if(_viewportSize.x!==self.scrollWrap.clientWidth){self.updateSize()}},500)},scroll:_updatePageScrollOffset,keydown:_onKeyDown,click:_onGlobalClick};var oldPhone=_features.isOldIOSPhone||_features.isOldAndroid||_features.isMobileOpera;if(!_features.animationName||!_features.transform||oldPhone){_options.showAnimationDuration=_options.hideAnimationDuration=0}for(i=0;i<_modules.length;i++){self["init"+_modules[i]]()}if(UiClass){var ui=self.ui=new UiClass(self,framework);ui.init()}_shout("firstUpdate");_currentItemIndex=_currentItemIndex||_options.index||0;if(isNaN(_currentItemIndex)||_currentItemIndex<0||_currentItemIndex>=_getNumItems()){_currentItemIndex=0}self.currItem=_getItemAt(_currentItemIndex);if(_features.isOldIOSPhone||_features.isOldAndroid){_isFixedPosition=false}template.setAttribute("aria-hidden","false");if(_options.modal){if(!_isFixedPosition){template.style.position="absolute";template.style.top=framework.getScrollY()+"px"}else{template.style.position="fixed"}}if(_currentWindowScrollY===undefined){_shout("initialLayout");_currentWindowScrollY=_initalWindowScrollY=framework.getScrollY()}var rootClasses="pswp--open ";if(_options.mainClass){rootClasses+=_options.mainClass+" "}if(_options.showHideOpacity){rootClasses+="pswp--animate_opacity "}rootClasses+=_likelyTouchDevice?"pswp--touch":"pswp--notouch";rootClasses+=_features.animationName?" pswp--css_animation":"";rootClasses+=_features.svg?" pswp--svg":"";framework.addClass(template,rootClasses);self.updateSize();_containerShiftIndex=-1;_indexDiff=null;for(i=0;i<NUM_HOLDERS;i++){_setTranslateX((i+_containerShiftIndex)*_slideSize.x,_itemHolders[i].el.style)}if(!_oldIE){framework.bind(self.scrollWrap,_downEvents,self)}_listen("initialZoomInEnd",function(){self.setContent(_itemHolders[0],_currentItemIndex-1);self.setContent(_itemHolders[2],_currentItemIndex+1);_itemHolders[0].el.style.display=_itemHolders[2].el.style.display="block";if(_options.focus){template.focus()}_bindEvents()});self.setContent(_itemHolders[1],_currentItemIndex);self.updateCurrItem();_shout("afterInit");if(!_isFixedPosition){_updateSizeInterval=setInterval(function(){if(!_numAnimations&&!_isDragging&&!_isZooming&&_currZoomLevel===self.currItem.initialZoomLevel){self.updateSize()}},1e3)}framework.addClass(template,"pswp--visible")},close:function(){if(!_isOpen){return}_isOpen=false;_isDestroying=true;_shout("close");_unbindEvents();_showOrHide(self.currItem,null,true,self.destroy)},destroy:function(){_shout("destroy");if(_showOrHideTimeout){clearTimeout(_showOrHideTimeout)}template.setAttribute("aria-hidden","true");template.className=_initalClassName;if(_updateSizeInterval){clearInterval(_updateSizeInterval)}framework.unbind(self.scrollWrap,_downEvents,self);framework.unbind(window,"scroll",self);_stopDragUpdateLoop();_stopAllAnimations();_listeners=null},panTo:function(x,y,force){if(!force){if(x>_currPanBounds.min.x){x=_currPanBounds.min.x}else if(x<_currPanBounds.max.x){x=_currPanBounds.max.x}if(y>_currPanBounds.min.y){y=_currPanBounds.min.y}else if(y<_currPanBounds.max.y){y=_currPanBounds.max.y}}_panOffset.x=x;_panOffset.y=y;_applyCurrentZoomPan()},handleEvent:function(e){e=e||window.event;if(_globalEventHandlers[e.type]){_globalEventHandlers[e.type](e)}},goTo:function(index){index=_getLoopedId(index);var diff=index-_currentItemIndex;_indexDiff=diff;_currentItemIndex=index;self.currItem=_getItemAt(_currentItemIndex);_currPositionIndex-=diff;_moveMainScroll(_slideSize.x*_currPositionIndex);_stopAllAnimations();_mainScrollAnimating=false;self.updateCurrItem()},next:function(){self.goTo(_currentItemIndex+1)},prev:function(){self.goTo(_currentItemIndex-1)},updateCurrZoomItem:function(emulateSetContent){if(emulateSetContent){_shout("beforeChange",0)}if(_itemHolders[1].el.children.length){var zoomElement=_itemHolders[1].el.children[0];if(framework.hasClass(zoomElement,"pswp__zoom-wrap")){_currZoomElementStyle=zoomElement.style}else{_currZoomElementStyle=null}}else{_currZoomElementStyle=null}_currPanBounds=self.currItem.bounds;_startZoomLevel=_currZoomLevel=self.currItem.initialZoomLevel;_panOffset.x=_currPanBounds.center.x;_panOffset.y=_currPanBounds.center.y;if(emulateSetContent){_shout("afterChange")}},invalidateCurrItems:function(){_itemsNeedUpdate=true;for(var i=0;i<NUM_HOLDERS;i++){if(_itemHolders[i].item){_itemHolders[i].item.needsUpdate=true}}},updateCurrItem:function(beforeAnimation){if(_indexDiff===0){return}var diffAbs=Math.abs(_indexDiff),tempHolder;if(beforeAnimation&&diffAbs<2){return}self.currItem=_getItemAt(_currentItemIndex);_renderMaxResolution=false;_shout("beforeChange",_indexDiff);if(diffAbs>=NUM_HOLDERS){_containerShiftIndex+=_indexDiff+(_indexDiff>0?-NUM_HOLDERS:NUM_HOLDERS);diffAbs=NUM_HOLDERS}for(var i=0;i<diffAbs;i++){if(_indexDiff>0){tempHolder=_itemHolders.shift();_itemHolders[NUM_HOLDERS-1]=tempHolder;_containerShiftIndex++;_setTranslateX((_containerShiftIndex+2)*_slideSize.x,tempHolder.el.style);self.setContent(tempHolder,_currentItemIndex-diffAbs+i+1+1)}else{tempHolder=_itemHolders.pop();_itemHolders.unshift(tempHolder);_containerShiftIndex--;_setTranslateX(_containerShiftIndex*_slideSize.x,tempHolder.el.style);self.setContent(tempHolder,_currentItemIndex+diffAbs-i-1-1)}}if(_currZoomElementStyle&&Math.abs(_indexDiff)===1){var prevItem=_getItemAt(_prevItemIndex);if(prevItem.initialZoomLevel!==_currZoomLevel){_calculateItemSize(prevItem,_viewportSize);_setImageSize(prevItem);_applyZoomPanToItem(prevItem)}}_indexDiff=0;self.updateCurrZoomItem();_prevItemIndex=_currentItemIndex;_shout("afterChange")},updateSize:function(force){if(!_isFixedPosition&&_options.modal){var windowScrollY=framework.getScrollY();if(_currentWindowScrollY!==windowScrollY){template.style.top=windowScrollY+"px";_currentWindowScrollY=windowScrollY}if(!force&&_windowVisibleSize.x===window.innerWidth&&_windowVisibleSize.y===window.innerHeight){return}_windowVisibleSize.x=window.innerWidth;_windowVisibleSize.y=window.innerHeight;template.style.height=_windowVisibleSize.y+"px"}_viewportSize.x=self.scrollWrap.clientWidth;_viewportSize.y=self.scrollWrap.clientHeight;_updatePageScrollOffset();_slideSize.x=_viewportSize.x+Math.round(_viewportSize.x*_options.spacing);_slideSize.y=_viewportSize.y;_moveMainScroll(_slideSize.x*_currPositionIndex);_shout("beforeResize");if(_containerShiftIndex!==undefined){var holder,item,hIndex;for(var i=0;i<NUM_HOLDERS;i++){holder=_itemHolders[i];_setTranslateX((i+_containerShiftIndex)*_slideSize.x,holder.el.style);hIndex=_currentItemIndex+i-1;if(_options.loop&&_getNumItems()>2){hIndex=_getLoopedId(hIndex)}item=_getItemAt(hIndex);if(item&&(_itemsNeedUpdate||item.needsUpdate||!item.bounds)){self.cleanSlide(item);self.setContent(holder,hIndex);if(i===1){self.currItem=item;self.updateCurrZoomItem(true)}item.needsUpdate=false}else if(holder.index===-1&&hIndex>=0){self.setContent(holder,hIndex)}if(item&&item.container){_calculateItemSize(item,_viewportSize);_setImageSize(item);_applyZoomPanToItem(item)}}_itemsNeedUpdate=false}_startZoomLevel=_currZoomLevel=self.currItem.initialZoomLevel;_currPanBounds=self.currItem.bounds;if(_currPanBounds){_panOffset.x=_currPanBounds.center.x;_panOffset.y=_currPanBounds.center.y;_applyCurrentZoomPan(true)}_shout("resize")},zoomTo:function(destZoomLevel,centerPoint,speed,easingFn,updateFn){if(centerPoint){_startZoomLevel=_currZoomLevel;_midZoomPoint.x=Math.abs(centerPoint.x)-_panOffset.x;_midZoomPoint.y=Math.abs(centerPoint.y)-_panOffset.y;_equalizePoints(_startPanOffset,_panOffset)}var destPanBounds=_calculatePanBounds(destZoomLevel,false),destPanOffset={};_modifyDestPanOffset("x",destPanBounds,destPanOffset,destZoomLevel);_modifyDestPanOffset("y",destPanBounds,destPanOffset,destZoomLevel);var initialZoomLevel=_currZoomLevel;var initialPanOffset={x:_panOffset.x,y:_panOffset.y};_roundPoint(destPanOffset);var onUpdate=function(now){if(now===1){_currZoomLevel=destZoomLevel;_panOffset.x=destPanOffset.x;_panOffset.y=destPanOffset.y}else{_currZoomLevel=(destZoomLevel-initialZoomLevel)*now+initialZoomLevel;_panOffset.x=(destPanOffset.x-initialPanOffset.x)*now+initialPanOffset.x;_panOffset.y=(destPanOffset.y-initialPanOffset.y)*now+initialPanOffset.y}if(updateFn){updateFn(now)}_applyCurrentZoomPan(now===1)};if(speed){_animateProp("customZoomTo",0,1,speed,easingFn||framework.easing.sine.inOut,onUpdate)}else{onUpdate(1)}}};var MIN_SWIPE_DISTANCE=30,DIRECTION_CHECK_OFFSET=10;var _gestureStartTime,_gestureCheckSpeedTime,p={},p2={},delta={},_currPoint={},_startPoint={},_currPointers=[],_startMainScrollPos={},_releaseAnimData,_posPoints=[],_tempPoint={},_isZoomingIn,_verticalDragInitiated,_oldAndroidTouchEndTimeout,_currZoomedItemIndex=0,_centerPoint=_getEmptyPoint(),_lastReleaseTime=0,_isDragging,_isMultitouch,_zoomStarted,_moved,_dragAnimFrame,_mainScrollShifted,_currentPoints,_isZooming,_currPointsDistance,_startPointsDistance,_currPanBounds,_mainScrollPos=_getEmptyPoint(),_currZoomElementStyle,_mainScrollAnimating,_midZoomPoint=_getEmptyPoint(),_currCenterPoint=_getEmptyPoint(),_direction,_isFirstMove,_opacityChanged,_bgOpacity,_wasOverInitialZoom,_isEqualPoints=function(p1,p2){return p1.x===p2.x&&p1.y===p2.y},_isNearbyPoints=function(touch0,touch1){return Math.abs(touch0.x-touch1.x)<DOUBLE_TAP_RADIUS&&Math.abs(touch0.y-touch1.y)<DOUBLE_TAP_RADIUS},_calculatePointsDistance=function(p1,p2){_tempPoint.x=Math.abs(p1.x-p2.x);_tempPoint.y=Math.abs(p1.y-p2.y);return Math.sqrt(_tempPoint.x*_tempPoint.x+_tempPoint.y*_tempPoint.y)},_stopDragUpdateLoop=function(){if(_dragAnimFrame){_cancelAF(_dragAnimFrame);_dragAnimFrame=null}},_dragUpdateLoop=function(){if(_isDragging){_dragAnimFrame=_requestAF(_dragUpdateLoop);_renderMovement()}},_canPan=function(){return!(_options.scaleMode==="fit"&&_currZoomLevel===self.currItem.initialZoomLevel)},_closestElement=function(el,fn){if(!el||el===document){return false}if(el.getAttribute("class")&&el.getAttribute("class").indexOf("pswp__scroll-wrap")>-1){return false}if(fn(el)){return el}return _closestElement(el.parentNode,fn)},_preventObj={},_preventDefaultEventBehaviour=function(e,isDown){_preventObj.prevent=!_closestElement(e.target,_options.isClickableElement);_shout("preventDragEvent",e,isDown,_preventObj);return _preventObj.prevent},_convertTouchToPoint=function(touch,p){p.x=touch.pageX;p.y=touch.pageY;p.id=touch.identifier;return p},_findCenterOfPoints=function(p1,p2,pCenter){pCenter.x=(p1.x+p2.x)*.5;pCenter.y=(p1.y+p2.y)*.5},_pushPosPoint=function(time,x,y){if(time-_gestureCheckSpeedTime>50){var o=_posPoints.length>2?_posPoints.shift():{};o.x=x;o.y=y;_posPoints.push(o);_gestureCheckSpeedTime=time}},_calculateVerticalDragOpacityRatio=function(){var yOffset=_panOffset.y-self.currItem.initialPosition.y;return 1-Math.abs(yOffset/(_viewportSize.y/2))},_ePoint1={},_ePoint2={},_tempPointsArr=[],_tempCounter,_getTouchPoints=function(e){while(_tempPointsArr.length>0){_tempPointsArr.pop()}if(!_pointerEventEnabled){if(e.type.indexOf("touch")>-1){if(e.touches&&e.touches.length>0){_tempPointsArr[0]=_convertTouchToPoint(e.touches[0],_ePoint1);if(e.touches.length>1){_tempPointsArr[1]=_convertTouchToPoint(e.touches[1],_ePoint2)}}}else{_ePoint1.x=e.pageX;_ePoint1.y=e.pageY;_ePoint1.id="";_tempPointsArr[0]=_ePoint1}}else{_tempCounter=0;_currPointers.forEach(function(p){if(_tempCounter===0){_tempPointsArr[0]=p}else if(_tempCounter===1){_tempPointsArr[1]=p}_tempCounter++})}return _tempPointsArr},_panOrMoveMainScroll=function(axis,delta){var panFriction,overDiff=0,newOffset=_panOffset[axis]+delta[axis],startOverDiff,dir=delta[axis]>0,newMainScrollPosition=_mainScrollPos.x+delta.x,mainScrollDiff=_mainScrollPos.x-_startMainScrollPos.x,newPanPos,newMainScrollPos;if(newOffset>_currPanBounds.min[axis]||newOffset<_currPanBounds.max[axis]){panFriction=_options.panEndFriction}else{panFriction=1}newOffset=_panOffset[axis]+delta[axis]*panFriction;if(_options.allowPanToNext||_currZoomLevel===self.currItem.initialZoomLevel){if(!_currZoomElementStyle){newMainScrollPos=newMainScrollPosition}else if(_direction==="h"&&axis==="x"&&!_zoomStarted){if(dir){if(newOffset>_currPanBounds.min[axis]){panFriction=_options.panEndFriction;overDiff=_currPanBounds.min[axis]-newOffset;startOverDiff=_currPanBounds.min[axis]-_startPanOffset[axis]}if((startOverDiff<=0||mainScrollDiff<0)&&_getNumItems()>1){newMainScrollPos=newMainScrollPosition;if(mainScrollDiff<0&&newMainScrollPosition>_startMainScrollPos.x){newMainScrollPos=_startMainScrollPos.x}}else{if(_currPanBounds.min.x!==_currPanBounds.max.x){newPanPos=newOffset}}}else{if(newOffset<_currPanBounds.max[axis]){panFriction=_options.panEndFriction;overDiff=newOffset-_currPanBounds.max[axis];startOverDiff=_startPanOffset[axis]-_currPanBounds.max[axis]}if((startOverDiff<=0||mainScrollDiff>0)&&_getNumItems()>1){newMainScrollPos=newMainScrollPosition;if(mainScrollDiff>0&&newMainScrollPosition<_startMainScrollPos.x){newMainScrollPos=_startMainScrollPos.x}}else{if(_currPanBounds.min.x!==_currPanBounds.max.x){newPanPos=newOffset}}}}if(axis==="x"){if(newMainScrollPos!==undefined){_moveMainScroll(newMainScrollPos,true);if(newMainScrollPos===_startMainScrollPos.x){_mainScrollShifted=false}else{_mainScrollShifted=true}}if(_currPanBounds.min.x!==_currPanBounds.max.x){if(newPanPos!==undefined){_panOffset.x=newPanPos}else if(!_mainScrollShifted){_panOffset.x+=delta.x*panFriction}}return newMainScrollPos!==undefined}}if(!_mainScrollAnimating){if(!_mainScrollShifted){if(_currZoomLevel>self.currItem.fitRatio){_panOffset[axis]+=delta[axis]*panFriction}}}},_onDragStart=function(e){if(e.type==="mousedown"&&e.button>0){return}if(_initialZoomRunning){e.preventDefault();return}if(_oldAndroidTouchEndTimeout&&e.type==="mousedown"){return}if(_preventDefaultEventBehaviour(e,true)){e.preventDefault()}_shout("pointerDown");if(_pointerEventEnabled){var pointerIndex=framework.arraySearch(_currPointers,e.pointerId,"id");if(pointerIndex<0){pointerIndex=_currPointers.length}_currPointers[pointerIndex]={x:e.pageX,y:e.pageY,id:e.pointerId}}var startPointsList=_getTouchPoints(e),numPoints=startPointsList.length;_currentPoints=null;_stopAllAnimations();if(!_isDragging||numPoints===1){_isDragging=_isFirstMove=true;framework.bind(window,_upMoveEvents,self);_isZoomingIn=_wasOverInitialZoom=_opacityChanged=_verticalDragInitiated=_mainScrollShifted=_moved=_isMultitouch=_zoomStarted=false;_direction=null;_shout("firstTouchStart",startPointsList);_equalizePoints(_startPanOffset,_panOffset);_currPanDist.x=_currPanDist.y=0;_equalizePoints(_currPoint,startPointsList[0]);_equalizePoints(_startPoint,_currPoint);_startMainScrollPos.x=_slideSize.x*_currPositionIndex;_posPoints=[{x:_currPoint.x,y:_currPoint.y}];_gestureCheckSpeedTime=_gestureStartTime=_getCurrentTime();_calculatePanBounds(_currZoomLevel,true);_stopDragUpdateLoop();_dragUpdateLoop()}if(!_isZooming&&numPoints>1&&!_mainScrollAnimating&&!_mainScrollShifted){_startZoomLevel=_currZoomLevel;_zoomStarted=false;_isZooming=_isMultitouch=true;_currPanDist.y=_currPanDist.x=0;_equalizePoints(_startPanOffset,_panOffset);_equalizePoints(p,startPointsList[0]);_equalizePoints(p2,startPointsList[1]);_findCenterOfPoints(p,p2,_currCenterPoint);_midZoomPoint.x=Math.abs(_currCenterPoint.x)-_panOffset.x;_midZoomPoint.y=Math.abs(_currCenterPoint.y)-_panOffset.y;_currPointsDistance=_startPointsDistance=_calculatePointsDistance(p,p2)}},_onDragMove=function(e){e.preventDefault();if(_pointerEventEnabled){var pointerIndex=framework.arraySearch(_currPointers,e.pointerId,"id");if(pointerIndex>-1){var p=_currPointers[pointerIndex];p.x=e.pageX;p.y=e.pageY}}if(_isDragging){var touchesList=_getTouchPoints(e);if(!_direction&&!_moved&&!_isZooming){if(_mainScrollPos.x!==_slideSize.x*_currPositionIndex){_direction="h"}else{var diff=Math.abs(touchesList[0].x-_currPoint.x)-Math.abs(touchesList[0].y-_currPoint.y);if(Math.abs(diff)>=DIRECTION_CHECK_OFFSET){_direction=diff>0?"h":"v";_currentPoints=touchesList}}}else{_currentPoints=touchesList}}},_renderMovement=function(){if(!_currentPoints){return}var numPoints=_currentPoints.length;if(numPoints===0){return}_equalizePoints(p,_currentPoints[0]);delta.x=p.x-_currPoint.x;delta.y=p.y-_currPoint.y;if(_isZooming&&numPoints>1){_currPoint.x=p.x;_currPoint.y=p.y;if(!delta.x&&!delta.y&&_isEqualPoints(_currentPoints[1],p2)){return}_equalizePoints(p2,_currentPoints[1]);if(!_zoomStarted){_zoomStarted=true;_shout("zoomGestureStarted")}var pointsDistance=_calculatePointsDistance(p,p2);var zoomLevel=_calculateZoomLevel(pointsDistance);if(zoomLevel>self.currItem.initialZoomLevel+self.currItem.initialZoomLevel/15){_wasOverInitialZoom=true}var zoomFriction=1,minZoomLevel=_getMinZoomLevel(),maxZoomLevel=_getMaxZoomLevel();if(zoomLevel<minZoomLevel){if(_options.pinchToClose&&!_wasOverInitialZoom&&_startZoomLevel<=self.currItem.initialZoomLevel){var minusDiff=minZoomLevel-zoomLevel;var percent=1-minusDiff/(minZoomLevel/1.2);_applyBgOpacity(percent);_shout("onPinchClose",percent);_opacityChanged=true}else{zoomFriction=(minZoomLevel-zoomLevel)/minZoomLevel;if(zoomFriction>1){zoomFriction=1}zoomLevel=minZoomLevel-zoomFriction*(minZoomLevel/3)}}else if(zoomLevel>maxZoomLevel){zoomFriction=(zoomLevel-maxZoomLevel)/(minZoomLevel*6);if(zoomFriction>1){zoomFriction=1}zoomLevel=maxZoomLevel+zoomFriction*minZoomLevel}if(zoomFriction<0){zoomFriction=0}_currPointsDistance=pointsDistance;_findCenterOfPoints(p,p2,_centerPoint);_currPanDist.x+=_centerPoint.x-_currCenterPoint.x;_currPanDist.y+=_centerPoint.y-_currCenterPoint.y;_equalizePoints(_currCenterPoint,_centerPoint);_panOffset.x=_calculatePanOffset("x",zoomLevel);_panOffset.y=_calculatePanOffset("y",zoomLevel);_isZoomingIn=zoomLevel>_currZoomLevel;_currZoomLevel=zoomLevel;_applyCurrentZoomPan()}else{if(!_direction){return}if(_isFirstMove){_isFirstMove=false;if(Math.abs(delta.x)>=DIRECTION_CHECK_OFFSET){delta.x-=_currentPoints[0].x-_startPoint.x}if(Math.abs(delta.y)>=DIRECTION_CHECK_OFFSET){delta.y-=_currentPoints[0].y-_startPoint.y}}_currPoint.x=p.x;_currPoint.y=p.y;if(delta.x===0&&delta.y===0){return}if(_direction==="v"&&_options.closeOnVerticalDrag){if(!_canPan()){_currPanDist.y+=delta.y;_panOffset.y+=delta.y;var opacityRatio=_calculateVerticalDragOpacityRatio();_verticalDragInitiated=true;_shout("onVerticalDrag",opacityRatio);_applyBgOpacity(opacityRatio);_applyCurrentZoomPan();return}}_pushPosPoint(_getCurrentTime(),p.x,p.y);_moved=true;_currPanBounds=self.currItem.bounds;var mainScrollChanged=_panOrMoveMainScroll("x",delta);if(!mainScrollChanged){_panOrMoveMainScroll("y",delta);_roundPoint(_panOffset);_applyCurrentZoomPan()}}},_onDragRelease=function(e){if(_features.isOldAndroid){if(_oldAndroidTouchEndTimeout&&e.type==="mouseup"){return}if(e.type.indexOf("touch")>-1){clearTimeout(_oldAndroidTouchEndTimeout);_oldAndroidTouchEndTimeout=setTimeout(function(){_oldAndroidTouchEndTimeout=0},600)}}_shout("pointerUp");if(_preventDefaultEventBehaviour(e,false)){e.preventDefault()}var releasePoint;if(_pointerEventEnabled){var pointerIndex=framework.arraySearch(_currPointers,e.pointerId,"id");if(pointerIndex>-1){releasePoint=_currPointers.splice(pointerIndex,1)[0];if(navigator.msPointerEnabled){var MSPOINTER_TYPES={4:"mouse",2:"touch",3:"pen"};releasePoint.type=MSPOINTER_TYPES[e.pointerType];if(!releasePoint.type){releasePoint.type=e.pointerType||"mouse"}}else{releasePoint.type=e.pointerType||"mouse"}}}var touchList=_getTouchPoints(e),gestureType,numPoints=touchList.length;if(e.type==="mouseup"){numPoints=0}if(numPoints===2){_currentPoints=null;return true}if(numPoints===1){_equalizePoints(_startPoint,touchList[0])}if(numPoints===0&&!_direction&&!_mainScrollAnimating){if(!releasePoint){if(e.type==="mouseup"){releasePoint={x:e.pageX,y:e.pageY,type:"mouse"}}else if(e.changedTouches&&e.changedTouches[0]){releasePoint={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY,type:"touch"}}}_shout("touchRelease",e,releasePoint)}var releaseTimeDiff=-1;if(numPoints===0){_isDragging=false;framework.unbind(window,_upMoveEvents,self);_stopDragUpdateLoop();if(_isZooming){releaseTimeDiff=0}else if(_lastReleaseTime!==-1){releaseTimeDiff=_getCurrentTime()-_lastReleaseTime}}_lastReleaseTime=numPoints===1?_getCurrentTime():-1;if(releaseTimeDiff!==-1&&releaseTimeDiff<150){gestureType="zoom"}else{gestureType="swipe"}if(_isZooming&&numPoints<2){_isZooming=false;if(numPoints===1){gestureType="zoomPointerUp"}_shout("zoomGestureEnded")}_currentPoints=null;if(!_moved&&!_zoomStarted&&!_mainScrollAnimating&&!_verticalDragInitiated){return}_stopAllAnimations();if(!_releaseAnimData){_releaseAnimData=_initDragReleaseAnimationData()}_releaseAnimData.calculateSwipeSpeed("x");if(_verticalDragInitiated){var opacityRatio=_calculateVerticalDragOpacityRatio();if(opacityRatio<_options.verticalDragRange){self.close()}else{var initalPanY=_panOffset.y,initialBgOpacity=_bgOpacity;_animateProp("verticalDrag",0,1,300,framework.easing.cubic.out,function(now){_panOffset.y=(self.currItem.initialPosition.y-initalPanY)*now+initalPanY;_applyBgOpacity((1-initialBgOpacity)*now+initialBgOpacity);_applyCurrentZoomPan()});_shout("onVerticalDrag",1)}return}if((_mainScrollShifted||_mainScrollAnimating)&&numPoints===0){var itemChanged=_finishSwipeMainScrollGesture(gestureType,_releaseAnimData);if(itemChanged){return}gestureType="zoomPointerUp"}if(_mainScrollAnimating){return}if(gestureType!=="swipe"){_completeZoomGesture();return}if(!_mainScrollShifted&&_currZoomLevel>self.currItem.fitRatio){_completePanGesture(_releaseAnimData)}},_initDragReleaseAnimationData=function(){var lastFlickDuration,tempReleasePos;var s={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(axis){if(_posPoints.length>1){lastFlickDuration=_getCurrentTime()-_gestureCheckSpeedTime+50;tempReleasePos=_posPoints[_posPoints.length-2][axis]}else{lastFlickDuration=_getCurrentTime()-_gestureStartTime;tempReleasePos=_startPoint[axis]}s.lastFlickOffset[axis]=_currPoint[axis]-tempReleasePos;s.lastFlickDist[axis]=Math.abs(s.lastFlickOffset[axis]);if(s.lastFlickDist[axis]>20){s.lastFlickSpeed[axis]=s.lastFlickOffset[axis]/lastFlickDuration}else{s.lastFlickSpeed[axis]=0}if(Math.abs(s.lastFlickSpeed[axis])<.1){s.lastFlickSpeed[axis]=0}s.slowDownRatio[axis]=.95;s.slowDownRatioReverse[axis]=1-s.slowDownRatio[axis];s.speedDecelerationRatio[axis]=1},calculateOverBoundsAnimOffset:function(axis,speed){if(!s.backAnimStarted[axis]){if(_panOffset[axis]>_currPanBounds.min[axis]){s.backAnimDestination[axis]=_currPanBounds.min[axis]}else if(_panOffset[axis]<_currPanBounds.max[axis]){s.backAnimDestination[axis]=_currPanBounds.max[axis]}if(s.backAnimDestination[axis]!==undefined){s.slowDownRatio[axis]=.7;s.slowDownRatioReverse[axis]=1-s.slowDownRatio[axis];if(s.speedDecelerationRatioAbs[axis]<.05){s.lastFlickSpeed[axis]=0;s.backAnimStarted[axis]=true;_animateProp("bounceZoomPan"+axis,_panOffset[axis],s.backAnimDestination[axis],speed||300,framework.easing.sine.out,function(pos){_panOffset[axis]=pos;_applyCurrentZoomPan()})}}}},calculateAnimOffset:function(axis){if(!s.backAnimStarted[axis]){s.speedDecelerationRatio[axis]=s.speedDecelerationRatio[axis]*(s.slowDownRatio[axis]+s.slowDownRatioReverse[axis]-s.slowDownRatioReverse[axis]*s.timeDiff/10);s.speedDecelerationRatioAbs[axis]=Math.abs(s.lastFlickSpeed[axis]*s.speedDecelerationRatio[axis]);s.distanceOffset[axis]=s.lastFlickSpeed[axis]*s.speedDecelerationRatio[axis]*s.timeDiff;_panOffset[axis]+=s.distanceOffset[axis]}},panAnimLoop:function(){if(_animations.zoomPan){_animations.zoomPan.raf=_requestAF(s.panAnimLoop);s.now=_getCurrentTime();s.timeDiff=s.now-s.lastNow;s.lastNow=s.now;s.calculateAnimOffset("x");s.calculateAnimOffset("y");_applyCurrentZoomPan();s.calculateOverBoundsAnimOffset("x");s.calculateOverBoundsAnimOffset("y");if(s.speedDecelerationRatioAbs.x<.05&&s.speedDecelerationRatioAbs.y<.05){_panOffset.x=Math.round(_panOffset.x);_panOffset.y=Math.round(_panOffset.y);_applyCurrentZoomPan();_stopAnimation("zoomPan");return}}}};return s},_completePanGesture=function(animData){animData.calculateSwipeSpeed("y");_currPanBounds=self.currItem.bounds;animData.backAnimDestination={};animData.backAnimStarted={};if(Math.abs(animData.lastFlickSpeed.x)<=.05&&Math.abs(animData.lastFlickSpeed.y)<=.05){animData.speedDecelerationRatioAbs.x=animData.speedDecelerationRatioAbs.y=0;animData.calculateOverBoundsAnimOffset("x");animData.calculateOverBoundsAnimOffset("y");return true}_registerStartAnimation("zoomPan");animData.lastNow=_getCurrentTime();animData.panAnimLoop()},_finishSwipeMainScrollGesture=function(gestureType,_releaseAnimData){var itemChanged;if(!_mainScrollAnimating){_currZoomedItemIndex=_currentItemIndex}var itemsDiff;if(gestureType==="swipe"){var totalShiftDist=_currPoint.x-_startPoint.x,isFastLastFlick=_releaseAnimData.lastFlickDist.x<10;if(totalShiftDist>MIN_SWIPE_DISTANCE&&(isFastLastFlick||_releaseAnimData.lastFlickOffset.x>20)){itemsDiff=-1}else if(totalShiftDist<-MIN_SWIPE_DISTANCE&&(isFastLastFlick||_releaseAnimData.lastFlickOffset.x<-20)){itemsDiff=1}}var nextCircle;if(itemsDiff){_currentItemIndex+=itemsDiff;if(_currentItemIndex<0){_currentItemIndex=_options.loop?_getNumItems()-1:0;nextCircle=true}else if(_currentItemIndex>=_getNumItems()){_currentItemIndex=_options.loop?0:_getNumItems()-1;nextCircle=true}if(!nextCircle||_options.loop){_indexDiff+=itemsDiff;_currPositionIndex-=itemsDiff;itemChanged=true}}var animateToX=_slideSize.x*_currPositionIndex;var animateToDist=Math.abs(animateToX-_mainScrollPos.x);var finishAnimDuration;if(!itemChanged&&animateToX>_mainScrollPos.x!==_releaseAnimData.lastFlickSpeed.x>0){finishAnimDuration=333}else{finishAnimDuration=Math.abs(_releaseAnimData.lastFlickSpeed.x)>0?animateToDist/Math.abs(_releaseAnimData.lastFlickSpeed.x):333;finishAnimDuration=Math.min(finishAnimDuration,400);finishAnimDuration=Math.max(finishAnimDuration,250)}if(_currZoomedItemIndex===_currentItemIndex){itemChanged=false}_mainScrollAnimating=true;_shout("mainScrollAnimStart");_animateProp("mainScroll",_mainScrollPos.x,animateToX,finishAnimDuration,framework.easing.cubic.out,_moveMainScroll,function(){_stopAllAnimations();_mainScrollAnimating=false;_currZoomedItemIndex=-1;if(itemChanged||_currZoomedItemIndex!==_currentItemIndex){self.updateCurrItem()}_shout("mainScrollAnimComplete")});if(itemChanged){self.updateCurrItem(true)}return itemChanged},_calculateZoomLevel=function(touchesDistance){return 1/_startPointsDistance*touchesDistance*_startZoomLevel},_completeZoomGesture=function(){var destZoomLevel=_currZoomLevel,minZoomLevel=_getMinZoomLevel(),maxZoomLevel=_getMaxZoomLevel();if(_currZoomLevel<minZoomLevel){destZoomLevel=minZoomLevel}else if(_currZoomLevel>maxZoomLevel){destZoomLevel=maxZoomLevel}var destOpacity=1,onUpdate,initialOpacity=_bgOpacity;if(_opacityChanged&&!_isZoomingIn&&!_wasOverInitialZoom&&_currZoomLevel<minZoomLevel){self.close();return true}if(_opacityChanged){onUpdate=function(now){_applyBgOpacity((destOpacity-initialOpacity)*now+initialOpacity)}}self.zoomTo(destZoomLevel,0,200,framework.easing.cubic.out,onUpdate);return true};_registerModule("Gestures",{publicMethods:{initGestures:function(){var addEventNames=function(pref,down,move,up,cancel){_dragStartEvent=pref+down;_dragMoveEvent=pref+move;_dragEndEvent=pref+up;if(cancel){_dragCancelEvent=pref+cancel}else{_dragCancelEvent=""}};_pointerEventEnabled=_features.pointerEvent;if(_pointerEventEnabled&&_features.touch){_features.touch=false}if(_pointerEventEnabled){if(navigator.msPointerEnabled){addEventNames("MSPointer","Down","Move","Up","Cancel")}else{addEventNames("pointer","down","move","up","cancel")}}else if(_features.touch){addEventNames("touch","start","move","end","cancel");_likelyTouchDevice=true}else{addEventNames("mouse","down","move","up")}_upMoveEvents=_dragMoveEvent+" "+_dragEndEvent+" "+_dragCancelEvent;_downEvents=_dragStartEvent;if(_pointerEventEnabled&&!_likelyTouchDevice){_likelyTouchDevice=navigator.maxTouchPoints>1||navigator.msMaxTouchPoints>1}self.likelyTouchDevice=_likelyTouchDevice;_globalEventHandlers[_dragStartEvent]=_onDragStart;_globalEventHandlers[_dragMoveEvent]=_onDragMove;_globalEventHandlers[_dragEndEvent]=_onDragRelease;if(_dragCancelEvent){_globalEventHandlers[_dragCancelEvent]=_globalEventHandlers[_dragEndEvent]}if(_features.touch){_downEvents+=" mousedown";_upMoveEvents+=" mousemove mouseup";_globalEventHandlers.mousedown=_globalEventHandlers[_dragStartEvent];_globalEventHandlers.mousemove=_globalEventHandlers[_dragMoveEvent];_globalEventHandlers.mouseup=_globalEventHandlers[_dragEndEvent]}if(!_likelyTouchDevice){_options.allowPanToNext=false}}}});var _showOrHideTimeout,_showOrHide=function(item,img,out,completeFn){if(_showOrHideTimeout){clearTimeout(_showOrHideTimeout)}_initialZoomRunning=true;_initialContentSet=true;var thumbBounds;if(item.initialLayout){thumbBounds=item.initialLayout;item.initialLayout=null}else{thumbBounds=_options.getThumbBoundsFn&&_options.getThumbBoundsFn(_currentItemIndex)}var duration=out?_options.hideAnimationDuration:_options.showAnimationDuration;var onComplete=function(){_stopAnimation("initialZoom");if(!out){_applyBgOpacity(1);if(img){img.style.display="block"}framework.addClass(template,"pswp--animated-in");_shout("initialZoom"+(out?"OutEnd":"InEnd"))}else{self.template.removeAttribute("style");self.bg.removeAttribute("style")}if(completeFn){completeFn()}_initialZoomRunning=false};if(!duration||!thumbBounds||thumbBounds.x===undefined){_shout("initialZoom"+(out?"Out":"In"));_currZoomLevel=item.initialZoomLevel;_equalizePoints(_panOffset,item.initialPosition);_applyCurrentZoomPan();template.style.opacity=out?0:1;_applyBgOpacity(1);if(duration){setTimeout(function(){onComplete()},duration)}else{onComplete()}return}var startAnimation=function(){var closeWithRaf=_closedByScroll,fadeEverything=!self.currItem.src||self.currItem.loadError||_options.showHideOpacity;if(item.miniImg){item.miniImg.style.webkitBackfaceVisibility="hidden"}if(!out){_currZoomLevel=thumbBounds.w/item.w;_panOffset.x=thumbBounds.x;_panOffset.y=thumbBounds.y-_initalWindowScrollY;self[fadeEverything?"template":"bg"].style.opacity=.001;_applyCurrentZoomPan()}_registerStartAnimation("initialZoom");if(out&&!closeWithRaf){framework.removeClass(template,"pswp--animated-in")}if(fadeEverything){if(out){framework[(closeWithRaf?"remove":"add")+"Class"](template,"pswp--animate_opacity")}else{setTimeout(function(){framework.addClass(template,"pswp--animate_opacity")},30)}}_showOrHideTimeout=setTimeout(function(){_shout("initialZoom"+(out?"Out":"In"));if(!out){_currZoomLevel=item.initialZoomLevel;_equalizePoints(_panOffset,item.initialPosition);_applyCurrentZoomPan();_applyBgOpacity(1);if(fadeEverything){template.style.opacity=1}else{_applyBgOpacity(1)}_showOrHideTimeout=setTimeout(onComplete,duration+20)}else{var destZoomLevel=thumbBounds.w/item.w,initialPanOffset={x:_panOffset.x,y:_panOffset.y},initialZoomLevel=_currZoomLevel,initalBgOpacity=_bgOpacity,onUpdate=function(now){if(now===1){_currZoomLevel=destZoomLevel;_panOffset.x=thumbBounds.x;_panOffset.y=thumbBounds.y-_currentWindowScrollY}else{_currZoomLevel=(destZoomLevel-initialZoomLevel)*now+initialZoomLevel;_panOffset.x=(thumbBounds.x-initialPanOffset.x)*now+initialPanOffset.x;_panOffset.y=(thumbBounds.y-_currentWindowScrollY-initialPanOffset.y)*now+initialPanOffset.y}_applyCurrentZoomPan();if(fadeEverything){template.style.opacity=1-now}else{_applyBgOpacity(initalBgOpacity-now*initalBgOpacity)}};if(closeWithRaf){_animateProp("initialZoom",0,1,duration,framework.easing.cubic.out,onUpdate,onComplete)}else{onUpdate(1);_showOrHideTimeout=setTimeout(onComplete,duration+20)}}},out?25:90)};startAnimation()};var _items,_tempPanAreaSize={},_imagesToAppendPool=[],_initialContentSet,_initialZoomRunning,_controllerDefaultOptions={index:0,errorMsg:'<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>',forceProgressiveLoading:false,preload:[1,1],getNumItemsFn:function(){return _items.length}};var _getItemAt,_getNumItems,_initialIsLoop,_getZeroBounds=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},_calculateSingleItemPanBounds=function(item,realPanElementW,realPanElementH){var bounds=item.bounds;bounds.center.x=Math.round((_tempPanAreaSize.x-realPanElementW)/2);bounds.center.y=Math.round((_tempPanAreaSize.y-realPanElementH)/2)+item.vGap.top;bounds.max.x=realPanElementW>_tempPanAreaSize.x?Math.round(_tempPanAreaSize.x-realPanElementW):bounds.center.x;bounds.max.y=realPanElementH>_tempPanAreaSize.y?Math.round(_tempPanAreaSize.y-realPanElementH)+item.vGap.top:bounds.center.y;bounds.min.x=realPanElementW>_tempPanAreaSize.x?0:bounds.center.x;bounds.min.y=realPanElementH>_tempPanAreaSize.y?item.vGap.top:bounds.center.y},_calculateItemSize=function(item,viewportSize,zoomLevel){if(item.src&&!item.loadError){var isInitial=!zoomLevel;if(isInitial){if(!item.vGap){item.vGap={top:0,bottom:0}}_shout("parseVerticalMargin",item)}_tempPanAreaSize.x=viewportSize.x;_tempPanAreaSize.y=viewportSize.y-item.vGap.top-item.vGap.bottom;if(isInitial){var hRatio=_tempPanAreaSize.x/item.w;var vRatio=_tempPanAreaSize.y/item.h;item.fitRatio=hRatio<vRatio?hRatio:vRatio;var scaleMode=_options.scaleMode;if(scaleMode==="orig"){zoomLevel=1}else if(scaleMode==="fit"){zoomLevel=item.fitRatio}if(zoomLevel>1){zoomLevel=1}item.initialZoomLevel=zoomLevel;if(!item.bounds){item.bounds=_getZeroBounds()}}if(!zoomLevel){return}_calculateSingleItemPanBounds(item,item.w*zoomLevel,item.h*zoomLevel);if(isInitial&&zoomLevel===item.initialZoomLevel){item.initialPosition=item.bounds.center}return item.bounds}else{item.w=item.h=0;item.initialZoomLevel=item.fitRatio=1;item.bounds=_getZeroBounds();item.initialPosition=item.bounds.center;return item.bounds}},_appendImage=function(index,item,baseDiv,img,preventAnimation,keepPlaceholder){if(item.loadError){return}if(img){item.imageAppended=true;_setImageSize(item,img,item===self.currItem&&_renderMaxResolution);baseDiv.appendChild(img);if(keepPlaceholder){setTimeout(function(){if(item&&item.loaded&&item.placeholder){item.placeholder.style.display="none";item.placeholder=null}},500)}}},_preloadImage=function(item){item.loading=true;item.loaded=false;var img=item.img=framework.createEl("pswp__img","img");var onComplete=function(){item.loading=false;item.loaded=true;if(item.loadComplete){item.loadComplete(item)}else{item.img=null}img.onload=img.onerror=null;img=null};img.onload=onComplete;img.onerror=function(){item.loadError=true;onComplete()};img.src=item.src;return img},_checkForError=function(item,cleanUp){if(item.src&&item.loadError&&item.container){if(cleanUp){item.container.innerHTML=""}item.container.innerHTML=_options.errorMsg.replace("%url%",item.src);return true}},_setImageSize=function(item,img,maxRes){if(!item.src){return}if(!img){img=item.container.lastChild}var w=maxRes?item.w:Math.round(item.w*item.fitRatio),h=maxRes?item.h:Math.round(item.h*item.fitRatio);if(item.placeholder&&!item.loaded){item.placeholder.style.width=w+"px";item.placeholder.style.height=h+"px"}img.style.width=w+"px";img.style.height=h+"px"},_appendImagesPool=function(){if(_imagesToAppendPool.length){var poolItem;for(var i=0;i<_imagesToAppendPool.length;i++){poolItem=_imagesToAppendPool[i];if(poolItem.holder.index===poolItem.index){_appendImage(poolItem.index,poolItem.item,poolItem.baseDiv,poolItem.img,false,poolItem.clearPlaceholder)}}_imagesToAppendPool=[]}};_registerModule("Controller",{publicMethods:{lazyLoadItem:function(index){index=_getLoopedId(index);var item=_getItemAt(index);if(!item||(item.loaded||item.loading)&&!_itemsNeedUpdate){return}_shout("gettingData",index,item);if(!item.src){return}_preloadImage(item)},initController:function(){framework.extend(_options,_controllerDefaultOptions,true);self.items=_items=items;_getItemAt=self.getItemAt;_getNumItems=_options.getNumItemsFn;_initialIsLoop=_options.loop;if(_getNumItems()<3){_options.loop=false}_listen("beforeChange",function(diff){var p=_options.preload,isNext=diff===null?true:diff>=0,preloadBefore=Math.min(p[0],_getNumItems()),preloadAfter=Math.min(p[1],_getNumItems()),i;for(i=1;i<=(isNext?preloadAfter:preloadBefore);i++){self.lazyLoadItem(_currentItemIndex+i)}for(i=1;i<=(isNext?preloadBefore:preloadAfter);i++){self.lazyLoadItem(_currentItemIndex-i)}});_listen("initialLayout",function(){self.currItem.initialLayout=_options.getThumbBoundsFn&&_options.getThumbBoundsFn(_currentItemIndex)});_listen("mainScrollAnimComplete",_appendImagesPool);_listen("initialZoomInEnd",_appendImagesPool);_listen("destroy",function(){var item;for(var i=0;i<_items.length;i++){item=_items[i];if(item.container){item.container=null}if(item.placeholder){item.placeholder=null}if(item.img){item.img=null}if(item.preloader){item.preloader=null}if(item.loadError){item.loaded=item.loadError=false}}_imagesToAppendPool=null})},getItemAt:function(index){if(index>=0){return _items[index]!==undefined?_items[index]:false}return false},allowProgressiveImg:function(){return _options.forceProgressiveLoading||!_likelyTouchDevice||_options.mouseUsed||screen.width>1200},setContent:function(holder,index){if(_options.loop){index=_getLoopedId(index)}var prevItem=self.getItemAt(holder.index);if(prevItem){prevItem.container=null}var item=self.getItemAt(index),img;if(!item){holder.el.innerHTML="";return}_shout("gettingData",index,item);holder.index=index;holder.item=item;var baseDiv=item.container=framework.createEl("pswp__zoom-wrap");if(!item.src&&item.html){if(item.html.tagName){baseDiv.appendChild(item.html)}else{baseDiv.innerHTML=item.html}}_checkForError(item);_calculateItemSize(item,_viewportSize);if(item.src&&!item.loadError&&!item.loaded){item.loadComplete=function(item){if(!_isOpen){return}if(holder&&holder.index===index){if(_checkForError(item,true)){item.loadComplete=item.img=null;_calculateItemSize(item,_viewportSize);_applyZoomPanToItem(item);if(holder.index===_currentItemIndex){self.updateCurrZoomItem()}return}if(!item.imageAppended){if(_features.transform&&(_mainScrollAnimating||_initialZoomRunning)){_imagesToAppendPool.push({item:item,baseDiv:baseDiv,img:item.img,index:index,holder:holder,clearPlaceholder:true})}else{_appendImage(index,item,baseDiv,item.img,_mainScrollAnimating||_initialZoomRunning,true)}}else{if(!_initialZoomRunning&&item.placeholder){item.placeholder.style.display="none";item.placeholder=null}}}item.loadComplete=null;item.img=null;_shout("imageLoadComplete",index,item)};if(framework.features.transform){var placeholderClassName="pswp__img pswp__img--placeholder";placeholderClassName+=item.msrc?"":" pswp__img--placeholder--blank";var placeholder=framework.createEl(placeholderClassName,item.msrc?"img":"");if(item.msrc){placeholder.src=item.msrc}_setImageSize(item,placeholder);baseDiv.appendChild(placeholder);item.placeholder=placeholder}if(!item.loading){_preloadImage(item)}if(self.allowProgressiveImg()){if(!_initialContentSet&&_features.transform){_imagesToAppendPool.push({item:item,baseDiv:baseDiv,img:item.img,index:index,holder:holder})}else{_appendImage(index,item,baseDiv,item.img,true,true)}}}else if(item.src&&!item.loadError){img=framework.createEl("pswp__img","img");img.style.opacity=1;img.src=item.src;_setImageSize(item,img);_appendImage(index,item,baseDiv,img,true)}if(!_initialContentSet&&index===_currentItemIndex){_currZoomElementStyle=baseDiv.style;_showOrHide(item,img||item.img)}else{_applyZoomPanToItem(item)}holder.el.innerHTML="";holder.el.appendChild(baseDiv)},cleanSlide:function(item){if(item.img){item.img.onload=item.img.onerror=null}item.loaded=item.loading=item.img=item.imageAppended=false}}});var tapTimer,tapReleasePoint={},_dispatchTapEvent=function(origEvent,releasePoint,pointerType){var e=document.createEvent("CustomEvent"),eDetail={origEvent:origEvent,target:origEvent.target,releasePoint:releasePoint,pointerType:pointerType||"touch"};e.initCustomEvent("pswpTap",true,true,eDetail);origEvent.target.dispatchEvent(e)};_registerModule("Tap",{publicMethods:{initTap:function(){_listen("firstTouchStart",self.onTapStart);_listen("touchRelease",self.onTapRelease);_listen("destroy",function(){tapReleasePoint={};tapTimer=null})},onTapStart:function(touchList){if(touchList.length>1){clearTimeout(tapTimer);tapTimer=null}},onTapRelease:function(e,releasePoint){if(!releasePoint){return}if(!_moved&&!_isMultitouch&&!_numAnimations){var p0=releasePoint;if(tapTimer){clearTimeout(tapTimer);tapTimer=null;if(_isNearbyPoints(p0,tapReleasePoint)){_shout("doubleTap",p0);return}}if(releasePoint.type==="mouse"){_dispatchTapEvent(e,releasePoint,"mouse");return}var clickedTagName=e.target.tagName.toUpperCase();if(clickedTagName==="BUTTON"||framework.hasClass(e.target,"pswp__single-tap")){_dispatchTapEvent(e,releasePoint);return}_equalizePoints(tapReleasePoint,p0);tapTimer=setTimeout(function(){_dispatchTapEvent(e,releasePoint);tapTimer=null},300)}}}});var _wheelDelta;_registerModule("DesktopZoom",{publicMethods:{initDesktopZoom:function(){if(_oldIE){return}if(_likelyTouchDevice){_listen("mouseUsed",function(){self.setupDesktopZoom()})}else{self.setupDesktopZoom(true)}},setupDesktopZoom:function(onInit){_wheelDelta={};var events="wheel mousewheel DOMMouseScroll";_listen("bindEvents",function(){framework.bind(template,events,self.handleMouseWheel)});_listen("unbindEvents",function(){if(_wheelDelta){framework.unbind(template,events,self.handleMouseWheel)}});self.mouseZoomedIn=false;var hasDraggingClass,updateZoomable=function(){if(self.mouseZoomedIn){framework.removeClass(template,"pswp--zoomed-in");self.mouseZoomedIn=false}if(_currZoomLevel<1){framework.addClass(template,"pswp--zoom-allowed")}else{framework.removeClass(template,"pswp--zoom-allowed")}removeDraggingClass()},removeDraggingClass=function(){if(hasDraggingClass){framework.removeClass(template,"pswp--dragging");hasDraggingClass=false}};_listen("resize",updateZoomable);_listen("afterChange",updateZoomable);_listen("pointerDown",function(){if(self.mouseZoomedIn){hasDraggingClass=true;framework.addClass(template,"pswp--dragging")}});_listen("pointerUp",removeDraggingClass);if(!onInit){updateZoomable()}},handleMouseWheel:function(e){if(_currZoomLevel<=self.currItem.fitRatio){if(_options.modal){if(!_options.closeOnScroll||_numAnimations||_isDragging){e.preventDefault()}else if(_transformKey&&Math.abs(e.deltaY)>2){_closedByScroll=true;self.close()}}return true}e.stopPropagation();_wheelDelta.x=0;if("deltaX"in e){if(e.deltaMode===1){_wheelDelta.x=e.deltaX*18;_wheelDelta.y=e.deltaY*18}else{_wheelDelta.x=e.deltaX;_wheelDelta.y=e.deltaY}}else if("wheelDelta"in e){if(e.wheelDeltaX){_wheelDelta.x=-.16*e.wheelDeltaX}if(e.wheelDeltaY){_wheelDelta.y=-.16*e.wheelDeltaY}else{_wheelDelta.y=-.16*e.wheelDelta}}else if("detail"in e){_wheelDelta.y=e.detail}else{return}_calculatePanBounds(_currZoomLevel,true);var newPanX=_panOffset.x-_wheelDelta.x,newPanY=_panOffset.y-_wheelDelta.y;if(_options.modal||newPanX<=_currPanBounds.min.x&&newPanX>=_currPanBounds.max.x&&newPanY<=_currPanBounds.min.y&&newPanY>=_currPanBounds.max.y){e.preventDefault()}self.panTo(newPanX,newPanY)},toggleDesktopZoom:function(centerPoint){centerPoint=centerPoint||{x:_viewportSize.x/2+_offset.x,y:_viewportSize.y/2+_offset.y};var doubleTapZoomLevel=_options.getDoubleTapZoom(true,self.currItem);var zoomOut=_currZoomLevel===doubleTapZoomLevel;self.mouseZoomedIn=!zoomOut;self.zoomTo(zoomOut?self.currItem.initialZoomLevel:doubleTapZoomLevel,centerPoint,333);framework[(!zoomOut?"add":"remove")+"Class"](template,"pswp--zoomed-in")}}});var _historyDefaultOptions={history:true,galleryUID:1};var _historyUpdateTimeout,_hashChangeTimeout,_hashAnimCheckTimeout,_hashChangedByScript,_hashChangedByHistory,_hashReseted,_initialHash,_historyChanged,_closedFromURL,_urlChangedOnce,_windowLoc,_supportsPushState,_getHash=function(){return _windowLoc.hash.substring(1)},_cleanHistoryTimeouts=function(){if(_historyUpdateTimeout){clearTimeout(_historyUpdateTimeout)}if(_hashAnimCheckTimeout){clearTimeout(_hashAnimCheckTimeout)}},_parseItemIndexFromURL=function(){var hash=_getHash(),params={};if(hash.length<5){return params}var i,vars=hash.split("&");for(i=0;i<vars.length;i++){if(!vars[i]){continue}var pair=vars[i].split("=");if(pair.length<2){continue}params[pair[0]]=pair[1]}if(_options.galleryPIDs){var searchfor=params.pid;params.pid=0;for(i=0;i<_items.length;i++){if(_items[i].pid===searchfor){params.pid=i;break}}}else{params.pid=parseInt(params.pid,10)-1}if(params.pid<0){params.pid=0}return params},_updateHash=function(){if(_hashAnimCheckTimeout){clearTimeout(_hashAnimCheckTimeout)}if(_numAnimations||_isDragging){_hashAnimCheckTimeout=setTimeout(_updateHash,500);return}if(_hashChangedByScript){clearTimeout(_hashChangeTimeout)}else{_hashChangedByScript=true}var pid=_currentItemIndex+1;var item=_getItemAt(_currentItemIndex);if(item.hasOwnProperty("pid")){pid=item.pid}var newHash=_initialHash+"&"+"gid="+_options.galleryUID+"&"+"pid="+pid;if(!_historyChanged){if(_windowLoc.hash.indexOf(newHash)===-1){_urlChangedOnce=true}}var newURL=_windowLoc.href.split("#")[0]+"#"+newHash;if(_supportsPushState){if("#"+newHash!==window.location.hash){history[_historyChanged?"replaceState":"pushState"]("",document.title,newURL)}}else{if(_historyChanged){_windowLoc.replace(newURL)}else{_windowLoc.hash=newHash}}_historyChanged=true;_hashChangeTimeout=setTimeout(function(){_hashChangedByScript=false},60)};_registerModule("History",{publicMethods:{initHistory:function(){framework.extend(_options,_historyDefaultOptions,true);if(!_options.history){return}_windowLoc=window.location;_urlChangedOnce=false;_closedFromURL=false;_historyChanged=false;_initialHash=_getHash();_supportsPushState="pushState"in history;if(_initialHash.indexOf("gid=")>-1){_initialHash=_initialHash.split("&gid=")[0];_initialHash=_initialHash.split("?gid=")[0]}_listen("afterChange",self.updateURL);_listen("unbindEvents",function(){framework.unbind(window,"hashchange",self.onHashChange)});var returnToOriginal=function(){_hashReseted=true;if(!_closedFromURL){if(_urlChangedOnce){history.back()}else{if(_initialHash){_windowLoc.hash=_initialHash}else{if(_supportsPushState){history.pushState("",document.title,_windowLoc.pathname+_windowLoc.search)}else{_windowLoc.hash=""}}}}_cleanHistoryTimeouts()};_listen("unbindEvents",function(){if(_closedByScroll){returnToOriginal()}});_listen("destroy",function(){if(!_hashReseted){returnToOriginal()}});_listen("firstUpdate",function(){_currentItemIndex=_parseItemIndexFromURL().pid});var index=_initialHash.indexOf("pid=");if(index>-1){_initialHash=_initialHash.substring(0,index);if(_initialHash.slice(-1)==="&"){_initialHash=_initialHash.slice(0,-1)}}setTimeout(function(){if(_isOpen){framework.bind(window,"hashchange",self.onHashChange)}},40)},onHashChange:function(){if(_getHash()===_initialHash){_closedFromURL=true;self.close();return}if(!_hashChangedByScript){_hashChangedByHistory=true;self.goTo(_parseItemIndexFromURL().pid);_hashChangedByHistory=false}},updateURL:function(){_cleanHistoryTimeouts();if(_hashChangedByHistory){return}if(!_historyChanged){_updateHash()}else{_historyUpdateTimeout=setTimeout(_updateHash,800)}}}});framework.extend(self,publicMethods)};return PhotoSwipe});
(function(root,factory){if(typeof define==="function"&&define.amd){define(factory)}else if(typeof exports==="object"){module.exports=factory()}else{root.PhotoSwipeUI_Default=factory()}})(this,function(){"use strict";var PhotoSwipeUI_Default=function(pswp,framework){var ui=this;var _overlayUIUpdated=false,_controlsVisible=true,_fullscrenAPI,_controls,_captionContainer,_fakeCaptionContainer,_indexIndicator,_shareButton,_shareModal,_shareModalHidden=true,_initalCloseOnScrollValue,_isIdle,_listen,_loadingIndicator,_loadingIndicatorHidden,_loadingIndicatorTimeout,_galleryHasOneSlide,_options,_defaultUIOptions={barsSize:{top:15,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(item,captionEl){if(!item.title){captionEl.children[0].innerHTML="";return false}captionEl.children[0].innerHTML=item.title;return true},closeEl:true,captionEl:true,fullscreenEl:false,zoomEl:false,shareEl:false,counterEl:false,arrowEl:true,preloaderEl:false,tapToClose:false,tapToToggleControls:false,clickToCloseNonZoomable:true,getImageURLForShare:function(){return pswp.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return pswp.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},_blockControlsTap,_blockControlsTapTimeout;var _onControlsTap=function(e){if(_blockControlsTap){return true}e=e||window.event;if(_options.timeToIdle&&_options.mouseUsed&&!_isIdle){_onIdleMouseMove()}var target=e.target||e.srcElement,uiElement,clickedClass=target.getAttribute("class")||"",found;for(var i=0;i<_uiElements.length;i++){uiElement=_uiElements[i];if(uiElement.onTap&&clickedClass.indexOf("pswp__"+uiElement.name)>-1){uiElement.onTap();found=true}}if(found){if(e.stopPropagation){e.stopPropagation()}_blockControlsTap=true;var tapDelay=framework.features.isOldAndroid?600:30;_blockControlsTapTimeout=setTimeout(function(){_blockControlsTap=false},tapDelay)}},_fitControlsInViewport=function(){return!pswp.likelyTouchDevice||_options.mouseUsed||screen.width>_options.fitControlsWidth},_togglePswpClass=function(el,cName,add){framework[(add?"add":"remove")+"Class"](el,"pswp__"+cName)},_countNumItems=function(){var hasOneSlide=_options.getNumItemsFn()===1;if(hasOneSlide!==_galleryHasOneSlide){_togglePswpClass(_controls,"ui--one-slide",hasOneSlide);_galleryHasOneSlide=hasOneSlide}},_toggleShareModalClass=function(){_togglePswpClass(_shareModal,"share-modal--hidden",_shareModalHidden)},_toggleShareModal=function(){_shareModalHidden=!_shareModalHidden;if(!_shareModalHidden){_toggleShareModalClass();setTimeout(function(){if(!_shareModalHidden){framework.addClass(_shareModal,"pswp__share-modal--fade-in")}},30)}else{framework.removeClass(_shareModal,"pswp__share-modal--fade-in");setTimeout(function(){if(_shareModalHidden){_toggleShareModalClass()}},300)}if(!_shareModalHidden){_updateShareURLs()}return false},_openWindowPopup=function(e){e=e||window.event;var target=e.target||e.srcElement;pswp.shout("shareLinkClick",e,target);if(!target.href){return false}if(target.hasAttribute("download")){return true}window.open(target.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,"+"location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100));if(!_shareModalHidden){_toggleShareModal()}return false},_updateShareURLs=function(){var shareButtonOut="",shareButtonData,shareURL,image_url,page_url,share_text;for(var i=0;i<_options.shareButtons.length;i++){shareButtonData=_options.shareButtons[i];image_url=_options.getImageURLForShare(shareButtonData);page_url=_options.getPageURLForShare(shareButtonData);share_text=_options.getTextForShare(shareButtonData);shareURL=shareButtonData.url.replace("{{url}}",encodeURIComponent(page_url)).replace("{{image_url}}",encodeURIComponent(image_url)).replace("{{raw_image_url}}",image_url).replace("{{text}}",encodeURIComponent(share_text));shareButtonOut+='<a href="'+shareURL+'" target="_blank" '+'class="pswp__share--'+shareButtonData.id+'"'+(shareButtonData.download?"download":"")+">"+shareButtonData.label+"</a>";if(_options.parseShareButtonOut){shareButtonOut=_options.parseShareButtonOut(shareButtonData,shareButtonOut)}}_shareModal.children[0].innerHTML=shareButtonOut;_shareModal.children[0].onclick=_openWindowPopup},_hasCloseClass=function(target){for(var i=0;i<_options.closeElClasses.length;i++){if(framework.hasClass(target,"pswp__"+_options.closeElClasses[i])){return true}}},_idleInterval,_idleTimer,_idleIncrement=0,_onIdleMouseMove=function(){clearTimeout(_idleTimer);_idleIncrement=0;if(_isIdle){ui.setIdle(false)}},_onMouseLeaveWindow=function(e){e=e?e:window.event;var from=e.relatedTarget||e.toElement;if(!from||from.nodeName==="HTML"){clearTimeout(_idleTimer);_idleTimer=setTimeout(function(){ui.setIdle(true)},_options.timeToIdleOutside)}},_setupFullscreenAPI=function(){if(_options.fullscreenEl&&!framework.features.isOldAndroid){if(!_fullscrenAPI){_fullscrenAPI=ui.getFullscreenAPI()}if(_fullscrenAPI){framework.bind(document,_fullscrenAPI.eventK,ui.updateFullscreen);ui.updateFullscreen();framework.addClass(pswp.template,"pswp--supports-fs")}else{framework.removeClass(pswp.template,"pswp--supports-fs")}}},_setupLoadingIndicator=function(){if(_options.preloaderEl){_toggleLoadingIndicator(true);_listen("beforeChange",function(){clearTimeout(_loadingIndicatorTimeout);_loadingIndicatorTimeout=setTimeout(function(){if(pswp.currItem&&pswp.currItem.loading){if(!pswp.allowProgressiveImg()||pswp.currItem.img&&!pswp.currItem.img.naturalWidth){_toggleLoadingIndicator(false)}}else{_toggleLoadingIndicator(true)}},_options.loadingIndicatorDelay)});_listen("imageLoadComplete",function(index,item){if(pswp.currItem===item){_toggleLoadingIndicator(true)}})}},_toggleLoadingIndicator=function(hide){if(_loadingIndicatorHidden!==hide){_togglePswpClass(_loadingIndicator,"preloader--active",!hide);_loadingIndicatorHidden=hide}},_applyNavBarGaps=function(item){var gap=item.vGap;if(_fitControlsInViewport()){var bars=_options.barsSize;if(_options.captionEl&&bars.bottom==="auto"){if(!_fakeCaptionContainer){_fakeCaptionContainer=framework.createEl("pswp__caption pswp__caption--fake");_fakeCaptionContainer.appendChild(framework.createEl("pswp__caption__center"));_controls.insertBefore(_fakeCaptionContainer,_captionContainer);framework.addClass(_controls,"pswp__ui--fit")}if(_options.addCaptionHTMLFn(item,_fakeCaptionContainer,true)){var captionSize=_fakeCaptionContainer.clientHeight;gap.bottom=parseInt(captionSize,10)||44}else{gap.bottom=bars.top}}else{gap.bottom=bars.bottom==="auto"?0:bars.bottom}gap.top=bars.top}else{gap.top=gap.bottom=0}},_setupIdle=function(){if(_options.timeToIdle){_listen("mouseUsed",function(){framework.bind(document,"mousemove",_onIdleMouseMove);framework.bind(document,"mouseout",_onMouseLeaveWindow);_idleInterval=setInterval(function(){_idleIncrement++;if(_idleIncrement===2){ui.setIdle(true)}},_options.timeToIdle/2)})}},_setupHidingControlsDuringGestures=function(){_listen("onVerticalDrag",function(now){if(_controlsVisible&&now<.95){ui.hideControls()}else if(!_controlsVisible&&now>=.95){ui.showControls()}});var pinchControlsHidden;_listen("onPinchClose",function(now){if(_controlsVisible&&now<.9){ui.hideControls();pinchControlsHidden=true}else if(pinchControlsHidden&&!_controlsVisible&&now>.9){ui.showControls()}});_listen("zoomGestureEnded",function(){pinchControlsHidden=false;if(pinchControlsHidden&&!_controlsVisible){ui.showControls()}})};var _uiElements=[{name:"caption",option:"captionEl",onInit:function(el){_captionContainer=el}},{name:"share-modal",option:"shareEl",onInit:function(el){_shareModal=el},onTap:function(){_toggleShareModal()}},{name:"button--share",option:"shareEl",onInit:function(el){_shareButton=el},onTap:function(){_toggleShareModal()}},{name:"button--zoom",option:"zoomEl",onTap:pswp.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(el){_indexIndicator=el}},{name:"button--close",option:"closeEl",onTap:pswp.close},{name:"button--arrow--left",option:"arrowEl",onTap:pswp.prev},{name:"button--arrow--right",option:"arrowEl",onTap:pswp.next},{name:"button--fs",option:"fullscreenEl",onTap:function(){if(_fullscrenAPI.isFullscreen()){_fullscrenAPI.exit()}else{_fullscrenAPI.enter()}}},{name:"preloader",option:"preloaderEl",onInit:function(el){_loadingIndicator=el}}];var _setupUIElements=function(){var item,classAttr,uiElement;var loopThroughChildElements=function(sChildren){if(!sChildren){return}var l=sChildren.length;for(var i=0;i<l;i++){item=sChildren[i];classAttr=item.className;for(var a=0;a<_uiElements.length;a++){uiElement=_uiElements[a];if(classAttr.indexOf("pswp__"+uiElement.name)>-1){if(_options[uiElement.option]){framework.removeClass(item,"pswp__element--disabled");if(uiElement.onInit){uiElement.onInit(item)}}else{framework.addClass(item,"pswp__element--disabled")}}}}};loopThroughChildElements(_controls.children);var topBar=framework.getChildByClass(_controls,"pswp__top-bar");if(topBar){loopThroughChildElements(topBar.children)}};ui.init=function(){framework.extend(pswp.options,_defaultUIOptions,true);_options=pswp.options;_controls=framework.getChildByClass(pswp.scrollWrap,"pswp__ui");_listen=pswp.listen;_setupHidingControlsDuringGestures();_listen("beforeChange",ui.update);_listen("doubleTap",function(point){var initialZoomLevel=pswp.currItem.initialZoomLevel;if(pswp.getZoomLevel()!==initialZoomLevel){pswp.zoomTo(initialZoomLevel,point,333)}else{pswp.zoomTo(_options.getDoubleTapZoom(false,pswp.currItem),point,333)}});_listen("preventDragEvent",function(e,isDown,preventObj){var t=e.target||e.srcElement;if(t&&t.getAttribute("class")&&e.type.indexOf("mouse")>-1&&(t.getAttribute("class").indexOf("__caption")>0||/(SMALL|STRONG|EM)/i.test(t.tagName))){preventObj.prevent=false}});_listen("bindEvents",function(){framework.bind(_controls,"pswpTap click",_onControlsTap);framework.bind(pswp.scrollWrap,"pswpTap",ui.onGlobalTap);if(!pswp.likelyTouchDevice){framework.bind(pswp.scrollWrap,"mouseover",ui.onMouseOver)}});_listen("unbindEvents",function(){if(!_shareModalHidden){_toggleShareModal()}if(_idleInterval){clearInterval(_idleInterval)}framework.unbind(document,"mouseout",_onMouseLeaveWindow);framework.unbind(document,"mousemove",_onIdleMouseMove);framework.unbind(_controls,"pswpTap click",_onControlsTap);framework.unbind(pswp.scrollWrap,"pswpTap",ui.onGlobalTap);framework.unbind(pswp.scrollWrap,"mouseover",ui.onMouseOver);if(_fullscrenAPI){framework.unbind(document,_fullscrenAPI.eventK,ui.updateFullscreen);if(_fullscrenAPI.isFullscreen()){_options.hideAnimationDuration=0;_fullscrenAPI.exit()}_fullscrenAPI=null}});_listen("destroy",function(){if(_options.captionEl){if(_fakeCaptionContainer){_controls.removeChild(_fakeCaptionContainer)}framework.removeClass(_captionContainer,"pswp__caption--empty")}if(_shareModal){_shareModal.children[0].onclick=null}framework.removeClass(_controls,"pswp__ui--over-close");framework.addClass(_controls,"pswp__ui--hidden");ui.setIdle(false)});if(!_options.showAnimationDuration){framework.removeClass(_controls,"pswp__ui--hidden")}_listen("initialZoomIn",function(){if(_options.showAnimationDuration){framework.removeClass(_controls,"pswp__ui--hidden")}});_listen("initialZoomOut",function(){framework.addClass(_controls,"pswp__ui--hidden")});_listen("parseVerticalMargin",_applyNavBarGaps);_setupUIElements();if(_options.shareEl&&_shareButton&&_shareModal){_shareModalHidden=true}_countNumItems();_setupIdle();_setupFullscreenAPI();_setupLoadingIndicator()};ui.setIdle=function(isIdle){_isIdle=isIdle;_togglePswpClass(_controls,"ui--idle",isIdle)};ui.update=function(){if(_controlsVisible&&pswp.currItem){ui.updateIndexIndicator();if(_options.captionEl){_options.addCaptionHTMLFn(pswp.currItem,_captionContainer);_togglePswpClass(_captionContainer,"caption--empty",!pswp.currItem.title)}_overlayUIUpdated=true}else{_overlayUIUpdated=false}if(!_shareModalHidden){_toggleShareModal()}_countNumItems()};ui.updateFullscreen=function(e){if(e){setTimeout(function(){pswp.setScrollOffset(0,framework.getScrollY())},50)}framework[(_fullscrenAPI.isFullscreen()?"add":"remove")+"Class"](pswp.template,"pswp--fs")};ui.updateIndexIndicator=function(){if(_options.counterEl){_indexIndicator.innerHTML=pswp.getCurrentIndex()+1+_options.indexIndicatorSep+_options.getNumItemsFn()}};ui.onGlobalTap=function(e){e=e||window.event;var target=e.target||e.srcElement;if(_blockControlsTap){return}if(e.detail&&e.detail.pointerType==="mouse"){if(_hasCloseClass(target)){pswp.close();return}if(framework.hasClass(target,"pswp__img")){if(pswp.getZoomLevel()===1&&pswp.getZoomLevel()<=pswp.currItem.fitRatio){if(_options.clickToCloseNonZoomable){pswp.close()}}else{pswp.toggleDesktopZoom(e.detail.releasePoint)}}}else{if(_options.tapToToggleControls){if(_controlsVisible){ui.hideControls()}else{ui.showControls()}}if(_options.tapToClose&&(framework.hasClass(target,"pswp__img")||_hasCloseClass(target))){pswp.close();return}}};ui.onMouseOver=function(e){e=e||window.event;var target=e.target||e.srcElement;_togglePswpClass(_controls,"ui--over-close",_hasCloseClass(target))};ui.hideControls=function(){framework.addClass(_controls,"pswp__ui--hidden");_controlsVisible=false};ui.showControls=function(){_controlsVisible=true;if(!_overlayUIUpdated){ui.update()}framework.removeClass(_controls,"pswp__ui--hidden")};ui.supportsFullscreen=function(){var d=document;return!!(d.exitFullscreen||d.mozCancelFullScreen||d.webkitExitFullscreen||d.msExitFullscreen)};ui.getFullscreenAPI=function(){var dE=document.documentElement,api,tF="fullscreenchange";if(dE.requestFullscreen){api={enterK:"requestFullscreen",exitK:"exitFullscreen",elementK:"fullscreenElement",eventK:tF}}else if(dE.mozRequestFullScreen){api={enterK:"mozRequestFullScreen",exitK:"mozCancelFullScreen",elementK:"mozFullScreenElement",eventK:"moz"+tF}}else if(dE.webkitRequestFullscreen){api={enterK:"webkitRequestFullscreen",exitK:"webkitExitFullscreen",elementK:"webkitFullscreenElement",eventK:"webkit"+tF}}else if(dE.msRequestFullscreen){api={enterK:"msRequestFullscreen",exitK:"msExitFullscreen",elementK:"msFullscreenElement",eventK:"MSFullscreenChange"}}if(api){api.enter=function(){_initalCloseOnScrollValue=_options.closeOnScroll;_options.closeOnScroll=false;if(this.enterK==="webkitRequestFullscreen"){pswp.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)}else{return pswp.template[this.enterK]()}};api.exit=function(){_options.closeOnScroll=_initalCloseOnScrollValue;return document[this.exitK]()};api.isFullscreen=function(){return document[this.elementK]}}return api}};return PhotoSwipeUI_Default});
/*
Real3D FlipBook
version 3.32
author http://codecanyon.net/user/creativeinteractivemedia/portfolio?ref=creativeinteractivemedia
*/
var FLIPBOOK=FLIPBOOK||{};!function(e,t,o,i){e.fn.flipBook=function(e){return new FLIPBOOK.Main(e,this)},e.fn.swipeBook=function(e){return e.viewMode="swipe",new FLIPBOOK.Main(e,this)},e.fn.flipBook.options={name:"",pages:[],tableOfContent:[],tableOfContentCloseOnClick:!0,thumbsCloseOnClick:!0,deeplinkingEnabled:!1,deeplinkingPrefix:"",assets:{preloader:"images/preloader.jpg",overlay:"images/overlay.png",flipMp3:"mp3/turnPage.mp3",spinner:"images/spinner.gif",backgroundMp3:"mp3/background.mp3"},pdfUrl:null,pdfBrowserViewerIfMobile:!1,pdfBrowserViewerIfIE:!1,pdfBrowserViewerFullscreen:!0,pdfBrowserViewerFullscreenTarget:"_blank",pdfPageScale:1,pdfOutline:!0,rangeChunkSize:64,disableRange:!1,disableStream:!0,disableAutoFetch:!0,htmlLayer:!0,rightToLeft:!1,startPage:0,sound:!0,backgroundColor:"rgb(81, 85, 88)",backgroundImage:"",backgroundPattern:"",backgroundTransparent:!1,thumbSize:130,loadAllPages:!1,loadPagesF:2,loadPagesB:1,autoplayOnStart:!1,autoplayInterval:3e3,autoplayLoop:!0,skin:"light",layout:"1",menuOverBook:!1,menuFloating:!1,menuBackground:"",menuShadow:"",menuMargin:0,menuPadding:0,menuTransparent:!1,menu2OverBook:!0,menu2Floating:!1,menu2Background:"",menu2Shadow:"",menu2Margin:0,menu2Padding:0,menu2Transparent:!0,skinColor:"",skinBackground:"",btnColor:"",btnBackground:"none",btnSize:14,btnRadius:2,btnMargin:2,btnPaddingV:10,btnPaddingH:10,btnShadow:"",btnTextShadow:"",btnBorder:"",btnColorHover:"",btnBackgroundHover:"",sideBtnColor:"#FFF",sideBtnBackground:"#00000033",sideBtnSize:30,sideBtnRadius:0,sideBtnMargin:0,sideBtnPaddingV:5,sideBtnPaddingH:0,sideBtnShadow:"",sideBtnTextShadow:"",sideBtnBorder:"",sideBtnColorHover:"#FFF",sideBtnBackgroundHover:"#00000066",floatingBtnColor:"#EEE",floatingBtnBackground:"#00000044",floatingBtnSize:null,floatingBtnRadius:null,floatingBtnMargin:null,floatingBtnPadding:null,floatingBtnShadow:"",floatingBtnTextShadow:"",floatingBtnBorder:"",floatingBtnColorHover:"",floatingBtnBackgroundHover:"",btnOrder:["currentPage","btnFirst","btnPrev","btnNext","btnLast","btnZoomIn","btnZoomOut","btnRotateLeft","btnRotateRight","btnAutoplay","btnSearch","btnSelect","btnBookmark","btnToc","btnThumbs","btnShare","btnPrint","btnDownloadPages","btnDownloadPdf","btnSound","btnExpand","btnClose"],currentPage:{enabled:!0,title:"Current page",vAlign:"top",hAlign:"left",marginH:0,marginV:0,color:"",background:""},btnFirst:{enabled:!1,title:"First page",iconFA:"flipbook-icon-angle-double-left",iconM:"flipbook-icon-first_page"},btnPrev:{enabled:!0,title:"Previous page",iconFA:"flipbook-icon-angle-left",iconM:"flipbook-icon-keyboard_arrow_left"},btnNext:{enabled:!0,title:"Next page",iconFA:"flipbook-icon-angle-right",iconM:"flipbook-icon-keyboard_arrow_right"},btnLast:{enabled:!1,title:"Last page",iconFA:"flipbook-icon-angle-double-right",iconM:"flipbook-icon-last_page"},btnZoomIn:{enabled:!0,title:"Zoom in",iconFA:"flipbook-icon-plus",iconM:"flipbook-icon-add"},btnZoomOut:{enabled:!0,title:"Zoom out",iconFA:"flipbook-icon-minus",iconM:"flipbook-icon-remove1"},btnRotateLeft:{enabled:!1,title:"Rotate left",iconFA:"flipbook-icon--undo"},btnRotateRight:{enabled:!1,title:"Rotate right",iconFA:"flipbook-icon--redo"},btnAutoplay:{enabled:!0,title:"Autoplay",iconFA:"flipbook-icon-play",iconM:"flipbook-icon-play_arrow",iconFA_alt:"flipbook-icon-pause",iconM_alt:"flipbook-icon-pause1"},btnSearch:{enabled:!1,title:"Search",iconFA:"flipbook-icon-search",iconM:"flipbook-icon-search1"},btnSelect:{enabled:!0,title:"Select tool",iconFA:"flipbook-icon-i-cursor",iconM:"flipbook-icon-text_format"},btnBookmark:{enabled:!0,title:"Bookmark",iconFA:"flipbook-icon-bookmark",iconM:"flipbook-icon-bookmark1"},btnToc:{enabled:!0,title:"Table of Contents",iconFA:"flipbook-icon-list-ol",iconM:"flipbook-icon-toc"},btnThumbs:{enabled:!0,title:"Pages",iconFA:"flipbook-icon-th-large",iconM:"flipbook-icon-view_module"},btnShare:{enabled:!0,title:"Share",iconFA:"flipbook-icon-share-alt",iconM:"flipbook-icon-share1",hideOnMobile:!0},btnPrint:{enabled:!0,title:"Print",iconFA:"flipbook-icon-print",iconM:"flipbook-icon-local_printshop",hideOnMobile:!0},btnDownloadPages:{enabled:!0,title:"Download pages",iconFA:"flipbook-icon-download",iconM:"flipbook-icon-file_download",url:"images/pages.zip",name:"allPages.zip"},btnDownloadPdf:{forceDownload:!1,enabled:!0,title:"Download PDF",iconFA:"flipbook-icon-file",iconM:"flipbook-icon-picture_as_pdf",url:null,openInNewWindow:!0,name:"allPages.pdf"},btnSound:{enabled:!0,title:"Volume",iconFA:"flipbook-icon-volume-up",iconFA_alt:"flipbook-icon-volume-off",iconM:"flipbook-icon-volume_up",iconM_alt:"flipbook-icon-volume_mute",hideOnMobile:!0},btnExpand:{enabled:!0,title:"Toggle fullscreen",iconFA:"flipbook-icon-expand",iconM:"flipbook-icon-fullscreen",iconFA_alt:"flipbook-icon-compress",iconM_alt:"flipbook-icon-fullscreen_exit"},btnClose:{title:"Close",iconFA:"flipbook-icon-times",iconM:"flipbook-icon-clear",hAlign:"right",vAlign:"top",size:20},btnShareIfMobile:!1,btnSoundIfMobile:!1,btnPrintIfMobile:!1,sideNavigationButtons:!0,hideMenu:!1,shareUrl:null,shareTitle:null,shareImage:null,whatsapp:{enabled:!0,icon:"flipbook-icon-whatsapp"},twitter:{enabled:!0,icon:"flipbook-icon-twitter"},facebook:{enabled:!0,icon:"flipbook-icon-facebook"},pinterest:{enabled:!0,icon:"flipbook-icon-pinterest-p"},email:{enabled:!0,icon:"flipbook-icon-envelope"},linkedin:{enabled:!0,icon:"flipbook-icon-linkedin"},digg:{enabled:!1,icon:"flipbook-icon-digg"},reddit:{enabled:!1,icon:"flipbook-icon-reddit-alien"},pdf:{annotationLayer:!1},pageTextureSize:2048,pageTextureSizeSmall:1500,thumbTextureSize:300,pageTextureSizeMobile:1500,pageTextureSizeMobileSmall:1024,viewMode:"webgl",singlePageMode:!1,singlePageModeIfMobile:!1,zoomMin:.95,zoomMax2:null,zoomSize:null,zoomStep:2,zoomTime:300,zoomReset:!1,zoomResetTime:300,wheelDisabledNotFullscreen:!1,arrowsDisabledNotFullscreen:!1,arrowsAlwaysEnabledForNavigation:!1,touchSwipeEnabled:!0,responsiveView:!0,responsiveViewRatio:1,responsiveViewTreshold:768,minPixelRatio:1,pageFlipDuration:1,contentOnStart:!1,thumbnailsOnStart:!1,searchOnStart:!1,sideMenuOverBook:!0,sideMenuOverMenu:!1,sideMenuOverMenu2:!0,sideMenuPosition:"left",lightBox:!1,lightBoxOpened:!1,lightBoxFullscreen:!1,lightboxCloseOnClick:!1,lightboxResetOnOpen:!0,lightboxBackground:null,lightboxBackgroundColor:null,lightboxBackgroundPattern:null,lightboxBackgroundImage:null,lightboxStartPage:null,lightboxMarginV:"0",lightboxMarginH:"0",lightboxCSS:"",lightboxPreload:!1,lightboxShowMenu:!1,lightboxCloseOnBack:!0,disableImageResize:!0,pan:0,panMax:10,panMax2:2,panMin:-10,panMin2:-2,tilt:0,tiltMax:0,tiltMax2:0,tiltMin:-20,tiltMin2:-5,rotateCameraOnMouseMove:!1,rotateCameraOnMouseDrag:!0,lights:!0,lightColor:16777215,lightPositionX:0,lightPositionZ:1400,lightPositionY:350,lightIntensity:.6,shadows:!0,shadowMapSize:1024,shadowOpacity:.2,shadowDistance:0,pageRoughness:1,pageMetalness:0,pageHardness:2,coverHardness:2,pageSegmentsW:10,pageSegmentsH:1,pageMiddleShadowSize:2,pageMiddleShadowColorL:"#999999",pageMiddleShadowColorR:"#777777",antialias:!1,preloaderText:"",fillPreloader:{enabled:!1,imgEmpty:"images/logo_light.png",imgFull:"images/logo_dark.png"},logoImg:"",logoUrl:"",logoCSS:"position:absolute;",logoHideOnMobile:!1,printMenu:!0,downloadMenu:!0,cover:!0,backCover:!0,pdfTextLayer:!0,annotationLayer:!0,googleAnalyticsTrackingCode:null,minimumAndroidVersion:6,linkColor:"rgba(0, 0, 0, 0)",linkColorHover:"rgba(255, 255, 0, .2)",rightClickEnabled:!0,pageNumberOffset:0,flipSound:!0,backgroundMusic:!1,strings:{print:"Print",printLeftPage:"Print left page",printRightPage:"Print right page",printCurrentPage:"Print current page",printAllPages:"Print all pages",download:"Download",downloadLeftPage:"Download left page",downloadRightPage:"Download right page",downloadCurrentPage:"Download current page",downloadAllPages:"Download all pages",bookmarks:"Bookmarks",bookmarkLeftPage:"Bookmark left page",bookmarkRightPage:"Bookmark right page",bookmarkCurrentPage:"Bookmark current page",search:"Search",findInDocument:"Find in document",pagesFoundContaining:"pages found containing",thumbnails:"Thumbnails",tableOfContent:"Table of Contents",share:"Share",pressEscToClose:"Press ESC to close",password:"Password"},mobile:{shadows:!1,pageSegmentsW:5}},FLIPBOOK.Main=function(e,i){var n=this;this.elem=i,this.$elem=jQuery(i),this.$body=jQuery("body"),this.body=this.$body[0],this.$window=jQuery(t),this.bodyHasVerticalScrollbar=function(){return n.body.scrollHeight>t.innerHeight},this.isZoomed=function(){return n.zoom>1},this.options={};var r,s=o.createElement("div").style,a=function(){for(var e="t,webkitT,MozT,msT,OT".split(","),t=0,o=e.length;t<o;t++)if(e[t]+"ransform"in s)return e[t].substr(0,e[t].length-1);return!1}(),l=/android/gi.test(navigator.appVersion),d=(/iphone|ipad/gi.test(navigator.appVersion),r="perspective",(""===a?r:(r=r.charAt(0).toUpperCase()+r.substr(1),a+r))in s);this.msie=t.navigator.userAgent.indexOf("MSIE "),this.isAndroid=l,this.has3d=d,void 0===FLIPBOOK.hasWebGl&&function(e){if(t.WebGLRenderingContext){for(var i=o.createElement("canvas"),n=["webgl","experimental-webgl","moz-webgl","webkit-3d"],r=!1,s=0;s<4;s++)try{if((r=i.getContext(n[s]))&&"function"==typeof r.getParameter)return e?{name:n[s],gl:r}:(FLIPBOOK.hasWebGl=!0,!0)}catch(e){}return FLIPBOOK.hasWebGl=!1,!1}FLIPBOOK.hasWebGl=!1}(),this.hasWebGl=FLIPBOOK.hasWebGl,function(){var e=-1;if("Microsoft Internet Explorer"==navigator.appName){var t=navigator.userAgent;null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1))}else"Netscape"==navigator.appName&&(t=navigator.userAgent,null!=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1)));return e}()>0&&(this.hasWebGl=!1,this.options.isIE=!0),this.thumbsShowing=!1,this.bookmarkShowing=!1,this.searchingString=!1,this.tocShowing=!1,this.menuShowing=!0,this.fullscreenActive=!1;var p={2:{currentPage:{vAlign:"bottom",hAlign:"center"},btnAutoplay:{hAlign:"left"},btnSound:{hAlign:"left"},btnExpand:{hAlign:"right"},btnZoomIn:{hAlign:"right"},btnZoomOut:{hAlign:"right"},btnSearch:{hAlign:"left"},btnBookmark:{hAlign:"left"},btnToc:{hAlign:"left"},btnThumbs:{hAlign:"left"},btnShare:{hAlign:"right"},btnPrint:{hAlign:"right"},btnDownloadPages:{hAlign:"right"},btnDownloadPdf:{hAlign:"right"},btnSelect:{hAlign:"right"}},3:{menuTransparent:!0,menu2Transparent:!1,menu2OverBook:!1,menu2Padding:5,btnMargin:5,currentPage:{vAlign:"top",hAlign:"center"},btnPrint:{vAlign:"top",hAlign:"right"},btnDownloadPdf:{vAlign:"top",hAlign:"right"},btnDownloadPages:{vAlign:"top",hAlign:"right"},btnThumbs:{vAlign:"top",hAlign:"left"},btnToc:{vAlign:"top",hAlign:"left"},btnBookmark:{vAlign:"top",hAlign:"left"},btnSearch:{vAlign:"top",hAlign:"left"},btnSelect:{vAlign:"top",hAlign:"right"},btnShare:{vAlign:"top",hAlign:"right"},btnAutoplay:{hAlign:"right"},btnExpand:{hAlign:"right"},btnZoomIn:{hAlign:"right"},btnZoomOut:{hAlign:"right"},btnSound:{hAlign:"right"},menuPadding:5},4:{menu2Transparent:!1,menu2OverBook:!1,sideMenuOverMenu2:!1,currentPage:{vAlign:"top",hAlign:"center"},btnAutoplay:{vAlign:"top",hAlign:"left"},btnSound:{vAlign:"top",hAlign:"left"},btnExpand:{vAlign:"top",hAlign:"right"},btnZoomIn:{vAlign:"top",hAlign:"right"},btnZoomOut:{vAlign:"top",hAlign:"right"},btnSearch:{vAlign:"top",hAlign:"left"},btnBookmark:{vAlign:"top",hAlign:"left"},btnToc:{vAlign:"top",hAlign:"left"},btnThumbs:{vAlign:"top",hAlign:"left"},btnShare:{vAlign:"top",hAlign:"right"},btnPrint:{vAlign:"top",hAlign:"right"},btnDownloadPages:{vAlign:"top",hAlign:"right"},btnDownloadPdf:{vAlign:"top",hAlign:"right"},btnSelect:{vAlign:"top",hAlign:"right"}}},h={dark:{skinColor:"#EEE",btnColorHover:"#FFF",skinBackground:"#313538"},light:{skinColor:"#222",btnColorHover:"#000",skinBackground:"#FFF",floatingBtnColor:"#FFF",floatingBtnBackground:"#00000055"},gradient:{skinColor:"#EEE",btnColor:"#EEE",btnColorHover:"#FFF",skinBackground:"#313538DD",zoomMin:.85,menuOverBook:!0,menu2OverBook:!0,sideMenuOverMenu:!0,sideMenuOverMenu2:!0,menuBackground:"linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 100%)",menu2Background:"linear-gradient(to bottom, rgba(0, 0, 0, 0.65) 0%, transparent 100%)"}};for(var c in h)e.skin==c&&(e=jQuery.extend(!0,{},h[c],e));for(var c in p)String(e.layout)===c&&(e=jQuery.extend(!0,{},p[c],e));this.options=jQuery.extend(!0,{},jQuery.fn.flipBook.options,e);var u,g,f=this.options;if(f.isMobile=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent),f.isMobile)for(var c in f.mobile)f[c]=f.mobile[c];if(this.strings=f.strings,f.pageShininess=f.pageShininess/2,this.s=0,f.googleAnalyticsTrackingCode&&(this.gaCode=f.googleAnalyticsTrackingCode,t.ga||function(e,t,o,i,n,r,s){e.GoogleAnalyticsObject=n,e.ga=e.ga||function(){(e.ga.q=e.ga.q||[]).push(arguments)},e.ga.l=1*new Date,r=t.createElement(o),s=t.getElementsByTagName(o)[0],r.async=1,r.src="https://www.google-analytics.com/analytics.js",s.parentNode.insertBefore(r,s)}(t,o,"script",0,"ga"),ga("create",this.gaCode,"auto")),f.isMobile&&(f.singlePageMode=!!f.singlePageModeIfMobile||f.singlePageMode,f.viewModeMobile&&(f.viewMode=f.viewModeMobile),f.pageTextureSizeMobile&&(f.pageTextureSize=f.pageTextureSizeMobile),f.pageTextureSizeMobileSmall&&(f.pageTextureSizeSmall=f.pageTextureSizeMobileSmall),f.touchSwipeEnabled=!0),"3dSinglePage"==f.viewMode&&(f.singlePageMode=!0),"2dSinglePage"==f.viewMode&&(f.singlePageMode=!0,f.viewMode="2d"),f.singlePageMode&&("2d"!=f.viewMode&&"swipe"!=f.viewMode&&(f.viewMode="3d"),f.rightToLeft&&(f.viewMode="swipe"),f.cover=!0),f.singlePageMode&&"3d"==f.viewMode&&(f.rightToLeft=!1),"simple"==f.viewMode&&(f.viewMode="3d",f.instantFlip=!0),f.cover||(f.responsiveView=!1),f.sideMenuPosition=f.rightToLeft?"right":"left","webgl"==f.viewMode&&(!this.hasWebGl||parseFloat(!!(g=(u=(u||navigator.userAgent).toLowerCase()).match(/android\s([0-9\.]*)/))&&g[1])<f.minimumAndroidVersion&&this.isAndroid)&&(f.viewMode="3d"),"3d"!=f.viewMode||n.has3d||(f.viewMode="2d"),this.webgl="webgl"==f.viewMode,f.menuFloating&&(f.menuOverBook=!0,f.sideMenuOverMenu=!0),f.menu2Floating&&(f.menu2OverBook=!0,f.sideMenuOverMenu2=!0),f.menuTransparent&&(f.menuOverBook=!0,f.sideMenuOverMenu=!0,f.menuBackground="none"),f.menu2Transparent?(f.menu2OverBook=!0,f.sideMenuOverMenu2=!0,f.menu2Background="none"):f.sideMenuOverMenu2=!1,f.menuOverBook&&(f.sideMenuOverMenu=!0),f.menu2OverBook&&(f.sideMenuOverMenu2=!0),f.isMobile&&f.pdfBrowserViewerIfMobile&&f.pdfUrl)f.lightBox&&!f.lightBoxOpened?this.$elem.on("touched click",function(){m()}).css("cursor","pointer"):m();else if(f.isIE&&f.pdfBrowserViewerIfIE&&f.pdfUrl)f.lightBox&&!f.lightBoxOpened?this.$elem.on("touched click",function(){m()}).css("cursor","pointer"):m();else{f.pdfMode=Boolean(f.pdfUrl&&""!=f.pdfUrl)||f.pdfBase64,f.backgroundTransparent&&(f.backgroundColor="none"),this.wrapper=jQuery(o.createElement("div")).addClass("flipbook-main-wrapper"),""!=f.backgroundColor&&this.wrapper.css("background",f.backgroundColor),""!=f.backgroundPattern&&this.wrapper.css("background","url("+f.backgroundPattern+") repeat"),""!=f.backgroundImage&&(this.wrapper.css("background","url("+f.backgroundImage+") no-repeat"),this.wrapper.css("background-size","cover"),this.wrapper.css("background-position","center center")),this.bookLayer=jQuery(o.createElement("div")).addClass("flipbook-bookLayer").appendTo(n.wrapper),f.rightClickEnabled||this.bookLayer.bind("contextmenu",function(e){return!1}),f.hideMenu&&(this.bookLayer.css("bottom","0"),f.menuOverBook=!0),f.pagesOriginal=JSON.parse(JSON.stringify(f.pages)),this.book=jQuery(o.createElement("div")).addClass("book").appendTo(n.bookLayer),f.preloader?this.preloader=f.preloader:!jQuery(".flipbook-preloader").length&&f.lightBox?this.preloader=jQuery('<div class="flipbook-preloader cssload-container"><div class="cssload-speeding-wheel"></div><div class="flipbook-loading-text">'+f.preloaderText+'</div><div class="flipbook-loading-bg"></div></div>'):f.lightBox?this.preloader=jQuery(".flipbook-preloader"):this.preloader=jQuery('<div class="flipbook-preloader-2 cssload-container"><div class="cssload-speeding-wheel"></div><div class="flipbook-loading-text">'+f.preloaderText+'</div><div class="flipbook-loading-bg"></div></div>'),this.setLoadingProgress(0),!f.deeplinkingPrefix&&f.deeplinking&&f.deeplinking.prefix&&(f.deeplinkingPrefix=f.deeplinking.prefix),f.deeplinkingEnabled=f.deeplinkingPrefix||f.deeplinkingEnabled||f.deeplinking&&f.deeplinking.enabled,f.deeplinkingEnabled&&(k(),jQuery(t).bind("hashchange",function(e){k()})),this.dispose=function(){this.disposed=!0},f.main=this;var b={_events:{},on:function(e,t){this._events[e]||(this._events[e]=[]),this._events[e].push(t)},off:function(e,t){if(this._events[e]){var o=this._events[e].indexOf(t);o>-1&&this._events[e].splice(o,1)}},trigger:function(e){if(this._events[e]){var t=0,o=this._events[e].length;if(o)for(;t<o;t++)this._events[e][t].apply(this,[].slice.call(arguments,1))}}};b.on("pageLoaded",function(e){f.pages[e.index]=f.pages[e.index]||{},f.pages[e.index].canvas=f.pages[e.index].canvas||{},f.pages[e.index].canvas[e.size]=e.canvas,n.searchingString&&n.mark(n.searchingString,!0)}),b.on("pageUnloaded",function(e){e.unloadedPages.forEach(function(e){if(n.Book.onPageUnloaded){var t=e.index;n.options.cover||t++,n.Book.onPageUnloaded(t,e.size)}})}),b.on("pdfinit",function(){f.tableOfContent=n.pdfService.outline||f.tableOfContent,f.doublePage=n.pdfService.double,f.doublePage||(f.backCover=n.pdfService.numPages%2==0,f.cover||(f.backCover=!f.backCover)),n.viewportOriginal=n.pdfService.viewports[0],f.firstPage={width:n.pdfService.viewports[0].width,height:n.pdfService.viewports[0].height,ratio:n.pdfService.viewports[0].width/n.pdfService.viewports[0].height},n.pdfService.numPages>1&&(f.secondPage={width:n.pdfService.viewports[1].width,height:n.pdfService.viewports[1].height,ratio:n.pdfService.viewports[1].width/n.pdfService.viewports[1].height}),f.numPages=n.pdfService.numPages,1==f.numPages&&(f.viewMode="swipe",f.singlePageMode=!0,f.btnNext.enabled=!1,f.btnPrev.enabled=!1,f.btnFirst.enabled=!1,f.btnLast.enabled=!1,f.sideNavigationButtons=!1,f.btnAutoplay.enabled=!1,f.printMenu=!1,f.downloadMenu=!1,n.webgl=!1);for(var e=[],t=0;t<f.numPages;t++){var o={canvas:{}};f.pages&&f.pages[t]?jQuery.extend(o,f.pages[t]):o.title=t+1,e[t]=o}f.pages=e;n.book.height();var i=f.pageTextureSize;f.pageWidth=parseInt(i*n.viewportOriginal.width/n.viewportOriginal.height),f.pageHeight=i,f.pw=f.pageWidth,f.ph=f.pageHeight,f.zoomSize=f.zoomSize||f.pageTextureSize,n.start()}),b.on("toolSelect",function(){n.bookLayer.removeClass("flipbook-move"),n.btnSelect&&n.btnSelect.addClass("flipbook-btn-active"),n.bookLayer.removeClass("flipbook-disable-text-selection")}),b.on("toolMove",function(){n.bookLayer.addClass("flipbook-move"),n.btnSelect&&n.btnSelect.removeClass("flipbook-btn-active"),n.bookLayer.addClass("flipbook-disable-text-selection")}),this.model=b,f.lightBox?(f.btnClose.enabled=!0,this.lightbox=new FLIPBOOK.Lightbox(this,this.wrapper,f),this.lightboxStartedTimes=0,this.wrapper.css("background","none"),this.bookLayer.css("background","none"),this.book.css("background","none"),this.preloader.appendTo(this.$body).css("position","fixed"),this.$elem.css("cursor","pointer").bind("tap click",function(e){e.preventDefault(),n.lightboxStartPage=jQuery(this).attr("data-page"),n.started?(n.lightboxStart(),f.lightBoxFullscreen&&setTimeout(function(){n.toggleExpand()},0)):(v(),f.lightBoxFullscreen&&setTimeout(function(){n.toggleExpand()},100))}),f.lightBoxOpened?(v(),jQuery(t).trigger("r3d-lightboxloadingstarted")):f.lightboxPreload&&("undefined"!=typeof IScroll||FLIPBOOK.scriptsAdded[FLIPBOOK.iscrollSrc]||n.loadScript(FLIPBOOK.iscrollSrc,function(){}),void 0!==FLIPBOOK.PdfService||FLIPBOOK.scriptsAdded[FLIPBOOK.pdfServiceSrc]||n.loadScript(FLIPBOOK.pdfServiceSrc,function(){}),f.pdfMode&&("undefined"!=typeof pdfjsLib||FLIPBOOK.scriptsAdded[FLIPBOOK.pdfjsSrc]||n.loadScript(FLIPBOOK.pdfjsSrc,function(){}),void 0!==FLIPBOOK.PdfService||FLIPBOOK.scriptsAdded[FLIPBOOK.pdfServiceSrc]||n.loadScript(FLIPBOOK.pdfServiceSrc,function(){}),f.btnSearch.enabled&&(FLIPBOOK.scriptsAdded[FLIPBOOK.markSrc]||n.loadScript(FLIPBOOK.markSrc,function(){}))),"webgl"==f.viewMode&&("undefined"!=typeof THREE||FLIPBOOK.scriptsAdded[FLIPBOOK.threejsSrc]||n.loadScript(FLIPBOOK.threejsSrc,function(){}))),this.fullscreenElement=o.documentElement):(f.btnClose.enabled=!1,this.preloader.appendTo(this.wrapper),this.wrapper.appendTo(this.$elem),this.fullscreenElement=this.$elem[0],P(this.wrapper[0])?v():this.containerVisibleInterval=setInterval(function(){P(n.wrapper[0])>0&&(clearInterval(n.containerVisibleInterval),v())},300))}function m(){f.pdfBrowserViewerFullscreen?t.open(f.pdfUrl,f.pdfBrowserViewerFullscreenTarget):jQuery('<object type="application/pdf"/>').width("100%").height("100%").attr("data",f.pdfUrl).appendTo(n.$elem)}function k(){if(!n.disposed){var e=t.location.hash,o=n.getPageFromHash();f.cover||o++,startPage=o,o<1?o=1:n.numPages&&o>n.numPages&&(o=n.numPages),o&&(o=f.rightToLeft&&f.pages&&f.pages.length?f.pages.length-o+1:o,n.started?n.Book&&(n.lightbox&&!FLIPBOOK.lightboxOpened&&(n.lightbox.openLightbox(),n.lightboxStart()),n.goToPage(o,-1==e.indexOf("flip"))):(f.startPage=startPage,f.lightBox&&(v(),f.lightBoxFullscreen&&setTimeout(function(){n.toggleExpand()},100))))}}function v(){if(f.fillPreloader.enabled){n.$fillPreloader=jQuery("<div>").addClass("flipbook-fillPreloader");var e=new Image;e.src=f.fillPreloader.imgEmpty,e.onload=function(){var t=new Image;t.src=f.fillPreloader.imgFull,t.onload=function(){jQuery(e).appendTo(n.$fillPreloader),n.$fillPreloaderImg=jQuery(t).appendTo(n.$fillPreloader),n.$fillPreloader.appendTo(n.wrapper),w()}}}else w()}function w(){n.initialized||(n.id=Date.now(),n.addPageItems(),f.pdfMode?n.initPdf():n.initJpg(),n.setLoadingProgress(.1),n.lightbox&&n.options.lightboxShowMenu&&n.createMenu(),n.initialized=!0)}function P(e){const i=e.getBoundingClientRect();return i.height>0&&i.top+i.height>=0&&i.top<=(t.innerHeight||o.documentElement.clientHeight)}},FLIPBOOK.Main.prototype={start:function(){this.options.dp&&(this.options.doublePage=!0),this.started||(this.model.pageW=this.options.pageWidth,this.model.bookW=2*this.options.pageWidth,this.options.singlePageMode&&(this.model.bookW/=2),this.model.pageH=this.options.pageHeight,this.model.bookH=this.options.pageHeight,this.options.numPages%2==0?this.options.numSheets=(this.options.numPages+2)/2:this.options.numSheets=(this.options.numPages+1)/2,this.started=!0,this.options.lightBox&&(this.lightbox.openLightbox(),this.lightboxStart()),this.createBook(),this.updateSkinColors())},updateSkinColors:function(){var e=this.options;e.skinColor&&this.wrapper.find(".skin-color").css("color",e.skinColor),e.skinBackground&&this.wrapper.find(".skin-color-bg").css("background",e.skinBackground)},lightboxStart:function(){var e=this;this.started||this.start(),void 0!==this.Book?(this.Book.enable(),this.lightboxStartPage?this.goToPage(this.lightboxStartPage,!0):this.options.lightboxStartPage&&this.goToPage(this.options.lightboxStartPage,!0),this.lightboxStartedTimes++,this.gaCode&&ga("send",{hitType:"event",eventCategory:"Flipbook : "+this.options.name,eventAction:"lightbox open",eventLabel:"lightbox open",eventValue:this.lightboxStartedTimes,nonInteraction:!0}),this.updateCurrentPage(),this.initColors(),this.resize()):setTimeout(function(){e.lightboxStart()},100)},setHash:function(e){e<1&&(e=1),"#"+this.options.deeplinkingPrefix+e!=t.location.hash&&this.options.deeplinkingEnabled&&this.Book.enabled&&this.hash!=e&&(t.location.hash="#"+this.options.deeplinkingPrefix+String(e),this.hash=e)},clearHash:function(){var e,i,n=t.location;"pushState"in history?history.pushState("",o.title,n.pathname+n.search):(e=o.body.scrollTop,i=o.body.scrollLeft,n.hash="",o.body.scrollTop=e,o.body.scrollLeft=i)},getPageFromHash:function(){var e,o=t.location.hash,i="#"+this.options.deeplinkingPrefix;return-1!==o.indexOf(i)&&(e=parseInt(t.location.hash.replace(/#/g,"").replace(this.options.deeplinkingPrefix,""))),e},initColors:function(){this.wrapper.find(".skin-color-bg").removeClass("flipbook-bg-light").removeClass("flipbook-bg-dark").addClass("flipbook-bg-"+this.options.skin),this.wrapper.find(".skin-color").removeClass("flipbook-color-light").removeClass("flipbook-color-dark").addClass("flipbook-color-"+this.options.skin),this.updateSkinColors()},lightboxEnd:function(){"undefined"!=typeof screenfull&&screenfull.isFullscreen&&screenfull.exit(),t.location.hash&&this.clearHash(),this.setLoadingProgress(1),this.Book&&this.Book.disable()},turnPageComplete:function(){this.animating=!1,this.updateCurrentPage();var e=this.Book.rightIndex||0;this.options.rightToLeft&&(e=this.options.pages.length-e),this.pdfService&&this.pdfService.setRightIndex(e),this.options.zoomReset&&this.Book.zoomTo(this.options.zoomMin)},updateCurrentPage:function(){var e,o=this.options.rightToLeft,i=this.options.numPages,n=i-this.options.pageNumberOffset,r=this.Book.rightIndex||0;if(r%2==1&&r++,o&&(r=this.options.pages.length-r),this.options.singlePageMode||this.Book.singlePage||1==this.Book.view?(this.Book.getCurrentPageNumber?e=this.Book.getCurrentPageNumber():(o&&r--,e=r+1),this.options.cover||(e=Number(e)-1),this.setHash(e),this.cPage=[e-1]):(r>i||r==i&&i%2==0?(e=i,this.cPage=[i-1],this.options.cover||(e=String(r-1)+"-"+String(r),this.cPage=[r-2,r-1])):r<1?(e=1,this.cPage=[0]):(e=String(r)+"-"+String(r+1),this.options.cover||(e=String(r-1)+"-"+String(r)),this.cPage=[r-1,r]),this.options.cover?this.setHash(r):this.setHash(r-1)),o?(this.enableNext(r>0),this.options.cover||this.enableNext(r>2),this.enablePrev(this.Book.canFlipPrev()||r<i-1)):(this.enablePrev(r>0),this.options.cover||this.enablePrev(r>2),this.enableNext(this.Book.canFlipNext()||r<i-1)),2==this.cPage.length?(this.wrapper.find(".c-l-p").show(),this.wrapper.find(".c-r-p").show(),this.wrapper.find(".c-p").hide()):(this.wrapper.find(".c-l-p").hide(),this.wrapper.find(".c-r-p").hide(),this.wrapper.find(".c-p").show()),void 0!==this.currentPage&&(this.s&&this.options.pdfPageScale>0&&this.goToPage(0),e!=this.currentPageValue)){this.currentPageValue=String(e);var s=Number(String(e).split("-")[0]),a=Number(String(e).split("-")[1]);s&&this.options.pages[Number(s-1)]&&this.options.pages[Number(s-1)].name&&(e=this.options.pages[Number(s-1)].name),a&&this.options.pages[Number(a-1)]&&this.options.pages[Number(a-1)].name&&(e+="-"+this.options.pages[Number(a-1)].name),this.currentPage.text(e+" / "+String(n)),this.currentPageInput.width(this.currentPageHolder.width()),this.resize(),jQuery(this).trigger({type:"pagechange",page:this.currentPageValue,name:this.options.name}),jQuery(t).trigger({type:"r3d-pagechange",page:this.currentPageValue,name:this.options.name}),this.gaCode&&ga("send",{hitType:"event",eventCategory:"Flipbook : "+this.options.name,eventAction:"page "+this.currentPageValue,eventLabel:"page"+this.currentPageValue,nonInteraction:!0})}},initJpg:function(){var e=this;1==this.options.numPages&&(this.options.viewMode="swipe",this.options.singlePageMode=!0,this.webgl=!1);var t=0,o=1;this.options.cover||(t=1,o=2),this.loadPage(t,this.options.pageTextureSize,function(){e.setLoadingProgress(.5);var t=e.options;if(1==t.pages.length){var i=t.pages[0].img;t.pw=i.width,t.ph=i.height,t.pageWidth=i.width,t.pageHeight=i.height,t.pageMode="singlePage",t.doublePage=!1,t.zoomSize=t.zoomSize||i.height,e.setLoadingProgress(.7),t.btnNext.enabled=!1,t.btnPrev.enabled=!1,t.btnFirst.enabled=!1,t.btnLast.enabled=!1,t.sideNavigationButtons=!1,t.btnAutoplay.enabled=!1,e.start()}else e.loadPage(o,t.pageTextureSize,function(){var o=t.pages[0].img,i=t.pages[1].img,n=o.width/o.height,r=i.width/i.height;t.pw=o.width,t.ph=o.height,t.pageWidth=o.width,t.pageHeight=o.height,t.doublePage=r/n>1.5,t.doublePage||(t.backCover=t.pages.length%2==0,t.cover||(t.backCover=!t.backCover)),t.zoomSize=t.zoomSize||o.height,e.setLoadingProgress(.7),e.start()})})},initPdf:function(){if(!this.started){var e=this;if("undefined"==typeof pdfjsLib){if(!FLIPBOOK.scriptsAdded[FLIPBOOK.pdfjsSrc])return void e.loadScript(FLIPBOOK.pdfjsSrc,function(){e.initPdf()});if(!FLIPBOOK.scriptsLoaded[FLIPBOOK.pdfjsSrc])return void setTimeout(function(){e.initPdf()},100)}if(this.setLoadingProgress(.2),void 0===FLIPBOOK.PdfService){if(!FLIPBOOK.scriptsAdded[FLIPBOOK.pdfServiceSrc])return void e.loadScript(FLIPBOOK.pdfServiceSrc,function(){e.initPdf()});if(!FLIPBOOK.scriptsLoaded[FLIPBOOK.pdfServiceSrc])return void setTimeout(function(){e.initPdf()},100)}this.setLoadingProgress(.3),t.CanvasPixelArray&&(CanvasPixelArray.prototype.set=function(e){for(var t=this.length,o=0;o<t;o++)this[o]=e[o]}),PDFJS=pdfjsLib,pdfjsLib.externalLinkTarget=pdfjsLib.LinkTarget.BLANK,pdfjsLib.GlobalWorkerOptions.workerSrc=this.options.pdfjsworkerSrc||FLIPBOOK.pdfjsworkerSrc;var o={cMapPacked:!0,cMapUrl:this.options.cMapUrl||"cmaps/",disableRange:this.options.disableRange,disableAutoFetch:this.options.disableAutoFetch,disableStream:this.options.disableStream,rangeChunkSize:1024*Number(e.options.rangeChunkSize)};if(e.options.pdfUrl?(!1!==e.options.matchProtocol&&("https:"==location.protocol?e.options.pdfUrl=e.options.pdfUrl.replace("http://","https://"):"http:"==location.protocol&&(e.options.pdfUrl=e.options.pdfUrl.replace("https://","http://"))),o.url=e.options.pdfUrl):e.options.pdfBase64&&(o.data=atob(e.options.pdfBase64)),this.options.password){var i=prompt("Please enter PDF password","");if(null==i)return this.lightbox&&this.lightbox.closeLightbox(!0),this.setLoadingProgress(1),void(this.pdfinitStarted=!1);o.password=i}if(!this.pdfinitStarted)this.pdfinitStarted=!0,pdfjsLib.getDocument(o).promise.then(function(t){e.pdfDocument=t,e.pdfService=new FLIPBOOK.PdfService(t,e.model,e.options),e.options.thumbLoaded=function(t){e.options.thumbs=e.options.thumbs||[],e.options.thumbs[t.index]=t},e.setLoadingProgress(.5),e.pdfService.init()},function(t){"PasswordException"==t.name?(e.pdfinitStarted=!1,e.options.password=!0,e.initPdf()):alert(t)})}},loadPageHTML:function(e,t){var i=this,n=(e=e,this.options);this.options.cover||e--,this.options.pdfMode?this.options.pages[e]?this.pdfService.loadTextLayer(e,function(o){t.call(i,i.options.pages[e].htmlContent,e)}):t.call(this,{}):n.pages[e].json?this.loadPageJSON(e,function(r){var s=n.pages[e]||{};if(!s.htmlContentInitialized){var a=o.createElement("div");a.classList.add("flipbook-page-htmlContent"),a.classList.add("page"+String(e)),a.innerHTML=decodeURIComponent(r.data),s.htmlContent&&jQuery(a).append(jQuery(s.htmlContent)),s.htmlContent=a,jQuery(s.htmlContent).find(".internalLink").each(function(){var e=i;this.onclick=function(){var t=Number(this.dataset.page);return t=e.options.rightToLeft?e.options.pages.length-t+1:t,e.goToPage(t),!1}}),s.htmlContentInitialized=!0}t.call(i,s.htmlContent,e)}):t.call(this,n.pages[e].htmlContent,e)},loadPageJSON:function(e,t){var o=this.options.pages[e]||{},i=this;if(!1!==i.options.matchProtocol&&("https:"==location.protocol?o.json=o.json.replace("http:","https:"):"http:"==location.protocol&&(o.json=o.json.replace("https:","http:"))),!o.jsonLoading&&!o.jsonLoaded)return o.jsonLoading=!0,void jQuery.getJSON(o.json,function(e){o.jsonLoaded=!0,o.jsonLoading=!1,t.call(i,e)});o.jsonLoaded?t.call(i):setTimeout(function(){i.loadPageJSON(e,t)},100)},loadPage:function(e,t,i){this.options.cover||e--;var n=this,r=this.options.pages&&this.options.pages[e]&&this.options.pages[e].src,s=this.options.pages[e];s?this.options.pdfMode&&!r?this.loadPageFromPdf(e,t,i):t==this.options.thumbTextureSize&&s.thumb?s.thumbImg?s.thumbLoaded?n.pageLoaded({index:e,size:t,image:s.thumb},i):setTimeout(function(){n.loadPage(e,t,i)},300):(s.thumbImg=o.createElement("img"),s.thumbImg.setAttribute("data-id",e),s.thumbImg.onload=function(){s.thumbLoaded=!0,n.pageLoaded({index:e,size:t,image:s.thumbImg},i)},"webgl"==this.options.viewMode&&(s.thumbImg.crossOrigin="Anonymous"),!1!==n.options.matchProtocol&&("https:"==location.protocol?s.thumb=s.thumb.replace("http://","https://"):"http:"==location.protocol&&(s.thumb=s.thumb.replace("https://","http://"))),s.thumbImg.src=s.thumb):s.img?s.imgLoaded?n.pageLoaded({index:e,size:t,image:s.img},i):setTimeout(function(){n.loadPage(e,t,i)},300):(s.img=o.createElement("img"),s.img.setAttribute("data-id",e),s.img.onload=function(){s.imgLoaded=!0,n.pageLoaded({index:e,size:t,image:s.img},i)},"webgl"==this.options.viewMode&&(s.img.crossOrigin="Anonymous"),!1!==n.options.matchProtocol&&("https:"==location.protocol?s.src=s.src.replace("http://","https://"):"http:"==location.protocol&&(s.src=s.src.replace("https://","http://"))),s.img.src=s.src):i.call(this)},pageLoaded:function(e,t){t.call(this,e,t),this.options.loadAllPages&&e.index<this.options.numPages-1&&this.loadPage(e.index+1,e.size,function(){}),this.searchingString&&this.mark(this.searchingString,!0)},loadPageFromPdf:function(e,t,o){t=t||this.options.pageTextureSize,this.pdfService.renderBookPage(e,t,o)},getString:function(e){return this.options.strings[e]},mark:function(e,t){(e!=this.markedStr||t)&&(this.markedStr=e,this.options.pages.forEach(function(t){var o=jQuery(t.htmlContent).find(".flipbook-textLayer");t.marked!=e&&o.length&&(t.marked=e,o.unmark({done:function(){o.mark(e,{acrossElements:!0,separateWordSearch:!1})}}))}))},unmark:function(){this.searchingString=null,this.markedStr=null,this.options.pages.forEach(function(e){e.marked&&(e.marked=null,jQuery(e.htmlContent).unmark())})},setTool:function(e){this.tool=e,this.model.trigger(e)},toggleTool:function(){var e="toolSelect"==this.tool?"toolMove":"toolSelect";this.setTool(e)},toggleSound:function(){var e=this.options;e.sound=!e.sound,this.backgroundMusic&&(e.sound?this.backgroundMusic.play():this.backgroundMusic.pause()),this.toggleIcon(this.btnSound,e.sound)},toggleIcon:function(e,t){var o=t?e.iconAlt:e.icon,i=t?e.icon:e.iconAlt;e.find("."+o).removeClass(o).addClass(i)},scrollPageIntoView:function(e){var t=this.options.rightToLeft?this.options.pages.length-e.pageNumber+1:e.pageNumber;this.goToPage(t)},loadScript:function(e,t){var n=this,r=o.createElement("script"),s=o.getElementsByTagName("script")[0];r.async=1,s.parentNode.insertBefore(r,s),FLIPBOOK.scriptsAdded[e]=!0,r.onload=r.onreadystatechange=function(o,s){(s||!r.readyState||/loaded|complete/.test(r.readyState))&&(r.onload=r.onreadystatechange=null,r=i,s||t&&t.call(n),FLIPBOOK.scriptsLoaded[e]=!0)},r.src=e},createBook:function(){var e=this,t=this.model,o=this.options;if("undefined"==typeof IScroll){if(!FLIPBOOK.scriptsAdded[FLIPBOOK.iscrollSrc])return void e.loadScript(FLIPBOOK.iscrollSrc,e.createBook);if(!FLIPBOOK.scriptsLoaded[FLIPBOOK.iscrollSrc])return void setTimeout(function(){e.createBook()},100)}if(this.options.searchOnStart&&(this.options.btnSearch.enabled=!0),this.options.btnSearch.enabled){if(!FLIPBOOK.scriptsAdded[FLIPBOOK.markSrc])return void e.loadScript(FLIPBOOK.markSrc,e.createBook);if(!FLIPBOOK.scriptsLoaded[FLIPBOOK.markSrc])return void setTimeout(function(){e.createBook()},100)}if(e.setLoadingProgress(.9),"webgl"==e.options.viewMode){if("undefined"==typeof THREE){if(!FLIPBOOK.scriptsAdded[FLIPBOOK.threejsSrc])return void e.loadScript(FLIPBOOK.threejsSrc,e.createBook);if(!FLIPBOOK.scriptsLoaded[FLIPBOOK.threejsSrc])return void setTimeout(function(){e.createBook()},100)}if(void 0===FLIPBOOK.BookWebGL){if(!FLIPBOOK.scriptsAdded[FLIPBOOK.flipbookWebGlSrc])return void e.loadScript(FLIPBOOK.flipbookWebGlSrc,e.createBook);if(!FLIPBOOK.scriptsLoaded[FLIPBOOK.flipbookWebGlSrc])return void setTimeout(function(){e.createBook()},100)}}else if("swipe"==e.options.viewMode){if(void 0===FLIPBOOK.BookSwipe){if(!FLIPBOOK.scriptsAdded[FLIPBOOK.flipBookSwipeSrc])return void e.loadScript(FLIPBOOK.flipBookSwipeSrc,e.createBook);if(!FLIPBOOK.scriptsLoaded[FLIPBOOK.flipBookSwipeSrc])return void setTimeout(function(){e.createBook()},100)}}else if(void 0===FLIPBOOK.Book3){if(!FLIPBOOK.scriptsLoaded[FLIPBOOK.flipbookBook3Src])return void e.loadScript(FLIPBOOK.flipbookBook3Src,e.createBook);if(!FLIPBOOK.scriptsAdded[FLIPBOOK.flipbookBook3Src])return void setTimeout(function(){e.createBook()},100)}if(this.setLoadingProgress(1),this.initEasing(),e.options.doublePage&&e.options.pages.length>2){for(var i=[e.options.pages[0]],n=1;n<=e.options.pages.length-2;n++){var r={src:(a=e.options.pages[n]).src,thumb:a.thumb,title:2*n,htmlContent:a.htmlContent,json:a.json,side:"left"},s={src:a.src,thumb:a.thumb,title:2*n+1,htmlContent:a.htmlContent,json:a.json,side:"right"};i.push(r),i.push(s)}if(e.options.backCover)i.push(e.options.pages[e.options.pages.length-1]);else{var a;r={src:(a=e.options.pages[e.options.pages.length-1]).src,thumb:a.thumb,title:a.title,htmlContent:a.htmlContent,json:a.json,side:"left"},s={src:a.src,thumb:a.thumb,title:a.title,htmlContent:a.htmlContent,json:a.json,side:"right"};i.push(r),i.push(s)}e.options.pages=i}if(this.options.numPages=this.options.pages.length,this.options.numPages%2==0||this.options.singlePageMode||(this.options.backCover=!1,this.options.cover||(this.options.backCover=!this.options.backCover),this.options.pages.push({src:this.options.assets.preloader,thumb:this.options.assets.preloader,empty:!0})),e.options.pages.length>0)for(n=0;n<e.options.pages.length;n++)void 0!==e.options.pages[n].htmlContent&&(e.options.hasHtmlContent=!0,e.options.pages[n].htmlContent=jQuery(e.options.pages[n].htmlContent));function l(){e.options.flipSound&&(e.flipSound=jQuery('<audio><source src="'+e.options.assets.flipMp3+'" type="audio/mpeg"></audio>')[0]),e.options.backgroundMusic&&(e.backgroundMusic=jQuery('<audio autoplay><source src="'+e.options.backgroundMusic+'" type="audio/mpeg"></audio>')[0])}if("webgl"==e.options.viewMode){var d=e.options;d.scroll=e.scroll,d.parent=e,e.Book=new FLIPBOOK.BookWebGL(e.book[0],t,d),e.webglMode=!0,e.initSwipe(),l()}else"swipe"==e.options.viewMode?(e.Book=new FLIPBOOK.BookSwipe(e.book[0],e.bookLayer[0],t,o),e.initSwipe()):("2d"!=e.options.viewMode&&(e.options.viewMode="3d"),e.Book=new FLIPBOOK.Book3(e.book[0],t,o),e.initSwipe(),e.webglMode=!1,l());this.resize(),e.Book.enable(),e.book.hide().fadeIn("slow"),this.tocCreated=!1,this.createMenu(),this.onZoom(this.options.zoom),1==this.options.pages.length&&(this.rightToLeft=!1),FLIPBOOK.books=FLIPBOOK.books||{},FLIPBOOK.books[e.id]=e.Book;var p=jQuery(e.Book);p.bind("loadPagesFromPdf",function(t,o,i,n){e.loadPagesFromPdf(o,i,n)}),p.bind("turnPageComplete",function(t){e.turnPageComplete()}),p.bind("initEasing",function(t){e.initEasing()}),p.bind("playFlipSound",function(t){e.playFlipSound()}),p.bind("closeLightbox",function(t){e.closeLightbox()}),p.bind("updateCurrentPage",function(t){e.updateCurrentPage()}),this.createLogo(),this.onBookCreated()},addPageItems:function(){var e=this.options.pages;this.id;for(var t in e){var o,i=e[t];if(i.htmlContent=i.htmlContent||"",i.items)for(var n in i.items){var r=i.items[n];switch(r.src&&!r.url&&(r.url=r.src),r.x=r.x||0,r.y=r.y||0,r.width=r.width||100,r.height=r.height||100,r.type){case"iframe":case"youtube":r.url.includes("<iframe")?i.htmlContent+='<div class="flipbook-page-item" style="top:'+r.y+"px;left:"+r.x+"px;width:"+r.width+"px;height:"+r.height+'px;">'+r.url+"</div>":(r.url.includes("youtu.be/")&&(r.url=r.url.replace("youtu.be/","youtube.com/watch?v=")),r.url.includes("youtube.com/watch?v=")&&(r.url=r.url.split("&")[0].replace("/watch?v=","/embed/")),o='<iframe class="flipbook-page-item" src="'+r.url+'" style="top:'+r.y+"px;left:"+r.x+"px;width:"+r.width+"px;height:"+r.height+'px;" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'),i.htmlContent+=o;break;case"image":o='<img class="flipbook-page-item" src="'+r.url+'" style="top:'+r.y+"px;left:"+r.x+"px;width:"+r.width+"px;height:"+r.height+'px;">',i.htmlContent+=o;break;case"link":o=jQuery('<a class="flipbook-page-item flipbook-page-item-link"></a>').width(r.width).height(r.height).css({position:"absolute",top:r.y,left:r.x}),r.content&&o.html(r.content),r.url?o.attr("href",r.url).attr("target",r.target||"_blank"):r.page&&o.attr("href","#").addClass("internalLink").attr("data-page",r.page),i.htmlContent+=o[0].outerHTML;break;case"video":var s=!1===r.autoplay?"":"autoplay ",a=r.controls?"controls ":"",l=!1===r.muted?"":"muted ";o='<video class="flipbook-page-item" playsinline '+(!1===r.loop?"":"loop ")+s+a+l+' style="top:'+r.y+"px;left:"+r.x+"px;width:"+r.width+"px;height:"+r.height+'px;"><source type="video/mp4" src="'+r.url+'"></video>',i.htmlContent+=o;break;case"audio":s=!1===r.autoplay?"":"autoplay ",a=r.controls?"controls ":"";o="<audio "+s+(!1===r.loop?"":"loop ")+a+' class="flipbook-page-item" style="top:'+r.y+"px;left:"+r.x+"px;width:"+r.width+"px;height:"+r.height+'px;"><source src="'+r.url+'" type="audio/mpeg"></audio>',i.htmlContent+=o}}}},onBookCreated:function(){var e=this.options,i=this;!e.cover&&Number(e.startPage)<2&&(e.startPage=2),e.rightToLeft?this.goToPage(Number(e.pages.length-Number(e.startPage)+1),!0):this.goToPage(Number(e.startPage),!0);var n=o.documentElement;n.style.setProperty("--flipbook-link-color",this.options.linkColor),n.style.setProperty("--flipbook-link-color-hover",this.options.linkColorHover),jQuery(t).resize(function(){i.resize()}),this.resize(),this.Book.updateVisiblePages(),this.Book.zoomTo(e.zoomMin),this.updateCurrentPage(),this.playBgMusic(),o.addEventListener("keydown",function(e){if(i.Book.enabled){if(!i.options.arrowsAlwaysEnabledForNavigation||37!=e.keyCode&&39!=e.keyCode){if(!i.options.lightBox&&!i.fullscreenActive&&(i.options.arrowsDisabledNotFullscreen||i.bodyHasVerticalScrollbar()))return}else;switch((e=e||t.event).keyCode){case 37:i.zoom>1?i.moveBook("left"):i.prevPage();break;case 38:i.zoom>1?i.moveBook("up"):i.nextPage();break;case 39:i.zoom>1?i.moveBook("right"):i.nextPage();break;case 33:i.prevPage();break;case 34:i.nextPage();break;case 36:i.firstPage();break;case 35:i.lastPage();break;case 40:i.zoom>1?i.moveBook("down"):i.prevPage();break;case 107:case 187:i.zoomIn();break;case 109:case 189:i.zoomOut()}return!1}}),o.addEventListener("MSFullscreenChange",function(e){i.handleFsChange()}),o.addEventListener("mozfullscreenchange",function(e){i.handleFsChange()}),o.addEventListener("webkitfullscreenchange",function(e){i.handleFsChange()}),o.addEventListener("fullscreenchange",function(e){i.handleFsChange()}),e.lightboxCloseOnBack&&(t.onpopstate=function(){i.Book.enabled&&FLIPBOOK.lightboxOpened&&(t.location.hash||i.lightbox.closeLightbox(!0))}),this.zoom=e.zoomMin,this.bookLayer.bind("DOMMouseScroll",function(e){if(i.Book.enabled&&(i.options.lightBox||i.fullscreenActive||!i.options.wheelDisabledNotFullscreen&&!i.bodyHasVerticalScrollbar()))return e.stopPropagation(),e.preventDefault(),e.originalEvent.detail>0?i.zoomOut(e.originalEvent):i.zoomIn(e.originalEvent),!1}),this.bookLayer.bind("mousewheel",function(e){if(i.Book.enabled&&(i.options.lightBox||i.fullscreenActive||!i.options.wheelDisabledNotFullscreen&&!i.bodyHasVerticalScrollbar()))return e.stopPropagation(),e.preventDefault(),e.originalEvent.wheelDelta<0?i.zoomOut(e.originalEvent):i.zoomIn(e.originalEvent),!1}),this.setTool("toolMove"),i.options.contentOnStart?i.toggleToc(!0):i.options.thumbnailsOnStart?i.toggleThumbs(!0):i.options.searchOnStart&&(i.toggleSearch(!0),"string"==typeof i.options.searchOnStart&&i.thumbs.$findInput.val(i.options.searchOnStart).trigger("keyup")),e.autoplayOnStart&&i.toggleAutoplay(!0),i.options.lightBox&&i.Book.disable(),i.initColors(),setTimeout(function(){i.resize(),i.Book.updateVisiblePages(),i.Book.zoomTo(e.zoomMin)},500),e.onbookcreated&&e.onbookcreated.call(this)},initSwipe:function(){if(1!=this.options.numPages&&this.options.touchSwipeEnabled){var e=this;t.jQuery(this.bookLayer).swipe({swipeStatus:function(t,o,i,n,r,s,a){if("start"==o)try{e.currentPageInput.trigger("blur")}catch(t){}if(!e.options.sideNavigationButtons||t.target!==e.arrowL[0]&&t.target!==e.arrowR[0])if(("end"==o||"cancel"==o)&&r<200&&n<10){if("toolMove"==e.tool&&!e.options.doubleClickZoomDisabled)if(null==e.clickTimer)e.clickTimer=setTimeout(function(){if(e.clickTimer=null,"touchend"==t.type)t.changedTouches[0].pageX;else if("mouseup"==t.type)t.offsetX},300);else{clearTimeout(e.clickTimer),e.clickTimer=null;var l=e.options.zoomTime;e.zoom>=e.options.zoomMax?e.zoomTo(e.options.zoomMin,l,t):e.zoomTo(e.options.zoomMax,l,t)}}else{if(("up"==i||"down"==i)&&"move"==o||e.zoom>1||"toolSelect"==e.tool)return;e.Book.onSwipe(t,o,i,n,r,s,a)}},pinchStatus:function(t,o,i,n,r,s,a){"start"==o&&(e.zoomStart=e.zoom),s>1&&"move"==o&&(t.preventDefault(),t.scale&&(a=t.scale),e.zoomTo(e.zoomStart*a,0,t))},fingers:2,pinchThreshold:0,allowPageScroll:"vertical",preventDefaultEvents:!1}),this.swipeEnabled=!0}},toggleMenu:function(){this.menuShowing?(this.menuShowing=!1,this.bookLayer.css("bottom","0px"),this.menuBottom.fadeOut(),this.currentPageHolder.fadeOut(),jQuery(".flipbook-nav").fadeOut(),this.Book.onResize()):(this.menuShowing=!0,this.bookLayer.css("bottom",this.menuBottom.height()+"px"),this.menuBottom.fadeIn(),this.currentPageHolder.fadeIn(),jQuery(".flipbook-nav").fadeIn(),this.Book.onResize())},createIcon:function(e,t,i){var n;return n="material"==this.options.icons?jQuery(o.createElement("span")).attr("aria-hidden","true").addClass(t?e.iconM_alt:e.iconM).addClass("flipbook-icon flipbook-menu-btn skin-color"):jQuery(o.createElement("span")).attr("aria-hidden","true").addClass(t?e.iconFA_alt:e.iconFA).addClass("flipbook-icon flipbook-menu-btn skin-color"),i||n.addClass("skin-color-bg"),n},createButton:function(e){var t=this.options,i="top"==e.vAlign&&t.menu2Transparent||"top"!=e.vAlign&&t.menuTransparent,n=e.background||(i?t.floatingBtnBackground:t.btnBackground),r=e.backgroundHover||(i?t.floatingBtnBackgroundHover:t.btnBackgroundHover),s=e.color||(i?t.floatingBtnColor:t.btnColor),a=e.colorHover||(i?t.floatingBtnColorHover:t.btnColorHover),l=i?t.floatingBtnTextShadow:t.btnTextShadow,d=e.radius||(i?t.floatingBtnRadius:t.btnRadius),p=e.border||(i?t.floatingBtnBorder:t.btnBorder),h=i?t.floatingBtnMargin:t.btnMargin,c=t.btnPaddingV+2,u=t.btnPaddingH+2,g=jQuery(o.createElement("span")),f="material"==t.icons,b=f?(e.size||t.btnSize)+8:e.size||t.btnSize;function m(e){e.css({"font-size":b+"px",margin:h+"px",padding:c+"px "+u+"px","border-radius":d+"px","text-shadow":t.btnTextShadow,"box-shadow":t.btnShadow,border:p,color:s,background:n,"text-shadow":l}),s&&e.removeClass("skin-color"),n&&e.removeClass("skin-color-bg")}g.$icon=this.createIcon(e).appendTo(g),m(g.$icon),e.iconAlt2&&(g.$iconAlt=this.createIcon(e,!0).appendTo(g).hide(),m(g.$iconAlt)),g.icon=e.iconFA,g.iconAlt=e.iconFA_alt,f&&(g.icon=e.iconM,g.iconAlt=e.iconM_alt,e.icon=e.iconM,e.iconAlt=e.iconM_alt),e.onclick&&g.bind("tap click",function(t){e.onclick()}),(a||r)&&g.mouseenter(function(){Array.from(this.children).forEach(function(e){e.style.color=a,e.style.background=r})}).mouseleave(function(){Array.from(this.children).forEach(function(e){e.style.color=s,e.style.background=n})});var k;return k="top"==e.vAlign?t.menu2Floating?this.menuTC:"left"==e.hAlign?this.menuTL:"right"==e.hAlign?this.menuTR:this.menuTC:t.menuFloating?this.menuBC:"left"==e.hAlign?this.menuBL:"right"==e.hAlign?this.menuBR:this.menuBC,g.attr("data-name",e.name).appendTo(k).attr("title",e.title).addClass("").css("order",e.order),g},createMenu:function(){if(!this.menuBottom){var e=this.options,t=e.menuFloating?"flipbook-menu-floating":"flipbook-menu-fixed",i=e.menu2Floating?"flipbook-menu-floating":"flipbook-menu-fixed",n=this;this.menuBottom=jQuery(o.createElement("div")).addClass("flipbook-menuBottom").addClass(t).appendTo(this.wrapper).css({background:e.menuBackground,"box-shadow":e.menuShadow,margin:e.menuMargin+"px",padding:e.menuPadding+"px"}),e.menuTransparent||e.menuBackground||this.menuBottom.addClass("skin-color-bg"),e.hideMenu&&this.menuBottom.hide(),this.menuTop=jQuery(o.createElement("div")).addClass("flipbook-menuTop").addClass(i).appendTo(this.wrapper).css({background:e.menu2Background,"box-shadow":e.menu2Shadow,margin:e.menu2Margin+"px",padding:e.menu2Padding+"px"}),e.menu2Transparent||e.menu2Background||this.menuTop.addClass("skin-color-bg"),"swipe"==e.viewMode&&(e.btnSound.enabled=!1),this.menuBL=jQuery(o.createElement("div")).addClass("flipbook-menu flipbook-menu-left").appendTo(this.menuBottom),this.menuBC=jQuery(o.createElement("div")).addClass("flipbook-menu flipbook-menu-center").appendTo(this.menuBottom),this.menuBR=jQuery(o.createElement("div")).addClass("flipbook-menu flipbook-menu-right").appendTo(this.menuBottom),this.menuTL=jQuery(o.createElement("div")).addClass("flipbook-menu flipbook-menu-left").appendTo(this.menuTop),this.menuTC=jQuery(o.createElement("div")).addClass("flipbook-menu flipbook-menu-center").appendTo(this.menuTop),this.menuTR=jQuery(o.createElement("div")).addClass("flipbook-menu flipbook-menu-right").appendTo(this.menuTop),e.isMobile&&(void 0!==e.btnTocIfMobile&&(e.btnToc.hideOnMobile=!e.btnTocIfMobile),void 0!==e.btnThumbsIfMobile&&(e.btnThumbs.hideOnMobile=!e.btnThumbsIfMobile),void 0!==e.btnShareIfMobile&&(e.btnShare.hideOnMobile=!e.btnShareIfMobile),void 0!==e.btnDownloadPagesIfMobile&&(e.btnDownloadPages.hideOnMobile=!e.btnDownloadPagesIfMobile),void 0!==e.btnDownloadPdfIfMobile&&(e.btnDownloadPdf.hideOnMobile=!e.btnDownloadPdfIfMobile),void 0!==e.btnSoundIfMobile&&(e.btnSound.hideOnMobile=!e.btnSoundIfMobile),void 0!==e.btnExpandIfMobile&&(e.btnExpand.hideOnMobile=!e.btnExpandIfMobile),void 0!==e.btnPrintIfMobile&&(e.btnPrint.hideOnMobile=!e.btnPrintIfMobile)),e.sideNavigationButtons&&(this.btnNext=jQuery('<div class="flipbook-nav"><div class="flipbook-arrow-wrapper"></div></div>').appendTo(this.bookLayer).bind("tap click",function(e){n.btnNext.disabled||(n.btnNext.disabled=!0,setTimeout(function(){n.btnNext.disabled=!1},300),e.stopPropagation(),e.preventDefault(),n.nextPage())}),this.arrowR=this.createIcon(e.btnNext).appendTo(this.btnNext.first()).addClass("flipbook-right-arrow").css({width:e.sideBtnSize+"px",height:e.sideBtnSize+"px","font-size":e.sideBtnSize+"px","border-radius":e.sideBtnRadius+"px","margin-top":String(-e.sideBtnSize/2)+"px","margin-right":e.sideBtnMargin+"px",padding:e.sideBtnPaddingV+"px "+e.sideBtnPaddingH+"px","text-shadow":e.sideBtnTextShadow,"box-shadow":e.sideBtnShadow,border:e.sideBtnBorder,color:e.sideBtnColor,background:e.sideBtnBackground,"box-sizing":"initial"}),e.sideBtnColor&&this.arrowR.removeClass("skin-color"),e.sideBtnBackground&&this.arrowR.removeClass("skin-color-bg"),this.btnPrev=jQuery('<div class="flipbook-nav"><div class="flipbook-arrow-wrapper"></div></div>').appendTo(n.bookLayer).bind("tap click",function(e){n.btnPrev.disabled||(n.btnPrev.disabled=!0,setTimeout(function(){n.btnPrev.disabled=!1},300),e.stopPropagation(),e.preventDefault(),n.prevPage())}),this.arrowL=this.createIcon(e.btnPrev).appendTo(this.btnPrev.first()).addClass("flipbook-left-arrow").css({width:e.sideBtnSize+"px",height:e.sideBtnSize+"px","font-size":e.sideBtnSize+"px","border-radius":e.sideBtnRadius+"px","margin-top":String(-e.sideBtnSize/2)+"px","margin-left":e.sideBtnMargin+"px",padding:e.sideBtnPaddingV+"px "+e.sideBtnPaddingH+"px","text-shadow":e.sideBtnTextShadow,"box-shadow":e.sideBtnShadow,border:e.sideBtnBorder,color:e.sideBtnColor,background:e.sideBtnBackground,"box-sizing":"initial"}),e.sideBtnColor&&this.arrowL.removeClass("skin-color"),e.sideBtnBackground&&this.arrowL.removeClass("skin-color-bg"),e.btnFirst.enabled&&(this.btnFirst=jQuery('<div class="flipbook-nav"><div class="flipbook-arrow-wrapper"></div></div>').appendTo(this.bookLayer).bind("tap click",function(e){n.btnFirst.disabled||(n.btnFirst.disabled=!0,setTimeout(function(){n.btnFirst.disabled=!1},300),e.stopPropagation(),e.preventDefault(),n.firstPage())}),this.arrowFirst=this.createIcon(e.btnFirst).appendTo(this.btnFirst.first()).addClass("flipbook-first-arrow").css({width:e.sideBtnSize+"px",height:.66*e.sideBtnSize+"px","font-size":.66*e.sideBtnSize+"px","border-radius":e.sideBtnRadius+"px","margin-top":String(e.sideBtnSize/2+e.sideBtnMargin+2*e.sideBtnPaddingV)+"px","margin-left":e.sideBtnMargin+"px",padding:e.sideBtnPaddingV+"px "+e.sideBtnPaddingH+"px","text-shadow":e.sideBtnTextShadow,"box-shadow":e.sideBtnShadow,border:e.sideBtnBorder,color:e.sideBtnColor,background:e.sideBtnBackground,"box-sizing":"initial"}),e.sideBtnColor&&this.arrowFirst.removeClass("skin-color"),e.sideBtnBackground&&this.arrowFirst.removeClass("skin-color-bg")),e.btnLast.enabled&&(this.btnLast=jQuery('<div class="flipbook-nav"><div class="flipbook-arrow-wrapper"></div></div>').appendTo(n.bookLayer).bind("tap click",function(e){n.btnLast.disabled||(n.btnLast.disabled=!0,setTimeout(function(){n.btnLast.disabled=!1},300),e.stopPropagation(),e.preventDefault(),n.lastPage())}),this.arrowLast=this.createIcon(e.btnLast).appendTo(this.btnLast.first()).addClass("flipbook-last-arrow").css({width:e.sideBtnSize+"px",height:.66*e.sideBtnSize+"px","font-size":.66*e.sideBtnSize+"px","border-radius":e.sideBtnRadius+"px","margin-top":String(e.sideBtnSize/2+e.sideBtnMargin+2*e.sideBtnPaddingV)+"px","margin-right":e.sideBtnMargin+"px",padding:e.sideBtnPaddingV+"px "+e.sideBtnPaddingH+"px","text-shadow":e.sideBtnTextShadow,"box-shadow":e.sideBtnShadow,border:e.sideBtnBorder,color:e.sideBtnColor,background:e.sideBtnBackground,"box-sizing":"initial"}),e.sideBtnColor&&this.arrowLast.removeClass("skin-color"),e.sideBtnBackground&&this.arrowLast.removeClass("skin-color-bg")),e.btnOrder.indexOf("btnFirst")>=0&&e.btnOrder.splice(e.btnOrder.indexOf("btnFirst"),1),e.btnOrder.indexOf("btnPrev")>=0&&e.btnOrder.splice(e.btnOrder.indexOf("btnPrev"),1),e.btnOrder.indexOf("btnNext")>=0&&e.btnOrder.splice(e.btnOrder.indexOf("btnNext"),1),e.btnOrder.indexOf("btnLast")>=0&&e.btnOrder.splice(e.btnOrder.indexOf("btnLast"),1)),e.pdfMode&&!e.btnDownloadPdf.url&&(e.btnDownloadPdf.url=e.pdfUrl),!e.pdfTextLayer&&e.btnSelect&&(e.btnSelect.enabled=!1),!e.pdfTextLayer&&e.btnSearch&&(e.btnSearch.enabled=!1);for(var r=0;r<e.btnOrder.length;r++){var s=e.btnOrder[r],a=e[s];e.isMobile&&a.hideOnMobile&&(a.enabled=!1),a.enabled&&(a.name=s,"currentPage"==a.name?this.createCurrentPage():this[s]=this.createButton(a).bind("touchend click",function(e){e.stopPropagation(),e.preventDefault(),n.onButtonClick(this,e)}))}if(e.buttons)for(r=0;r<e.buttons.length;r++){a=e.buttons[r];n.createButton(a).index(1)}}},onButtonClick:function(e,i){var n=jQuery(e).attr("data-name"),r=this.options;switch(n){case"btnFirst":this.firstPage();break;case"btnPrev":this.prevPage();break;case"btnNext":this.nextPage();break;case"btnLast":this.lastPage();break;case"btnZoomIn":this.zoomIn();break;case"btnZoomOut":this.zoomOut();break;case"btnAutoplay":this.autoplay||this.nextPage(),this.toggleAutoplay();break;case"btnSearch":this.toggleSearch();break;case"btnBookmark":this.toggleBookmark();break;case"btnRotateLeft":this.Book.rotateLeft&&this.Book.rotateLeft();break;case"btnRotateRight":this.Book.rotateRight&&this.Book.rotateRight();break;case"btnToc":this.toggleToc();break;case"btnThumbs":this.toggleThumbs();break;case"btnShare":this.toggleShareMenu();break;case"btnDownloadPages":if(r.downloadMenu)this.toggleDownloadMenu();else{var s=o.createElement("a");s.href=r.btnDownloadPages.url,s.download=r.btnDownloadPages.name,s.dispatchEvent(new MouseEvent("click"))}break;case"btnPrint":r.printMenu?this.togglePrintMenu():this.togglePrintWindow();break;case"btnDownloadPdf":if(r.btnDownloadPdf.forceDownload){var a=r.btnDownloadPdf.url,l=o.createElement("a");l.href=a;var d=l.href.split("/").pop().split("#")[0].split("?")[0];l.download=d,o.body.appendChild(l),l.click(),o.body.removeChild(l)}else{var p=r.btnDownloadPdf.openInNewWindow||(r.btnDownloadPdf.openInNewWindow,1)?"_blank":"_self";t.open(r.btnDownloadPdf.url,p)}this.gaCode&&ga("send",{hitType:"event",eventCategory:"Flipbook : "+r.name,eventAction:"download PDF",eventLabel:r.btnDownloadPdf.url,nonInteraction:!0});break;case"btnSound":this.toggleSound();break;case"btnSelect":this.toggleTool();break;case"btnExpand":this.toggleExpand();break;case"btnClose":this.lightbox.closeLightbox()}},handleFsChange:function(e){if(this.Book&&this.Book.enabled){var t=jQuery(this.fullscreenElement);(o.fullscreenElement||o.webkitFullscreenElement||o.mozFullScreenElement||o.msFullscreenElement)===this.fullscreenElement||this.isFullscreen?(e&&(t.addClass("flipbook-browser-fullscreen"),this.fullscreenElement.parentNodeOld=this.fullscreenElement.parentNode,this.options.lightBox||t.appendTo(jQuery("body"))),this.fullscreenActive=!0,this.options.onfullscreenenter&&this.options.onfullscreenenter.call(this)):(e&&(t.removeClass("flipbook-browser-fullscreen"),this.options.lightBox||t.appendTo(jQuery(this.fullscreenElement.parentNodeOld))),this.fullscreenActive=!1,this.options.onfullscreenexit&&this.options.onfullscreenexit.call(this)),this.triggerResizeOnce(),this.toggleIcon(this.btnExpand,!this.fullscreenActive)}},createLogo:function(){var e=this.options;if(e.logoImg&&(!e.isMobile||!e.logoHideOnMobile)){var o=jQuery("<img>").attr("src",e.logoImg).attr("style",e.logoCSS).appendTo(this.wrapper);"right"==e.logoAlignH&&o.css("right","0"),"bottom"==e.logoAlignV&&o.css("bottom","0"),e.logoUrl&&o.css("cursor","pointer").bind("touchend click",function(o){o.stopPropagation(),o.preventDefault(),t.open(e.logoUrl,e.logoUrlTarget||"_blank")})}},setLoadingProgress:function(e){this.disposed||(this.$fillPreloader?this.setFillPreloaderProgress(e):e>0&&e<1?jQuery(this.preloader).stop(!0,!0).show():jQuery(this.preloader).stop(!0,!0).hide())},setFillPreloaderProgress:function(e){if(this.$fillPreloader)if(e>0&&e<1){if(this.fillPreloaderProgress=this.fillPreloaderProgress||0,e<this.fillPreloaderProgress)return;this.fillPreloaderProgress=e;var t=this.$fillPreloaderImg[0];t.style.clip="rect(0px,"+t.width*e+"px,"+t.height+"px,0px)",this.$fillPreloader.show()}else this.$fillPreloader.hide()},playFlipSound:function(){if(this.options.sound&&this.Book.enabled&&void 0!==this.flipSound.play){this.flipSound.currentTime=0;var e=this;setTimeout(function(){e.flipSound.play().then(function(){},function(){})},70)}},playBgMusic:function(){if(this.options.sound&&this.backgroundMusic&&this.backgroundMusic.play){var e=this;this.backgroundMusic.play().then(function(){},function(t){setTimeout(function(){e.playBgMusic()},100)})}},onMouseWheel:function(e){if("wheelDeltaX"in e)wheelDeltaX=e.wheelDeltaX/12,wheelDeltaY=e.wheelDeltaY/12;else if("wheelDelta"in e)wheelDeltaX=wheelDeltaY=e.wheelDelta/12;else{if(!("detail"in e))return;wheelDeltaX=wheelDeltaY=3*-e.detail}wheelDeltaX>0?this.zoomIn(e):this.zoomOut(e)},zoomTo:function(e,t,o){var i,n;this.zoom=e,void 0===o?(i=this.model.wrapperW/2,n=this.model.wrapperH/2):(o.touches&&o.touches[0]?(i=o.touches[0].pageX,n=o.touches[0].pageY):o.changedTouches&&o.changedTouches[0]?(i=o.changedTouches[0].pageX,n=o.changedTouches[0].pageY):(i=o.pageX,n=o.pageY),i-=this.wrapper.offset().left,n-=this.wrapper.offset().top),this.zoom<this.options.zoomMin&&(this.zoom=this.options.zoomMin),this.zoom>this.options.zoomMax&&(this.zoom=this.options.zoomMax),this.options.zoomMax2&&this.zoom>this.options.zoomMax2&&(this.zoom=this.options.zoomMax2),this.model.zoom=this.zoom,this.Book.zoomTo(this.zoom,t,i,n),this.onZoom(this.zoom)},zoomOut:function(e){var t=this.zoom/this.options.zoomStep;if(t<1&&this.zoom>1&&(t=1),t=t<this.options.zoomMin?this.options.zoomMin:t,this.zoom!=t){this.zoom=t;var o=this.options.zoomTime;this.zoomTo(this.zoom,o,e)}},zoomIn:function(e){var t=this.zoom*this.options.zoomStep;if(t>1&&this.zoom<1&&(t=1),this.model.wrapperH*t>this.options.zoomSize&&(t=this.options.zoomSize/this.model.wrapperH),this.zoom!=t){this.zoom=t;var o=this.options.zoomTime;this.zoomTo(this.zoom,o,e)}},nextPage:function(){this.Book&&this.Book.nextPage()},prevPage:function(){this.Book&&this.Book.prevPage()},firstPage:function(){this.goToPage(1)},lastPage:function(){this.goToPage(this.options.pages.length)},goToPage:function(e,t){this.options.cover||e++,e<1?e=1:e>this.options.numPages&&!this.options.rightToLeft&&(e=this.options.numPages),this.Book&&this.Book.goToPage(e,t)},moveBook:function(e){this.Book&&this.Book.move&&this.Book.move(e)},onZoom:function(e){this.zoom=e,this.enableButton(this.btnZoomIn,e<this.options.zoomMax),this.enableButton(this.btnZoomOut,e>this.options.zoomMin),this.enableSwipe(e<=1),this.model.zoom=e},enableSwipe:function(e){this.swipeEnabled=e},createCurrentPage:function(){var e,t=this,i=this.options,n="flipbook-currentPageHolder ";e="top"==i.currentPage.vAlign?"left"==i.currentPage.hAlign?this.menuTL:"right"==i.currentPage.hAlign?this.menuTR:this.menuTC:"left"==i.currentPage.hAlign?this.menuBL:"right"==i.currentPage.hAlign?this.menuBR:this.menuBC;var r="top"==i.currentPage.vAlign&&i.menu2Transparent||"top"!=i.currentPage.vAlign&&i.menuTransparent,s=r?i.floatingBtnBackground:"",a=r?i.floatingBtnColor:i.btnColor,l=r?i.floatingBtnTextShadow:"",d=r?i.floatingBtnRadius:i.btnRadius,p=(r?i.floatingBtnMargin:i.btnMargin,jQuery("<div>").appendTo(e));p.css("margin",i.currentPage.marginV+"px "+i.currentPage.marginH+"px"),r||(n+="skin-color "),p.addClass(n).css({color:a,background:s,"text-shadow":l,"border-radius":d+"px"}),i.currentPage.order&&p.css("order",i.currentPage.order),this.currentPageHolder=p,this.currentPage=jQuery(o.createElement("div")).addClass("flipbook-currentPageNumber").appendTo(p);var h=jQuery("<form>").appendTo(p).submit(function(e){var o=parseInt(t.currentPageInput.val());return o=o>i.pages.length?i.pages.length:o,t.options.rightToLeft&&(o=i.pages.length-o+1),o+=t.options.pageNumberOffset,t.goToPage(o),t.currentPageInput.trigger("blur"),!1});this.currentPageInput=jQuery('<input type="text" maxlength="4">').addClass("flipbook-currentPageInput").css({margin:i.currentPage.marginV+"px "+i.currentPage.marginH+"px",color:a}).appendTo(h).val("").focus(function(){t.currentPageInput.val(""),t.currentPage.addClass("flipbook-color-transparent")}).blur(function(){t.currentPageInput.val(""),t.currentPage.removeClass("flipbook-color-transparent")}),r||this.currentPageInput.addClass("skin-color")},createMenuHeader:function(e,t,o){var i=this,n=jQuery("<div>").addClass("flipbook-menu-header skin-clor flipbook-font").appendTo(e),r=(t=jQuery("<span>").text(t).addClass("flipbook-menu-title skin-color").appendTo(n),jQuery("<span>").appendTo(n).addClass("flipbook-btn-close").bind("touchend click",function(e){e.stopPropagation(),e.preventDefault(),i.closeMenus()}));this.createIcon(this.options.btnClose,null,!0).appendTo(r)},createToc:function(){var e=this,t=this.options.tableOfContent;if(t&&t.length||!this.pdfService||this.pdfService.outlineLoaded){if(this.tocHolder=jQuery("<div>").addClass("flipbook-tocHolder flipbook-side-menu skin-color-bg").appendTo(this.wrapper).css(this.options.sideMenuPosition,"0").hide(),this.createMenuHeader(this.tocHolder,this.strings.tableOfContent,this.toggleToc),this.toc=jQuery("<div>").addClass("flipbook-toc").appendTo(this.tocHolder),this.tocScroller=jQuery("<div>").addClass("flipbook-toc-scroller").appendTo(this.toc),this.tocScroll=new FLIPBOOK.IScroll(e.toc[0],{bounce:!1,mouseWheel:!0,scrollbars:!0,interactiveScrollbars:!0}),t&&t.length>0){this.options.pages;for(var o=0;o<t.length;o++)this.createTocItem(t[o])}else{var i=this.options.pages;for(o=0;o<i.length;o++){var n=i[o].title;if(""!=n&&void 0!==n){var r={title:n,page:String(o+1)};this.createTocItem(r)}}}this.initColors(),this.tocScroll.refresh(),this.tocCreated=!0,this.toggleToc()}else e.pdfService.loadOutline(function(t){e.options.tableOfContent=t;var o=new EventBus,i={scrollPageIntoView:function(e){var t=e.pageNumber,o=$annotations[processingAnnotationIndex];o&&(o.dataset.page=t,processingAnnotationIndex++,processAnotations())}};new PDFLinkService({eventBus:o}).setViewer(i),e.createToc()})},createTocItem:function(e,t,i){var n=this,r=(t=t||this.tocScroller,this.options.rightToLeft),s=jQuery(o.createElement("a")).attr("class","flipbook-tocItem").addClass("skin-color").css("direction",r?"rtl":"ltr").appendTo(t).bind("touchend click",function(t){if(t.stopPropagation(),t.preventDefault(),!n.tocScroll.moved)if(n.options.tableOfContentCloseOnClick&&n.toggleToc(!1),!e.page&&e.dest){function o(e){n.pdfService.pdfDocument.getPageIndex(e[0]).then(function(e){var t=e+1;n.options.doublePage&&(t=2*t-1),t=n.options.rightToLeft?n.options.pages.length-t+1:t,setTimeout(function(){n.goToPage(t)},200)})}"string"==typeof e.dest?n.pdfService.pdfDocument.getDestination(e.dest).then(function(e){o(e)}):o(e.dest)}else{var i=Number(e.page);i=n.options.rightToLeft?n.options.pages.length-i+1:i,setTimeout(function(){n.goToPage(i)},200)}});i||(i=0),s.level=i,s.css("padding","8px 0"),s.css("margin-"+(r?"right":"left"),"10px"),i?(s.css("margin-top","8px"),s.css("padding-bottom","0")):(s.css("margin-right","15px"),s.css("padding-left","10px"));var a=jQuery(o.createElement("span")).appendTo(s).css("width","20px").css("display","inline-block").css("cursor","auto").bind("touchend click",function(e){e.stopPropagation(),e.preventDefault();for(var t=0;t<s.items.length;t++)s.items[t].toggle();l.toggle(),d.toggle(),n.tocScroll.refresh()}),l=jQuery("<span>").attr("aria-hidden","true").appendTo(a).addClass("flipbook-icon-angle-"+(r?"left":"right")+" skin-color").hide(),d=jQuery("<span>").attr("aria-hidden","true").appendTo(a).addClass("flipbook-icon-angle-down skin-color").hide();if(jQuery(o.createElement("span")).appendTo(s).addClass("title").text(e.title).css("width",String(170-10*s.level)+"px"),!e.pageHidden){var p=e.page-this.options.pageNumberOffset;p&&jQuery(o.createElement("span")).appendTo(s).width("25px").css("display","inline-block").css("text-align","right").text(p)}if(e.items&&e.items.length){s.items=[];for(var h=0;h<e.items.length;h++){var c=this.createTocItem(e.items[h],s,s.level+1);s.items.push(c),c.hide()}l.show()}return s},enablePrev:function(e){this.enableButton(this.btnPrev,e),this.enableButton(this.btnFirst,e),this.Book.enablePrev(e)},enableNext:function(e){this.enableButton(this.btnNext,e),this.enableButton(this.btnLast,e),this.Book.enableNext(e)},enableButton:function(e,t){void 0!==e&&(t?(e.css("opacity","1"),e.css("pointer-events","auto")):(e.css("opacity","0.2"),e.css("pointer-events","none")),e.enabled=t)},resize:function(){var e=this.model,t=this.options;if(e.wrapperW=this.bookLayer.width(),e.wrapperH=this.bookLayer.height(),!e.wrapperH){var i=this.elem[0].cloneNode(!0);o.body.appendChild(i);var n=jQuery(i);if(e.wrapperW=n.width(),e.wrapperH=n.height(),!t.menuOverBook&&this.menuShowing&&this.menuBottom){var r=this.menuBottom[0].cloneNode(!0);o.body.appendChild(r),e.wrapperH-=jQuery(r).height(),o.body.removeChild(r)}o.body.removeChild(i)}this.Book&&this.Book.enabled&&(!t.menuOverBook&&this.menuShowing&&this.menuBottom?this.bookLayer.css("bottom",this.menuBottom.outerHeight()+"px"):this.bookLayer.css("bottom","0px"),!t.menu2OverBook&&this.menuShowing&&this.menuTop?this.bookLayer.css("top",this.menuTop.outerHeight()+"px"):this.bookLayer.css("top","0px"),this.tocShowing||this.thumbsShowing||this.searchShowing||this.bookmarkShowing?(t.sideMenuOverBook||this.bookLayer.css(this.options.sideMenuPosition,"250px"),this.options.sideMenuOverMenu||this.wrapper.find(".flipbook-side-menu").css("bottom",this.menuBottom.outerHeight()+"px"),this.options.sideMenuOverMenu2||this.wrapper.find(".flipbook-side-menu").css("top",this.menuTop.outerHeight()+"px")):this.bookLayer.css(this.options.sideMenuPosition,"0px"),t.zoomMax=t.zoomSize/e.wrapperH,t.zoomMax<t.zoomMin&&(t.zoomMax=t.zoomMin),e.zoom=t.zoomMin,this.Book.onResize(),this.options.zoomReset&&this.Book.zoomTo(this.options.zoomMin))},pdfResize:function(){this.Book.onZoom()},createThumbs:function(){this.thumbs=new FLIPBOOK.Thumbnails(this)},toggleThumbs:function(e){this.thumbs||this.createThumbs(),void 0!==e&&(this.thumbsShowing=!e),this.thumbsShowing?(this.thumbs.hide(),this.thumbsShowing=!1):(this.closeMenus(),this.thumbs.show(),this.thumbsShowing=!0),this.resize()},toggleToc:function(e){this.tocCreated?(!this.tocShowing||e?(this.closeMenus(),this.tocShowing=!0,this.tocHolder.show(),this.tocScroll.refresh()):(this.tocHolder.hide(),this.tocShowing=!1),this.resize()):this.createToc()},toggleSearch:function(e){this.thumbs||this.createThumbs(),void 0!==e&&(this.searchShowing=!e),this.searchShowing?(this.thumbs.hide(),this.searchShowing=!1,this.unmark()):(this.closeMenus(),this.thumbs.show(),this.thumbs.showSearch(),this.searchShowing=!0),this.resize()},toggleBookmark:function(e){this.thumbs||this.createThumbs(),void 0!==e&&(this.bookmarkShowing=!e),this.bookmarkShowing?(this.thumbs.hide(),this.bookmarkShowing=!1):(this.closeMenus(),this.thumbs.show(),this.thumbs.showBookmarks(),this.bookmarkShowing=!0),this.resize()},closeMenus:function(){this.thumbsShowing&&this.toggleThumbs(),this.tocShowing&&this.toggleToc(),this.searchShowing&&this.toggleSearch(),this.bookmarkShowing&&this.toggleBookmark(),this.printMenuShowing&&this.togglePrintMenu(),this.dlMenuShowing&&this.toggleDownloadMenu(),this.shareMenuShowing&&this.toggleShareMenu(),this.passwordMenuShowing&&this.togglePasswordMenu()},togglePrintMenu:function(){var e=this;if(this.printMenu)this.printMenuShowing?(this.printMenu.hide(),this.printMenuShowing=!1):(this.closeMenus(),this.printMenu.show(),this.printMenuShowing=!0,this.updateCurrentPage());else{this.printMenu=jQuery('<div class="flipbook-sub-menu flipbook-font">').appendTo(this.wrapper);var t=jQuery('<div class="flipbook-sub-menu-center">').appendTo(this.printMenu),o=jQuery('<div class="flipbook-sub-menu-content skin-color-bg">').appendTo(t);this.createMenuHeader(o,this.strings.print,this.togglePrintMenu);jQuery('<a><div class="c-p skin-color flipbook-btn">'+this.strings.printCurrentPage+"</div></a>").appendTo(o).bind("touchend click",function(t){e.printPage(e.cPage[0],this)}),jQuery('<a><div class="c-l-p skin-color flipbook-btn">'+this.strings.printLeftPage+"</div></a>").appendTo(this.printMenu).appendTo(o).bind("touchend click",function(t){e.printPage(e.cPage[0],this)}),jQuery('<a><div class="c-r-p skin-color flipbook-btn">'+this.strings.printRightPage+"</div></a>").appendTo(this.printMenu).appendTo(o).bind("touchend click",function(t){e.printPage(e.cPage[1],this)}),jQuery('<a><div class="skin-color flipbook-btn">'+this.strings.printAllPages+"</div></a>").appendTo(o).bind("touchend click",function(t){e.togglePrintWindow()});this.closeMenus(),this.printMenuShowing=!0,this.initColors(),this.updateCurrentPage()}},toggleDownloadMenu:function(){var e=this;if(this.dlMenu)this.dlMenuShowing?(this.dlMenu.hide(),this.dlMenuShowing=!1):(this.dlMenu.show(),this.closeMenus(),this.dlMenuShowing=!0,this.updateCurrentPage());else{this.dlMenu=jQuery('<div class="flipbook-sub-menu flipbook-font">').appendTo(this.wrapper);var t=jQuery('<div class="flipbook-sub-menu-center">').appendTo(this.dlMenu),i=jQuery('<div class="flipbook-sub-menu-content skin-color-bg">').appendTo(t);this.createMenuHeader(i,this.strings.download,this.toggleDownloadMenu);jQuery('<a><div class="c-p skin-color flipbook-btn">'+this.strings.downloadCurrentPage+"</div></a>").appendTo(i).bind("touchend click",function(t){e.downloadPage(e.cPage[0],this)}),jQuery('<a><div class="c-l-p skin-color flipbook-btn">'+this.strings.downloadLeftPage+"</div></a>").appendTo(i).bind("touchend click",function(t){e.downloadPage(e.cPage[0],this)}),jQuery('<a><div class="c-r-p skin-color flipbook-btn">'+this.strings.downloadRightPage+"</div></a>").appendTo(i).bind("touchend click",function(t){e.downloadPage(e.cPage[1],this)}),jQuery('<a><div class="skin-color flipbook-btn">'+this.strings.downloadAllPages+"</div></a>").appendTo(i).bind("touchend click",function(t){var i=o.createElement("a");i.href=e.options.btnDownloadPages.url;var n=i.href.split("/").pop().split("#")[0].split("?")[0];i.download=n,i.dispatchEvent(new MouseEvent("click"))});this.closeMenus(),this.dlMenuShowing=!0,this.initColors(),this.updateCurrentPage()}},toggleShareMenu:function(){if(this.shareMenu)this.shareMenuShowing?(this.shareMenu.hide(),this.shareMenuShowing=!1):(this.shareMenu.show(),this.closeMenus(),this.shareMenuShowing=!0);else{this.shareMenu=jQuery(o.createElement("div")).appendTo(this.wrapper).addClass("flipbook-sub-menu flipbook-font");var e=jQuery(o.createElement("div")).appendTo(this.shareMenu).addClass("flipbook-sub-menu-center"),i=jQuery(o.createElement("div")).appendTo(e).addClass("flipbook-sub-menu-content skin-color-bg");this.createMenuHeader(i,this.options.strings.share,this.toggleShareMenu);var n=this.options,r=jQuery('<div class="flipbook-share"><ul></ul></div>').appendTo(i).find("ul"),s=t.screen.width/2-300,a=t.screen.height/2-300;["facebook","twitter","pinterest","linkedin","email","whatsapp","digg","reddit"].forEach(function(e){n[e].enabled&&jQuery('<li data-network="'+e+'"><i class="'+n[e].icon+" skin-color flipbook-color-"+n.skin+'"></i></li>').appendTo(r).bind("tap click",function(e){e.preventDefault(),e.stopPropagation();var o,i=this.dataset.network,r=encodeURIComponent(n.shareTitle||n[i].description||"Check out this flipbook"),l=encodeURIComponent(n.shareUrl||t.location.href),d=encodeURIComponent(n.shareImage||"");switch(i){case"facebook":o="https://www.facebook.com/sharer.php?u="+l+"&t="+r;break;case"twitter":o="https://twitter.com/intent/tweet?text="+r+"&url="+l;break;case"linkedin":o="https://www.linkedin.com/shareArticle?mini=true&url="+l+"&title="+r;break;case"pinterest":o="https://www.pinterest.com/pin/create/button/?url="+l+"&media="+d+"&description="+r;break;case"email":o="mailto:?subject="+r+"&body="+l;break;case"digg":o="http://digg.com/submit?url="+l+"&title="+r;break;case"reddit":o="http://reddit.com/submit?url="+l+"&title="+r;break;case"whatsapp":o=n.isMobile?"whatsapp://send?text="+r+"%20d"+l:"https://wa.me?text="+r+"%20d"+l}t.open(o,"Share","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=600, height=600, top="+a+", left="+s)})}),this.closeMenus(),this.shareMenuShowing=!0,this.initColors()}},bookmarkPage:function(e){var t=this.getBookmarkedPages();t.indexOf(String(e))<0&&t.push(e),this.setBookmarkedPages(t),this.thumbs.showBookmarkedThumbs(),this.bookmarkShowing||this.toggleBookmark()},removeBookmark:function(e){var t=this.getBookmarkedPages();t.indexOf(String(e))>-1&&t.splice(t.indexOf(String(e)),1),this.setBookmarkedPages(t),this.thumbs.showBookmarkedThumbs(),this.bookmarkShowing||this.toggleBookmark()},isBookmarked:function(e){return this.getBookmarkedPages().indexOf(String(e))>0},getBookmarkedPages:function(){var e=localStorage.getItem(this.options.name+"_flipbook_bookmarks");return e?e.split(";"):[]},setBookmarkedPages:function(e){localStorage.setItem(this.options.name+"_flipbook_bookmarks",e.join(";"))},printPage:function(e,t){var i,n=this.options.pages[e],r=this.options.pageTextureSize;if(n)if(n.print)i=n.print;else if(n.canvas&&n.canvas[r]){var s=n.canvas[r];if("webgl"==this.options.viewMode){var a=o.createElement("canvas"),l=a.getContext("2d");a.width=s.width,a.height=s.height,s.scaleX&&(a.width=s.width*s.scaleX),s.scaleY&&(a.height=s.height*s.scaleY),"right"==n.side?l.drawImage(s,a.width,0,a.width,a.height,0,0,a.width,a.height):l.drawImage(s,0,0),i=a.toDataURL()}else i=n.canvas[r].toDataURL()}else n.src&&(i=n.src);if(i){var d=o.createElement("img");d.src=i,o.body.appendChild(d),printJS(i,"image")}else{var p=this;this.loadPage(e,r,function(){p.printPage(e)})}},downloadPage:function(e){var t;if(this.options.pages[e]&&this.options.pages[e].download)t=this.options.pages[e].download;else if(this.options.pages[e]&&this.options.pages[e].src)t=this.options.pages[e].src;else if(this.options.pages[e]&&this.options.pages[e].canvas&&this.options.pages[e].canvas[this.options.pageTextureSize]){var i=o.createElement("canvas"),n=this.options.pageWidth/this.options.pageHeight;i.width=this.options.pageTextureSize*n,i.height=this.options.pageTextureSize,i.getContext("2d").drawImage(this.options.pages[e].canvas[this.options.pageTextureSize],0,0),t=i.toDataURL("image/jpeg",.5)}if(t){var r=o.createElement("a");r.href=t,r.download="page"+String(e+1),o.body.appendChild(r),r.click(),o.body.removeChild(r)}else{var s=this;this.loadPage(e,this.options.pageTextureSize,function(){s.downloadPage(e)})}},printPdf:function(e){var t=new URL(e,o.baseURI).href;printJS(t)},togglePrintWindow:function(e){var o;(o=this).options.printPdfUrl?o.printPdf(o.options.printPdfUrl):o.options.pdfUrl?o.printPdf(o.options.pdfUrl):i();function i(){link="about:blank";var e=t.open(link,"_new");e.document.open();for(var i="",n=0;n<o.options.pages.length;n++)o.options.pages[n].src&&(i+='<img src="'+o.options.pages[n].src.toString()+'"/>\n');var r=function(e){return"<html>\n<head>\n<title>Temporary Printing Window</title>\n<script>\nfunction step1() {\n  setTimeout('step2()', 10);\n}\nfunction step2() {\n  window.print();\n  window.close();\n}\n<\/script>\n<style>img {display:block; max-width:100%; page-break-after: always;}</style>\n</head>\n<body onLoad='step1()'>\n"+e+"</body>\n</html>\n"}(i);e.document.write(r),e.document.close()}},thumbsVertical:function(){this.thumbsCreated&&(this.thumbScroll.hScroll=!1,this.thumbScroll.vScroll=!0,this.thumbScroll.refresh())},toggleExpand:function(e){screenfull.enabled?screenfull.toggle(this.fullscreenElement):(this.isFullscreen=!this.isFullscreen,this.handleFsChange(!0))},expand:function(){},toggleAutoplay:function(e){var t=this;this.autoplay=e||!this.autoplay,this.autoplay?this.autoplayTimer=setInterval(function(){if(t.autoplay){var e=t.options.autoplayStartPage||1;t.options.rightToLeft?t.Book.prevEnabled?t.prevPage():t.options.autoplayLoop&&t.goToPage(t.options.pages.length-e+1):t.Book.nextEnabled?t.nextPage():t.options.autoplayLoop&&t.goToPage(e)}},t.options.autoplayInterval):clearInterval(t.autoplayTimer),this.toggleIcon(this.btnAutoplay,!this.autoplay)},triggerResizeOnce:function(){setTimeout(function(){jQuery(t).trigger("resize")},100),setTimeout(function(){jQuery(t).trigger("resize")},500)},triggerResize:function(){setTimeout(function(){jQuery(t).trigger("resize")},100),setTimeout(function(){jQuery(t).trigger("resize")},500),setTimeout(function(){jQuery(t).trigger("resize")},2e3)},initEasing:function(){t.jQuery.extend(t.jQuery.easing,{def:"easeOutQuad",swing:function(e,t,o,i,n){return jQuery.easing[jQuery.easing.def](e,t,o,i,n)},easeInQuad:function(e,t,o,i,n){return i*(t/=n)*t+o},easeOutQuad:function(e,t,o,i,n){return-i*(t/=n)*(t-2)+o},easeInOutQuad:function(e,t,o,i,n){return(t/=n/2)<1?i/2*t*t+o:-i/2*(--t*(t-2)-1)+o},easeInCubic:function(e,t,o,i,n){return i*(t/=n)*t*t+o},easeOutCubic:function(e,t,o,i,n){return i*((t=t/n-1)*t*t+1)+o},easeInOutCubic:function(e,t,o,i,n){return(t/=n/2)<1?i/2*t*t*t+o:i/2*((t-=2)*t*t+2)+o},easeInQuart:function(e,t,o,i,n){return i*(t/=n)*t*t*t+o},easeOutQuart:function(e,t,o,i,n){return-i*((t=t/n-1)*t*t*t-1)+o},easeInOutQuart:function(e,t,o,i,n){return(t/=n/2)<1?i/2*t*t*t*t+o:-i/2*((t-=2)*t*t*t-2)+o},easeInQuint:function(e,t,o,i,n){return i*(t/=n)*t*t*t*t+o},easeOutQuint:function(e,t,o,i,n){return i*((t=t/n-1)*t*t*t*t+1)+o},easeInOutQuint:function(e,t,o,i,n){return(t/=n/2)<1?i/2*t*t*t*t*t+o:i/2*((t-=2)*t*t*t*t+2)+o},easeInSine:function(e,t,o,i,n){return-i*Math.cos(t/n*(Math.PI/2))+i+o},easeOutSine:function(e,t,o,i,n){return i*Math.sin(t/n*(Math.PI/2))+o},easeInOutSine:function(e,t,o,i,n){return-i/2*(Math.cos(Math.PI*t/n)-1)+o},easeInExpo:function(e,t,o,i,n){return 0==t?o:i*Math.pow(2,10*(t/n-1))+o},easeOutExpo:function(e,t,o,i,n){return t==n?o+i:i*(1-Math.pow(2,-10*t/n))+o},easeInOutExpo:function(e,t,o,i,n){return 0==t?o:t==n?o+i:(t/=n/2)<1?i/2*Math.pow(2,10*(t-1))+o:i/2*(2-Math.pow(2,-10*--t))+o},easeInCirc:function(e,t,o,i,n){return-i*(Math.sqrt(1-(t/=n)*t)-1)+o},easeOutCirc:function(e,t,o,i,n){return i*Math.sqrt(1-(t=t/n-1)*t)+o},easeInOutCirc:function(e,t,o,i,n){return(t/=n/2)<1?-i/2*(Math.sqrt(1-t*t)-1)+o:i/2*(Math.sqrt(1-(t-=2)*t)+1)+o},easeInElastic:function(e,t,o,i,n){var r=1.70158,s=0,a=i;if(0==t)return o;if(1==(t/=n))return o+i;if(s||(s=.3*n),a<Math.abs(i)){a=i;r=s/4}else r=s/(2*Math.PI)*Math.asin(i/a);return-a*Math.pow(2,10*(t-=1))*Math.sin((t*n-r)*(2*Math.PI)/s)+o},easeOutElastic:function(e,t,o,i,n){var r=1.70158,s=0,a=i;if(0==t)return o;if(1==(t/=n))return o+i;if(s||(s=.3*n),a<Math.abs(i)){a=i;r=s/4}else r=s/(2*Math.PI)*Math.asin(i/a);return a*Math.pow(2,-10*t)*Math.sin((t*n-r)*(2*Math.PI)/s)+i+o},easeInOutElastic:function(e,t,o,i,n){var r=1.70158,s=0,a=i;if(0==t)return o;if(2==(t/=n/2))return o+i;if(s||(s=n*(.3*1.5)),a<Math.abs(i)){a=i;r=s/4}else r=s/(2*Math.PI)*Math.asin(i/a);return t<1?a*Math.pow(2,10*(t-=1))*Math.sin((t*n-r)*(2*Math.PI)/s)*-.5+o:a*Math.pow(2,-10*(t-=1))*Math.sin((t*n-r)*(2*Math.PI)/s)*.5+i+o},easeInBack:function(e,t,o,n,r,s){return s==i&&(s=1.70158),n*(t/=r)*t*((s+1)*t-s)+o},easeOutBack:function(e,t,o,n,r,s){return s==i&&(s=1.70158),n*((t=t/r-1)*t*((s+1)*t+s)+1)+o},easeInOutBack:function(e,t,o,n,r,s){return s==i&&(s=1.70158),(t/=r/2)<1?n/2*(t*t*((1+(s*=1.525))*t-s))+o:n/2*((t-=2)*t*((1+(s*=1.525))*t+s)+2)+o},easeInBounce:function(e,t,o,i,n){return i-jQuery.easing.easeOutBounce(e,n-t,0,i,n)+o},easeOutBounce:function(e,t,o,i,n){return(t/=n)<1/2.75?i*(7.5625*t*t)+o:t<2/2.75?i*(7.5625*(t-=1.5/2.75)*t+.75)+o:t<2.5/2.75?i*(7.5625*(t-=2.25/2.75)*t+.9375)+o:i*(7.5625*(t-=2.625/2.75)*t+.984375)+o},easeInOutBounce:function(e,t,o,i,n){return t<n/2?.5*jQuery.easing.easeInBounce(e,2*t,0,i,n)+o:.5*jQuery.easing.easeOutBounce(e,2*t-n,0,i,n)+.5*i+o}})}},FLIPBOOK.Book=function(){},FLIPBOOK.Book.prototype={rightIndex:0,goToPage:function(){},getRightIndex:function(){},canFlipNext:function(){return this.flippedright>0&&(1==this.view?this.isFocusedLeft&&this.isFocusedLeft():!(1==this.flippedright&&!this.options.rightToLeft&&!this.options.backCover))},canFlipPrev:function(){return this.flippedleft>0&&(1==this.view?this.isFocusedRight&&this.isFocusedRight():!(1==this.flippedleft&&this.options.rightToLeft&&!this.options.backCover))},getCurrentPageNumber:function(){if(1==this.view){var e=this.rightIndex%2==1?this.rightIndex+1:this.rightIndex;return this.options.rightToLeft?(e=this.options.pages.length-e,this.isFocusedRight()?e:e+1):this.isFocusedLeft()?e:e+1}}},FLIPBOOK.Thumbnails=function(e){var t=this,i=e.options,n=e.wrapper;this.main=e,this.options=i,this.wrapper=n,this.active=null,jQuery(e).bind("pagechange",function(){var o=50;e.bookmarkShowing&&(o+=t.bookmark.height()),t.thumbsWrapper.css("top",o+"px")}),this.thumbHolder=jQuery(o.createElement("div")).addClass("flipbook-thumbHolder flipbook-side-menu skin-color-bg").appendTo(n).css(this.options.sideMenuPosition,"0").hide(),this.thumbsWrapper=jQuery(o.createElement("div")).appendTo(this.thumbHolder).addClass("flipbook-thumbsWrapper"),this.thumbsScroller=jQuery(o.createElement("div")).appendTo(this.thumbsWrapper).addClass("flipbook-thumbsScroller"),e.createMenuHeader(this.thumbHolder,e.strings.thumbnails,e.toggleThumbs),this.bookmark=jQuery("<div>").addClass("flipbook-font").appendTo(this.thumbHolder).hide();jQuery('<a><div class="c-p skin-color flipbook-btn">'+i.strings.bookmarkCurrentPage+"</div></a>").appendTo(this.bookmark).bind("touchend click",function(t){e.bookmarkPage(e.cPage[0],this),t.preventDefault(),t.stopPropagation()}),jQuery('<a><div class="c-l-p skin-color flipbook-btn">'+i.strings.bookmarkLeftPage+"</div></a>").appendTo(this.bookmark).bind("touchend click",function(t){e.bookmarkPage(e.cPage[0],this),t.preventDefault(),t.stopPropagation()}),jQuery('<a><div class="c-r-p skin-color flipbook-btn">'+i.strings.bookmarkRightPage+"</div></a>").appendTo(this.bookmark).bind("touchend click",function(t){e.bookmarkPage(e.cPage[1],this),t.preventDefault(),t.stopPropagation()});this.search=jQuery("<div>").addClass("flipbook-search").appendTo(this.thumbHolder).hide(),this.$searchBar=jQuery('<div class="flipbook-findbar" id="findbar" deluminate_imagetype="png"><div id="findbarInputContainer"><input id="findInput" class="toolbarField" title="Find" placeholder="'+i.strings.findInDocument+'..."></div><div class="flipbook-find-info skin-color"/></div>').appendTo(this.search),this.$findInput=this.$searchBar.find("#findInput").keyup(function(){var e=this.value;if(""!=e){var o=t.main,i=o.pdfService,n=o.options;if(t.hideAllThumbs(),t.pagesFound=0,t.$findInfo.hide(),o.unmark(),o.searchingString=e,i)for(var r=0;r<i.pdfInfo.numPages;r++)i.findInPage(e,r,function(o,i,r){o>0&&(t.showThumb(r),t.pagesFound++,t.$findInfo.show().text(t.pagesFound+" "+n.strings.pagesFoundContaining+' "'+e+'"'),t.main.mark(e))});else for(r=0;r<n.pagesOriginal.length;r++){var s=r;n.doublePage&&(s*=2),o.loadPageHTML(s,function(i,r){i.innerText.toUpperCase().search(o.searchingString.toUpperCase())>0&&(n.doublePage&&(r/=2),t.showThumb(r),t.pagesFound++,t.$findInfo.show().text(t.pagesFound+" "+n.strings.pagesFoundContaining+' "'+e+'"'),t.main.mark(e))})}}}),this.$findInfo=this.$searchBar.find(".flipbook-find-info"),this.thumbs=[];var r=i.pages,s=[];if(i.doublePage)for(var a=0;a<r.length;a++)0!=a&&a%2==0||s.push(r[a]);else s=r;i.pdfMode&&this.loadThumbsFromPdf(s);var l=i.thumbSize,d=i.thumbSize*i.pageWidth/i.pageHeight;for(a=0;a<s.length;a++){var p=s[a].thumb;if(!s[a].empty){var h=jQuery("<div>").addClass("flipbook-thumb").appendTo(t.thumbsScroller).attr("data-thumb-index",a).width(d).height(l),c=jQuery("<span>").appendTo(h).addClass("thumb-btn-close").bind("touchend click",function(t){t.stopPropagation(),t.preventDefault(),e.removeBookmark(jQuery(this).parent().attr("data-thumb-index"))});jQuery("<span>").attr("aria-hidden","true").appendTo(c).addClass("flipbook-icon-times skin-color");if(this.thumbs.push(h),s[a].thumbCanvas)var u=jQuery(s[a].thumbCanvas);else{if(!p)continue;(u=jQuery("<img/>").attr("src",p))[0].onload=function(){t.thumbScroll.refresh()}}u.appendTo(h),jQuery("<br/>").appendTo(h);var g=i.doublePage&&i.pages.length%2==0&&a==s.length-1,f=i.doublePage&&0==a,b=i.doublePage&&!f&&!g;if(g){u.height(l).width(d).attr("page-title",2*a);jQuery(o.createElement("soan")).text(String(2*a)).appendTo(h).addClass("skin-color").addClass("flipbook-thumb-num")}else if(b){h.width(2*d),u.height(l).width(2*d).attr("page-title",2*a+1);jQuery(o.createElement("soan")).text(String(2*a)+"-"+String(2*a+1)).appendTo(h).addClass("skin-color").addClass("flipbook-thumb-num")}else{u.height(l).width(d).attr("page-title",a+1);var m=String(a+1);this.options.pages[a]&&this.options.pages[a].title&&(m=this.options.pages[a].title);jQuery(o.createElement("span")).text(m).appendTo(h).addClass("skin-color").addClass("flipbook-thumb-num")}u.bind("touchend click",function(o){if(o.stopPropagation(),o.preventDefault(),!t.thumbScroll.moved){var n=Number(jQuery(this).attr("page-title"));i.rightToLeft&&(n=i.pages.length-n+1),setTimeout(function(){e.goToPage(n)},200),"search"!=t.active&&i.thumbsCloseOnClick&&e.toggleThumbs(!1)}})}}this.thumbScroll=new FLIPBOOK.IScroll(this.thumbsWrapper[0],{bounce:!1,mouseWheel:!0,scrollbars:!0,interactiveScrollbars:!0}),e.initColors()},FLIPBOOK.Thumbnails.prototype={loadThumbsFromPdf:function(e){for(var t=this.main.pdfDocument._pdfInfo.numPages,i=0;i<t;i++){var n=o.createElement("canvas");e[i].thumbCanvas=n}this.loadThumbFromPdf(0,e)},loadVisibleThumbs:function(){},loadThumbFromPdf:function(e,t){var o=this;this.main.pdfDocument.getPage(e+1).then(function(e){var i=e.getViewport({scale:1}),n=o.options.thumbSize/i.height,r=e.getViewport({scale:n}),s=t[e._pageIndex].thumbCanvas,a=s.getContext("2d");s.height=r.height,s.width=r.width;var l={canvasContext:a,viewport:r};e.cleanupAfterRender=!0,e.render(l).promise.then(function(){e.cleanup(),e._pageIndex+1<o.main.pdfDocument._pdfInfo.numPages&&o.loadThumbFromPdf(e._pageIndex+1,t)}),o.thumbScroll.refresh()})},showAllThumbs:function(){jQuery(".flipbook-thumb").show(),this.thumbScroll.refresh()},hideAllThumbs:function(){jQuery(".flipbook-thumb").hide(),this.thumbScroll.refresh()},showThumb:function(e){this.thumbs[e]&&this.thumbs[e].show(),this.thumbScroll.refresh()},hideThumb:function(e){this.thumbs[e].hide(),this.thumbScroll.refresh()},showBookmarks:function(){jQuery(".thumb-btn-close").show(),this.showBookmarkedThumbs(),this.bookmark.show(),this.setTitle(this.options.strings.bookmarks),this.main.updateCurrentPage(),this.active="bookmarks"},showSearch:function(){this.thumbsWrapper.css("top","120px"),this.hideAllThumbs(),this.search.show(),this.$findInfo.hide(),jQuery(".thumb-btn-close").hide(),this.setTitle(this.options.strings.search),this.$findInput.val("").focus(),this.active="search"},showBookmarkedThumbs:function(){var e=this.main.getBookmarkedPages();this.hideAllThumbs();for(var t=0;t<e.length;t++){var o=e[t];o&&this.showThumb(o)}this.thumbsWrapper.css("top",50+this.bookmark.height()+"px")},show:function(){this.setTitle(this.options.strings.thumbnails),this.bookmark.hide(),this.search.hide(),this.thumbHolder.show(),this.main.thumbsVertical(),this.thumbsWrapper.css("top","50px"),this.showAllThumbs(),jQuery(".thumb-btn-close").hide(),this.loadVisibleThumbs(),this.main.resize(),this.active="thumbs"},hide:function(){this.thumbHolder.hide(),this.main.resize(),this.active=null},setTitle:function(e){this.thumbHolder.find(".flipbook-menu-title").text(e)}},FLIPBOOK.Lightbox=function(e,t,i){var n=this;this.context=e,this.options=i,e.$elem.bind("tap click",function(e){t.disposed||(n.openLightbox(),e.stopPropagation())});jQuery(e.elem).find("img");n.overlay=jQuery(o.createElement("div")).attr("style",i.lightboxCSS).addClass("flipbook-overlay").css("display","none").css("top",n.options.lightboxMarginV).css("bottom",n.options.lightboxMarginV).css("left",n.options.lightboxMarginH).css("right",n.options.lightboxMarginH).appendTo("body"),n.options.lightboxCloseOnClick&&jQuery("body").bind("tap click",function(e){var t=jQuery(e.target);t.parents().hasClass("flipbook-overlay")&&!t.hasClass("flipbook-bookLayer")||n.closeLightbox()}),i.lightboxBackground&&n.overlay.css("background",i.lightboxBackground),i.lightboxBackgroundColor&&n.overlay.css("background",i.lightboxBackgroundColor),i.lightboxBackgroundPattern&&n.overlay.css("background","url("+i.lightboxBackgroundPattern+") repeat"),i.lightboxBackgroundImage&&(n.overlay.css("background","url("+i.lightboxBackgroundImage+") no-repeat"),n.overlay.css("background-size","cover"),n.overlay.css("background-position","center center")),jQuery(o).keyup(function(e){n.context.Book&&n.context.Book.enabled&&27==e.keyCode&&n.closeLightbox()}),n.wrapper=jQuery(o.createElement("div")).css("height","auto").appendTo(n.overlay),n.wrapper.attr("class","flipbook-wrapper-transparent").css("margin","0px auto").css("padding","0px").css("height","100%").css("width","100%"),t.appendTo(n.wrapper);jQuery("<div/>").appendTo(n.wrapper).addClass("flipbook-lightbox-toolbar")},FLIPBOOK.Lightbox.prototype={openLightbox:function(){FLIPBOOK.lightboxOpened||(FLIPBOOK.lightboxOpened=!0,this.scrollTop=jQuery(o).scrollTop(),this.overlay.css("display","none"),this.overlay.fadeIn("slow"),jQuery("body").addClass("flipbook-overflow-hidden"),jQuery("html").addClass("flipbook-overflow-hidden"),jQuery(t).trigger("r3d-lightboxopen"),this.options.deeplinkingEnabled||t.history.pushState(null,"",t.location.href),this.context.options.password&&!this.context.pdfinitStarted&&this.context.initialized&&this.context.initPdf())},closeLightbox:function(e){if(FLIPBOOK.lightboxOpened){FLIPBOOK.lightboxOpened=!1,this.overlay.fadeOut("fast"),jQuery("body").removeClass("flipbook-overflow-hidden"),jQuery("html").removeClass("flipbook-overflow-hidden"),jQuery(t).trigger("r3d-lightboxclose"),jQuery(this.context.fullscreenElement).removeClass("flipbook-browser-fullscreen"),this.context.lightboxEnd(),jQuery(o).scrollTop(this.scrollTop),e||this.options.deeplinkingEnabled||history.back(),o.querySelectorAll(".flipbook-page-item").forEach(function(e){"VIDEO"!=e.nodeName&&"AUDIO"!=e.nodeName||e.pause()})}},resize:function(){var e=jQuery(t);e.width(),e.height()}},FLIPBOOK.getFlipbookSrc=function(){for(var e=o.getElementsByTagName("script"),t=0;t<e.length;t++){var i=String(e[t].src);if(i.match("flipbook\\.js")||i.match("flipbook\\.min\\.js"))return i;if(i.match("flipbook\\.lite\\.js")||i.match("flipbook\\.lite\\.min\\.js"))return i.replace(".lite","")}return""},FLIPBOOK.flipbookSrc=FLIPBOOK.getFlipbookSrc(),FLIPBOOK.iscrollSrc=FLIPBOOK.flipbookSrc.replace("flipbook.min","iscroll.min").replace("flipbook.js","iscroll.js"),FLIPBOOK.threejsSrc=FLIPBOOK.flipbookSrc.replace("flipbook.min","three.min").replace("flipbook.js","three.js"),FLIPBOOK.flipbookWebGlSrc=FLIPBOOK.flipbookSrc.replace("flipbook.min","flipbook.webgl.min").replace("flipbook.js","flipbook.webgl.js"),FLIPBOOK.flipbookBook3Src=FLIPBOOK.flipbookSrc.replace("flipbook.min","flipbook.book3.min").replace("flipbook.js","flipbook.book3.js"),FLIPBOOK.flipBookSwipeSrc=FLIPBOOK.flipbookSrc.replace("flipbook.min","flipbook.swipe.min").replace("flipbook.js","flipbook.swipe.js"),FLIPBOOK.pdfjsSrc=FLIPBOOK.flipbookSrc.replace("flipbook.min","pdf.min").replace("flipbook.js","pdf.js"),FLIPBOOK.pdfServiceSrc=FLIPBOOK.flipbookSrc.replace("flipbook.min","flipbook.pdfservice.min").replace("flipbook.js","flipbook.pdfservice.js"),FLIPBOOK.pdfjsworkerSrc=FLIPBOOK.flipbookSrc.replace("flipbook.min","pdf.worker.min").replace("flipbook.js","pdf.worker.js"),FLIPBOOK.markSrc="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.js",FLIPBOOK.scriptsLoaded={},FLIPBOOK.scriptsAdded={}}(jQuery,window,document),FLIPBOOK.onPageLinkClick=function(e){var t=e.dataset.bookid,o=e.dataset.page;o&&FLIPBOOK.books[t].goToPage(Number(o));var i=e.dataset.url;i&&window.open(i,"_blank")},function(){"use strict";var e="undefined"!=typeof window&&void 0!==window.document?window.document:{},t="undefined"!=typeof module&&module.exports,o="undefined"!=typeof Element&&"ALLOW_KEYBOARD_INPUT"in Element,i=function(){for(var t,o=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=0,n=o.length,r={};i<n;i++)if((t=o[i])&&t[1]in e){for(i=0;i<t.length;i++)r[o[0][i]]=t[i];return r}return!1}(),n={change:i.fullscreenchange,error:i.fullscreenerror},r={request:function(t){return new Promise(function(n){var r=i.requestFullscreen,s=function(){this.off("change",s),n()}.bind(this);t=t||e.documentElement,/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)?t[r]():t[r](o?Element.ALLOW_KEYBOARD_INPUT:{}),this.on("change",s)}.bind(this))},exit:function(){return new Promise(function(t){var o=function(){this.off("change",o),t()}.bind(this);e[i.exitFullscreen](),this.on("change",o)}.bind(this))},toggle:function(e){return this.isFullscreen?this.exit():this.request(e)},onchange:function(e){this.on("change",e)},onerror:function(e){this.on("error",e)},on:function(t,o){var i=n[t];i&&e.addEventListener(i,o,!1)},off:function(t,o){var i=n[t];i&&e.removeEventListener(i,o,!1)},raw:i};i?(Object.defineProperties(r,{isFullscreen:{get:function(){return Boolean(e[i.fullscreenElement])}},element:{enumerable:!0,get:function(){return e[i.fullscreenElement]}},enabled:{enumerable:!0,get:function(){return Boolean(e[i.fullscreenEnabled])}}}),t?module.exports=r:window.screenfull=r):t?module.exports=!1:window.screenfull=!1}(),function(e){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e("undefined"!=typeof module&&module.exports?require("jquery"):jQuery)}(function(e){"use strict";function t(t,T){function M(t){if(!(!0===Se.data(O+"_intouch")||e(t.target).closest(T.excludedElements,Se).length>0)){var s=t.originalEvent?t.originalEvent:t;if(!s.pointerType||"mouse"!=s.pointerType||0!=T.fallbackToMouseEvents){var a,l=s.touches,d=l?l[0]:s;return ye=v,l?Be=l.length:!1!==T.preventDefaultEvents&&t.preventDefault(),ce=0,ue=null,ge=null,we=null,fe=0,be=0,me=0,ke=1,ve=0,(p={})[o]=te(o),p[i]=te(i),p[n]=te(n),p[r]=te(r),Pe=p,q(),X(0,d),!l||Be===T.fingers||T.fingers===m||N()?(Oe=re(),2==Be&&(X(1,l[1]),be=me=ie(xe[0].start,xe[1].start)),(T.swipeStatus||T.pinchStatus)&&(a=A(s,ye))):a=!1,!1===a?(A(s,ye=S),a):(T.hold&&(Fe=setTimeout(e.proxy(function(){Se.trigger("hold",[s.target]),T.hold&&(a=T.hold.call(Se,s,s.target))},this),T.longTapThreshold)),G(!0),null)}}var p}function C(t){var p,h,c,u,g=t.originalEvent?t.originalEvent:t;if(ye!==P&&ye!==S&&!J()){var k,v=g.touches,y=Y(v?v[0]:g);if(Te=re(),v&&(Be=v.length),T.hold&&clearTimeout(Fe),ye=w,2==Be&&(0==be?(X(1,v[1]),be=me=ie(xe[0].start,xe[1].start)):(Y(v[1]),me=ie(xe[0].end,xe[1].end),xe[0].end,xe[1].end,we=ke<1?a:s),ke=(me/be*1).toFixed(2),ve=Math.abs(be-me)),Be===T.fingers||T.fingers===m||!v||N()){if(ue=ne(y.start,y.end),function(e,t){if(!1!==T.preventDefaultEvents)if(T.allowPageScroll===l)e.preventDefault();else{var s=T.allowPageScroll===d;switch(t){case o:(T.swipeLeft&&s||!s&&T.allowPageScroll!=f)&&e.preventDefault();break;case i:(T.swipeRight&&s||!s&&T.allowPageScroll!=f)&&e.preventDefault();break;case n:(T.swipeUp&&s||!s&&T.allowPageScroll!=b)&&e.preventDefault();break;case r:(T.swipeDown&&s||!s&&T.allowPageScroll!=b)&&e.preventDefault()}}}(t,ge=ne(y.last,y.end)),c=y.start,u=y.end,ce=Math.round(Math.sqrt(Math.pow(u.x-c.x,2)+Math.pow(u.y-c.y,2))),fe=oe(),function(e,t){e!=l&&(t=Math.max(t,ee(e)),Pe[e].distance=t)}(ue,ce),k=A(g,ye),!T.triggerOnTouchEnd||T.triggerOnTouchLeave){var B=!0;if(T.triggerOnTouchLeave){var x={left:(h=(p=e(p=this)).offset()).left,right:h.left+p.outerWidth(),top:h.top,bottom:h.top+p.outerHeight()};B=function(e,t){return e.x>t.left&&e.x<t.right&&e.y>t.top&&e.y<t.bottom}(y.end,x)}!T.triggerOnTouchEnd&&B?ye=j(w):T.triggerOnTouchLeave&&!B&&(ye=j(P)),ye!=S&&ye!=P||A(g,ye)}}else A(g,ye=S);!1===k&&A(g,ye=S)}}function L(e){var t=e.originalEvent?e.originalEvent:e,o=t.touches;if(o){if(o.length&&!J())return function(e){Me=re(),Ce=e.touches.length+1}(t),!0;if(o.length&&J())return!0}return J()&&(Be=Ce),Te=re(),fe=oe(),D()||!Q()?A(t,ye=S):T.triggerOnTouchEnd||!1===T.triggerOnTouchEnd&&ye===w?(!1!==T.preventDefaultEvents&&!1!==e.cancelable&&e.preventDefault(),A(t,ye=P)):!T.triggerOnTouchEnd&&U()?z(t,ye=P,c):ye===w&&A(t,ye=S),G(!1),null}function I(){Be=0,Te=0,Oe=0,be=0,me=0,ke=1,q(),G(!1)}function F(e){var t=e.originalEvent?e.originalEvent:e;T.triggerOnTouchLeave&&A(t,ye=j(P))}function E(){Se.unbind(ae,M),Se.unbind(he,I),Se.unbind(le,C),Se.unbind(de,L),pe&&Se.unbind(pe,F),G(!1)}function j(e){var t=e,o=H(),i=Q(),n=D();return!o||n?t=S:!i||e!=w||T.triggerOnTouchEnd&&!T.triggerOnTouchLeave?!i&&e==P&&T.triggerOnTouchLeave&&(t=S):t=P,t}function A(e,t){var o,i=e.touches;return(!(!R()||!_())||_())&&(o=z(e,t,p)),(!(!K()||!N())||N())&&!1!==o&&(o=z(e,t,h)),Z()&&$()&&!1!==o?o=z(e,t,u):fe>T.longTapThreshold&&ce<k&&T.longTap&&!1!==o?o=z(e,t,g):!(1!==Be&&y||!(isNaN(ce)||ce<T.threshold)||!U())&&!1!==o&&(o=z(e,t,c)),t===S&&I(),t===P&&(i&&i.length||I()),o}function z(t,l,d){var f;if(d==p){if(Se.trigger("swipeStatus",[l,ue||null,ce||0,fe||0,Be,xe,ge]),T.swipeStatus&&!1===(f=T.swipeStatus.call(Se,t,l,ue||null,ce||0,fe||0,Be,xe,ge)))return!1;if(l==P&&R()){if(clearTimeout(Ie),clearTimeout(Fe),Se.trigger("swipe",[ue,ce,fe,Be,xe,ge]),T.swipe&&!1===(f=T.swipe.call(Se,t,ue,ce,fe,Be,xe,ge)))return!1;switch(ue){case o:Se.trigger("swipeLeft",[ue,ce,fe,Be,xe,ge]),T.swipeLeft&&(f=T.swipeLeft.call(Se,t,ue,ce,fe,Be,xe,ge));break;case i:Se.trigger("swipeRight",[ue,ce,fe,Be,xe,ge]),T.swipeRight&&(f=T.swipeRight.call(Se,t,ue,ce,fe,Be,xe,ge));break;case n:Se.trigger("swipeUp",[ue,ce,fe,Be,xe,ge]),T.swipeUp&&(f=T.swipeUp.call(Se,t,ue,ce,fe,Be,xe,ge));break;case r:Se.trigger("swipeDown",[ue,ce,fe,Be,xe,ge]),T.swipeDown&&(f=T.swipeDown.call(Se,t,ue,ce,fe,Be,xe,ge))}}}if(d==h){if(Se.trigger("pinchStatus",[l,we||null,ve||0,fe||0,Be,ke,xe]),T.pinchStatus&&!1===(f=T.pinchStatus.call(Se,t,l,we||null,ve||0,fe||0,Be,ke,xe)))return!1;if(l==P&&K())switch(we){case s:Se.trigger("pinchIn",[we||null,ve||0,fe||0,Be,ke,xe]),T.pinchIn&&(f=T.pinchIn.call(Se,t,we||null,ve||0,fe||0,Be,ke,xe));break;case a:Se.trigger("pinchOut",[we||null,ve||0,fe||0,Be,ke,xe]),T.pinchOut&&(f=T.pinchOut.call(Se,t,we||null,ve||0,fe||0,Be,ke,xe))}}return d==c?l!==S&&l!==P||(clearTimeout(Ie),clearTimeout(Fe),$()&&!Z()?(Le=re(),Ie=setTimeout(e.proxy(function(){Le=null,Se.trigger("tap",[t.target]),T.tap&&(f=T.tap.call(Se,t,t.target))},this),T.doubleTapThreshold)):(Le=null,Se.trigger("tap",[t.target]),T.tap&&(f=T.tap.call(Se,t,t.target)))):d==u?l!==S&&l!==P||(clearTimeout(Ie),clearTimeout(Fe),Le=null,Se.trigger("doubletap",[t.target]),T.doubleTap&&(f=T.doubleTap.call(Se,t,t.target))):d==g&&(l!==S&&l!==P||(clearTimeout(Ie),Le=null,Se.trigger("longtap",[t.target]),T.longTap&&(f=T.longTap.call(Se,t,t.target)))),f}function Q(){var e=!0;return null!==T.threshold&&(e=ce>=T.threshold),e}function D(){var e=!1;return null!==T.cancelThreshold&&null!==ue&&(e=ee(ue)-ce>=T.cancelThreshold),e}function H(){return!(T.maxTimeThreshold&&fe>=T.maxTimeThreshold)}function K(){var e=V(),t=W(),o=null===T.pinchThreshold||ve>=T.pinchThreshold;return e&&t&&o}function N(){return!!(T.pinchStatus||T.pinchIn||T.pinchOut)}function R(){var e=H(),t=Q(),o=V(),i=W();return!D()&&i&&o&&t&&e}function _(){return!!(T.swipe||T.swipeStatus||T.swipeLeft||T.swipeRight||T.swipeUp||T.swipeDown)}function V(){return Be===T.fingers||T.fingers===m||!y}function W(){return 0!==xe[0].end.x}function U(){return!!T.tap}function $(){return!!T.doubleTap}function Z(){if(null==Le)return!1;var e=re();return $()&&e-Le<=T.doubleTapThreshold}function q(){Me=0,Ce=0}function J(){var e=!1;Me&&(re()-Me<=T.fingerReleaseThreshold&&(e=!0));return e}function G(e){Se&&(!0===e?(Se.bind(le,C),Se.bind(de,L),pe&&Se.bind(pe,F)):(Se.unbind(le,C,!1),Se.unbind(de,L,!1),pe&&Se.unbind(pe,F,!1)),Se.data(O+"_intouch",!0===e))}function X(e,t){var o={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return o.start.x=o.last.x=o.end.x=t.pageX||t.clientX,o.start.y=o.last.y=o.end.y=t.pageY||t.clientY,xe[e]=o,o}function Y(e){var t=void 0!==e.identifier?e.identifier:0,o=function(e){return xe[e]||null}(t);return null===o&&(o=X(t,e)),o.last.x=o.end.x,o.last.y=o.end.y,o.end.x=e.pageX||e.clientX,o.end.y=e.pageY||e.clientY,o}function ee(e){if(Pe[e])return Pe[e].distance}function te(e){return{direction:e,distance:0}}function oe(){return Te-Oe}function ie(e,t){var o=Math.abs(e.x-t.x),i=Math.abs(e.y-t.y);return Math.round(Math.sqrt(o*o+i*i))}function ne(e,t){if(a=t,(s=e).x==a.x&&s.y==a.y)return l;var s,a,d=function(e,t){var o=e.x-t.x,i=t.y-e.y,n=Math.atan2(i,o),r=Math.round(180*n/Math.PI);return r<0&&(r=360-Math.abs(r)),r}(e,t);return d<=45&&d>=0?o:d<=360&&d>=315?o:d>=135&&d<=225?i:d>45&&d<135?r:n}function re(){return(new Date).getTime()}T=e.extend({},T);var se=y||x||!T.fallbackToMouseEvents,ae=se?x?B?"MSPointerDown":"pointerdown":"touchstart":"mousedown",le=se?x?B?"MSPointerMove":"pointermove":"touchmove":"mousemove",de=se?x?B?"MSPointerUp":"pointerup":"touchend":"mouseup",pe=se?x?"mouseleave":null:"mouseleave",he=x?B?"MSPointerCancel":"pointercancel":"touchcancel",ce=0,ue=null,ge=null,fe=0,be=0,me=0,ke=1,ve=0,we=0,Pe=null,Se=e(t),ye="start",Be=0,xe={},Oe=0,Te=0,Me=0,Ce=0,Le=0,Ie=null,Fe=null;try{Se.bind(ae,M),Se.bind(he,I)}catch(t){e.error("events not supported "+ae+","+he+" on jQuery.swipe")}this.enable=function(){return this.disable(),Se.bind(ae,M),Se.bind(he,I),Se},this.disable=function(){return E(),Se},this.destroy=function(){E(),Se.data(O,null),Se=null},this.option=function(t,o){if("object"==typeof t)T=e.extend(T,t);else if(void 0!==T[t]){if(void 0===o)return T[t];T[t]=o}else{if(!t)return T;e.error("Option "+t+" does not exist on jQuery.swipe.options")}return null}}var o="left",i="right",n="up",r="down",s="in",a="out",l="none",d="auto",p="swipe",h="pinch",c="tap",u="doubletap",g="longtap",f="horizontal",b="vertical",m="all",k=10,v="start",w="move",P="end",S="cancel",y="ontouchstart"in window,B=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!y,x=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!y,O="TouchSwipe";e.fn.swipe=function(o){var i=e(this),n=i.data(O);if(n&&"string"==typeof o){if(n[o])return n[o].apply(n,Array.prototype.slice.call(arguments,1));e.error("Method "+o+" does not exist on jQuery.swipe")}else if(n&&"object"==typeof o)n.option.apply(n,arguments);else if(!(n||"object"!=typeof o&&o))return function(o){return!o||void 0!==o.allowPageScroll||void 0===o.swipe&&void 0===o.swipeStatus||(o.allowPageScroll=l),void 0!==o.click&&void 0===o.tap&&(o.tap=o.click),o||(o={}),o=e.extend({},e.fn.swipe.defaults,o),this.each(function(){var i=e(this),n=i.data(O);n||(n=new t(this,o),i.data(O,n))})}.apply(this,arguments);return i},e.fn.swipe.version="1.6.18",e.fn.swipe.defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:".noSwipe",preventDefaultEvents:!0},e.fn.swipe.phases={PHASE_START:v,PHASE_MOVE:w,PHASE_END:P,PHASE_CANCEL:S},e.fn.swipe.directions={LEFT:o,RIGHT:i,UP:n,DOWN:r,IN:s,OUT:a},e.fn.swipe.pageScroll={NONE:l,HORIZONTAL:f,VERTICAL:b,AUTO:d},e.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:m}}),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.printJS=t():e.printJS=t()}(window,function(){return function(e){var t={};function o(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=e,o.c=t,o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(i,n,function(t){return e[t]}.bind(null,n));return i},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t,o){e.exports=o(2)},function(e,t,o){},function(e,t,o){"use strict";o.r(t),o(1);var i={isFirefox:function(){return"undefined"!=typeof InstallTrigger},isIE:function(){return-1!==navigator.userAgent.indexOf("MSIE")||!!document.documentMode},isEdge:function(){return!i.isIE()&&!!window.StyleMedia},isChrome:function(){return!!(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).chrome},isSafari:function(){return Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0||-1!==navigator.userAgent.toLowerCase().indexOf("safari")},isIOSChrome:function(){return-1!==navigator.userAgent.toLowerCase().indexOf("crios")}},n=i,r={show:function(e){var t=document.createElement("div");t.setAttribute("style","font-family:sans-serif; display:table; text-align:center; font-weight:300; font-size:30px; left:0; top:0;position:fixed; z-index: 9990;color: #0460B5; width: 100%; height: 100%; background-color:rgba(255,255,255,.9);transition: opacity .3s ease;"),t.setAttribute("id","printJS-Modal");var o=document.createElement("div");o.setAttribute("style","display:table-cell; vertical-align:middle; padding-bottom:100px;");var i=document.createElement("div");i.setAttribute("class","printClose"),i.setAttribute("id","printClose"),o.appendChild(i);var n=document.createElement("span");n.setAttribute("class","printSpinner"),o.appendChild(n);var s=document.createTextNode(e.modalMessage);o.appendChild(s),t.appendChild(o),document.getElementsByTagName("body")[0].appendChild(t),document.getElementById("printClose").addEventListener("click",function(){r.close()})},close:function(){var e=document.getElementById("printJS-Modal");e&&e.parentNode.removeChild(e)}},s=r;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e){return e.charAt(0).toUpperCase()+e.slice(1)}function d(e,t){for(var o=0;o<e.length;o++)if("object"===a(t)&&-1!==t.indexOf(e[o]))return!0;return!1}function p(e,t){var o,i=document.createElement("div");if(o=t.header,new RegExp("<([A-Za-z][A-Za-z0-9]*)\\b[^>]*>(.*?)</\\1>").test(o))i.innerHTML=t.header;else{var n=document.createElement("h1"),r=document.createTextNode(t.header);n.appendChild(r),n.setAttribute("style",t.headerStyle),i.appendChild(n)}e.insertBefore(i,e.childNodes[0])}function h(e){e.showModal&&s.close(),e.onLoadingEnd&&e.onLoadingEnd(),(e.showModal||e.onLoadingStart)&&window.URL.revokeObjectURL(e.printable);var t="mouseover";(n.isChrome()||n.isFirefox())&&(t="focus"),window.addEventListener(t,function o(){window.removeEventListener(t,o),e.onPrintDialogClose();var i=document.getElementById(e.frameId);i&&i.remove()})}function c(e,t){try{if(e.focus(),n.isEdge()||n.isIE())try{e.contentWindow.document.execCommand("print",!1,null)}catch(t){e.contentWindow.print()}else e.contentWindow.print()}catch(e){t.onError(e)}finally{n.isFirefox()&&(e.style.visibility="hidden",e.style.left="-1px"),h(t)}}var u={send:function(e,t){document.getElementsByTagName("body")[0].appendChild(t);var o=document.getElementById(e.frameId);o.onload=function(){if("pdf"!==e.type){var t=o.contentWindow||o.contentDocument;if(t.document&&(t=t.document),t.body.appendChild(e.printableElement),"pdf"!==e.type&&e.style){var i=document.createElement("style");i.innerHTML=e.style,t.head.appendChild(i)}var r=t.getElementsByTagName("img");r.length>0?function(e){var t=Array.from(r).map(function(e){if(e.src&&e.src!==window.location.href)return function(e){return new Promise(function(t){!function o(){e&&void 0!==e.naturalWidth&&0!==e.naturalWidth&&e.complete?t():setTimeout(o,500)}()})}(e)});return Promise.all(t)}().then(function(){return c(o,e)}):c(o,e)}else n.isFirefox()?setTimeout(function(){return c(o,e)},1e3):c(o,e)}}};function g(e,t,o){var i=new window.Blob([o],{type:"application/pdf"});i=window.URL.createObjectURL(i),t.setAttribute("src",i),u.send(e,t)}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var m=["pdf","html","image","json","raw-html"],k=function(){var e={printable:null,fallbackPrintable:null,type:"pdf",header:null,headerStyle:"font-weight: 300;",maxWidth:800,properties:null,gridHeaderStyle:"font-weight: bold; padding: 5px; border: 1px solid #dddddd;",gridStyle:"border: 1px solid lightgray; margin-bottom: -1px;",showModal:!1,onError:function(e){throw e},onLoadingStart:null,onLoadingEnd:null,onPrintDialogClose:function(){},onIncompatibleBrowser:function(){},modalMessage:"Retrieving Document...",frameId:"printJS",printableElement:null,documentTitle:"Document",targetStyle:["clear","display","width","min-width","height","min-height","max-height"],targetStyles:["border","box","break","text-decoration"],ignoreElements:[],repeatTableHeader:!0,css:null,style:null,scanStyles:!0,base64:!1,onPdfOpen:null,font:"TimesNewRoman",font_size:"12pt",honorMarginPadding:!0,honorColor:!1,imageStyle:"max-width: 100%;"},t=arguments[0];if(void 0===t)throw new Error("printJS expects at least 1 attribute.");switch(b(t)){case"string":e.printable=encodeURI(t),e.fallbackPrintable=e.printable,e.type=arguments[1]||e.type;break;case"object":for(var o in e.printable=t.printable,e.fallbackPrintable=void 0!==t.fallbackPrintable?t.fallbackPrintable:e.printable,e.fallbackPrintable=e.base64?"data:application/pdf;base64,".concat(e.fallbackPrintable):e.fallbackPrintable,e)"printable"!==o&&"fallbackPrintable"!==o&&(e[o]=void 0!==t[o]?t[o]:e[o]);break;default:throw new Error('Unexpected argument type! Expected "string" or "object", got '+b(t))}if(!e.printable)throw new Error("Missing printable information.");if(!e.type||"string"!=typeof e.type||-1===m.indexOf(e.type.toLowerCase()))throw new Error("Invalid print type. Available types are: pdf, html, image and json.");e.showModal&&s.show(e),e.onLoadingStart&&e.onLoadingStart();var i=document.getElementById(e.frameId);i&&i.parentNode.removeChild(i);var r=document.createElement("iframe");switch(n.isFirefox()?r.setAttribute("style","width: 1px; height: 100px; position: fixed; left: 0; top: 0; opacity: 0; border-width: 0; margin: 0; padding: 0"):r.setAttribute("style","visibility: hidden; height: 0; width: 0; position: absolute; border: 0"),r.setAttribute("id",e.frameId),"pdf"!==e.type&&(r.srcdoc="<html><head><title>"+e.documentTitle+"</title>",e.css&&(Array.isArray(e.css)||(e.css=[e.css]),e.css.forEach(function(e){r.srcdoc+='<link rel="stylesheet" href="'+e+'">'})),r.srcdoc+="</head><body></body></html>"),e.type){case"pdf":if(n.isIE())try{console.info("Print.js doesn't support PDF printing in Internet Explorer."),window.open(e.fallbackPrintable,"_blank").focus(),e.onIncompatibleBrowser()}catch(t){e.onError(t)}finally{e.showModal&&s.close(),e.onLoadingEnd&&e.onLoadingEnd()}else!function(e,t){if(e.base64){var o=Uint8Array.from(atob(e.printable),function(e){return e.charCodeAt(0)});g(e,t,o)}else{e.printable=/^(blob|http|\/\/)/i.test(e.printable)?e.printable:window.location.origin+("/"!==e.printable.charAt(0)?"/"+e.printable:e.printable);var i=new window.XMLHttpRequest;i.responseType="arraybuffer",i.addEventListener("error",function(){h(e),e.onError(i.statusText)}),i.addEventListener("load",function(){if(-1===[200,201].indexOf(i.status))return h(e),void e.onError(i.statusText);g(e,t,i.response)}),i.open("GET",e.printable,!0),i.send()}}(e,r);break;case"image":!function(e,t){e.printable.constructor!==Array&&(e.printable=[e.printable]),e.printableElement=document.createElement("div"),e.printable.forEach(function(t){var o=document.createElement("img");if(o.setAttribute("style",e.imageStyle),o.src=t,n.isFirefox()){var i=o.src;o.src=i}var r=document.createElement("div");r.appendChild(o),e.printableElement.appendChild(r)}),e.header&&p(e.printableElement,e),u.send(e,t)}(e,r);break;case"html":!function(e,t){var o=document.getElementById(e.printable);o?(e.printableElement=function e(t,o){for(var i=t.cloneNode(),n=Array.prototype.slice.call(t.childNodes),r=0;r<n.length;r++)if(-1===o.ignoreElements.indexOf(n[r].id)){var s=e(n[r],o);i.appendChild(s)}switch(o.scanStyles&&1===t.nodeType&&i.setAttribute("style",function(e,t){for(var o="",i=(document.defaultView||window).getComputedStyle(e,""),n=0;n<i.length;n++)(-1!==t.targetStyles.indexOf("*")||-1!==t.targetStyle.indexOf(i[n])||d(t.targetStyles,i[n]))&&i.getPropertyValue(i[n])&&(o+=i[n]+":"+i.getPropertyValue(i[n])+";");return o+"max-width: "+t.maxWidth+"px !important; font-size: "+t.font_size+" !important;"}(t,o)),t.tagName){case"SELECT":i.value=t.value;break;case"CANVAS":i.getContext("2d").drawImage(t,0,0)}return i}(o,e),e.header&&p(e.printableElement,e),u.send(e,t)):window.console.error("Invalid HTML element id: "+e.printable)}(e,r);break;case"raw-html":!function(e,t){e.printableElement=document.createElement("div"),e.printableElement.setAttribute("style","width:100%"),e.printableElement.innerHTML=e.printable,u.send(e,t)}(e,r);break;case"json":!function(e,t){if("object"!==f(e.printable))throw new Error("Invalid javascript data object (JSON).");if("boolean"!=typeof e.repeatTableHeader)throw new Error("Invalid value for repeatTableHeader attribute (JSON).");if(!e.properties||!Array.isArray(e.properties))throw new Error("Invalid properties array for your JSON data.");e.properties=e.properties.map(function(t){return{field:"object"===f(t)?t.field:t,displayName:"object"===f(t)?t.displayName:t,columnSize:"object"===f(t)&&t.columnSize?t.columnSize+";":100/e.properties.length+"%;"}}),e.printableElement=document.createElement("div"),e.header&&p(e.printableElement,e),e.printableElement.innerHTML+=function(e){var t=e.printable,o=e.properties,i='<table style="border-collapse: collapse; width: 100%;">';e.repeatTableHeader&&(i+="<thead>"),i+="<tr>";for(var n=0;n<o.length;n++)i+='<th style="width:'+o[n].columnSize+";"+e.gridHeaderStyle+'">'+l(o[n].displayName)+"</th>";i+="</tr>",e.repeatTableHeader&&(i+="</thead>"),i+="<tbody>";for(var r=0;r<t.length;r++){i+="<tr>";for(var s=0;s<o.length;s++){var a=t[r],d=o[s].field.split(".");if(d.length>1)for(var p=0;p<d.length;p++)a=a[d[p]];else a=a[o[s].field];i+='<td style="width:'+o[s].columnSize+e.gridStyle+'">'+a+"</td>"}i+="</tr>"}return i+"</tbody></table>"}(e),u.send(e,t)}(e,r)}};"undefined"!=typeof window&&(window.printJS=k),t.default=k}]).default});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).THREE={})}(this,function(t){function e(){}function n(t,e){this.x=t||0,this.y=e||0}function i(t,e,n,i){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==i?i:1}function r(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}function a(){this.elements=[1,0,0,0,1,0,0,0,1],0<arguments.length&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}function o(t,e,i,r,s,c,h,l,u,p){Object.defineProperty(this,"id",{value:ua++}),this.uuid=ca.generateUUID(),this.name="",this.image=void 0!==t?t:o.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:o.DEFAULT_MAPPING,this.wrapS=void 0!==i?i:1001,this.wrapT=void 0!==r?r:1001,this.magFilter=void 0!==s?s:1006,this.minFilter=void 0!==c?c:1008,this.anisotropy=void 0!==u?u:1,this.format=void 0!==h?h:1023,this.type=void 0!==l?l:1009,this.offset=new n(0,0),this.repeat=new n(1,1),this.center=new n(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new a,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==p?p:3e3,this.version=0,this.onUpdate=null}function s(t,e,n,i){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==i?i:1}function c(t,e,n){this.width=t,this.height=e,this.scissor=new s(0,0,t,e),this.scissorTest=!1,this.viewport=new s(0,0,t,e),n=n||{},this.texture=new o(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:1006,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function h(t,e,n){c.call(this,t,e,n),this.samples=4}function l(t,e,n){c.call(this,t,e,n)}function u(t,e,n,i,r,a,s,c,h,l,u,p){o.call(this,null,a,s,c,h,l,i,r,u,p),this.image={data:t,width:e,height:n},this.magFilter=void 0!==h?h:1003,this.minFilter=void 0!==l?l:1003,this.flipY=this.generateMipmaps=!1,this.unpackAlignment=1}function p(t,e){this.min=void 0!==t?t:new r(1/0,1/0,1/0),this.max=void 0!==e?e:new r(-1/0,-1/0,-1/0)}function d(t,e){this.center=void 0!==t?t:new r,this.radius=void 0!==e?e:0}function f(t,e){this.normal=void 0!==t?t:new r(1,0,0),this.constant=void 0!==e?e:0}function m(t,e,n,i,r,a){this.planes=[void 0!==t?t:new f,void 0!==e?e:new f,void 0!==n?n:new f,void 0!==i?i:new f,void 0!==r?r:new f,void 0!==a?a:new f]}function g(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0<arguments.length&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function v(t){var e,n={};for(e in t)for(var i in n[e]={},t[e]){var r=t[e][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture)?n[e][i]=r.clone():Array.isArray(r)?n[e][i]=r.slice():n[e][i]=r}return n}function y(t){for(var e={},n=0;n<t.length;n++){var i,r=v(t[n]);for(i in r)e[i]=r[i]}return e}function x(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}function b(){function t(r,a){!1!==n&&(i(r,a),e.requestAnimationFrame(t))}var e=null,n=!1,i=null;return{start:function(){!0!==n&&null!==i&&(e.requestAnimationFrame(t),n=!0)},stop:function(){n=!1},setAnimationLoop:function(t){i=t},setContext:function(t){e=t}}}function w(t){var e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var i=e.get(n);i&&(t.deleteBuffer(i.buffer),e.delete(n))},update:function(n,i){n.isInterleavedBufferAttribute&&(n=n.data);var r=e.get(n);if(void 0===r)e.set(n,function(e,n){var i=e.array,r=e.dynamic?35048:35044,a=t.createBuffer();return t.bindBuffer(n,a),t.bufferData(n,i,r),e.onUploadCallback(),n=5126,i instanceof Float32Array?n=5126:i instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):i instanceof Uint16Array?n=5123:i instanceof Int16Array?n=5122:i instanceof Uint32Array?n=5125:i instanceof Int32Array?n=5124:i instanceof Int8Array?n=5120:i instanceof Uint8Array&&(n=5121),{buffer:a,type:n,bytesPerElement:i.BYTES_PER_ELEMENT,version:e.version}}(n,i));else if(r.version<n.version){var a=n,o=a.array,s=a.updateRange;t.bindBuffer(i,r.buffer),!1===a.dynamic?t.bufferData(i,o,35044):-1===s.count?t.bufferSubData(i,0,o):0===s.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(i,s.offset*o.BYTES_PER_ELEMENT,o.subarray(s.offset,s.offset+s.count)),s.count=-1),r.version=n.version}}}}function _(t,e,n,i,a,o){this.a=t,this.b=e,this.c=n,this.normal=i&&i.isVector3?i:new r,this.vertexNormals=Array.isArray(i)?i:[],this.color=a&&a.isColor?a:new x,this.vertexColors=Array.isArray(a)?a:[],this.materialIndex=void 0!==o?o:0}function M(t,e,n,i){this._x=t||0,this._y=e||0,this._z=n||0,this._order=i||M.DefaultOrder}function E(){this.mask=1}function S(){Object.defineProperty(this,"id",{value:va++}),this.uuid=ca.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=S.DefaultUp.clone();var t=new r,e=new M,n=new i,o=new r(1,1,1);e.onChange(function(){n.setFromEuler(e,!1)}),n.onChange(function(){e.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:o},modelViewMatrix:{value:new g},normalMatrix:{value:new a}}),this.matrix=new g,this.matrixWorld=new g,this.matrixAutoUpdate=S.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new E,this.visible=!0,this.receiveShadow=this.castShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function T(){Object.defineProperty(this,"id",{value:ya+=2}),this.uuid=ca.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingSphere=this.boundingBox=null,this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function A(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function L(t,e,n){A.call(this,new Int8Array(t),e,n)}function R(t,e,n){A.call(this,new Uint8Array(t),e,n)}function P(t,e,n){A.call(this,new Uint8ClampedArray(t),e,n)}function C(t,e,n){A.call(this,new Int16Array(t),e,n)}function O(t,e,n){A.call(this,new Uint16Array(t),e,n)}function I(t,e,n){A.call(this,new Int32Array(t),e,n)}function D(t,e,n){A.call(this,new Uint32Array(t),e,n)}function N(t,e,n){A.call(this,new Float32Array(t),e,n)}function B(t,e,n){A.call(this,new Float64Array(t),e,n)}function z(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingSphere=this.boundingBox=null,this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1}function U(t){if(0===t.length)return-1/0;for(var e=t[0],n=1,i=t.length;n<i;++n)t[n]>e&&(e=t[n]);return e}function G(){Object.defineProperty(this,"id",{value:xa+=2}),this.uuid=ca.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingSphere=this.boundingBox=null,this.drawRange={start:0,count:1/0},this.userData={}}function F(t,e,n,i,r,a){T.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:i,heightSegments:r,depthSegments:a},this.fromBufferGeometry(new H(t,e,n,i,r,a)),this.mergeVertices()}function H(t,e,n,i,a,o){function s(t,e,n,i,a,o,s,m,g,v,y){var x=o/g,b=s/v,w=o/2,_=s/2,M=m/2;s=g+1;var E,S,T=v+1,A=o=0,L=new r;for(S=0;S<T;S++){var R=S*b-_;for(E=0;E<s;E++)L[t]=(E*x-w)*i,L[e]=R*a,L[n]=M,l.push(L.x,L.y,L.z),L[t]=0,L[e]=0,L[n]=0<m?1:-1,u.push(L.x,L.y,L.z),p.push(E/g),p.push(1-S/v),o+=1}for(S=0;S<v;S++)for(E=0;E<g;E++)t=d+E+s*(S+1),e=d+(E+1)+s*(S+1),n=d+(E+1)+s*S,h.push(d+E+s*S,t,n),h.push(t,e,n),A+=6;c.addGroup(f,A,y),f+=A,d+=o}G.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:i,heightSegments:a,depthSegments:o};var c=this;t=t||1,e=e||1,n=n||1,i=Math.floor(i)||1,a=Math.floor(a)||1,o=Math.floor(o)||1;var h=[],l=[],u=[],p=[],d=0,f=0;s("z","y","x",-1,-1,n,e,t,o,a,0),s("z","y","x",1,-1,n,e,-t,o,a,1),s("x","z","y",1,1,t,n,e,i,o,2),s("x","z","y",1,-1,t,n,-e,i,o,3),s("x","y","z",1,-1,t,e,n,i,a,4),s("x","y","z",-1,-1,t,e,-n,i,a,5),this.setIndex(h),this.addAttribute("position",new N(l,3)),this.addAttribute("normal",new N(u,3)),this.addAttribute("uv",new N(p,2))}function k(t,e,n,i){T.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:i},this.fromBufferGeometry(new V(t,e,n,i)),this.mergeVertices()}function V(t,e,n,i){G.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:i};var r=(t=t||1)/2,a=(e=e||1)/2,o=(n=Math.floor(n)||1)+1,s=(i=Math.floor(i)||1)+1,c=t/n,h=e/i,l=[],u=[],p=[],d=[];for(t=0;t<s;t++){var f=t*h-a;for(e=0;e<o;e++)u.push(e*c-r,-f,0),p.push(0,0,1),d.push(e/n),d.push(1-t/i)}for(t=0;t<i;t++)for(e=0;e<n;e++)r=e+o*(t+1),a=e+1+o*(t+1),s=e+1+o*t,l.push(e+o*t,r,s),l.push(r,a,s);this.setIndex(l),this.addAttribute("position",new N(u,3)),this.addAttribute("normal",new N(p,3)),this.addAttribute("uv",new N(d,2))}function j(){Object.defineProperty(this,"id",{value:ba++}),this.uuid=ca.generateUUID(),this.name="",this.type="Material",this.lights=this.fog=!0,this.blending=1,this.side=0,this.vertexTangents=this.flatShading=!1,this.vertexColors=0,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendEquationAlpha=this.blendDstAlpha=this.blendSrcAlpha=null,this.depthFunc=3,this.depthWrite=this.depthTest=!0,this.clippingPlanes=null,this.clipShadows=this.clipIntersection=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetUnits=this.polygonOffsetFactor=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.visible=!0,this.userData={},this.needsUpdate=!0}function W(t){j.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.morphNormals=this.morphTargets=this.skinning=this.clipping=this.lights=this.fog=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function q(t,e){this.origin=void 0!==t?t:new r,this.direction=void 0!==e?e:new r}function X(t,e,n){this.a=void 0!==t?t:new r,this.b=void 0!==e?e:new r,this.c=void 0!==n?n:new r}function Y(t){j.call(this),this.type="MeshBasicMaterial",this.color=new x(16777215),this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.envMap=this.alphaMap=this.specularMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.lights=this.morphTargets=this.skinning=!1,this.setValues(t)}function J(t,e){S.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new G,this.material=void 0!==e?e:new Y({color:16777215*Math.random()}),this.drawMode=0,this.updateMorphTargets()}function Z(t,e,n,i){function r(t,n){e.buffers.color.setClear(t.r,t.g,t.b,n,i)}var a,o,s=new x(0),c=0,h=null,l=0;return{getClearColor:function(){return s},setClearColor:function(t,e){s.set(t),r(s,c=void 0!==e?e:1)},getClearAlpha:function(){return c},setClearAlpha:function(t){r(s,c=t)},render:function(e,i,u,p){i=i.background,(u=(u=t.vr).getSession&&u.getSession())&&"additive"===u.environmentBlendMode&&(i=null),null===i?(r(s,c),h=null,l=0):i&&i.isColor&&(r(i,1),p=!0,h=null,l=0),(t.autoClear||p)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),i&&(i.isCubeTexture||i.isWebGLRenderTargetCube)?(void 0===o&&((o=new J(new H(1,1,1),new W({type:"BackgroundCubeMaterial",uniforms:v(ga.cube.uniforms),vertexShader:ga.cube.vertexShader,fragmentShader:ga.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),o.geometry.removeAttribute("uv"),o.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(o.material,"map",{get:function(){return this.uniforms.tCube.value}}),n.update(o)),p=i.isWebGLRenderTargetCube?i.texture:i,o.material.uniforms.tCube.value=p,o.material.uniforms.tFlip.value=i.isWebGLRenderTargetCube?1:-1,h===i&&l===p.version||(o.material.needsUpdate=!0,h=i,l=p.version),e.unshift(o,o.geometry,o.material,0,0,null)):i&&i.isTexture&&(void 0===a&&((a=new J(new V(2,2),new W({type:"BackgroundMaterial",uniforms:v(ga.background.uniforms),vertexShader:ga.background.vertexShader,fragmentShader:ga.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),Object.defineProperty(a.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(a)),a.material.uniforms.t2D.value=i,!0===i.matrixAutoUpdate&&i.updateMatrix(),a.material.uniforms.uvTransform.value.copy(i.matrix),h===i&&l===i.version||(a.material.needsUpdate=!0,h=i,l=i.version),e.unshift(a,a.geometry,a.material,0,0,null))}}}function Q(t,e,n,i){var r;this.setMode=function(t){r=t},this.render=function(e,i){t.drawArrays(r,e,i),n.update(i,r)},this.renderInstances=function(a,o,s){if(i.isWebGL2)var c=t;else if(null===(c=e.get("ANGLE_instanced_arrays")))return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");c[i.isWebGL2?"drawArraysInstanced":"drawArraysInstancedANGLE"](r,o,s,a.maxInstancedCount),n.update(s,r,a.maxInstancedCount)}}function K(t,e,n){function i(e){if("highp"===e){if(0<t.getShaderPrecisionFormat(35633,36338).precision&&0<t.getShaderPrecisionFormat(35632,36338).precision)return"highp";e="mediump"}return"mediump"===e&&0<t.getShaderPrecisionFormat(35633,36337).precision&&0<t.getShaderPrecisionFormat(35632,36337).precision?"mediump":"lowp"}var r,a="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext,o=void 0!==n.precision?n.precision:"highp",s=i(o);s!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",s,"instead."),o=s),n=!0===n.logarithmicDepthBuffer,s=t.getParameter(34930);var c=t.getParameter(35660),h=t.getParameter(3379),l=t.getParameter(34076),u=t.getParameter(34921),p=t.getParameter(36347),d=t.getParameter(36348),f=t.getParameter(36349),m=0<c,g=a||!!e.get("OES_texture_float");return{isWebGL2:a,getMaxAnisotropy:function(){if(void 0!==r)return r;var n=e.get("EXT_texture_filter_anisotropic");return r=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:n,maxTextures:s,maxVertexTextures:c,maxTextureSize:h,maxCubemapSize:l,maxAttributes:u,maxVertexUniforms:p,maxVaryings:d,maxFragmentUniforms:f,vertexTextures:m,floatFragmentTextures:g,floatVertexTextures:m&&g,maxSamples:a?t.getParameter(36183):0}}function $(){function t(){l.value!==i&&(l.value=i,l.needsUpdate=0<r),n.numPlanes=r,n.numIntersection=0}function e(t,e,i,r){var a=null!==t?t.length:0,o=null;if(0!==a){if(o=l.value,!0!==r||null===o)for(r=i+4*a,e=e.matrixWorldInverse,h.getNormalMatrix(e),(null===o||o.length<r)&&(o=new Float32Array(r)),r=0;r!==a;++r,i+=4)c.copy(t[r]).applyMatrix4(e,h),c.normal.toArray(o,i),o[i+3]=c.constant;l.value=o,l.needsUpdate=!0}return n.numPlanes=a,o}var n=this,i=null,r=0,o=!1,s=!1,c=new f,h=new a,l={value:null,needsUpdate:!1};this.uniform=l,this.numIntersection=this.numPlanes=0,this.init=function(t,n,a){var s=0!==t.length||n||0!==r||o;return o=n,i=e(t,a,0),r=t.length,s},this.beginShadows=function(){s=!0,e(null)},this.endShadows=function(){s=!1,t()},this.setState=function(n,a,c,h,u,p){if(!o||null===n||0===n.length||s&&!c)s?e(null):t();else{var d=4*(c=s?0:r),f=u.clippingState||null;for(l.value=f,f=e(n,h,d,p),n=0;n!==d;++n)f[n]=i[n];u.clippingState=f,this.numIntersection=a?this.numPlanes:0,this.numPlanes+=c}}}function tt(t){var e={};return{get:function(n){if(void 0!==e[n])return e[n];switch(n){case"WEBGL_depth_texture":var i=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=t.getExtension(n)}return null===i&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),e[n]=i}}}function et(t,e,n){function i(t){var o=t.target;for(var s in null!==(t=r[o.id]).index&&e.remove(t.index),t.attributes)e.remove(t.attributes[s]);o.removeEventListener("dispose",i),delete r[o.id],(s=a[t.id])&&(e.remove(s),delete a[t.id]),n.memory.geometries--}var r={},a={};return{get:function(t,e){var a=r[e.id];return a||(e.addEventListener("dispose",i),e.isBufferGeometry?a=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new G).setFromObject(t)),a=e._bufferGeometry),r[e.id]=a,n.memory.geometries++,a)},update:function(t){var n=t.index,i=t.attributes;for(var r in null!==n&&e.update(n,34963),i)e.update(i[r],34962);for(r in t=t.morphAttributes){i=0;for(var a=(n=t[r]).length;i<a;i++)e.update(n[i],34962)}},getWireframeAttribute:function(t){var n=a[t.id];if(n)return n;n=[];var i=t.index,r=t.attributes;if(null!==i){r=0;for(var o=(i=i.array).length;r<o;r+=3){var s=i[r+0],c=i[r+1],h=i[r+2];n.push(s,c,c,h,h,s)}}else for(i=r.position.array,r=0,o=i.length/3-1;r<o;r+=3)s=r+0,c=r+1,h=r+2,n.push(s,c,c,h,h,s);return n=new(65535<U(n)?D:O)(n,1),e.update(n,34963),a[t.id]=n}}}function nt(t,e,n,i){var r,a,o;this.setMode=function(t){r=t},this.setIndex=function(t){a=t.type,o=t.bytesPerElement},this.render=function(e,i){t.drawElements(r,i,a,e*o),n.update(i,r)},this.renderInstances=function(s,c,h){if(i.isWebGL2)var l=t;else if(null===(l=e.get("ANGLE_instanced_arrays")))return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[i.isWebGL2?"drawElementsInstanced":"drawElementsInstancedANGLE"](r,h,a,c*o,s.maxInstancedCount),n.update(h,r,s.maxInstancedCount)}}function it(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(t,n,i){switch(i=i||1,e.calls++,n){case 4:e.triangles+=t/3*i;break;case 5:case 6:e.triangles+=i*(t-2);break;case 1:e.lines+=t/2*i;break;case 3:e.lines+=i*(t-1);break;case 2:e.lines+=i*t;break;case 0:e.points+=i*t;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function rt(t,e){return Math.abs(e[1])-Math.abs(t[1])}function at(t){var e={},n=new Float32Array(8);return{update:function(i,r,a,o){var s=i.morphTargetInfluences,c=s.length;if(void 0===(i=e[r.id])){i=[];for(var h=0;h<c;h++)i[h]=[h,0];e[r.id]=i}var l=a.morphTargets&&r.morphAttributes.position;for(a=a.morphNormals&&r.morphAttributes.normal,h=0;h<c;h++){var u=i[h];0!==u[1]&&(l&&r.removeAttribute("morphTarget"+h),a&&r.removeAttribute("morphNormal"+h))}for(h=0;h<c;h++)(u=i[h])[0]=h,u[1]=s[h];for(i.sort(rt),h=0;8>h;h++)(u=i[h])&&(s=u[0],c=u[1])?(l&&r.addAttribute("morphTarget"+h,l[s]),a&&r.addAttribute("morphNormal"+h,a[s]),n[h]=c):n[h]=0;o.getUniforms().setValue(t,"morphTargetInfluences",n)}}}function ot(t,e){var n={};return{update:function(i){var r=e.render.frame,a=i.geometry,o=t.get(i,a);return n[o.id]!==r&&(a.isGeometry&&o.updateFromObject(i),t.update(o),n[o.id]=r),o},dispose:function(){n={}}}}function st(t,e,n,i,r,a,s,c,h,l){t=void 0!==t?t:[],o.call(this,t,void 0!==e?e:301,n,i,r,a,void 0!==s?s:1022,c,h,l),this.flipY=!1}function ct(t,e,n,i){o.call(this,null),this.image={data:t,width:e,height:n,depth:i},this.minFilter=this.magFilter=1003,this.wrapR=1001,this.flipY=this.generateMipmaps=!1}function ht(t,e,n,i){o.call(this,null),this.image={data:t,width:e,height:n,depth:i},this.minFilter=this.magFilter=1003,this.wrapR=1001,this.flipY=this.generateMipmaps=!1}function lt(t,e,n){var i=t[0];if(0>=i||0<i)return t;var r=e*n,a=Sa[r];if(void 0===a&&(a=new Float32Array(r),Sa[r]=a),0!==e)for(i.toArray(a,0),i=1,r=0;i!==e;++i)r+=n,t[i].toArray(a,r);return a}function ut(t,e){if(t.length!==e.length)return!1;for(var n=0,i=t.length;n<i;n++)if(t[n]!==e[n])return!1;return!0}function pt(t,e){for(var n=0,i=e.length;n<i;n++)t[n]=e[n]}function dt(t,e){var n=Ta[e];void 0===n&&(n=new Int32Array(e),Ta[e]=n);for(var i=0;i!==e;++i)n[i]=t.allocateTextureUnit();return n}function ft(t,e){var n=this.cache;n[0]!==e&&(t.uniform1f(this.addr,e),n[0]=e)}function mt(t,e){var n=this.cache;n[0]!==e&&(t.uniform1i(this.addr,e),n[0]=e)}function gt(t,e){var n=this.cache;void 0!==e.x?n[0]===e.x&&n[1]===e.y||(t.uniform2f(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y):ut(n,e)||(t.uniform2fv(this.addr,e),pt(n,e))}function vt(t,e){var n=this.cache;void 0!==e.x?n[0]===e.x&&n[1]===e.y&&n[2]===e.z||(t.uniform3f(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z):void 0!==e.r?n[0]===e.r&&n[1]===e.g&&n[2]===e.b||(t.uniform3f(this.addr,e.r,e.g,e.b),n[0]=e.r,n[1]=e.g,n[2]=e.b):ut(n,e)||(t.uniform3fv(this.addr,e),pt(n,e))}function yt(t,e){var n=this.cache;void 0!==e.x?n[0]===e.x&&n[1]===e.y&&n[2]===e.z&&n[3]===e.w||(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w):ut(n,e)||(t.uniform4fv(this.addr,e),pt(n,e))}function xt(t,e){var n=this.cache,i=e.elements;void 0===i?ut(n,e)||(t.uniformMatrix2fv(this.addr,!1,e),pt(n,e)):ut(n,i)||(Ra.set(i),t.uniformMatrix2fv(this.addr,!1,Ra),pt(n,i))}function bt(t,e){var n=this.cache,i=e.elements;void 0===i?ut(n,e)||(t.uniformMatrix3fv(this.addr,!1,e),pt(n,e)):ut(n,i)||(La.set(i),t.uniformMatrix3fv(this.addr,!1,La),pt(n,i))}function wt(t,e){var n=this.cache,i=e.elements;void 0===i?ut(n,e)||(t.uniformMatrix4fv(this.addr,!1,e),pt(n,e)):ut(n,i)||(Aa.set(i),t.uniformMatrix4fv(this.addr,!1,Aa),pt(n,i))}function _t(t,e,n){var i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.safeSetTexture2D(e||wa,r)}function Mt(t,e,n){var i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture2DArray(e||_a,r)}function Et(t,e,n){var i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture3D(e||Ma,r)}function St(t,e,n){var i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.safeSetTextureCube(e||Ea,r)}function Tt(t,e){var n=this.cache;ut(n,e)||(t.uniform2iv(this.addr,e),pt(n,e))}function At(t,e){var n=this.cache;ut(n,e)||(t.uniform3iv(this.addr,e),pt(n,e))}function Lt(t,e){var n=this.cache;ut(n,e)||(t.uniform4iv(this.addr,e),pt(n,e))}function Rt(t,e){var n=this.cache;ut(n,e)||(t.uniform1fv(this.addr,e),pt(n,e))}function Pt(t,e){var n=this.cache;ut(n,e)||(t.uniform1iv(this.addr,e),pt(n,e))}function Ct(t,e){ut(this.cache,e=lt(e,this.size,2))||(t.uniform2fv(this.addr,e),this.updateCache(e))}function Ot(t,e){ut(this.cache,e=lt(e,this.size,3))||(t.uniform3fv(this.addr,e),this.updateCache(e))}function It(t,e){ut(this.cache,e=lt(e,this.size,4))||(t.uniform4fv(this.addr,e),this.updateCache(e))}function Dt(t,e){ut(this.cache,e=lt(e,this.size,4))||(t.uniformMatrix2fv(this.addr,!1,e),this.updateCache(e))}function Nt(t,e){ut(this.cache,e=lt(e,this.size,9))||(t.uniformMatrix3fv(this.addr,!1,e),this.updateCache(e))}function Bt(t,e){ut(this.cache,e=lt(e,this.size,16))||(t.uniformMatrix4fv(this.addr,!1,e),this.updateCache(e))}function zt(t,e,n){var i=this.cache,r=e.length,a=dt(n,r);for(!1===ut(i,a)&&(t.uniform1iv(this.addr,a),pt(i,a)),t=0;t!==r;++t)n.safeSetTexture2D(e[t]||wa,a[t])}function Ut(t,e,n){var i=this.cache,r=e.length,a=dt(n,r);for(!1===ut(i,a)&&(t.uniform1iv(this.addr,a),pt(i,a)),t=0;t!==r;++t)n.safeSetTextureCube(e[t]||Ea,a[t])}function Gt(t,e,n){this.id=t,this.addr=n,this.cache=[],this.setValue=function(t){switch(t){case 5126:return ft;case 35664:return gt;case 35665:return vt;case 35666:return yt;case 35674:return xt;case 35675:return bt;case 35676:return wt;case 35678:case 36198:return _t;case 35679:return Et;case 35680:return St;case 36289:return Mt;case 5124:case 35670:return mt;case 35667:case 35671:return Tt;case 35668:case 35672:return At;case 35669:case 35673:return Lt}}(e.type)}function Ft(t,e,n){this.id=t,this.addr=n,this.cache=[],this.size=e.size,this.setValue=function(t){switch(t){case 5126:return Rt;case 35664:return Ct;case 35665:return Ot;case 35666:return It;case 35674:return Dt;case 35675:return Nt;case 35676:return Bt;case 35678:return zt;case 35680:return Ut;case 5124:case 35670:return Pt;case 35667:case 35671:return Tt;case 35668:case 35672:return At;case 35669:case 35673:return Lt}}(e.type)}function Ht(t){this.id=t,this.seq=[],this.map={}}function kt(t,e){this.seq=[],this.map={};for(var n=t.getProgramParameter(e,35718),i=0;i<n;++i){var r=t.getActiveUniform(e,i),a=t.getUniformLocation(e,r.name),o=this,s=r.name,c=s.length;for(Pa.lastIndex=0;;){var h=Pa.exec(s),l=Pa.lastIndex,u=h[1],p=h[3];if("]"===h[2]&&(u|=0),void 0===p||"["===p&&l+2===c){s=o,r=void 0===p?new Gt(u,r,a):new Ft(u,r,a),s.seq.push(r),s.map[r.id]=r;break}void 0===(p=o.map[u])&&(p=new Ht(u),u=o,o=p,u.seq.push(o),u.map[o.id]=o),o=p}}}function Vt(t,e,n,i){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),!0===i&&(!1===t.getShaderParameter(r,35713)&&console.error("THREE.WebGLShader: Shader couldn't compile."),""!==t.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",35633===e?"vertex":"fragment",t.getShaderInfoLog(r),function(t){t=t.split("\n");for(var e=0;e<t.length;e++)t[e]=e+1+": "+t[e];return t.join("\n")}(n))),r}function jt(t){switch(t){case 3e3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD","( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw Error("unsupported encoding: "+t)}}function Wt(t,e){return"vec4 "+t+"( vec4 value ) { return "+(e=jt(e))[0]+"ToLinear"+e[1]+"; }"}function qt(t,e){return"vec4 "+t+"( vec4 value ) { return LinearTo"+(e=jt(e))[0]+e[1]+"; }"}function Xt(t,e){switch(e){case 1:e="Linear";break;case 2:e="Reinhard";break;case 3:e="Uncharted2";break;case 4:e="OptimizedCineon";break;case 5:e="ACESFilmic";break;default:throw Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}function Yt(t){return""!==t}function Jt(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function Zt(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function Qt(t){return t.replace(/^[ \t]*#include +<([\w\d./]+)>/gm,function(t,e){if(void 0===(t=pa[e]))throw Error("Can not resolve #include <"+e+">");return Qt(t)})}function Kt(t){return t.replace(/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(t,e,n,i){for(t="",e=parseInt(e);e<parseInt(n);e++)t+=i.replace(/\[ i \]/g,"[ "+e+" ]");return t})}function $t(t,e,n,i,r,a,o,s){var c=t.context,h=i.defines,l=r.vertexShader,u=r.fragmentShader,p="SHADOWMAP_TYPE_BASIC";1===a.shadowMapType?p="SHADOWMAP_TYPE_PCF":2===a.shadowMapType&&(p="SHADOWMAP_TYPE_PCF_SOFT");var d="ENVMAP_TYPE_CUBE",f="ENVMAP_MODE_REFLECTION",m="ENVMAP_BLENDING_MULTIPLY";if(a.envMap){switch(i.envMap.mapping){case 301:case 302:d="ENVMAP_TYPE_CUBE";break;case 306:case 307:d="ENVMAP_TYPE_CUBE_UV";break;case 303:case 304:d="ENVMAP_TYPE_EQUIREC";break;case 305:d="ENVMAP_TYPE_SPHERE"}switch(i.envMap.mapping){case 302:case 304:f="ENVMAP_MODE_REFRACTION"}switch(i.combine){case 0:m="ENVMAP_BLENDING_MULTIPLY";break;case 1:m="ENVMAP_BLENDING_MIX";break;case 2:m="ENVMAP_BLENDING_ADD"}}var g,v,y=0<t.gammaFactor?t.gammaFactor:1,x=o.isWebGL2?"":function(t,e,n){return[(t=t||{}).derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap&&!e.objectSpaceNormalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Yt).join("\n")}(i.extensions,a,e),b=function(t){var e,n=[];for(e in t){var i=t[e];!1!==i&&n.push("#define "+e+" "+i)}return n.join("\n")}(h),w=c.createProgram();return i.isRawShaderMaterial?(0<(h=[b].filter(Yt).join("\n")).length&&(h+="\n"),0<(e=[x,b].filter(Yt).join("\n")).length&&(e+="\n")):(h=["precision "+a.precision+" float;","precision "+a.precision+" int;","#define SHADER_NAME "+r.name,b,a.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+y,"#define MAX_BONES "+a.maxBones,a.useFog&&a.fog?"#define USE_FOG":"",a.useFog&&a.fogExp?"#define FOG_EXP2":"",a.map?"#define USE_MAP":"",a.envMap?"#define USE_ENVMAP":"",a.envMap?"#define "+f:"",a.lightMap?"#define USE_LIGHTMAP":"",a.aoMap?"#define USE_AOMAP":"",a.emissiveMap?"#define USE_EMISSIVEMAP":"",a.bumpMap?"#define USE_BUMPMAP":"",a.normalMap?"#define USE_NORMALMAP":"",a.normalMap&&a.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",a.displacementMap&&a.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",a.specularMap?"#define USE_SPECULARMAP":"",a.roughnessMap?"#define USE_ROUGHNESSMAP":"",a.metalnessMap?"#define USE_METALNESSMAP":"",a.alphaMap?"#define USE_ALPHAMAP":"",a.vertexTangents?"#define USE_TANGENT":"",a.vertexColors?"#define USE_COLOR":"",a.flatShading?"#define FLAT_SHADED":"",a.skinning?"#define USE_SKINNING":"",a.useVertexTexture?"#define BONE_TEXTURE":"",a.morphTargets?"#define USE_MORPHTARGETS":"",a.morphNormals&&!1===a.flatShading?"#define USE_MORPHNORMALS":"",a.doubleSided?"#define DOUBLE_SIDED":"",a.flipSided?"#define FLIP_SIDED":"",a.shadowMapEnabled?"#define USE_SHADOWMAP":"",a.shadowMapEnabled?"#define "+p:"",a.sizeAttenuation?"#define USE_SIZEATTENUATION":"",a.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",a.logarithmicDepthBuffer&&(o.isWebGL2||e.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Yt).join("\n"),e=[x,"precision "+a.precision+" float;","precision "+a.precision+" int;","#define SHADER_NAME "+r.name,b,a.alphaTest?"#define ALPHATEST "+a.alphaTest+(a.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+y,a.useFog&&a.fog?"#define USE_FOG":"",a.useFog&&a.fogExp?"#define FOG_EXP2":"",a.map?"#define USE_MAP":"",a.matcap?"#define USE_MATCAP":"",a.envMap?"#define USE_ENVMAP":"",a.envMap?"#define "+d:"",a.envMap?"#define "+f:"",a.envMap?"#define "+m:"",a.lightMap?"#define USE_LIGHTMAP":"",a.aoMap?"#define USE_AOMAP":"",a.emissiveMap?"#define USE_EMISSIVEMAP":"",a.bumpMap?"#define USE_BUMPMAP":"",a.normalMap?"#define USE_NORMALMAP":"",a.normalMap&&a.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",a.specularMap?"#define USE_SPECULARMAP":"",a.roughnessMap?"#define USE_ROUGHNESSMAP":"",a.metalnessMap?"#define USE_METALNESSMAP":"",a.alphaMap?"#define USE_ALPHAMAP":"",a.vertexTangents?"#define USE_TANGENT":"",a.vertexColors?"#define USE_COLOR":"",a.gradientMap?"#define USE_GRADIENTMAP":"",a.flatShading?"#define FLAT_SHADED":"",a.doubleSided?"#define DOUBLE_SIDED":"",a.flipSided?"#define FLIP_SIDED":"",a.shadowMapEnabled?"#define USE_SHADOWMAP":"",a.shadowMapEnabled?"#define "+p:"",a.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",a.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",a.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",a.logarithmicDepthBuffer&&(o.isWebGL2||e.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"",a.envMap&&(o.isWebGL2||e.get("EXT_shader_texture_lod"))?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",0!==a.toneMapping?"#define TONE_MAPPING":"",0!==a.toneMapping?pa.tonemapping_pars_fragment:"",0!==a.toneMapping?Xt("toneMapping",a.toneMapping):"",a.dithering?"#define DITHERING":"",a.outputEncoding||a.mapEncoding||a.matcapEncoding||a.envMapEncoding||a.emissiveMapEncoding?pa.encodings_pars_fragment:"",a.mapEncoding?Wt("mapTexelToLinear",a.mapEncoding):"",a.matcapEncoding?Wt("matcapTexelToLinear",a.matcapEncoding):"",a.envMapEncoding?Wt("envMapTexelToLinear",a.envMapEncoding):"",a.emissiveMapEncoding?Wt("emissiveMapTexelToLinear",a.emissiveMapEncoding):"",a.outputEncoding?qt("linearToOutputTexel",a.outputEncoding):"",a.depthPacking?"#define DEPTH_PACKING "+i.depthPacking:"","\n"].filter(Yt).join("\n")),l=Zt(l=Jt(l=Qt(l),a),a),u=Zt(u=Jt(u=Qt(u),a),a),l=Kt(l),u=Kt(u),o.isWebGL2&&!i.isRawShaderMaterial&&(o=!1,p=/^\s*#version\s+300\s+es\s*\n/,i.isShaderMaterial&&null!==l.match(p)&&null!==u.match(p)&&(o=!0,l=l.replace(p,""),u=u.replace(p,"")),h="#version 300 es\n\n#define attribute in\n#define varying out\n#define texture2D texture\n"+h,e=["#version 300 es\n\n#define varying in",o?"":"out highp vec4 pc_fragColor;",o?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth\n#define texture2D texture\n#define textureCube texture\n#define texture2DProj textureProj\n#define texture2DLodEXT textureLod\n#define texture2DProjLodEXT textureProjLod\n#define textureCubeLodEXT textureLod\n#define texture2DGradEXT textureGrad\n#define texture2DProjGradEXT textureProjGrad\n#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+e),u=e+u,l=Vt(c,35633,h+l,t.debug.checkShaderErrors),u=Vt(c,35632,u,t.debug.checkShaderErrors),c.attachShader(w,l),c.attachShader(w,u),void 0!==i.index0AttributeName?c.bindAttribLocation(w,0,i.index0AttributeName):!0===a.morphTargets&&c.bindAttribLocation(w,0,"position"),c.linkProgram(w),t.debug.checkShaderErrors&&(t=c.getProgramInfoLog(w).trim(),a=c.getShaderInfoLog(l).trim(),o=c.getShaderInfoLog(u).trim(),d=p=!0,!1===c.getProgramParameter(w,35714)?(p=!1,console.error("THREE.WebGLProgram: shader error: ",c.getError(),"35715",c.getProgramParameter(w,35715),"gl.getProgramInfoLog",t,a,o)):""!==t?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",t):""!==a&&""!==o||(d=!1),d&&(this.diagnostics={runnable:p,material:i,programLog:t,vertexShader:{log:a,prefix:h},fragmentShader:{log:o,prefix:e}})),c.deleteShader(l),c.deleteShader(u),this.getUniforms=function(){return void 0===g&&(g=new kt(c,w,s)),g},this.getAttributes=function(){if(void 0===v){for(var t={},e=c.getProgramParameter(w,35721),n=0;n<e;n++){var i=c.getActiveAttrib(w,n).name;t[i]=c.getAttribLocation(w,i)}v=t}return v},this.destroy=function(){c.deleteProgram(w),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=r.name,this.id=Ca++,this.code=n,this.usedTimes=1,this.program=w,this.vertexShader=l,this.fragmentShader=u,this}function te(t,e,n,i){function r(t,e){if(t)t.isTexture?n=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),n=t.texture.encoding);else var n=3e3;return 3e3===n&&e&&(n=3007),n}var a=[],o={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},s="precision supportsVertexTextures map mapEncoding matcap matcapEncoding envMap envMapMode envMapEncoding lightMap aoMap emissiveMap emissiveMapEncoding bumpMap normalMap objectSpaceNormalMap displacementMap specularMap roughnessMap metalnessMap gradientMap alphaMap combine vertexColors vertexTangents fog useFog fogExp flatShading sizeAttenuation logarithmicDepthBuffer skinning maxBones useVertexTexture morphTargets morphNormals maxMorphTargets maxMorphNormals premultipliedAlpha numDirLights numPointLights numSpotLights numHemiLights numRectAreaLights shadowMapEnabled shadowMapType toneMapping physicallyCorrectLights alphaTest doubleSided flipSided numClippingPlanes numClipIntersection depthPacking dithering".split(" ");this.getParameters=function(e,i,a,s,c,h,l){var u=o[e.type];if(l.isSkinnedMesh){var p=l.skeleton.bones;if(n.floatVertexTextures)p=1024;else{var d=Math.min(Math.floor((n.maxVertexUniforms-20)/4),p.length);d<p.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+p.length+" bones. This GPU supports "+d+"."),p=0):p=d}}else p=0;d=n.precision,null!==e.precision&&((d=n.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",d,"instead."));var f=t.getRenderTarget();return{shaderID:u,precision:d,supportsVertexTextures:n.vertexTextures,outputEncoding:r(f?f.texture:null,t.gammaOutput),map:!!e.map,mapEncoding:r(e.map,t.gammaInput),matcap:!!e.matcap,matcapEncoding:r(e.matcap,t.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:r(e.envMap,t.gammaInput),envMapCubeUV:!!e.envMap&&(306===e.envMap.mapping||307===e.envMap.mapping),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:r(e.emissiveMap,t.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,objectSpaceNormalMap:1===e.normalMapType,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexTangents:e.normalMap&&e.vertexTangents,vertexColors:e.vertexColors,fog:!!s,useFog:e.fog,fogExp:s&&s.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:e.skinning&&0<p,maxBones:p,useVertexTexture:n.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:i.directional.length,numPointLights:i.point.length,numSpotLights:i.spot.length,numRectAreaLights:i.rectArea.length,numHemiLights:i.hemi.length,numClippingPlanes:c,numClipIntersection:h,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.receiveShadow&&0<a.length,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:2===e.side,flipSided:1===e.side,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,n){var i=[];if(n.shaderID?i.push(n.shaderID):(i.push(e.fragmentShader),i.push(e.vertexShader)),void 0!==e.defines)for(var r in e.defines)i.push(r),i.push(e.defines[r]);for(r=0;r<s.length;r++)i.push(n[s[r]]);return i.push(e.onBeforeCompile.toString()),i.push(t.gammaOutput),i.push(t.gammaFactor),i.join()},this.acquireProgram=function(r,o,s,c){for(var h,l=0,u=a.length;l<u;l++){var p=a[l];if(p.code===c){++(h=p).usedTimes;break}}return void 0===h&&(h=new $t(t,e,c,r,o,s,n,i),a.push(h)),h},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=a.indexOf(t);a[e]=a[a.length-1],a.pop(),t.destroy()}},this.programs=a}function ee(){var t=new WeakMap;return{get:function(e){var n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,i){t.get(e)[n]=i},dispose:function(){t=new WeakMap}}}function ne(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function ie(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function re(){function t(t,i,r,o,s,c){var h=e[n];return void 0===h?(h={id:t.id,object:t,geometry:i,material:r,program:r.program||a,groupOrder:o,renderOrder:t.renderOrder,z:s,group:c},e[n]=h):(h.id=t.id,h.object=t,h.geometry=i,h.material=r,h.program=r.program||a,h.groupOrder=o,h.renderOrder=t.renderOrder,h.z=s,h.group=c),n++,h}var e=[],n=0,i=[],r=[],a={id:-1};return{opaque:i,transparent:r,init:function(){n=0,i.length=0,r.length=0},push:function(e,n,a,o,s,c){e=t(e,n,a,o,s,c),(!0===a.transparent?r:i).push(e)},unshift:function(e,n,a,o,s,c){e=t(e,n,a,o,s,c),(!0===a.transparent?r:i).unshift(e)},sort:function(){1<i.length&&i.sort(ne),1<r.length&&r.sort(ie)}}}function ae(){function t(n){(n=n.target).removeEventListener("dispose",t),delete e[n.id]}var e={};return{get:function(n,i){var r=e[n.id];if(void 0===r){var a=new re;e[n.id]={},e[n.id][i.id]=a,n.addEventListener("dispose",t)}else void 0===(a=r[i.id])&&(a=new re,r[i.id]=a);return a},dispose:function(){e={}}}}function oe(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];switch(e.type){case"DirectionalLight":var i={direction:new r,color:new x,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new n};break;case"SpotLight":i={position:new r,direction:new r,color:new x,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new n};break;case"PointLight":i={position:new r,color:new x,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new n,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":i={direction:new r,skyColor:new x,groundColor:new x};break;case"RectAreaLight":i={color:new x,position:new r,halfWidth:new r,halfHeight:new r}}return t[e.id]=i}}}function se(){for(var t=new oe,e={id:Oa++,hash:{stateID:-1,directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,shadowsLength:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=0;9>n;n++)e.probe.push(new r);var i=new r,a=new g,o=new g;return{setup:function(n,r,s){for(var c=0,h=0,l=0,u=0;9>u;u++)e.probe[u].set(0,0,0);var p=0,d=0,f=0,m=0,g=0;s=s.matrixWorldInverse,u=0;for(var v=n.length;u<v;u++){var y=n[u],x=y.color,b=y.intensity,w=y.distance,_=y.shadow&&y.shadow.map?y.shadow.map.texture:null;if(y.isAmbientLight)c+=x.r*b,h+=x.g*b,l+=x.b*b;else if(y.isLightProbe)for(_=0;9>_;_++)e.probe[_].addScaledVector(y.sh.coefficients[_],b);else if(y.isDirectionalLight){var M=t.get(y);M.color.copy(y.color).multiplyScalar(y.intensity),M.direction.setFromMatrixPosition(y.matrixWorld),i.setFromMatrixPosition(y.target.matrixWorld),M.direction.sub(i),M.direction.transformDirection(s),(M.shadow=y.castShadow)&&(b=y.shadow,M.shadowBias=b.bias,M.shadowRadius=b.radius,M.shadowMapSize=b.mapSize),e.directionalShadowMap[p]=_,e.directionalShadowMatrix[p]=y.shadow.matrix,e.directional[p]=M,p++}else y.isSpotLight?((M=t.get(y)).position.setFromMatrixPosition(y.matrixWorld),M.position.applyMatrix4(s),M.color.copy(x).multiplyScalar(b),M.distance=w,M.direction.setFromMatrixPosition(y.matrixWorld),i.setFromMatrixPosition(y.target.matrixWorld),M.direction.sub(i),M.direction.transformDirection(s),M.coneCos=Math.cos(y.angle),M.penumbraCos=Math.cos(y.angle*(1-y.penumbra)),M.decay=y.decay,(M.shadow=y.castShadow)&&(b=y.shadow,M.shadowBias=b.bias,M.shadowRadius=b.radius,M.shadowMapSize=b.mapSize),e.spotShadowMap[f]=_,e.spotShadowMatrix[f]=y.shadow.matrix,e.spot[f]=M,f++):y.isRectAreaLight?((M=t.get(y)).color.copy(x).multiplyScalar(b),M.position.setFromMatrixPosition(y.matrixWorld),M.position.applyMatrix4(s),o.identity(),a.copy(y.matrixWorld),a.premultiply(s),o.extractRotation(a),M.halfWidth.set(.5*y.width,0,0),M.halfHeight.set(0,.5*y.height,0),M.halfWidth.applyMatrix4(o),M.halfHeight.applyMatrix4(o),e.rectArea[m]=M,m++):y.isPointLight?((M=t.get(y)).position.setFromMatrixPosition(y.matrixWorld),M.position.applyMatrix4(s),M.color.copy(y.color).multiplyScalar(y.intensity),M.distance=y.distance,M.decay=y.decay,(M.shadow=y.castShadow)&&(b=y.shadow,M.shadowBias=b.bias,M.shadowRadius=b.radius,M.shadowMapSize=b.mapSize,M.shadowCameraNear=b.camera.near,M.shadowCameraFar=b.camera.far),e.pointShadowMap[d]=_,e.pointShadowMatrix[d]=y.shadow.matrix,e.point[d]=M,d++):y.isHemisphereLight&&((M=t.get(y)).direction.setFromMatrixPosition(y.matrixWorld),M.direction.transformDirection(s),M.direction.normalize(),M.skyColor.copy(y.color).multiplyScalar(b),M.groundColor.copy(y.groundColor).multiplyScalar(b),e.hemi[g]=M,g++)}e.ambient[0]=c,e.ambient[1]=h,e.ambient[2]=l,e.directional.length=p,e.spot.length=f,e.rectArea.length=m,e.point.length=d,e.hemi.length=g,e.hash.stateID=e.id,e.hash.directionalLength=p,e.hash.pointLength=d,e.hash.spotLength=f,e.hash.rectAreaLength=m,e.hash.hemiLength=g,e.hash.shadowsLength=r.length},state:e}}function ce(){var t=new se,e=[],n=[];return{init:function(){e.length=0,n.length=0},state:{lightsArray:e,shadowsArray:n,lights:t},setupLights:function(i){t.setup(e,n,i)},pushLight:function(t){e.push(t)},pushShadow:function(t){n.push(t)}}}function he(){function t(n){(n=n.target).removeEventListener("dispose",t),delete e[n.id]}var e={};return{get:function(n,i){if(void 0===e[n.id]){var r=new ce;e[n.id]={},e[n.id][i.id]=r,n.addEventListener("dispose",t)}else void 0===e[n.id][i.id]?(r=new ce,e[n.id][i.id]=r):r=e[n.id][i.id];return r},dispose:function(){e={}}}}function le(t){j.call(this),this.type="MeshDepthMaterial",this.depthPacking=3200,this.morphTargets=this.skinning=!1,this.displacementMap=this.alphaMap=this.map=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.lights=this.fog=!1,this.setValues(t)}function ue(t){j.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new r,this.nearDistance=1,this.farDistance=1e3,this.morphTargets=this.skinning=!1,this.displacementMap=this.alphaMap=this.map=null,this.displacementScale=1,this.displacementBias=0,this.lights=this.fog=!1,this.setValues(t)}function pe(t,e,i){function a(e,n,i,r,a,o){var s=e.geometry,c=v,h=e.customDepthMaterial;return i&&(c=y,h=e.customDistanceMaterial),h?c=h:(h=!1,n.morphTargets&&(s&&s.isBufferGeometry?h=s.morphAttributes&&s.morphAttributes.position&&0<s.morphAttributes.position.length:s&&s.isGeometry&&(h=s.morphTargets&&0<s.morphTargets.length)),e.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e),s=0,h&&(s|=1),(e=e.isSkinnedMesh&&n.skinning)&&(s|=2),c=c[s]),t.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length&&(s=c.uuid,h=n.uuid,void 0===(e=x[s])&&(e={},x[s]=e),void 0===(s=e[h])&&(s=c.clone(),e[h]=s),c=s),c.visible=n.visible,c.wireframe=n.wireframe,c.side=null!=n.shadowSide?n.shadowSide:b[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,i&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(r),c.nearDistance=a,c.farDistance=o),c}function o(n,i,r,s){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||h.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(r.matrixWorldInverse,n.matrixWorld);var c=e.update(n),l=n.material;if(Array.isArray(l))for(var u=c.groups,p=0,d=u.length;p<d;p++){var m=u[p],g=l[m.materialIndex];g&&g.visible&&(g=a(n,g,s,f,r.near,r.far),t.renderBufferDirect(r,null,c,g,n,m))}else l.visible&&(g=a(n,l,s,f,r.near,r.far),t.renderBufferDirect(r,null,c,g,n,null))}for(c=0,l=(n=n.children).length;c<l;c++)o(n[c],i,r,s)}}var h=new m,l=new g,u=new n,p=new n(i,i),d=new r,f=new r,v=Array(4),y=Array(4),x={},b={0:1,1:0,2:2},w=[new r(1,0,0),new r(-1,0,0),new r(0,0,1),new r(0,0,-1),new r(0,1,0),new r(0,-1,0)],_=[new r(0,1,0),new r(0,1,0),new r(0,1,0),new r(0,1,0),new r(0,0,1),new r(0,0,-1)],M=[new s,new s,new s,new s,new s,new s];for(i=0;4!==i;++i){var E=0!=(1&i),S=0!=(2&i),T=new le({depthPacking:3201,morphTargets:E,skinning:S});v[i]=T,E=new ue({morphTargets:E,skinning:S}),y[i]=E}var A=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(e,n,i){if(!1!==A.enabled&&(!1!==A.autoUpdate||!1!==A.needsUpdate)&&0!==e.length){var r=t.getRenderTarget(),a=t.state;a.setBlending(0),a.buffers.color.setClear(1,1,1,1),a.buffers.depth.setTest(!0),a.setScissorTest(!1);for(var s,m=0,g=e.length;m<g;m++){var v=e[m];s=v.shadow;var y=v&&v.isPointLight;if(void 0===s)console.warn("THREE.WebGLShadowMap:",v,"has no shadow.");else{var x=s.camera;if(u.copy(s.mapSize),u.min(p),y){var b=u.x,E=u.y;M[0].set(2*b,E,b,E),M[1].set(0,E,b,E),M[2].set(3*b,E,b,E),M[3].set(b,E,b,E),M[4].set(3*b,0,b,E),M[5].set(b,0,b,E),u.x*=4,u.y*=2}for(null===s.map&&(s.map=new c(u.x,u.y,{minFilter:1003,magFilter:1003,format:1023}),s.map.texture.name=v.name+".shadowMap",x.updateProjectionMatrix()),s.isSpotLightShadow&&s.update(v),b=s.map,E=s.matrix,f.setFromMatrixPosition(v.matrixWorld),x.position.copy(f),y?(s=6,E.makeTranslation(-f.x,-f.y,-f.z)):(s=1,d.setFromMatrixPosition(v.target.matrixWorld),x.lookAt(d),x.updateMatrixWorld(),E.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),E.multiply(x.projectionMatrix),E.multiply(x.matrixWorldInverse)),t.setRenderTarget(b),t.clear(),v=0;v<s;v++)y&&(d.copy(x.position),d.add(w[v]),x.up.copy(_[v]),x.lookAt(d),x.updateMatrixWorld(),a.viewport(M[v])),l.multiplyMatrices(x.projectionMatrix,x.matrixWorldInverse),h.setFromMatrix(l),o(n,i,x,y)}}A.needsUpdate=!1,t.setRenderTarget(r)}}}function de(t,e,n,i){function r(e,n,i){var r=new Uint8Array(4),a=t.createTexture();for(t.bindTexture(e,a),t.texParameteri(e,10241,9728),t.texParameteri(e,10240,9728),e=0;e<i;e++)t.texImage2D(n+e,0,6408,1,1,0,6408,5121,r);return a}function a(n,r){y[n]=1,0===x[n]&&(t.enableVertexAttribArray(n),x[n]=1),b[n]!==r&&((i.isWebGL2?t:e.get("ANGLE_instanced_arrays"))[i.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,r),b[n]=r)}function o(e){!0!==w[e]&&(t.enable(e),w[e]=!0)}function c(e){!1!==w[e]&&(t.disable(e),w[e]=!1)}function h(e,i,r,a,s,h,l,u){if(0===e)E&&(c(3042),E=!1);else if(E||(o(3042),E=!0),5!==e){if(e!==S||u!==O){if(100===T&&100===R||(t.blendEquation(32774),R=T=100),u)switch(e){case 1:t.blendFuncSeparate(1,771,1,771);break;case 2:t.blendFunc(1,1);break;case 3:t.blendFuncSeparate(0,0,769,771);break;case 4:t.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",e)}else switch(e){case 1:t.blendFuncSeparate(770,771,1,771);break;case 2:t.blendFunc(770,1);break;case 3:t.blendFunc(0,769);break;case 4:t.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",e)}C=P=L=A=null,S=e,O=u}}else s=s||i,h=h||r,l=l||a,i===T&&s===R||(t.blendEquationSeparate(n.convert(i),n.convert(s)),T=i,R=s),r===A&&a===L&&h===P&&l===C||(t.blendFuncSeparate(n.convert(r),n.convert(a),n.convert(h),n.convert(l)),A=r,L=a,P=h,C=l),S=e,O=null}function l(e){I!==e&&(e?t.frontFace(2304):t.frontFace(2305),I=e)}function u(e){0!==e?(o(2884),e!==D&&(1===e?t.cullFace(1029):2===e?t.cullFace(1028):t.cullFace(1032))):c(2884),D=e}function p(e,n,i){e?(o(32823),(B!==n||z!==i)&&(t.polygonOffset(n,i),B=n,z=i)):c(32823)}function d(e){void 0===e&&(e=33984+U-1),F!==e&&(t.activeTexture(e),F=e)}var f=new function(){var e=!1,n=new s,i=null,r=new s(0,0,0,0);return{setMask:function(n){i===n||e||(t.colorMask(n,n,n,n),i=n)},setLocked:function(t){e=t},setClear:function(e,i,a,o,s){!0===s&&(e*=o,i*=o,a*=o),n.set(e,i,a,o),!1===r.equals(n)&&(t.clearColor(e,i,a,o),r.copy(n))},reset:function(){e=!1,i=null,r.set(-1,0,0,0)}}},m=new function(){var e=!1,n=null,i=null,r=null;return{setTest:function(t){t?o(2929):c(2929)},setMask:function(i){n===i||e||(t.depthMask(i),n=i)},setFunc:function(e){if(i!==e){if(e)switch(e){case 0:t.depthFunc(512);break;case 1:t.depthFunc(519);break;case 2:t.depthFunc(513);break;case 3:t.depthFunc(515);break;case 4:t.depthFunc(514);break;case 5:t.depthFunc(518);break;case 6:t.depthFunc(516);break;case 7:t.depthFunc(517);break;default:t.depthFunc(515)}else t.depthFunc(515);i=e}},setLocked:function(t){e=t},setClear:function(e){r!==e&&(t.clearDepth(e),r=e)},reset:function(){e=!1,r=i=n=null}}},g=new function(){var e=!1,n=null,i=null,r=null,a=null,s=null,h=null,l=null,u=null;return{setTest:function(t){t?o(2960):c(2960)},setMask:function(i){n===i||e||(t.stencilMask(i),n=i)},setFunc:function(e,n,o){i===e&&r===n&&a===o||(t.stencilFunc(e,n,o),i=e,r=n,a=o)},setOp:function(e,n,i){s===e&&h===n&&l===i||(t.stencilOp(e,n,i),s=e,h=n,l=i)},setLocked:function(t){e=t},setClear:function(e){u!==e&&(t.clearStencil(e),u=e)},reset:function(){e=!1,u=l=h=s=a=r=i=n=null}}},v=t.getParameter(34921),y=new Uint8Array(v),x=new Uint8Array(v),b=new Uint8Array(v),w={},_=null,M=null,E=null,S=null,T=null,A=null,L=null,R=null,P=null,C=null,O=!1,I=null,D=null,N=null,B=null,z=null,U=t.getParameter(35661),G=!1;v=0,-1!==(v=t.getParameter(7938)).indexOf("WebGL")?(v=parseFloat(/^WebGL ([0-9])/.exec(v)[1]),G=1<=v):-1!==v.indexOf("OpenGL ES")&&(v=parseFloat(/^OpenGL ES ([0-9])/.exec(v)[1]),G=2<=v);var F=null,H={},k=new s,V=new s,j={};return j[3553]=r(3553,3553,1),j[34067]=r(34067,34069,6),f.setClear(0,0,0,1),m.setClear(1),g.setClear(0),o(2929),m.setFunc(3),l(!1),u(1),o(2884),h(0),{buffers:{color:f,depth:m,stencil:g},initAttributes:function(){for(var t=0,e=y.length;t<e;t++)y[t]=0},enableAttribute:function(t){a(t,0)},enableAttributeAndDivisor:a,disableUnusedAttributes:function(){for(var e=0,n=x.length;e!==n;++e)x[e]!==y[e]&&(t.disableVertexAttribArray(e),x[e]=0)},enable:o,disable:c,getCompressedTextureFormats:function(){if(null===_&&(_=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var n=t.getParameter(34467),i=0;i<n.length;i++)_.push(n[i]);return _},useProgram:function(e){return M!==e&&(t.useProgram(e),M=e,!0)},setBlending:h,setMaterial:function(t,e){2===t.side?c(2884):o(2884);var n=1===t.side;e&&(n=!n),l(n),1===t.blending&&!1===t.transparent?h(0):h(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.premultipliedAlpha),m.setFunc(t.depthFunc),m.setTest(t.depthTest),m.setMask(t.depthWrite),f.setMask(t.colorWrite),p(t.polygonOffset,t.polygonOffsetFactor,t.polygonOffsetUnits)},setFlipSided:l,setCullFace:u,setLineWidth:function(e){e!==N&&(G&&t.lineWidth(e),N=e)},setPolygonOffset:p,setScissorTest:function(t){t?o(3089):c(3089)},activeTexture:d,bindTexture:function(e,n){null===F&&d();var i=H[F];void 0===i&&(i={type:void 0,texture:void 0},H[F]=i),i.type===e&&i.texture===n||(t.bindTexture(e,n||j[e]),i.type=e,i.texture=n)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage3D:function(){try{t.texImage3D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===k.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),k.copy(e))},viewport:function(e){!1===V.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),V.copy(e))},reset:function(){for(var e=0;e<x.length;e++)1===x[e]&&(t.disableVertexAttribArray(e),x[e]=0);w={},F=_=null,H={},D=I=S=M=null,f.reset(),m.reset(),g.reset()}}}function fe(t,e,n,i,r,a,o){function s(t,e){return A?new OffscreenCanvas(t,e):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function c(t,e,n,i){var r=1;if((t.width>i||t.height>i)&&(r=i/Math.max(t.width,t.height)),1>r||!0===e){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap)return e=(i=e?ca.floorPowerOfTwo:Math.floor)(r*t.width),r=i(r*t.height),void 0===S&&(S=s(e,r)),(n=n?s(e,r):S).width=e,n.height=r,n.getContext("2d").drawImage(t,0,0,e,r),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+t.width+"x"+t.height+") to ("+e+"x"+r+")."),n;"data"in t&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+t.width+"x"+t.height+").")}return t}function h(t){return ca.isPowerOfTwo(t.width)&&ca.isPowerOfTwo(t.height)}function l(t,e){return t.generateMipmaps&&e&&1003!==t.minFilter&&1006!==t.minFilter}function u(e,n,r,a){t.generateMipmap(e),i.get(n).__maxMipLevel=Math.log(Math.max(r,a))*Math.LOG2E}function p(t,n){if(!r.isWebGL2)return t;var i=t;return 6403===t&&(5126===n&&(i=33326),5131===n&&(i=33325),5121===n&&(i=33321)),6407===t&&(5126===n&&(i=34837),5131===n&&(i=34843),5121===n&&(i=32849)),6408===t&&(5126===n&&(i=34836),5131===n&&(i=34842),5121===n&&(i=32856)),33325===i||33326===i||34842===i||34836===i?e.get("EXT_color_buffer_float"):(34843===i||34837===i)&&console.warn("THREE.WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead."),i}function d(t){return 1003===t||1004===t||1005===t?9728:9729}function f(e){(e=e.target).removeEventListener("dispose",f);var n=i.get(e);void 0!==n.__webglInit&&(t.deleteTexture(n.__webglTexture),i.remove(e)),e.isVideoTexture&&delete T[e.id],o.memory.textures--}function m(e){(e=e.target).removeEventListener("dispose",m);var n=i.get(e),r=i.get(e.texture);if(e){if(void 0!==r.__webglTexture&&t.deleteTexture(r.__webglTexture),e.depthTexture&&e.depthTexture.dispose(),e.isWebGLRenderTargetCube)for(r=0;6>r;r++)t.deleteFramebuffer(n.__webglFramebuffer[r]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[r]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer);i.remove(e.texture),i.remove(e)}o.memory.textures--}function g(t,e){var r=i.get(t);if(t.isVideoTexture){var a=t.id,s=o.render.frame;T[a]!==s&&(T[a]=s,t.update())}if(0<t.version&&r.__version!==t.version)if(void 0===(a=t.image))console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==a.complete)return void w(r,t,e);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}n.activeTexture(33984+e),n.bindTexture(3553,r.__webglTexture)}function v(e,o){var s=i.get(e);if(6===e.image.length)if(0<e.version&&s.__version!==e.version){b(s,e),n.activeTexture(33984+o),n.bindTexture(34067,s.__webglTexture),t.pixelStorei(37440,e.flipY),o=e&&e.isCompressedTexture;for(var d=e.image[0]&&e.image[0].isDataTexture,f=[],m=0;6>m;m++)f[m]=o||d?d?e.image[m].image:e.image[m]:c(e.image[m],!1,!0,r.maxCubemapSize);var g=f[0],v=h(g)||r.isWebGL2,y=a.convert(e.format),w=a.convert(e.type),_=p(y,w);for(x(34067,e,v),m=0;6>m;m++)if(o)for(var M,E=f[m].mipmaps,S=0,T=E.length;S<T;S++)M=E[S],1023!==e.format&&1022!==e.format?-1<n.getCompressedTextureFormats().indexOf(y)?n.compressedTexImage2D(34069+m,S,_,M.width,M.height,0,M.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(34069+m,S,_,M.width,M.height,0,y,w,M.data);else d?n.texImage2D(34069+m,0,_,f[m].width,f[m].height,0,y,w,f[m].data):n.texImage2D(34069+m,0,_,y,w,f[m]);s.__maxMipLevel=o?E.length-1:0,l(e,v)&&u(34067,e,g.width,g.height),s.__version=e.version,e.onUpdate&&e.onUpdate(e)}else n.activeTexture(33984+o),n.bindTexture(34067,s.__webglTexture)}function y(t,e){n.activeTexture(33984+e),n.bindTexture(34067,i.get(t).__webglTexture)}function x(n,o,s){s?(t.texParameteri(n,10242,a.convert(o.wrapS)),t.texParameteri(n,10243,a.convert(o.wrapT)),32879!==n&&35866!==n||t.texParameteri(n,32882,a.convert(o.wrapR)),t.texParameteri(n,10240,a.convert(o.magFilter)),t.texParameteri(n,10241,a.convert(o.minFilter))):(t.texParameteri(n,10242,33071),t.texParameteri(n,10243,33071),32879!==n&&35866!==n||t.texParameteri(n,32882,33071),1001===o.wrapS&&1001===o.wrapT||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(n,10240,d(o.magFilter)),t.texParameteri(n,10241,d(o.minFilter)),1003!==o.minFilter&&1006!==o.minFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!(s=e.get("EXT_texture_filter_anisotropic"))||1015===o.type&&null===e.get("OES_texture_float_linear")||1016===o.type&&null===(r.isWebGL2||e.get("OES_texture_half_float_linear"))||!(1<o.anisotropy||i.get(o).__currentAnisotropy)||(t.texParameterf(n,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,r.getMaxAnisotropy())),i.get(o).__currentAnisotropy=o.anisotropy)}function b(e,n){void 0===e.__webglInit&&(e.__webglInit=!0,n.addEventListener("dispose",f),e.__webglTexture=t.createTexture(),o.memory.textures++)}function w(e,i,o){var s=3553;i.isDataTexture2DArray&&(s=35866),i.isDataTexture3D&&(s=32879),b(e,i),n.activeTexture(33984+o),n.bindTexture(s,e.__webglTexture),t.pixelStorei(37440,i.flipY),t.pixelStorei(37441,i.premultiplyAlpha),t.pixelStorei(3317,i.unpackAlignment),o=(o=!r.isWebGL2&&(1001!==i.wrapS||1001!==i.wrapT||1003!==i.minFilter&&1006!==i.minFilter))&&!1===h(i.image);var d=h(o=c(i.image,o,!1,r.maxTextureSize))||r.isWebGL2,f=a.convert(i.format),m=a.convert(i.type),g=p(f,m);x(s,i,d);var v=i.mipmaps;if(i.isDepthTexture){if(g=6402,1015===i.type){if(!r.isWebGL2)throw Error("Float Depth Texture only supported in WebGL2.0");g=36012}else r.isWebGL2&&(g=33189);1026===i.format&&6402===g&&1012!==i.type&&1014!==i.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=1012,m=a.convert(i.type)),1027===i.format&&(g=34041,1020!==i.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=1020,m=a.convert(i.type))),n.texImage2D(3553,0,g,o.width,o.height,0,f,m,null)}else if(i.isDataTexture)if(0<v.length&&d){for(var y=0,w=v.length;y<w;y++)s=v[y],n.texImage2D(3553,y,g,s.width,s.height,0,f,m,s.data);i.generateMipmaps=!1,e.__maxMipLevel=v.length-1}else n.texImage2D(3553,0,g,o.width,o.height,0,f,m,o.data),e.__maxMipLevel=0;else if(i.isCompressedTexture){for(y=0,w=v.length;y<w;y++)s=v[y],1023!==i.format&&1022!==i.format?-1<n.getCompressedTextureFormats().indexOf(f)?n.compressedTexImage2D(3553,y,g,s.width,s.height,0,s.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(3553,y,g,s.width,s.height,0,f,m,s.data);e.__maxMipLevel=v.length-1}else if(i.isDataTexture2DArray)n.texImage3D(35866,0,g,o.width,o.height,o.depth,0,f,m,o.data),e.__maxMipLevel=0;else if(i.isDataTexture3D)n.texImage3D(32879,0,g,o.width,o.height,o.depth,0,f,m,o.data),e.__maxMipLevel=0;else if(0<v.length&&d){for(y=0,w=v.length;y<w;y++)s=v[y],n.texImage2D(3553,y,g,f,m,s);i.generateMipmaps=!1,e.__maxMipLevel=v.length-1}else n.texImage2D(3553,0,g,f,m,o),e.__maxMipLevel=0;l(i,d)&&u(3553,i,o.width,o.height),e.__version=i.version,i.onUpdate&&i.onUpdate(i)}function _(e,r,o,s){var c=a.convert(r.texture.format),h=a.convert(r.texture.type),l=p(c,h);n.texImage2D(s,0,l,r.width,r.height,0,c,h,null),t.bindFramebuffer(36160,e),t.framebufferTexture2D(36160,o,s,i.get(r.texture).__webglTexture,0),t.bindFramebuffer(36160,null)}function M(e,n,i){if(t.bindRenderbuffer(36161,e),n.depthBuffer&&!n.stencilBuffer)i?(i=E(n),t.renderbufferStorageMultisample(36161,i,33189,n.width,n.height)):t.renderbufferStorage(36161,33189,n.width,n.height),t.framebufferRenderbuffer(36160,36096,36161,e);else if(n.depthBuffer&&n.stencilBuffer)i?(i=E(n),t.renderbufferStorageMultisample(36161,i,34041,n.width,n.height)):t.renderbufferStorage(36161,34041,n.width,n.height),t.framebufferRenderbuffer(36160,33306,36161,e);else{e=p(e=a.convert(n.texture.format),a.convert(n.texture.type)),i?(i=E(n),t.renderbufferStorageMultisample(36161,i,e,n.width,n.height)):t.renderbufferStorage(36161,e,n.width,n.height)}t.bindRenderbuffer(36161,null)}function E(t){return r.isWebGL2&&t.isWebGLMultisampleRenderTarget?Math.min(r.maxSamples,t.samples):0}var S,T={},A="undefined"!=typeof OffscreenCanvas,L=0,R=!1,P=!1;this.allocateTextureUnit=function(){var t=L;return t>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+t+" texture units while this GPU supports only "+r.maxTextures),L+=1,t},this.resetTextureUnits=function(){L=0},this.setTexture2D=g,this.setTexture2DArray=function(t,e){var r=i.get(t);0<t.version&&r.__version!==t.version?w(r,t,e):(n.activeTexture(33984+e),n.bindTexture(35866,r.__webglTexture))},this.setTexture3D=function(t,e){var r=i.get(t);0<t.version&&r.__version!==t.version?w(r,t,e):(n.activeTexture(33984+e),n.bindTexture(32879,r.__webglTexture))},this.setTextureCube=v,this.setTextureCubeDynamic=y,this.setupRenderTarget=function(e){var s=i.get(e),c=i.get(e.texture);e.addEventListener("dispose",m),c.__webglTexture=t.createTexture(),o.memory.textures++;var d=!0===e.isWebGLRenderTargetCube,f=!0===e.isWebGLMultisampleRenderTarget,v=h(e)||r.isWebGL2;if(d)for(s.__webglFramebuffer=[],f=0;6>f;f++)s.__webglFramebuffer[f]=t.createFramebuffer();else if(s.__webglFramebuffer=t.createFramebuffer(),f)if(r.isWebGL2){s.__webglMultisampledFramebuffer=t.createFramebuffer(),s.__webglColorRenderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,s.__webglColorRenderbuffer),f=a.convert(e.texture.format);var y=a.convert(e.texture.type);f=p(f,y),y=E(e),t.renderbufferStorageMultisample(36161,y,f,e.width,e.height),t.bindFramebuffer(36160,s.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(36160,36064,36161,s.__webglColorRenderbuffer),t.bindRenderbuffer(36161,null),e.depthBuffer&&(s.__webglDepthRenderbuffer=t.createRenderbuffer(),M(s.__webglDepthRenderbuffer,e,!0)),t.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(d){for(n.bindTexture(34067,c.__webglTexture),x(34067,e.texture,v),f=0;6>f;f++)_(s.__webglFramebuffer[f],e,36064,34069+f);l(e.texture,v)&&u(34067,e.texture,e.width,e.height),n.bindTexture(34067,null)}else n.bindTexture(3553,c.__webglTexture),x(3553,e.texture,v),_(s.__webglFramebuffer,e,36064,3553),l(e.texture,v)&&u(3553,e.texture,e.width,e.height),n.bindTexture(3553,null);if(e.depthBuffer){if(s=i.get(e),c=!0===e.isWebGLRenderTargetCube,e.depthTexture){if(c)throw Error("target.depthTexture not supported in Cube render targets");if(e&&e.isWebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(36160,s.__webglFramebuffer),!e.depthTexture||!e.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");if(i.get(e.depthTexture).__webglTexture&&e.depthTexture.image.width===e.width&&e.depthTexture.image.height===e.height||(e.depthTexture.image.width=e.width,e.depthTexture.image.height=e.height,e.depthTexture.needsUpdate=!0),g(e.depthTexture,0),s=i.get(e.depthTexture).__webglTexture,1026===e.depthTexture.format)t.framebufferTexture2D(36160,36096,3553,s,0);else{if(1027!==e.depthTexture.format)throw Error("Unknown depthTexture format");t.framebufferTexture2D(36160,33306,3553,s,0)}}else if(c)for(s.__webglDepthbuffer=[],c=0;6>c;c++)t.bindFramebuffer(36160,s.__webglFramebuffer[c]),s.__webglDepthbuffer[c]=t.createRenderbuffer(),M(s.__webglDepthbuffer[c],e);else t.bindFramebuffer(36160,s.__webglFramebuffer),s.__webglDepthbuffer=t.createRenderbuffer(),M(s.__webglDepthbuffer,e);t.bindFramebuffer(36160,null)}},this.updateRenderTargetMipmap=function(t){var e=t.texture,a=h(t)||r.isWebGL2;if(l(e,a)){a=t.isWebGLRenderTargetCube?34067:3553;var o=i.get(e).__webglTexture;n.bindTexture(a,o),u(a,e,t.width,t.height),n.bindTexture(a,null)}},this.updateMultisampleRenderTarget=function(e){if(e.isWebGLMultisampleRenderTarget)if(r.isWebGL2){var n=i.get(e);t.bindFramebuffer(36008,n.__webglMultisampledFramebuffer),t.bindFramebuffer(36009,n.__webglFramebuffer),n=e.width;var a=e.height,o=16384;e.depthBuffer&&(o|=256),e.stencilBuffer&&(o|=1024),t.blitFramebuffer(0,0,n,a,0,0,n,a,o,9728)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.safeSetTexture2D=function(t,e){t&&t.isWebGLRenderTarget&&(!1===R&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),R=!0),t=t.texture),g(t,e)},this.safeSetTextureCube=function(t,e){t&&t.isWebGLRenderTargetCube&&(!1===P&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),P=!0),t=t.texture),t&&t.isCubeTexture||Array.isArray(t.image)&&6===t.image.length?v(t,e):y(t,e)}}function me(t,e,n){return{convert:function(t){if(1e3===t)return 10497;if(1001===t)return 33071;if(1002===t)return 33648;if(1003===t)return 9728;if(1004===t)return 9984;if(1005===t)return 9986;if(1006===t)return 9729;if(1007===t)return 9985;if(1008===t)return 9987;if(1009===t)return 5121;if(1017===t)return 32819;if(1018===t)return 32820;if(1019===t)return 33635;if(1010===t)return 5120;if(1011===t)return 5122;if(1012===t)return 5123;if(1013===t)return 5124;if(1014===t)return 5125;if(1015===t)return 5126;if(1016===t){if(n.isWebGL2)return 5131;var i=e.get("OES_texture_half_float");if(null!==i)return i.HALF_FLOAT_OES}if(1021===t)return 6406;if(1022===t)return 6407;if(1023===t)return 6408;if(1024===t)return 6409;if(1025===t)return 6410;if(1026===t)return 6402;if(1027===t)return 34041;if(1028===t)return 6403;if(100===t)return 32774;if(101===t)return 32778;if(102===t)return 32779;if(200===t)return 0;if(201===t)return 1;if(202===t)return 768;if(203===t)return 769;if(204===t)return 770;if(205===t)return 771;if(206===t)return 772;if(207===t)return 773;if(208===t)return 774;if(209===t)return 775;if(210===t)return 776;if((33776===t||33777===t||33778===t||33779===t)&&null!==(i=e.get("WEBGL_compressed_texture_s3tc"))){if(33776===t)return i.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===t)return i.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===t)return i.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===t)return i.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((35840===t||35841===t||35842===t||35843===t)&&null!==(i=e.get("WEBGL_compressed_texture_pvrtc"))){if(35840===t)return i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===t)return i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===t)return i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===t)return i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===t&&null!==(i=e.get("WEBGL_compressed_texture_etc1")))return i.COMPRESSED_RGB_ETC1_WEBGL;if((37808===t||37809===t||37810===t||37811===t||37812===t||37813===t||37814===t||37815===t||37816===t||37817===t||37818===t||37819===t||37820===t||37821===t)&&null!==(i=e.get("WEBGL_compressed_texture_astc")))return t;if(103===t||104===t){if(n.isWebGL2){if(103===t)return 32775;if(104===t)return 32776}if(null!==(i=e.get("EXT_blend_minmax"))){if(103===t)return i.MIN_EXT;if(104===t)return i.MAX_EXT}}if(1020===t){if(n.isWebGL2)return 34042;if(null!==(i=e.get("WEBGL_depth_texture")))return i.UNSIGNED_INT_24_8_WEBGL}return 0}}}function ge(){S.call(this),this.type="Group"}function ve(){S.call(this),this.type="Camera",this.matrixWorldInverse=new g,this.projectionMatrix=new g,this.projectionMatrixInverse=new g}function ye(t,e,n,i){ve.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==i?i:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function xe(t){ye.call(this),this.cameras=t||[]}function be(t,e,n){Da.setFromMatrixPosition(e.matrixWorld),Na.setFromMatrixPosition(n.matrixWorld);var i=Da.distanceTo(Na),r=e.projectionMatrix.elements,a=n.projectionMatrix.elements,o=r[14]/(r[10]-1);n=r[14]/(r[10]+1);var s=(r[9]+1)/r[5],c=(r[9]-1)/r[5],h=(r[8]-1)/r[0],l=(a[8]+1)/a[0];r=o*h,a=o*l,h=(l=i/(-h+l))*-h,e.matrixWorld.decompose(t.position,t.quaternion,t.scale),t.translateX(h),t.translateZ(l),t.matrixWorld.compose(t.position,t.quaternion,t.scale),t.matrixWorldInverse.getInverse(t.matrixWorld),e=o+l,o=n+l,t.projectionMatrix.makePerspective(r-h,a+(i-h),s*n/o*e,c*n/o*e,e,o)}function we(t){function e(){return null!==c&&!0===c.isPresenting}function a(){if(e()){var n=c.getEyeParameters("left"),i=n.renderWidth*f;n=n.renderHeight*f,E=t.getPixelRatio(),t.getSize(S),t.setDrawingBufferSize(2*i,n,1),A.start()}else o.enabled&&t.setDrawingBufferSize(S.width,S.height,E),A.stop()}var o=this,c=null,h=null,l=null,u=[],p=new g,d=new g,f=1,m="stage";"undefined"!=typeof window&&"VRFrameData"in window&&(h=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",a,!1));var v=new g,y=new i,x=new r,w=new ye;w.bounds=new s(0,0,.5,1),w.layers.enable(1);var _=new ye;_.bounds=new s(.5,0,.5,1),_.layers.enable(2);var M=new xe([w,_]);M.layers.enable(1),M.layers.enable(2);var E,S=new n,T=[];this.enabled=!1,this.getController=function(t){var e=u[t];return void 0===e&&((e=new ge).matrixAutoUpdate=!1,e.visible=!1,u[t]=e),e},this.getDevice=function(){return c},this.setDevice=function(t){void 0!==t&&(c=t),A.setContext(t)},this.setFramebufferScaleFactor=function(t){f=t},this.setFrameOfReferenceType=function(t){m=t},this.setPoseTarget=function(t){void 0!==t&&(l=t)},this.getCamera=function(t){var n="stage"===m?1.6:0;if(!1===e())return t.position.set(0,n,0),t.rotation.set(0,0,0),t;if(c.depthNear=t.near,c.depthFar=t.far,c.getFrameData(h),"stage"===m){var i=c.stageParameters;i?p.fromArray(i.sittingToStandingTransform):p.makeTranslation(0,n,0)}n=h.pose,(i=null!==l?l:t).matrix.copy(p),i.matrix.decompose(i.position,i.quaternion,i.scale),null!==n.orientation&&(y.fromArray(n.orientation),i.quaternion.multiply(y)),null!==n.position&&(y.setFromRotationMatrix(p),x.fromArray(n.position),x.applyQuaternion(y),i.position.add(x)),i.updateMatrixWorld(),w.near=t.near,_.near=t.near,w.far=t.far,_.far=t.far,w.matrixWorldInverse.fromArray(h.leftViewMatrix),_.matrixWorldInverse.fromArray(h.rightViewMatrix),d.getInverse(p),"stage"===m&&(w.matrixWorldInverse.multiply(d),_.matrixWorldInverse.multiply(d)),null!==(t=i.parent)&&(v.getInverse(t.matrixWorld),w.matrixWorldInverse.multiply(v),_.matrixWorldInverse.multiply(v)),w.matrixWorld.getInverse(w.matrixWorldInverse),_.matrixWorld.getInverse(_.matrixWorldInverse),w.projectionMatrix.fromArray(h.leftProjectionMatrix),_.projectionMatrix.fromArray(h.rightProjectionMatrix),be(M,w,_),(t=c.getLayers()).length&&(null!==(t=t[0]).leftBounds&&4===t.leftBounds.length&&w.bounds.fromArray(t.leftBounds),null!==t.rightBounds&&4===t.rightBounds.length&&_.bounds.fromArray(t.rightBounds));t:for(t=0;t<u.length;t++){n=u[t];e:{i=t;for(var r=navigator.getGamepads&&navigator.getGamepads(),a=0,o=0,s=r.length;a<s;a++){var f=r[a];if(f&&("Daydream Controller"===f.id||"Gear VR Controller"===f.id||"Oculus Go Controller"===f.id||"OpenVR Gamepad"===f.id||f.id.startsWith("Oculus Touch")||f.id.startsWith("Spatial Controller"))){if(o===i){i=f;break e}o++}}i=void 0}if(void 0!==i&&void 0!==i.pose){if(null===i.pose)break t;!1===(r=i.pose).hasPosition&&n.position.set(.2,-.6,-.05),null!==r.position&&n.position.fromArray(r.position),null!==r.orientation&&n.quaternion.fromArray(r.orientation),n.matrix.compose(n.position,n.quaternion,n.scale),n.matrix.premultiply(p),n.matrix.decompose(n.position,n.quaternion,n.scale),n.matrixWorldNeedsUpdate=!0,n.visible=!0,r="Daydream Controller"===i.id?0:1,T[t]!==i.buttons[r].pressed&&(T[t]=i.buttons[r].pressed,!0===T[t]?n.dispatchEvent({type:"selectstart"}):(n.dispatchEvent({type:"selectend"}),n.dispatchEvent({type:"select"})))}else n.visible=!1}return M},this.getStandingMatrix=function(){return p},this.isPresenting=e;var A=new b;this.setAnimationLoop=function(t){A.setAnimationLoop(t),e()&&A.start()},this.submitFrame=function(){e()&&c.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",a)}}function _e(t){function e(){return null!==c&&null!==l}function n(t){var e=d[f.indexOf(t.inputSource)];e&&e.dispatchEvent({type:t.type})}function i(){t.setFramebuffer(null),t.setRenderTarget(t.getRenderTarget()),w.stop()}function r(t,e){null===e?t.matrixWorld.copy(t.matrix):t.matrixWorld.multiplyMatrices(e.matrixWorld,t.matrix),t.matrixWorldInverse.getInverse(t.matrixWorld)}var a=t.context,o=null,c=null,h=1,l=null,u="stage",p=null,d=[],f=[],m=new ye;m.layers.enable(1),m.viewport=new s;var v=new ye;v.layers.enable(2),v.viewport=new s;var y=new xe([m,v]);y.layers.enable(1),y.layers.enable(2),this.enabled=!1,this.getController=function(t){var e=d[t];return void 0===e&&((e=new ge).matrixAutoUpdate=!1,e.visible=!1,d[t]=e),e},this.getDevice=function(){return o},this.setDevice=function(t){void 0!==t&&(o=t),t instanceof XRDevice&&a.setCompatibleXRDevice(t)},this.setFramebufferScaleFactor=function(t){h=t},this.setFrameOfReferenceType=function(t){u=t},this.setSession=function(e){null!==(c=e)&&(c.addEventListener("select",n),c.addEventListener("selectstart",n),c.addEventListener("selectend",n),c.addEventListener("end",i),c.baseLayer=new XRWebGLLayer(c,a,{framebufferScaleFactor:h}),c.requestFrameOfReference(u).then(function(e){l=e,t.setFramebuffer(c.baseLayer.framebuffer),w.setContext(c),w.start()}),f=c.getInputSources(),c.addEventListener("inputsourceschange",function(){f=c.getInputSources(),console.log(f);for(var t=0;t<d.length;t++)d[t].userData.inputSource=f[t]}))},this.getCamera=function(t){if(e()){var n=t.parent,i=y.cameras;r(y,n);for(var a=0;a<i.length;a++)r(i[a],n);for(t.matrixWorld.copy(y.matrixWorld),a=0,n=(t=t.children).length;a<n;a++)t[a].updateMatrixWorld(!0);return be(y,m,v),y}return t},this.isPresenting=e;var x=null,w=new b;w.setAnimationLoop(function(t,e){if(null!==(p=e.getDevicePose(l)))for(var n=c.baseLayer,i=e.views,r=0;r<i.length;r++){var a=i[r],o=n.getViewport(a),s=p.getViewMatrix(a),h=y.cameras[r];h.matrix.fromArray(s).getInverse(h.matrix),h.projectionMatrix.fromArray(a.projectionMatrix),h.viewport.set(o.x,o.y,o.width,o.height),0===r&&y.matrix.copy(h.matrix)}for(r=0;r<d.length;r++)n=d[r],(i=f[r])&&null!==(i=e.getInputPose(i,l))?("targetRay"in i?n.matrix.elements=i.targetRay.transformMatrix:"pointerMatrix"in i&&(n.matrix.elements=i.pointerMatrix),n.matrix.decompose(n.position,n.rotation,n.scale),n.visible=!0):n.visible=!1;x&&x(t)}),this.setAnimationLoop=function(t){x=t},this.dispose=function(){},this.getStandingMatrix=function(){return console.warn("THREE.WebXRManager: getStandingMatrix() is no longer needed."),new g},this.submitFrame=function(){}}function Me(t){var e;function i(){D=new tt(Ot),(N=new K(Ot,D,t)).isWebGL2||(D.get("WEBGL_depth_texture"),D.get("OES_texture_float"),D.get("OES_texture_half_float"),D.get("OES_texture_half_float_linear"),D.get("OES_standard_derivatives"),D.get("OES_element_index_uint"),D.get("ANGLE_instanced_arrays")),D.get("OES_texture_float_linear"),rt=new me(Ot,D,N),(B=new de(Ot,D,rt,N)).scissor(yt.copy(Et).multiplyScalar(_t)),B.viewport(vt.copy(Mt).multiplyScalar(_t)),z=new it(Ot),U=new ee,G=new fe(Ot,D,B,U,N,rt,z),F=new w(Ot),H=new et(Ot,F,z),k=new ot(H,z),X=new at(Ot),V=new te(st,D,N,G),j=new ae,W=new he,q=new Z(st,B,k,R),Y=new Q(Ot,D,z,N),J=new nt(Ot,D,z,N),z.programs=V.programs,st.context=Ot,st.capabilities=N,st.extensions=D,st.properties=U,st.renderLists=j,st.state=B,st.info=z}function a(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),ct=!0}function o(){console.log("THREE.WebGLRenderer: Context Restored."),ct=!1,i()}function c(t){(t=t.target).removeEventListener("dispose",c),h(t),U.remove(t)}function h(t){var e=U.get(t).program;t.program=void 0,void 0!==e&&V.releaseProgram(e)}function l(t,e,n,i){for(var r=0,a=t.length;r<a;r++){var o=t[r],s=o.object,c=o.geometry,h=void 0===i?o.material:i;if(o=o.group,n.isArrayCamera){gt=n;for(var l=n.cameras,u=0,d=l.length;u<d;u++){var f=l[u];if(s.layers.test(f.layers)){if("viewport"in f)B.viewport(vt.copy(f.viewport));else{var m=f.bounds;B.viewport(vt.set(m.x*bt,m.y*wt,m.z*bt,m.w*wt).multiplyScalar(_t))}I.setupLights(f),p(s,e,f,c,h,o)}}}else gt=null,p(s,e,n,c,h,o)}}function p(t,n,i,r,a,o){if(t.onBeforeRender(st,n,i,r,a,o),I=W.get(n,gt||i),t.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){B.setMaterial(a);var s=f(i,n.fog,a,t);dt=e=null,ft=!1,function(t,e){t.render(function(t){st.renderBufferImmediate(t,e)})}(t,s)}else st.renderBufferDirect(i,n.fog,r,a,t,o);t.onAfterRender(st,n,i,r,a,o),I=W.get(n,gt||i)}function d(t,e,n){var i=U.get(t),r=I.state.lights,a=i.lightsHash,o=r.state.hash;n=V.getParameters(t,r.state,I.state.shadowsArray,e,At.numPlanes,At.numIntersection,n);var s=V.getProgramCode(t,n),l=i.program,u=!0;if(void 0===l)t.addEventListener("dispose",c);else if(l.code!==s)h(t);else{if(a.stateID!==o.stateID||a.directionalLength!==o.directionalLength||a.pointLength!==o.pointLength||a.spotLength!==o.spotLength||a.rectAreaLength!==o.rectAreaLength||a.hemiLength!==o.hemiLength||a.shadowsLength!==o.shadowsLength)a.stateID=o.stateID,a.directionalLength=o.directionalLength,a.pointLength=o.pointLength,a.spotLength=o.spotLength,a.rectAreaLength=o.rectAreaLength,a.hemiLength=o.hemiLength,a.shadowsLength=o.shadowsLength;else if(void 0!==n.shaderID)return;u=!1}if(u&&(n.shaderID?(s=ga[n.shaderID],i.shader={name:t.type,uniforms:v(s.uniforms),vertexShader:s.vertexShader,fragmentShader:s.fragmentShader}):i.shader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader},t.onBeforeCompile(i.shader,st),s=V.getProgramCode(t,n),l=V.acquireProgram(t,i.shader,n,s),i.program=l,t.program=l),n=l.getAttributes(),t.morphTargets)for(s=t.numSupportedMorphTargets=0;s<st.maxMorphTargets;s++)0<=n["morphTarget"+s]&&t.numSupportedMorphTargets++;if(t.morphNormals)for(s=t.numSupportedMorphNormals=0;s<st.maxMorphNormals;s++)0<=n["morphNormal"+s]&&t.numSupportedMorphNormals++;n=i.shader.uniforms,(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(i.numClippingPlanes=At.numPlanes,i.numIntersection=At.numIntersection,n.clippingPlanes=At.uniform),i.fog=e,void 0===a&&(i.lightsHash=a={}),a.stateID=o.stateID,a.directionalLength=o.directionalLength,a.pointLength=o.pointLength,a.spotLength=o.spotLength,a.rectAreaLength=o.rectAreaLength,a.hemiLength=o.hemiLength,a.shadowsLength=o.shadowsLength,t.lights&&(n.ambientLightColor.value=r.state.ambient,n.lightProbe.value=r.state.probe,n.directionalLights.value=r.state.directional,n.spotLights.value=r.state.spot,n.rectAreaLights.value=r.state.rectArea,n.pointLights.value=r.state.point,n.hemisphereLights.value=r.state.hemi,n.directionalShadowMap.value=r.state.directionalShadowMap,n.directionalShadowMatrix.value=r.state.directionalShadowMatrix,n.spotShadowMap.value=r.state.spotShadowMap,n.spotShadowMatrix.value=r.state.spotShadowMatrix,n.pointShadowMap.value=r.state.pointShadowMap,n.pointShadowMatrix.value=r.state.pointShadowMatrix),t=i.program.getUniforms(),t=kt.seqWithValue(t.seq,n),i.uniformsList=t}function f(t,e,n,i){G.resetTextureUnits();var r=U.get(n),a=r.lightsHash,o=I.state.lights.state.hash;Lt&&(Rt||t!==mt)&&At.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,t,r,t===mt&&n.id===pt),!1===n.needsUpdate&&(void 0===r.program?n.needsUpdate=!0:n.fog&&r.fog!==e?n.needsUpdate=!0:(!n.lights||a.stateID===o.stateID&&a.directionalLength===o.directionalLength&&a.pointLength===o.pointLength&&a.spotLength===o.spotLength&&a.rectAreaLength===o.rectAreaLength&&a.hemiLength===o.hemiLength&&a.shadowsLength===o.shadowsLength)&&(void 0===r.numClippingPlanes||r.numClippingPlanes===At.numPlanes&&r.numIntersection===At.numIntersection)||(n.needsUpdate=!0)),n.needsUpdate&&(d(n,e,i),n.needsUpdate=!1);var s=!1,c=!1,h=!1;o=(a=r.program).getUniforms();var l=r.shader.uniforms;if(B.useProgram(a.program)&&(h=c=s=!0),n.id!==pt&&(pt=n.id,c=!0),(s||mt!==t)&&(o.setValue(Ot,"projectionMatrix",t.projectionMatrix),N.logarithmicDepthBuffer&&o.setValue(Ot,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),mt!==t&&(mt=t,h=c=!0),(n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap)&&(void 0!==(s=o.map.cameraPosition)&&s.setValue(Ot,Ct.setFromMatrixPosition(t.matrixWorld))),(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&o.setValue(Ot,"viewMatrix",t.matrixWorldInverse)),n.skinning&&(o.setOptional(Ot,i,"bindMatrix"),o.setOptional(Ot,i,"bindMatrixInverse"),t=i.skeleton))if(s=t.bones,N.floatVertexTextures){if(void 0===t.boneTexture){s=Math.sqrt(4*s.length),s=ca.ceilPowerOfTwo(s),s=Math.max(s,4);var p=new Float32Array(s*s*4);p.set(t.boneMatrices);var f=new u(p,s,s,1023,1015);f.needsUpdate=!0,t.boneMatrices=p,t.boneTexture=f,t.boneTextureSize=s}o.setValue(Ot,"boneTexture",t.boneTexture,G),o.setValue(Ot,"boneTextureSize",t.boneTextureSize)}else o.setOptional(Ot,t,"boneMatrices");return c&&(o.setValue(Ot,"toneMappingExposure",st.toneMappingExposure),o.setValue(Ot,"toneMappingWhitePoint",st.toneMappingWhitePoint),n.lights&&(c=h,l.ambientLightColor.needsUpdate=c,l.lightProbe.needsUpdate=c,l.directionalLights.needsUpdate=c,l.pointLights.needsUpdate=c,l.spotLights.needsUpdate=c,l.rectAreaLights.needsUpdate=c,l.hemisphereLights.needsUpdate=c),e&&n.fog&&(l.fogColor.value.copy(e.color),e.isFog?(l.fogNear.value=e.near,l.fogFar.value=e.far):e.isFogExp2&&(l.fogDensity.value=e.density)),n.isMeshBasicMaterial?y(l,n):n.isMeshLambertMaterial?(y(l,n),n.emissiveMap&&(l.emissiveMap.value=n.emissiveMap)):n.isMeshPhongMaterial?(y(l,n),n.isMeshToonMaterial?(x(l,n),n.gradientMap&&(l.gradientMap.value=n.gradientMap)):x(l,n)):n.isMeshStandardMaterial?(y(l,n),n.isMeshPhysicalMaterial?(_(l,n),l.reflectivity.value=n.reflectivity,l.clearCoat.value=n.clearCoat,l.clearCoatRoughness.value=n.clearCoatRoughness):_(l,n)):n.isMeshMatcapMaterial?(y(l,n),n.matcap&&(l.matcap.value=n.matcap),n.bumpMap&&(l.bumpMap.value=n.bumpMap,l.bumpScale.value=n.bumpScale,1===n.side&&(l.bumpScale.value*=-1)),n.normalMap&&(l.normalMap.value=n.normalMap,l.normalScale.value.copy(n.normalScale),1===n.side&&l.normalScale.value.negate()),n.displacementMap&&(l.displacementMap.value=n.displacementMap,l.displacementScale.value=n.displacementScale,l.displacementBias.value=n.displacementBias)):n.isMeshDepthMaterial?(y(l,n),n.displacementMap&&(l.displacementMap.value=n.displacementMap,l.displacementScale.value=n.displacementScale,l.displacementBias.value=n.displacementBias)):n.isMeshDistanceMaterial?(y(l,n),n.displacementMap&&(l.displacementMap.value=n.displacementMap,l.displacementScale.value=n.displacementScale,l.displacementBias.value=n.displacementBias),l.referencePosition.value.copy(n.referencePosition),l.nearDistance.value=n.nearDistance,l.farDistance.value=n.farDistance):n.isMeshNormalMaterial?(y(l,n),n.bumpMap&&(l.bumpMap.value=n.bumpMap,l.bumpScale.value=n.bumpScale,1===n.side&&(l.bumpScale.value*=-1)),n.normalMap&&(l.normalMap.value=n.normalMap,l.normalScale.value.copy(n.normalScale),1===n.side&&l.normalScale.value.negate()),n.displacementMap&&(l.displacementMap.value=n.displacementMap,l.displacementScale.value=n.displacementScale,l.displacementBias.value=n.displacementBias)):n.isLineBasicMaterial?(l.diffuse.value.copy(n.color),l.opacity.value=n.opacity,n.isLineDashedMaterial&&(l.dashSize.value=n.dashSize,l.totalSize.value=n.dashSize+n.gapSize,l.scale.value=n.scale)):n.isPointsMaterial?(l.diffuse.value.copy(n.color),l.opacity.value=n.opacity,l.size.value=n.size*_t,l.scale.value=.5*wt,l.map.value=n.map,null!==n.map&&(!0===n.map.matrixAutoUpdate&&n.map.updateMatrix(),l.uvTransform.value.copy(n.map.matrix))):n.isSpriteMaterial?(l.diffuse.value.copy(n.color),l.opacity.value=n.opacity,l.rotation.value=n.rotation,l.map.value=n.map,null!==n.map&&(!0===n.map.matrixAutoUpdate&&n.map.updateMatrix(),l.uvTransform.value.copy(n.map.matrix))):n.isShadowMaterial&&(l.color.value.copy(n.color),l.opacity.value=n.opacity),void 0!==l.ltc_1&&(l.ltc_1.value=ma.LTC_1),void 0!==l.ltc_2&&(l.ltc_2.value=ma.LTC_2),kt.upload(Ot,r.uniformsList,l,G)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(kt.upload(Ot,r.uniformsList,l,G),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&o.setValue(Ot,"center",i.center),o.setValue(Ot,"modelViewMatrix",i.modelViewMatrix),o.setValue(Ot,"normalMatrix",i.normalMatrix),o.setValue(Ot,"modelMatrix",i.matrixWorld),a}function y(t,e){if(t.opacity.value=e.opacity,e.color&&t.diffuse.value.copy(e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=U.get(e.envMap).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity),e.map)var n=e.map;else e.specularMap?n=e.specularMap:e.displacementMap?n=e.displacementMap:e.normalMap?n=e.normalMap:e.bumpMap?n=e.bumpMap:e.roughnessMap?n=e.roughnessMap:e.metalnessMap?n=e.metalnessMap:e.alphaMap?n=e.alphaMap:e.emissiveMap&&(n=e.emissiveMap);void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}function x(t,e){t.specular.value.copy(e.specular),t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,1===e.side&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),1===e.side&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function _(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,1===e.side&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),1===e.side&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}console.log("THREE.WebGLRenderer","104");var M=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),E=void 0!==t.context?t.context:null,S=void 0!==t.alpha&&t.alpha,T=void 0===t.depth||t.depth,A=void 0===t.stencil||t.stencil,L=void 0!==t.antialias&&t.antialias,R=void 0===t.premultipliedAlpha||t.premultipliedAlpha,P=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,C=void 0!==t.powerPreference?t.powerPreference:"default",O=null,I=null;this.domElement=M,this.context=null,this.debug={checkShaderErrors:!1},this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1,this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var D,N,B,z,U,G,F,H,k,V,j,W,q,X,Y,J,rt,st=this,ct=!1,ht=null,lt=null,ut=null,pt=-1,dt=e=null,ft=!1,mt=null,gt=null,vt=new s,yt=new s,xt=null,bt=M.width,wt=M.height,_t=1,Mt=new s(0,0,bt,wt),Et=new s(0,0,bt,wt),St=!1,Tt=new m,At=new $,Lt=!1,Rt=!1,Pt=new g,Ct=new r;try{S={alpha:S,depth:T,stencil:A,antialias:L,premultipliedAlpha:R,preserveDrawingBuffer:P,powerPreference:C},M.addEventListener("webglcontextlost",a,!1),M.addEventListener("webglcontextrestored",o,!1);var Ot=E||M.getContext("webgl",S)||M.getContext("experimental-webgl",S);if(null===Ot){if(null!==M.getContext("webgl"))throw Error("Error creating WebGL context with your selected attributes.");throw Error("Error creating WebGL context.")}void 0===Ot.getShaderPrecisionFormat&&(Ot.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){throw console.error("THREE.WebGLRenderer: "+t.message),t}i();var It="undefined"!=typeof navigator&&"xr"in navigator?new _e(st):new we(st);this.vr=It;var Dt=new pe(st,k,N.maxTextureSize);this.shadowMap=Dt,this.getContext=function(){return Ot},this.getContextAttributes=function(){return Ot.getContextAttributes()},this.forceContextLoss=function(){var t=D.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){var t=D.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return _t},this.setPixelRatio=function(t){void 0!==t&&(_t=t,this.setSize(bt,wt,!1))},this.getSize=function(t){return void 0===t&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),t=new n),t.set(bt,wt)},this.setSize=function(t,e,n){It.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(bt=t,wt=e,M.width=t*_t,M.height=e*_t,!1!==n&&(M.style.width=t+"px",M.style.height=e+"px"),this.setViewport(0,0,t,e))},this.getDrawingBufferSize=function(t){return void 0===t&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),t=new n),t.set(bt*_t,wt*_t)},this.setDrawingBufferSize=function(t,e,n){bt=t,wt=e,_t=n,M.width=t*n,M.height=e*n,this.setViewport(0,0,t,e)},this.getCurrentViewport=function(t){return void 0===t&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),t=new s),t.copy(vt)},this.getViewport=function(t){return t.copy(Mt)},this.setViewport=function(t,e,n,i){t.isVector4?Mt.set(t.x,t.y,t.z,t.w):Mt.set(t,e,n,i),B.viewport(vt.copy(Mt).multiplyScalar(_t))},this.getScissor=function(t){return t.copy(Et)},this.setScissor=function(t,e,n,i){t.isVector4?Et.set(t.x,t.y,t.z,t.w):Et.set(t,e,n,i),B.scissor(yt.copy(Et).multiplyScalar(_t))},this.getScissorTest=function(){return St},this.setScissorTest=function(t){B.setScissorTest(St=t)},this.getClearColor=function(){return q.getClearColor()},this.setClearColor=function(){q.setClearColor.apply(q,arguments)},this.getClearAlpha=function(){return q.getClearAlpha()},this.setClearAlpha=function(){q.setClearAlpha.apply(q,arguments)},this.clear=function(t,e,n){var i=0;(void 0===t||t)&&(i|=16384),(void 0===e||e)&&(i|=256),(void 0===n||n)&&(i|=1024),Ot.clear(i)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){M.removeEventListener("webglcontextlost",a,!1),M.removeEventListener("webglcontextrestored",o,!1),j.dispose(),W.dispose(),U.dispose(),k.dispose(),It.dispose(),Bt.stop()},this.renderBufferImmediate=function(t,e){B.initAttributes();var n=U.get(t);t.hasPositions&&!n.position&&(n.position=Ot.createBuffer()),t.hasNormals&&!n.normal&&(n.normal=Ot.createBuffer()),t.hasUvs&&!n.uv&&(n.uv=Ot.createBuffer()),t.hasColors&&!n.color&&(n.color=Ot.createBuffer()),e=e.getAttributes(),t.hasPositions&&(Ot.bindBuffer(34962,n.position),Ot.bufferData(34962,t.positionArray,35048),B.enableAttribute(e.position),Ot.vertexAttribPointer(e.position,3,5126,!1,0,0)),t.hasNormals&&(Ot.bindBuffer(34962,n.normal),Ot.bufferData(34962,t.normalArray,35048),B.enableAttribute(e.normal),Ot.vertexAttribPointer(e.normal,3,5126,!1,0,0)),t.hasUvs&&(Ot.bindBuffer(34962,n.uv),Ot.bufferData(34962,t.uvArray,35048),B.enableAttribute(e.uv),Ot.vertexAttribPointer(e.uv,2,5126,!1,0,0)),t.hasColors&&(Ot.bindBuffer(34962,n.color),Ot.bufferData(34962,t.colorArray,35048),B.enableAttribute(e.color),Ot.vertexAttribPointer(e.color,3,5126,!1,0,0)),B.disableUnusedAttributes(),Ot.drawArrays(4,0,t.count),t.count=0},this.renderBufferDirect=function(t,n,i,r,a,o){var s=a.isMesh&&0>a.matrixWorld.determinant();B.setMaterial(r,s);var c=f(t,n,r,a),h=!1;e===i.id&&dt===c.id&&ft===(!0===r.wireframe)||(e=i.id,dt=c.id,ft=!0===r.wireframe,h=!0),a.morphTargetInfluences&&(X.update(a,i,r,c),h=!0),s=i.index;var l=i.attributes.position;if(n=1,!0===r.wireframe&&(s=H.getWireframeAttribute(i),n=2),t=Y,null!==s){var u=F.get(s);(t=J).setIndex(u)}if(h){if(i&&i.isInstancedBufferGeometry&&!N.isWebGL2&&null===D.get("ANGLE_instanced_arrays"))console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");else{B.initAttributes(),h=i.attributes,c=c.getAttributes();var p=r.defaultAttributeValues;for(M in c){var d=c[M];if(0<=d){var m=h[M];if(void 0!==m){var g=m.normalized,v=m.itemSize,y=F.get(m);if(void 0!==y){var x=y.buffer,b=y.type;if(y=y.bytesPerElement,m.isInterleavedBufferAttribute){var w=m.data,_=w.stride;m=m.offset,w&&w.isInstancedInterleavedBuffer?(B.enableAttributeAndDivisor(d,w.meshPerAttribute),void 0===i.maxInstancedCount&&(i.maxInstancedCount=w.meshPerAttribute*w.count)):B.enableAttribute(d),Ot.bindBuffer(34962,x),Ot.vertexAttribPointer(d,v,b,g,_*y,m*y)}else m.isInstancedBufferAttribute?(B.enableAttributeAndDivisor(d,m.meshPerAttribute),void 0===i.maxInstancedCount&&(i.maxInstancedCount=m.meshPerAttribute*m.count)):B.enableAttribute(d),Ot.bindBuffer(34962,x),Ot.vertexAttribPointer(d,v,b,g,0,0)}}else if(void 0!==p&&void 0!==(g=p[M]))switch(g.length){case 2:Ot.vertexAttrib2fv(d,g);break;case 3:Ot.vertexAttrib3fv(d,g);break;case 4:Ot.vertexAttrib4fv(d,g);break;default:Ot.vertexAttrib1fv(d,g)}}}B.disableUnusedAttributes()}null!==s&&Ot.bindBuffer(34963,u.buffer)}u=1/0,null!==s?u=s.count:void 0!==l&&(u=l.count),s=i.drawRange.start*n,l=null!==o?o.start*n:0;var M=Math.max(s,l);if(0!==(o=Math.max(0,Math.min(u,s+i.drawRange.count*n,l+(null!==o?o.count*n:1/0))-1-M+1))){if(a.isMesh)if(!0===r.wireframe)B.setLineWidth(r.wireframeLinewidth*(null===lt?_t:1)),t.setMode(1);else switch(a.drawMode){case 0:t.setMode(4);break;case 1:t.setMode(5);break;case 2:t.setMode(6)}else a.isLine?(void 0===(r=r.linewidth)&&(r=1),B.setLineWidth(r*(null===lt?_t:1)),a.isLineSegments?t.setMode(1):a.isLineLoop?t.setMode(2):t.setMode(3)):a.isPoints?t.setMode(0):a.isSprite&&t.setMode(4);i&&i.isInstancedBufferGeometry?0<i.maxInstancedCount&&t.renderInstances(i,M,o):t.render(M,o)}},this.compile=function(t,e){(I=W.get(t,e)).init(),t.traverse(function(t){t.isLight&&(I.pushLight(t),t.castShadow&&I.pushShadow(t))}),I.setupLights(e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var n=0;n<e.material.length;n++)d(e.material[n],t.fog,e);else d(e.material,t.fog,e)})};var Nt=null,Bt=new b;Bt.setAnimationLoop(function(t){It.isPresenting()||Nt&&Nt(t)}),"undefined"!=typeof window&&Bt.setContext(window),this.setAnimationLoop=function(t){Nt=t,It.setAnimationLoop(t),Bt.start()},this.render=function(t,n,i,r){if(void 0!==i){console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.");var a=i}if(void 0!==r){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.");var o=r}n&&n.isCamera?ct||(dt=e=null,ft=!1,pt=-1,mt=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===n.parent&&n.updateMatrixWorld(),It.enabled&&(n=It.getCamera(n)),(I=W.get(t,n)).init(),t.onBeforeRender(st,t,n,a||lt),Pt.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),Tt.setFromMatrix(Pt),Rt=this.localClippingEnabled,Lt=At.init(this.clippingPlanes,Rt,n),(O=j.get(t,n)).init(),function t(e,n,i,r){if(!1!==e.visible){if(e.layers.test(n.layers))if(e.isGroup)i=e.renderOrder;else if(e.isLight)I.pushLight(e),e.castShadow&&I.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||Tt.intersectsSprite(e)){r&&Ct.setFromMatrixPosition(e.matrixWorld).applyMatrix4(Pt);var a=k.update(e),o=e.material;o.visible&&O.push(e,a,o,i,Ct.z,null)}}else if(e.isImmediateRenderObject)r&&Ct.setFromMatrixPosition(e.matrixWorld).applyMatrix4(Pt),O.push(e,null,e.material,i,Ct.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),!e.frustumCulled||Tt.intersectsObject(e)))if(r&&Ct.setFromMatrixPosition(e.matrixWorld).applyMatrix4(Pt),a=k.update(e),o=e.material,Array.isArray(o))for(var s=a.groups,c=0,h=s.length;c<h;c++){var l=s[c],u=o[l.materialIndex];u&&u.visible&&O.push(e,a,u,i,Ct.z,l)}else o.visible&&O.push(e,a,o,i,Ct.z,null);for(c=0,h=(e=e.children).length;c<h;c++)t(e[c],n,i,r)}}(t,n,0,st.sortObjects),!0===st.sortObjects&&O.sort(),Lt&&At.beginShadows(),Dt.render(I.state.shadowsArray,t,n),I.setupLights(n),Lt&&At.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==a&&this.setRenderTarget(a),q.render(O,t,n,o),i=O.opaque,r=O.transparent,t.overrideMaterial?(a=t.overrideMaterial,i.length&&l(i,t,n,a),r.length&&l(r,t,n,a)):(i.length&&l(i,t,n),r.length&&l(r,t,n)),t.onAfterRender(st,t,n),null!==lt&&(G.updateRenderTargetMipmap(lt),G.updateMultisampleRenderTarget(lt)),B.buffers.depth.setTest(!0),B.buffers.depth.setMask(!0),B.buffers.color.setMask(!0),B.setPolygonOffset(!1),It.enabled&&It.submitFrame(),I=O=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.setFramebuffer=function(t){ht=t},this.getRenderTarget=function(){return lt},this.setRenderTarget=function(t,e,n){(lt=t)&&void 0===U.get(t).__webglFramebuffer&&G.setupRenderTarget(t);var i=ht,r=!1;t?(i=U.get(t).__webglFramebuffer,t.isWebGLRenderTargetCube?(i=i[e||0],r=!0):i=t.isWebGLMultisampleRenderTarget?U.get(t).__webglMultisampledFramebuffer:i,vt.copy(t.viewport),yt.copy(t.scissor),xt=t.scissorTest):(vt.copy(Mt).multiplyScalar(_t),yt.copy(Et).multiplyScalar(_t),xt=St),ut!==i&&(Ot.bindFramebuffer(36160,i),ut=i),B.viewport(vt),B.scissor(yt),B.setScissorTest(xt),r&&(t=U.get(t.texture),Ot.framebufferTexture2D(36160,36064,34069+(e||0),t.__webglTexture,n||0))},this.readRenderTargetPixels=function(t,e,n,i,r,a){if(t&&t.isWebGLRenderTarget){var o=U.get(t).__webglFramebuffer;if(o){var s=!1;o!==ut&&(Ot.bindFramebuffer(36160,o),s=!0);try{var c=t.texture,h=c.format,l=c.type;1023!==h&&rt.convert(h)!==Ot.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===l||rt.convert(l)===Ot.getParameter(35738)||1015===l&&(N.isWebGL2||D.get("OES_texture_float")||D.get("WEBGL_color_buffer_float"))||1016===l&&(N.isWebGL2?D.get("EXT_color_buffer_float"):D.get("EXT_color_buffer_half_float"))?36053===Ot.checkFramebufferStatus(36160)?0<=e&&e<=t.width-i&&0<=n&&n<=t.height-r&&Ot.readPixels(e,n,i,r,rt.convert(h),rt.convert(l),a):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{s&&Ot.bindFramebuffer(36160,ut)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(t,e,n){var i=e.image.width,r=e.image.height,a=rt.convert(e.format);G.setTexture2D(e,0),Ot.copyTexImage2D(3553,n||0,a,t.x,t.y,i,r,0)},this.copyTextureToTexture=function(t,e,n,i){var r=e.image.width,a=e.image.height,o=rt.convert(n.format),s=rt.convert(n.type);G.setTexture2D(n,0),e.isDataTexture?Ot.texSubImage2D(3553,i||0,t.x,t.y,r,a,o,s,e.image.data):Ot.texSubImage2D(3553,i||0,t.x,t.y,o,s,e.image)}}function Ee(t,e){this.name="",this.color=new x(t),this.density=void 0!==e?e:25e-5}function Se(t,e,n){this.name="",this.color=new x(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function Te(){S.call(this),this.type="Scene",this.overrideMaterial=this.fog=this.background=null,this.autoUpdate=!0}function Ae(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Le(t,e,n,i){this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===i}function Re(t){j.call(this),this.type="SpriteMaterial",this.color=new x(16777215),this.map=null,this.rotation=0,this.sizeAttenuation=!0,this.lights=!1,this.transparent=!0,this.setValues(t)}function Pe(t){if(S.call(this),this.type="Sprite",void 0===Ia){Ia=new G;var e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);e=new Ae(e,5),Ia.setIndex([0,1,2,0,2,3]),Ia.addAttribute("position",new Le(e,3,0,!1)),Ia.addAttribute("uv",new Le(e,2,3,!1))}this.geometry=Ia,this.material=void 0!==t?t:new Re,this.center=new n(.5,.5)}function Ce(){S.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Oe(t,e){t&&t.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),J.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new g,this.bindMatrixInverse=new g}function Ie(t,e){if(t=t||[],this.bones=t.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),void 0===e)this.calculateInverses();else if(this.bones.length===e.length)this.boneInverses=e.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],t=0,e=this.bones.length;t<e;t++)this.boneInverses.push(new g)}function De(){S.call(this),this.type="Bone"}function Ne(t){j.call(this),this.type="LineBasicMaterial",this.color=new x(16777215),this.linewidth=1,this.linejoin=this.linecap="round",this.lights=!1,this.setValues(t)}function Be(t,e,n){1===n&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead."),S.call(this),this.type="Line",this.geometry=void 0!==t?t:new G,this.material=void 0!==e?e:new Ne({color:16777215*Math.random()})}function ze(t,e){Be.call(this,t,e),this.type="LineSegments"}function Ue(t,e){Be.call(this,t,e),this.type="LineLoop"}function Ge(t){j.call(this),this.type="PointsMaterial",this.color=new x(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=this.morphTargets=!1,this.setValues(t)}function Fe(t,e){S.call(this),this.type="Points",this.geometry=void 0!==t?t:new G,this.material=void 0!==e?e:new Ge({color:16777215*Math.random()})}function He(t,e,n,i,r,a,s,c,h){o.call(this,t,e,n,i,r,a,s,c,h),this.format=void 0!==s?s:1022,this.minFilter=void 0!==a?a:1006,this.magFilter=void 0!==r?r:1006,this.generateMipmaps=!1}function ke(t,e,n,i,r,a,s,c,h,l,u,p){o.call(this,null,a,s,c,h,l,i,r,u,p),this.image={width:e,height:n},this.mipmaps=t,this.generateMipmaps=this.flipY=!1}function Ve(t,e,n,i,r,a,s,c,h){o.call(this,t,e,n,i,r,a,s,c,h),this.needsUpdate=!0}function je(t,e,n,i,r,a,s,c,h,l){if(1026!==(l=void 0!==l?l:1026)&&1027!==l)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&1026===l&&(n=1012),void 0===n&&1027===l&&(n=1020),o.call(this,null,i,r,a,s,c,l,n,h),this.image={width:t,height:e},this.magFilter=void 0!==s?s:1003,this.minFilter=void 0!==c?c:1003,this.generateMipmaps=this.flipY=!1}function We(t){G.call(this),this.type="WireframeGeometry";var e,n,i,a=[],o=[0,0],s={},c=["a","b","c"];if(t&&t.isGeometry){var h=t.faces,l=0;for(n=h.length;l<n;l++){var u=h[l];for(e=0;3>e;e++){var p=u[c[e]],d=u[c[(e+1)%3]];o[0]=Math.min(p,d),o[1]=Math.max(p,d),void 0===s[p=o[0]+","+o[1]]&&(s[p]={index1:o[0],index2:o[1]})}}for(p in s)l=s[p],c=t.vertices[l.index1],a.push(c.x,c.y,c.z),c=t.vertices[l.index2],a.push(c.x,c.y,c.z)}else if(t&&t.isBufferGeometry)if(c=new r,null!==t.index){h=t.attributes.position,u=t.index;var f=t.groups;for(0===f.length&&(f=[{start:0,count:u.count,materialIndex:0}]),t=0,i=f.length;t<i;++t)for(e=(l=f[t]).start,n=l.count,l=e,n=e+n;l<n;l+=3)for(e=0;3>e;e++)p=u.getX(l+e),d=u.getX(l+(e+1)%3),o[0]=Math.min(p,d),o[1]=Math.max(p,d),void 0===s[p=o[0]+","+o[1]]&&(s[p]={index1:o[0],index2:o[1]});for(p in s)l=s[p],c.fromBufferAttribute(h,l.index1),a.push(c.x,c.y,c.z),c.fromBufferAttribute(h,l.index2),a.push(c.x,c.y,c.z)}else for(l=0,n=(h=t.attributes.position).count/3;l<n;l++)for(e=0;3>e;e++)s=3*l+e,c.fromBufferAttribute(h,s),a.push(c.x,c.y,c.z),s=3*l+(e+1)%3,c.fromBufferAttribute(h,s),a.push(c.x,c.y,c.z);this.addAttribute("position",new N(a,3))}function qe(t,e,n){T.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n},this.fromBufferGeometry(new Xe(t,e,n)),this.mergeVertices()}function Xe(t,e,n){G.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:n};var i,a,o=[],s=[],c=[],h=[],l=new r,u=new r,p=new r,d=new r,f=new r;3>t.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var m=e+1;for(i=0;i<=n;i++){var g=i/n;for(a=0;a<=e;a++){var v=a/e;t(v,g,u),s.push(u.x,u.y,u.z),0<=v-1e-5?(t(v-1e-5,g,p),d.subVectors(u,p)):(t(v+1e-5,g,p),d.subVectors(p,u)),0<=g-1e-5?(t(v,g-1e-5,p),f.subVectors(u,p)):(t(v,g+1e-5,p),f.subVectors(p,u)),l.crossVectors(d,f).normalize(),c.push(l.x,l.y,l.z),h.push(v,g)}}for(i=0;i<n;i++)for(a=0;a<e;a++)t=i*m+a+1,l=(i+1)*m+a+1,u=(i+1)*m+a,o.push(i*m+a,t,u),o.push(t,l,u);this.setIndex(o),this.addAttribute("position",new N(s,3)),this.addAttribute("normal",new N(c,3)),this.addAttribute("uv",new N(h,2))}function Ye(t,e,n,i){T.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:i},this.fromBufferGeometry(new Je(t,e,n,i)),this.mergeVertices()}function Je(t,e,i,a){function o(t){h.push(t.x,t.y,t.z)}function s(e,n){e*=3,n.x=t[e+0],n.y=t[e+1],n.z=t[e+2]}function c(t,e,n,i){0>i&&1===t.x&&(l[e]=t.x-1),0===n.x&&0===n.z&&(l[e]=i/2/Math.PI+.5)}G.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:a},i=i||1;var h=[],l=[];!function(t){for(var n=new r,i=new r,a=new r,c=0;c<e.length;c+=3){s(e[c+0],n),s(e[c+1],i),s(e[c+2],a);var h,l,u=n,p=i,d=a,f=Math.pow(2,t),m=[];for(l=0;l<=f;l++){m[l]=[];var g=u.clone().lerp(d,l/f),v=p.clone().lerp(d,l/f),y=f-l;for(h=0;h<=y;h++)m[l][h]=0===h&&l===f?g:g.clone().lerp(v,h/y)}for(l=0;l<f;l++)for(h=0;h<2*(f-l)-1;h++)u=Math.floor(h/2),0==h%2?(o(m[l][u+1]),o(m[l+1][u]),o(m[l][u])):(o(m[l][u+1]),o(m[l+1][u+1]),o(m[l+1][u]))}}(a=a||0),function(t){for(var e=new r,n=0;n<h.length;n+=3)e.x=h[n+0],e.y=h[n+1],e.z=h[n+2],e.normalize().multiplyScalar(t),h[n+0]=e.x,h[n+1]=e.y,h[n+2]=e.z}(i),function(){for(var t=new r,e=0;e<h.length;e+=3)t.x=h[e+0],t.y=h[e+1],t.z=h[e+2],l.push(Math.atan2(t.z,-t.x)/2/Math.PI+.5,1-(Math.atan2(-t.y,Math.sqrt(t.x*t.x+t.z*t.z))/Math.PI+.5));t=new r,e=new r;for(var i=new r,a=new r,o=new n,s=new n,u=new n,p=0,d=0;p<h.length;p+=9,d+=6){t.set(h[p+0],h[p+1],h[p+2]),e.set(h[p+3],h[p+4],h[p+5]),i.set(h[p+6],h[p+7],h[p+8]),o.set(l[d+0],l[d+1]),s.set(l[d+2],l[d+3]),u.set(l[d+4],l[d+5]),a.copy(t).add(e).add(i).divideScalar(3);var f=Math.atan2(a.z,-a.x);c(o,d+0,t,f),c(s,d+2,e,f),c(u,d+4,i,f)}for(t=0;t<l.length;t+=6)e=l[t+0],i=l[t+2],a=l[t+4],o=Math.min(e,i,a),.9<Math.max(e,i,a)&&.1>o&&(.2>e&&(l[t+0]+=1),.2>i&&(l[t+2]+=1),.2>a&&(l[t+4]+=1))}(),this.addAttribute("position",new N(h,3)),this.addAttribute("normal",new N(h.slice(),3)),this.addAttribute("uv",new N(l,2)),0===a?this.computeVertexNormals():this.normalizeNormals()}function Ze(t,e){T.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new Qe(t,e)),this.mergeVertices()}function Qe(t,e){Je.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],t,e),this.type="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Ke(t,e){T.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new $e(t,e)),this.mergeVertices()}function $e(t,e){Je.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],t,e),this.type="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function tn(t,e){T.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new en(t,e)),this.mergeVertices()}function en(t,e){var n=(1+Math.sqrt(5))/2;Je.call(this,[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],t,e),this.type="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function nn(t,e){T.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new rn(t,e)),this.mergeVertices()}function rn(t,e){var n=(1+Math.sqrt(5))/2,i=1/n;Je.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-i,-n,0,-i,n,0,i,-n,0,i,n,-i,-n,0,-i,n,0,i,-n,0,i,n,0,-n,0,-i,n,0,-i,-n,0,i,n,0,i],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],t,e),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function an(t,e,n,i,r,a){T.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:i,closed:r},void 0!==a&&console.warn("THREE.TubeGeometry: taper has been removed."),t=new on(t,e,n,i,r),this.tangents=t.tangents,this.normals=t.normals,this.binormals=t.binormals,this.fromBufferGeometry(t),this.mergeVertices()}function on(t,e,i,a,o){function s(n){f=t.getPointAt(n/e,f);var r=c.normals[n];for(n=c.binormals[n],l=0;l<=a;l++){var o=l/a*Math.PI*2,s=Math.sin(o);o=-Math.cos(o),p.x=o*r.x+s*n.x,p.y=o*r.y+s*n.y,p.z=o*r.z+s*n.z,p.normalize(),g.push(p.x,p.y,p.z),u.x=f.x+i*p.x,u.y=f.y+i*p.y,u.z=f.z+i*p.z,m.push(u.x,u.y,u.z)}}G.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:a,closed:o},e=e||64,i=i||1,a=a||8,o=o||!1;var c=t.computeFrenetFrames(e,o);this.tangents=c.tangents,this.normals=c.normals,this.binormals=c.binormals;var h,l,u=new r,p=new r,d=new n,f=new r,m=[],g=[],v=[],y=[];for(h=0;h<e;h++)s(h);for(s(!1===o?e:0),h=0;h<=e;h++)for(l=0;l<=a;l++)d.x=h/e,d.y=l/a,v.push(d.x,d.y);!function(){for(l=1;l<=e;l++)for(h=1;h<=a;h++){var t=(a+1)*l+(h-1),n=(a+1)*l+h,i=(a+1)*(l-1)+h;y.push((a+1)*(l-1)+(h-1),t,i),y.push(t,n,i)}}(),this.setIndex(y),this.addAttribute("position",new N(m,3)),this.addAttribute("normal",new N(g,3)),this.addAttribute("uv",new N(v,2))}function sn(t,e,n,i,r,a,o){T.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:i,p:r,q:a},void 0!==o&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new cn(t,e,n,i,r,a)),this.mergeVertices()}function cn(t,e,n,i,a,o){function s(t,e,n,i,r){var a=Math.sin(t);e=n/e*t,n=Math.cos(e),r.x=i*(2+n)*.5*Math.cos(t),r.y=i*(2+n)*a*.5,r.z=i*Math.sin(e)*.5}G.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:i,p:a,q:o},t=t||1,e=e||.4,n=Math.floor(n)||64,i=Math.floor(i)||8,a=a||2,o=o||3;var c,h=[],l=[],u=[],p=[],d=new r,f=new r,m=new r,g=new r,v=new r,y=new r,x=new r;for(c=0;c<=n;++c){var b=c/n*a*Math.PI*2;for(s(b,a,o,t,m),s(b+.01,a,o,t,g),y.subVectors(g,m),x.addVectors(g,m),v.crossVectors(y,x),x.crossVectors(v,y),v.normalize(),x.normalize(),b=0;b<=i;++b){var w=b/i*Math.PI*2,_=-e*Math.cos(w);w=e*Math.sin(w),d.x=m.x+(_*x.x+w*v.x),d.y=m.y+(_*x.y+w*v.y),d.z=m.z+(_*x.z+w*v.z),l.push(d.x,d.y,d.z),f.subVectors(d,m).normalize(),u.push(f.x,f.y,f.z),p.push(c/n),p.push(b/i)}}for(b=1;b<=n;b++)for(c=1;c<=i;c++)t=(i+1)*b+(c-1),e=(i+1)*b+c,a=(i+1)*(b-1)+c,h.push((i+1)*(b-1)+(c-1),t,a),h.push(t,e,a);this.setIndex(h),this.addAttribute("position",new N(l,3)),this.addAttribute("normal",new N(u,3)),this.addAttribute("uv",new N(p,2))}function hn(t,e,n,i,r){T.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:i,arc:r},this.fromBufferGeometry(new ln(t,e,n,i,r)),this.mergeVertices()}function ln(t,e,n,i,a){G.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:i,arc:a},t=t||1,e=e||.4,n=Math.floor(n)||8,i=Math.floor(i)||6,a=a||2*Math.PI;var o,s,c=[],h=[],l=[],u=[],p=new r,d=new r,f=new r;for(o=0;o<=n;o++)for(s=0;s<=i;s++){var m=s/i*a,g=o/n*Math.PI*2;d.x=(t+e*Math.cos(g))*Math.cos(m),d.y=(t+e*Math.cos(g))*Math.sin(m),d.z=e*Math.sin(g),h.push(d.x,d.y,d.z),p.x=t*Math.cos(m),p.y=t*Math.sin(m),f.subVectors(d,p).normalize(),l.push(f.x,f.y,f.z),u.push(s/i),u.push(o/n)}for(o=1;o<=n;o++)for(s=1;s<=i;s++)t=(i+1)*(o-1)+s-1,e=(i+1)*(o-1)+s,a=(i+1)*o+s,c.push((i+1)*o+s-1,t,a),c.push(t,e,a);this.setIndex(c),this.addAttribute("position",new N(h,3)),this.addAttribute("normal",new N(l,3)),this.addAttribute("uv",new N(u,2))}function un(t,e,n,i,r){for(var a,o=0,s=e,c=n-i;s<n;s+=i)o+=(t[c]-t[s])*(t[s+1]+t[c+1]),c=s;if(r===0<o)for(r=e;r<n;r+=i)a=Mn(r,t[r],t[r+1],a);else for(r=n-i;r>=e;r-=i)a=Mn(r,t[r],t[r+1],a);return a&&xn(a,a.next)&&(En(a),a=a.next),a}function pn(t,e){if(!t)return t;e||(e=t);do{var n=!1;if(t.steiner||!xn(t,t.next)&&0!==yn(t.prev,t,t.next))t=t.next;else{if(En(t),(t=e=t.prev)===t.next)break;n=!0}}while(n||t!==e);return e}function dn(t,e){return t.x-e.x}function fn(t,e){var n=e,i=t.x,r=t.y,a=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var o=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(o<=i&&o>a){if(a=o,o===i){if(r===n.y)return n;if(r===n.next.y)return n.next}var s=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!s)return null;if(i===a)return s.prev;e=s,o=s.x;var c=s.y,h=1/0;for(n=s.next;n!==e;){if(i>=n.x&&n.x>=o&&i!==n.x&&vn(r<c?i:a,r,o,c,r<c?a:i,r,n.x,n.y)){var l=Math.abs(r-n.y)/(i-n.x);(l<h||l===h&&n.x>s.x)&&wn(n,t)&&(s=n,h=l)}n=n.next}return s}function mn(t,e,n,i,r){return 1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1)|(1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function gn(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function vn(t,e,n,i,r,a,o,s){return 0<=(r-o)*(e-s)-(t-o)*(a-s)&&0<=(t-o)*(i-s)-(n-o)*(e-s)&&0<=(n-o)*(a-s)-(r-o)*(i-s)}function yn(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function xn(t,e){return t.x===e.x&&t.y===e.y}function bn(t,e,n,i){return!!(xn(t,e)&&xn(n,i)||xn(t,i)&&xn(n,e))||0<yn(t,e,n)!=0<yn(t,e,i)&&0<yn(n,i,t)!=0<yn(n,i,e)}function wn(t,e){return 0>yn(t.prev,t,t.next)?0<=yn(t,e,t.next)&&0<=yn(t,t.prev,e):0>yn(t,e,t.prev)||0>yn(t,t.next,e)}function _n(t,e){var n=new Sn(t.i,t.x,t.y),i=new Sn(e.i,e.x,e.y),r=t.next,a=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,a.next=i,i.prev=a,i}function Mn(t,e,n,i){return t=new Sn(t,e,n),i?(t.next=i.next,t.prev=i,i.next.prev=t,i.next=t):(t.prev=t,t.next=t),t}function En(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Sn(t,e,n){this.i=t,this.x=e,this.y=n,this.nextZ=this.prevZ=this.z=this.next=this.prev=null,this.steiner=!1}function Tn(t){var e=t.length;2<e&&t[e-1].equals(t[0])&&t.pop()}function An(t,e){for(var n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}function Ln(t,e){T.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new Rn(t,e)),this.mergeVertices()}function Rn(t,e){function i(t){function i(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}function c(t,e,i){var r=t.x-e.x,a=t.y-e.y,o=i.x-t.x,s=i.y-t.y,c=r*r+a*a;if(Math.abs(r*s-a*o)>Number.EPSILON){var h=Math.sqrt(c),l=Math.sqrt(o*o+s*s);if(c=e.x-a/h,e=e.y+r/h,2>=(a=(o=c+r*(s=((i.x-s/l-c)*s-(i.y+o/l-e)*o)/(r*s-a*o))-t.x)*o+(r=e+a*s-t.y)*r))return new n(o,r);a=Math.sqrt(a/2)}else t=!1,r>Number.EPSILON?o>Number.EPSILON&&(t=!0):r<-Number.EPSILON?o<-Number.EPSILON&&(t=!0):Math.sign(a)===Math.sign(s)&&(t=!0),t?(o=-a,a=Math.sqrt(c)):(o=r,r=a,a=Math.sqrt(c/2));return new n(o/a,r/a)}function h(t,e){for(H=t.length;0<=--H;){var n=H,i=H-1;0>i&&(i=t.length-1);var r,s=g+2*_;for(r=0;r<s;r++){var c=G*r,h=G*(r+1),l=e+i+c,u=e+i+h;h=e+n+h,p(e+n+c),p(l),p(h),p(l),p(u),p(h),c=o.length/3,d((c=E.generateSideWallUV(a,o,c-6,c-3,c-2,c-1))[0]),d(c[1]),d(c[3]),d(c[1]),d(c[2]),d(c[3])}}}function l(t,e,n){f.push(t),f.push(e),f.push(n)}function u(t,e,n){p(t),p(e),p(n),t=o.length/3,d((t=E.generateTopUV(a,o,t-3,t-2,t-1))[0]),d(t[1]),d(t[2])}function p(t){o.push(f[3*t]),o.push(f[3*t+1]),o.push(f[3*t+2])}function d(t){s.push(t.x),s.push(t.y)}var f=[],m=void 0!==e.curveSegments?e.curveSegments:12,g=void 0!==e.steps?e.steps:1,v=void 0!==e.depth?e.depth:100,y=void 0===e.bevelEnabled||e.bevelEnabled,x=void 0!==e.bevelThickness?e.bevelThickness:6,b=void 0!==e.bevelSize?e.bevelSize:x-2,w=void 0!==e.bevelOffset?e.bevelOffset:0,_=void 0!==e.bevelSegments?e.bevelSegments:3,M=e.extrudePath,E=void 0!==e.UVGenerator?e.UVGenerator:Ua;void 0!==e.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),v=e.amount);var S,T=!1;if(M){var A=M.getSpacedPoints(g);T=!0,y=!1;var L=M.computeFrenetFrames(g,!1),R=new r,P=new r,C=new r}y||(w=b=x=_=0),m=t.extractPoints(m),t=m.shape;var O=m.holes;if(!za.isClockWise(t)){t=t.reverse();var I=0;for(S=O.length;I<S;I++){var D=O[I];za.isClockWise(D)&&(O[I]=D.reverse())}}var N=za.triangulateShape(t,O),B=t;for(I=0,S=O.length;I<S;I++)D=O[I],t=t.concat(D);var z,U,G=t.length,F=N.length;m=[];var H=0,k=B.length,V=k-1;for(z=H+1;H<k;H++,V++,z++)V===k&&(V=0),z===k&&(z=0),m[H]=c(B[H],B[V],B[z]);M=[];var j=m.concat();for(I=0,S=O.length;I<S;I++){D=O[I];var W=[];for(H=0,V=(k=D.length)-1,z=H+1;H<k;H++,V++,z++)V===k&&(V=0),z===k&&(z=0),W[H]=c(D[H],D[V],D[z]);M.push(W),j=j.concat(W)}for(V=0;V<_;V++){k=V/_;var q=x*Math.cos(k*Math.PI/2);for(z=b*Math.sin(k*Math.PI/2)+w,H=0,k=B.length;H<k;H++){var X=i(B[H],m[H],z);l(X.x,X.y,-q)}for(I=0,S=O.length;I<S;I++)for(D=O[I],W=M[I],H=0,k=D.length;H<k;H++)l((X=i(D[H],W[H],z)).x,X.y,-q)}for(z=b+w,H=0;H<G;H++)X=y?i(t[H],j[H],z):t[H],T?(P.copy(L.normals[0]).multiplyScalar(X.x),R.copy(L.binormals[0]).multiplyScalar(X.y),C.copy(A[0]).add(P).add(R),l(C.x,C.y,C.z)):l(X.x,X.y,0);for(k=1;k<=g;k++)for(H=0;H<G;H++)X=y?i(t[H],j[H],z):t[H],T?(P.copy(L.normals[k]).multiplyScalar(X.x),R.copy(L.binormals[k]).multiplyScalar(X.y),C.copy(A[k]).add(P).add(R),l(C.x,C.y,C.z)):l(X.x,X.y,v/g*k);for(V=_-1;0<=V;V--){for(k=V/_,q=x*Math.cos(k*Math.PI/2),z=b*Math.sin(k*Math.PI/2)+w,H=0,k=B.length;H<k;H++)l((X=i(B[H],m[H],z)).x,X.y,v+q);for(I=0,S=O.length;I<S;I++)for(D=O[I],W=M[I],H=0,k=D.length;H<k;H++)X=i(D[H],W[H],z),T?l(X.x,X.y+A[g-1].y,A[g-1].x+q):l(X.x,X.y,v+q)}!function(){var t=o.length/3;if(y){var e=0*G;for(H=0;H<F;H++)u((U=N[H])[2]+e,U[1]+e,U[0]+e);for(e=G*(g+2*_),H=0;H<F;H++)u((U=N[H])[0]+e,U[1]+e,U[2]+e)}else{for(H=0;H<F;H++)u((U=N[H])[2],U[1],U[0]);for(H=0;H<F;H++)u((U=N[H])[0]+G*g,U[1]+G*g,U[2]+G*g)}a.addGroup(t,o.length/3-t,0)}(),function(){var t=o.length/3,e=0;for(h(B,e),e+=B.length,I=0,S=O.length;I<S;I++)h(D=O[I],e),e+=D.length;a.addGroup(t,o.length/3-t,1)}()}G.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e},t=Array.isArray(t)?t:[t];for(var a=this,o=[],s=[],c=0,h=t.length;c<h;c++)i(t[c]);this.addAttribute("position",new N(o,3)),this.addAttribute("uv",new N(s,2)),this.computeVertexNormals()}function Pn(t,e,n){if(n.shapes=[],Array.isArray(t))for(var i=0,r=t.length;i<r;i++)n.shapes.push(t[i].uuid);else n.shapes.push(t.uuid);return void 0!==e.extrudePath&&(n.options.extrudePath=e.extrudePath.toJSON()),n}function Cn(t,e){T.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new On(t,e)),this.mergeVertices()}function On(t,e){var n=(e=e||{}).font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new T;t=n.generateShapes(t,e.size),e.depth=void 0!==e.height?e.height:50,void 0===e.bevelThickness&&(e.bevelThickness=10),void 0===e.bevelSize&&(e.bevelSize=8),void 0===e.bevelEnabled&&(e.bevelEnabled=!1),Rn.call(this,t,e),this.type="TextBufferGeometry"}function In(t,e,n,i,r,a,o){T.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:i,phiLength:r,thetaStart:a,thetaLength:o},this.fromBufferGeometry(new Dn(t,e,n,i,r,a,o)),this.mergeVertices()}function Dn(t,e,n,i,a,o,s){G.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:i,phiLength:a,thetaStart:o,thetaLength:s},t=t||1,e=Math.max(3,Math.floor(e)||8),n=Math.max(2,Math.floor(n)||6),i=void 0!==i?i:0,a=void 0!==a?a:2*Math.PI;var c,h,l=(o=void 0!==o?o:0)+(s=void 0!==s?s:Math.PI),u=0,p=[],d=new r,f=new r,m=[],g=[],v=[],y=[];for(h=0;h<=n;h++){var x=[],b=h/n,w=0==h?.5/e:h==n?-.5/e:0;for(c=0;c<=e;c++){var _=c/e;d.x=-t*Math.cos(i+_*a)*Math.sin(o+b*s),d.y=t*Math.cos(o+b*s),d.z=t*Math.sin(i+_*a)*Math.sin(o+b*s),g.push(d.x,d.y,d.z),f.copy(d).normalize(),v.push(f.x,f.y,f.z),y.push(_+w,1-b),x.push(u++)}p.push(x)}for(h=0;h<n;h++)for(c=0;c<e;c++)t=p[h][c+1],i=p[h][c],a=p[h+1][c],s=p[h+1][c+1],(0!==h||0<o)&&m.push(t,i,s),(h!==n-1||l<Math.PI)&&m.push(i,a,s);this.setIndex(m),this.addAttribute("position",new N(g,3)),this.addAttribute("normal",new N(v,3)),this.addAttribute("uv",new N(y,2))}function Nn(t,e,n,i,r,a){T.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:i,thetaStart:r,thetaLength:a},this.fromBufferGeometry(new Bn(t,e,n,i,r,a)),this.mergeVertices()}function Bn(t,e,i,a,o,s){G.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:a,thetaStart:o,thetaLength:s},t=t||.5,e=e||1,o=void 0!==o?o:0,s=void 0!==s?s:2*Math.PI,i=void 0!==i?Math.max(3,i):8;var c,h,l=[],u=[],p=[],d=[],f=t,m=(e-t)/(a=void 0!==a?Math.max(1,a):1),g=new r,v=new n;for(c=0;c<=a;c++){for(h=0;h<=i;h++)t=o+h/i*s,g.x=f*Math.cos(t),g.y=f*Math.sin(t),u.push(g.x,g.y,g.z),p.push(0,0,1),v.x=(g.x/e+1)/2,v.y=(g.y/e+1)/2,d.push(v.x,v.y);f+=m}for(c=0;c<a;c++)for(e=c*(i+1),h=0;h<i;h++)o=(t=h+e)+i+1,s=t+i+2,f=t+1,l.push(t,o,f),l.push(o,s,f);this.setIndex(l),this.addAttribute("position",new N(u,3)),this.addAttribute("normal",new N(p,3)),this.addAttribute("uv",new N(d,2))}function zn(t,e,n,i){T.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:i},this.fromBufferGeometry(new Un(t,e,n,i)),this.mergeVertices()}function Un(t,e,i,a){G.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:a},e=Math.floor(e)||12,i=i||0,a=a||2*Math.PI,a=ca.clamp(a,0,2*Math.PI);var o,s=[],c=[],h=[],l=1/e,u=new r,p=new n;for(o=0;o<=e;o++){var d=i+o*l*a,f=Math.sin(d),m=Math.cos(d);for(d=0;d<=t.length-1;d++)u.x=t[d].x*f,u.y=t[d].y,u.z=t[d].x*m,c.push(u.x,u.y,u.z),p.x=o/e,p.y=d/(t.length-1),h.push(p.x,p.y)}for(o=0;o<e;o++)for(d=0;d<t.length-1;d++)l=(i=d+o*t.length)+t.length,u=i+t.length+1,p=i+1,s.push(i,l,p),s.push(l,u,p);if(this.setIndex(s),this.addAttribute("position",new N(c,3)),this.addAttribute("uv",new N(h,2)),this.computeVertexNormals(),a===2*Math.PI)for(a=this.attributes.normal.array,s=new r,c=new r,h=new r,i=e*t.length*3,d=o=0;o<t.length;o++,d+=3)s.x=a[d+0],s.y=a[d+1],s.z=a[d+2],c.x=a[i+d+0],c.y=a[i+d+1],c.z=a[i+d+2],h.addVectors(s,c).normalize(),a[d+0]=a[i+d+0]=h.x,a[d+1]=a[i+d+1]=h.y,a[d+2]=a[i+d+2]=h.z}function Gn(t,e){T.call(this),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new Fn(t,e)),this.mergeVertices()}function Fn(t,e){function n(t){var n,s=r.length/3,h=(t=t.extractPoints(e)).shape,l=t.holes;for(!1===za.isClockWise(h)&&(h=h.reverse()),t=0,n=l.length;t<n;t++){var u=l[t];!0===za.isClockWise(u)&&(l[t]=u.reverse())}var p=za.triangulateShape(h,l);for(t=0,n=l.length;t<n;t++)u=l[t],h=h.concat(u);for(t=0,n=h.length;t<n;t++)u=h[t],r.push(u.x,u.y,0),a.push(0,0,1),o.push(u.x,u.y);for(t=0,n=p.length;t<n;t++)h=p[t],i.push(h[0]+s,h[1]+s,h[2]+s),c+=3}G.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var i=[],r=[],a=[],o=[],s=0,c=0;if(!1===Array.isArray(t))n(t);else for(var h=0;h<t.length;h++)n(t[h]),this.addGroup(s,c,h),s+=c,c=0;this.setIndex(i),this.addAttribute("position",new N(r,3)),this.addAttribute("normal",new N(a,3)),this.addAttribute("uv",new N(o,2))}function Hn(t,e){if(e.shapes=[],Array.isArray(t))for(var n=0,i=t.length;n<i;n++)e.shapes.push(t[n].uuid);else e.shapes.push(t.uuid);return e}function kn(t,e){G.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e};var n=[];e=Math.cos(ca.DEG2RAD*(void 0!==e?e:1));var i=[0,0],r={},a=["a","b","c"];if(t.isBufferGeometry){var o=new T;o.fromBufferGeometry(t)}else o=t.clone();o.mergeVertices(),o.computeFaceNormals(),t=o.vertices;for(var s=0,c=(o=o.faces).length;s<c;s++)for(var h=o[s],l=0;3>l;l++){var u=h[a[l]],p=h[a[(l+1)%3]];i[0]=Math.min(u,p),i[1]=Math.max(u,p),void 0===r[u=i[0]+","+i[1]]?r[u]={index1:i[0],index2:i[1],face1:s,face2:void 0}:r[u].face2=s}for(u in r)(void 0===(i=r[u]).face2||o[i.face1].normal.dot(o[i.face2].normal)<=e)&&(a=t[i.index1],n.push(a.x,a.y,a.z),a=t[i.index2],n.push(a.x,a.y,a.z));this.addAttribute("position",new N(n,3))}function Vn(t,e,n,i,r,a,o,s){T.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:i,heightSegments:r,openEnded:a,thetaStart:o,thetaLength:s},this.fromBufferGeometry(new jn(t,e,n,i,r,a,o,s)),this.mergeVertices()}function jn(t,e,i,a,o,s,c,h){function l(i){var o,s=new n,l=new r,v=0,b=!0===i?t:e,w=!0===i?1:-1,_=g;for(o=1;o<=a;o++)d.push(0,y*w,0),f.push(0,w,0),m.push(.5,.5),g++;var M=g;for(o=0;o<=a;o++){var E=o/a*h+c,S=Math.cos(E);E=Math.sin(E),l.x=b*E,l.y=y*w,l.z=b*S,d.push(l.x,l.y,l.z),f.push(0,w,0),s.x=.5*S+.5,s.y=.5*E*w+.5,m.push(s.x,s.y),g++}for(o=0;o<a;o++)s=_+o,l=M+o,!0===i?p.push(l,l+1,s):p.push(l+1,l,s),v+=3;u.addGroup(x,v,!0===i?1:2),x+=v}G.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:a,heightSegments:o,openEnded:s,thetaStart:c,thetaLength:h};var u=this;t=void 0!==t?t:1,e=void 0!==e?e:1,i=i||1,a=Math.floor(a)||8,o=Math.floor(o)||1,s=void 0!==s&&s,c=void 0!==c?c:0,h=void 0!==h?h:2*Math.PI;var p=[],d=[],f=[],m=[],g=0,v=[],y=i/2,x=0;!function(){var n,s,l=new r,b=new r,w=0,_=(e-t)/i;for(s=0;s<=o;s++){var M=[],E=s/o,S=E*(e-t)+t;for(n=0;n<=a;n++){var T=n/a,A=T*h+c,L=Math.sin(A);A=Math.cos(A),b.x=S*L,b.y=-E*i+y,b.z=S*A,d.push(b.x,b.y,b.z),l.set(L,_,A).normalize(),f.push(l.x,l.y,l.z),m.push(T,1-E),M.push(g++)}v.push(M)}for(n=0;n<a;n++)for(s=0;s<o;s++)l=v[s+1][n],b=v[s+1][n+1],_=v[s][n+1],p.push(v[s][n],l,_),p.push(l,b,_),w+=6;u.addGroup(x,w,0),x+=w}(),!1===s&&(0<t&&l(!0),0<e&&l(!1)),this.setIndex(p),this.addAttribute("position",new N(d,3)),this.addAttribute("normal",new N(f,3)),this.addAttribute("uv",new N(m,2))}function Wn(t,e,n,i,r,a,o){Vn.call(this,0,t,e,n,i,r,a,o),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:i,openEnded:r,thetaStart:a,thetaLength:o}}function qn(t,e,n,i,r,a,o){jn.call(this,0,t,e,n,i,r,a,o),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:i,openEnded:r,thetaStart:a,thetaLength:o}}function Xn(t,e,n,i){T.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:i},this.fromBufferGeometry(new Yn(t,e,n,i)),this.mergeVertices()}function Yn(t,e,i,a){G.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:a},t=t||1,e=void 0!==e?Math.max(3,e):8,i=void 0!==i?i:0,a=void 0!==a?a:2*Math.PI;var o,s=[],c=[],h=[],l=[],u=new r,p=new n;c.push(0,0,0),h.push(0,0,1),l.push(.5,.5);var d=0;for(o=3;d<=e;d++,o+=3){var f=i+d/e*a;u.x=t*Math.cos(f),u.y=t*Math.sin(f),c.push(u.x,u.y,u.z),h.push(0,0,1),p.x=(c[o]/t+1)/2,p.y=(c[o+1]/t+1)/2,l.push(p.x,p.y)}for(o=1;o<=e;o++)s.push(o,o+1,0);this.setIndex(s),this.addAttribute("position",new N(c,3)),this.addAttribute("normal",new N(h,3)),this.addAttribute("uv",new N(l,2))}function Jn(t){j.call(this),this.type="ShadowMaterial",this.color=new x(0),this.transparent=!0,this.setValues(t)}function Zn(t){W.call(this,t),this.type="RawShaderMaterial"}function Qn(t){j.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new x(16777215),this.metalness=this.roughness=.5,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new x(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new n(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function Kn(t){Qn.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoatRoughness=this.clearCoat=0,this.setValues(t)}function $n(t){j.call(this),this.type="MeshPhongMaterial",this.color=new x(16777215),this.specular=new x(1118481),this.shininess=30,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new x(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new n(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.envMap=this.alphaMap=this.specularMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function ti(t){$n.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function ei(t){j.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new n(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.morphNormals=this.morphTargets=this.skinning=this.lights=this.fog=!1,this.setValues(t)}function ni(t){j.call(this),this.type="MeshLambertMaterial",this.color=new x(16777215),this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new x(0),this.emissiveIntensity=1,this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function ii(t){j.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new x(16777215),this.bumpMap=this.map=this.matcap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new n(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.lights=this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function ri(t){Ne.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}function ai(t,e,n,i){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==i?i:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function oi(t,e,n,i){ai.call(this,t,e,n,i),this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function si(t,e,n,i){ai.call(this,t,e,n,i)}function ci(t,e,n,i){ai.call(this,t,e,n,i)}function hi(t,e,n,i){if(void 0===t)throw Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ha.convertArray(e,this.TimeBufferType),this.values=Ha.convertArray(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}function li(t,e,n){hi.call(this,t,e,n)}function ui(t,e,n,i){hi.call(this,t,e,n,i)}function pi(t,e,n,i){hi.call(this,t,e,n,i)}function di(t,e,n,i){ai.call(this,t,e,n,i)}function fi(t,e,n,i){hi.call(this,t,e,n,i)}function mi(t,e,n,i){hi.call(this,t,e,n,i)}function gi(t,e,n,i){hi.call(this,t,e,n,i)}function vi(t,e,n){this.name=t,this.tracks=n,this.duration=void 0!==e?e:-1,this.uuid=ca.generateUUID(),0>this.duration&&this.resetDuration()}function yi(t){if(void 0===t.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return pi;case"vector":case"vector2":case"vector3":case"vector4":return gi;case"color":return ui;case"quaternion":return fi;case"bool":case"boolean":return li;case"string":return mi}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}(t.type);if(void 0===t.times){var n=[],i=[];Ha.flattenJSON(t.keys,n,i,"value"),t.times=n,t.values=i}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)}function xi(t,e,n){var i=this,r=!1,a=0,o=0,s=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){o++,!1===r&&void 0!==i.onStart&&i.onStart(t,a,o),r=!0},this.itemEnd=function(t){a++,void 0!==i.onProgress&&i.onProgress(t,a,o),a===o&&(r=!1,void 0!==i.onLoad)&&i.onLoad()},this.itemError=function(t){void 0!==i.onError&&i.onError(t)},this.resolveURL=function(t){return s?s(t):t},this.setURLModifier=function(t){return s=t,this}}function bi(t){this.manager=void 0!==t?t:Va}function wi(t){this.manager=void 0!==t?t:Va}function _i(t){this.manager=void 0!==t?t:Va,this._parser=null}function Mi(t){this.manager=void 0!==t?t:Va,this._parser=null}function Ei(t){this.manager=void 0!==t?t:Va}function Si(t){this.manager=void 0!==t?t:Va}function Ti(t){this.manager=void 0!==t?t:Va}function Ai(){this.type="Curve",this.arcLengthDivisions=200}function Li(t,e,n,i,r,a,o,s){Ai.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=n||1,this.yRadius=i||1,this.aStartAngle=r||0,this.aEndAngle=a||2*Math.PI,this.aClockwise=o||!1,this.aRotation=s||0}function Ri(t,e,n,i,r,a){Li.call(this,t,e,n,n,i,r,a),this.type="ArcCurve"}function Pi(){var t=0,e=0,n=0,i=0;return{initCatmullRom:function(r,a,o,s,c){t=a,e=r=c*(o-r),n=-3*a+3*o-2*r-(s=c*(s-a)),i=2*a-2*o+r+s},initNonuniformCatmullRom:function(r,a,o,s,c,h,l){t=a,e=r=((a-r)/c-(o-r)/(c+h)+(o-a)/h)*h,n=-3*a+3*o-2*r-(s=((o-a)/h-(s-a)/(h+l)+(s-o)/l)*h),i=2*a-2*o+r+s},calc:function(r){var a=r*r;return t+e*r+n*a+i*a*r}}}function Ci(t,e,n,i){Ai.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=n||"centripetal",this.tension=i||.5}function Oi(t,e,n,i,r){var a=t*t;return(2*n-2*i+(e=.5*(i-e))+(r=.5*(r-n)))*t*a+(-3*n+3*i-2*e-r)*a+e*t+n}function Ii(t,e,n,i){var r=1-t;return r*r*e+2*(1-t)*t*n+t*t*i}function Di(t,e,n,i,r){var a=1-t,o=1-t;return a*a*a*e+3*o*o*t*n+3*(1-t)*t*t*i+t*t*t*r}function Ni(t,e,i,r){Ai.call(this),this.type="CubicBezierCurve",this.v0=t||new n,this.v1=e||new n,this.v2=i||new n,this.v3=r||new n}function Bi(t,e,n,i){Ai.call(this),this.type="CubicBezierCurve3",this.v0=t||new r,this.v1=e||new r,this.v2=n||new r,this.v3=i||new r}function zi(t,e){Ai.call(this),this.type="LineCurve",this.v1=t||new n,this.v2=e||new n}function Ui(t,e){Ai.call(this),this.type="LineCurve3",this.v1=t||new r,this.v2=e||new r}function Gi(t,e,i){Ai.call(this),this.type="QuadraticBezierCurve",this.v0=t||new n,this.v1=e||new n,this.v2=i||new n}function Fi(t,e,n){Ai.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new r,this.v1=e||new r,this.v2=n||new r}function Hi(t){Ai.call(this),this.type="SplineCurve",this.points=t||[]}function ki(){Ai.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function Vi(t){ki.call(this),this.type="Path",this.currentPoint=new n,t&&this.setFromPoints(t)}function ji(t){Vi.call(this,t),this.uuid=ca.generateUUID(),this.type="Shape",this.holes=[]}function Wi(t,e){S.call(this),this.type="Light",this.color=new x(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function qi(t,e,n){Wi.call(this,t,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(S.DefaultUp),this.updateMatrix(),this.groundColor=new x(e)}function Xi(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new n(512,512),this.map=null,this.matrix=new g}function Yi(){Xi.call(this,new ye(50,1,.5,500))}function Ji(t,e,n,i,r,a){Wi.call(this,t,e),this.type="SpotLight",this.position.copy(S.DefaultUp),this.updateMatrix(),this.target=new S,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==i?i:Math.PI/3,this.penumbra=void 0!==r?r:0,this.decay=void 0!==a?a:1,this.shadow=new Yi}function Zi(t,e,n,i){Wi.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==i?i:1,this.shadow=new Xi(new ye(90,1,.5,500))}function Qi(t,e,n,i,r,a){ve.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=void 0!==t?t:-1,this.right=void 0!==e?e:1,this.top=void 0!==n?n:1,this.bottom=void 0!==i?i:-1,this.near=void 0!==r?r:.1,this.far=void 0!==a?a:2e3,this.updateProjectionMatrix()}function Ki(){Xi.call(this,new Qi(-5,5,5,-5,.5,500))}function $i(t,e){Wi.call(this,t,e),this.type="DirectionalLight",this.position.copy(S.DefaultUp),this.updateMatrix(),this.target=new S,this.shadow=new Ki}function tr(t,e){Wi.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function er(t,e,n,i){Wi.call(this,t,e),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==i?i:10}function nr(t){this.manager=void 0!==t?t:Va,this.textures={}}function ir(t){this.manager=void 0!==t?t:Va}function rr(t){this.manager=void 0!==t?t:Va,this.resourcePath=""}function ar(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==t?t:Va,this.options=void 0}function or(){this.type="ShapePath",this.color=new x,this.subPaths=[],this.currentPath=null}function sr(t){this.type="Font",this.data=t}function cr(t){this.manager=void 0!==t?t:Va}function hr(){}function lr(t){this.manager=void 0!==t?t:Va}function ur(){this.coefficients=[];for(var t=0;9>t;t++)this.coefficients.push(new r)}function pr(t,e){Wi.call(this,void 0,e),this.sh=void 0!==t?t:new ur}function dr(t,e,n){pr.call(this,void 0,n),t=(new x).set(t),n=(new x).set(e),e=new r(t.r,t.g,t.b),t=new r(n.r,n.g,n.b);var i=(n=Math.sqrt(Math.PI))*Math.sqrt(.75);this.sh.coefficients[0].copy(e).add(t).multiplyScalar(n),this.sh.coefficients[1].copy(e).sub(t).multiplyScalar(i)}function fr(t,e){pr.call(this,void 0,e),t=(new x).set(t),this.sh.coefficients[0].set(t.r,t.g,t.b).multiplyScalar(2*Math.sqrt(Math.PI))}function mr(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new ye,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new ye,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function gr(t,e,n,i){S.call(this),this.type="CubeCamera";var a=new ye(90,1,t,e);a.up.set(0,-1,0),a.lookAt(new r(1,0,0)),this.add(a);var o=new ye(90,1,t,e);o.up.set(0,-1,0),o.lookAt(new r(-1,0,0)),this.add(o);var s=new ye(90,1,t,e);s.up.set(0,0,1),s.lookAt(new r(0,1,0)),this.add(s);var c=new ye(90,1,t,e);c.up.set(0,0,-1),c.lookAt(new r(0,-1,0)),this.add(c);var h=new ye(90,1,t,e);h.up.set(0,-1,0),h.lookAt(new r(0,0,1)),this.add(h);var u=new ye(90,1,t,e);u.up.set(0,-1,0),u.lookAt(new r(0,0,-1)),this.add(u),i=i||{format:1022,magFilter:1006,minFilter:1006},this.renderTarget=new l(n,n,i),this.renderTarget.texture.name="CubeCamera",this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();var n=t.getRenderTarget(),i=this.renderTarget,r=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,t.setRenderTarget(i,0),t.render(e,a),t.setRenderTarget(i,1),t.render(e,o),t.setRenderTarget(i,2),t.render(e,s),t.setRenderTarget(i,3),t.render(e,c),t.setRenderTarget(i,4),t.render(e,h),i.texture.generateMipmaps=r,t.setRenderTarget(i,5),t.render(e,u),t.setRenderTarget(n)},this.clear=function(t,e,n,i){for(var r=t.getRenderTarget(),a=this.renderTarget,o=0;6>o;o++)t.setRenderTarget(a,o),t.clear(e,n,i);t.setRenderTarget(r)}}function vr(t){this.autoStart=void 0===t||t,this.elapsedTime=this.oldTime=this.startTime=0,this.running=!1}function yr(){S.call(this),this.type="AudioListener",this.context=ro.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0}function xr(t){S.call(this),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.offset=this.startTime=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function br(t){xr.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function wr(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function _r(t,e,n){switch(this.binding=t,this.valueSize=n,t=Float64Array,e){case"quaternion":e=this._slerp;break;case"string":case"bool":t=Array,e=this._select;break;default:e=this._lerp}this.buffer=new t(4*n),this._mixBufferRegion=e,this.referenceCount=this.useCount=this.cumulativeWeight=0}function Mr(t,e,n){n=n||Er.parseTrackName(e),this._targetGroup=t,this._bindings=t.subscribe_(e,n)}function Er(t,e,n){this.path=e,this.parsedPath=n||Er.parseTrackName(e),this.node=Er.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Sr(){this.uuid=ca.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var i=this;this.stats={objects:{get total(){return i._objects.length},get inUse(){return this.total-i.nCachedObjects_}},get bindingsPerObject(){return i._bindings.length}}}function Tr(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null,e=(t=e.tracks).length,n=Array(e);for(var i={endingStart:2400,endingEnd:2400},r=0;r!==e;++r){var a=t[r].createInterpolant(null);n[r]=a,a.settings=i}this._interpolantSettings=i,this._interpolants=n,this._propertyBindings=Array(e),this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function Ar(t){this._root=t,this._initMemoryManager(),this.time=this._accuIndex=0,this.timeScale=1}function Lr(t,e){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=e),this.value=t}function Rr(){G.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Pr(t,e,n){Ae.call(this,t,e),this.meshPerAttribute=n||1}function Cr(t,e,n,i){"number"==typeof n&&(i=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),A.call(this,t,e,n),this.meshPerAttribute=i||1}function Or(t,e,n,i){this.ray=new q(t,e),this.near=n||0,this.far=i||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function Ir(t,e){return t.distance-e.distance}function Dr(t,e,n,i){if(!1!==t.visible&&(t.raycast(e,n),!0===i)){i=0;for(var r=(t=t.children).length;i<r;i++)Dr(t[i],e,n,!0)}}function Nr(t,e,n){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==n?n:0,this}function Br(t,e,n){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==n?n:0,this}function zr(t,e){this.min=void 0!==t?t:new n(1/0,1/0),this.max=void 0!==e?e:new n(-1/0,-1/0)}function Ur(t,e){this.start=void 0!==t?t:new r,this.end=void 0!==e?e:new r}function Gr(t){S.call(this),this.material=t,this.render=function(){}}function Fr(t,e,n,i){this.object=t,this.size=void 0!==e?e:1,t=void 0!==n?n:16711680,i=void 0!==i?i:1,e=0,(n=this.object.geometry)&&n.isGeometry?e=3*n.faces.length:n&&n.isBufferGeometry&&(e=n.attributes.normal.count),n=new G,e=new N(6*e,3),n.addAttribute("position",e),ze.call(this,n,new Ne({color:t,linewidth:i})),this.matrixAutoUpdate=!1,this.update()}function Hr(t,e){S.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,t=new G,e=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(var n=0,i=1;32>n;n++,i++){var r=n/32*Math.PI*2,a=i/32*Math.PI*2;e.push(Math.cos(r),Math.sin(r),1,Math.cos(a),Math.sin(a),1)}t.addAttribute("position",new N(e,3)),e=new Ne({fog:!1}),this.cone=new ze(t,e),this.add(this.cone),this.update()}function kr(t){for(var e=function t(e){var n=[];e&&e.isBone&&n.push(e);for(var i=0;i<e.children.length;i++)n.push.apply(n,t(e.children[i]));return n}(t),n=new G,i=[],r=[],a=new x(0,0,1),o=new x(0,1,0),s=0;s<e.length;s++){var c=e[s];c.parent&&c.parent.isBone&&(i.push(0,0,0),i.push(0,0,0),r.push(a.r,a.g,a.b),r.push(o.r,o.g,o.b))}n.addAttribute("position",new N(i,3)),n.addAttribute("color",new N(r,3)),i=new Ne({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0}),ze.call(this,n,i),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function Vr(t,e,n){this.light=t,this.light.updateMatrixWorld(),this.color=n,t=new Dn(e,4,2),e=new Y({wireframe:!0,fog:!1}),J.call(this,t,e),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function jr(t,e){this.type="RectAreaLightHelper",this.light=t,this.color=e,(t=new G).addAttribute("position",new N([1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],3)),t.computeBoundingSphere(),e=new Ne({fog:!1}),Be.call(this,t,e),(t=new G).addAttribute("position",new N([1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],3)),t.computeBoundingSphere(),this.add(new J(t,new Y({side:1,fog:!1}))),this.update()}function Wr(t,e,n){S.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,(t=new $e(e)).rotateY(.5*Math.PI),this.material=new Y({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=2),e=t.getAttribute("position"),e=new Float32Array(3*e.count),t.addAttribute("color",new A(e,3)),this.add(new J(t,this.material)),this.update()}function qr(t,e){this.lightProbe=t,this.size=e,t=new W({defines:{GAMMA_OUTPUT:""},uniforms:{sh:{value:this.lightProbe.sh.coefficients},intensity:{value:this.lightProbe.intensity}},vertexShader:"varying vec3 vNormal;\nvoid main() {\n\tvNormal = normalize( normalMatrix * normal );\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",fragmentShader:"#define RECIPROCAL_PI 0.318309886\nvec3 inverseTransformDirection( in vec3 normal, in mat4 matrix ) {\n\t// matrix is assumed to be orthogonal\n\treturn normalize( ( vec4( normal, 0.0 ) * matrix ).xyz );\n}\nvec3 linearToOutput( in vec3 a ) {\n\t#ifdef GAMMA_OUTPUT\n\t\treturn pow( a, vec3( 1.0 / float( GAMMA_FACTOR ) ) );\n\t#else\n\t\treturn a;\n\t#endif\n}\n// source: https://graphics.stanford.edu/papers/envmap/envmap.pdf\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\t// normal is assumed to have unit length\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\t// band 0\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\t// band 1\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\t// band 2\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nuniform vec3 sh[ 9 ]; // sh coefficients\nuniform float intensity; // light probe intensity\nvarying vec3 vNormal;\nvoid main() {\n\tvec3 normal = normalize( vNormal );\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, sh );\n\tvec3 outgoingLight = RECIPROCAL_PI * irradiance * intensity;\n\toutgoingLight = linearToOutput( outgoingLight );\n\tgl_FragColor = vec4( outgoingLight, 1.0 );\n}"}),e=new Dn(1,32,16),J.call(this,e,t),this.onBeforeRender()}function Xr(t,e,n,i){t=t||10,e=e||10,n=new x(void 0!==n?n:4473924),i=new x(void 0!==i?i:8947848);var r=e/2,a=t/e,o=t/2;t=[];for(var s=[],c=0,h=0,l=-o;c<=e;c++,l+=a){t.push(-o,0,l,o,0,l),t.push(l,0,-o,l,0,o);var u=c===r?n:i;u.toArray(s,h),h+=3,u.toArray(s,h),h+=3,u.toArray(s,h),h+=3,u.toArray(s,h),h+=3}(e=new G).addAttribute("position",new N(t,3)),e.addAttribute("color",new N(s,3)),n=new Ne({vertexColors:2}),ze.call(this,e,n)}function Yr(t,e,n,i,r,a){t=t||10,e=e||16,n=n||8,i=i||64,r=new x(void 0!==r?r:4473924),a=new x(void 0!==a?a:8947848);var o,s=[],c=[];for(o=0;o<=e;o++){var h=o/e*2*Math.PI,l=Math.sin(h)*t;h=Math.cos(h)*t,s.push(0,0,0),s.push(l,0,h);var u=1&o?r:a;c.push(u.r,u.g,u.b),c.push(u.r,u.g,u.b)}for(o=0;o<=n;o++){u=1&o?r:a;var p=t-t/n*o;for(e=0;e<i;e++)h=e/i*2*Math.PI,l=Math.sin(h)*p,h=Math.cos(h)*p,s.push(l,0,h),c.push(u.r,u.g,u.b),h=(e+1)/i*2*Math.PI,l=Math.sin(h)*p,h=Math.cos(h)*p,s.push(l,0,h),c.push(u.r,u.g,u.b)}(t=new G).addAttribute("position",new N(s,3)),t.addAttribute("color",new N(c,3)),s=new Ne({vertexColors:2}),ze.call(this,t,s)}function Jr(t,e,n,i){this.audio=t,this.range=e||1,this.divisionsInnerAngle=n||16,this.divisionsOuterAngle=i||2,t=new G,e=new Float32Array(3*(3*(this.divisionsInnerAngle+2*this.divisionsOuterAngle)+3)),t.addAttribute("position",new A(e,3)),e=new Ne({color:65280}),n=new Ne({color:16776960}),Be.call(this,t,[n,e]),this.update()}function Zr(t,e,n,i){this.object=t,this.size=void 0!==e?e:1,t=void 0!==n?n:16776960,i=void 0!==i?i:1,e=0,(n=this.object.geometry)&&n.isGeometry?e=n.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead."),n=new G,e=new N(6*e,3),n.addAttribute("position",e),ze.call(this,n,new Ne({color:t,linewidth:i})),this.matrixAutoUpdate=!1,this.update()}function Qr(t,e,n){S.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1),(t=new G).addAttribute("position",new N([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3)),e=new Ne({fog:!1}),this.lightPlane=new Be(t,e),this.add(this.lightPlane),(t=new G).addAttribute("position",new N([0,0,0,0,0,1],3)),this.targetLine=new Be(t,e),this.add(this.targetLine),this.update()}function Kr(t){function e(t,e,i){n(t,i),n(e,i)}function n(t,e){a.push(0,0,0),o.push(e.r,e.g,e.b),void 0===s[t]&&(s[t]=[]),s[t].push(a.length/3-1)}var i=new G,r=new Ne({color:16777215,vertexColors:1}),a=[],o=[],s={},c=new x(16755200),h=new x(16711680),l=new x(43775),u=new x(16777215),p=new x(3355443);e("n1","n2",c),e("n2","n4",c),e("n4","n3",c),e("n3","n1",c),e("f1","f2",c),e("f2","f4",c),e("f4","f3",c),e("f3","f1",c),e("n1","f1",c),e("n2","f2",c),e("n3","f3",c),e("n4","f4",c),e("p","n1",h),e("p","n2",h),e("p","n3",h),e("p","n4",h),e("u1","u2",l),e("u2","u3",l),e("u3","u1",l),e("c","t",u),e("p","c",p),e("cn1","cn2",p),e("cn3","cn4",p),e("cf1","cf2",p),e("cf3","cf4",p),i.addAttribute("position",new N(a,3)),i.addAttribute("color",new N(o,3)),ze.call(this,i,r),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=s,this.update()}function $r(t,e){this.object=t,void 0===e&&(e=16776960),t=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var n=new Float32Array(24),i=new G;i.setIndex(new A(t,1)),i.addAttribute("position",new A(n,3)),ze.call(this,i,new Ne({color:e})),this.matrixAutoUpdate=!1,this.update()}function ta(t,e){this.type="Box3Helper",this.box=t,t=void 0!==e?e:16776960,e=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var n=new G;n.setIndex(new A(e,1)),n.addAttribute("position",new N([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),ze.call(this,n,new Ne({color:t})),this.geometry.computeBoundingSphere()}function ea(t,e,n){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e,t=void 0!==n?n:16776960,(e=new G).addAttribute("position",new N([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3)),e.computeBoundingSphere(),Be.call(this,e,new Ne({color:t})),(e=new G).addAttribute("position",new N([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),e.computeBoundingSphere(),this.add(new J(e,new Y({color:t,opacity:.2,transparent:!0,depthWrite:!1})))}function na(t,e,n,i,a,o){S.call(this),void 0===t&&(t=new r(0,0,1)),void 0===e&&(e=new r(0,0,0)),void 0===n&&(n=1),void 0===i&&(i=16776960),void 0===a&&(a=.2*n),void 0===o&&(o=.2*a),void 0===no&&((no=new G).addAttribute("position",new N([0,0,0,0,1,0],3)),(io=new jn(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(e),this.line=new Be(no,new Ne({color:i})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new J(io,new Y({color:i})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,a,o)}function ia(t){var e=[0,0,0,t=t||1,0,0,0,0,0,0,t,0,0,0,0,0,0,t];(t=new G).addAttribute("position",new N(e,3)),t.addAttribute("color",new N([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),e=new Ne({vertexColors:2}),ze.call(this,t,e)}function ra(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Ci.call(this,t),this.type="catmullrom",this.closed=!0}function aa(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Ci.call(this,t),this.type="catmullrom"}function oa(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Ci.call(this,t),this.type="catmullrom"}void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return 0>t?-1:0<t?1:+t}),!1=="name"in Function.prototype&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e}),Object.assign(e.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){void 0!==this._listeners&&(void 0!==(t=this._listeners[t])&&(-1!==(e=t.indexOf(e))&&t.splice(e,1)))},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var n=0,i=(e=e.slice(0)).length;n<i;n++)e[n].call(this,t)}}}});var sa,ca={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;256>e;e++)t[e]=(16>e?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,i=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[255&n]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[63&i|128]+t[i>>8&255]+"-"+t[i>>16&255]+t[i>>24&255]+t[255&r]+t[r>>8&255]+t[r>>16&255]+t[r>>24&255]).toUpperCase()}}(),clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,i,r){return i+(t-e)*(r-i)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*e},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(t){return t*ca.DEG2RAD},radToDeg:function(t){return t*ca.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};Object.defineProperties(n.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(n.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.y=this.x=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)},subScalar:function(t){return this.x-=t,this.y-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},divideScalar:function(t){return this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,n=this.y;return t=t.elements,this.x=t[0]*e+t[3]*n+t[6],this.y=t[1]*e+t[4]*n+t[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:function(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this},clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return 0>t&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x;return e*e+(t=this.y-t.y)*t},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var n=Math.cos(e);e=Math.sin(e);var i=this.x-t.x,r=this.y-t.y;return this.x=i*n-r*e+t.x,this.y=i*e+r*n+t.y,this}}),Object.assign(i,{slerp:function(t,e,n,i){return n.copy(t).slerp(e,i)},slerpFlat:function(t,e,n,i,r,a,o){var s=n[i+0],c=n[i+1],h=n[i+2];n=n[i+3],i=r[a+0];var l=r[a+1],u=r[a+2];if(n!==(r=r[a+3])||s!==i||c!==l||h!==u){a=1-o;var p=s*i+c*l+h*u+n*r,d=0<=p?1:-1,f=1-p*p;f>Number.EPSILON&&(f=Math.sqrt(f),p=Math.atan2(f,p*d),a=Math.sin(a*p)/f,o=Math.sin(o*p)/f),s=s*a+i*(d*=o),c=c*a+l*d,h=h*a+u*d,n=n*a+r*d,a===1-o&&(s*=o=1/Math.sqrt(s*s+c*c+h*h+n*n),c*=o,h*=o,n*=o)}t[e]=s,t[e+1]=c,t[e+2]=h,t[e+3]=n}}),Object.defineProperties(i.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(i.prototype,{isQuaternion:!0,set:function(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this.onChangeCallback(),this},setFromEuler:function(t,e){if(!t||!t.isEuler)throw Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,i=t._y,r=t._z;t=t.order;var a=Math.cos,o=Math.sin,s=a(n/2),c=a(i/2);return a=a(r/2),n=o(n/2),i=o(i/2),r=o(r/2),"XYZ"===t?(this._x=n*c*a+s*i*r,this._y=s*i*a-n*c*r,this._z=s*c*r+n*i*a,this._w=s*c*a-n*i*r):"YXZ"===t?(this._x=n*c*a+s*i*r,this._y=s*i*a-n*c*r,this._z=s*c*r-n*i*a,this._w=s*c*a+n*i*r):"ZXY"===t?(this._x=n*c*a-s*i*r,this._y=s*i*a+n*c*r,this._z=s*c*r+n*i*a,this._w=s*c*a-n*i*r):"ZYX"===t?(this._x=n*c*a-s*i*r,this._y=s*i*a+n*c*r,this._z=s*c*r-n*i*a,this._w=s*c*a+n*i*r):"YZX"===t?(this._x=n*c*a+s*i*r,this._y=s*i*a+n*c*r,this._z=s*c*r-n*i*a,this._w=s*c*a-n*i*r):"XZY"===t&&(this._x=n*c*a-s*i*r,this._y=s*i*a-n*c*r,this._z=s*c*r+n*i*a,this._w=s*c*a+n*i*r),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){e/=2;var n=Math.sin(e);return this._x=t.x*n,this._y=t.y*n,this._z=t.z*n,this._w=Math.cos(e),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e=t.elements,n=e[0];t=e[4];var i=e[8],r=e[1],a=e[5],o=e[9],s=e[2],c=e[6],h=n+a+(e=e[10]);return 0<h?(n=.5/Math.sqrt(h+1),this._w=.25/n,this._x=(c-o)*n,this._y=(i-s)*n,this._z=(r-t)*n):n>a&&n>e?(n=2*Math.sqrt(1+n-a-e),this._w=(c-o)/n,this._x=.25*n,this._y=(t+r)/n,this._z=(i+s)/n):a>e?(n=2*Math.sqrt(1+a-n-e),this._w=(i-s)/n,this._x=(t+r)/n,this._y=.25*n,this._z=(o+c)/n):(n=2*Math.sqrt(1+e-n-a),this._w=(r-t)/n,this._x=(i+s)/n,this._y=(o+c)/n,this._z=.25*n),this.onChangeCallback(),this},setFromUnitVectors:function(t,e){var n=t.dot(e)+1;return 1e-6>n?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0):(this._x=0,this._y=-t.z,this._z=t.y)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x),this._w=n,this.normalize()},angleTo:function(t){return 2*Math.acos(Math.abs(ca.clamp(this.dot(t),-1,1)))},rotateTowards:function(t,e){var n=this.angleTo(t);return 0===n?this:(this.slerp(t,Math.min(1,e/n)),this)},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var t=this.length();return 0===t?(this._z=this._y=this._x=0,this._w=1):(t=1/t,this._x*=t,this._y*=t,this._z*=t,this._w*=t),this.onChangeCallback(),this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,i=t._y,r=t._z;t=t._w;var a=e._x,o=e._y,s=e._z;return e=e._w,this._x=n*e+t*a+i*s-r*o,this._y=i*e+t*o+r*a-n*s,this._z=r*e+t*s+n*o-i*a,this._w=t*e-n*a-i*o-r*s,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,i=this._y,r=this._z,a=this._w,o=a*t._w+n*t._x+i*t._y+r*t._z;if(0>o?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,o=-o):this.copy(t),1<=o)return this._w=a,this._x=n,this._y=i,this._z=r,this;if((t=1-o*o)<=Number.EPSILON)return o=1-e,this._w=o*a+e*this._w,this._x=o*n+e*this._x,this._y=o*i+e*this._y,this._z=o*r+e*this._z,this.normalize();t=Math.sqrt(t);var s=Math.atan2(t,o);return o=Math.sin((1-e)*s)/t,e=Math.sin(e*s)/t,this._w=a*o+this._w*e,this._x=n*o+this._x*e,this._y=i*o+this._y*e,this._z=r*o+this._z*e,this.onChangeCallback(),this},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,e){return void 0===e&&(e=0),this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(r.prototype,{isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.z=this.y=this.x=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this},multiplyVectors:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this},applyEuler:(sa=new i,function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(sa.setFromEuler(t))}),applyAxisAngle:function(){var t=new i;return function(e,n){return this.applyQuaternion(t.setFromAxisAngle(e,n))}}(),applyMatrix3:function(t){var e=this.x,n=this.y,i=this.z;return t=t.elements,this.x=t[0]*e+t[3]*n+t[6]*i,this.y=t[1]*e+t[4]*n+t[7]*i,this.z=t[2]*e+t[5]*n+t[8]*i,this},applyMatrix4:function(t){var e=this.x,n=this.y,i=this.z,r=1/((t=t.elements)[3]*e+t[7]*n+t[11]*i+t[15]);return this.x=(t[0]*e+t[4]*n+t[8]*i+t[12])*r,this.y=(t[1]*e+t[5]*n+t[9]*i+t[13])*r,this.z=(t[2]*e+t[6]*n+t[10]*i+t[14])*r,this},applyQuaternion:function(t){var e=this.x,n=this.y,i=this.z,r=t.x,a=t.y,o=t.z,s=(t=t.w)*e+a*i-o*n,c=t*n+o*e-r*i,h=t*i+r*n-a*e;return e=-r*e-a*n-o*i,this.x=s*t+e*-r+c*-o-h*-a,this.y=c*t+e*-a+h*-r-s*-o,this.z=h*t+e*-o+s*-a-c*-r,this},project:function(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)},unproject:function(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)},transformDirection:function(t){var e=this.x,n=this.y,i=this.z;return t=t.elements,this.x=t[0]*e+t[4]*n+t[8]*i,this.y=t[1]*e+t[5]*n+t[9]*i,this.z=t[2]*e+t[6]*n+t[10]*i,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this},clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y),this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var n=t.x,i=t.y;t=t.z;var r=e.x,a=e.y;return e=e.z,this.x=i*e-t*a,this.y=t*r-n*e,this.z=n*a-i*r,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new r;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new r;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){return t=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq()),Math.acos(ca.clamp(t,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n+(t=this.z-t.z)*t},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)},setFromSphericalCoords:function(t,e,n){var i=Math.sin(e)*t;return this.x=i*Math.sin(n),this.y=Math.cos(e)*t,this.z=i*Math.cos(n),this},setFromCylindrical:function(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)},setFromCylindricalCoords:function(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this},setFromMatrixPosition:function(t){return t=t.elements,this.x=t[12],this.y=t[13],this.z=t[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length();return t=this.setFromMatrixColumn(t,2).length(),this.x=e,this.y=n,this.z=t,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(a.prototype,{isMatrix3:!0,set:function(t,e,n,i,r,a,o,s,c){var h=this.elements;return h[0]=t,h[1]=i,h[2]=o,h[3]=e,h[4]=r,h[5]=s,h[6]=n,h[7]=a,h[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements;return t=t.elements,e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},setFromMatrix4:function(t){return t=t.elements,this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},applyToBufferAttribute:function(){var t=new r;return function(e){for(var n=0,i=e.count;n<i;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix3(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,i=e.elements;e=this.elements,t=n[0];var r=n[3],a=n[6],o=n[1],s=n[4],c=n[7],h=n[2],l=n[5];n=n[8];var u=i[0],p=i[3],d=i[6],f=i[1],m=i[4],g=i[7],v=i[2],y=i[5];return i=i[8],e[0]=t*u+r*f+a*v,e[3]=t*p+r*m+a*y,e[6]=t*d+r*g+a*i,e[1]=o*u+s*f+c*v,e[4]=o*p+s*m+c*y,e[7]=o*d+s*g+c*i,e[2]=h*u+l*f+n*v,e[5]=h*p+l*m+n*y,e[8]=h*d+l*g+n*i,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this},determinant:function(){var t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],a=t[4],o=t[5],s=t[6],c=t[7];return e*a*(t=t[8])-e*o*c-n*r*t+n*o*s+i*r*c-i*a*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=t.elements;t=this.elements;var i=n[0],r=n[1],a=n[2],o=n[3],s=n[4],c=n[5],h=n[6],l=n[7],u=(n=n[8])*s-c*l,p=c*h-n*o,d=l*o-s*h,f=i*u+r*p+a*d;if(0===f){if(!0===e)throw Error("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0");return console.warn("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0"),this.identity()}return e=1/f,t[0]=u*e,t[1]=(a*l-n*r)*e,t[2]=(c*r-a*s)*e,t[3]=p*e,t[4]=(n*i-a*h)*e,t[5]=(a*o-c*i)*e,t[6]=d*e,t[7]=(r*h-l*i)*e,t[8]=(s*i-r*o)*e,this},transpose:function(){var t=this.elements,e=t[1];return t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},transposeIntoArray:function(t){var e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this},setUvTransform:function(t,e,n,i,r,a,o){var s=Math.cos(r);r=Math.sin(r),this.set(n*s,n*r,-n*(s*a+r*o)+a+t,-i*r,i*s,-i*(-r*a+s*o)+o+e,0,0,1)},scale:function(t,e){var n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this},rotate:function(t){var e=Math.cos(t);t=Math.sin(t);var n=this.elements,i=n[0],r=n[3],a=n[6],o=n[1],s=n[4],c=n[7];return n[0]=e*i+t*o,n[3]=e*r+t*s,n[6]=e*a+t*c,n[1]=-t*i+e*o,n[4]=-t*r+e*s,n[7]=-t*a+e*c,this},translate:function(t,e){var n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this},equals:function(t){var e=this.elements;t=t.elements;for(var n=0;9>n;n++)if(e[n]!==t[n])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;9>n;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}});var ha,la={getDataURL:function(t){if("undefined"==typeof HTMLCanvasElement)return t.src;if(!(t instanceof HTMLCanvasElement)){void 0===ha&&(ha=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),ha.width=t.width,ha.height=t.height;var e=ha.getContext("2d");t instanceof ImageData?e.putImageData(t,0,0):e.drawImage(t,0,0,t.width,t.height),t=ha}return 2048<t.width||2048<t.height?t.toDataURL("image/jpeg",.6):t.toDataURL("image/png")}},ua=0;o.DEFAULT_IMAGE=void 0,o.DEFAULT_MAPPING=300,o.prototype=Object.assign(Object.create(e.prototype),{constructor:o,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){var i=this.image;if(void 0===i.uuid&&(i.uuid=ca.generateUUID()),!e&&void 0===t.images[i.uuid]){if(Array.isArray(i))for(var r=[],a=0,o=i.length;a<o;a++)r.push(la.getDataURL(i[a]));else r=la.getDataURL(i);t.images[i.uuid]={uuid:i.uuid,url:r}}n.image=i.uuid}return e||(t.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(300!==this.mapping)return t;if(t.applyMatrix3(this.matrix),0>t.x||1<t.x)switch(this.wrapS){case 1e3:t.x-=Math.floor(t.x);break;case 1001:t.x=0>t.x?0:1;break;case 1002:t.x=1===Math.abs(Math.floor(t.x)%2)?Math.ceil(t.x)-t.x:t.x-Math.floor(t.x)}if(0>t.y||1<t.y)switch(this.wrapT){case 1e3:t.y-=Math.floor(t.y);break;case 1001:t.y=0>t.y?0:1;break;case 1002:t.y=1===Math.abs(Math.floor(t.y)%2)?Math.ceil(t.y)-t.y:t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}}),Object.defineProperty(o.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(s.prototype,{isVector4:!0,set:function(t,e,n,i){return this.x=t,this.y=e,this.z=n,this.w=i,this},setScalar:function(t){return this.w=this.z=this.y=this.x=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},applyMatrix4:function(t){var e=this.x,n=this.y,i=this.z,r=this.w;return t=t.elements,this.x=t[0]*e+t[4]*n+t[8]*i+t[12]*r,this.y=t[1]*e+t[5]*n+t[9]*i+t[13]*r,this.z=t[2]*e+t[6]*n+t[10]*i+t[14]*r,this.w=t[3]*e+t[7]*n+t[11]*i+t[15]*r,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return 1e-4>e?(this.x=1,this.z=this.y=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e=(t=t.elements)[0],n=t[4],i=t[8],r=t[1],a=t[5],o=t[9],s=t[2],c=t[6],h=t[10];return.01>Math.abs(n-r)&&.01>Math.abs(i-s)&&.01>Math.abs(o-c)?.1>Math.abs(n+r)&&.1>Math.abs(i+s)&&.1>Math.abs(o+c)&&.1>Math.abs(e+a+h-3)?(this.set(1,0,0,0),this):(t=Math.PI,h=(h+1)/2,n=(n+r)/4,i=(i+s)/4,o=(o+c)/4,(e=(e+1)/2)>(a=(a+1)/2)&&e>h?.01>e?(c=0,n=s=.707106781):(s=n/(c=Math.sqrt(e)),n=i/c):a>h?.01>a?(c=.707106781,s=0,n=.707106781):(c=n/(s=Math.sqrt(a)),n=o/s):.01>h?(s=c=.707106781,n=0):(c=i/(n=Math.sqrt(h)),s=o/n),this.set(c,s,n,t),this):(t=Math.sqrt((c-o)*(c-o)+(i-s)*(i-s)+(r-n)*(r-n)),.001>Math.abs(t)&&(t=1),this.x=(c-o)/t,this.y=(i-s)/t,this.z=(r-n)/t,this.w=Math.acos((e+a+h-1)/2),this)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(n,i){return void 0===t&&(t=new s,e=new s),t.set(n,n,n,n),e.set(i,i,i,i),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y),this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z),this.w=0>this.w?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),c.prototype=Object.assign(Object.create(e.prototype),{constructor:c,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),h.prototype=Object.assign(Object.create(c.prototype),{constructor:h,isWebGLMultisampleRenderTarget:!0,copy:function(t){return c.prototype.copy.call(this,t),this.samples=t.samples,this}}),l.prototype=Object.create(c.prototype),l.prototype.constructor=l,l.prototype.isWebGLRenderTargetCube=!0,u.prototype=Object.create(o.prototype),u.prototype.constructor=u,u.prototype.isDataTexture=!0,Object.assign(p.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,n=1/0,i=1/0,r=-1/0,a=-1/0,o=-1/0,s=0,c=t.length;s<c;s+=3){var h=t[s],l=t[s+1],u=t[s+2];h<e&&(e=h),l<n&&(n=l),u<i&&(i=u),h>r&&(r=h),l>a&&(a=l),u>o&&(o=u)}return this.min.set(e,n,i),this.max.set(r,a,o),this},setFromBufferAttribute:function(t){for(var e=1/0,n=1/0,i=1/0,r=-1/0,a=-1/0,o=-1/0,s=0,c=t.count;s<c;s++){var h=t.getX(s),l=t.getY(s),u=t.getZ(s);h<e&&(e=h),l<n&&(n=l),u<i&&(i=u),h>r&&(r=h),l>a&&(a=l),u>o&&(o=u)}return this.min.set(e,n,i),this.max.set(r,a,o),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new r;return function(e,n){return n=t.copy(n).multiplyScalar(.5),this.min.copy(e).sub(n),this.max.copy(e).add(n),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new r),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new r),this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},expandByObject:function(){function t(t){var r=t.geometry;if(void 0!==r)if(r.isGeometry)for(r=r.vertices,n=0,i=r.length;n<i;n++)a.copy(r[n]),a.applyMatrix4(t.matrixWorld),e.expandByPoint(a);else if(r.isBufferGeometry&&void 0!==(r=r.attributes.position))for(n=0,i=r.count;n<i;n++)a.fromBufferAttribute(r,n).applyMatrix4(t.matrixWorld),e.expandByPoint(a)}var e,n,i,a=new r;return function(n){return e=this,n.updateMatrixWorld(!0),n.traverse(t),this}}(),containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new r),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)},intersectsSphere:function(){var t=new r;return function(e){return this.clampPoint(e.center,t),t.distanceToSquared(e.center)<=e.radius*e.radius}}(),intersectsPlane:function(t){if(0<t.normal.x)var e=t.normal.x*this.min.x,n=t.normal.x*this.max.x;else e=t.normal.x*this.max.x,n=t.normal.x*this.min.x;return 0<t.normal.y?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),0<t.normal.z?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant},intersectsTriangle:function(){function t(t){var r,a=0;for(r=t.length-3;a<=r;a+=3){c.fromArray(t,a);var o=l.x*Math.abs(c.x)+l.y*Math.abs(c.y)+l.z*Math.abs(c.z),s=e.dot(c),h=n.dot(c),u=i.dot(c);if(Math.max(-Math.max(s,h,u),Math.min(s,h,u))>o)return!1}return!0}var e=new r,n=new r,i=new r,a=new r,o=new r,s=new r,c=new r,h=new r,l=new r,u=new r;return function(r){return!this.isEmpty()&&(this.getCenter(h),l.subVectors(this.max,h),e.subVectors(r.a,h),n.subVectors(r.b,h),i.subVectors(r.c,h),a.subVectors(n,e),o.subVectors(i,n),s.subVectors(e,i),!!t(r=[0,-a.z,a.y,0,-o.z,o.y,0,-s.z,s.y,a.z,0,-a.x,o.z,0,-o.x,s.z,0,-s.x,-a.y,a.x,0,-o.y,o.x,0,-s.y,s.x,0])&&(!!t(r=[1,0,0,0,1,0,0,0,1])&&(u.crossVectors(a,o),t(r=[u.x,u.y,u.z]))))}}(),clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new r),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new r;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new r;return function(e){return void 0===e&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:function(){var t=[new r,new r,new r,new r,new r,new r,new r,new r];return function(e){return this.isEmpty()?this:(t[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),t[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),t[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),t[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),t[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),t[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),t[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),t[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(t),this)}}(),translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(d.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new p;return function(e,n){var i=this.center;void 0!==n?i.copy(n):t.setFromPoints(e).getCenter(i);for(var r=n=0,a=e.length;r<a;r++)n=Math.max(n,i.distanceToSquared(e[r]));return this.radius=Math.sqrt(n),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return 0>=this.radius},containsPoint:function(t){return t.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(t){return t.distanceTo(this.center)-this.radius},intersectsSphere:function(t){var e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var n=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new r),e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new p),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius*=t.getMaxScaleOnAxis(),this},translate:function(t){return this.center.add(t),this},equals:function(t){return t.center.equals(this.center)&&t.radius===this.radius}}),Object.assign(f.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,i){return this.normal.set(t,e,n),this.constant=i,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new r,e=new r;return function(n,i,r){return i=t.subVectors(r,i).cross(e.subVectors(n,i)).normalize(),this.setFromNormalAndCoplanarPoint(i,n),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.normal.copy(t.normal),this.constant=t.constant,this},normalize:function(){var t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(t){return this.normal.dot(t)+this.constant},distanceToSphere:function(t){return this.distanceToPoint(t.center)-t.radius},projectPoint:function(t,e){return void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new r),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new r;return function(e,n){void 0===n&&(console.warn("THREE.Plane: .intersectLine() target is now required"),n=new r);var i=e.delta(t),a=this.normal.dot(i);if(0===a){if(0===this.distanceToPoint(e.start))return n.copy(e.start)}else if(!(0>(a=-(e.start.dot(this.normal)+this.constant)/a)||1<a))return n.copy(i).multiplyScalar(a).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start);return t=this.distanceToPoint(t.end),0>e&&0<t||0>t&&0<e},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new r),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new r,e=new a;return function(n,i){return i=i||e.getNormalMatrix(n),n=this.coplanarPoint(t).applyMatrix4(n),i=this.normal.applyMatrix3(i).normalize(),this.constant=-n.dot(i),this}}(),translate:function(t){return this.constant-=t.dot(this.normal),this},equals:function(t){return t.normal.equals(this.normal)&&t.constant===this.constant}}),Object.assign(m.prototype,{set:function(t,e,n,i,r,a){var o=this.planes;return o[0].copy(t),o[1].copy(e),o[2].copy(n),o[3].copy(i),o[4].copy(r),o[5].copy(a),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,n=0;6>n;n++)e[n].copy(t.planes[n]);return this},setFromMatrix:function(t){var e=this.planes,n=t.elements;t=n[0];var i=n[1],r=n[2],a=n[3],o=n[4],s=n[5],c=n[6],h=n[7],l=n[8],u=n[9],p=n[10],d=n[11],f=n[12],m=n[13],g=n[14];return n=n[15],e[0].setComponents(a-t,h-o,d-l,n-f).normalize(),e[1].setComponents(a+t,h+o,d+l,n+f).normalize(),e[2].setComponents(a+i,h+s,d+u,n+m).normalize(),e[3].setComponents(a-i,h-s,d-u,n-m).normalize(),e[4].setComponents(a-r,h-c,d-p,n-g).normalize(),e[5].setComponents(a+r,h+c,d+p,n+g).normalize(),this},intersectsObject:function(){var t=new d;return function(e){var n=e.geometry;return null===n.boundingSphere&&n.computeBoundingSphere(),t.copy(n.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSprite:function(){var t=new d;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){var e=this.planes,n=t.center;t=-t.radius;for(var i=0;6>i;i++)if(e[i].distanceToPoint(n)<t)return!1;return!0},intersectsBox:function(){var t=new r;return function(e){for(var n=this.planes,i=0;6>i;i++){var r=n[i];if(t.x=0<r.normal.x?e.max.x:e.min.x,t.y=0<r.normal.y?e.max.y:e.min.y,t.z=0<r.normal.z?e.max.z:e.min.z,0>r.distanceToPoint(t))return!1}return!0}}(),containsPoint:function(t){for(var e=this.planes,n=0;6>n;n++)if(0>e[n].distanceToPoint(t))return!1;return!0}}),Object.assign(g.prototype,{isMatrix4:!0,set:function(t,e,n,i,r,a,o,s,c,h,l,u,p,d,f,m){var g=this.elements;return g[0]=t,g[4]=e,g[8]=n,g[12]=i,g[1]=r,g[5]=a,g[9]=o,g[13]=s,g[2]=c,g[6]=h,g[10]=l,g[14]=u,g[3]=p,g[7]=d,g[11]=f,g[15]=m,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new g).fromArray(this.elements)},copy:function(t){var e=this.elements;return t=t.elements,e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},copyPosition:function(t){var e=this.elements;return t=t.elements,e[12]=t[12],e[13]=t[13],e[14]=t[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this},extractRotation:function(){var t=new r;return function(e){var n=this.elements,i=e.elements,r=1/t.setFromMatrixColumn(e,0).length(),a=1/t.setFromMatrixColumn(e,1).length();return e=1/t.setFromMatrixColumn(e,2).length(),n[0]=i[0]*r,n[1]=i[1]*r,n[2]=i[2]*r,n[3]=0,n[4]=i[4]*a,n[5]=i[5]*a,n[6]=i[6]*a,n[7]=0,n[8]=i[8]*e,n[9]=i[9]*e,n[10]=i[10]*e,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}}(),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,i=t.y,r=t.z,a=Math.cos(n);n=Math.sin(n);var o=Math.cos(i);i=Math.sin(i);var s=Math.cos(r);if(r=Math.sin(r),"XYZ"===t.order){t=a*s;var c=a*r,h=n*s,l=n*r;e[0]=o*s,e[4]=-o*r,e[8]=i,e[1]=c+h*i,e[5]=t-l*i,e[9]=-n*o,e[2]=l-t*i,e[6]=h+c*i,e[10]=a*o}else"YXZ"===t.order?(t=o*s,c=o*r,h=i*s,l=i*r,e[0]=t+l*n,e[4]=h*n-c,e[8]=a*i,e[1]=a*r,e[5]=a*s,e[9]=-n,e[2]=c*n-h,e[6]=l+t*n,e[10]=a*o):"ZXY"===t.order?(t=o*s,c=o*r,h=i*s,l=i*r,e[0]=t-l*n,e[4]=-a*r,e[8]=h+c*n,e[1]=c+h*n,e[5]=a*s,e[9]=l-t*n,e[2]=-a*i,e[6]=n,e[10]=a*o):"ZYX"===t.order?(t=a*s,c=a*r,h=n*s,l=n*r,e[0]=o*s,e[4]=h*i-c,e[8]=t*i+l,e[1]=o*r,e[5]=l*i+t,e[9]=c*i-h,e[2]=-i,e[6]=n*o,e[10]=a*o):"YZX"===t.order?(t=a*o,c=a*i,h=n*o,l=n*i,e[0]=o*s,e[4]=l-t*r,e[8]=h*r+c,e[1]=r,e[5]=a*s,e[9]=-n*s,e[2]=-i*s,e[6]=c*r+h,e[10]=t-l*r):"XZY"===t.order&&(t=a*o,c=a*i,h=n*o,l=n*i,e[0]=o*s,e[4]=-r,e[8]=i*s,e[1]=t*r+l,e[5]=a*s,e[9]=c*r-h,e[2]=h*r-c,e[6]=n*s,e[10]=l*r+t);return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(){var t=new r(0,0,0),e=new r(1,1,1);return function(n){return this.compose(t,n,e)}}(),lookAt:function(){var t=new r,e=new r,n=new r;return function(i,r,a){var o=this.elements;return n.subVectors(i,r),0===n.lengthSq()&&(n.z=1),n.normalize(),t.crossVectors(a,n),0===t.lengthSq()&&(1===Math.abs(a.z)?n.x+=1e-4:n.z+=1e-4,n.normalize(),t.crossVectors(a,n)),t.normalize(),e.crossVectors(n,t),o[0]=t.x,o[4]=e.x,o[8]=n.x,o[1]=t.y,o[5]=e.y,o[9]=n.y,o[2]=t.z,o[6]=e.z,o[10]=n.z,this}}(),multiply:function(t,e){return void 0!==e?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,i=e.elements;e=this.elements,t=n[0];var r=n[4],a=n[8],o=n[12],s=n[1],c=n[5],h=n[9],l=n[13],u=n[2],p=n[6],d=n[10],f=n[14],m=n[3],g=n[7],v=n[11];n=n[15];var y=i[0],x=i[4],b=i[8],w=i[12],_=i[1],M=i[5],E=i[9],S=i[13],T=i[2],A=i[6],L=i[10],R=i[14],P=i[3],C=i[7],O=i[11];return i=i[15],e[0]=t*y+r*_+a*T+o*P,e[4]=t*x+r*M+a*A+o*C,e[8]=t*b+r*E+a*L+o*O,e[12]=t*w+r*S+a*R+o*i,e[1]=s*y+c*_+h*T+l*P,e[5]=s*x+c*M+h*A+l*C,e[9]=s*b+c*E+h*L+l*O,e[13]=s*w+c*S+h*R+l*i,e[2]=u*y+p*_+d*T+f*P,e[6]=u*x+p*M+d*A+f*C,e[10]=u*b+p*E+d*L+f*O,e[14]=u*w+p*S+d*R+f*i,e[3]=m*y+g*_+v*T+n*P,e[7]=m*x+g*M+v*A+n*C,e[11]=m*b+g*E+v*L+n*O,e[15]=m*w+g*S+v*R+n*i,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this},applyToBufferAttribute:function(){var t=new r;return function(e){for(var n=0,i=e.count;n<i;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix4(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],n=t[4],i=t[8],r=t[12],a=t[1],o=t[5],s=t[9],c=t[13],h=t[2],l=t[6],u=t[10],p=t[14];return t[3]*(+r*s*l-i*c*l-r*o*u+n*c*u+i*o*p-n*s*p)+t[7]*(+e*s*p-e*c*u+r*a*u-i*a*p+i*c*h-r*s*h)+t[11]*(+e*c*l-e*o*p-r*a*l+n*a*p+r*o*h-n*c*h)+t[15]*(-i*o*h-e*s*l+e*o*u+i*a*l-n*a*u+n*s*h)},transpose:function(){var t=this.elements,e=t[1];return t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},setPosition:function(t){var e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this},getInverse:function(t,e){var n=this.elements,i=t.elements;t=i[0];var r=i[1],a=i[2],o=i[3],s=i[4],c=i[5],h=i[6],l=i[7],u=i[8],p=i[9],d=i[10],f=i[11],m=i[12],g=i[13],v=i[14],y=p*v*l-g*d*l+g*h*f-c*v*f-p*h*(i=i[15])+c*d*i,x=m*d*l-u*v*l-m*h*f+s*v*f+u*h*i-s*d*i,b=u*g*l-m*p*l+m*c*f-s*g*f-u*c*i+s*p*i,w=m*p*h-u*g*h-m*c*d+s*g*d+u*c*v-s*p*v,_=t*y+r*x+a*b+o*w;if(0===_){if(!0===e)throw Error("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0");return console.warn("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0"),this.identity()}return e=1/_,n[0]=y*e,n[1]=(g*d*o-p*v*o-g*a*f+r*v*f+p*a*i-r*d*i)*e,n[2]=(c*v*o-g*h*o+g*a*l-r*v*l-c*a*i+r*h*i)*e,n[3]=(p*h*o-c*d*o-p*a*l+r*d*l+c*a*f-r*h*f)*e,n[4]=x*e,n[5]=(u*v*o-m*d*o+m*a*f-t*v*f-u*a*i+t*d*i)*e,n[6]=(m*h*o-s*v*o-m*a*l+t*v*l+s*a*i-t*h*i)*e,n[7]=(s*d*o-u*h*o+u*a*l-t*d*l-s*a*f+t*h*f)*e,n[8]=b*e,n[9]=(m*p*o-u*g*o-m*r*f+t*g*f+u*r*i-t*p*i)*e,n[10]=(s*g*o-m*c*o+m*r*l-t*g*l-s*r*i+t*c*i)*e,n[11]=(u*c*o-s*p*o-u*r*l+t*p*l+s*r*f-t*c*f)*e,n[12]=w*e,n[13]=(u*g*a-m*p*a+m*r*d-t*g*d-u*r*v+t*p*v)*e,n[14]=(m*c*a-s*g*a-m*r*h+t*g*h+s*r*v-t*c*v)*e,n[15]=(s*p*a-u*c*a+u*r*h-t*p*h-s*r*d+t*c*d)*e,this},scale:function(t){var e=this.elements,n=t.x,i=t.y;return t=t.z,e[0]*=n,e[4]*=i,e[8]*=t,e[1]*=n,e[5]*=i,e[9]*=t,e[2]*=n,e[6]*=i,e[10]*=t,e[3]*=n,e[7]*=i,e[11]*=t,this},getMaxScaleOnAxis:function(){var t=this.elements;return Math.sqrt(Math.max(t[0]*t[0]+t[1]*t[1]+t[2]*t[2],t[4]*t[4]+t[5]*t[5]+t[6]*t[6],t[8]*t[8]+t[9]*t[9]+t[10]*t[10]))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(1,0,0,0,0,e,-t,0,0,t,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(e,0,t,0,0,1,0,0,-t,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(e,-t,0,0,t,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var n=Math.cos(e);e=Math.sin(e);var i=1-n,r=t.x,a=t.y;t=t.z;var o=i*r,s=i*a;return this.set(o*r+n,o*a-e*t,o*t+e*a,0,o*a+e*t,s*a+n,s*t-e*r,0,o*t-e*a,s*t+e*r,i*t*t+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,n){var i=this.elements,r=e._x,a=e._y,o=e._z,s=e._w,c=r+r,h=a+a,l=o+o;e=r*c;var u=r*h;r*=l;var p=a*h;a*=l,o*=l,c*=s,h*=s,s*=l,l=n.x;var d=n.y;return n=n.z,i[0]=(1-(p+o))*l,i[1]=(u+s)*l,i[2]=(r-h)*l,i[3]=0,i[4]=(u-s)*d,i[5]=(1-(e+o))*d,i[6]=(a+c)*d,i[7]=0,i[8]=(r+h)*n,i[9]=(a-c)*n,i[10]=(1-(e+p))*n,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this},decompose:function(){var t=new r,e=new g;return function(n,i,r){var a=this.elements,o=t.set(a[0],a[1],a[2]).length(),s=t.set(a[4],a[5],a[6]).length(),c=t.set(a[8],a[9],a[10]).length();0>this.determinant()&&(o=-o),n.x=a[12],n.y=a[13],n.z=a[14],e.copy(this),n=1/o,a=1/s;var h=1/c;return e.elements[0]*=n,e.elements[1]*=n,e.elements[2]*=n,e.elements[4]*=a,e.elements[5]*=a,e.elements[6]*=a,e.elements[8]*=h,e.elements[9]*=h,e.elements[10]*=h,i.setFromRotationMatrix(e),r.x=o,r.y=s,r.z=c,this}}(),makePerspective:function(t,e,n,i,r,a){void 0===a&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var o=this.elements;return o[0]=2*r/(e-t),o[4]=0,o[8]=(e+t)/(e-t),o[12]=0,o[1]=0,o[5]=2*r/(n-i),o[9]=(n+i)/(n-i),o[13]=0,o[2]=0,o[6]=0,o[10]=-(a+r)/(a-r),o[14]=-2*a*r/(a-r),o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this},makeOrthographic:function(t,e,n,i,r,a){var o=this.elements,s=1/(e-t),c=1/(n-i),h=1/(a-r);return o[0]=2*s,o[4]=0,o[8]=0,o[12]=-(e+t)*s,o[1]=0,o[5]=2*c,o[9]=0,o[13]=-(n+i)*c,o[2]=0,o[6]=0,o[10]=-2*h,o[14]=-(a+r)*h,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this},equals:function(t){var e=this.elements;t=t.elements;for(var n=0;16>n;n++)if(e[n]!==t[n])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;16>n;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}});var pa={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE  = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick( specularColor, dotNV );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG ) && ! defined( MATCAP )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG ) && ! defined( MATCAP )\n\tvarying vec3 vViewPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG ) && ! defined( MATCAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale =  bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV( sampler2D envMap, vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = normalMatrix * objectTangent;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = min( floor( D ) / 255.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value )  {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntensity;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent ));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tfogDepth = -mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef TOON\n\tuniform sampler2D gradientMap;\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\t\tfloat dotNL = dot( normal, lightDirection );\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t\t#ifdef USE_GRADIENTMAP\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\n\t\t#else\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t\t#endif\n\t}\n#endif",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif",lights_pars_begin:"uniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifdef TOON\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#else\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance = dotNL * directLight.color;\n\t#endif\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat = saturate( clearCoat );\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(    0, 1,    0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#endif\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\tfloat clearCoatInv = 1.0 - clearCoatDHR;\n\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec3 singleScattering = vec3( 0.0 );\n\t\tvec3 multiScattering = vec3( 0.0 );\n\t\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\t\tvec3 diffuse = material.diffuseColor;\n\t\treflectedLight.indirectSpecular += clearCoatInv * radiance * singleScattering;\n\t\treflectedLight.indirectDiffuse += multiScattering * cosineWeightedIrradiance;\n\t\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n\t#else\n\t\treflectedLight.indirectSpecular += clearCoatInv * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#endif\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearCoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\n\t#ifndef STANDARD\n\t\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, irradiance, clearCoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\tgl_Position.z *= gl_Position.w;\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#ifdef USE_MAP\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif",map_particle_pars_fragment:"#ifdef USE_MAP\n\tuniform mat3 uvTransform;\n\tuniform sampler2D map;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif",normal_fragment_begin:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\tbitangent = bitangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t#endif\n#endif",normal_fragment_maps:"#ifdef USE_NORMALMAP\n\t#ifdef OBJECTSPACE_NORMALMAP\n\t\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\t#ifdef FLIP_SIDED\n\t\t\tnormal = - normal;\n\t\t#endif\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t\tnormal = normalize( normalMatrix * normal );\n\t#else\n\t\t#ifdef USE_TANGENT\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\t\tmapN.xy = normalScale * mapN.xy;\n\t\t\tnormal = normalize( vTBN * mapN );\n\t\t#else\n\t\t\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n\t\t#endif\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\t#ifdef OBJECTSPACE_NORMALMAP\n\t\tuniform mat3 normalMatrix;\n\t#else\n\t\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\t\tvec2 st0 = dFdx( vUv.st );\n\t\t\tvec2 st1 = dFdy( vUv.st );\n\t\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\t\tvec3 N = normalize( surf_norm );\n\t\t\tmat3 tsn = mat3( S, T, N );\n\t\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\t\tmapN.xy *= normalScale;\n\t\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\treturn normalize( tsn * mapN );\n\t\t}\n\t#endif\n#endif",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#if defined( DITHERING )\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#if defined( DITHERING )\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n\t#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( ( color * ( 2.51 * color + 0.03 ) ) / ( color * ( 2.43 * color + 0.59 ) + 0.14 ) );\n}",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n#endif",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphysical_frag:"#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define PHYSICAL\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <fog_fragment>\n}",shadow_vert:"#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}"},da={clone:v,merge:y},fa={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Object.assign(x.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.b=this.g=this.r=t,this},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this},setRGB:function(t,e,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(){function t(t,e,n){return 0>n&&(n+=1),1<n&&--n,n<1/6?t+6*(e-t)*n:.5>n?e:n<2/3?t+6*(e-t)*(2/3-n):t}return function(e,n,i){return e=ca.euclideanModulo(e,1),n=ca.clamp(n,0,1),i=ca.clamp(i,0,1),0===n?this.r=this.g=this.b=i:(i=2*i-(n=.5>=i?i*(1+n):i+n-i*n),this.r=t(i,n,e+1/3),this.g=t(i,n,e),this.b=t(i,n,e-1/3)),this}}(),setStyle:function(t){function e(e){void 0!==e&&1>parseFloat(e)&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var i=n[2];switch(n[1]){case"rgb":case"rgba":if(n=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(i))return this.r=Math.min(255,parseInt(n[1],10))/255,this.g=Math.min(255,parseInt(n[2],10))/255,this.b=Math.min(255,parseInt(n[3],10))/255,e(n[5]),this;if(n=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(i))return this.r=Math.min(100,parseInt(n[1],10))/100,this.g=Math.min(100,parseInt(n[2],10))/100,this.b=Math.min(100,parseInt(n[3],10))/100,e(n[5]),this;break;case"hsl":case"hsla":if(n=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(i)){i=parseFloat(n[1])/360;var r=parseInt(n[2],10)/100,a=parseInt(n[3],10)/100;return e(n[5]),this.setHSL(i,r,a)}}}else if(n=/^#([A-Fa-f0-9]+)$/.exec(t)){if(3===(i=(n=n[1]).length))return this.r=parseInt(n.charAt(0)+n.charAt(0),16)/255,this.g=parseInt(n.charAt(1)+n.charAt(1),16)/255,this.b=parseInt(n.charAt(2)+n.charAt(2),16)/255,this;if(6===i)return this.r=parseInt(n.charAt(0)+n.charAt(1),16)/255,this.g=parseInt(n.charAt(2)+n.charAt(3),16)/255,this.b=parseInt(n.charAt(4)+n.charAt(5),16)/255,this}return t&&0<t.length&&(void 0!==(n=fa[t])?this.setHex(n):console.warn("THREE.Color: Unknown color "+t)),this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){return void 0===e&&(e=2),e=0<e?1/e:1,this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},convertGammaToLinear:function(t){return this.copyGammaToLinear(this,t),this},convertLinearToGamma:function(t){return this.copyLinearToGamma(this,t),this},copySRGBToLinear:function(){function t(t){return.04045>t?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}return function(e){return this.r=t(e.r),this.g=t(e.g),this.b=t(e.b),this}}(),copyLinearToSRGB:function(){function t(t){return.0031308>t?12.92*t:1.055*Math.pow(t,.41666)-.055}return function(e){return this.r=t(e.r),this.g=t(e.g),this.b=t(e.b),this}}(),convertSRGBToLinear:function(){return this.copySRGBToLinear(this),this},convertLinearToSRGB:function(){return this.copyLinearToSRGB(this),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(t){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e,n=this.r,i=this.g,r=this.b,a=Math.max(n,i,r),o=Math.min(n,i,r),s=(o+a)/2;if(o===a)o=e=0;else{var c=a-o;switch(o=.5>=s?c/(a+o):c/(2-a-o),a){case n:e=(i-r)/c+(i<r?6:0);break;case i:e=(r-n)/c+2;break;case r:e=(n-i)/c+4}e/=6}return t.h=e,t.s=o,t.l=s,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(){var t={};return function(e,n,i){return this.getHSL(t),t.h+=e,t.s+=n,t.l+=i,this.setHSL(t.h,t.s,t.l),this}}(),add:function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this},addColors:function(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this},addScalar:function(t){return this.r+=t,this.g+=t,this.b+=t,this},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this},multiply:function(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this},multiplyScalar:function(t){return this.r*=t,this.g*=t,this.b*=t,this},lerp:function(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this},lerpHSL:function(){var t={h:0,s:0,l:0},e={h:0,s:0,l:0};return function(n,i){this.getHSL(t),n.getHSL(e),n=ca.lerp(t.h,e.h,i);var r=ca.lerp(t.s,e.s,i);return i=ca.lerp(t.l,e.l,i),this.setHSL(n,r,i),this}}(),equals:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b},fromArray:function(t,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var ma={common:{diffuse:{value:new x(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new a},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new n(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new x(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new x(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new a}},sprite:{diffuse:{value:new x(15658734)},opacity:{value:1},center:{value:new n(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new a}}},ga={basic:{uniforms:y([ma.common,ma.specularmap,ma.envmap,ma.aomap,ma.lightmap,ma.fog]),vertexShader:pa.meshbasic_vert,fragmentShader:pa.meshbasic_frag},lambert:{uniforms:y([ma.common,ma.specularmap,ma.envmap,ma.aomap,ma.lightmap,ma.emissivemap,ma.fog,ma.lights,{emissive:{value:new x(0)}}]),vertexShader:pa.meshlambert_vert,fragmentShader:pa.meshlambert_frag},phong:{uniforms:y([ma.common,ma.specularmap,ma.envmap,ma.aomap,ma.lightmap,ma.emissivemap,ma.bumpmap,ma.normalmap,ma.displacementmap,ma.gradientmap,ma.fog,ma.lights,{emissive:{value:new x(0)},specular:{value:new x(1118481)},shininess:{value:30}}]),vertexShader:pa.meshphong_vert,fragmentShader:pa.meshphong_frag},standard:{uniforms:y([ma.common,ma.envmap,ma.aomap,ma.lightmap,ma.emissivemap,ma.bumpmap,ma.normalmap,ma.displacementmap,ma.roughnessmap,ma.metalnessmap,ma.fog,ma.lights,{emissive:{value:new x(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:pa.meshphysical_vert,fragmentShader:pa.meshphysical_frag},matcap:{uniforms:y([ma.common,ma.bumpmap,ma.normalmap,ma.displacementmap,ma.fog,{matcap:{value:null}}]),vertexShader:pa.meshmatcap_vert,fragmentShader:pa.meshmatcap_frag},points:{uniforms:y([ma.points,ma.fog]),vertexShader:pa.points_vert,fragmentShader:pa.points_frag},dashed:{uniforms:y([ma.common,ma.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:pa.linedashed_vert,fragmentShader:pa.linedashed_frag},depth:{uniforms:y([ma.common,ma.displacementmap]),vertexShader:pa.depth_vert,fragmentShader:pa.depth_frag},normal:{uniforms:y([ma.common,ma.bumpmap,ma.normalmap,ma.displacementmap,{opacity:{value:1}}]),vertexShader:pa.normal_vert,fragmentShader:pa.normal_frag},sprite:{uniforms:y([ma.sprite,ma.fog]),vertexShader:pa.sprite_vert,fragmentShader:pa.sprite_frag},background:{uniforms:{uvTransform:{value:new a},t2D:{value:null}},vertexShader:pa.background_vert,fragmentShader:pa.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:pa.cube_vert,fragmentShader:pa.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:pa.equirect_vert,fragmentShader:pa.equirect_frag},distanceRGBA:{uniforms:y([ma.common,ma.displacementmap,{referencePosition:{value:new r},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:pa.distanceRGBA_vert,fragmentShader:pa.distanceRGBA_frag},shadow:{uniforms:y([ma.lights,ma.fog,{color:{value:new x(0)},opacity:{value:1}}]),vertexShader:pa.shadow_vert,fragmentShader:pa.shadow_frag}};ga.physical={uniforms:y([ga.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:pa.meshphysical_vert,fragmentShader:pa.meshphysical_frag},Object.assign(_.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}}),M.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" "),M.DefaultOrder="XYZ",Object.defineProperties(M.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(M.prototype,{isEuler:!0,set:function(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._order=i||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this.onChangeCallback(),this},setFromRotationMatrix:function(t,e,n){var i=ca.clamp,r=t.elements;t=r[0];var a=r[4],o=r[8],s=r[1],c=r[5],h=r[9],l=r[2],u=r[6];return r=r[10],"XYZ"===(e=e||this._order)?(this._y=Math.asin(i(o,-1,1)),.99999>Math.abs(o)?(this._x=Math.atan2(-h,r),this._z=Math.atan2(-a,t)):(this._x=Math.atan2(u,c),this._z=0)):"YXZ"===e?(this._x=Math.asin(-i(h,-1,1)),.99999>Math.abs(h)?(this._y=Math.atan2(o,r),this._z=Math.atan2(s,c)):(this._y=Math.atan2(-l,t),this._z=0)):"ZXY"===e?(this._x=Math.asin(i(u,-1,1)),.99999>Math.abs(u)?(this._y=Math.atan2(-l,r),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(s,t))):"ZYX"===e?(this._y=Math.asin(-i(l,-1,1)),.99999>Math.abs(l)?(this._x=Math.atan2(u,r),this._z=Math.atan2(s,t)):(this._x=0,this._z=Math.atan2(-a,c))):"YZX"===e?(this._z=Math.asin(i(s,-1,1)),.99999>Math.abs(s)?(this._x=Math.atan2(-h,c),this._y=Math.atan2(-l,t)):(this._x=0,this._y=Math.atan2(o,r))):"XZY"===e?(this._z=Math.asin(-i(a,-1,1)),.99999>Math.abs(a)?(this._x=Math.atan2(u,c),this._y=Math.atan2(o,t)):(this._x=Math.atan2(-h,r),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new g;return function(e,n,i){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,n,i)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:function(){var t=new i;return function(e){return t.setFromEuler(this),this.setFromQuaternion(t,e)}}(),equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new r(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(E.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask=this.mask|1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var va=0;S.DefaultUp=new r(0,1,0),S.DefaultMatrixAutoUpdate=!0,S.prototype=Object.assign(Object.create(e.prototype),{constructor:S,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},setRotationFromAxisAngle:function(t,e){this.quaternion.setFromAxisAngle(t,e)},setRotationFromEuler:function(t){this.quaternion.setFromEuler(t,!0)},setRotationFromMatrix:function(t){this.quaternion.setFromRotationMatrix(t)},setRotationFromQuaternion:function(t){this.quaternion.copy(t)},rotateOnAxis:function(){var t=new i;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.multiply(t),this}}(),rotateOnWorldAxis:function(){var t=new i;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new r(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new r(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new r(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new r;return function(e,n){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(n)),this}}(),translateX:function(){var t=new r(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new r(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new r(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var t=new g;return function(e){return e.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new i,e=new g,n=new r,a=new r;return function(i,r,o){i.isVector3?n.copy(i):n.set(i,r,o),i=this.parent,this.updateWorldMatrix(!0,!1),a.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?e.lookAt(a,n,this.up):e.lookAt(n,a,this.up),this.quaternion.setFromRotationMatrix(e),i&&(e.extractRotation(i.matrixWorld),t.setFromRotationMatrix(e),this.quaternion.premultiply(t.inverse()))}}(),add:function(t){if(1<arguments.length){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(1<arguments.length){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}return-1!==(e=this.children.indexOf(t))&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(e,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var n=0,i=this.children.length;n<i;n++){var r=this.children[n].getObjectByProperty(t,e);if(void 0!==r)return r}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new r),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var t=new r,e=new r;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),n=new i),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,n,e),n}}(),getWorldScale:function(){var t=new r,e=new i;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),n=new r),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,n),n}}(),getWorldDirection:function(t){void 0===t&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),t=new r),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()},raycast:function(){},traverse:function(t){t(this);for(var e=this.children,n=0,i=e.length;n<i;n++)e[n].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,n=0,i=e.length;n<i;n++)e[n].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,n=0,i=e.length;n<i;n++)e[n].updateMatrixWorld(t)},updateWorldMatrix:function(t,e){var n=this.parent;if(!0===t&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===e)for(e=0,n=(t=this.children).length;e<n;e++)t[e].updateWorldMatrix(!1,!0)},toJSON:function(t){function e(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}function n(t){var e,n=[];for(e in t){var i=t[e];delete i.metadata,n.push(i)}return n}var i=void 0===t||"string"==typeof t,r={};i&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},r.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var a={};if(a.uuid=this.uuid,a.type=this.type,""!==this.name&&(a.name=this.name),!0===this.castShadow&&(a.castShadow=!0),!0===this.receiveShadow&&(a.receiveShadow=!0),!1===this.visible&&(a.visible=!1),!1===this.frustumCulled&&(a.frustumCulled=!1),0!==this.renderOrder&&(a.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(a.userData=this.userData),a.layers=this.layers.mask,a.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(a.matrixAutoUpdate=!1),this.isMesh&&0!==this.drawMode&&(a.drawMode=this.drawMode),this.isMesh||this.isLine||this.isPoints){a.geometry=e(t.geometries,this.geometry);var o=this.geometry.parameters;if(void 0!==o&&void 0!==o.shapes)if(o=o.shapes,Array.isArray(o))for(var s=0,c=o.length;s<c;s++)e(t.shapes,o[s]);else e(t.shapes,o)}if(void 0!==this.material)if(Array.isArray(this.material)){for(o=[],s=0,c=this.material.length;s<c;s++)o.push(e(t.materials,this.material[s]));a.material=o}else a.material=e(t.materials,this.material);if(0<this.children.length)for(a.children=[],s=0;s<this.children.length;s++)a.children.push(this.children[s].toJSON(t).object);if(i){i=n(t.geometries),s=n(t.materials),c=n(t.textures);var h=n(t.images);o=n(t.shapes),0<i.length&&(r.geometries=i),0<s.length&&(r.materials=s),0<c.length&&(r.textures=c),0<h.length&&(r.images=h),0<o.length&&(r.shapes=o)}return r.object=a,r},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(e=0;e<t.children.length;e++)this.add(t.children[e].clone());return this}});var ya=0;T.prototype=Object.assign(Object.create(e.prototype),{constructor:T,isGeometry:!0,applyMatrix:function(t){for(var e=(new a).getNormalMatrix(t),n=0,i=this.vertices.length;n<i;n++)this.vertices[n].applyMatrix4(t);for(n=0,i=this.faces.length;n<i;n++){(t=this.faces[n]).normal.applyMatrix3(e).normalize();for(var r=0,o=t.vertexNormals.length;r<o;r++)t.vertexNormals[r].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.normalsNeedUpdate=this.verticesNeedUpdate=!0,this},rotateX:function(){var t=new g;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new g;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new g;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new g;return function(e,n,i){return t.makeTranslation(e,n,i),this.applyMatrix(t),this}}(),scale:function(){var t=new g;return function(e,n,i){return t.makeScale(e,n,i),this.applyMatrix(t),this}}(),lookAt:function(){var t=new S;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),fromBufferGeometry:function(t){function e(t,e,a,o){var s=void 0===h?[]:[i.colors[t].clone(),i.colors[e].clone(),i.colors[a].clone()];o=new _(t,e,a,void 0===c?[]:[(new r).fromArray(c,3*t),(new r).fromArray(c,3*e),(new r).fromArray(c,3*a)],s,o),i.faces.push(o),void 0!==l&&i.faceVertexUvs[0].push([(new n).fromArray(l,2*t),(new n).fromArray(l,2*e),(new n).fromArray(l,2*a)]),void 0!==u&&i.faceVertexUvs[1].push([(new n).fromArray(u,2*t),(new n).fromArray(u,2*e),(new n).fromArray(u,2*a)])}var i=this,a=null!==t.index?t.index.array:void 0,o=t.attributes,s=o.position.array,c=void 0!==o.normal?o.normal.array:void 0,h=void 0!==o.color?o.color.array:void 0,l=void 0!==o.uv?o.uv.array:void 0,u=void 0!==o.uv2?o.uv2.array:void 0;void 0!==u&&(this.faceVertexUvs[1]=[]);for(var p=o=0;o<s.length;o+=3,p+=2)i.vertices.push((new r).fromArray(s,o)),void 0!==h&&i.colors.push((new x).fromArray(h,o));var d=t.groups;if(0<d.length)for(o=0;o<d.length;o++){var f=(s=d[o]).start;for(p=f,f+=s.count;p<f;p+=3)void 0!==a?e(a[p],a[p+1],a[p+2],s.materialIndex):e(p,p+1,p+2,s.materialIndex)}else if(void 0!==a)for(o=0;o<a.length;o+=3)e(a[o],a[o+1],a[o+2]);else for(o=0;o<s.length/3;o+=3)e(o,o+1,o+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:function(){var t=new r;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius;e=0===e?1:1/e;var n=new g;return n.set(e,0,0,-e*t.x,0,e,0,-e*t.y,0,0,e,-e*t.z,0,0,0,1),this.applyMatrix(n),this},computeFaceNormals:function(){for(var t=new r,e=new r,n=0,i=this.faces.length;n<i;n++){var a=this.faces[n],o=this.vertices[a.a],s=this.vertices[a.b];t.subVectors(this.vertices[a.c],s),e.subVectors(o,s),t.cross(e),t.normalize(),a.normal.copy(t)}},computeVertexNormals:function(t){var e;void 0===t&&(t=!0);var n=Array(this.vertices.length),i=0;for(e=this.vertices.length;i<e;i++)n[i]=new r;if(t){var a=new r,o=new r;for(t=0,i=this.faces.length;t<i;t++){e=this.faces[t];var s=this.vertices[e.a],c=this.vertices[e.b],h=this.vertices[e.c];a.subVectors(h,c),o.subVectors(s,c),a.cross(o),n[e.a].add(a),n[e.b].add(a),n[e.c].add(a)}}else for(this.computeFaceNormals(),t=0,i=this.faces.length;t<i;t++)n[(e=this.faces[t]).a].add(e.normal),n[e.b].add(e.normal),n[e.c].add(e.normal);for(i=0,e=this.vertices.length;i<e;i++)n[i].normalize();for(t=0,i=this.faces.length;t<i;t++)3===(s=(e=this.faces[t]).vertexNormals).length?(s[0].copy(n[e.a]),s[1].copy(n[e.b]),s[2].copy(n[e.c])):(s[0]=n[e.a].clone(),s[1]=n[e.b].clone(),s[2]=n[e.c].clone());0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t;this.computeFaceNormals();var e=0;for(t=this.faces.length;e<t;e++){var n=this.faces[e],i=n.vertexNormals;3===i.length?(i[0].copy(n.normal),i[1].copy(n.normal),i[2].copy(n.normal)):(i[0]=n.normal.clone(),i[1]=n.normal.clone(),i[2]=n.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,n=0;for(e=this.faces.length;n<e;n++){var i=this.faces[n];i.__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]);var a=0;for(t=i.vertexNormals.length;a<t;a++)i.__originalVertexNormals[a]?i.__originalVertexNormals[a].copy(i.vertexNormals[a]):i.__originalVertexNormals[a]=i.vertexNormals[a].clone()}var o=new T;for(o.faces=this.faces,a=0,t=this.morphTargets.length;a<t;a++){if(!this.morphNormals[a]){this.morphNormals[a]={},this.morphNormals[a].faceNormals=[],this.morphNormals[a].vertexNormals=[],i=this.morphNormals[a].faceNormals;var s=this.morphNormals[a].vertexNormals;for(n=0,e=this.faces.length;n<e;n++){var c=new r,h={a:new r,b:new r,c:new r};i.push(c),s.push(h)}}for(s=this.morphNormals[a],o.vertices=this.morphTargets[a].vertices,o.computeFaceNormals(),o.computeVertexNormals(),n=0,e=this.faces.length;n<e;n++)i=this.faces[n],c=s.faceNormals[n],h=s.vertexNormals[n],c.copy(i.normal),h.a.copy(i.vertexNormals[0]),h.b.copy(i.vertexNormals[1]),h.c.copy(i.vertexNormals[2])}for(n=0,e=this.faces.length;n<e;n++)(i=this.faces[n]).normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new p),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new d),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if(t&&t.isGeometry){var i,r=this.vertices.length,o=this.vertices,s=t.vertices,c=this.faces,h=t.faces,l=this.faceVertexUvs[0],u=t.faceVertexUvs[0],p=this.colors,d=t.colors;void 0===n&&(n=0),void 0!==e&&(i=(new a).getNormalMatrix(e)),t=0;for(var f=s.length;t<f;t++){var m=s[t].clone();void 0!==e&&m.applyMatrix4(e),o.push(m)}for(t=0,f=d.length;t<f;t++)p.push(d[t].clone());for(t=0,f=h.length;t<f;t++){var g=(s=h[t]).vertexNormals;for(d=s.vertexColors,(p=new _(s.a+r,s.b+r,s.c+r)).normal.copy(s.normal),void 0!==i&&p.normal.applyMatrix3(i).normalize(),e=0,o=g.length;e<o;e++)m=g[e].clone(),void 0!==i&&m.applyMatrix3(i).normalize(),p.vertexNormals.push(m);for(p.color.copy(s.color),e=0,o=d.length;e<o;e++)m=d[e],p.vertexColors.push(m.clone());p.materialIndex=s.materialIndex+n,c.push(p)}for(t=0,f=u.length;t<f;t++)if(i=[],void 0!==(n=u[t])){for(e=0,o=n.length;e<o;e++)i.push(n[e].clone());l.push(i)}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t,e={},n=[],i=[],r=Math.pow(10,4),a=0;for(t=this.vertices.length;a<t;a++){var o=this.vertices[a];void 0===e[o=Math.round(o.x*r)+"_"+Math.round(o.y*r)+"_"+Math.round(o.z*r)]?(e[o]=a,n.push(this.vertices[a]),i[a]=n.length-1):i[a]=i[e[o]]}for(e=[],a=0,t=this.faces.length;a<t;a++)for((r=this.faces[a]).a=i[r.a],r.b=i[r.b],r.c=i[r.c],r=[r.a,r.b,r.c],o=0;3>o;o++)if(r[o]===r[(o+1)%3]){e.push(a);break}for(a=e.length-1;0<=a;a--)for(r=e[a],this.faces.splice(r,1),i=0,t=this.faceVertexUvs.length;i<t;i++)this.faceVertexUvs[i].splice(r,1);return a=this.vertices.length-n.length,this.vertices=n,a},setFromPoints:function(t){this.vertices=[];for(var e=0,n=t.length;e<n;e++){var i=t[e];this.vertices.push(new r(i.x,i.y,i.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,n=0;n<e;n++)t[n]._id=n;t.sort(function(t,e){return t.materialIndex-e.materialIndex});var i,r,a=this.faceVertexUvs[0],o=this.faceVertexUvs[1];for(a&&a.length===e&&(i=[]),o&&o.length===e&&(r=[]),n=0;n<e;n++){var s=t[n]._id;i&&i.push(a[s]),r&&r.push(o[s])}i&&(this.faceVertexUvs[0]=i),r&&(this.faceVertexUvs[1]=r)},toJSON:function(){function t(t,e,n){return n?t|1<<e:t&~(1<<e)}function e(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==h[e]?h[e]:(h[e]=c.length/3,c.push(t.x,t.y,t.z),h[e])}function n(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==u[e]?u[e]:(u[e]=l.length,l.push(t.getHex()),u[e])}function i(t){var e=t.x.toString()+t.y.toString();return void 0!==d[e]?d[e]:(d[e]=p.length/2,p.push(t.x,t.y),d[e])}var r={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),void 0!==this.parameters){var a,o=this.parameters;for(a in o)void 0!==o[a]&&(r[a]=o[a]);return r}for(o=[],a=0;a<this.vertices.length;a++){var s=this.vertices[a];o.push(s.x,s.y,s.z)}s=[];var c=[],h={},l=[],u={},p=[],d={};for(a=0;a<this.faces.length;a++){var f=this.faces[a],m=void 0!==this.faceVertexUvs[0][a],g=0<f.normal.length(),v=0<f.vertexNormals.length,y=1!==f.color.r||1!==f.color.g||1!==f.color.b,x=0<f.vertexColors.length,b=0;b=t(b,0,0),b=t(b,1,!0),b=t(b,2,!1),b=t(b,3,m),b=t(b,4,g),b=t(b,5,v),b=t(b,6,y),b=t(b,7,x),s.push(b),s.push(f.a,f.b,f.c),s.push(f.materialIndex),m&&(m=this.faceVertexUvs[0][a],s.push(i(m[0]),i(m[1]),i(m[2]))),g&&s.push(e(f.normal)),v&&(g=f.vertexNormals,s.push(e(g[0]),e(g[1]),e(g[2]))),y&&s.push(n(f.color)),x&&(f=f.vertexColors,s.push(n(f[0]),n(f[1]),n(f[2])))}return r.data={},r.data.vertices=o,r.data.normals=c,0<l.length&&(r.data.colors=l),0<p.length&&(r.data.uvs=[p]),r.data.faces=s,r},clone:function(){return(new T).copy(this)},copy:function(t){var e,n,i;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingSphere=this.boundingBox=null,this.name=t.name;var r=t.vertices,a=0;for(e=r.length;a<e;a++)this.vertices.push(r[a].clone());for(a=0,e=(r=t.colors).length;a<e;a++)this.colors.push(r[a].clone());for(a=0,e=(r=t.faces).length;a<e;a++)this.faces.push(r[a].clone());for(a=0,e=t.faceVertexUvs.length;a<e;a++){var o=t.faceVertexUvs[a];for(void 0===this.faceVertexUvs[a]&&(this.faceVertexUvs[a]=[]),r=0,n=o.length;r<n;r++){var s=o[r],c=[],h=0;for(i=s.length;h<i;h++)c.push(s[h].clone());this.faceVertexUvs[a].push(c)}}for(a=0,e=(h=t.morphTargets).length;a<e;a++){if((i={}).name=h[a].name,void 0!==h[a].vertices)for(i.vertices=[],r=0,n=h[a].vertices.length;r<n;r++)i.vertices.push(h[a].vertices[r].clone());if(void 0!==h[a].normals)for(i.normals=[],r=0,n=h[a].normals.length;r<n;r++)i.normals.push(h[a].normals[r].clone());this.morphTargets.push(i)}for(a=0,e=(h=t.morphNormals).length;a<e;a++){if(i={},void 0!==h[a].vertexNormals)for(i.vertexNormals=[],r=0,n=h[a].vertexNormals.length;r<n;r++)o=h[a].vertexNormals[r],(s={}).a=o.a.clone(),s.b=o.b.clone(),s.c=o.c.clone(),i.vertexNormals.push(s);if(void 0!==h[a].faceNormals)for(i.faceNormals=[],r=0,n=h[a].faceNormals.length;r<n;r++)i.faceNormals.push(h[a].faceNormals[r].clone());this.morphNormals.push(i)}for(a=0,e=(r=t.skinWeights).length;a<e;a++)this.skinWeights.push(r[a].clone());for(a=0,e=(r=t.skinIndices).length;a<e;a++)this.skinIndices.push(r[a].clone());for(a=0,e=(r=t.lineDistances).length;a<e;a++)this.lineDistances.push(r[a]);return null!==(a=t.boundingBox)&&(this.boundingBox=a.clone()),null!==(a=t.boundingSphere)&&(this.boundingSphere=a.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(A.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(A.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var i=0,r=this.itemSize;i<r;i++)this.array[t+i]=e.array[n+i];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,n=0,i=0,r=t.length;i<r;i++){var a=t[i];void 0===a&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",i),a=new x),e[n++]=a.r,e[n++]=a.g,e[n++]=a.b}return this},copyVector2sArray:function(t){for(var e=this.array,i=0,r=0,a=t.length;r<a;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new n),e[i++]=o.x,e[i++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,n=0,i=0,a=t.length;i<a;i++){var o=t[i];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",i),o=new r),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,n=0,i=0,r=t.length;i<r;i++){var a=t[i];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",i),a=new s),e[n++]=a.x,e[n++]=a.y,e[n++]=a.z,e[n++]=a.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this},setXYZW:function(t,e,n,i,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this.array[t+3]=r,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),L.prototype=Object.create(A.prototype),L.prototype.constructor=L,R.prototype=Object.create(A.prototype),R.prototype.constructor=R,P.prototype=Object.create(A.prototype),P.prototype.constructor=P,C.prototype=Object.create(A.prototype),C.prototype.constructor=C,O.prototype=Object.create(A.prototype),O.prototype.constructor=O,I.prototype=Object.create(A.prototype),I.prototype.constructor=I,D.prototype=Object.create(A.prototype),D.prototype.constructor=D,N.prototype=Object.create(A.prototype),N.prototype.constructor=N,B.prototype=Object.create(A.prototype),B.prototype.constructor=B,Object.assign(z.prototype,{computeGroups:function(t){var e=[],n=void 0;t=t.faces;for(var i=0;i<t.length;i++){var r=t[i];if(r.materialIndex!==n){n=r.materialIndex,void 0!==a&&(a.count=3*i-a.start,e.push(a));var a={start:3*i,materialIndex:n}}}void 0!==a&&(a.count=3*i-a.start,e.push(a)),this.groups=e},fromGeometry:function(t){var e=t.faces,i=t.vertices,r=t.faceVertexUvs,a=r[0]&&0<r[0].length,o=r[1]&&0<r[1].length,s=t.morphTargets,c=s.length;if(0<c){for(var h=[],l=0;l<c;l++)h[l]={name:s[l].name,data:[]};this.morphTargets.position=h}var u=t.morphNormals,p=u.length;if(0<p){var d=[];for(l=0;l<p;l++)d[l]={name:u[l].name,data:[]};this.morphTargets.normal=d}var f=t.skinIndices,m=t.skinWeights,g=f.length===i.length,v=m.length===i.length;for(0<i.length&&0===e.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported."),l=0;l<e.length;l++){var y=e[l];this.vertices.push(i[y.a],i[y.b],i[y.c]);var x=y.vertexNormals;for(3===x.length?this.normals.push(x[0],x[1],x[2]):(x=y.normal,this.normals.push(x,x,x)),3===(x=y.vertexColors).length?this.colors.push(x[0],x[1],x[2]):(x=y.color,this.colors.push(x,x,x)),!0===a&&(void 0!==(x=r[0][l])?this.uvs.push(x[0],x[1],x[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",l),this.uvs.push(new n,new n,new n))),!0===o&&(void 0!==(x=r[1][l])?this.uvs2.push(x[0],x[1],x[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",l),this.uvs2.push(new n,new n,new n))),x=0;x<c;x++){var b=s[x].vertices;h[x].data.push(b[y.a],b[y.b],b[y.c])}for(x=0;x<p;x++)b=u[x].vertexNormals[l],d[x].data.push(b.a,b.b,b.c);g&&this.skinIndices.push(f[y.a],f[y.b],f[y.c]),v&&this.skinWeights.push(m[y.a],m[y.b],m[y.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var xa=1;G.prototype=Object.assign(Object.create(e.prototype),{constructor:G,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(65535<U(t)?D:O)(t,1):this.index=t},addAttribute:function(t,e,n){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(t,new A(e,n)))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var n=this.attributes.normal;return void 0!==n&&((e=(new a).getNormalMatrix(t)).applyToBufferAttribute(n),n.needsUpdate=!0),void 0!==(n=this.attributes.tangent)&&((e=(new a).getNormalMatrix(t)).applyToBufferAttribute(n),n.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new g;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new g;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new g;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new g;return function(e,n,i){return t.makeTranslation(e,n,i),this.applyMatrix(t),this}}(),scale:function(){var t=new g;return function(e,n,i){return t.makeScale(e,n,i),this.applyMatrix(t),this}}(),lookAt:function(){var t=new S;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new r;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){t=new N(3*e.vertices.length,3);var n=new N(3*e.colors.length,3);this.addAttribute("position",t.copyVector3sArray(e.vertices)),this.addAttribute("color",n.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length&&(t=new N(e.lineDistances.length,1),this.addAttribute("lineDistance",t.copyArray(e.lineDistances))),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],n=0,i=t.length;n<i;n++){var r=t[n];e.push(r.x,r.y,r.z||0)}return this.addAttribute("position",new N(e,3)),this},updateFromObject:function(t){var e=t.geometry;if(t.isMesh){var n=e.__directGeometry;if(!0===e.elementsNeedUpdate&&(n=void 0,e.elementsNeedUpdate=!1),void 0===n)return this.fromGeometry(e);n.verticesNeedUpdate=e.verticesNeedUpdate,n.normalsNeedUpdate=e.normalsNeedUpdate,n.colorsNeedUpdate=e.colorsNeedUpdate,n.uvsNeedUpdate=e.uvsNeedUpdate,n.groupsNeedUpdate=e.groupsNeedUpdate,e.verticesNeedUpdate=!1,e.normalsNeedUpdate=!1,e.colorsNeedUpdate=!1,e.uvsNeedUpdate=!1,e.groupsNeedUpdate=!1,e=n}return!0===e.verticesNeedUpdate&&(void 0!==(n=this.attributes.position)&&(n.copyVector3sArray(e.vertices),n.needsUpdate=!0),e.verticesNeedUpdate=!1),!0===e.normalsNeedUpdate&&(void 0!==(n=this.attributes.normal)&&(n.copyVector3sArray(e.normals),n.needsUpdate=!0),e.normalsNeedUpdate=!1),!0===e.colorsNeedUpdate&&(void 0!==(n=this.attributes.color)&&(n.copyColorsArray(e.colors),n.needsUpdate=!0),e.colorsNeedUpdate=!1),e.uvsNeedUpdate&&(void 0!==(n=this.attributes.uv)&&(n.copyVector2sArray(e.uvs),n.needsUpdate=!0),e.uvsNeedUpdate=!1),e.lineDistancesNeedUpdate&&(void 0!==(n=this.attributes.lineDistance)&&(n.copyArray(e.lineDistances),n.needsUpdate=!0),e.lineDistancesNeedUpdate=!1),e.groupsNeedUpdate&&(e.computeGroups(t.geometry),this.groups=e.groups,e.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new z).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);for(var n in this.addAttribute("position",new A(e,3).copyVector3sArray(t.vertices)),0<t.normals.length&&(e=new Float32Array(3*t.normals.length),this.addAttribute("normal",new A(e,3).copyVector3sArray(t.normals))),0<t.colors.length&&(e=new Float32Array(3*t.colors.length),this.addAttribute("color",new A(e,3).copyColorsArray(t.colors))),0<t.uvs.length&&(e=new Float32Array(2*t.uvs.length),this.addAttribute("uv",new A(e,2).copyVector2sArray(t.uvs))),0<t.uvs2.length&&(e=new Float32Array(2*t.uvs2.length),this.addAttribute("uv2",new A(e,2).copyVector2sArray(t.uvs2))),this.groups=t.groups,t.morphTargets){e=[];for(var i=t.morphTargets[n],r=0,a=i.length;r<a;r++){var o=i[r],s=new N(3*o.data.length,3);s.name=o.name,e.push(s.copyVector3sArray(o.data))}this.morphAttributes[n]=e}return 0<t.skinIndices.length&&(n=new N(4*t.skinIndices.length,4),this.addAttribute("skinIndex",n.copyVector4sArray(t.skinIndices))),0<t.skinWeights.length&&(n=new N(4*t.skinWeights.length,4),this.addAttribute("skinWeight",n.copyVector4sArray(t.skinWeights))),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){var t=new p;return function(){null===this.boundingBox&&(this.boundingBox=new p);var e=this.attributes.position,n=this.morphAttributes.position;if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),n){e=0;for(var i=n.length;e<i;e++)t.setFromBufferAttribute(n[e]),this.boundingBox.expandByPoint(t.min),this.boundingBox.expandByPoint(t.max)}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}}(),computeBoundingSphere:function(){var t=new p,e=new p,n=new r;return function(){null===this.boundingSphere&&(this.boundingSphere=new d);var i=this.attributes.position,r=this.morphAttributes.position;if(i){var a=this.boundingSphere.center;if(t.setFromBufferAttribute(i),r)for(var o=0,s=r.length;o<s;o++){var c=r[o];e.setFromBufferAttribute(c),t.expandByPoint(e.min),t.expandByPoint(e.max)}t.getCenter(a);var h=0;for(o=0,s=i.count;o<s;o++)n.fromBufferAttribute(i,o),h=Math.max(h,a.distanceToSquared(n));if(r)for(o=0,s=r.length;o<s;o++){i=0;for(var l=(c=r[o]).count;i<l;i++)n.fromBufferAttribute(c,i),h=Math.max(h,a.distanceToSquared(n))}this.boundingSphere.radius=Math.sqrt(h),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes;if(e.position){var n=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new A(new Float32Array(n.length),3));else for(var i=e.normal.array,a=0,o=i.length;a<o;a++)i[a]=0;i=e.normal.array;var s=new r,c=new r,h=new r,l=new r,u=new r;if(t){var p=t.array;for(a=0,o=t.count;a<o;a+=3){t=3*p[a+0];var d=3*p[a+1],f=3*p[a+2];s.fromArray(n,t),c.fromArray(n,d),h.fromArray(n,f),l.subVectors(h,c),u.subVectors(s,c),l.cross(u),i[t]+=l.x,i[t+1]+=l.y,i[t+2]+=l.z,i[d]+=l.x,i[d+1]+=l.y,i[d+2]+=l.z,i[f]+=l.x,i[f+1]+=l.y,i[f+2]+=l.z}}else for(a=0,o=n.length;a<o;a+=9)s.fromArray(n,a),c.fromArray(n,a+3),h.fromArray(n,a+6),l.subVectors(h,c),u.subVectors(s,c),l.cross(u),i[a]=l.x,i[a+1]=l.y,i[a+2]=l.z,i[a+3]=l.x,i[a+4]=l.y,i[a+5]=l.z,i[a+6]=l.x,i[a+7]=l.y,i[a+8]=l.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n,i=this.attributes;for(n in i)if(void 0!==t.attributes[n]){var r=i[n].array,a=t.attributes[n],o=a.array,s=a.itemSize*e;a=Math.min(o.length,r.length-s);for(var c=0;c<a;c++,s++)r[s]=o[c]}return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new r;return function(){for(var e=this.attributes.normal,n=0,i=e.count;n<i;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.normalize(),e.setXYZ(n,t.x,t.y,t.z)}}(),toNonIndexed:function(){function t(t,e){var n=t.array;t=t.itemSize;for(var i,r=new n.constructor(e.length*t),a=0,o=0,s=e.length;o<s;o++){i=e[o]*t;for(var c=0;c<t;c++)r[a++]=n[i++]}return new A(r,t)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var e,n=new G,i=this.index.array,r=this.attributes;for(e in r){var a=r[e];a=t(a,i),n.addAttribute(e,a)}var o=this.morphAttributes;for(e in o){var s=[],c=o[e];r=0;for(var h=c.length;r<h;r++)a=t(a=c[r],i),s.push(a);n.morphAttributes[e]=s}for(r=0,e=(i=this.groups).length;r<e;r++)a=i[r],n.addGroup(a.start,a.count,a.materialIndex);return n},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),0<Object.keys(this.userData).length&&(t.userData=this.userData),void 0!==this.parameters){var e=this.parameters;for(h in e)void 0!==e[h]&&(t[h]=e[h]);return t}t.data={attributes:{}},null!==(e=this.index)&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});var n=this.attributes;for(h in n){var i={itemSize:(e=n[h]).itemSize,type:e.array.constructor.name,array:Array.prototype.slice.call(e.array),normalized:e.normalized};""!==e.name&&(i.name=e.name),t.data.attributes[h]=i}n={};var r=!1;for(h in this.morphAttributes){for(var a=this.morphAttributes[h],o=[],s=0,c=a.length;s<c;s++)i={itemSize:(e=a[s]).itemSize,type:e.array.constructor.name,array:Array.prototype.slice.call(e.array),normalized:e.normalized},""!==e.name&&(i.name=e.name),o.push(i);0<o.length&&(n[h]=o,r=!0)}r&&(t.data.morphAttributes=n);var h=this.groups;return 0<h.length&&(t.data.groups=JSON.parse(JSON.stringify(h))),null!==(h=this.boundingSphere)&&(t.data.boundingSphere={center:h.center.toArray(),radius:h.radius}),t},clone:function(){return(new G).copy(this)},copy:function(t){var e;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingSphere=this.boundingBox=null,this.name=t.name;var n=t.index;for(o in null!==n&&this.setIndex(n.clone()),n=t.attributes)this.addAttribute(o,n[o].clone());var i=t.morphAttributes;for(o in i){var r=[],a=i[o];for(n=0,e=a.length;n<e;n++)r.push(a[n].clone());this.morphAttributes[o]=r}var o=t.groups;for(n=0,e=o.length;n<e;n++)i=o[n],this.addGroup(i.start,i.count,i.materialIndex);return null!==(o=t.boundingBox)&&(this.boundingBox=o.clone()),null!==(o=t.boundingSphere)&&(this.boundingSphere=o.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),F.prototype=Object.create(T.prototype),F.prototype.constructor=F,H.prototype=Object.create(G.prototype),H.prototype.constructor=H,k.prototype=Object.create(T.prototype),k.prototype.constructor=k,V.prototype=Object.create(G.prototype),V.prototype.constructor=V;var ba=0;j.prototype=Object.assign(Object.create(e.prototype),{constructor:j,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(void 0!==t)for(var e in t){var n=t[e];if(void 0===n)console.warn("THREE.Material: '"+e+"' parameter is undefined.");else if("shading"===e)console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===n;else{var i=this[e];void 0===i?console.warn("THREE."+this.type+": '"+e+"' is not a property of this material."):i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[e]=n}}},toJSON:function(t){function e(t){var e,n=[];for(e in t){var i=t[e];delete i.metadata,n.push(i)}return n}var n=void 0===t||"string"==typeof t;n&&(t={textures:{},images:{}});var i={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};return i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearCoat&&(i.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(i.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(t).uuid),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(t).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(t).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(t).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(t).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(t).uuid,i.reflectivity=this.reflectivity,void 0!==this.combine&&(i.combine=this.combine),void 0!==this.envMapIntensity&&(i.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(i.size=this.size),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(i.blending=this.blending),!0===this.flatShading&&(i.flatShading=this.flatShading),0!==this.side&&(i.side=this.side),0!==this.vertexColors&&(i.vertexColors=this.vertexColors),1>this.opacity&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,0!==this.rotation&&(i.rotation=this.rotation),!0===this.polygonOffset&&(i.polygonOffset=!0),0!==this.polygonOffsetFactor&&(i.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(i.polygonOffsetUnits=this.polygonOffsetUnits),1!==this.linewidth&&(i.linewidth=this.linewidth),void 0!==this.dashSize&&(i.dashSize=this.dashSize),void 0!==this.gapSize&&(i.gapSize=this.gapSize),void 0!==this.scale&&(i.scale=this.scale),!0===this.dithering&&(i.dithering=!0),0<this.alphaTest&&(i.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(i.wireframe=this.wireframe),1<this.wireframeLinewidth&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(i.morphTargets=!0),!0===this.skinning&&(i.skinning=!0),!1===this.visible&&(i.visible=!1),"{}"!==JSON.stringify(this.userData)&&(i.userData=this.userData),n&&(n=e(t.textures),t=e(t.images),0<n.length&&(i.textures=n),0<t.length&&(i.images=t)),i},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,n=null;if(null!==e){var i=e.length;n=Array(i);for(var r=0;r!==i;++r)n[r]=e[r].clone()}return this.clippingPlanes=n,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),W.prototype=Object.create(j.prototype),W.prototype.constructor=W,W.prototype.isShaderMaterial=!0,W.prototype.copy=function(t){return j.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=v(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},W.prototype.toJSON=function(t){var e=j.prototype.toJSON.call(this,t);for(var n in e.uniforms={},this.uniforms){var i=this.uniforms[n].value;e.uniforms[n]=i&&i.isTexture?{type:"t",value:i.toJSON(t).uuid}:i&&i.isColor?{type:"c",value:i.getHex()}:i&&i.isVector2?{type:"v2",value:i.toArray()}:i&&i.isVector3?{type:"v3",value:i.toArray()}:i&&i.isVector4?{type:"v4",value:i.toArray()}:i&&i.isMatrix3?{type:"m3",value:i.toArray()}:i&&i.isMatrix4?{type:"m4",value:i.toArray()}:{value:i}}for(var r in 0<Object.keys(this.defines).length&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,t={},this.extensions)!0===this.extensions[r]&&(t[r]=!0);return 0<Object.keys(t).length&&(e.extensions=t),e},Object.assign(q.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new r),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new r;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new r),e.subVectors(t,this.origin),0>(t=e.dot(this.direction))?e.copy(this.origin):e.copy(this.direction).multiplyScalar(t).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new r;return function(e){var n=t.subVectors(e,this.origin).dot(this.direction);return 0>n?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(n).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:function(){var t=new r,e=new r,n=new r;return function(i,r,a,o){t.copy(i).add(r).multiplyScalar(.5),e.copy(r).sub(i).normalize(),n.copy(this.origin).sub(t);var s=.5*i.distanceTo(r),c=-this.direction.dot(e),h=n.dot(this.direction),l=-n.dot(e),u=n.lengthSq(),p=Math.abs(1-c*c);if(0<p){r=c*h-l;var d=s*p;0<=(i=c*l-h)?r>=-d?r<=d?c=(i*=s=1/p)*(i+c*(r*=s)+2*h)+r*(c*i+r+2*l)+u:(r=s,c=-(i=Math.max(0,-(c*r+h)))*i+r*(r+2*l)+u):(r=-s,c=-(i=Math.max(0,-(c*r+h)))*i+r*(r+2*l)+u):r<=-d?c=-(i=Math.max(0,-(-c*s+h)))*i+(r=0<i?-s:Math.min(Math.max(-s,-l),s))*(r+2*l)+u:r<=d?(i=0,c=(r=Math.min(Math.max(-s,-l),s))*(r+2*l)+u):c=-(i=Math.max(0,-(c*s+h)))*i+(r=0<i?s:Math.min(Math.max(-s,-l),s))*(r+2*l)+u}else r=0<c?-s:s,c=-(i=Math.max(0,-(c*r+h)))*i+r*(r+2*l)+u;return a&&a.copy(this.direction).multiplyScalar(i).add(this.origin),o&&o.copy(e).multiplyScalar(r).add(t),c}}(),intersectSphere:function(){var t=new r;return function(e,n){t.subVectors(e.center,this.origin);var i=t.dot(this.direction),r=t.dot(t)-i*i;return r>(e=e.radius*e.radius)?null:(r=i-(e=Math.sqrt(e-r)),i+=e,0>r&&0>i?null:0>r?this.at(i,n):this.at(r,n))}}(),intersectsSphere:function(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);return 0===e?0===t.distanceToPoint(this.origin)?0:null:0<=(t=-(this.origin.dot(t.normal)+t.constant)/e)?t:null},intersectPlane:function(t,e){return null===(t=this.distanceToPlane(t))?null:this.at(t,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||0>t.normal.dot(this.direction)*e},intersectBox:function(t,e){var n=1/this.direction.x,i=1/this.direction.y,r=1/this.direction.z,a=this.origin;if(0<=n){var o=(t.min.x-a.x)*n;n*=t.max.x-a.x}else o=(t.max.x-a.x)*n,n*=t.min.x-a.x;if(0<=i){var s=(t.min.y-a.y)*i;i*=t.max.y-a.y}else s=(t.max.y-a.y)*i,i*=t.min.y-a.y;return o>i||s>n?null:((s>o||o!=o)&&(o=s),(i<n||n!=n)&&(n=i),0<=r?(s=(t.min.z-a.z)*r,t=(t.max.z-a.z)*r):(s=(t.max.z-a.z)*r,t=(t.min.z-a.z)*r),o>t||s>n?null:((s>o||o!=o)&&(o=s),(t<n||n!=n)&&(n=t),0>n?null:this.at(0<=o?o:n,e)))},intersectsBox:function(){var t=new r;return function(e){return null!==this.intersectBox(e,t)}}(),intersectTriangle:function(){var t=new r,e=new r,n=new r,i=new r;return function(r,a,o,s,c){if(e.subVectors(a,r),n.subVectors(o,r),i.crossVectors(e,n),0<(a=this.direction.dot(i))){if(s)return null;s=1}else{if(!(0>a))return null;s=-1,a=-a}return t.subVectors(this.origin,r),0>(r=s*this.direction.dot(n.crossVectors(t,n)))?null:0>(o=s*this.direction.dot(e.cross(t)))||r+o>a?null:0>(r=-s*t.dot(i))?null:this.at(r/a,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(X,{getNormal:function(){var t=new r;return function(e,n,i,a){return void 0===a&&(console.warn("THREE.Triangle: .getNormal() target is now required"),a=new r),a.subVectors(i,n),t.subVectors(e,n),a.cross(t),0<(e=a.lengthSq())?a.multiplyScalar(1/Math.sqrt(e)):a.set(0,0,0)}}(),getBarycoord:function(){var t=new r,e=new r,n=new r;return function(i,a,o,s,c){t.subVectors(s,a),e.subVectors(o,a),n.subVectors(i,a),i=t.dot(t),a=t.dot(e),o=t.dot(n);var h=e.dot(e);s=e.dot(n);var l=i*h-a*a;return void 0===c&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),c=new r),0===l?c.set(-2,-1,-1):(h=(h*o-a*s)*(l=1/l),i=(i*s-a*o)*l,c.set(1-h-i,i,h))}}(),containsPoint:function(){var t=new r;return function(e,n,i,r){return X.getBarycoord(e,n,i,r,t),0<=t.x&&0<=t.y&&1>=t.x+t.y}}(),getUV:function(){var t=new r;return function(e,n,i,r,a,o,s,c){return this.getBarycoord(e,n,i,r,t),c.set(0,0),c.addScaledVector(a,t.x),c.addScaledVector(o,t.y),c.addScaledVector(s,t.z),c}}()}),Object.assign(X.prototype,{set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,i){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[i]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new r,e=new r;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new r),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return X.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new r),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return X.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return X.containsPoint(t,this.a,this.b,this.c)},getUV:function(t,e,n,i,r){return X.getUV(t,this.a,this.b,this.c,e,n,i,r)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new r,e=new r,n=new r,i=new r,a=new r,o=new r;return function(s,c){void 0===c&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),c=new r);var h=this.a,l=this.b,u=this.c;t.subVectors(l,h),e.subVectors(u,h),i.subVectors(s,h);var p=t.dot(i),d=e.dot(i);if(0>=p&&0>=d)return c.copy(h);a.subVectors(s,l);var f=t.dot(a),m=e.dot(a);if(0<=f&&m<=f)return c.copy(l);var g=p*m-f*d;if(0>=g&&0<=p&&0>=f)return l=p/(p-f),c.copy(h).addScaledVector(t,l);o.subVectors(s,u),s=t.dot(o);var v=e.dot(o);return 0<=v&&s<=v?c.copy(u):0>=(p=s*d-p*v)&&0<=d&&0>=v?(g=d/(d-v),c.copy(h).addScaledVector(e,g)):0>=(d=f*v-s*m)&&0<=m-f&&0<=s-v?(n.subVectors(u,l),g=(m-f)/(m-f+(s-v)),c.copy(l).addScaledVector(n,g)):(l=p*(u=1/(d+p+g)),g*=u,c.copy(h).addScaledVector(t,l).addScaledVector(e,g))}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),Y.prototype=Object.create(j.prototype),Y.prototype.constructor=Y,Y.prototype.isMeshBasicMaterial=!0,Y.prototype.copy=function(t){return j.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},J.prototype=Object.assign(Object.create(S.prototype),{constructor:J,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return S.prototype.copy.call(this,t),this.drawMode=t.drawMode,void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t=this.geometry;if(t.isBufferGeometry){t=t.morphAttributes;var e=Object.keys(t);if(0<e.length){var n=t[e[0]];if(void 0!==n)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=n.length;t<e;t++){var i=n[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[i]=t}}}else void 0!==(t=t.morphTargets)&&0<t.length&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")},raycast:function(){function t(t,e,n,i,r,a,o,s){return null===(1===e.side?i.intersectTriangle(o,a,r,!0,s):i.intersectTriangle(r,a,o,2!==e.side,s))?null:(M.copy(s),M.applyMatrix4(t.matrixWorld),(e=n.ray.origin.distanceTo(M))<n.near||e>n.far?null:{distance:e,point:M.clone(),object:t})}function e(e,i,r,a,o,d,g,M,E,S){if(s.fromBufferAttribute(o,M),c.fromBufferAttribute(o,E),h.fromBufferAttribute(o,S),o=e.morphTargetInfluences,i.morphTargets&&d&&o){f.set(0,0,0),m.set(0,0,0),v.set(0,0,0);for(var T=0,A=d.length;T<A;T++){var L=o[T],R=d[T];0!==L&&(l.fromBufferAttribute(R,M),u.fromBufferAttribute(R,E),p.fromBufferAttribute(R,S),f.addScaledVector(l.sub(s),L),m.addScaledVector(u.sub(c),L),v.addScaledVector(p.sub(h),L))}s.add(f),c.add(m),h.add(v)}return(e=t(e,i,r,a,s,c,h,w))&&(g&&(y.fromBufferAttribute(g,M),x.fromBufferAttribute(g,E),b.fromBufferAttribute(g,S),e.uv=X.getUV(w,s,c,h,y,x,b,new n)),g=new _(M,E,S),X.getNormal(s,c,h,g.normal),e.face=g),e}var i=new g,a=new q,o=new d,s=new r,c=new r,h=new r,l=new r,u=new r,p=new r,f=new r,m=new r,v=new r,y=new n,x=new n,b=new n,w=new r,M=new r;return function(r,s){var c=this.geometry,h=this.material,l=this.matrixWorld;if(void 0!==h&&(null===c.boundingSphere&&c.computeBoundingSphere(),o.copy(c.boundingSphere),o.applyMatrix4(l),!1!==r.ray.intersectsSphere(o)&&(i.getInverse(l),a.copy(r.ray).applyMatrix4(i),null===c.boundingBox||!1!==a.intersectsBox(c.boundingBox))))if(c.isBufferGeometry){var u=c.index;l=c.attributes.position;var p,d,f=c.morphAttributes.position,m=c.attributes.uv,g=c.groups,v=c.drawRange;if(null!==u)if(Array.isArray(h)){var _=0;for(p=g.length;_<p;_++){var M=g[_],E=h[M.materialIndex],S=Math.max(M.start,v.start);for(d=c=Math.min(M.start+M.count,v.start+v.count);S<d;S+=3){c=u.getX(S);var T=u.getX(S+1),A=u.getX(S+2);(c=e(this,E,r,a,l,f,m,c,T,A))&&(c.faceIndex=Math.floor(S/3),c.face.materialIndex=M.materialIndex,s.push(c))}}}else for(_=S=Math.max(0,v.start),p=c=Math.min(u.count,v.start+v.count);_<p;_+=3)c=u.getX(_),T=u.getX(_+1),A=u.getX(_+2),(c=e(this,h,r,a,l,f,m,c,T,A))&&(c.faceIndex=Math.floor(_/3),s.push(c));else if(void 0!==l)if(Array.isArray(h))for(_=0,p=g.length;_<p;_++)for(E=h[(M=g[_]).materialIndex],S=Math.max(M.start,v.start),d=c=Math.min(M.start+M.count,v.start+v.count);S<d;S+=3)(c=e(this,E,r,a,l,f,m,c=S,T=S+1,A=S+2))&&(c.faceIndex=Math.floor(S/3),c.face.materialIndex=M.materialIndex,s.push(c));else for(_=S=Math.max(0,v.start),p=c=Math.min(l.count,v.start+v.count);_<p;_+=3)(c=e(this,h,r,a,l,f,m,c=_,T=_+1,A=_+2))&&(c.faceIndex=Math.floor(_/3),s.push(c))}else if(c.isGeometry)for(l=Array.isArray(h),f=c.vertices,m=c.faces,0<(c=c.faceVertexUvs[0]).length&&(u=c),p=0,M=m.length;p<M;p++)E=m[p],void 0!==(c=l?h[E.materialIndex]:h)&&(g=f[E.a],v=f[E.b],_=f[E.c],c=t(this,c,r,a,g,v,_,w))&&(u&&u[p]&&(S=u[p],y.copy(S[0]),x.copy(S[1]),b.copy(S[2]),c.uv=X.getUV(w,g,v,_,y,x,b,new n)),c.face=E,c.faceIndex=p,s.push(c))}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),st.prototype=Object.create(o.prototype),st.prototype.constructor=st,st.prototype.isCubeTexture=!0,Object.defineProperty(st.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}}),ct.prototype=Object.create(o.prototype),ct.prototype.constructor=ct,ct.prototype.isDataTexture2DArray=!0,ht.prototype=Object.create(o.prototype),ht.prototype.constructor=ht,ht.prototype.isDataTexture3D=!0;var wa=new o,_a=new ct,Ma=new ht,Ea=new st,Sa=[],Ta=[],Aa=new Float32Array(16),La=new Float32Array(9),Ra=new Float32Array(4);Ft.prototype.updateCache=function(t){var e=this.cache;t instanceof Float32Array&&e.length!==t.length&&(this.cache=new Float32Array(t.length)),pt(e,t)},Ht.prototype.setValue=function(t,e,n){for(var i=this.seq,r=0,a=i.length;r!==a;++r){var o=i[r];o.setValue(t,e[o.id],n)}};var Pa=/([\w\d_]+)(\])?(\[|\.)?/g;kt.prototype.setValue=function(t,e,n,i){void 0!==(e=this.map[e])&&e.setValue(t,n,i)},kt.prototype.setOptional=function(t,e,n){void 0!==(e=e[n])&&this.setValue(t,n,e)},kt.upload=function(t,e,n,i){for(var r=0,a=e.length;r!==a;++r){var o=e[r],s=n[o.id];!1!==s.needsUpdate&&o.setValue(t,s.value,i)}},kt.seqWithValue=function(t,e){for(var n=[],i=0,r=t.length;i!==r;++i){var a=t[i];a.id in e&&n.push(a)}return n};var Ca=0,Oa=0;le.prototype=Object.create(j.prototype),le.prototype.constructor=le,le.prototype.isMeshDepthMaterial=!0,le.prototype.copy=function(t){return j.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},ue.prototype=Object.create(j.prototype),ue.prototype.constructor=ue,ue.prototype.isMeshDistanceMaterial=!0,ue.prototype.copy=function(t){return j.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},ge.prototype=Object.assign(Object.create(S.prototype),{constructor:ge,isGroup:!0}),ve.prototype=Object.assign(Object.create(S.prototype),{constructor:ve,isCamera:!0,copy:function(t,e){return S.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this},getWorldDirection:function(t){void 0===t&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),t=new r),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()},updateMatrixWorld:function(t){S.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),ye.prototype=Object.assign(Object.create(ve.prototype),{constructor:ye,isPerspectiveCamera:!0,copy:function(t,e){return ve.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){t=.5*this.getFilmHeight()/t,this.fov=2*ca.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*ca.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*ca.RAD2DEG*Math.atan(Math.tan(.5*ca.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,n,i,r,a){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*ca.DEG2RAD*this.fov)/this.zoom,n=2*e,i=this.aspect*n,r=-.5*i,a=this.view;if(null!==this.view&&this.view.enabled){var o=a.fullWidth,s=a.fullHeight;r+=a.offsetX*i/o,e-=a.offsetY*n/s,i*=a.width/o,n*=a.height/s}0!==(a=this.filmOffset)&&(r+=t*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,e,e-n,t,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return(t=S.prototype.toJSON.call(this,t)).object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}),xe.prototype=Object.assign(Object.create(ye.prototype),{constructor:xe,isArrayCamera:!0});var Ia,Da=new r,Na=new r;Object.assign(Ee.prototype,{isFogExp2:!0,clone:function(){return new Ee(this.color,this.density)},toJSON:function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}),Object.assign(Se.prototype,{isFog:!0,clone:function(){return new Se(this.color,this.near,this.far)},toJSON:function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}),Te.prototype=Object.assign(Object.create(S.prototype),{constructor:Te,isScene:!0,copy:function(t,e){return S.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=S.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Ae.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Ae.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var i=0,r=this.stride;i<r;i++)this.array[t+i]=e.array[n+i];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Object.defineProperties(Le.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Le.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=i,this},setXYZW:function(t,e,n,i,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=i,this.data.array[t+3]=r,this}}),Re.prototype=Object.create(j.prototype),Re.prototype.constructor=Re,Re.prototype.isSpriteMaterial=!0,Re.prototype.copy=function(t){return j.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this},Pe.prototype=Object.assign(Object.create(S.prototype),{constructor:Pe,isSprite:!0,raycast:function(){function t(t,e,n,i,r,a){o.subVectors(t,n).addScalar(.5).multiply(i),void 0!==r?(s.x=a*o.x-r*o.y,s.y=r*o.x+a*o.y):s.copy(o),t.copy(e),t.x+=s.x,t.y+=s.y,t.applyMatrix4(c)}var e=new r,i=new r,a=new r,o=new n,s=new n,c=new g,h=new r,l=new r,u=new r,p=new n,d=new n,f=new n;return function(r,o){i.setFromMatrixScale(this.matrixWorld),c.getInverse(this.modelViewMatrix).premultiply(this.matrixWorld),a.setFromMatrixPosition(this.modelViewMatrix);var s=this.material.rotation;if(0!==s)var m=Math.cos(s),g=Math.sin(s);s=this.center,t(h.set(-.5,-.5,0),a,s,i,g,m),t(l.set(.5,-.5,0),a,s,i,g,m),t(u.set(.5,.5,0),a,s,i,g,m),p.set(0,0),d.set(1,0),f.set(1,1);var v=r.ray.intersectTriangle(h,l,u,!1,e);null===v&&(t(l.set(-.5,.5,0),a,s,i,g,m),d.set(0,1),null===(v=r.ray.intersectTriangle(h,u,l,!1,e)))||(g=r.ray.origin.distanceTo(e))<r.near||g>r.far||o.push({distance:g,point:e.clone(),uv:X.getUV(e,h,l,u,p,d,f,new n),face:null,object:this})}}(),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return S.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this}}),Ce.prototype=Object.assign(Object.create(S.prototype),{constructor:Ce,isLOD:!0,copy:function(t){S.prototype.copy.call(this,t,!1);for(var e=0,n=(t=t.levels).length;e<n;e++){var i=t[e];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var n=this.levels,i=0;i<n.length&&!(e<n[i].distance);i++);return n.splice(i,0,{distance:e,object:t}),this.add(t),this},getObjectForDistance:function(t){for(var e=this.levels,n=1,i=e.length;n<i&&!(t<e[n].distance);n++);return e[n-1].object},raycast:function(){var t=new r;return function(e,n){t.setFromMatrixPosition(this.matrixWorld);var i=e.ray.origin.distanceTo(t);this.getObjectForDistance(i).raycast(e,n)}}(),update:function(){var t=new r,e=new r;return function(n){var i=this.levels;if(1<i.length){t.setFromMatrixPosition(n.matrixWorld),e.setFromMatrixPosition(this.matrixWorld),n=t.distanceTo(e),i[0].object.visible=!0;for(var r=1,a=i.length;r<a&&n>=i[r].distance;r++)i[r-1].object.visible=!1,i[r].object.visible=!0;for(;r<a;r++)i[r].object.visible=!1}}}(),toJSON:function(t){(t=S.prototype.toJSON.call(this,t)).object.levels=[];for(var e=this.levels,n=0,i=e.length;n<i;n++){var r=e[n];t.object.levels.push({object:r.object.uuid,distance:r.distance})}return t}}),Oe.prototype=Object.assign(Object.create(J.prototype),{constructor:Oe,isSkinnedMesh:!0,bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){for(var t=new s,e=this.geometry.attributes.skinWeight,n=0,i=e.count;n<i;n++){t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.w=e.getW(n);var r=1/t.manhattanLength();1/0!==r?t.multiplyScalar(r):t.set(1,0,0,0),e.setXYZW(n,t.x,t.y,t.z,t.w)}},updateMatrixWorld:function(t){J.prototype.updateMatrixWorld.call(this,t),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Object.assign(Ie.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var n=new g;this.bones[t]&&n.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(n)}},pose:function(){var t,e,n=0;for(e=this.bones.length;n<e;n++)(t=this.bones[n])&&t.matrixWorld.getInverse(this.boneInverses[n]);for(n=0,e=this.bones.length;n<e;n++)(t=this.bones[n])&&(t.parent&&t.parent.isBone?(t.matrix.getInverse(t.parent.matrixWorld),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))},update:function(){var t=new g,e=new g;return function(){for(var n=this.bones,i=this.boneInverses,r=this.boneMatrices,a=this.boneTexture,o=0,s=n.length;o<s;o++)t.multiplyMatrices(n[o]?n[o].matrixWorld:e,i[o]),t.toArray(r,16*o);void 0!==a&&(a.needsUpdate=!0)}}(),clone:function(){return new Ie(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,n=this.bones.length;e<n;e++){var i=this.bones[e];if(i.name===t)return i}}}),De.prototype=Object.assign(Object.create(S.prototype),{constructor:De,isBone:!0}),Ne.prototype=Object.create(j.prototype),Ne.prototype.constructor=Ne,Ne.prototype.isLineBasicMaterial=!0,Ne.prototype.copy=function(t){return j.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Be.prototype=Object.assign(Object.create(S.prototype),{constructor:Be,isLine:!0,computeLineDistances:function(){var t=new r,e=new r;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var i=n.attributes.position,r=[0],a=1,o=i.count;a<o;a++)t.fromBufferAttribute(i,a-1),e.fromBufferAttribute(i,a),r[a]=r[a-1],r[a]+=t.distanceTo(e);n.addAttribute("lineDistance",new N(r,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry)for(i=n.vertices,(r=n.lineDistances)[0]=0,a=1,o=i.length;a<o;a++)r[a]=r[a-1],r[a]+=i[a-1].distanceTo(i[a]);return this}}(),raycast:function(){var t=new g,e=new q,n=new d;return function(i,a){var o=i.linePrecision,s=this.geometry,c=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(c),n.radius+=o,!1!==i.ray.intersectsSphere(n)){t.getInverse(c),e.copy(i.ray).applyMatrix4(t),o/=(this.scale.x+this.scale.y+this.scale.z)/3,o*=o;var h=new r,l=new r;c=new r;var u=new r,p=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var d=s.index,f=s.attributes.position.array;if(null!==d){s=0;for(var m=(d=d.array).length-1;s<m;s+=p){var g=d[s+1];h.fromArray(f,3*d[s]),l.fromArray(f,3*g),(g=e.distanceSqToSegment(h,l,u,c))>o||(u.applyMatrix4(this.matrixWorld),(g=i.ray.origin.distanceTo(u))<i.near||g>i.far||a.push({distance:g,point:c.clone().applyMatrix4(this.matrixWorld),index:s,face:null,faceIndex:null,object:this}))}}else for(s=0,m=f.length/3-1;s<m;s+=p)h.fromArray(f,3*s),l.fromArray(f,3*s+3),(g=e.distanceSqToSegment(h,l,u,c))>o||(u.applyMatrix4(this.matrixWorld),(g=i.ray.origin.distanceTo(u))<i.near||g>i.far||a.push({distance:g,point:c.clone().applyMatrix4(this.matrixWorld),index:s,face:null,faceIndex:null,object:this}))}else if(s.isGeometry)for(l=(h=s.vertices).length,s=0;s<l-1;s+=p)(g=e.distanceSqToSegment(h[s],h[s+1],u,c))>o||(u.applyMatrix4(this.matrixWorld),(g=i.ray.origin.distanceTo(u))<i.near||g>i.far||a.push({distance:g,point:c.clone().applyMatrix4(this.matrixWorld),index:s,face:null,faceIndex:null,object:this}))}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),ze.prototype=Object.assign(Object.create(Be.prototype),{constructor:ze,isLineSegments:!0,computeLineDistances:function(){var t=new r,e=new r;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var i=n.attributes.position,r=[],a=0,o=i.count;a<o;a+=2)t.fromBufferAttribute(i,a),e.fromBufferAttribute(i,a+1),r[a]=0===a?0:r[a-1],r[a+1]=r[a]+t.distanceTo(e);n.addAttribute("lineDistance",new N(r,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry)for(i=n.vertices,r=n.lineDistances,a=0,o=i.length;a<o;a+=2)t.copy(i[a]),e.copy(i[a+1]),r[a]=0===a?0:r[a-1],r[a+1]=r[a]+t.distanceTo(e);return this}}()}),Ue.prototype=Object.assign(Object.create(Be.prototype),{constructor:Ue,isLineLoop:!0}),Ge.prototype=Object.create(j.prototype),Ge.prototype.constructor=Ge,Ge.prototype.isPointsMaterial=!0,Ge.prototype.copy=function(t){return j.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.morphTargets=t.morphTargets,this},Fe.prototype=Object.assign(Object.create(S.prototype),{constructor:Fe,isPoints:!0,raycast:function(){var t=new g,e=new q,n=new d;return function(i,a){function o(t,n){var r=e.distanceSqToPoint(t);r<u&&(e.closestPointToPoint(t,p),p.applyMatrix4(h),(t=i.ray.origin.distanceTo(p))<i.near||t>i.far||a.push({distance:t,distanceToRay:Math.sqrt(r),point:p.clone(),index:n,face:null,object:s}))}var s=this,c=this.geometry,h=this.matrixWorld,l=i.params.Points.threshold;if(null===c.boundingSphere&&c.computeBoundingSphere(),n.copy(c.boundingSphere),n.applyMatrix4(h),n.radius+=l,!1!==i.ray.intersectsSphere(n)){t.getInverse(h),e.copy(i.ray).applyMatrix4(t);var u=(l/=(this.scale.x+this.scale.y+this.scale.z)/3)*l;l=new r;var p=new r;if(c.isBufferGeometry){var d=c.index;if(c=c.attributes.position.array,null!==d){var f=d.array;d=0;for(var m=f.length;d<m;d++){var g=f[d];l.fromArray(c,3*g),o(l,g)}}else for(d=0,f=c.length/3;d<f;d++)l.fromArray(c,3*d),o(l,d)}else for(d=0,f=(l=c.vertices).length;d<f;d++)o(l[d],d)}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),He.prototype=Object.assign(Object.create(o.prototype),{constructor:He,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),ke.prototype=Object.create(o.prototype),ke.prototype.constructor=ke,ke.prototype.isCompressedTexture=!0,Ve.prototype=Object.create(o.prototype),Ve.prototype.constructor=Ve,Ve.prototype.isCanvasTexture=!0,je.prototype=Object.create(o.prototype),je.prototype.constructor=je,je.prototype.isDepthTexture=!0,We.prototype=Object.create(G.prototype),We.prototype.constructor=We,qe.prototype=Object.create(T.prototype),qe.prototype.constructor=qe,Xe.prototype=Object.create(G.prototype),Xe.prototype.constructor=Xe,Ye.prototype=Object.create(T.prototype),Ye.prototype.constructor=Ye,Je.prototype=Object.create(G.prototype),Je.prototype.constructor=Je,Ze.prototype=Object.create(T.prototype),Ze.prototype.constructor=Ze,Qe.prototype=Object.create(Je.prototype),Qe.prototype.constructor=Qe,Ke.prototype=Object.create(T.prototype),Ke.prototype.constructor=Ke,$e.prototype=Object.create(Je.prototype),$e.prototype.constructor=$e,tn.prototype=Object.create(T.prototype),tn.prototype.constructor=tn,en.prototype=Object.create(Je.prototype),en.prototype.constructor=en,nn.prototype=Object.create(T.prototype),nn.prototype.constructor=nn,rn.prototype=Object.create(Je.prototype),rn.prototype.constructor=rn,an.prototype=Object.create(T.prototype),an.prototype.constructor=an,on.prototype=Object.create(G.prototype),on.prototype.constructor=on,on.prototype.toJSON=function(){var t=G.prototype.toJSON.call(this);return t.path=this.parameters.path.toJSON(),t},sn.prototype=Object.create(T.prototype),sn.prototype.constructor=sn,cn.prototype=Object.create(G.prototype),cn.prototype.constructor=cn,hn.prototype=Object.create(T.prototype),hn.prototype.constructor=hn,ln.prototype=Object.create(G.prototype),ln.prototype.constructor=ln;var Ba=function(t,e,n){n=n||2;var i,r=e&&e.length,a=r?e[0]*n:t.length,o=un(t,0,a,n,!0),s=[];if(!o)return s;if(r){var c,h=n;r=[];var l=0;for(c=e.length;l<c;l++){var u=e[l]*h;(u=un(t,u,l<c-1?e[l+1]*h:t.length,h,!1))===u.next&&(u.steiner=!0),r.push(gn(u))}for(r.sort(dn),l=0;l<r.length;l++)(h=fn(e=r[l],h=o))&&pn(e=_n(h,e),e.next),o=pn(o,o.next)}if(t.length>80*n){var p=i=t[0],d=r=t[1];for(h=n;h<a;h+=n)(l=t[h])<p&&(p=l),(e=t[h+1])<d&&(d=e),l>i&&(i=l),e>r&&(r=e);i=0!==(i=Math.max(i-p,r-d))?1/i:0}return function t(e,n,i,r,a,o,s){if(e){if(!s&&o){var c=e,h=c;do{null===h.z&&(h.z=mn(h.x,h.y,r,a,o)),h.prevZ=h.prev,h=h.nextZ=h.next}while(h!==c);h.prevZ.nextZ=null,h.prevZ=null,c=h;var l,u,p,d,f=1;do{h=c;var m=c=null;for(u=0;h;){u++;var g=h;for(l=p=0;l<f&&(p++,g=g.nextZ);l++);for(d=f;0<p||0<d&&g;)0!==p&&(0===d||!g||h.z<=g.z)?(l=h,h=h.nextZ,p--):(l=g,g=g.nextZ,d--),m?m.nextZ=l:c=l,l.prevZ=m,m=l;h=g}m.nextZ=null,f*=2}while(1<u)}for(c=e;e.prev!==e.next;){if(h=e.prev,g=e.next,o)t:{d=r;var v=a,y=o;if(0<=yn(u=(m=e).prev,p=m,f=m.next))m=!1;else{var x=u.x>p.x?u.x>f.x?u.x:f.x:p.x>f.x?p.x:f.x,b=u.y>p.y?u.y>f.y?u.y:f.y:p.y>f.y?p.y:f.y;for(l=mn(u.x<p.x?u.x<f.x?u.x:f.x:p.x<f.x?p.x:f.x,u.y<p.y?u.y<f.y?u.y:f.y:p.y<f.y?p.y:f.y,d,v,y),d=mn(x,b,d,v,y),v=m.nextZ;v&&v.z<=d;){if(v!==m.prev&&v!==m.next&&vn(u.x,u.y,p.x,p.y,f.x,f.y,v.x,v.y)&&0<=yn(v.prev,v,v.next)){m=!1;break t}v=v.nextZ}for(v=m.prevZ;v&&v.z>=l;){if(v!==m.prev&&v!==m.next&&vn(u.x,u.y,p.x,p.y,f.x,f.y,v.x,v.y)&&0<=yn(v.prev,v,v.next)){m=!1;break t}v=v.prevZ}m=!0}}else t:if(m=e,u=m.prev,p=m,f=m.next,0<=yn(u,p,f))m=!1;else{for(l=m.next.next;l!==m.prev;){if(vn(u.x,u.y,p.x,p.y,f.x,f.y,l.x,l.y)&&0<=yn(l.prev,l,l.next)){m=!1;break t}l=l.next}m=!0}if(m)n.push(h.i/i),n.push(e.i/i),n.push(g.i/i),En(e),c=e=g.next;else if((e=g)===c){if(s){if(1===s){s=n,c=i,h=e;do{!xn(g=h.prev,m=h.next.next)&&bn(g,h,h.next,m)&&wn(g,m)&&wn(m,g)&&(s.push(g.i/c),s.push(h.i/c),s.push(m.i/c),En(h),En(h.next),h=e=m),h=h.next}while(h!==e);t(e=h,n,i,r,a,o,2)}else if(2===s)t:{s=e;do{for(c=s.next.next;c!==s.prev;){if(h=s.i!==c.i){if(g=c,m=(h=s).next.i!==g.i&&h.prev.i!==g.i){e:{m=h;do{if(m.i!==h.i&&m.next.i!==h.i&&m.i!==g.i&&m.next.i!==g.i&&bn(m,m.next,h,g)){m=!0;break e}m=m.next}while(m!==h);m=!1}m=!m}if(m=m&&wn(h,g)&&wn(g,h)){m=h,u=!1,p=(h.x+g.x)/2,g=(h.y+g.y)/2;do{m.y>g!=m.next.y>g&&m.next.y!==m.y&&p<(m.next.x-m.x)*(g-m.y)/(m.next.y-m.y)+m.x&&(u=!u),m=m.next}while(m!==h);m=u}h=m}if(h){e=_n(s,c),s=pn(s,s.next),e=pn(e,e.next),t(s,n,i,r,a,o),t(e,n,i,r,a,o);break t}c=c.next}s=s.next}while(s!==e)}}else t(pn(e),n,i,r,a,o,1);break}}}}(o,s,n,p,d,i),s},za={area:function(t){for(var e=t.length,n=0,i=e-1,r=0;r<e;i=r++)n+=t[i].x*t[r].y-t[r].x*t[i].y;return.5*n},isClockWise:function(t){return 0>za.area(t)},triangulateShape:function(t,e){var n=[],i=[],r=[];Tn(t),An(n,t);var a=t.length;for(e.forEach(Tn),t=0;t<e.length;t++)i.push(a),a+=e[t].length,An(n,e[t]);for(e=Ba(n,i),t=0;t<e.length;t+=3)r.push(e.slice(t,t+3));return r}};Ln.prototype=Object.create(T.prototype),Ln.prototype.constructor=Ln,Ln.prototype.toJSON=function(){var t=T.prototype.toJSON.call(this);return Pn(this.parameters.shapes,this.parameters.options,t)},Rn.prototype=Object.create(G.prototype),Rn.prototype.constructor=Rn,Rn.prototype.toJSON=function(){var t=G.prototype.toJSON.call(this);return Pn(this.parameters.shapes,this.parameters.options,t)};var Ua={generateTopUV:function(t,e,i,r,a){t=e[3*r],r=e[3*r+1];var o=e[3*a];return a=e[3*a+1],[new n(e[3*i],e[3*i+1]),new n(t,r),new n(o,a)]},generateSideWallUV:function(t,e,i,r,a,o){t=e[3*i];var s=e[3*i+1];i=e[3*i+2];var c=e[3*r],h=e[3*r+1];r=e[3*r+2];var l=e[3*a],u=e[3*a+1];a=e[3*a+2];var p=e[3*o],d=e[3*o+1];return e=e[3*o+2],.01>Math.abs(s-h)?[new n(t,1-i),new n(c,1-r),new n(l,1-a),new n(p,1-e)]:[new n(s,1-i),new n(h,1-r),new n(u,1-a),new n(d,1-e)]}};Cn.prototype=Object.create(T.prototype),Cn.prototype.constructor=Cn,On.prototype=Object.create(Rn.prototype),On.prototype.constructor=On,In.prototype=Object.create(T.prototype),In.prototype.constructor=In,Dn.prototype=Object.create(G.prototype),Dn.prototype.constructor=Dn,Nn.prototype=Object.create(T.prototype),Nn.prototype.constructor=Nn,Bn.prototype=Object.create(G.prototype),Bn.prototype.constructor=Bn,zn.prototype=Object.create(T.prototype),zn.prototype.constructor=zn,Un.prototype=Object.create(G.prototype),Un.prototype.constructor=Un,Gn.prototype=Object.create(T.prototype),Gn.prototype.constructor=Gn,Gn.prototype.toJSON=function(){var t=T.prototype.toJSON.call(this);return Hn(this.parameters.shapes,t)},Fn.prototype=Object.create(G.prototype),Fn.prototype.constructor=Fn,Fn.prototype.toJSON=function(){var t=G.prototype.toJSON.call(this);return Hn(this.parameters.shapes,t)},kn.prototype=Object.create(G.prototype),kn.prototype.constructor=kn,Vn.prototype=Object.create(T.prototype),Vn.prototype.constructor=Vn,jn.prototype=Object.create(G.prototype),jn.prototype.constructor=jn,Wn.prototype=Object.create(Vn.prototype),Wn.prototype.constructor=Wn,qn.prototype=Object.create(jn.prototype),qn.prototype.constructor=qn,Xn.prototype=Object.create(T.prototype),Xn.prototype.constructor=Xn,Yn.prototype=Object.create(G.prototype),Yn.prototype.constructor=Yn;var Ga=Object.freeze({WireframeGeometry:We,ParametricGeometry:qe,ParametricBufferGeometry:Xe,TetrahedronGeometry:Ze,TetrahedronBufferGeometry:Qe,OctahedronGeometry:Ke,OctahedronBufferGeometry:$e,IcosahedronGeometry:tn,IcosahedronBufferGeometry:en,DodecahedronGeometry:nn,DodecahedronBufferGeometry:rn,PolyhedronGeometry:Ye,PolyhedronBufferGeometry:Je,TubeGeometry:an,TubeBufferGeometry:on,TorusKnotGeometry:sn,TorusKnotBufferGeometry:cn,TorusGeometry:hn,TorusBufferGeometry:ln,TextGeometry:Cn,TextBufferGeometry:On,SphereGeometry:In,SphereBufferGeometry:Dn,RingGeometry:Nn,RingBufferGeometry:Bn,PlaneGeometry:k,PlaneBufferGeometry:V,LatheGeometry:zn,LatheBufferGeometry:Un,ShapeGeometry:Gn,ShapeBufferGeometry:Fn,ExtrudeGeometry:Ln,ExtrudeBufferGeometry:Rn,EdgesGeometry:kn,ConeGeometry:Wn,ConeBufferGeometry:qn,CylinderGeometry:Vn,CylinderBufferGeometry:jn,CircleGeometry:Xn,CircleBufferGeometry:Yn,BoxGeometry:F,BoxBufferGeometry:H});Jn.prototype=Object.create(j.prototype),Jn.prototype.constructor=Jn,Jn.prototype.isShadowMaterial=!0,Jn.prototype.copy=function(t){return j.prototype.copy.call(this,t),this.color.copy(t.color),this},Zn.prototype=Object.create(W.prototype),Zn.prototype.constructor=Zn,Zn.prototype.isRawShaderMaterial=!0,Qn.prototype=Object.create(j.prototype),Qn.prototype.constructor=Qn,Qn.prototype.isMeshStandardMaterial=!0,Qn.prototype.copy=function(t){return j.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Kn.prototype=Object.create(Qn.prototype),Kn.prototype.constructor=Kn,Kn.prototype.isMeshPhysicalMaterial=!0,Kn.prototype.copy=function(t){return Qn.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},$n.prototype=Object.create(j.prototype),$n.prototype.constructor=$n,$n.prototype.isMeshPhongMaterial=!0,$n.prototype.copy=function(t){return j.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},ti.prototype=Object.create($n.prototype),ti.prototype.constructor=ti,ti.prototype.isMeshToonMaterial=!0,ti.prototype.copy=function(t){return $n.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},ei.prototype=Object.create(j.prototype),ei.prototype.constructor=ei,ei.prototype.isMeshNormalMaterial=!0,ei.prototype.copy=function(t){return j.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},ni.prototype=Object.create(j.prototype),ni.prototype.constructor=ni,ni.prototype.isMeshLambertMaterial=!0,ni.prototype.copy=function(t){return j.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},ii.prototype=Object.create(j.prototype),ii.prototype.constructor=ii,ii.prototype.isMeshMatcapMaterial=!0,ii.prototype.copy=function(t){return j.prototype.copy.call(this,t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},ri.prototype=Object.create(Ne.prototype),ri.prototype.constructor=ri,ri.prototype.isLineDashedMaterial=!0,ri.prototype.copy=function(t){return Ne.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Fa=Object.freeze({ShadowMaterial:Jn,SpriteMaterial:Re,RawShaderMaterial:Zn,ShaderMaterial:W,PointsMaterial:Ge,MeshPhysicalMaterial:Kn,MeshStandardMaterial:Qn,MeshPhongMaterial:$n,MeshToonMaterial:ti,MeshNormalMaterial:ei,MeshLambertMaterial:ni,MeshDepthMaterial:le,MeshDistanceMaterial:ue,MeshBasicMaterial:Y,MeshMatcapMaterial:ii,LineDashedMaterial:ri,LineBasicMaterial:Ne,Material:j}),Ha={arraySlice:function(t,e,n){return Ha.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,n=Array(e),i=0;i!==e;++i)n[i]=i;return n.sort(function(e,n){return t[e]-t[n]}),n},sortedArray:function(t,e,n){for(var i=t.length,r=new t.constructor(i),a=0,o=0;o!==i;++a)for(var s=n[a]*e,c=0;c!==e;++c)r[o++]=t[s+c];return r},flattenJSON:function(t,e,n,i){for(var r=1,a=t[0];void 0!==a&&void 0===a[i];)a=t[r++];if(void 0!==a){var o=a[i];if(void 0!==o)if(Array.isArray(o))do{void 0!==(o=a[i])&&(e.push(a.time),n.push.apply(n,o)),a=t[r++]}while(void 0!==a);else if(void 0!==o.toArray)do{void 0!==(o=a[i])&&(e.push(a.time),o.toArray(n,n.length)),a=t[r++]}while(void 0!==a);else do{void 0!==(o=a[i])&&(e.push(a.time),n.push(o)),a=t[r++]}while(void 0!==a)}}};Object.assign(ai.prototype,{evaluate:function(t){var e=this.parameterPositions,n=this._cachedIndex,i=e[n],r=e[n-1];t:{e:{n:{i:if(!(t<i)){for(var a=n+2;;){if(void 0===i){if(t<r)break i;return this._cachedIndex=n=e.length,this.afterEnd_(n-1,t,r)}if(n===a)break;if(r=i,t<(i=e[++n]))break e}i=e.length;break n}if(t>=r)break t;for(t<(a=e[1])&&(n=2,r=a),a=n-2;;){if(void 0===r)return this._cachedIndex=0,this.beforeStart_(0,t,i);if(n===a)break;if(i=r,t>=(r=e[--n-1]))break e}i=n,n=0}for(;n<i;)t<e[r=n+i>>>1]?i=r:n=r+1;if(i=e[n],void 0===(r=e[n-1]))return this._cachedIndex=0,this.beforeStart_(0,t,i);if(void 0===i)return this._cachedIndex=n=e.length,this.afterEnd_(n-1,r,t)}this._cachedIndex=n,this.intervalChanged_(n,r,i)}return this.interpolate_(n,r,t,i)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){var e=this.resultBuffer,n=this.sampleValues,i=this.valueSize;t*=i;for(var r=0;r!==i;++r)e[r]=n[t+r];return e},interpolate_:function(){throw Error("call to abstract method")},intervalChanged_:function(){}}),Object.assign(ai.prototype,{beforeStart_:ai.prototype.copySampleValue_,afterEnd_:ai.prototype.copySampleValue_}),oi.prototype=Object.assign(Object.create(ai.prototype),{constructor:oi,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(t,e,n){var i=this.parameterPositions,r=t-2,a=t+1,o=i[r],s=i[a];if(void 0===o)switch(this.getSettings_().endingStart){case 2401:r=t,o=2*e-n;break;case 2402:o=e+i[r=i.length-2]-i[r+1];break;default:r=t,o=n}if(void 0===s)switch(this.getSettings_().endingEnd){case 2401:a=t,s=2*n-e;break;case 2402:a=1,s=n+i[1]-i[0];break;default:a=t-1,s=e}t=.5*(n-e),i=this.valueSize,this._weightPrev=t/(e-o),this._weightNext=t/(s-n),this._offsetPrev=r*i,this._offsetNext=a*i},interpolate_:function(t,e,n,i){var r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=(t*=o)-o,c=this._offsetPrev,h=this._offsetNext,l=this._weightPrev,u=this._weightNext,p=(n-e)/(i-e);for(e=-l*(i=(n=p*p)*p)+2*l*n-l*p,l=(1+l)*i+(-1.5-2*l)*n+(-.5+l)*p+1,p=(-1-u)*i+(1.5+u)*n+.5*p,u=u*i-u*n,n=0;n!==o;++n)r[n]=e*a[c+n]+l*a[s+n]+p*a[t+n]+u*a[h+n];return r}}),si.prototype=Object.assign(Object.create(ai.prototype),{constructor:si,interpolate_:function(t,e,n,i){var r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=(t*=o)-o;for(n=1-(e=(n-e)/(i-e)),i=0;i!==o;++i)r[i]=a[s+i]*n+a[t+i]*e;return r}}),ci.prototype=Object.assign(Object.create(ai.prototype),{constructor:ci,interpolate_:function(t){return this.copySampleValue_(t-1)}}),Object.assign(hi,{toJSON:function(t){var e=t.constructor;if(void 0!==e.toJSON)e=e.toJSON(t);else{e={name:t.name,times:Ha.convertArray(t.times,Array),values:Ha.convertArray(t.values,Array)};var n=t.getInterpolation();n!==t.DefaultInterpolation&&(e.interpolation=n)}return e.type=t.ValueTypeName,e}}),Object.assign(hi.prototype,{constructor:hi,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(t){return new ci(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new si(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new oi(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){switch(t){case 2300:var e=this.InterpolantFactoryMethodDiscrete;break;case 2301:e=this.InterpolantFactoryMethodLinear;break;case 2302:e=this.InterpolantFactoryMethodSmooth}if(void 0===e){if(e="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name,void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw Error(e);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",e),this}return this.createInterpolant=e,this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,n=0,i=e.length;n!==i;++n)e[n]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,n=0,i=e.length;n!==i;++n)e[n]*=t;return this},trim:function(t,e){for(var n=this.times,i=n.length,r=0,a=i-1;r!==i&&n[r]<t;)++r;for(;-1!==a&&n[a]>e;)--a;return++a,0===r&&a===i||(r>=a&&(r=(a=Math.max(a,1))-1),t=this.getValueSize(),this.times=Ha.arraySlice(n,r,a),this.values=Ha.arraySlice(this.values,r*t,a*t)),this},validate:function(){var t=!0,e=this.getValueSize();0!=e-Math.floor(e)&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var n=this.times;e=this.values;var i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var r=null,a=0;a!==i;a++){var o=n[a];if("number"==typeof o&&isNaN(o)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,o),t=!1;break}if(null!==r&&r>o){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,o,r),t=!1;break}r=o}if(void 0!==e&&Ha.isTypedArray(e))for(a=0,n=e.length;a!==n;++a)if(i=e[a],isNaN(i)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,i),t=!1;break}return t},optimize:function(){for(var t=this.times,e=this.values,n=this.getValueSize(),i=2302===this.getInterpolation(),r=1,a=t.length-1,o=1;o<a;++o){var s=!1,c=t[o];if(c!==t[o+1]&&(1!==o||c!==c[0]))if(i)s=!0;else{var h=o*n,l=h-n,u=h+n;for(c=0;c!==n;++c){var p=e[h+c];if(p!==e[l+c]||p!==e[u+c]){s=!0;break}}}if(s){if(o!==r)for(t[r]=t[o],s=o*n,h=r*n,c=0;c!==n;++c)e[h+c]=e[s+c];++r}}if(0<a){for(t[r]=t[a],s=a*n,h=r*n,c=0;c!==n;++c)e[h+c]=e[s+c];++r}return r!==t.length&&(this.times=Ha.arraySlice(t,0,r),this.values=Ha.arraySlice(e,0,r*n)),this},clone:function(){var t=Ha.arraySlice(this.times,0),e=Ha.arraySlice(this.values,0);return(t=new this.constructor(this.name,t,e)).createInterpolant=this.createInterpolant,t}}),li.prototype=Object.assign(Object.create(hi.prototype),{constructor:li,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),ui.prototype=Object.assign(Object.create(hi.prototype),{constructor:ui,ValueTypeName:"color"}),pi.prototype=Object.assign(Object.create(hi.prototype),{constructor:pi,ValueTypeName:"number"}),di.prototype=Object.assign(Object.create(ai.prototype),{constructor:di,interpolate_:function(t,e,n,r){var a=this.resultBuffer,o=this.sampleValues,s=this.valueSize;for(e=(n-e)/(r-e),n=(t*=s)+s;t!==n;t+=4)i.slerpFlat(a,0,o,t-s,o,t,e);return a}}),fi.prototype=Object.assign(Object.create(hi.prototype),{constructor:fi,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(t){return new di(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),mi.prototype=Object.assign(Object.create(hi.prototype),{constructor:mi,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),gi.prototype=Object.assign(Object.create(hi.prototype),{constructor:gi,ValueTypeName:"vector"}),Object.assign(vi,{parse:function(t){for(var e=[],n=t.tracks,i=1/(t.fps||1),r=0,a=n.length;r!==a;++r)e.push(yi(n[r]).scale(i));return new vi(t.name,t.duration,e)},toJSON:function(t){var e=[],n=t.tracks;t={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid};for(var i=0,r=n.length;i!==r;++i)e.push(hi.toJSON(n[i]));return t},CreateFromMorphTargetSequence:function(t,e,n,i){for(var r=e.length,a=[],o=0;o<r;o++){var s=[],c=[];s.push((o+r-1)%r,o,(o+1)%r),c.push(0,1,0);var h=Ha.getKeyframeOrder(s);s=Ha.sortedArray(s,1,h),c=Ha.sortedArray(c,1,h),i||0!==s[0]||(s.push(r),c.push(c[0])),a.push(new pi(".morphTargetInfluences["+e[o].name+"]",s,c).scale(1/n))}return new vi(t,-1,a)},findByName:function(t,e){var n=t;for(Array.isArray(t)||(n=t.geometry&&t.geometry.animations||t.animations),t=0;t<n.length;t++)if(n[t].name===e)return n[t];return null},CreateClipsFromMorphTargetSequences:function(t,e,n){for(var i={},r=/^([\w-]*?)([\d]+)$/,a=0,o=t.length;a<o;a++){var s=t[a],c=s.name.match(r);if(c&&1<c.length){var h=c[1];(c=i[h])||(i[h]=c=[]),c.push(s)}}for(h in t=[],i)t.push(vi.CreateFromMorphTargetSequence(h,i[h],e,n));return t},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;var n=function(t,e,n,i,r){if(0!==n.length){var a=[],o=[];Ha.flattenJSON(n,a,o,i),0!==a.length&&r.push(new t(e,a,o))}},i=[],r=t.name||"default",a=t.length||-1,o=t.fps||30;t=t.hierarchy||[];for(var s=0;s<t.length;s++){var c=t[s].keys;if(c&&0!==c.length)if(c[0].morphTargets){a={};for(var h=0;h<c.length;h++)if(c[h].morphTargets)for(var l=0;l<c[h].morphTargets.length;l++)a[c[h].morphTargets[l]]=-1;for(var u in a){var p=[],d=[];for(l=0;l!==c[h].morphTargets.length;++l){var f=c[h];p.push(f.time),d.push(f.morphTarget===u?1:0)}i.push(new pi(".morphTargetInfluence["+u+"]",p,d))}a=a.length*(o||1)}else n(gi,(h=".bones["+e[s].name+"]")+".position",c,"pos",i),n(fi,h+".quaternion",c,"rot",i),n(gi,h+".scale",c,"scl",i)}return 0===i.length?null:new vi(r,a,i)}}),Object.assign(vi.prototype,{resetDuration:function(){for(var t=0,e=0,n=this.tracks.length;e!==n;++e){var i=this.tracks[e];t=Math.max(t,i.times[i.times.length-1])}return this.duration=t,this},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},validate:function(){for(var t=!0,e=0;e<this.tracks.length;e++)t=t&&this.tracks[e].validate();return t},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this},clone:function(){for(var t=[],e=0;e<this.tracks.length;e++)t.push(this.tracks[e].clone());return new vi(this.name,this.duration,t)}});var ka={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}},Va=new xi,ja={};Object.assign(bi.prototype,{load:function(t,e,n,i){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var r=this,a=ka.get(t);if(void 0!==a)return r.manager.itemStart(t),setTimeout(function(){e&&e(a),r.manager.itemEnd(t)},0),a;if(void 0===ja[t]){var o=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(o){n=o[1];var s=!!o[2];o=o[3],o=decodeURIComponent(o),s&&(o=atob(o));try{var c=(this.responseType||"").toLowerCase();switch(c){case"arraybuffer":case"blob":var h=new Uint8Array(o.length);for(s=0;s<o.length;s++)h[s]=o.charCodeAt(s);var l="blob"===c?new Blob([h.buffer],{type:n}):h.buffer;break;case"document":l=(new DOMParser).parseFromString(o,n);break;case"json":l=JSON.parse(o);break;default:l=o}setTimeout(function(){e&&e(l),r.manager.itemEnd(t)},0)}catch(e){setTimeout(function(){i&&i(e),r.manager.itemError(t),r.manager.itemEnd(t)},0)}}else{ja[t]=[],ja[t].push({onLoad:e,onProgress:n,onError:i});var u=new XMLHttpRequest;for(s in u.open("GET",t,!0),u.addEventListener("load",function(e){var n=this.response;ka.add(t,n);var i=ja[t];if(delete ja[t],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var a=0,o=i.length;a<o;a++){var s=i[a];s.onLoad&&s.onLoad(n)}}else{for(a=0,o=i.length;a<o;a++)(s=i[a]).onError&&s.onError(e);r.manager.itemError(t)}r.manager.itemEnd(t)},!1),u.addEventListener("progress",function(e){for(var n=ja[t],i=0,r=n.length;i<r;i++){var a=n[i];a.onProgress&&a.onProgress(e)}},!1),u.addEventListener("error",function(e){var n=ja[t];delete ja[t];for(var i=0,a=n.length;i<a;i++){var o=n[i];o.onError&&o.onError(e)}r.manager.itemError(t),r.manager.itemEnd(t)},!1),u.addEventListener("abort",function(e){var n=ja[t];delete ja[t];for(var i=0,a=n.length;i<a;i++){var o=n[i];o.onError&&o.onError(e)}r.manager.itemError(t),r.manager.itemEnd(t)},!1),void 0!==this.responseType&&(u.responseType=this.responseType),void 0!==this.withCredentials&&(u.withCredentials=this.withCredentials),u.overrideMimeType&&u.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)u.setRequestHeader(s,this.requestHeader[s]);u.send(null)}return r.manager.itemStart(t),u}ja[t].push({onLoad:e,onProgress:n,onError:i})},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(wi.prototype,{load:function(t,e,n,i){var r=this,a=new bi(r.manager);a.setPath(r.path),a.load(t,function(t){e(r.parse(JSON.parse(t)))},n,i)},parse:function(t){for(var e=[],n=0;n<t.length;n++){var i=vi.parse(t[n]);e.push(i)}return e},setPath:function(t){return this.path=t,this}}),Object.assign(_i.prototype,{load:function(t,e,n,i){function r(r){c.load(t[r],function(t){t=a._parser(t,!0),o[r]={width:t.width,height:t.height,format:t.format,mipmaps:t.mipmaps},6===(h+=1)&&(1===t.mipmapCount&&(s.minFilter=1006),s.format=t.format,s.needsUpdate=!0,e&&e(s))},n,i)}var a=this,o=[],s=new ke;s.image=o;var c=new bi(this.manager);if(c.setPath(this.path),c.setResponseType("arraybuffer"),Array.isArray(t))for(var h=0,l=0,u=t.length;l<u;++l)r(l);else c.load(t,function(t){if((t=a._parser(t,!0)).isCubemap)for(var n=t.mipmaps.length/t.mipmapCount,i=0;i<n;i++){o[i]={mipmaps:[]};for(var r=0;r<t.mipmapCount;r++)o[i].mipmaps.push(t.mipmaps[i*t.mipmapCount+r]),o[i].format=t.format,o[i].width=t.width,o[i].height=t.height}else s.image.width=t.width,s.image.height=t.height,s.mipmaps=t.mipmaps;1===t.mipmapCount&&(s.minFilter=1006),s.format=t.format,s.needsUpdate=!0,e&&e(s)},n,i);return s},setPath:function(t){return this.path=t,this}}),Object.assign(Mi.prototype,{load:function(t,e,n,i){var r=this,a=new u,o=new bi(this.manager);return o.setResponseType("arraybuffer"),o.setPath(this.path),o.load(t,function(t){(t=r._parser(t))&&(void 0!==t.image?a.image=t.image:void 0!==t.data&&(a.image.width=t.width,a.image.height=t.height,a.image.data=t.data),a.wrapS=void 0!==t.wrapS?t.wrapS:1001,a.wrapT=void 0!==t.wrapT?t.wrapT:1001,a.magFilter=void 0!==t.magFilter?t.magFilter:1006,a.minFilter=void 0!==t.minFilter?t.minFilter:1008,a.anisotropy=void 0!==t.anisotropy?t.anisotropy:1,void 0!==t.format&&(a.format=t.format),void 0!==t.type&&(a.type=t.type),void 0!==t.mipmaps&&(a.mipmaps=t.mipmaps),1===t.mipmapCount&&(a.minFilter=1006),a.needsUpdate=!0,e&&e(a,t))},n,i),a},setPath:function(t){return this.path=t,this}}),Object.assign(Ei.prototype,{crossOrigin:"anonymous",load:function(t,e,n,i){function r(){c.removeEventListener("load",r,!1),c.removeEventListener("error",a,!1),ka.add(t,this),e&&e(this),o.manager.itemEnd(t)}function a(e){c.removeEventListener("load",r,!1),c.removeEventListener("error",a,!1),i&&i(e),o.manager.itemError(t),o.manager.itemEnd(t)}void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var o=this,s=ka.get(t);if(void 0!==s)return o.manager.itemStart(t),setTimeout(function(){e&&e(s),o.manager.itemEnd(t)},0),s;var c=document.createElementNS("http://www.w3.org/1999/xhtml","img");return c.addEventListener("load",r,!1),c.addEventListener("error",a,!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(c.crossOrigin=this.crossOrigin),o.manager.itemStart(t),c.src=t,c},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Si.prototype,{crossOrigin:"anonymous",load:function(t,e,n,i){function r(n){o.load(t[n],function(t){a.images[n]=t,6===++s&&(a.needsUpdate=!0,e&&e(a))},void 0,i)}var a=new st,o=new Ei(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);var s=0;for(n=0;n<t.length;++n)r(n);return a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ti.prototype,{crossOrigin:"anonymous",load:function(t,e,n,i){var r=new o,a=new Ei(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(t,function(n){r.image=n,n=0<t.search(/\.jpe?g($|\?)/i)||0===t.search(/^data:image\/jpeg/),r.format=n?1022:1023,r.needsUpdate=!0,void 0!==e&&e(r)},n,i),r},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ai.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){return t=this.getUtoTmapping(t),this.getPoint(t,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,n=[],i=this.getPoint(0),r=0;for(n.push(0),e=1;e<=t;e++){var a=this.getPoint(e/t);r+=a.distanceTo(i),n.push(r),i=a}return this.cacheArcLengths=n},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n=this.getLengths(),i=n.length;e=e||t*n[i-1];for(var r,a=0,o=i-1;a<=o;)if(0>(r=n[t=Math.floor(a+(o-a)/2)]-e))a=t+1;else{if(!(0<r)){o=t;break}o=t-1}return n[t=o]===e?t/(i-1):(t+(e-(a=n[t]))/(n[t+1]-a))/(i-1)},getTangent:function(t){var e=t-1e-4;return 0>e&&(e=0),1<(t+=1e-4)&&(t=1),e=this.getPoint(e),this.getPoint(t).clone().sub(e).normalize()},getTangentAt:function(t){return t=this.getUtoTmapping(t),this.getTangent(t)},computeFrenetFrames:function(t,e){var n,i=new r,a=[],o=[],s=[],c=new r,h=new g;for(n=0;n<=t;n++){var l=n/t;a[n]=this.getTangentAt(l),a[n].normalize()}o[0]=new r,s[0]=new r,n=Number.MAX_VALUE,l=Math.abs(a[0].x);var u=Math.abs(a[0].y),p=Math.abs(a[0].z);for(l<=n&&(n=l,i.set(1,0,0)),u<=n&&(n=u,i.set(0,1,0)),p<=n&&i.set(0,0,1),c.crossVectors(a[0],i).normalize(),o[0].crossVectors(a[0],c),s[0].crossVectors(a[0],o[0]),n=1;n<=t;n++)o[n]=o[n-1].clone(),s[n]=s[n-1].clone(),c.crossVectors(a[n-1],a[n]),c.length()>Number.EPSILON&&(c.normalize(),i=Math.acos(ca.clamp(a[n-1].dot(a[n]),-1,1)),o[n].applyMatrix4(h.makeRotationAxis(c,i))),s[n].crossVectors(a[n],o[n]);if(!0===e)for(i=Math.acos(ca.clamp(o[0].dot(o[t]),-1,1)),i/=t,0<a[0].dot(c.crossVectors(o[0],o[t]))&&(i=-i),n=1;n<=t;n++)o[n].applyMatrix4(h.makeRotationAxis(a[n],i*n)),s[n].crossVectors(a[n],o[n]);return{tangents:a,normals:o,binormals:s}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Li.prototype=Object.create(Ai.prototype),Li.prototype.constructor=Li,Li.prototype.isEllipseCurve=!0,Li.prototype.getPoint=function(t,e){e=e||new n;for(var i=2*Math.PI,r=this.aEndAngle-this.aStartAngle,a=Math.abs(r)<Number.EPSILON;0>r;)r+=i;for(;r>i;)r-=i;r<Number.EPSILON&&(r=a?0:i),!0!==this.aClockwise||a||(r=r===i?-i:r-i),i=this.aStartAngle+t*r,t=this.aX+this.xRadius*Math.cos(i);var o=this.aY+this.yRadius*Math.sin(i);return 0!==this.aRotation&&(i=Math.cos(this.aRotation),r=Math.sin(this.aRotation),t=(a=t-this.aX)*i-(o-=this.aY)*r+this.aX,o=a*r+o*i+this.aY),e.set(t,o)},Li.prototype.copy=function(t){return Ai.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Li.prototype.toJSON=function(){var t=Ai.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Li.prototype.fromJSON=function(t){return Ai.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ri.prototype=Object.create(Li.prototype),Ri.prototype.constructor=Ri,Ri.prototype.isArcCurve=!0;var Wa=new r,qa=new Pi,Xa=new Pi,Ya=new Pi;Ci.prototype=Object.create(Ai.prototype),Ci.prototype.constructor=Ci,Ci.prototype.isCatmullRomCurve3=!0,Ci.prototype.getPoint=function(t,e){e=e||new r;var n=this.points,i=n.length;t*=i-(this.closed?0:1);var a=Math.floor(t);if(t-=a,this.closed?a+=0<a?0:(Math.floor(Math.abs(a)/i)+1)*i:0===t&&a===i-1&&(a=i-2,t=1),this.closed||0<a)var o=n[(a-1)%i];else Wa.subVectors(n[0],n[1]).add(n[0]),o=Wa;var s=n[a%i],c=n[(a+1)%i];if(this.closed||a+2<i?n=n[(a+2)%i]:(Wa.subVectors(n[i-1],n[i-2]).add(n[i-1]),n=Wa),"centripetal"===this.curveType||"chordal"===this.curveType){var h="chordal"===this.curveType?.5:.25;i=Math.pow(o.distanceToSquared(s),h),1e-4>(a=Math.pow(s.distanceToSquared(c),h))&&(a=1),1e-4>i&&(i=a),1e-4>(h=Math.pow(c.distanceToSquared(n),h))&&(h=a),qa.initNonuniformCatmullRom(o.x,s.x,c.x,n.x,i,a,h),Xa.initNonuniformCatmullRom(o.y,s.y,c.y,n.y,i,a,h),Ya.initNonuniformCatmullRom(o.z,s.z,c.z,n.z,i,a,h)}else"catmullrom"===this.curveType&&(qa.initCatmullRom(o.x,s.x,c.x,n.x,this.tension),Xa.initCatmullRom(o.y,s.y,c.y,n.y,this.tension),Ya.initCatmullRom(o.z,s.z,c.z,n.z,this.tension));return e.set(qa.calc(t),Xa.calc(t),Ya.calc(t)),e},Ci.prototype.copy=function(t){Ai.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++)this.points.push(t.points[e].clone());return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Ci.prototype.toJSON=function(){var t=Ai.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++)t.points.push(this.points[e].toArray());return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Ci.prototype.fromJSON=function(t){Ai.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var i=t.points[e];this.points.push((new r).fromArray(i))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Ni.prototype=Object.create(Ai.prototype),Ni.prototype.constructor=Ni,Ni.prototype.isCubicBezierCurve=!0,Ni.prototype.getPoint=function(t,e){e=e||new n;var i=this.v0,r=this.v1,a=this.v2,o=this.v3;return e.set(Di(t,i.x,r.x,a.x,o.x),Di(t,i.y,r.y,a.y,o.y)),e},Ni.prototype.copy=function(t){return Ai.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Ni.prototype.toJSON=function(){var t=Ai.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Ni.prototype.fromJSON=function(t){return Ai.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Bi.prototype=Object.create(Ai.prototype),Bi.prototype.constructor=Bi,Bi.prototype.isCubicBezierCurve3=!0,Bi.prototype.getPoint=function(t,e){e=e||new r;var n=this.v0,i=this.v1,a=this.v2,o=this.v3;return e.set(Di(t,n.x,i.x,a.x,o.x),Di(t,n.y,i.y,a.y,o.y),Di(t,n.z,i.z,a.z,o.z)),e},Bi.prototype.copy=function(t){return Ai.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Bi.prototype.toJSON=function(){var t=Ai.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Bi.prototype.fromJSON=function(t){return Ai.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},zi.prototype=Object.create(Ai.prototype),zi.prototype.constructor=zi,zi.prototype.isLineCurve=!0,zi.prototype.getPoint=function(t,e){return e=e||new n,1===t?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},zi.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},zi.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},zi.prototype.copy=function(t){return Ai.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},zi.prototype.toJSON=function(){var t=Ai.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},zi.prototype.fromJSON=function(t){return Ai.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Ui.prototype=Object.create(Ai.prototype),Ui.prototype.constructor=Ui,Ui.prototype.isLineCurve3=!0,Ui.prototype.getPoint=function(t,e){return e=e||new r,1===t?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},Ui.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ui.prototype.copy=function(t){return Ai.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ui.prototype.toJSON=function(){var t=Ai.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ui.prototype.fromJSON=function(t){return Ai.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Gi.prototype=Object.create(Ai.prototype),Gi.prototype.constructor=Gi,Gi.prototype.isQuadraticBezierCurve=!0,Gi.prototype.getPoint=function(t,e){e=e||new n;var i=this.v0,r=this.v1,a=this.v2;return e.set(Ii(t,i.x,r.x,a.x),Ii(t,i.y,r.y,a.y)),e},Gi.prototype.copy=function(t){return Ai.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Gi.prototype.toJSON=function(){var t=Ai.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Gi.prototype.fromJSON=function(t){return Ai.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Fi.prototype=Object.create(Ai.prototype),Fi.prototype.constructor=Fi,Fi.prototype.isQuadraticBezierCurve3=!0,Fi.prototype.getPoint=function(t,e){e=e||new r;var n=this.v0,i=this.v1,a=this.v2;return e.set(Ii(t,n.x,i.x,a.x),Ii(t,n.y,i.y,a.y),Ii(t,n.z,i.z,a.z)),e},Fi.prototype.copy=function(t){return Ai.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Fi.prototype.toJSON=function(){var t=Ai.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Fi.prototype.fromJSON=function(t){return Ai.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Hi.prototype=Object.create(Ai.prototype),Hi.prototype.constructor=Hi,Hi.prototype.isSplineCurve=!0,Hi.prototype.getPoint=function(t,e){e=e||new n;var i=this.points,r=(i.length-1)*t;r-=t=Math.floor(r);var a=i[0===t?t:t-1],o=i[t],s=i[t>i.length-2?i.length-1:t+1];return i=i[t>i.length-3?i.length-1:t+2],e.set(Oi(r,a.x,o.x,s.x,i.x),Oi(r,a.y,o.y,s.y,i.y)),e},Hi.prototype.copy=function(t){Ai.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++)this.points.push(t.points[e].clone());return this},Hi.prototype.toJSON=function(){var t=Ai.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++)t.points.push(this.points[e].toArray());return t},Hi.prototype.fromJSON=function(t){Ai.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var r=t.points[e];this.points.push((new n).fromArray(r))}return this};var Ja=Object.freeze({ArcCurve:Ri,CatmullRomCurve3:Ci,CubicBezierCurve:Ni,CubicBezierCurve3:Bi,EllipseCurve:Li,LineCurve:zi,LineCurve3:Ui,QuadraticBezierCurve:Gi,QuadraticBezierCurve3:Fi,SplineCurve:Hi});ki.prototype=Object.assign(Object.create(Ai.prototype),{constructor:ki,add:function(t){this.curves.push(t)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new zi(e,t))},getPoint:function(t){var e=t*this.getLength(),n=this.getCurveLengths();for(t=0;t<n.length;){if(n[t]>=e)return e=n[t]-e,n=(t=this.curves[t]).getLength(),t.getPointAt(0===n?0:1-e/n);t++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,n=0,i=this.curves.length;n<i;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,n=[],i=0,r=this.curves;i<r.length;i++){var a=r[i];a=a.getPoints(a&&a.isEllipseCurve?2*t:a&&(a.isLineCurve||a.isLineCurve3)?1:a&&a.isSplineCurve?t*a.points.length:t);for(var o=0;o<a.length;o++){var s=a[o];e&&e.equals(s)||(n.push(s),e=s)}}return this.autoClose&&1<n.length&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(t){Ai.prototype.copy.call(this,t),this.curves=[];for(var e=0,n=t.curves.length;e<n;e++)this.curves.push(t.curves[e].clone());return this.autoClose=t.autoClose,this},toJSON:function(){var t=Ai.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,n=this.curves.length;e<n;e++)t.curves.push(this.curves[e].toJSON());return t},fromJSON:function(t){Ai.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var i=t.curves[e];this.curves.push((new Ja[i.type]).fromJSON(i))}return this}}),Vi.prototype=Object.assign(Object.create(ki.prototype),{constructor:Vi,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var i=new zi(this.currentPoint.clone(),new n(t,e));this.curves.push(i),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,i,r){t=new Gi(this.currentPoint.clone(),new n(t,e),new n(i,r)),this.curves.push(t),this.currentPoint.set(i,r)},bezierCurveTo:function(t,e,i,r,a,o){t=new Ni(this.currentPoint.clone(),new n(t,e),new n(i,r),new n(a,o)),this.curves.push(t),this.currentPoint.set(a,o)},splineThru:function(t){var e=[this.currentPoint.clone()].concat(t);e=new Hi(e),this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,n,i,r,a){this.absarc(t+this.currentPoint.x,e+this.currentPoint.y,n,i,r,a)},absarc:function(t,e,n,i,r,a){this.absellipse(t,e,n,n,i,r,a)},ellipse:function(t,e,n,i,r,a,o,s){this.absellipse(t+this.currentPoint.x,e+this.currentPoint.y,n,i,r,a,o,s)},absellipse:function(t,e,n,i,r,a,o,s){t=new Li(t,e,n,i,r,a,o,s),0<this.curves.length&&((e=t.getPoint(0)).equals(this.currentPoint)||this.lineTo(e.x,e.y)),this.curves.push(t),t=t.getPoint(1),this.currentPoint.copy(t)},copy:function(t){return ki.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=ki.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return ki.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),ji.prototype=Object.assign(Object.create(Vi.prototype),{constructor:ji,getPointsHoles:function(t){for(var e=[],n=0,i=this.holes.length;n<i;n++)e[n]=this.holes[n].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){Vi.prototype.copy.call(this,t),this.holes=[];for(var e=0,n=t.holes.length;e<n;e++)this.holes.push(t.holes[e].clone());return this},toJSON:function(){var t=Vi.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,n=this.holes.length;e<n;e++)t.holes.push(this.holes[e].toJSON());return t},fromJSON:function(t){Vi.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var i=t.holes[e];this.holes.push((new Vi).fromJSON(i))}return this}}),Wi.prototype=Object.assign(Object.create(S.prototype),{constructor:Wi,isLight:!0,copy:function(t){return S.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){return(t=S.prototype.toJSON.call(this,t)).object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}),qi.prototype=Object.assign(Object.create(Wi.prototype),{constructor:qi,isHemisphereLight:!0,copy:function(t){return Wi.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(Xi.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),Yi.prototype=Object.assign(Object.create(Xi.prototype),{constructor:Yi,isSpotLightShadow:!0,update:function(t){var e=this.camera,n=2*ca.RAD2DEG*t.angle,i=this.mapSize.width/this.mapSize.height;t=t.distance||e.far,n===e.fov&&i===e.aspect&&t===e.far||(e.fov=n,e.aspect=i,e.far=t,e.updateProjectionMatrix())}}),Ji.prototype=Object.assign(Object.create(Wi.prototype),{constructor:Ji,isSpotLight:!0,copy:function(t){return Wi.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Zi.prototype=Object.assign(Object.create(Wi.prototype),{constructor:Zi,isPointLight:!0,copy:function(t){return Wi.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),Qi.prototype=Object.assign(Object.create(ve.prototype),{constructor:Qi,isOrthographicCamera:!0,copy:function(t,e){return ve.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,n,i,r,a){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2,r=n-t;if(n+=t,t=i+e,e=i-e,null!==this.view&&this.view.enabled){n=this.zoom/(this.view.width/this.view.fullWidth),e=this.zoom/(this.view.height/this.view.fullHeight);var a=(this.right-this.left)/this.view.width;i=(this.top-this.bottom)/this.view.height,n=(r+=this.view.offsetX/n*a)+this.view.width/n*a,e=(t-=this.view.offsetY/e*i)-this.view.height/e*i}this.projectionMatrix.makeOrthographic(r,n,t,e,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return(t=S.prototype.toJSON.call(this,t)).object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}),Ki.prototype=Object.assign(Object.create(Xi.prototype),{constructor:Ki}),$i.prototype=Object.assign(Object.create(Wi.prototype),{constructor:$i,isDirectionalLight:!0,copy:function(t){return Wi.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),tr.prototype=Object.assign(Object.create(Wi.prototype),{constructor:tr,isAmbientLight:!0}),er.prototype=Object.assign(Object.create(Wi.prototype),{constructor:er,isRectAreaLight:!0,copy:function(t){return Wi.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){return(t=Wi.prototype.toJSON.call(this,t)).object.width=this.width,t.object.height=this.height,t}}),Object.assign(nr.prototype,{load:function(t,e,n,i){var r=this,a=new bi(r.manager);a.setPath(r.path),a.load(t,function(t){e(r.parse(JSON.parse(t)))},n,i)},parse:function(t){function e(t){return void 0===i[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),i[t]}var i=this.textures,o=new Fa[t.type];if(void 0!==t.uuid&&(o.uuid=t.uuid),void 0!==t.name&&(o.name=t.name),void 0!==t.color&&o.color.setHex(t.color),void 0!==t.roughness&&(o.roughness=t.roughness),void 0!==t.metalness&&(o.metalness=t.metalness),void 0!==t.emissive&&o.emissive.setHex(t.emissive),void 0!==t.specular&&o.specular.setHex(t.specular),void 0!==t.shininess&&(o.shininess=t.shininess),void 0!==t.clearCoat&&(o.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(o.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.vertexColors&&(o.vertexColors=t.vertexColors),void 0!==t.fog&&(o.fog=t.fog),void 0!==t.flatShading&&(o.flatShading=t.flatShading),void 0!==t.blending&&(o.blending=t.blending),void 0!==t.combine&&(o.combine=t.combine),void 0!==t.side&&(o.side=t.side),void 0!==t.opacity&&(o.opacity=t.opacity),void 0!==t.transparent&&(o.transparent=t.transparent),void 0!==t.alphaTest&&(o.alphaTest=t.alphaTest),void 0!==t.depthTest&&(o.depthTest=t.depthTest),void 0!==t.depthWrite&&(o.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(o.colorWrite=t.colorWrite),void 0!==t.wireframe&&(o.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(o.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(o.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(o.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(o.rotation=t.rotation),1!==t.linewidth&&(o.linewidth=t.linewidth),void 0!==t.dashSize&&(o.dashSize=t.dashSize),void 0!==t.gapSize&&(o.gapSize=t.gapSize),void 0!==t.scale&&(o.scale=t.scale),void 0!==t.polygonOffset&&(o.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(o.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(o.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(o.skinning=t.skinning),void 0!==t.morphTargets&&(o.morphTargets=t.morphTargets),void 0!==t.dithering&&(o.dithering=t.dithering),void 0!==t.visible&&(o.visible=t.visible),void 0!==t.userData&&(o.userData=t.userData),void 0!==t.uniforms)for(var c in t.uniforms){var h=t.uniforms[c];switch(o.uniforms[c]={},h.type){case"t":o.uniforms[c].value=e(h.value);break;case"c":o.uniforms[c].value=(new x).setHex(h.value);break;case"v2":o.uniforms[c].value=(new n).fromArray(h.value);break;case"v3":o.uniforms[c].value=(new r).fromArray(h.value);break;case"v4":o.uniforms[c].value=(new s).fromArray(h.value);break;case"m3":o.uniforms[c].value=(new a).fromArray(h.value);case"m4":o.uniforms[c].value=(new g).fromArray(h.value);break;default:o.uniforms[c].value=h.value}}if(void 0!==t.defines&&(o.defines=t.defines),void 0!==t.vertexShader&&(o.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(o.fragmentShader=t.fragmentShader),void 0!==t.extensions)for(var l in t.extensions)o.extensions[l]=t.extensions[l];return void 0!==t.shading&&(o.flatShading=1===t.shading),void 0!==t.size&&(o.size=t.size),void 0!==t.sizeAttenuation&&(o.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(o.map=e(t.map)),void 0!==t.matcap&&(o.matcap=e(t.matcap)),void 0!==t.alphaMap&&(o.alphaMap=e(t.alphaMap),o.transparent=!0),void 0!==t.bumpMap&&(o.bumpMap=e(t.bumpMap)),void 0!==t.bumpScale&&(o.bumpScale=t.bumpScale),void 0!==t.normalMap&&(o.normalMap=e(t.normalMap)),void 0!==t.normalMapType&&(o.normalMapType=t.normalMapType),void 0!==t.normalScale&&(c=t.normalScale,!1===Array.isArray(c)&&(c=[c,c]),o.normalScale=(new n).fromArray(c)),void 0!==t.displacementMap&&(o.displacementMap=e(t.displacementMap)),void 0!==t.displacementScale&&(o.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(o.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(o.roughnessMap=e(t.roughnessMap)),void 0!==t.metalnessMap&&(o.metalnessMap=e(t.metalnessMap)),void 0!==t.emissiveMap&&(o.emissiveMap=e(t.emissiveMap)),void 0!==t.emissiveIntensity&&(o.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(o.specularMap=e(t.specularMap)),void 0!==t.envMap&&(o.envMap=e(t.envMap)),void 0!==t.envMapIntensity&&(o.envMapIntensity=t.envMapIntensity),void 0!==t.reflectivity&&(o.reflectivity=t.reflectivity),void 0!==t.lightMap&&(o.lightMap=e(t.lightMap)),void 0!==t.lightMapIntensity&&(o.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(o.aoMap=e(t.aoMap)),void 0!==t.aoMapIntensity&&(o.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(o.gradientMap=e(t.gradientMap)),o},setPath:function(t){return this.path=t,this},setTextures:function(t){return this.textures=t,this}});var Za={decodeText:function(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);for(var e="",n=0,i=t.length;n<i;n++)e+=String.fromCharCode(t[n]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}};Object.assign(ir.prototype,{load:function(t,e,n,i){var r=this,a=new bi(r.manager);a.setPath(r.path),a.load(t,function(t){e(r.parse(JSON.parse(t)))},n,i)},parse:function(t){var e=new G,n=t.data.index;if(void 0!==n){var i=new Qa[n.type](n.array);e.setIndex(new A(i,1))}for(var a in n=t.data.attributes){var o=n[a];i=new A(i=new Qa[o.type](o.array),o.itemSize,o.normalized),void 0!==o.name&&(i.name=o.name),e.addAttribute(a,i)}var s=t.data.morphAttributes;if(s)for(a in s){var c=s[a],h=[];n=0;for(var l=c.length;n<l;n++)o=c[n],i=new A(i=new Qa[o.type](o.array),o.itemSize,o.normalized),void 0!==o.name&&(i.name=o.name),h.push(i);e.morphAttributes[a]=h}if(void 0!==(a=t.data.groups||t.data.drawcalls||t.data.offsets))for(n=0,o=a.length;n!==o;++n)i=a[n],e.addGroup(i.start,i.count,i.materialIndex);return void 0!==(n=t.data.boundingSphere)&&(a=new r,void 0!==n.center&&a.fromArray(n.center),e.boundingSphere=new d(a,n.radius)),t.name&&(e.name=t.name),t.userData&&(e.userData=t.userData),e},setPath:function(t){return this.path=t,this}});var Qa={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};Object.assign(rr.prototype,{crossOrigin:"anonymous",load:function(t,e,n,i){var r=this,a=void 0===this.path?Za.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||a,(a=new bi(r.manager)).setPath(this.path),a.load(t,function(n){var a=null;try{a=JSON.parse(n)}catch(e){return void 0!==i&&i(e),void console.error("THREE:ObjectLoader: Can't parse "+t+".",e.message)}void 0===(n=a.metadata)||void 0===n.type||"geometry"===n.type.toLowerCase()?console.error("THREE.ObjectLoader: Can't load "+t):r.parse(a,e)},n,i)},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(t,e){var n=this.parseShape(t.shapes);n=this.parseGeometries(t.geometries,n);var i=this.parseImages(t.images,function(){void 0!==e&&e(r)});i=this.parseTextures(t.textures,i),i=this.parseMaterials(t.materials,i);var r=this.parseObject(t.object,n,i);return t.animations&&(r.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0===e||e(r),r},parseShape:function(t){var e={};if(void 0!==t)for(var n=0,i=t.length;n<i;n++){var r=(new ji).fromJSON(t[n]);e[r.uuid]=r}return e},parseGeometries:function(t,e){var n={};if(void 0!==t)for(var i=new ir,r=0,a=t.length;r<a;r++){var o=t[r];switch(o.type){case"PlaneGeometry":case"PlaneBufferGeometry":var s=new Ga[o.type](o.width,o.height,o.widthSegments,o.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new Ga[o.type](o.width,o.height,o.depth,o.widthSegments,o.heightSegments,o.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new Ga[o.type](o.radius,o.segments,o.thetaStart,o.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new Ga[o.type](o.radiusTop,o.radiusBottom,o.height,o.radialSegments,o.heightSegments,o.openEnded,o.thetaStart,o.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new Ga[o.type](o.radius,o.height,o.radialSegments,o.heightSegments,o.openEnded,o.thetaStart,o.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new Ga[o.type](o.radius,o.widthSegments,o.heightSegments,o.phiStart,o.phiLength,o.thetaStart,o.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new Ga[o.type](o.radius,o.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new Ga[o.type](o.innerRadius,o.outerRadius,o.thetaSegments,o.phiSegments,o.thetaStart,o.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new Ga[o.type](o.radius,o.tube,o.radialSegments,o.tubularSegments,o.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new Ga[o.type](o.radius,o.tube,o.tubularSegments,o.radialSegments,o.p,o.q);break;case"TubeGeometry":case"TubeBufferGeometry":s=new Ga[o.type]((new Ja[o.path.type]).fromJSON(o.path),o.tubularSegments,o.radius,o.radialSegments,o.closed);break;case"LatheGeometry":case"LatheBufferGeometry":s=new Ga[o.type](o.points,o.segments,o.phiStart,o.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new Ga[o.type](o.vertices,o.indices,o.radius,o.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":s=[];for(var c=0,h=o.shapes.length;c<h;c++){var l=e[o.shapes[c]];s.push(l)}s=new Ga[o.type](s,o.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(s=[],c=0,h=o.shapes.length;c<h;c++)l=e[o.shapes[c]],s.push(l);void 0!==(c=o.options.extrudePath)&&(o.options.extrudePath=(new Ja[c.type]).fromJSON(c)),s=new Ga[o.type](s,o.options);break;case"BufferGeometry":s=i.parse(o);break;case"Geometry":"THREE"in window&&"LegacyJSONLoader"in THREE?s=(new THREE.LegacyJSONLoader).parse(o,this.resourcePath).geometry:console.error('THREE.ObjectLoader: You have to import LegacyJSONLoader in order load geometry data of type "Geometry".');break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+o.type+'"');continue}s.uuid=o.uuid,void 0!==o.name&&(s.name=o.name),!0===s.isBufferGeometry&&void 0!==o.userData&&(s.userData=o.userData),n[o.uuid]=s}return n},parseMaterials:function(t,e){var n={},i={};if(void 0!==t){var r=new nr;r.setTextures(e),e=0;for(var a=t.length;e<a;e++){var o=t[e];if("MultiMaterial"===o.type){for(var s=[],c=0;c<o.materials.length;c++){var h=o.materials[c];void 0===n[h.uuid]&&(n[h.uuid]=r.parse(h)),s.push(n[h.uuid])}i[o.uuid]=s}else void 0===n[o.uuid]&&(n[o.uuid]=r.parse(o)),i[o.uuid]=n[o.uuid]}}return i},parseAnimations:function(t){for(var e=[],n=0;n<t.length;n++){var i=t[n],r=vi.parse(i);void 0!==i.uuid&&(r.uuid=i.uuid),e.push(r)}return e},parseImages:function(t,e){function n(t){return i.manager.itemStart(t),a.load(t,function(){i.manager.itemEnd(t)},void 0,function(){i.manager.itemError(t),i.manager.itemEnd(t)})}var i=this,r={};if(void 0!==t&&0<t.length){var a=new Ei(e=new xi(e));a.setCrossOrigin(this.crossOrigin),e=0;for(var o=t.length;e<o;e++){var s=t[e],c=s.url;if(Array.isArray(c)){r[s.uuid]=[];for(var h=0,l=c.length;h<l;h++){var u=c[h];u=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(u)?u:i.resourcePath+u,r[s.uuid].push(n(u))}}else u=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(s.url)?s.url:i.resourcePath+s.url,r[s.uuid]=n(u)}}return r},parseTextures:function(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var i={};if(void 0!==t)for(var r=0,a=t.length;r<a;r++){var s=t[r];void 0===s.image&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),void 0===e[s.image]&&console.warn("THREE.ObjectLoader: Undefined image",s.image);var c=Array.isArray(e[s.image])?new st(e[s.image]):new o(e[s.image]);c.needsUpdate=!0,c.uuid=s.uuid,void 0!==s.name&&(c.name=s.name),void 0!==s.mapping&&(c.mapping=n(s.mapping,Ka)),void 0!==s.offset&&c.offset.fromArray(s.offset),void 0!==s.repeat&&c.repeat.fromArray(s.repeat),void 0!==s.center&&c.center.fromArray(s.center),void 0!==s.rotation&&(c.rotation=s.rotation),void 0!==s.wrap&&(c.wrapS=n(s.wrap[0],$a),c.wrapT=n(s.wrap[1],$a)),void 0!==s.format&&(c.format=s.format),void 0!==s.type&&(c.type=s.type),void 0!==s.encoding&&(c.encoding=s.encoding),void 0!==s.minFilter&&(c.minFilter=n(s.minFilter,to)),void 0!==s.magFilter&&(c.magFilter=n(s.magFilter,to)),void 0!==s.anisotropy&&(c.anisotropy=s.anisotropy),void 0!==s.flipY&&(c.flipY=s.flipY),void 0!==s.premultiplyAlpha&&(c.premultiplyAlpha=s.premultiplyAlpha),void 0!==s.unpackAlignment&&(c.unpackAlignment=s.unpackAlignment),i[s.uuid]=c}return i},parseObject:function(t,e,n){function i(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function r(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],i=0,r=t.length;i<r;i++){var a=t[i];void 0===n[a]&&console.warn("THREE.ObjectLoader: Undefined material",a),e.push(n[a])}return e}return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}}switch(t.type){case"Scene":var a=new Te;void 0!==t.background&&Number.isInteger(t.background)&&(a.background=new x(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?a.fog=new Se(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(a.fog=new Ee(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":a=new ye(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(a.focus=t.focus),void 0!==t.zoom&&(a.zoom=t.zoom),void 0!==t.filmGauge&&(a.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(a.filmOffset=t.filmOffset),void 0!==t.view&&(a.view=Object.assign({},t.view));break;case"OrthographicCamera":a=new Qi(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(a.zoom=t.zoom),void 0!==t.view&&(a.view=Object.assign({},t.view));break;case"AmbientLight":a=new tr(t.color,t.intensity);break;case"DirectionalLight":a=new $i(t.color,t.intensity);break;case"PointLight":a=new Zi(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":a=new er(t.color,t.intensity,t.width,t.height);break;case"SpotLight":a=new Ji(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":a=new qi(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":a=i(t.geometry);var o=r(t.material);a=a.bones&&0<a.bones.length?new Oe(a,o):new J(a,o),void 0!==t.drawMode&&a.setDrawMode(t.drawMode);break;case"LOD":a=new Ce;break;case"Line":a=new Be(i(t.geometry),r(t.material),t.mode);break;case"LineLoop":a=new Ue(i(t.geometry),r(t.material));break;case"LineSegments":a=new ze(i(t.geometry),r(t.material));break;case"PointCloud":case"Points":a=new Fe(i(t.geometry),r(t.material));break;case"Sprite":a=new Pe(r(t.material));break;case"Group":a=new ge;break;default:a=new S}if(a.uuid=t.uuid,void 0!==t.name&&(a.name=t.name),void 0!==t.matrix?(a.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(a.matrixAutoUpdate=t.matrixAutoUpdate),a.matrixAutoUpdate&&a.matrix.decompose(a.position,a.quaternion,a.scale)):(void 0!==t.position&&a.position.fromArray(t.position),void 0!==t.rotation&&a.rotation.fromArray(t.rotation),void 0!==t.quaternion&&a.quaternion.fromArray(t.quaternion),void 0!==t.scale&&a.scale.fromArray(t.scale)),void 0!==t.castShadow&&(a.castShadow=t.castShadow),void 0!==t.receiveShadow&&(a.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(a.shadow.bias=t.shadow.bias),void 0!==t.shadow.radius&&(a.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&a.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(a.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(a.visible=t.visible),void 0!==t.frustumCulled&&(a.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(a.renderOrder=t.renderOrder),void 0!==t.userData&&(a.userData=t.userData),void 0!==t.layers&&(a.layers.mask=t.layers),void 0!==t.children){o=t.children;for(var s=0;s<o.length;s++)a.add(this.parseObject(o[s],e,n))}if("LOD"===t.type)for(t=t.levels,o=0;o<t.length;o++){s=t[o];var c=a.getObjectByProperty("uuid",s.object);void 0!==c&&a.addLevel(c,s.distance)}return a}});var Ka={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},$a={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},to={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};ar.prototype={constructor:ar,setOptions:function(t){return this.options=t,this},load:function(t,e,n,i){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var r=this,a=ka.get(t);if(void 0!==a)return r.manager.itemStart(t),setTimeout(function(){e&&e(a),r.manager.itemEnd(t)},0),a;fetch(t).then(function(t){return t.blob()}).then(function(t){return void 0===r.options?createImageBitmap(t):createImageBitmap(t,r.options)}).then(function(n){ka.add(t,n),e&&e(n),r.manager.itemEnd(t)}).catch(function(e){i&&i(e),r.manager.itemError(t),r.manager.itemEnd(t)}),r.manager.itemStart(t)},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(or.prototype,{moveTo:function(t,e){this.currentPath=new Vi,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,n,i){this.currentPath.quadraticCurveTo(t,e,n,i)},bezierCurveTo:function(t,e,n,i,r,a){this.currentPath.bezierCurveTo(t,e,n,i,r,a)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function n(t){for(var e=[],n=0,i=t.length;n<i;n++){var r=t[n],a=new ji;a.curves=r.curves,e.push(a)}return e}function i(t,e){for(var n=e.length,i=!1,r=n-1,a=0;a<n;r=a++){var o=e[r],s=e[a],c=s.x-o.x,h=s.y-o.y;if(Math.abs(h)>Number.EPSILON){if(0>h&&(o=e[a],c=-c,s=e[r],h=-h),!(t.y<o.y||t.y>s.y))if(t.y===o.y){if(t.x===o.x)return!0}else{if(0===(r=h*(t.x-o.x)-c*(t.y-o.y)))return!0;0>r||(i=!i)}}else if(t.y===o.y&&(s.x<=t.x&&t.x<=o.x||o.x<=t.x&&t.x<=s.x))return!0}return i}var r=za.isClockWise,a=this.subPaths;if(0===a.length)return[];if(!0===e)return n(a);if(e=[],1===a.length){var o=a[0],s=new ji;return s.curves=o.curves,e.push(s),e}var c=!r(a[0].getPoints());c=t?!c:c,s=[];var h=[],l=[],u=0;h[u]=void 0,l[u]=[];for(var p=0,d=a.length;p<d;p++){var f=(o=a[p]).getPoints(),m=r(f);(m=t?!m:m)?(!c&&h[u]&&u++,h[u]={s:new ji,p:f},h[u].s.curves=o.curves,c&&u++,l[u]=[]):l[u].push({h:o,p:f[0]})}if(!h[0])return n(a);if(1<h.length){for(p=!1,t=[],r=0,a=h.length;r<a;r++)s[r]=[];for(r=0,a=h.length;r<a;r++)for(o=l[r],m=0;m<o.length;m++){for(c=o[m],u=!0,f=0;f<h.length;f++)i(c.p,h[f].p)&&(r!==f&&t.push({froms:r,tos:f,hole:m}),u?(u=!1,s[f].push(c)):p=!0);u&&s[r].push(c)}0<t.length&&(p||(l=s))}for(p=0,r=h.length;p<r;p++)for(s=h[p].s,e.push(s),a=0,o=(t=l[p]).length;a<o;a++)s.holes.push(t[a].h);return e}}),Object.assign(sr.prototype,{isFont:!0,generateShapes:function(t,e){void 0===e&&(e=100);var n=[],i=e;e=this.data;var r=Array.from?Array.from(t):String(t).split("");i/=e.resolution;var a=(e.boundingBox.yMax-e.boundingBox.yMin+e.underlineThickness)*i;t=[];for(var o=0,s=0,c=0;c<r.length;c++){var h=r[c];if("\n"===h)o=0,s-=a;else{var l=i,u=o,p=s;if(h=e.glyphs[h]||e.glyphs["?"]){var d=new or;if(h.o)for(var f=h._cachedOutline||(h._cachedOutline=h.o.split(" ")),m=0,g=f.length;m<g;)switch(f[m++]){case"m":var v=f[m++]*l+u,y=f[m++]*l+p;d.moveTo(v,y);break;case"l":v=f[m++]*l+u,y=f[m++]*l+p,d.lineTo(v,y);break;case"q":var x=f[m++]*l+u,b=f[m++]*l+p,w=f[m++]*l+u,_=f[m++]*l+p;d.quadraticCurveTo(w,_,x,b);break;case"b":x=f[m++]*l+u,b=f[m++]*l+p,w=f[m++]*l+u,_=f[m++]*l+p,v=f[m++]*l+u,y=f[m++]*l+p,d.bezierCurveTo(w,_,v,y,x,b)}l={offsetX:h.ha*l,path:d}}else l=void 0;o+=l.offsetX,t.push(l.path)}}for(e=0,r=t.length;e<r;e++)Array.prototype.push.apply(n,t[e].toShapes());return n}}),Object.assign(cr.prototype,{load:function(t,e,n,i){var r=this,a=new bi(this.manager);a.setPath(this.path),a.load(t,function(t){try{var n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}t=r.parse(n),e&&e(t)},n,i)},parse:function(t){return new sr(t)},setPath:function(t){return this.path=t,this}}),hr.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,n=0,i=e.length;n<i;n+=2){var r=e[n+1];if(e[n].test(t))return r}return null}},Object.assign(hr.prototype,{crossOrigin:"anonymous",onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,n){for(var i=[],r=0;r<t.length;++r)i[r]=this.createMaterial(t[r],e,n);return i},createMaterial:function(){var t={NoBlending:0,NormalBlending:1,AdditiveBlending:2,SubtractiveBlending:3,MultiplyBlending:4,CustomBlending:5},e=new x,n=new Ti,i=new nr;return function(r,a,o){function s(t,e,i,r,s){t=a+t;var c=hr.Handlers.get(t);return null!==c?t=c.load(t):(n.setCrossOrigin(o),t=n.load(t)),void 0!==e&&(t.repeat.fromArray(e),1!==e[0]&&(t.wrapS=1e3),1!==e[1]&&(t.wrapT=1e3)),void 0!==i&&t.offset.fromArray(i),void 0!==r&&("repeat"===r[0]&&(t.wrapS=1e3),"mirror"===r[0]&&(t.wrapS=1002),"repeat"===r[1]&&(t.wrapT=1e3),"mirror"===r[1]&&(t.wrapT=1002)),void 0!==s&&(t.anisotropy=s),e=ca.generateUUID(),h[e]=t,e}var c,h={},l={uuid:ca.generateUUID(),type:"MeshLambertMaterial"};for(c in r){var u=r[c];switch(c){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":l.name=u;break;case"blending":l.blending=t[u];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",c,"is no longer supported.");break;case"colorDiffuse":l.color=e.fromArray(u).getHex();break;case"colorSpecular":l.specular=e.fromArray(u).getHex();break;case"colorEmissive":l.emissive=e.fromArray(u).getHex();break;case"specularCoef":l.shininess=u;break;case"shading":"basic"===u.toLowerCase()&&(l.type="MeshBasicMaterial"),"phong"===u.toLowerCase()&&(l.type="MeshPhongMaterial"),"standard"===u.toLowerCase()&&(l.type="MeshStandardMaterial");break;case"mapDiffuse":l.map=s(u,r.mapDiffuseRepeat,r.mapDiffuseOffset,r.mapDiffuseWrap,r.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":l.emissiveMap=s(u,r.mapEmissiveRepeat,r.mapEmissiveOffset,r.mapEmissiveWrap,r.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":l.lightMap=s(u,r.mapLightRepeat,r.mapLightOffset,r.mapLightWrap,r.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":l.aoMap=s(u,r.mapAORepeat,r.mapAOOffset,r.mapAOWrap,r.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":l.bumpMap=s(u,r.mapBumpRepeat,r.mapBumpOffset,r.mapBumpWrap,r.mapBumpAnisotropy);break;case"mapBumpScale":l.bumpScale=u;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":l.normalMap=s(u,r.mapNormalRepeat,r.mapNormalOffset,r.mapNormalWrap,r.mapNormalAnisotropy);break;case"mapNormalFactor":l.normalScale=u;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":l.specularMap=s(u,r.mapSpecularRepeat,r.mapSpecularOffset,r.mapSpecularWrap,r.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":l.metalnessMap=s(u,r.mapMetalnessRepeat,r.mapMetalnessOffset,r.mapMetalnessWrap,r.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":l.roughnessMap=s(u,r.mapRoughnessRepeat,r.mapRoughnessOffset,r.mapRoughnessWrap,r.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":l.alphaMap=s(u,r.mapAlphaRepeat,r.mapAlphaOffset,r.mapAlphaWrap,r.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":l.side=1;break;case"doubleSided":l.side=2;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),l.opacity=u;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":l[c]=u;break;case"vertexColors":!0===u&&(l.vertexColors=2),"face"===u&&(l.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",c,u)}}return"MeshBasicMaterial"===l.type&&delete l.emissive,"MeshPhongMaterial"!==l.type&&delete l.specular,1>l.opacity&&(l.transparent=!0),i.setTextures(h),i.parse(l)}}()});var eo,no,io,ro={getContext:function(){return void 0===eo&&(eo=new(window.AudioContext||window.webkitAudioContext)),eo},setContext:function(t){eo=t}};Object.assign(lr.prototype,{load:function(t,e,n,i){var r=new bi(this.manager);r.setResponseType("arraybuffer"),r.setPath(this.path),r.load(t,function(t){t=t.slice(0),ro.getContext().decodeAudioData(t,function(t){e(t)})},n,i)},setPath:function(t){return this.path=t,this}}),Object.assign(ur.prototype,{isSphericalHarmonics3:!0,set:function(t){for(var e=0;9>e;e++)this.coefficients[e].copy(t[e]);return this},zero:function(){for(var t=0;9>t;t++)this.coefficients[t].set(0,0,0);return this},getAt:function(t,e){var n=t.x,i=t.y;t=t.z;var r=this.coefficients;return e=.282095*r[0],e+=.488603*r[1]*i,e+=.488603*r[2]*t,e+=.488603*r[3]*n,e+=1.092548*r[4]*n*i,e+=1.092548*r[5]*i*t,e+=.315392*r[6]*(3*t*t-1),(e+=1.092548*r[7]*n*t)+.546274*r[8]*(n*n-i*i)},getIrradianceAt:function(t,e){var n=t.x,i=t.y;t=t.z;var r=this.coefficients;return e=.886227*r[0],e+=1.023328*r[1]*i,e+=1.023328*r[2]*t,e+=1.023328*r[3]*n,e+=.858086*r[4]*n*i,e+=.858086*r[5]*i*t,e+=r[6]*(.743125*t*t-.247708),(e+=.858086*r[7]*n*t)+.429043*r[8]*(n*n-i*i)},add:function(t){for(var e=0;9>e;e++)this.coefficients[e].add(t.coefficients[e]);return this},scale:function(t){for(var e=0;9>e;e++)this.coefficients[e].multiplyScalar(t);return this},lerp:function(t,e){for(var n=0;9>n;n++)this.coefficients[n].lerp(t.coefficients[n],e);return this},equals:function(t){for(var e=0;9>e;e++)if(!this.coefficients[e].equals(t.coefficients[e]))return!1;return!0},copy:function(t){return this.set(t.coefficients)},clone:function(){return(new this.constructor).copy(this)},fromArray:function(t){for(var e=this.coefficients,n=0;9>n;n++)e[n].fromArray(t,3*n);return this},toArray:function(){for(var t=[],e=this.coefficients,n=0;9>n;n++)e[n].toArray(t,3*n);return t}}),Object.assign(ur,{getBasisAt:function(t,e){var n=t.x,i=t.y;t=t.z,e[0]=.282095,e[1]=.488603*i,e[2]=.488603*t,e[3]=.488603*n,e[4]=1.092548*n*i,e[5]=1.092548*i*t,e[6]=.315392*(3*t*t-1),e[7]=1.092548*n*t,e[8]=.546274*(n*n-i*i)}}),pr.prototype=Object.assign(Object.create(Wi.prototype),{constructor:pr,isLightProbe:!0,copy:function(t){return Wi.prototype.copy.call(this,t),this.sh.copy(t.sh),this.intensity=t.intensity,this},toJSON:function(t){return Wi.prototype.toJSON.call(this,t)}}),dr.prototype=Object.assign(Object.create(pr.prototype),{constructor:dr,isHemisphereLightProbe:!0,copy:function(t){return pr.prototype.copy.call(this,t),this},toJSON:function(t){return pr.prototype.toJSON.call(this,t)}}),fr.prototype=Object.assign(Object.create(pr.prototype),{constructor:fr,isAmbientLightProbe:!0,copy:function(t){return pr.prototype.copy.call(this,t),this},toJSON:function(t){return pr.prototype.toJSON.call(this,t)}}),Object.assign(mr.prototype,{update:function(){var t,e,n,i,r,a,o,s,c=new g,h=new g;return function(l){if(t!==this||e!==l.focus||n!==l.fov||i!==l.aspect*this.aspect||r!==l.near||a!==l.far||o!==l.zoom||s!==this.eyeSep){t=this,e=l.focus,n=l.fov,i=l.aspect*this.aspect,r=l.near,a=l.far,o=l.zoom;var u=l.projectionMatrix.clone(),p=(s=this.eyeSep/2)*r/e,d=r*Math.tan(ca.DEG2RAD*n*.5)/o;h.elements[12]=-s,c.elements[12]=s;var f=-d*i+p,m=d*i+p;u.elements[0]=2*r/(m-f),u.elements[8]=(m+f)/(m-f),this.cameraL.projectionMatrix.copy(u),f=-d*i-p,m=d*i-p,u.elements[0]=2*r/(m-f),u.elements[8]=(m+f)/(m-f),this.cameraR.projectionMatrix.copy(u)}this.cameraL.matrixWorld.copy(l.matrixWorld).multiply(h),this.cameraR.matrixWorld.copy(l.matrixWorld).multiply(c)}}()}),gr.prototype=Object.create(S.prototype),gr.prototype.constructor=gr,Object.assign(vr.prototype,{start:function(){this.oldTime=this.startTime=("undefined"==typeof performance?Date:performance).now(),this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.autoStart=this.running=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),yr.prototype=Object.assign(Object.create(S.prototype),{constructor:yr,getInput:function(){return this.gain},removeFilter:function(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this},getFilter:function(){return this.filter},setFilter:function(t){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this},updateMatrixWorld:function(){var t=new r,e=new i,n=new r,a=new r,o=new vr;return function(i){S.prototype.updateMatrixWorld.call(this,i),i=this.context.listener;var r=this.up;if(this.timeDelta=o.getDelta(),this.matrixWorld.decompose(t,e,n),a.set(0,0,-1).applyQuaternion(e),i.positionX){var s=this.context.currentTime+this.timeDelta;i.positionX.linearRampToValueAtTime(t.x,s),i.positionY.linearRampToValueAtTime(t.y,s),i.positionZ.linearRampToValueAtTime(t.z,s),i.forwardX.linearRampToValueAtTime(a.x,s),i.forwardY.linearRampToValueAtTime(a.y,s),i.forwardZ.linearRampToValueAtTime(a.z,s),i.upX.linearRampToValueAtTime(r.x,s),i.upY.linearRampToValueAtTime(r.y,s),i.upZ.linearRampToValueAtTime(r.z,s)}else i.setPosition(t.x,t.y,t.z),i.setOrientation(a.x,a.y,a.z,r.x,r.y,r.z)}}()}),xr.prototype=Object.assign(Object.create(S.prototype),{constructor:xr,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setMediaElementSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0===this.isPlaying)console.warn("THREE.Audio: Audio is already playing.");else{if(!1!==this.hasPlaybackControl){var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.source.onended=null,this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.source.onended=null,this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(0<this.filters.length){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(0<this.filters.length){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},setDetune:function(t){if(this.detune=t,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this},getDetune:function(){return this.detune},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),br.prototype=Object.assign(Object.create(xr.prototype),{constructor:br,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){return this.panner.refDistance=t,this},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){return this.panner.rolloffFactor=t,this},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){return this.panner.distanceModel=t,this},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){return this.panner.maxDistance=t,this},setDirectionalCone:function(t,e,n){return this.panner.coneInnerAngle=t,this.panner.coneOuterAngle=e,this.panner.coneOuterGain=n,this},updateMatrixWorld:function(){var t=new r,e=new i,n=new r,a=new r;return function(i){if(S.prototype.updateMatrixWorld.call(this,i),!0!==this.hasPlaybackControl||!1!==this.isPlaying)if(this.matrixWorld.decompose(t,e,n),a.set(0,0,1).applyQuaternion(e),(i=this.panner).positionX){var r=this.context.currentTime+this.listener.timeDelta;i.positionX.linearRampToValueAtTime(t.x,r),i.positionY.linearRampToValueAtTime(t.y,r),i.positionZ.linearRampToValueAtTime(t.z,r),i.orientationX.linearRampToValueAtTime(a.x,r),i.orientationY.linearRampToValueAtTime(a.y,r),i.orientationZ.linearRampToValueAtTime(a.z,r)}else i.setPosition(t.x,t.y,t.z),i.setOrientation(a.x,a.y,a.z)}}()}),Object.assign(wr.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),n=0;n<e.length;n++)t+=e[n];return t/e.length}}),Object.assign(_r.prototype,{accumulate:function(t,e){var n=this.buffer,i=this.valueSize;t=t*i+i;var r=this.cumulativeWeight;if(0===r){for(r=0;r!==i;++r)n[t+r]=n[r];r=e}else r+=e,this._mixBufferRegion(n,t,0,e/r,i);this.cumulativeWeight=r},apply:function(t){var e=this.valueSize,n=this.buffer;t=t*e+e;var i=this.cumulativeWeight,r=this.binding;this.cumulativeWeight=0,1>i&&this._mixBufferRegion(n,t,3*e,1-i,e),i=e;for(var a=e+e;i!==a;++i)if(n[i]!==n[i+e]){r.setValue(n,t);break}},saveOriginalState:function(){var t=this.buffer,e=this.valueSize,n=3*e;this.binding.getValue(t,n);for(var i=e;i!==n;++i)t[i]=t[n+i%e];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(t,e,n,i,r){if(.5<=i)for(i=0;i!==r;++i)t[e+i]=t[n+i]},_slerp:function(t,e,n,r){i.slerpFlat(t,e,t,e,t,n,r)},_lerp:function(t,e,n,i,r){for(var a=1-i,o=0;o!==r;++o){var s=e+o;t[s]=t[s]*a+t[n+o]*i}}}),Object.assign(Mr.prototype,{getValue:function(t,e){this.bind();var n=this._bindings[this._targetGroup.nCachedObjects_];void 0!==n&&n.getValue(t,e)},setValue:function(t,e){for(var n=this._bindings,i=this._targetGroup.nCachedObjects_,r=n.length;i!==r;++i)n[i].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Er,{Composite:Mr,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Er.Composite(t,e,n):new Er(t,e,n)},sanitizeNodeName:function(){var t=/[\[\]\.:\/]/g;return function(e){return e.replace(/\s/g,"_").replace(t,"")}}(),parseTrackName:function(){var t="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",e=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]");t=/(WCOD+)?/.source.replace("WCOD",t);var n=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),i=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),r=new RegExp("^"+e+t+n+i+"$"),a=["material","materials","bones"];return function(t){var e=r.exec(t);if(!e)throw Error("PropertyBinding: Cannot parse trackName: "+t);var n=(e={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]}).nodeName&&e.nodeName.lastIndexOf(".");if(void 0!==n&&-1!==n){var i=e.nodeName.substring(n+1);-1!==a.indexOf(i)&&(e.nodeName=e.nodeName.substring(0,n),e.objectName=i)}if(null===e.propertyName||0===e.propertyName.length)throw Error("PropertyBinding: can not parse propertyName from trackName: "+t);return e}}(),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){var i=function(t){for(var n=0;n<t.length;n++){var r=t[n];if(r.name===e||r.uuid===e||(r=i(r.children)))return r}return null};if(t=i(t.children))return t}return null}}),Object.assign(Er.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var n=this.resolvedProperty,i=0,r=n.length;i!==r;++i)t[e++]=n[i]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var n=this.resolvedProperty,i=0,r=n.length;i!==r;++i)n[i]=t[e++]},function(t,e){for(var n=this.resolvedProperty,i=0,r=n.length;i!==r;++i)n[i]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var n=this.resolvedProperty,i=0,r=n.length;i!==r;++i)n[i]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,n=e.objectName,i=e.propertyName,r=e.propertyIndex;if(t||(this.node=t=Er.findNode(this.rootNode,e.nodeName)||this.rootNode),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(n){var a=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);for(t=t.skeleton.bones,n=0;n<t.length;n++)if(t[n].name===a){a=n;break}break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==a){if(void 0===t[a])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[a]}}if(void 0===(a=t[i]))console.error("THREE.PropertyBinding: Trying to update property for track: "+e.nodeName+"."+i+" but it wasn't found.",t);else{if(e=this.Versioning.None,this.targetObject=t,void 0!==t.needsUpdate?e=this.Versioning.NeedsUpdate:void 0!==t.matrixWorldNeedsUpdate&&(e=this.Versioning.MatrixWorldNeedsUpdate),n=this.BindingType.Direct,void 0!==r){if("morphTargetInfluences"===i){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(n=0;n<this.node.geometry.morphAttributes.position.length;n++)if(t.geometry.morphAttributes.position[n].name===r){r=n;break}}else{if(!t.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(n=0;n<this.node.geometry.morphTargets.length;n++)if(t.geometry.morphTargets[n].name===r){r=n;break}}}n=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=r}else void 0!==a.fromArray&&void 0!==a.toArray?(n=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(n=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=i;this.getValue=this.GetterByBindingType[n],this.setValue=this.SetterByBindingTypeAndVersioning[n][e]}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),Object.assign(Er.prototype,{_getValue_unbound:Er.prototype.getValue,_setValue_unbound:Er.prototype.setValue}),Object.assign(Sr.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,i=this._indicesByUUID,r=this._paths,a=this._parsedPaths,o=this._bindings,s=o.length,c=void 0,h=0,l=arguments.length;h!==l;++h){var u=arguments[h],p=u.uuid,d=i[p];if(void 0===d){d=e++,i[p]=d,t.push(u),p=0;for(var f=s;p!==f;++p)o[p].push(new Er(u,r[p],a[p]))}else if(d<n){c=t[d];var m=--n;for(i[(f=t[m]).uuid]=d,t[d]=f,i[p]=m,t[m]=u,p=0,f=s;p!==f;++p){var g=o[p],v=g[d];g[d]=g[m],void 0===v&&(v=new Er(u,r[p],a[p])),g[m]=v}}else t[d]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=n},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,n=this._indicesByUUID,i=this._bindings,r=i.length,a=0,o=arguments.length;a!==o;++a){var s=arguments[a],c=s.uuid,h=n[c];if(void 0!==h&&h>=e){var l=e++,u=t[l];for(n[u.uuid]=h,t[h]=u,n[c]=l,t[l]=s,s=0,c=r;s!==c;++s){var p=(u=i[s])[h];u[h]=u[l],u[l]=p}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,i=this._indicesByUUID,r=this._bindings,a=r.length,o=0,s=arguments.length;o!==s;++o){var c=arguments[o].uuid,h=i[c];if(void 0!==h)if(delete i[c],h<n){var l=t[c=--n],u=--e,p=t[u];for(i[l.uuid]=h,t[h]=l,i[p.uuid]=c,t[c]=p,t.pop(),l=0,p=a;l!==p;++l){var d=r[l],f=d[u];d[h]=d[c],d[c]=f,d.pop()}}else for(i[(p=t[u=--e]).uuid]=h,t[h]=p,t.pop(),l=0,p=a;l!==p;++l)(d=r[l])[h]=d[u],d.pop()}this.nCachedObjects_=n},subscribe_:function(t,e){var n=this._bindingsIndicesByPath,i=n[t],r=this._bindings;if(void 0!==i)return r[i];var a=this._paths,o=this._parsedPaths,s=this._objects,c=this.nCachedObjects_,h=Array(s.length);for(i=r.length,n[t]=i,a.push(t),o.push(e),r.push(h),n=c,i=s.length;n!==i;++n)h[n]=new Er(s[n],t,e);return h},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){var i=this._paths,r=this._parsedPaths,a=this._bindings,o=a.length-1,s=a[o];e[t[o]]=n,a[n]=s,a.pop(),r[n]=r[o],r.pop(),i[n]=i[o],i.pop()}}}),Object.assign(Tr.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){n=this._clip.duration;var i=t._clip.duration,r=n/i;t.warp(1,i/n,e),this.warp(r,1,e)}return this},crossFadeTo:function(t,e,n){return t.crossFadeFrom(this,e,n)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,n){var i=this._mixer,r=i.time,a=this._timeScaleInterpolant,o=this.timeScale;return null===a&&(this._timeScaleInterpolant=a=i._lendControlInterpolant()),i=a.parameterPositions,a=a.sampleValues,i[0]=r,i[1]=r+n,a[0]=t/o,a[1]=e/o,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,n,i){if(this.enabled){var r=this._startTime;if(null!==r){if(0>(e=(t-r)*n)||0===n)return;this._startTime=null,e*=n}if(e*=this._updateTimeScale(t),n=this._updateTime(e),0<(t=this._updateWeight(t))){e=this._interpolants,r=this._propertyBindings;for(var a=0,o=e.length;a!==o;++a)e[a].evaluate(n),r[a].accumulate(i,t)}}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var i=n.evaluate(t)[0];e*=i,t>n.parameterPositions[1]&&(this.stopFading(),0===i&&(this.enabled=!1))}}return this._effectiveWeight=e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}return this._effectiveTimeScale=e},_updateTime:function(t){var e=this.time+t,n=this._clip.duration,i=this.loop,r=this._loopCount,a=2202===i;if(0===t)return-1===r?e:a&&1==(1&r)?n-e:e;if(2200===i)t:{if(-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1)),e>=n)e=n;else{if(!(0>e))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:0>t?-1:1})}else{if(-1===r&&(0<=t?(r=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),e>=n||0>e){e-=n*(i=Math.floor(e/n)),r+=Math.abs(i);var o=this.repetitions-r;0>=o?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=0<t?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:0<t?1:-1})):(1===o?(t=0>t,this._setEndings(t,!t,a)):this._setEndings(!1,!1,a),this._loopCount=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:i}))}if(a&&1==(1&r))return this.time=e,n-e}return this.time=e},_setEndings:function(t,e,n){var i=this._interpolantSettings;n?(i.endingStart=2401,i.endingEnd=2401):(i.endingStart=t?this.zeroSlopeAtStart?2401:2400:2402,i.endingEnd=e?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(t,e,n){var i=this._mixer,r=i.time,a=this._weightInterpolant;return null===a&&(this._weightInterpolant=a=i._lendControlInterpolant()),i=a.parameterPositions,a=a.sampleValues,i[0]=r,a[0]=e,i[1]=r+t,a[1]=n,this}}),Ar.prototype=Object.assign(Object.create(e.prototype),{constructor:Ar,_bindAction:function(t,e){var n=t._localRoot||this._root,i=t._clip.tracks,r=i.length,a=t._propertyBindings;t=t._interpolants;var o=n.uuid,s=this._bindingsByRootAndName,c=s[o];for(void 0===c&&(c={},s[o]=c),s=0;s!==r;++s){var h=i[s],l=h.name,u=c[l];if(void 0===u){if(void 0!==(u=a[s])){null===u._cacheIndex&&(++u.referenceCount,this._addInactiveBinding(u,o,l));continue}++(u=new _r(Er.create(n,l,e&&e._propertyBindings[s].binding.parsedPath),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(u,o,l)}a[s]=u,t[s].resultBuffer=u.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,i=this._actionsByClip[n];this._bindAction(t,i&&i.knownActions[0]),this._addInactiveAction(t,n,e)}for(n=0,i=(e=t._propertyBindings).length;n!==i;++n){var r=e[n];0==r.useCount++&&(this._lendBinding(r),r.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,i=e.length;n!==i;++n){var r=e[n];0==--r.useCount&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){return null!==(t=t._cacheIndex)&&t<this._nActiveActions},_addInactiveAction:function(t,e,n){var i=this._actions,r=this._actionsByClip,a=r[e];void 0===a?(a={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,r[e]=a):(e=a.knownActions,t._byClipCacheIndex=e.length,e.push(t)),t._cacheIndex=i.length,i.push(t),a.actionByRoot[n]=t},_removeInactiveAction:function(t){var e=this._actions,n=e[e.length-1],i=t._cacheIndex;n._cacheIndex=i,e[i]=n,e.pop(),t._cacheIndex=null,e=t._clip.uuid;var r=(i=(n=this._actionsByClip)[e]).knownActions,a=r[r.length-1],o=t._byClipCacheIndex;a._byClipCacheIndex=o,r[o]=a,r.pop(),t._byClipCacheIndex=null,delete i.actionByRoot[(t._localRoot||this._root).uuid],0===r.length&&delete n[e],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=0,n=(t=t._propertyBindings).length;e!==n;++e){var i=t[e];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(t){var e=this._actions,n=t._cacheIndex,i=this._nActiveActions++,r=e[i];t._cacheIndex=i,e[i]=t,r._cacheIndex=n,e[n]=r},_takeBackAction:function(t){var e=this._actions,n=t._cacheIndex,i=--this._nActiveActions,r=e[i];t._cacheIndex=i,e[i]=t,r._cacheIndex=n,e[n]=r},_addInactiveBinding:function(t,e,n){var i=this._bindingsByRootAndName,r=i[e],a=this._bindings;void 0===r&&(r={},i[e]=r),r[n]=t,t._cacheIndex=a.length,a.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,n=t.binding,i=n.rootNode.uuid;n=n.path;var r=this._bindingsByRootAndName,a=r[i],o=e[e.length-1];t=t._cacheIndex,o._cacheIndex=t,e[t]=o,e.pop(),delete a[n];t:{for(var s in a)break t;delete r[i]}},_lendBinding:function(t){var e=this._bindings,n=t._cacheIndex,i=this._nActiveBindings++,r=e[i];t._cacheIndex=i,e[i]=t,r._cacheIndex=n,e[n]=r},_takeBackBinding:function(t){var e=this._bindings,n=t._cacheIndex,i=--this._nActiveBindings,r=e[i];t._cacheIndex=i,e[i]=t,r._cacheIndex=n,e[n]=r},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,n=t[e];return void 0===n&&((n=new si(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,n=t.__cacheIndex,i=--this._nActiveControlInterpolants,r=e[i];t.__cacheIndex=i,e[i]=t,r.__cacheIndex=n,e[n]=r},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var n=e||this._root,i=n.uuid;t=null!==(n="string"==typeof t?vi.findByName(n,t):t)?n.uuid:t;var r=this._actionsByClip[t],a=null;if(void 0!==r){if(void 0!==(a=r.actionByRoot[i]))return a;a=r.knownActions[0],null===n&&(n=a._clip)}return null===n?null:(e=new Tr(this,n,e),this._bindAction(e,a),this._addInactiveAction(e,t,i),e)},existingAction:function(t,e){var n=e||this._root;return e=n.uuid,n="string"==typeof t?vi.findByName(n,t):t,void 0!==(t=this._actionsByClip[n?n.uuid:t])&&t.actionByRoot[e]||null},stopAllAction:function(){for(var t=this._actions,e=this._nActiveActions,n=this._bindings,i=this._nActiveBindings,r=this._nActiveBindings=this._nActiveActions=0;r!==e;++r)t[r].reset();for(r=0;r!==i;++r)n[r].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,n=this._nActiveActions,i=this.time+=t,r=Math.sign(t),a=this._accuIndex^=1,o=0;o!==n;++o)e[o]._update(i,t,r,a);for(t=this._bindings,e=this._nActiveBindings,o=0;o!==e;++o)t[o].apply(a);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions;t=t.uuid;var n=this._actionsByClip,i=n[t];if(void 0!==i){for(var r=0,a=(i=i.knownActions).length;r!==a;++r){var o=i[r];this._deactivateAction(o);var s=o._cacheIndex,c=e[e.length-1];o._cacheIndex=null,o._byClipCacheIndex=null,c._cacheIndex=s,e[s]=c,e.pop(),this._removeInactiveBindingsForAction(o)}delete n[t]}},uncacheRoot:function(t){t=t.uuid;var e=this._actionsByClip;for(i in e){var n=e[i].actionByRoot[t];void 0!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}var i=this._bindingsByRootAndName[t];if(void 0!==i)for(var r in i)(t=i[r]).restoreOriginalState(),this._removeInactiveBinding(t)},uncacheAction:function(t,e){null!==(t=this.existingAction(t,e))&&(this._deactivateAction(t),this._removeInactiveAction(t))}}),Lr.prototype.clone=function(){return new Lr(void 0===this.value.clone?this.value:this.value.clone())},Rr.prototype=Object.assign(Object.create(G.prototype),{constructor:Rr,isInstancedBufferGeometry:!0,copy:function(t){return G.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Pr.prototype=Object.assign(Object.create(Ae.prototype),{constructor:Pr,isInstancedInterleavedBuffer:!0,copy:function(t){return Ae.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Cr.prototype=Object.assign(Object.create(A.prototype),{constructor:Cr,isInstancedBufferAttribute:!0,copy:function(t){return A.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Or.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,n){return Dr(t,this,n=n||[],e),n.sort(Ir),n},intersectObjects:function(t,e,n){if(n=n||[],!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),n;for(var i=0,r=t.length;i<r;i++)Dr(t[i],this,n,e);return n.sort(Ir),n}}),Object.assign(Nr.prototype,{set:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.setFromCartesianCoords(t.x,t.y,t.z)},setFromCartesianCoords:function(t,e,n){return this.radius=Math.sqrt(t*t+e*e+n*n),0===this.radius?this.phi=this.theta=0:(this.theta=Math.atan2(t,n),this.phi=Math.acos(ca.clamp(e/this.radius,-1,1))),this}}),Object.assign(Br.prototype,{set:function(t,e,n){return this.radius=t,this.theta=e,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.setFromCartesianCoords(t.x,t.y,t.z)},setFromCartesianCoords:function(t,e,n){return this.radius=Math.sqrt(t*t+n*n),this.theta=Math.atan2(t,n),this.y=e,this}}),Object.assign(zr.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new n;return function(e,n){return n=t.copy(n).multiplyScalar(.5),this.min.copy(e).sub(n),this.max.copy(e).add(n),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new n),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new n),this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new n),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new n),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new n;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(Ur.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new r),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new r),t.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(t,e){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new r),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var t=new r,e=new r;return function(n,i){return t.subVectors(n,this.start),e.subVectors(this.end,this.start),n=e.dot(e),n=e.dot(t)/n,i&&(n=ca.clamp(n,0,1)),n}}(),closestPointToPoint:function(t,e,n){return t=this.closestPointToPointParameter(t,e),void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new r),this.delta(n).multiplyScalar(t).add(this.start)},applyMatrix4:function(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this},equals:function(t){return t.start.equals(this.start)&&t.end.equals(this.end)}}),Gr.prototype=Object.create(S.prototype),Gr.prototype.constructor=Gr,Gr.prototype.isImmediateRenderObject=!0,Fr.prototype=Object.create(ze.prototype),Fr.prototype.constructor=Fr,Fr.prototype.update=function(){var t=new r,e=new r,n=new a;return function(){var i=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var r=this.object.matrixWorld,a=this.geometry.attributes.position,o=this.object.geometry;if(o&&o.isGeometry)for(var s=o.vertices,c=o.faces,h=o=0,l=c.length;h<l;h++)for(var u=c[h],p=0,d=u.vertexNormals.length;p<d;p++){var f=u.vertexNormals[p];t.copy(s[u[i[p]]]).applyMatrix4(r),e.copy(f).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),a.setXYZ(o,t.x,t.y,t.z),o+=1,a.setXYZ(o,e.x,e.y,e.z),o+=1}else if(o&&o.isBufferGeometry)for(i=o.attributes.position,s=o.attributes.normal,p=o=0,d=i.count;p<d;p++)t.set(i.getX(p),i.getY(p),i.getZ(p)).applyMatrix4(r),e.set(s.getX(p),s.getY(p),s.getZ(p)),e.applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),a.setXYZ(o,t.x,t.y,t.z),o+=1,a.setXYZ(o,e.x,e.y,e.z),o+=1;a.needsUpdate=!0}}(),Hr.prototype=Object.create(S.prototype),Hr.prototype.constructor=Hr,Hr.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Hr.prototype.update=function(){var t=new r;return function(){this.light.updateMatrixWorld();var e=this.light.distance?this.light.distance:1e3,n=e*Math.tan(this.light.angle);this.cone.scale.set(n,n,e),t.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(t),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),kr.prototype=Object.create(ze.prototype),kr.prototype.constructor=kr,kr.prototype.updateMatrixWorld=function(){var t=new r,e=new g,n=new g;return function(i){var r=this.bones,a=this.geometry,o=a.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var s=0,c=0;s<r.length;s++){var h=r[s];h.parent&&h.parent.isBone&&(e.multiplyMatrices(n,h.matrixWorld),t.setFromMatrixPosition(e),o.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(n,h.parent.matrixWorld),t.setFromMatrixPosition(e),o.setXYZ(c+1,t.x,t.y,t.z),c+=2)}a.getAttribute("position").needsUpdate=!0,S.prototype.updateMatrixWorld.call(this,i)}}(),Vr.prototype=Object.create(J.prototype),Vr.prototype.constructor=Vr,Vr.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Vr.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},jr.prototype=Object.create(Be.prototype),jr.prototype.constructor=jr,jr.prototype.update=function(){if(this.scale.set(.5*this.light.width,.5*this.light.height,1),void 0!==this.color)this.material.color.set(this.color),this.children[0].material.color.set(this.color);else{this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity);var t=this.material.color,e=Math.max(t.r,t.g,t.b);1<e&&t.multiplyScalar(1/e),this.children[0].material.color.copy(this.material.color)}},jr.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()},Wr.prototype=Object.create(S.prototype),Wr.prototype.constructor=Wr,Wr.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Wr.prototype.update=function(){var t=new r,e=new x,n=new x;return function(){var i=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var r=i.geometry.getAttribute("color");e.copy(this.light.color),n.copy(this.light.groundColor);for(var a=0,o=r.count;a<o;a++){var s=a<o/2?e:n;r.setXYZ(a,s.r,s.g,s.b)}r.needsUpdate=!0}i.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),qr.prototype=Object.create(J.prototype),qr.prototype.constructor=qr,qr.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},qr.prototype.onBeforeRender=function(){this.position.copy(this.lightProbe.position),this.scale.set(1,1,1).multiplyScalar(this.size),this.material.uniforms.intensity.value=this.lightProbe.intensity},Xr.prototype=Object.assign(Object.create(ze.prototype),{constructor:Xr,copy:function(t){return ze.prototype.copy.call(this,t),this.geometry.copy(t.geometry),this.material.copy(t.material),this},clone:function(){return(new this.constructor).copy(this)}}),Yr.prototype=Object.create(ze.prototype),Yr.prototype.constructor=Yr,Jr.prototype=Object.create(Be.prototype),Jr.prototype.constructor=Jr,Jr.prototype.update=function(){function t(t,i,a,o){for(a=(i-t)/a,d.setXYZ(l,0,0,0),u++,e=t;e<i;e+=a)n=l+u,d.setXYZ(n,Math.sin(e)*r,0,Math.cos(e)*r),d.setXYZ(n+1,Math.sin(Math.min(e+a,i))*r,0,Math.cos(Math.min(e+a,i))*r),d.setXYZ(n+2,0,0,0),u+=3;p.addGroup(l,u,o),l+=u,u=0}var e,n,i=this.audio,r=this.range,a=this.divisionsInnerAngle,o=this.divisionsOuterAngle,s=ca.degToRad(i.panner.coneInnerAngle),c=s/2,h=(i=ca.degToRad(i.panner.coneOuterAngle))/2,l=0,u=0,p=this.geometry,d=p.attributes.position;p.clearGroups(),t(-h,-c,o,0),t(-c,c,a,1),t(c,h,o,0),d.needsUpdate=!0,s===i&&(this.material[0].visible=!1)},Jr.prototype.dispose=function(){this.geometry.dispose(),this.material[0].dispose(),this.material[1].dispose()},Zr.prototype=Object.create(ze.prototype),Zr.prototype.constructor=Zr,Zr.prototype.update=function(){var t=new r,e=new r,n=new a;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var i=this.object.matrixWorld,r=this.geometry.attributes.position,a=this.object.geometry,o=a.vertices,s=0,c=0,h=(a=a.faces).length;c<h;c++){var l=a[c],u=l.normal;t.copy(o[l.a]).add(o[l.b]).add(o[l.c]).divideScalar(3).applyMatrix4(i),e.copy(u).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),r.setXYZ(s,t.x,t.y,t.z),s+=1,r.setXYZ(s,e.x,e.y,e.z),s+=1}r.needsUpdate=!0}}(),Qr.prototype=Object.create(S.prototype),Qr.prototype.constructor=Qr,Qr.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},Qr.prototype.update=function(){var t=new r,e=new r,n=new r;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(e,t),this.lightPlane.lookAt(e),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(e),this.targetLine.scale.z=n.length()}}(),Kr.prototype=Object.create(ze.prototype),Kr.prototype.constructor=Kr,Kr.prototype.update=function(){function t(t,r,o,s){if(i.set(r,o,s).unproject(a),void 0!==(t=n[t]))for(r=e.getAttribute("position"),o=0,s=t.length;o<s;o++)r.setXYZ(t[o],i.x,i.y,i.z)}var e,n,i=new r,a=new ve;return function(){e=this.geometry,n=this.pointMap,a.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),t("c",0,0,-1),t("t",0,0,1),t("n1",-1,-1,-1),t("n2",1,-1,-1),t("n3",-1,1,-1),t("n4",1,1,-1),t("f1",-1,-1,1),t("f2",1,-1,1),t("f3",-1,1,1),t("f4",1,1,1),t("u1",.7,1.1,-1),t("u2",-.7,1.1,-1),t("u3",0,2,-1),t("cf1",-1,0,1),t("cf2",1,0,1),t("cf3",0,-1,1),t("cf4",0,1,1),t("cn1",-1,0,-1),t("cn2",1,0,-1),t("cn3",0,-1,-1),t("cn4",0,1,-1),e.getAttribute("position").needsUpdate=!0}}(),$r.prototype=Object.create(ze.prototype),$r.prototype.constructor=$r,$r.prototype.update=function(){var t=new p;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){e=t.min;var n=t.max,i=this.geometry.attributes.position,r=i.array;r[0]=n.x,r[1]=n.y,r[2]=n.z,r[3]=e.x,r[4]=n.y,r[5]=n.z,r[6]=e.x,r[7]=e.y,r[8]=n.z,r[9]=n.x,r[10]=e.y,r[11]=n.z,r[12]=n.x,r[13]=n.y,r[14]=e.z,r[15]=e.x,r[16]=n.y,r[17]=e.z,r[18]=e.x,r[19]=e.y,r[20]=e.z,r[21]=n.x,r[22]=e.y,r[23]=e.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),$r.prototype.setFromObject=function(t){return this.object=t,this.update(),this},$r.prototype.copy=function(t){return ze.prototype.copy.call(this,t),this.object=t.object,this},$r.prototype.clone=function(){return(new this.constructor).copy(this)},ta.prototype=Object.create(ze.prototype),ta.prototype.constructor=ta,ta.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),S.prototype.updateMatrixWorld.call(this,t))},ea.prototype=Object.create(Be.prototype),ea.prototype.constructor=ea,ea.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;1e-8>Math.abs(e)&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.children[0].material.side=0>e?1:0,this.lookAt(this.plane.normal),S.prototype.updateMatrixWorld.call(this,t)},na.prototype=Object.create(S.prototype),na.prototype.constructor=na,na.prototype.setDirection=function(){var t,e=new r;return function(n){.99999<n.y?this.quaternion.set(0,0,0,1):-.99999>n.y?this.quaternion.set(1,0,0,0):(e.set(n.z,0,-n.x).normalize(),t=Math.acos(n.y),this.quaternion.setFromAxisAngle(e,t))}}(),na.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},na.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},na.prototype.copy=function(t){return S.prototype.copy.call(this,t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this},na.prototype.clone=function(){return(new this.constructor).copy(this)},ia.prototype=Object.create(ze.prototype),ia.prototype.constructor=ia,Ai.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Ai.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(ki.prototype,{createPointsGeometry:function(t){return console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),t=this.getPoints(t),this.createGeometry(t)},createSpacedPointsGeometry:function(t){return console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),t=this.getSpacedPoints(t),this.createGeometry(t)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new T,n=0,i=t.length;n<i;n++){var a=t[n];e.vertices.push(new r(a.x,a.y,a.z||0))}return e}}),Object.assign(Vi.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),ra.prototype=Object.create(Ci.prototype),aa.prototype=Object.create(Ci.prototype),oa.prototype=Object.create(Ci.prototype),Object.assign(oa.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),Xr.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},kr.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(hr.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Za.extractUrlBase(t)}}),Object.assign(rr.prototype,{setTexturePath:function(t){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(zr.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(p.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),Ur.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(ca,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),ca.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),ca.ceilPowerOfTwo(t)}}),Object.assign(a.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(g.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new r),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(t){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),t.transformDirection(this)},crossVector:function(t){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,n,i,r,a){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,i,n,r,a)}}),f.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},i.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(q.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(X.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(X,{barycoordFromPoint:function(t,e,n,i,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),X.getBarycoord(t,e,n,i,r)},normal:function(t,e,n,i){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),X.getNormal(t,e,n,i)}}),Object.assign(ji.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Ln(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Gn(this,t)}}),Object.assign(n.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(r.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(t){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(t)},getScaleFromMatrix:function(t){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(t)},getColumnFromMatrix:function(t,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(s.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(T.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(S.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(S.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(Ce.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Ie.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Oe.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},Object.defineProperty(Ai.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),ye.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(Wi.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(A.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(G.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(G.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(Rn.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Lr.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(j.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new x}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===t}}}),Object.defineProperties($n.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(W.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Me.prototype,{clearTarget:function(t,e,n,i){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(t),this.clear(e,n,i)},animate:function(t){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(t)},getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},allocTextureUnit:function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},setTexture:function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},setTexture2D:function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},setTextureCube:function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")}}),Object.defineProperties(Me.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(pe.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(l.prototype,{activeCubeFace:{set:function(){console.warn("THREE.WebGLRenderTargetCube: .activeCubeFace has been removed. It is now the second parameter of WebGLRenderer.setRenderTarget().")}},activeMipMapLevel:{set:function(){console.warn("THREE.WebGLRenderTargetCube: .activeMipMapLevel has been removed. It is now the third parameter of WebGLRenderer.setRenderTarget().")}}}),Object.defineProperties(c.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(we.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}},userHeight:{set:function(){console.warn("THREE.WebVRManager: .userHeight has been removed.")}}}),xr.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new lr).load(t,function(t){e.setBuffer(t)}),this},wr.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},gr.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)},la.crossOrigin=void 0,la.loadTexture=function(t,e,n,i){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var r=new Ti;return r.setCrossOrigin(this.crossOrigin),t=r.load(t,n,void 0,i),e&&(t.mapping=e),t},la.loadTextureCube=function(t,e,n,i){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var r=new Si;return r.setCrossOrigin(this.crossOrigin),t=r.load(t,n,void 0,i),e&&(t.mapping=e),t},la.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},la.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},t.WebGLMultisampleRenderTarget=h,t.WebGLRenderTargetCube=l,t.WebGLRenderTarget=c,t.WebGLRenderer=Me,t.ShaderLib=ga,t.UniformsLib=ma,t.UniformsUtils=da,t.ShaderChunk=pa,t.FogExp2=Ee,t.Fog=Se,t.Scene=Te,t.Sprite=Pe,t.LOD=Ce,t.SkinnedMesh=Oe,t.Skeleton=Ie,t.Bone=De,t.Mesh=J,t.LineSegments=ze,t.LineLoop=Ue,t.Line=Be,t.Points=Fe,t.Group=ge,t.VideoTexture=He,t.DataTexture=u,t.DataTexture2DArray=ct,t.DataTexture3D=ht,t.CompressedTexture=ke,t.CubeTexture=st,t.CanvasTexture=Ve,t.DepthTexture=je,t.Texture=o,t.AnimationLoader=wi,t.CompressedTextureLoader=_i,t.DataTextureLoader=Mi,t.CubeTextureLoader=Si,t.TextureLoader=Ti,t.ObjectLoader=rr,t.MaterialLoader=nr,t.BufferGeometryLoader=ir,t.DefaultLoadingManager=Va,t.LoadingManager=xi,t.ImageLoader=Ei,t.ImageBitmapLoader=ar,t.FontLoader=cr,t.FileLoader=bi,t.Loader=hr,t.LoaderUtils=Za,t.Cache=ka,t.AudioLoader=lr,t.SpotLightShadow=Yi,t.SpotLight=Ji,t.PointLight=Zi,t.RectAreaLight=er,t.HemisphereLight=qi,t.HemisphereLightProbe=dr,t.DirectionalLightShadow=Ki,t.DirectionalLight=$i,t.AmbientLight=tr,t.AmbientLightProbe=fr,t.LightShadow=Xi,t.Light=Wi,t.LightProbe=pr,t.StereoCamera=mr,t.PerspectiveCamera=ye,t.OrthographicCamera=Qi,t.CubeCamera=gr,t.ArrayCamera=xe,t.Camera=ve,t.AudioListener=yr,t.PositionalAudio=br,t.AudioContext=ro,t.AudioAnalyser=wr,t.Audio=xr,t.VectorKeyframeTrack=gi,t.StringKeyframeTrack=mi,t.QuaternionKeyframeTrack=fi,t.NumberKeyframeTrack=pi,t.ColorKeyframeTrack=ui,t.BooleanKeyframeTrack=li,t.PropertyMixer=_r,t.PropertyBinding=Er,t.KeyframeTrack=hi,t.AnimationUtils=Ha,t.AnimationObjectGroup=Sr,t.AnimationMixer=Ar,t.AnimationClip=vi,t.Uniform=Lr,t.InstancedBufferGeometry=Rr,t.BufferGeometry=G,t.Geometry=T,t.InterleavedBufferAttribute=Le,t.InstancedInterleavedBuffer=Pr,t.InterleavedBuffer=Ae,t.InstancedBufferAttribute=Cr,t.Face3=_,t.Object3D=S,t.Raycaster=Or,t.Layers=E,t.EventDispatcher=e,t.Clock=vr,t.QuaternionLinearInterpolant=di,t.LinearInterpolant=si,t.DiscreteInterpolant=ci,t.CubicInterpolant=oi,t.Interpolant=ai,t.Triangle=X,t.Math=ca,t.Spherical=Nr,t.Cylindrical=Br,t.Plane=f,t.Frustum=m,t.Sphere=d,t.Ray=q,t.Matrix4=g,t.Matrix3=a,t.Box3=p,t.Box2=zr,t.Line3=Ur,t.Euler=M,t.Vector4=s,t.Vector3=r,t.Vector2=n,t.Quaternion=i,t.Color=x,t.SphericalHarmonics3=ur,t.ImmediateRenderObject=Gr,t.VertexNormalsHelper=Fr,t.SpotLightHelper=Hr,t.SkeletonHelper=kr,t.PointLightHelper=Vr,t.RectAreaLightHelper=jr,t.HemisphereLightHelper=Wr,t.LightProbeHelper=qr,t.GridHelper=Xr,t.PolarGridHelper=Yr,t.PositionalAudioHelper=Jr,t.FaceNormalsHelper=Zr,t.DirectionalLightHelper=Qr,t.CameraHelper=Kr,t.BoxHelper=$r,t.Box3Helper=ta,t.PlaneHelper=ea,t.ArrowHelper=na,t.AxesHelper=ia,t.Shape=ji,t.Path=Vi,t.ShapePath=or,t.Font=sr,t.CurvePath=ki,t.Curve=Ai,t.ImageUtils=la,t.ShapeUtils=za,t.WebGLUtils=me,t.WireframeGeometry=We,t.ParametricGeometry=qe,t.ParametricBufferGeometry=Xe,t.TetrahedronGeometry=Ze,t.TetrahedronBufferGeometry=Qe,t.OctahedronGeometry=Ke,t.OctahedronBufferGeometry=$e,t.IcosahedronGeometry=tn,t.IcosahedronBufferGeometry=en,t.DodecahedronGeometry=nn,t.DodecahedronBufferGeometry=rn,t.PolyhedronGeometry=Ye,t.PolyhedronBufferGeometry=Je,t.TubeGeometry=an,t.TubeBufferGeometry=on,t.TorusKnotGeometry=sn,t.TorusKnotBufferGeometry=cn,t.TorusGeometry=hn,t.TorusBufferGeometry=ln,t.TextGeometry=Cn,t.TextBufferGeometry=On,t.SphereGeometry=In,t.SphereBufferGeometry=Dn,t.RingGeometry=Nn,t.RingBufferGeometry=Bn,t.PlaneGeometry=k,t.PlaneBufferGeometry=V,t.LatheGeometry=zn,t.LatheBufferGeometry=Un,t.ShapeGeometry=Gn,t.ShapeBufferGeometry=Fn,t.ExtrudeGeometry=Ln,t.ExtrudeBufferGeometry=Rn,t.EdgesGeometry=kn,t.ConeGeometry=Wn,t.ConeBufferGeometry=qn,t.CylinderGeometry=Vn,t.CylinderBufferGeometry=jn,t.CircleGeometry=Xn,t.CircleBufferGeometry=Yn,t.BoxGeometry=F,t.CubeGeometry=F,t.BoxBufferGeometry=H,t.ShadowMaterial=Jn,t.SpriteMaterial=Re,t.RawShaderMaterial=Zn,t.ShaderMaterial=W,t.PointsMaterial=Ge,t.MeshPhysicalMaterial=Kn,t.MeshStandardMaterial=Qn,t.MeshPhongMaterial=$n,t.MeshToonMaterial=ti,t.MeshNormalMaterial=ei,t.MeshLambertMaterial=ni,t.MeshDepthMaterial=le,t.MeshDistanceMaterial=ue,t.MeshBasicMaterial=Y,t.MeshMatcapMaterial=ii,t.LineDashedMaterial=ri,t.LineBasicMaterial=Ne,t.Material=j,t.Float64BufferAttribute=B,t.Float32BufferAttribute=N,t.Uint32BufferAttribute=D,t.Int32BufferAttribute=I,t.Uint16BufferAttribute=O,t.Int16BufferAttribute=C,t.Uint8ClampedBufferAttribute=P,t.Uint8BufferAttribute=R,t.Int8BufferAttribute=L,t.BufferAttribute=A,t.ArcCurve=Ri,t.CatmullRomCurve3=Ci,t.CubicBezierCurve=Ni,t.CubicBezierCurve3=Bi,t.EllipseCurve=Li,t.LineCurve=zi,t.LineCurve3=Ui,t.QuadraticBezierCurve=Gi,t.QuadraticBezierCurve3=Fi,t.SplineCurve=Hi,t.REVISION="104",t.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2},t.CullFaceNone=0,t.CullFaceBack=1,t.CullFaceFront=2,t.CullFaceFrontBack=3,t.FrontFaceDirectionCW=0,t.FrontFaceDirectionCCW=1,t.BasicShadowMap=0,t.PCFShadowMap=1,t.PCFSoftShadowMap=2,t.FrontSide=0,t.BackSide=1,t.DoubleSide=2,t.FlatShading=1,t.SmoothShading=2,t.NoColors=0,t.FaceColors=1,t.VertexColors=2,t.NoBlending=0,t.NormalBlending=1,t.AdditiveBlending=2,t.SubtractiveBlending=3,t.MultiplyBlending=4,t.CustomBlending=5,t.AddEquation=100,t.SubtractEquation=101,t.ReverseSubtractEquation=102,t.MinEquation=103,t.MaxEquation=104,t.ZeroFactor=200,t.OneFactor=201,t.SrcColorFactor=202,t.OneMinusSrcColorFactor=203,t.SrcAlphaFactor=204,t.OneMinusSrcAlphaFactor=205,t.DstAlphaFactor=206,t.OneMinusDstAlphaFactor=207,t.DstColorFactor=208,t.OneMinusDstColorFactor=209,t.SrcAlphaSaturateFactor=210,t.NeverDepth=0,t.AlwaysDepth=1,t.LessDepth=2,t.LessEqualDepth=3,t.EqualDepth=4,t.GreaterEqualDepth=5,t.GreaterDepth=6,t.NotEqualDepth=7,t.MultiplyOperation=0,t.MixOperation=1,t.AddOperation=2,t.NoToneMapping=0,t.LinearToneMapping=1,t.ReinhardToneMapping=2,t.Uncharted2ToneMapping=3,t.CineonToneMapping=4,t.ACESFilmicToneMapping=5,t.UVMapping=300,t.CubeReflectionMapping=301,t.CubeRefractionMapping=302,t.EquirectangularReflectionMapping=303,t.EquirectangularRefractionMapping=304,t.SphericalReflectionMapping=305,t.CubeUVReflectionMapping=306,t.CubeUVRefractionMapping=307,t.RepeatWrapping=1e3,t.ClampToEdgeWrapping=1001,t.MirroredRepeatWrapping=1002,t.NearestFilter=1003,t.NearestMipMapNearestFilter=1004,t.NearestMipMapLinearFilter=1005,t.LinearFilter=1006,t.LinearMipMapNearestFilter=1007,t.LinearMipMapLinearFilter=1008,t.UnsignedByteType=1009,t.ByteType=1010,t.ShortType=1011,t.UnsignedShortType=1012,t.IntType=1013,t.UnsignedIntType=1014,t.FloatType=1015,t.HalfFloatType=1016,t.UnsignedShort4444Type=1017,t.UnsignedShort5551Type=1018,t.UnsignedShort565Type=1019,t.UnsignedInt248Type=1020,t.AlphaFormat=1021,t.RGBFormat=1022,t.RGBAFormat=1023,t.LuminanceFormat=1024,t.LuminanceAlphaFormat=1025,t.RGBEFormat=1023,t.DepthFormat=1026,t.DepthStencilFormat=1027,t.RedFormat=1028,t.RGB_S3TC_DXT1_Format=33776,t.RGBA_S3TC_DXT1_Format=33777,t.RGBA_S3TC_DXT3_Format=33778,t.RGBA_S3TC_DXT5_Format=33779,t.RGB_PVRTC_4BPPV1_Format=35840,t.RGB_PVRTC_2BPPV1_Format=35841,t.RGBA_PVRTC_4BPPV1_Format=35842,t.RGBA_PVRTC_2BPPV1_Format=35843,t.RGB_ETC1_Format=36196,t.RGBA_ASTC_4x4_Format=37808,t.RGBA_ASTC_5x4_Format=37809,t.RGBA_ASTC_5x5_Format=37810,t.RGBA_ASTC_6x5_Format=37811,t.RGBA_ASTC_6x6_Format=37812,t.RGBA_ASTC_8x5_Format=37813,t.RGBA_ASTC_8x6_Format=37814,t.RGBA_ASTC_8x8_Format=37815,t.RGBA_ASTC_10x5_Format=37816,t.RGBA_ASTC_10x6_Format=37817,t.RGBA_ASTC_10x8_Format=37818,t.RGBA_ASTC_10x10_Format=37819,t.RGBA_ASTC_12x10_Format=37820,t.RGBA_ASTC_12x12_Format=37821,t.LoopOnce=2200,t.LoopRepeat=2201,t.LoopPingPong=2202,t.InterpolateDiscrete=2300,t.InterpolateLinear=2301,t.InterpolateSmooth=2302,t.ZeroCurvatureEnding=2400,t.ZeroSlopeEnding=2401,t.WrapAroundEnding=2402,t.TrianglesDrawMode=0,t.TriangleStripDrawMode=1,t.TriangleFanDrawMode=2,t.LinearEncoding=3e3,t.sRGBEncoding=3001,t.GammaEncoding=3007,t.RGBEEncoding=3002,t.LogLuvEncoding=3003,t.RGBM7Encoding=3004,t.RGBM16Encoding=3005,t.RGBDEncoding=3006,t.BasicDepthPacking=3200,t.RGBADepthPacking=3201,t.TangentSpaceNormalMap=0,t.ObjectSpaceNormalMap=1,t.Face4=function(t,e,n,i,r,a,o){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new _(t,e,n,r,a,o)},t.LineStrip=0,t.LinePieces=1,t.MeshFaceMaterial=function(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t},t.MultiMaterial=function(t){return void 0===t&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t},t.PointCloud=function(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new Fe(t,e)},t.Particle=function(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new Pe(t)},t.ParticleSystem=function(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new Fe(t,e)},t.PointCloudMaterial=function(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Ge(t)},t.ParticleBasicMaterial=function(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Ge(t)},t.ParticleSystemMaterial=function(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Ge(t)},t.Vertex=function(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new r(t,e,n)},t.DynamicBufferAttribute=function(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new A(t,e).setDynamic(!0)},t.Int8Attribute=function(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new L(t,e)},t.Uint8Attribute=function(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new R(t,e)},t.Uint8ClampedAttribute=function(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new P(t,e)},t.Int16Attribute=function(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new C(t,e)},t.Uint16Attribute=function(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new O(t,e)},t.Int32Attribute=function(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new I(t,e)},t.Uint32Attribute=function(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new D(t,e)},t.Float32Attribute=function(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new N(t,e)},t.Float64Attribute=function(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new B(t,e)},t.ClosedSplineCurve3=ra,t.SplineCurve3=aa,t.Spline=oa,t.AxisHelper=function(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new ia(t)},t.BoundingBoxHelper=function(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new $r(t,e)},t.EdgesHelper=function(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new ze(new kn(t.geometry),new Ne({color:void 0!==e?e:16777215}))},t.WireframeHelper=function(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new ze(new We(t.geometry),new Ne({color:void 0!==e?e:16777215}))},t.XHRLoader=function(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new bi(t)},t.BinaryTextureLoader=function(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Mi(t)},t.GeometryUtils={merge:function(t,e,n){if(console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh){e.matrixAutoUpdate&&e.updateMatrix();var i=e.matrix;e=e.geometry}t.merge(e,i,n)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},t.Projector=function(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."),this.projectVector=function(t,e){console.warn("THREE.Projector: .projectVector() is now vector.project()."),t.project(e)},this.unprojectVector=function(t,e){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."),t.unproject(e)},this.pickingRay=function(){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}},t.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")},t.JSONLoader=function(){console.error("THREE.JSONLoader has been removed.")},t.SceneUtils={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}},t.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")},Object.defineProperty(t,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf",[],t):"object"==typeof exports?exports["pdfjs-dist/build/pdf"]=t():e["pdfjs-dist/build/pdf"]=e.pdfjsLib=t()}(this,function(){return(()=>{var __webpack_modules__=[,(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.addLinkAttributes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.url,n=t.target,a=t.rel,o=t.enabled,s=void 0===o||o;(0,i.assert)(r&&"string"==typeof r,'addLinkAttributes: A valid "url" parameter must provided.');var l=(0,i.removeNullCharacters)(r);s?e.href=e.title=l:(e.href="",e.title="Disabled: ".concat(l),e.onclick=function(){return!1});var u="";switch(n){case C.NONE:break;case C.SELF:u="_self";break;case C.BLANK:u="_blank";break;case C.PARENT:u="_parent";break;case C.TOP:u="_top"}e.target=u,e.rel="string"==typeof a?a:g},t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.getFilenameFromUrl=function(e){var t=e.indexOf("#"),r=e.indexOf("?"),n=Math.min(t>0?t:e.length,r>0?r:e.length);return e.substring(e.lastIndexOf("/",n)+1,n)},t.getPdfFilenameFromUrl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!=typeof e)return t;if(P(e))return(0,i.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;var r=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,n=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e),a=r.exec(n[1])||r.exec(n[2])||r.exec(n[3]);if(a&&(a=a[0]).includes("%"))try{a=r.exec(decodeURIComponent(a))[0]}catch(e){}return a||t},t.isDataScheme=P,t.isFetchSupported=E,t.isPdfFile=function(e){return"string"==typeof e&&/\.pdf$/i.test(e)},t.isValidFetchUrl=O,t.loadScript=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise(function(r,n){var a=document.createElement("script");a.src=e,a.onload=function(e){t&&a.remove(),r(e)},a.onerror=function(){n(new Error("Cannot load script at: ".concat(a.src)))},(document.head||document.documentElement).appendChild(a)})},t.StatTimer=t.RenderingCancelledException=t.PDFDateString=t.PageViewport=t.LinkTarget=t.DOMSVGFactory=t.DOMCMapReaderFactory=t.DOMCanvasFactory=t.DEFAULT_LINK_REL=t.BaseCMapReaderFactory=t.BaseCanvasFactory=void 0;var a=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),i=r(4);function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t,r,n,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function u(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(e){l(i,n,a,o,s,"next",e)}function s(e){l(i,n,a,o,s,"throw",e)}o(void 0)})}}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=h(e);if(t){var i=h(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),e}var g="noopener noreferrer nofollow";t.DEFAULT_LINK_REL=g;var m="http://www.w3.org/2000/svg",b=function(){function e(){p(this,e),this.constructor===e&&(0,i.unreachable)("Cannot initialize BaseCanvasFactory.")}return y(e,[{key:"create",value:function(e,t){(0,i.unreachable)("Abstract method `create` called.")}},{key:"reset",value:function(e,t,r){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||r<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=r}},{key:"destroy",value:function(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}}]),e}();t.BaseCanvasFactory=b;var _=function(e){c(r,b);var t=d(r);function r(){var e,n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).ownerDocument,a=void 0===n?globalThis.document:n;return p(this,r),(e=t.call(this))._document=a,e}return y(r,[{key:"create",value:function(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");var r=this._document.createElement("canvas"),n=r.getContext("2d");return r.width=e,r.height=t,{canvas:r,context:n}}}]),r}();t.DOMCanvasFactory=_;var A=function(){function e(t){var r=t.baseUrl,n=void 0===r?null:r,a=t.isCompressed,o=void 0!==a&&a;p(this,e),this.constructor===e&&(0,i.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=n,this.isCompressed=o}return y(e,[{key:"fetch",value:function(){var e=u(a.default.mark(function e(t){var r,n,o,s=this;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.name,this.baseUrl){e.next=3;break}throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');case 3:if(r){e.next=5;break}throw new Error("CMap name must be specified.");case 5:return n=this.baseUrl+r+(this.isCompressed?".bcmap":""),o=this.isCompressed?i.CMapCompressionType.BINARY:i.CMapCompressionType.NONE,e.abrupt("return",this._fetchData(n,o).catch(function(e){throw new Error("Unable to load ".concat(s.isCompressed?"binary ":"","CMap at: ").concat(n))}));case 8:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"_fetchData",value:function(e,t){(0,i.unreachable)("Abstract method `_fetchData` called.")}}]),e}();t.BaseCMapReaderFactory=A;var S=function(e){c(r,A);var t=d(r);function r(){return p(this,r),t.apply(this,arguments)}return y(r,[{key:"_fetchData",value:function(e,t){var r=this;return E()&&O(e,document.baseURI)?fetch(e).then(function(){var e=u(a.default.mark(function e(n){var o;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n.ok){e.next=2;break}throw new Error(n.statusText);case 2:if(!r.isCompressed){e.next=10;break}return e.t0=Uint8Array,e.next=6,n.arrayBuffer();case 6:e.t1=e.sent,o=new e.t0(e.t1),e.next=15;break;case 10:return e.t2=i.stringToBytes,e.next=13,n.text();case 13:e.t3=e.sent,o=(0,e.t2)(e.t3);case 15:return e.abrupt("return",{cMapData:o,compressionType:t});case 16:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()):new Promise(function(n,a){var o=new XMLHttpRequest;o.open("GET",e,!0),r.isCompressed&&(o.responseType="arraybuffer"),o.onreadystatechange=function(){if(o.readyState===XMLHttpRequest.DONE){var e;if(200===o.status||0===o.status)if(r.isCompressed&&o.response?e=new Uint8Array(o.response):!r.isCompressed&&o.responseText&&(e=(0,i.stringToBytes)(o.responseText)),e)return void n({cMapData:e,compressionType:t});a(new Error(o.statusText))}},o.send(null)})}}]),r}();t.DOMCMapReaderFactory=S;var k=function(){function e(){p(this,e)}return y(e,[{key:"create",value:function(e,t){(0,i.assert)(e>0&&t>0,"Invalid SVG dimensions");var r=document.createElementNS(m,"svg:svg");return r.setAttribute("version","1.1"),r.setAttribute("width",e+"px"),r.setAttribute("height",t+"px"),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("viewBox","0 0 "+e+" "+t),r}},{key:"createElement",value:function(e){return(0,i.assert)("string"==typeof e,"Invalid SVG element type"),document.createElementNS(m,e)}}]),e}();t.DOMSVGFactory=k;var w=function(){function e(t){var r=t.viewBox,n=t.scale,a=t.rotation,i=t.offsetX,o=void 0===i?0:i,s=t.offsetY,l=void 0===s?0:s,u=t.dontFlip,c=void 0!==u&&u;p(this,e),this.viewBox=r,this.scale=n,this.rotation=a,this.offsetX=o,this.offsetY=l;var f,d,h,v,y,g,m,b,_=(r[2]+r[0])/2,A=(r[3]+r[1])/2;switch((a%=360)<0&&(a+=360),a){case 180:f=-1,d=0,h=0,v=1;break;case 90:f=0,d=1,h=1,v=0;break;case 270:f=0,d=-1,h=-1,v=0;break;case 0:f=1,d=0,h=0,v=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}c&&(h=-h,v=-v),0===f?(y=Math.abs(A-r[1])*n+o,g=Math.abs(_-r[0])*n+l,m=Math.abs(r[3]-r[1])*n,b=Math.abs(r[2]-r[0])*n):(y=Math.abs(_-r[0])*n+o,g=Math.abs(A-r[1])*n+l,m=Math.abs(r[2]-r[0])*n,b=Math.abs(r[3]-r[1])*n),this.transform=[f*n,d*n,h*n,v*n,y-f*n*_-h*n*A,g-d*n*_-v*n*A],this.width=m,this.height=b}return y(e,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.scale,n=void 0===r?this.scale:r,a=t.rotation,i=void 0===a?this.rotation:a,o=t.offsetX,s=void 0===o?this.offsetX:o,l=t.offsetY,u=void 0===l?this.offsetY:l,c=t.dontFlip,f=void 0!==c&&c;return new e({viewBox:this.viewBox.slice(),scale:n,rotation:i,offsetX:s,offsetY:u,dontFlip:f})}},{key:"convertToViewportPoint",value:function(e,t){return i.Util.applyTransform([e,t],this.transform)}},{key:"convertToViewportRectangle",value:function(e){var t=i.Util.applyTransform([e[0],e[1]],this.transform),r=i.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],r[0],r[1]]}},{key:"convertToPdfPoint",value:function(e,t){return i.Util.applyInverseTransform([e,t],this.transform)}}]),e}();t.PageViewport=w;var x=function(e){c(r,i.BaseException);var t=d(r);function r(e,n){var a;return p(this,r),(a=t.call(this,e)).type=n,a}return r}();t.RenderingCancelledException=x;var C={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};function P(e){for(var t=e.length,r=0;r<t&&""===e[r].trim();)r++;return"data:"===e.substring(r,r+5).toLowerCase()}t.LinkTarget=C;var T,R=function(){function e(){p(this,e),this.started=Object.create(null),this.times=[]}return y(e,[{key:"time",value:function(e){e in this.started&&(0,i.warn)("Timer is already running for ".concat(e)),this.started[e]=Date.now()}},{key:"timeEnd",value:function(e){e in this.started||(0,i.warn)("Timer has not been started for ".concat(e)),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}},{key:"toString",value:function(){var e,t=[],r=0,n=o(this.times);try{for(n.s();!(e=n.n()).done;){var a=e.value.name;a.length>r&&(r=a.length)}}catch(e){n.e(e)}finally{n.f()}var i,s=o(this.times);try{for(s.s();!(i=s.n()).done;){var l=i.value,u=l.end-l.start;t.push("".concat(l.name.padEnd(r)," ").concat(u,"ms\n"))}}catch(e){s.e(e)}finally{s.f()}return t.join("")}}]),e}();function E(){return"undefined"!=typeof fetch&&"undefined"!=typeof Response&&"body"in Response.prototype&&"undefined"!=typeof ReadableStream}function O(e,t){try{var r=(t?new URL(e,t):new URL(e)).protocol;return"http:"===r||"https:"===r}catch(e){return!1}}t.StatTimer=R;var F=function(){function e(){p(this,e)}return y(e,null,[{key:"toDateObject",value:function(e){if(!e||!(0,i.isString)(e))return null;T||(T=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var t=T.exec(e);if(!t)return null;var r=parseInt(t[1],10),n=parseInt(t[2],10);n=n>=1&&n<=12?n-1:0;var a=parseInt(t[3],10);a=a>=1&&a<=31?a:1;var o=parseInt(t[4],10);o=o>=0&&o<=23?o:0;var s=parseInt(t[5],10);s=s>=0&&s<=59?s:0;var l=parseInt(t[6],10);l=l>=0&&l<=59?l:0;var u=t[7]||"Z",c=parseInt(t[8],10);c=c>=0&&c<=23?c:0;var f=parseInt(t[9],10)||0;return f=f>=0&&f<=59?f:0,"-"===u?(o+=c,s+=f):"+"===u&&(o-=c,s-=f),new Date(Date.UTC(r,n,a,o,s,l))}}]),e}();t.PDFDateString=F},(e,t,r)=>{"use strict";e.exports=r(3)},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=function(e){var t,r=Object.prototype,a=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof g?t:g,i=Object.create(a.prototype),o=new R(n||[]);return i._invoke=function(e,t,r){var n=d;return function(a,i){if(n===p)throw new Error("Generator is already running");if(n===v){if("throw"===a)throw i;return O()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=C(o,r);if(s){if(s===y)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===d)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var l=f(e,t,r);if("normal"===l.type){if(n=r.done?v:h,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n=v,r.method="throw",r.arg=l.arg)}}}(e,r,o),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d="suspendedStart",h="suspendedYield",p="executing",v="completed",y={};function g(){}function m(){}function b(){}var _={};_[o]=function(){return this};var A=Object.getPrototypeOf,S=A&&A(A(E([])));S&&S!==r&&a.call(S,o)&&(_=S);var k=b.prototype=g.prototype=Object.create(_);function w(e){["next","throw","return"].forEach(function(t){u(e,t,function(e){return this._invoke(t,e)})})}function x(e,t){var r;this._invoke=function(i,o){function s(){return new t(function(r,s){!function r(i,o,s,l){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"===n(d)&&a.call(d,"__await")?t.resolve(d.__await).then(function(e){r("next",e,s,l)},function(e){r("throw",e,s,l)}):t.resolve(d).then(function(e){c.value=e,s(c)},function(e){return r("throw",e,s,l)})}l(u.arg)}(i,o,r,s)})}return r=r?r.then(s,s):s()}}function C(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var a=f(n,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function E(e){if(e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function r(){for(;++n<e.length;)if(a.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}return{next:O}}function O(){return{value:t,done:!0}}return m.prototype=k.constructor=b,b.constructor=m,m.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},w(x.prototype),x.prototype[s]=function(){return this},e.AsyncIterator=x,e.async=function(t,r,n,a,i){void 0===i&&(i=Promise);var o=new x(c(t,r,n,a),i);return e.isGeneratorFunction(r)?o:o.next().then(function(e){return e.done?e.value:o.next()})},w(k),u(k,l,"Generator"),k[o]=function(){return this},k.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=E,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,a){return s.type="throw",s.arg=e,r.next=n,a&&(r.method="next",r.arg=t),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var l=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(l&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;T(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:E(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}("object"===n(e=r.nmd(e))?e.exports:{});try{regeneratorRuntime=a}catch(e){Function("r","regeneratorRuntime = r")(a)}},(e,t,r)=>{"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,n=f(e);if(t){var a=f(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.arrayByteLength=T,t.arraysToBytes=function(e){var t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];for(var r=0,n=0;n<t;n++)r+=T(e[n]);for(var a=0,i=new Uint8Array(r),o=0;o<t;o++){var s=e[o];s instanceof Uint8Array||(s="string"==typeof s?P(s):new Uint8Array(s));var l=s.byteLength;i.set(s,a),a+=l}return i},t.assert=y,t.bytesToString=function(e){y(null!==e&&"object"===o(e)&&void 0!==e.length,"Invalid argument for bytesToString");var t=e.length;if(t<8192)return String.fromCharCode.apply(null,e);for(var r=[],n=0;n<t;n+=8192){var a=Math.min(n+8192,t),i=e.subarray(n,a);r.push(String.fromCharCode.apply(null,i))}return r.join("")},t.createObjectURL=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(URL.createObjectURL&&!r)return URL.createObjectURL(new Blob([e],{type:t}));for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a="data:".concat(t,";base64,"),i=0,o=e.length;i<o;i+=3){var s=255&e[i],l=255&e[i+1],u=255&e[i+2],c=s>>2,f=(3&s)<<4|l>>4,d=i+1<o?(15&l)<<2|u>>6:64,h=i+2<o?63&u:64;a+=n[c]+n[f]+n[d]+n[h]}return a},t.createPromiseCapability=function(){var e=Object.create(null),t=!1;return Object.defineProperty(e,"settled",{get:function(){return t}}),e.promise=new Promise(function(r,n){e.resolve=function(e){t=!0,r(e)},e.reject=function(e){t=!0,n(e)}}),e},t.createValidAbsoluteUrl=function(e,t){if(!e)return null;try{var r=t?new URL(e,t):new URL(e);if(function(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r))return r}catch(e){}return null},t.escapeString=function(e){return e.replace(/([()\\\n\r])/g,function(e){return"\n"===e?"\\n":"\r"===e?"\\r":"\\".concat(e)})},t.getModificationDate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")},t.getVerbosityLevel=function(){return h},t.info=function(e){h>=d.INFOS&&console.log("Info: ".concat(e))},t.isArrayBuffer=function(e){return"object"===o(e)&&null!==e&&void 0!==e.byteLength},t.isArrayEqual=function(e,t){if(e.length!==t.length)return!1;for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0},t.isAscii=function(e){return/^[\x00-\x7F]*$/.test(e)},t.isBool=function(e){return"boolean"==typeof e},t.isNum=function(e){return"number"==typeof e},t.isSameOrigin=function(e,t){var r;try{if(!(r=new URL(e)).origin||"null"===r.origin)return!1}catch(e){return!1}var n=new URL(t,r);return r.origin===n.origin},t.isString=function(e){return"string"==typeof e},t.objectFromMap=function(e){var t,r=Object.create(null),n=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=a(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw o}}}}(e);try{for(n.s();!(t=n.n()).done;){var i=(l=t.value,u=2,function(e){if(Array.isArray(e))return e}(l)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(l,u)||a(l,u)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=i[0],s=i[1];r[o]=s}}catch(e){n.e(e)}finally{n.f()}var l,u;return r},t.objectSize=function(e){return Object.keys(e).length},t.removeNullCharacters=function(e){if("string"!=typeof e)return p("The argument for removeNullCharacters must be a string."),e;return e.replace(C,"")},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(h=e)},t.shadow=g,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=P,t.stringToPDFString=function(e){var t=e.length,r=[];if("þ"===e[0]&&"ÿ"===e[1])for(var n=2;n<t;n+=2)r.push(String.fromCharCode(e.charCodeAt(n)<<8|e.charCodeAt(n+1)));else if("ÿ"===e[0]&&"þ"===e[1])for(var a=2;a<t;a+=2)r.push(String.fromCharCode(e.charCodeAt(a+1)<<8|e.charCodeAt(a)));else for(var i=0;i<t;++i){var o=I[e.charCodeAt(i)];r.push(o?String.fromCharCode(o):e.charAt(i))}return r.join("")},t.stringToUTF16BEString=function(e){for(var t=["þÿ"],r=0,n=e.length;r<n;r++){var a=e.charCodeAt(r);t.push(String.fromCharCode(a>>8&255),String.fromCharCode(255&a))}return t.join("")},t.stringToUTF8String=function(e){return decodeURIComponent(escape(e))},t.unreachable=v,t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=p,t.VerbosityLevel=t.Util=t.UNSUPPORTED_FEATURES=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.PageActionEventType=t.OPS=t.MissingPDFException=t.IsLittleEndianCached=t.IsEvalSupportedCached=t.InvalidPDFException=t.ImageKind=t.IDENTITY_MATRIX=t.FormatError=t.FontType=t.FONT_IDENTITY_MATRIX=t.DocumentActionEventType=t.CMapCompressionType=t.BaseException=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0,r(5);t.IDENTITY_MATRIX=[1,0,0,1,0,0];t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];t.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};t.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};t.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};t.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"};t.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"};t.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"};t.AnnotationReplyType={GROUP:"Group",REPLY:"R"};t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};t.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};t.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};t.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"};t.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};t.PageActionEventType={O:"PageOpen",C:"PageClose"};t.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"};t.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};var d={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=d;t.CMapCompressionType={NONE:0,BINARY:1,STREAM:2};t.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};t.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",signatures:"signatures",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontBuildPath:"errorFontBuildPath",errorFontGetPath:"errorFontGetPath",errorMarkedContent:"errorMarkedContent"};t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var h=d.WARNINGS;function p(e){h>=d.WARNINGS&&console.log("Warning: ".concat(e))}function v(e){throw new Error(e)}function y(e,t){e||v(t)}function g(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}var m=function(){function e(t){this.constructor===e&&v("Cannot initialize BaseException."),this.message=t,this.name=this.constructor.name}return e.prototype=new Error,e.constructor=e,e}();t.BaseException=m;var b=function(e){l(r,m);var t=c(r);function r(e,n){var a;return s(this,r),(a=t.call(this,e)).code=n,a}return r}();t.PasswordException=b;var _=function(e){l(r,m);var t=c(r);function r(e,n){var a;return s(this,r),(a=t.call(this,e)).details=n,a}return r}();t.UnknownErrorException=_;var A=function(e){l(r,m);var t=c(r);function r(){return s(this,r),t.apply(this,arguments)}return r}();t.InvalidPDFException=A;var S=function(e){l(r,m);var t=c(r);function r(){return s(this,r),t.apply(this,arguments)}return r}();t.MissingPDFException=S;var k=function(e){l(r,m);var t=c(r);function r(e,n){var a;return s(this,r),(a=t.call(this,e)).status=n,a}return r}();t.UnexpectedResponseException=k;var w=function(e){l(r,m);var t=c(r);function r(){return s(this,r),t.apply(this,arguments)}return r}();t.FormatError=w;var x=function(e){l(r,m);var t=c(r);function r(){return s(this,r),t.apply(this,arguments)}return r}();t.AbortException=x;var C=/\x00/g;function P(e){y("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),n=0;n<t;++n)r[n]=255&e.charCodeAt(n);return r}function T(e){return void 0!==e.length?e.length:(y(void 0!==e.byteLength,"arrayByteLength - invalid argument."),e.byteLength)}var R={get value(){return g(this,"value",((e=new Uint8Array(4))[0]=1,1===new Uint32Array(e.buffer,0,1)[0]));var e}};t.IsLittleEndianCached=R;var E={get value(){return g(this,"value",function(){try{return new Function(""),!0}catch(e){return!1}}())}};t.IsEvalSupportedCached=E;var O=function(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Array(256).keys()).map(function(e){return e.toString(16).padStart(2,"0")}),F=function(){function e(){s(this,e)}var t,r,a;return t=e,a=[{key:"makeHexColor",value:function(e,t,r){return"#".concat(O[e]).concat(O[t]).concat(O[r])}},{key:"transform",value:function(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}},{key:"applyTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}},{key:"applyInverseTransform",value:function(e,t){var r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]}},{key:"getAxialAlignedBoundingBox",value:function(t,r){var n=e.applyTransform(t,r),a=e.applyTransform(t.slice(2,4),r),i=e.applyTransform([t[0],t[3]],r),o=e.applyTransform([t[2],t[1]],r);return[Math.min(n[0],a[0],i[0],o[0]),Math.min(n[1],a[1],i[1],o[1]),Math.max(n[0],a[0],i[0],o[0]),Math.max(n[1],a[1],i[1],o[1])]}},{key:"inverseTransform",value:function(e){var t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}},{key:"apply3dTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]}},{key:"singularValueDecompose2dScale",value:function(e){var t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],n=e[0]*t[1]+e[1]*t[3],a=e[2]*t[0]+e[3]*t[2],i=e[2]*t[1]+e[3]*t[3],o=(r+i)/2,s=Math.sqrt(Math.pow(r+i,2)-4*(r*i-a*n))/2,l=o+s||1,u=o-s||1;return[Math.sqrt(l),Math.sqrt(u)]}},{key:"normalizeRect",value:function(e){var t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}},{key:"intersect",value:function(t,r){function n(e,t){return e-t}var a=[t[0],t[2],r[0],r[2]].sort(n),i=[t[1],t[3],r[1],r[3]].sort(n),o=[];return t=e.normalizeRect(t),r=e.normalizeRect(r),a[0]===t[0]&&a[1]===r[0]||a[0]===r[0]&&a[1]===t[0]?(o[0]=a[1],o[2]=a[2],i[0]===t[1]&&i[1]===r[1]||i[0]===r[1]&&i[1]===t[1]?(o[1]=i[1],o[3]=i[2],o):null):null}}],(r=null)&&n(t.prototype,r),a&&n(t,a),e}();t.Util=F;var I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364]},(e,t,r)=>{"use strict";var n=r(6);"undefined"!=typeof globalThis&&globalThis._pdfjsCompatibilityChecked||("undefined"!=typeof globalThis&&globalThis.Math===Math||(globalThis=r(7)),globalThis._pdfjsCompatibilityChecked=!0,!globalThis.btoa&&n.isNodeJS&&(globalThis.btoa=function(e){return Buffer.from(e,"binary").toString("base64")}),!globalThis.atob&&n.isNodeJS&&(globalThis.atob=function(e){return Buffer.from(e,"base64").toString("binary")}),Object.fromEntries||r(53),globalThis.Promise.allSettled||(globalThis.Promise=r(84)),function(){var e=!1;if("undefined"!=typeof ReadableStream)try{new ReadableStream({start:function(e){e.close()}}),e=!0}catch(e){}e||(globalThis.ReadableStream=r(112).ReadableStream)}())},(e,t)=>{"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0;var n=!("object"!==("undefined"==typeof process?"undefined":r(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=n},(e,t,r)=>{r(8),e.exports=r(10)},(e,t,r)=>{r(9)({global:!0},{globalThis:r(10)})},(e,t,r)=>{var n=r(10),a=r(11).f,i=r(26),o=r(29),s=r(30),l=r(40),u=r(52);e.exports=function(e,t){var r,c,f,d,h,p=e.target,v=e.global,y=e.stat;if(r=v?n:y?n[p]||s(p,{}):(n[p]||{}).prototype)for(c in t){if(d=t[c],f=e.noTargetGet?(h=a(r,c))&&h.value:r[c],!u(v?c:p+(y?".":"#")+c,e.forced)&&void 0!==f){if(typeof d==typeof f)continue;l(d,f)}(e.sham||f&&f.sham)&&i(d,"sham",!0),o(r,c,d,e)}}},e=>{var t=function(e){return e&&e.Math==Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||function(){return this}()||Function("return this")()},(e,t,r)=>{var n=r(12),a=r(14),i=r(15),o=r(16),s=r(20),l=r(22),u=r(24),c=Object.getOwnPropertyDescriptor;t.f=n?c:function(e,t){if(e=o(e),t=s(t,!0),u)try{return c(e,t)}catch(e){}if(l(e,t))return i(!a.f.call(e,t),e[t])}},(e,t,r)=>{var n=r(13);e.exports=!n(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},(e,t)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,a=n&&!r.call({1:2},1);t.f=a?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},(e,t,r)=>{var n=r(17),a=r(19);e.exports=function(e){return n(a(e))}},(e,t,r)=>{var n=r(13),a=r(18),i="".split;e.exports=n(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==a(e)?i.call(e,""):Object(e)}:Object},e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},(e,t,r)=>{var n=r(21);e.exports=function(e,t){if(!n(e))return e;var r,a;if(t&&"function"==typeof(r=e.toString)&&!n(a=r.call(e)))return a;if("function"==typeof(r=e.valueOf)&&!n(a=r.call(e)))return a;if(!t&&"function"==typeof(r=e.toString)&&!n(a=r.call(e)))return a;throw TypeError("Can't convert object to primitive value")}},e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},(e,t,r)=>{var n=r(23),a={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return a.call(n(e),t)}},(e,t,r)=>{var n=r(19);e.exports=function(e){return Object(n(e))}},(e,t,r)=>{var n=r(12),a=r(13),i=r(25);e.exports=!n&&!a(function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},(e,t,r)=>{var n=r(10),a=r(21),i=n.document,o=a(i)&&a(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},(e,t,r)=>{var n=r(12),a=r(27),i=r(15);e.exports=n?function(e,t,r){return a.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},(e,t,r)=>{var n=r(12),a=r(24),i=r(28),o=r(20),s=Object.defineProperty;t.f=n?s:function(e,t,r){if(i(e),t=o(t,!0),i(r),a)try{return s(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},(e,t,r)=>{var n=r(21);e.exports=function(e){if(!n(e))throw TypeError(String(e)+" is not an object");return e}},(e,t,r)=>{var n=r(10),a=r(26),i=r(22),o=r(30),s=r(31),l=r(33),u=l.get,c=l.enforce,f=String(String).split("String");(e.exports=function(e,t,r,s){var l,u=!!s&&!!s.unsafe,d=!!s&&!!s.enumerable,h=!!s&&!!s.noTargetGet;"function"==typeof r&&("string"!=typeof t||i(r,"name")||a(r,"name",t),(l=c(r)).source||(l.source=f.join("string"==typeof t?t:""))),e!==n?(u?!h&&e[t]&&(d=!0):delete e[t],d?e[t]=r:a(e,t,r)):d?e[t]=r:o(t,r)})(Function.prototype,"toString",function(){return"function"==typeof this&&u(this).source||s(this)})},(e,t,r)=>{var n=r(10),a=r(26);e.exports=function(e,t){try{a(n,e,t)}catch(r){n[e]=t}return t}},(e,t,r)=>{var n=r(32),a=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(e){return a.call(e)}),e.exports=n.inspectSource},(e,t,r)=>{var n=r(10),a=r(30),i=n["__core-js_shared__"]||a("__core-js_shared__",{});e.exports=i},(e,t,r)=>{var n,a,i,o=r(34),s=r(10),l=r(21),u=r(26),c=r(22),f=r(32),d=r(35),h=r(39),p=s.WeakMap;if(o||f.state){var v=f.state||(f.state=new p),y=v.get,g=v.has,m=v.set;n=function(e,t){if(g.call(v,e))throw new TypeError("Object already initialized");return t.facade=e,m.call(v,e,t),t},a=function(e){return y.call(v,e)||{}},i=function(e){return g.call(v,e)}}else{var b=d("state");h[b]=!0,n=function(e,t){if(c(e,b))throw new TypeError("Object already initialized");return t.facade=e,u(e,b,t),t},a=function(e){return c(e,b)?e[b]:{}},i=function(e){return c(e,b)}}e.exports={set:n,get:a,has:i,enforce:function(e){return i(e)?a(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!l(t)||(r=a(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}}},(e,t,r)=>{var n=r(10),a=r(31),i=n.WeakMap;e.exports="function"==typeof i&&/native code/.test(a(i))},(e,t,r)=>{var n=r(36),a=r(38),i=n("keys");e.exports=function(e){return i[e]||(i[e]=a(e))}},(e,t,r)=>{var n=r(37),a=r(32);(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.13.1",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},e=>{e.exports=!1},e=>{var t=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+r).toString(36)}},e=>{e.exports={}},(e,t,r)=>{var n=r(22),a=r(41),i=r(11),o=r(27);e.exports=function(e,t){for(var r=a(t),s=o.f,l=i.f,u=0;u<r.length;u++){var c=r[u];n(e,c)||s(e,c,l(t,c))}}},(e,t,r)=>{var n=r(42),a=r(44),i=r(51),o=r(28);e.exports=n("Reflect","ownKeys")||function(e){var t=a.f(o(e)),r=i.f;return r?t.concat(r(e)):t}},(e,t,r)=>{var n=r(43),a=r(10),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(n[e])||i(a[e]):n[e]&&n[e][t]||a[e]&&a[e][t]}},(e,t,r)=>{var n=r(10);e.exports=n},(e,t,r)=>{var n=r(45),a=r(50).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,a)}},(e,t,r)=>{var n=r(22),a=r(16),i=r(46).indexOf,o=r(39);e.exports=function(e,t){var r,s=a(e),l=0,u=[];for(r in s)!n(o,r)&&n(s,r)&&u.push(r);for(;t.length>l;)n(s,r=t[l++])&&(~i(u,r)||u.push(r));return u}},(e,t,r)=>{var n=r(16),a=r(47),i=r(49),o=function(e){return function(t,r,o){var s,l=n(t),u=a(l.length),c=i(o,u);if(e&&r!=r){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===r)return e||c||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},(e,t,r)=>{var n=r(48),a=Math.min;e.exports=function(e){return e>0?a(n(e),9007199254740991):0}},e=>{var t=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:t)(e)}},(e,t,r)=>{var n=r(48),a=Math.max,i=Math.min;e.exports=function(e,t){var r=n(e);return r<0?a(r+t,0):i(r,t)}},e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(e,t)=>{t.f=Object.getOwnPropertySymbols},(e,t,r)=>{var n=r(13),a=/#|\.prototype\./,i=function(e,t){var r=s[o(e)];return r==u||r!=l&&("function"==typeof t?n(t):!!t)},o=i.normalize=function(e){return String(e).replace(a,".").toLowerCase()},s=i.data={},l=i.NATIVE="N",u=i.POLYFILL="P";e.exports=i},(e,t,r)=>{r(54),r(74);var n=r(43);e.exports=n.Object.fromEntries},(e,t,r)=>{"use strict";var n=r(16),a=r(55),i=r(65),o=r(33),s=r(66),l=o.set,u=o.getterFor("Array Iterator");e.exports=s(Array,"Array",function(e,t){l(this,{type:"Array Iterator",target:n(e),index:0,kind:t})},function(){var e=u(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values"),i.Arguments=i.Array,a("keys"),a("values"),a("entries")},(e,t,r)=>{var n=r(56),a=r(61),i=r(27),o=n("unscopables"),s=Array.prototype;null==s[o]&&i.f(s,o,{configurable:!0,value:a(null)}),e.exports=function(e){s[o][e]=!0}},(e,t,r)=>{var n=r(10),a=r(36),i=r(22),o=r(38),s=r(57),l=r(60),u=a("wks"),c=n.Symbol,f=l?c:c&&c.withoutSetter||o;e.exports=function(e){return i(u,e)&&(s||"string"==typeof u[e])||(s&&i(c,e)?u[e]=c[e]:u[e]=f("Symbol."+e)),u[e]}},(e,t,r)=>{var n=r(58),a=r(13);e.exports=!!Object.getOwnPropertySymbols&&!a(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})},(e,t,r)=>{var n,a,i=r(10),o=r(59),s=i.process,l=s&&s.versions,u=l&&l.v8;u?a=(n=u.split("."))[0]<4?1:n[0]+n[1]:o&&(!(n=o.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=o.match(/Chrome\/(\d+)/))&&(a=n[1]),e.exports=a&&+a},(e,t,r)=>{var n=r(42);e.exports=n("navigator","userAgent")||""},(e,t,r)=>{var n=r(57);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(e,t,r)=>{var n,a=r(28),i=r(62),o=r(50),s=r(39),l=r(64),u=r(25),c=r(35),f=c("IE_PROTO"),d=function(){},h=function(e){return"<script>"+e+"<\/script>"},p=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;p=n?function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t}(n):((t=u("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F);for(var r=o.length;r--;)delete p.prototype[o[r]];return p()};s[f]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(d.prototype=a(e),r=new d,d.prototype=null,r[f]=e):r=p(),void 0===t?r:i(r,t)}},(e,t,r)=>{var n=r(12),a=r(27),i=r(28),o=r(63);e.exports=n?Object.defineProperties:function(e,t){i(e);for(var r,n=o(t),s=n.length,l=0;s>l;)a.f(e,r=n[l++],t[r]);return e}},(e,t,r)=>{var n=r(45),a=r(50);e.exports=Object.keys||function(e){return n(e,a)}},(e,t,r)=>{var n=r(42);e.exports=n("document","documentElement")},e=>{e.exports={}},(e,t,r)=>{"use strict";var n=r(9),a=r(67),i=r(69),o=r(72),s=r(71),l=r(26),u=r(29),c=r(56),f=r(37),d=r(65),h=r(68),p=h.IteratorPrototype,v=h.BUGGY_SAFARI_ITERATORS,y=c("iterator"),g=function(){return this};e.exports=function(e,t,r,c,h,m,b){a(r,t,c);var _,A,S,k=function(e){if(e===h&&T)return T;if(!v&&e in C)return C[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},w=t+" Iterator",x=!1,C=e.prototype,P=C[y]||C["@@iterator"]||h&&C[h],T=!v&&P||k(h),R="Array"==t&&C.entries||P;if(R&&(_=i(R.call(new e)),p!==Object.prototype&&_.next&&(f||i(_)===p||(o?o(_,p):"function"!=typeof _[y]&&l(_,y,g)),s(_,w,!0,!0),f&&(d[w]=g))),"values"==h&&P&&"values"!==P.name&&(x=!0,T=function(){return P.call(this)}),f&&!b||C[y]===T||l(C,y,T),d[t]=T,h)if(A={values:k("values"),keys:m?T:k("keys"),entries:k("entries")},b)for(S in A)!v&&!x&&S in C||u(C,S,A[S]);else n({target:t,proto:!0,forced:v||x},A);return A}},(e,t,r)=>{"use strict";var n=r(68).IteratorPrototype,a=r(61),i=r(15),o=r(71),s=r(65),l=function(){return this};e.exports=function(e,t,r){var u=t+" Iterator";return e.prototype=a(n,{next:i(1,r)}),o(e,u,!1,!0),s[u]=l,e}},(e,t,r)=>{"use strict";var n,a,i,o=r(13),s=r(69),l=r(26),u=r(22),c=r(56),f=r(37),d=c("iterator"),h=!1;[].keys&&("next"in(i=[].keys())?(a=s(s(i)))!==Object.prototype&&(n=a):h=!0);var p=null==n||o(function(){var e={};return n[d].call(e)!==e});p&&(n={}),f&&!p||u(n,d)||l(n,d,function(){return this}),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:h}},(e,t,r)=>{var n=r(22),a=r(23),i=r(35),o=r(70),s=i("IE_PROTO"),l=Object.prototype;e.exports=o?Object.getPrototypeOf:function(e){return e=a(e),n(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},(e,t,r)=>{var n=r(13);e.exports=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},(e,t,r)=>{var n=r(27).f,a=r(22),i=r(56)("toStringTag");e.exports=function(e,t,r){e&&!a(e=r?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},(e,t,r)=>{var n=r(28),a=r(73);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),t=r instanceof Array}catch(e){}return function(r,i){return n(r),a(i),t?e.call(r,i):r.__proto__=i,r}}():void 0)},(e,t,r)=>{var n=r(21);e.exports=function(e){if(!n(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},(e,t,r)=>{var n=r(9),a=r(75),i=r(83);n({target:"Object",stat:!0},{fromEntries:function(e){var t={};return a(e,function(e,r){i(t,e,r)},{AS_ENTRIES:!0}),t}})},(e,t,r)=>{var n=r(28),a=r(76),i=r(47),o=r(77),s=r(79),l=r(82),u=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,r){var c,f,d,h,p,v,y,g=r&&r.that,m=!(!r||!r.AS_ENTRIES),b=!(!r||!r.IS_ITERATOR),_=!(!r||!r.INTERRUPTED),A=o(t,g,1+m+_),S=function(e){return c&&l(c),new u(!0,e)},k=function(e){return m?(n(e),_?A(e[0],e[1],S):A(e[0],e[1])):_?A(e,S):A(e)};if(b)c=e;else{if("function"!=typeof(f=s(e)))throw TypeError("Target is not iterable");if(a(f)){for(d=0,h=i(e.length);h>d;d++)if((p=k(e[d]))&&p instanceof u)return p;return new u(!1)}c=f.call(e)}for(v=c.next;!(y=v.call(c)).done;){try{p=k(y.value)}catch(e){throw l(c),e}if("object"==typeof p&&p&&p instanceof u)return p}return new u(!1)}},(e,t,r)=>{var n=r(56),a=r(65),i=n("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(a.Array===e||o[i]===e)}},(e,t,r)=>{var n=r(78);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,a){return e.call(t,r,n,a)}}return function(){return e.apply(t,arguments)}}},e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},(e,t,r)=>{var n=r(80),a=r(65),i=r(56)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[n(e)]}},(e,t,r)=>{var n=r(81),a=r(18),i=r(56)("toStringTag"),o="Arguments"==a(function(){return arguments}());e.exports=n?a:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?r:o?a(t):"Object"==(n=a(t))&&"function"==typeof t.callee?"Arguments":n}},(e,t,r)=>{var n={};n[r(56)("toStringTag")]="z",e.exports="[object z]"===String(n)},(e,t,r)=>{var n=r(28);e.exports=function(e){var t=e.return;if(void 0!==t)return n(t.call(e)).value}},(e,t,r)=>{"use strict";var n=r(20),a=r(27),i=r(15);e.exports=function(e,t,r){var o=n(t);o in e?a.f(e,o,i(0,r)):e[o]=r}},(e,t,r)=>{r(85),r(86),r(88),r(105),r(106),r(107),r(108),r(110);var n=r(43);e.exports=n.Promise},(e,t,r)=>{"use strict";var n=r(9),a=r(69),i=r(72),o=r(61),s=r(26),l=r(15),u=r(75),c=function(e,t){var r=this;if(!(r instanceof c))return new c(e,t);i&&(r=i(new Error(void 0),a(r))),void 0!==t&&s(r,"message",String(t));var n=[];return u(e,n.push,{that:n}),s(r,"errors",n),r};c.prototype=o(Error.prototype,{constructor:l(5,c),message:l(5,""),name:l(5,"AggregateError")}),n({global:!0},{AggregateError:c})},(e,t,r)=>{var n=r(81),a=r(29),i=r(87);n||a(Object.prototype,"toString",i,{unsafe:!0})},(e,t,r)=>{"use strict";var n=r(81),a=r(80);e.exports=n?{}.toString:function(){return"[object "+a(this)+"]"}},(e,t,r)=>{"use strict";var n,a,i,o,s=r(9),l=r(37),u=r(10),c=r(42),f=r(89),d=r(29),h=r(90),p=r(72),v=r(71),y=r(91),g=r(21),m=r(78),b=r(92),_=r(31),A=r(75),S=r(93),k=r(94),w=r(95).set,x=r(98),C=r(100),P=r(102),T=r(101),R=r(103),E=r(33),O=r(52),F=r(56),I=r(104),M=r(97),L=r(58),j=F("species"),D="Promise",N=E.get,q=E.set,W=E.getterFor(D),U=f&&f.prototype,B=f,G=U,z=u.TypeError,H=u.document,V=u.process,Y=T.f,X=Y,Q=!!(H&&H.createEvent&&u.dispatchEvent),K="function"==typeof PromiseRejectionEvent,J=!1,$=O(D,function(){var e=_(B)!==String(B);if(!e&&66===L)return!0;if(l&&!G.finally)return!0;if(L>=51&&/native code/.test(B))return!1;var t=new B(function(e){e(1)}),r=function(e){e(function(){},function(){})};return(t.constructor={})[j]=r,!(J=t.then(function(){})instanceof r)||!e&&I&&!K}),Z=$||!S(function(e){B.all(e).catch(function(){})}),ee=function(e){var t;return!(!g(e)||"function"!=typeof(t=e.then))&&t},te=function(e,t){if(!e.notified){e.notified=!0;var r=e.reactions;x(function(){for(var n=e.value,a=1==e.state,i=0;r.length>i;){var o,s,l,u=r[i++],c=a?u.ok:u.fail,f=u.resolve,d=u.reject,h=u.domain;try{c?(a||(2===e.rejection&&ie(e),e.rejection=1),!0===c?o=n:(h&&h.enter(),o=c(n),h&&(h.exit(),l=!0)),o===u.promise?d(z("Promise-chain cycle")):(s=ee(o))?s.call(o,f,d):f(o)):d(n)}catch(e){h&&!l&&h.exit(),d(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&ne(e)})}},re=function(e,t,r){var n,a;Q?((n=H.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),u.dispatchEvent(n)):n={promise:t,reason:r},!K&&(a=u["on"+e])?a(n):"unhandledrejection"===e&&P("Unhandled promise rejection",r)},ne=function(e){w.call(u,function(){var t,r=e.facade,n=e.value;if(ae(e)&&(t=R(function(){M?V.emit("unhandledRejection",n,r):re("unhandledrejection",r,n)}),e.rejection=M||ae(e)?2:1,t.error))throw t.value})},ae=function(e){return 1!==e.rejection&&!e.parent},ie=function(e){w.call(u,function(){var t=e.facade;M?V.emit("rejectionHandled",t):re("rejectionhandled",t,e.value)})},oe=function(e,t,r){return function(n){e(t,n,r)}},se=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,te(e,!0))},le=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw z("Promise can't be resolved itself");var n=ee(t);n?x(function(){var r={done:!1};try{n.call(t,oe(le,r,e),oe(se,r,e))}catch(t){se(r,t,e)}}):(e.value=t,e.state=1,te(e,!1))}catch(t){se({done:!1},t,e)}}};if($&&(G=(B=function(e){b(this,B,D),m(e),n.call(this);var t=N(this);try{e(oe(le,t),oe(se,t))}catch(e){se(t,e)}}).prototype,(n=function(e){q(this,{type:D,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=h(G,{then:function(e,t){var r=W(this),n=Y(k(this,B));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=M?V.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&te(r,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new n,t=N(e);this.promise=e,this.resolve=oe(le,t),this.reject=oe(se,t)},T.f=Y=function(e){return e===B||e===i?new a(e):X(e)},!l&&"function"==typeof f&&U!==Object.prototype)){o=U.then,J||(d(U,"then",function(e,t){var r=this;return new B(function(e,t){o.call(r,e,t)}).then(e,t)},{unsafe:!0}),d(U,"catch",G.catch,{unsafe:!0}));try{delete U.constructor}catch(e){}p&&p(U,G)}s({global:!0,wrap:!0,forced:$},{Promise:B}),v(B,D,!1,!0),y(D),i=c(D),s({target:D,stat:!0,forced:$},{reject:function(e){var t=Y(this);return t.reject.call(void 0,e),t.promise}}),s({target:D,stat:!0,forced:l||$},{resolve:function(e){return C(l&&this===i?B:this,e)}}),s({target:D,stat:!0,forced:Z},{all:function(e){var t=this,r=Y(t),n=r.resolve,a=r.reject,i=R(function(){var r=m(t.resolve),i=[],o=0,s=1;A(e,function(e){var l=o++,u=!1;i.push(void 0),s++,r.call(t,e).then(function(e){u||(u=!0,i[l]=e,--s||n(i))},a)}),--s||n(i)});return i.error&&a(i.value),r.promise},race:function(e){var t=this,r=Y(t),n=r.reject,a=R(function(){var a=m(t.resolve);A(e,function(e){a.call(t,e).then(r.resolve,n)})});return a.error&&n(a.value),r.promise}})},(e,t,r)=>{var n=r(10);e.exports=n.Promise},(e,t,r)=>{var n=r(29);e.exports=function(e,t,r){for(var a in t)n(e,a,t[a],r);return e}},(e,t,r)=>{"use strict";var n=r(42),a=r(27),i=r(56),o=r(12),s=i("species");e.exports=function(e){var t=n(e),r=a.f;o&&t&&!t[s]&&r(t,s,{configurable:!0,get:function(){return this}})}},e=>{e.exports=function(e,t,r){if(!(e instanceof t))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return e}},(e,t,r)=>{var n=r(56)("iterator"),a=!1;try{var i=0,o={next:function(){return{done:!!i++}},return:function(){a=!0}};o[n]=function(){return this},Array.from(o,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!a)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},e(i)}catch(e){}return r}},(e,t,r)=>{var n=r(28),a=r(78),i=r(56)("species");e.exports=function(e,t){var r,o=n(e).constructor;return void 0===o||null==(r=n(o)[i])?t:a(r)}},(e,t,r)=>{var n,a,i,o=r(10),s=r(13),l=r(77),u=r(64),c=r(25),f=r(96),d=r(97),h=o.location,p=o.setImmediate,v=o.clearImmediate,y=o.process,g=o.MessageChannel,m=o.Dispatch,b=0,_={},A=function(e){if(_.hasOwnProperty(e)){var t=_[e];delete _[e],t()}},S=function(e){return function(){A(e)}},k=function(e){A(e.data)},w=function(e){o.postMessage(e+"",h.protocol+"//"+h.host)};p&&v||(p=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return _[++b]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},n(b),b},v=function(e){delete _[e]},d?n=function(e){y.nextTick(S(e))}:m&&m.now?n=function(e){m.now(S(e))}:g&&!f?(i=(a=new g).port2,a.port1.onmessage=k,n=l(i.postMessage,i,1)):o.addEventListener&&"function"==typeof postMessage&&!o.importScripts&&h&&"file:"!==h.protocol&&!s(w)?(n=w,o.addEventListener("message",k,!1)):n="onreadystatechange"in c("script")?function(e){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),A(e)}}:function(e){setTimeout(S(e),0)}),e.exports={set:p,clear:v}},(e,t,r)=>{var n=r(59);e.exports=/(?:iphone|ipod|ipad).*applewebkit/i.test(n)},(e,t,r)=>{var n=r(18),a=r(10);e.exports="process"==n(a.process)},(e,t,r)=>{var n,a,i,o,s,l,u,c,f=r(10),d=r(11).f,h=r(95).set,p=r(96),v=r(99),y=r(97),g=f.MutationObserver||f.WebKitMutationObserver,m=f.document,b=f.process,_=f.Promise,A=d(f,"queueMicrotask"),S=A&&A.value;S||(n=function(){var e,t;for(y&&(e=b.domain)&&e.exit();a;){t=a.fn,a=a.next;try{t()}catch(e){throw a?o():i=void 0,e}}i=void 0,e&&e.enter()},p||y||v||!g||!m?_&&_.resolve?((u=_.resolve(void 0)).constructor=_,c=u.then,o=function(){c.call(u,n)}):o=y?function(){b.nextTick(n)}:function(){h.call(f,n)}:(s=!0,l=m.createTextNode(""),new g(n).observe(l,{characterData:!0}),o=function(){l.data=s=!s})),e.exports=S||function(e){var t={fn:e,next:void 0};i&&(i.next=t),a||(a=t,o()),i=t}},(e,t,r)=>{var n=r(59);e.exports=/web0s(?!.*chrome)/i.test(n)},(e,t,r)=>{var n=r(28),a=r(21),i=r(101);e.exports=function(e,t){if(n(e),a(t)&&t.constructor===e)return t;var r=i.f(e);return(0,r.resolve)(t),r.promise}},(e,t,r)=>{"use strict";var n=r(78),a=function(e){var t,r;this.promise=new e(function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n}),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new a(e)}},(e,t,r)=>{var n=r(10);e.exports=function(e,t){var r=n.console;r&&r.error&&(1===arguments.length?r.error(e):r.error(e,t))}},e=>{e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},e=>{e.exports="object"==typeof window},(e,t,r)=>{"use strict";var n=r(9),a=r(78),i=r(101),o=r(103),s=r(75);n({target:"Promise",stat:!0},{allSettled:function(e){var t=this,r=i.f(t),n=r.resolve,l=r.reject,u=o(function(){var r=a(t.resolve),i=[],o=0,l=1;s(e,function(e){var a=o++,s=!1;i.push(void 0),l++,r.call(t,e).then(function(e){s||(s=!0,i[a]={status:"fulfilled",value:e},--l||n(i))},function(e){s||(s=!0,i[a]={status:"rejected",reason:e},--l||n(i))})}),--l||n(i)});return u.error&&l(u.value),r.promise}})},(e,t,r)=>{"use strict";var n=r(9),a=r(78),i=r(42),o=r(101),s=r(103),l=r(75);n({target:"Promise",stat:!0},{any:function(e){var t=this,r=o.f(t),n=r.resolve,u=r.reject,c=s(function(){var r=a(t.resolve),o=[],s=0,c=1,f=!1;l(e,function(e){var a=s++,l=!1;o.push(void 0),c++,r.call(t,e).then(function(e){l||f||(f=!0,n(e))},function(e){l||f||(l=!0,o[a]=e,--c||u(new(i("AggregateError"))(o,"No one promise resolved")))})}),--c||u(new(i("AggregateError"))(o,"No one promise resolved"))});return c.error&&u(c.value),r.promise}})},(e,t,r)=>{"use strict";var n=r(9),a=r(37),i=r(89),o=r(13),s=r(42),l=r(94),u=r(100),c=r(29);if(n({target:"Promise",proto:!0,real:!0,forced:!!i&&o(function(){i.prototype.finally.call({then:function(){}},function(){})})},{finally:function(e){var t=l(this,s("Promise")),r="function"==typeof e;return this.then(r?function(r){return u(t,e()).then(function(){return r})}:e,r?function(r){return u(t,e()).then(function(){throw r})}:e)}}),!a&&"function"==typeof i){var f=s("Promise").prototype.finally;i.prototype.finally!==f&&c(i.prototype,"finally",f,{unsafe:!0})}},(e,t,r)=>{"use strict";var n=r(109).charAt,a=r(33),i=r(66),o=a.set,s=a.getterFor("String Iterator");i(String,"String",function(e){o(this,{type:"String Iterator",string:String(e),index:0})},function(){var e,t=s(this),r=t.string,a=t.index;return a>=r.length?{value:void 0,done:!0}:(e=n(r,a),t.index+=e.length,{value:e,done:!1})})},(e,t,r)=>{var n=r(48),a=r(19),i=function(e){return function(t,r){var i,o,s=String(a(t)),l=n(r),u=s.length;return l<0||l>=u?e?"":void 0:(i=s.charCodeAt(l))<55296||i>56319||l+1===u||(o=s.charCodeAt(l+1))<56320||o>57343?e?s.charAt(l):i:e?s.slice(l,l+2):o-56320+(i-55296<<10)+65536}};e.exports={codeAt:i(!1),charAt:i(!0)}},(e,t,r)=>{var n=r(10),a=r(111),i=r(54),o=r(26),s=r(56),l=s("iterator"),u=s("toStringTag"),c=i.values;for(var f in a){var d=n[f],h=d&&d.prototype;if(h){if(h[l]!==c)try{o(h,l,c)}catch(e){h[l]=c}if(h[u]||o(h,u,f),a[f])for(var p in i)if(h[p]!==i[p])try{o(h,p,i[p])}catch(e){h[p]=i[p]}}}},e=>{e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t){(function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:function(e){return"Symbol("+e+")"};function r(){}var n="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0;function a(e){return"object"==typeof e&&null!==e||"function"==typeof e}var i=r,o=Promise,s=Promise.prototype.then,l=Promise.resolve.bind(o),u=Promise.reject.bind(o);function c(e){return new o(e)}function f(e){return l(e)}function d(e){return u(e)}function h(e,t,r){return s.call(e,t,r)}function p(e,t,r){h(h(e,t,r),void 0,i)}function v(e,t){p(e,t)}function y(e,t){p(e,void 0,t)}function g(e,t,r){return h(e,t,r)}function m(e){h(e,void 0,i)}var b=function(){var e=n&&n.queueMicrotask;if("function"==typeof e)return e;var t=f(void 0);return function(e){return h(t,e)}}();function _(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function A(e,t,r){try{return f(_(e,t,r))}catch(e){return d(e)}}var S=function(){function e(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}return Object.defineProperty(e.prototype,"length",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.push=function(e){var t=this._back,r=t;16383===t._elements.length&&(r={_elements:[],_next:void 0}),t._elements.push(e),r!==t&&(this._back=r,t._next=r),++this._size},e.prototype.shift=function(){var e=this._front,t=e,r=this._cursor,n=r+1,a=e._elements,i=a[r];return 16384===n&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),a[r]=void 0,i},e.prototype.forEach=function(e){for(var t=this._cursor,r=this._front,n=r._elements;!(t===n.length&&void 0===r._next||t===n.length&&(t=0,0===(n=(r=r._next)._elements).length));)e(n[t]),++t},e.prototype.peek=function(){var e=this._front,t=this._cursor;return e._elements[t]},e}();function k(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?P(e):"closed"===t._state?function(e){P(e),E(e)}(e):T(e,t._storedError)}function w(e,t){return cr(e._ownerReadableStream,t)}function x(e){"readable"===e._ownerReadableStream._state?R(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,t){T(e,t)}(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function C(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function P(e){e._closedPromise=c(function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r})}function T(e,t){P(e),R(e,t)}function R(e,t){void 0!==e._closedPromise_reject&&(m(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function E(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}var O=t("[[AbortSteps]]"),F=t("[[ErrorSteps]]"),I=t("[[CancelSteps]]"),M=t("[[PullSteps]]"),L=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},j=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function D(e,t){if(void 0!==e&&("object"!=typeof(r=e)&&"function"!=typeof r))throw new TypeError(t+" is not an object.");var r}function N(e,t){if("function"!=typeof e)throw new TypeError(t+" is not a function.")}function q(e,t){if(!function(e){return"object"==typeof e&&null!==e||"function"==typeof e}(e))throw new TypeError(t+" is not an object.")}function W(e,t,r){if(void 0===e)throw new TypeError("Parameter "+t+" is required in '"+r+"'.")}function U(e,t,r){if(void 0===e)throw new TypeError(t+" is required in '"+r+"'.")}function B(e){return Number(e)}function G(e){return 0===e?0:e}function z(e,t){var r=Number.MAX_SAFE_INTEGER,n=Number(e);if(n=G(n),!L(n))throw new TypeError(t+" is not a finite number");if((n=function(e){return G(j(e))}(n))<0||n>r)throw new TypeError(t+" is outside the accepted range of 0 to "+r+", inclusive");return L(n)&&0!==n?n:0}function H(e,t){if(!lr(e))throw new TypeError(t+" is not a ReadableStream.")}function V(e){return new Z(e)}function Y(e,t){e._reader._readRequests.push(t)}function X(e,t,r){var n=e._reader._readRequests.shift();r?n._closeSteps():n._chunkSteps(t)}function Q(e){return e._reader._readRequests.length}function K(e){var t=e._reader;return void 0!==t&&!!ee(t)}var J,$,Z=function(){function e(e){if(W(e,1,"ReadableStreamDefaultReader"),H(e,"First parameter"),ur(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");k(this,e),this._readRequests=new S}return Object.defineProperty(e.prototype,"closed",{get:function(){return ee(this)?this._closedPromise:d(re("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),ee(this)?void 0===this._ownerReadableStream?d(C("cancel")):w(this,e):d(re("cancel"))},e.prototype.read=function(){if(!ee(this))return d(re("read"));if(void 0===this._ownerReadableStream)return d(C("read from"));var e,t,r=c(function(r,n){e=r,t=n});return te(this,{_chunkSteps:function(t){return e({value:t,done:!1})},_closeSteps:function(){return e({value:void 0,done:!0})},_errorSteps:function(e){return t(e)}}),r},e.prototype.releaseLock=function(){if(!ee(this))throw re("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");x(this)}},e}();function ee(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function te(e,t){var r=e._ownerReadableStream;r._disturbed=!0,"closed"===r._state?t._closeSteps():"errored"===r._state?t._errorSteps(r._storedError):r._readableStreamController[M](t)}function re(e){return new TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}Object.defineProperties(Z.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(Z.prototype,t.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0}),"symbol"==typeof t.asyncIterator&&((J={})[t.asyncIterator]=function(){return this},$=J,Object.defineProperty($,t.asyncIterator,{enumerable:!1}));var ne=function(){function e(e,t){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=e,this._preventCancel=t}return e.prototype.next=function(){var e=this,t=function(){return e._nextSteps()};return this._ongoingPromise=this._ongoingPromise?g(this._ongoingPromise,t,t):t(),this._ongoingPromise},e.prototype.return=function(e){var t=this,r=function(){return t._returnSteps(e)};return this._ongoingPromise?g(this._ongoingPromise,r,r):r()},e.prototype._nextSteps=function(){var e=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var t,r,n=this._reader;if(void 0===n._ownerReadableStream)return d(C("iterate"));var a=c(function(e,n){t=e,r=n});return te(n,{_chunkSteps:function(r){e._ongoingPromise=void 0,b(function(){return t({value:r,done:!1})})},_closeSteps:function(){e._ongoingPromise=void 0,e._isFinished=!0,x(n),t({value:void 0,done:!0})},_errorSteps:function(t){e._ongoingPromise=void 0,e._isFinished=!0,x(n),r(t)}}),a},e.prototype._returnSteps=function(e){if(this._isFinished)return Promise.resolve({value:e,done:!0});this._isFinished=!0;var t=this._reader;if(void 0===t._ownerReadableStream)return d(C("finish iterating"));if(!this._preventCancel){var r=w(t,e);return x(t),g(r,function(){return{value:e,done:!0}})}return x(t),f({value:e,done:!0})},e}(),ae={next:function(){return ie(this)?this._asyncIteratorImpl.next():d(oe("next"))},return:function(e){return ie(this)?this._asyncIteratorImpl.return(e):d(oe("return"))}};function ie(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl")}function oe(e){return new TypeError("ReadableStreamAsyncIterator."+e+" can only be used on a ReadableSteamAsyncIterator")}void 0!==$&&Object.setPrototypeOf(ae,$);var se=Number.isNaN||function(e){return e!=e};function le(e){return!!function(e){if("number"!=typeof e)return!1;if(se(e))return!1;if(e<0)return!1;return!0}(e)&&e!==1/0}function ue(e){var t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function ce(e,t,r){if(!le(r=Number(r)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function fe(e){e._queue=new S,e._queueTotalSize=0}function de(e){return e.slice()}function he(e){return e}var pe=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"view",{get:function(){if(!ge(this))throw Ie("view");return this._view},enumerable:!1,configurable:!0}),e.prototype.respond=function(e){if(!ge(this))throw Ie("respond");if(W(e,1,"respond"),e=z(e,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");this._view.buffer,function(e,t){if(!le(t=Number(t)))throw new RangeError("bytesWritten must be a finite");Pe(e,t)}(this._associatedReadableByteStreamController,e)},e.prototype.respondWithNewView=function(e){if(!ge(this))throw Ie("respondWithNewView");if(W(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");!function(e,t){var r=e._pendingPullIntos.peek();if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.byteLength!==t.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");r.buffer=t.buffer,Pe(e,t.byteLength)}(this._associatedReadableByteStreamController,e)},e}();Object.defineProperties(pe.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(pe.prototype,t.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var ve=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"byobRequest",{get:function(){if(!ye(this))throw Me("byobRequest");if(null===this._byobRequest&&this._pendingPullIntos.length>0){var e=this._pendingPullIntos.peek(),t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled),r=Object.create(pe.prototype);!function(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}(r,this,t),this._byobRequest=r}return this._byobRequest},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!ye(this))throw Me("desiredSize");return Oe(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!ye(this))throw Me("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");!function(e){var t=e._controlledReadableByteStream;if(e._closeRequested||"readable"!==t._state)return;if(e._queueTotalSize>0)return void(e._closeRequested=!0);if(e._pendingPullIntos.length>0){var r=e._pendingPullIntos.peek();if(r.bytesFilled>0){var n=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Ee(e,n),n}}Re(e),fr(t)}(this)},e.prototype.enqueue=function(e){if(!ye(this))throw Me("enqueue");if(W(e,1,"enqueue"),!ArrayBuffer.isView(e))throw new TypeError("chunk must be an array buffer view");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");!function(e,t){var r=e._controlledReadableByteStream;if(e._closeRequested||"readable"!==r._state)return;var n=t.buffer,a=t.byteOffset,i=t.byteLength,o=he(n);if(K(r))if(0===Q(r))Ae(e,o,a,i);else{var s=new Uint8Array(o,a,i);X(r,s,!1)}else De(r)?(Ae(e,o,a,i),Ce(e)):Ae(e,o,a,i);me(e)}(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!ye(this))throw Me("error");Ee(this,e)},e.prototype[I]=function(e){this._pendingPullIntos.length>0&&(this._pendingPullIntos.peek().bytesFilled=0);fe(this);var t=this._cancelAlgorithm(e);return Re(this),t},e.prototype[M]=function(e){var t=this._controlledReadableByteStream;if(this._queueTotalSize>0){var r=this._queue.shift();this._queueTotalSize-=r.byteLength,we(this);var n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);e._chunkSteps(n)}else{var a=this._autoAllocateChunkSize;if(void 0!==a){var i=void 0;try{i=new ArrayBuffer(a)}catch(t){return void e._errorSteps(t)}var o={buffer:i,byteOffset:0,byteLength:a,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(o)}Y(t,e),me(this)}},e}();function ye(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")}function ge(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function me(e){(function(e){var t=e._controlledReadableByteStream;if("readable"!==t._state)return!1;if(e._closeRequested)return!1;if(!e._started)return!1;if(K(t)&&Q(t)>0)return!0;if(De(t)&&je(t)>0)return!0;if(Oe(e)>0)return!0;return!1})(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,p(e._pullAlgorithm(),function(){e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,me(e))},function(t){Ee(e,t)})))}function be(e,t){var r=!1;"closed"===e._state&&(r=!0);var n=_e(t);"default"===t.readerType?X(e,n,r):function(e,t,r){var n=e._reader._readIntoRequests.shift();r?n._closeSteps(t):n._chunkSteps(t)}(e,n,r)}function _e(e){var t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function Ae(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function Se(e,t){var r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,a=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),i=t.bytesFilled+a,o=i-i%r,s=a,l=!1;o>n&&(s=o-t.bytesFilled,l=!0);for(var u,c,f,d,h,p=e._queue;s>0;){var v=p.peek(),y=Math.min(s,v.byteLength),g=t.byteOffset+t.bytesFilled;u=t.buffer,c=g,f=v.buffer,d=v.byteOffset,h=y,new Uint8Array(u).set(new Uint8Array(f,d,h),c),v.byteLength===y?p.shift():(v.byteOffset+=y,v.byteLength-=y),e._queueTotalSize-=y,ke(e,y,t),s-=y}return l}function ke(e,t,r){xe(e),r.bytesFilled+=t}function we(e){0===e._queueTotalSize&&e._closeRequested?(Re(e),fr(e._controlledReadableByteStream)):me(e)}function xe(e){null!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Ce(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos.peek();Se(e,t)&&(Te(e),be(e._controlledReadableByteStream,t))}}function Pe(e,t){var r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");!function(e,t){t.buffer=he(t.buffer);var r=e._controlledReadableByteStream;if(De(r))for(;je(r)>0;)be(r,Te(e))}(e,r)}else!function(e,t,r){if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range");if(ke(e,t,r),!(r.bytesFilled<r.elementSize)){Te(e);var n=r.bytesFilled%r.elementSize;if(n>0){var a=r.byteOffset+r.bytesFilled,i=r.buffer.slice(a-n,a);Ae(e,i,0,i.byteLength)}r.buffer=he(r.buffer),r.bytesFilled-=n,be(e._controlledReadableByteStream,r),Ce(e)}}(e,t,r);me(e)}function Te(e){var t=e._pendingPullIntos.shift();return xe(e),t}function Re(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function Ee(e,t){var r=e._controlledReadableByteStream;"readable"===r._state&&(!function(e){xe(e),e._pendingPullIntos=new S}(e),fe(e),Re(e),dr(r,t))}function Oe(e){var t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Fe(e,t,r){var n=Object.create(ve.prototype),a=function(){},i=function(){return f(void 0)},o=function(){return f(void 0)};void 0!==t.start&&(a=function(){return t.start(n)}),void 0!==t.pull&&(i=function(){return t.pull(n)}),void 0!==t.cancel&&(o=function(e){return t.cancel(e)});var s=t.autoAllocateChunkSize;if(0===s)throw new TypeError("autoAllocateChunkSize must be greater than 0");!function(e,t,r,n,a,i,o){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,fe(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=i,t._pullAlgorithm=n,t._cancelAlgorithm=a,t._autoAllocateChunkSize=o,t._pendingPullIntos=new S,e._readableStreamController=t,p(f(r()),function(){t._started=!0,me(t)},function(e){Ee(t,e)})}(e,n,a,i,o,r,s)}function Ie(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function Me(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}function Le(e,t){e._reader._readIntoRequests.push(t)}function je(e){return e._reader._readIntoRequests.length}function De(e){var t=e._reader;return void 0!==t&&!!qe(t)}Object.defineProperties(ve.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(ve.prototype,t.toStringTag,{value:"ReadableByteStreamController",configurable:!0});var Ne=function(){function e(e){if(W(e,1,"ReadableStreamBYOBReader"),H(e,"First parameter"),ur(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!ye(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");k(this,e),this._readIntoRequests=new S}return Object.defineProperty(e.prototype,"closed",{get:function(){return qe(this)?this._closedPromise:d(We("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),qe(this)?void 0===this._ownerReadableStream?d(C("cancel")):w(this,e):d(We("cancel"))},e.prototype.read=function(e){if(!qe(this))return d(We("read"));if(!ArrayBuffer.isView(e))return d(new TypeError("view must be an array buffer view"));if(0===e.byteLength)return d(new TypeError("view must have non-zero byteLength"));if(0===e.buffer.byteLength)return d(new TypeError("view's buffer must have non-zero byteLength"));if(void 0===this._ownerReadableStream)return d(C("read from"));var t,r,n=c(function(e,n){t=e,r=n});return function(e,t,r){var n=e._ownerReadableStream;n._disturbed=!0,"errored"===n._state?r._errorSteps(n._storedError):function(e,t,r){var n=e._controlledReadableByteStream,a=1;t.constructor!==DataView&&(a=t.constructor.BYTES_PER_ELEMENT);var i=t.constructor,o={buffer:he(t.buffer),byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:a,viewConstructor:i,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(o),void Le(n,r);if("closed"!==n._state){if(e._queueTotalSize>0){if(Se(e,o)){var s=_e(o);return we(e),void r._chunkSteps(s)}if(e._closeRequested){var l=new TypeError("Insufficient bytes to fill elements in the given buffer");return Ee(e,l),void r._errorSteps(l)}}e._pendingPullIntos.push(o),Le(n,r),me(e)}else{var u=new i(o.buffer,o.byteOffset,0);r._closeSteps(u)}}(n._readableStreamController,t,r)}(this,e,{_chunkSteps:function(e){return t({value:e,done:!1})},_closeSteps:function(e){return t({value:e,done:!0})},_errorSteps:function(e){return r(e)}}),n},e.prototype.releaseLock=function(){if(!qe(this))throw We("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");x(this)}},e}();function qe(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function We(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}function Ue(e,t){var r=e.highWaterMark;if(void 0===r)return t;if(se(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function Be(e){var t=e.size;return t||function(){return 1}}function Ge(e,t){D(e,t);var r=null==e?void 0:e.highWaterMark,n=null==e?void 0:e.size;return{highWaterMark:void 0===r?void 0:B(r),size:void 0===n?void 0:ze(n,t+" has member 'size' that")}}function ze(e,t){return N(e,t),function(t){return B(e(t))}}function He(e,t,r){return N(e,r),function(r){return A(e,t,[r])}}function Ve(e,t,r){return N(e,r),function(){return A(e,t,[])}}function Ye(e,t,r){return N(e,r),function(r){return _(e,t,[r])}}function Xe(e,t,r){return N(e,r),function(r,n){return A(e,t,[r,n])}}function Qe(e,t){if(!Ze(e))throw new TypeError(t+" is not a WritableStream.")}Object.defineProperties(Ne.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(Ne.prototype,t.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});var Ke=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),void 0===e?e=null:q(e,"First parameter");var r=Ge(t,"Second parameter"),n=function(e,t){D(e,t);var r=null==e?void 0:e.abort,n=null==e?void 0:e.close,a=null==e?void 0:e.start,i=null==e?void 0:e.type,o=null==e?void 0:e.write;return{abort:void 0===r?void 0:He(r,e,t+" has member 'abort' that"),close:void 0===n?void 0:Ve(n,e,t+" has member 'close' that"),start:void 0===a?void 0:Ye(a,e,t+" has member 'start' that"),write:void 0===o?void 0:Xe(o,e,t+" has member 'write' that"),type:i}}(e,"First parameter");if($e(this),void 0!==n.type)throw new RangeError("Invalid type is specified");var a=Be(r);!function(e,t,r,n){var a=Object.create(gt.prototype),i=function(){},o=function(){return f(void 0)},s=function(){return f(void 0)},l=function(){return f(void 0)};void 0!==t.start&&(i=function(){return t.start(a)});void 0!==t.write&&(o=function(e){return t.write(e,a)});void 0!==t.close&&(s=function(){return t.close()});void 0!==t.abort&&(l=function(e){return t.abort(e)});mt(e,a,i,o,s,l,r,n)}(this,n,Ue(r,1),a)}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!Ze(this))throw xt("locked");return et(this)},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){return void 0===e&&(e=void 0),Ze(this)?et(this)?d(new TypeError("Cannot abort a stream that already has a writer")):tt(this,e):d(xt("abort"))},e.prototype.close=function(){return Ze(this)?et(this)?d(new TypeError("Cannot close a stream that already has a writer")):ot(this)?d(new TypeError("Cannot close an already-closing stream")):rt(this):d(xt("close"))},e.prototype.getWriter=function(){if(!Ze(this))throw xt("getWriter");return Je(this)},e}();function Je(e){return new ut(e)}function $e(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new S,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function Ze(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function et(e){return void 0!==e._writer}function tt(e,t){var r=e._state;if("closed"===r||"errored"===r)return f(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;var n=!1;"erroring"===r&&(n=!0,t=void 0);var a=c(function(r,a){e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:a,_reason:t,_wasAlreadyErroring:n}});return e._pendingAbortRequest._promise=a,n||at(e,t),a}function rt(e){var t=e._state;if("closed"===t||"errored"===t)return d(new TypeError("The stream (in "+t+" state) is not in the writable state and cannot be closed"));var r,n=c(function(t,r){var n={_resolve:t,_reject:r};e._closeRequest=n}),a=e._writer;return void 0!==a&&e._backpressure&&"writable"===t&&jt(a),ce(r=e._writableStreamController,yt,0),At(r),n}function nt(e,t){"writable"!==e._state?it(e):at(e,t)}function at(e,t){var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&ht(n,t),!function(e){if(void 0===e._inFlightWriteRequest&&void 0===e._inFlightCloseRequest)return!1;return!0}(e)&&r._started&&it(e)}function it(e){e._state="errored",e._writableStreamController[F]();var t=e._storedError;if(e._writeRequests.forEach(function(e){e._reject(t)}),e._writeRequests=new S,void 0!==e._pendingAbortRequest){var r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring)return r._reject(t),void st(e);p(e._writableStreamController[O](r._reason),function(){r._resolve(),st(e)},function(t){r._reject(t),st(e)})}else st(e)}function ot(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function st(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var t=e._writer;void 0!==t&&Et(t,e._storedError)}function lt(e,t){var r=e._writer;void 0!==r&&t!==e._backpressure&&(t?function(e){Ft(e)}(r):jt(r)),e._backpressure=t}Object.defineProperties(Ke.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(Ke.prototype,t.toStringTag,{value:"WritableStream",configurable:!0});var ut=function(){function e(e){if(W(e,1,"WritableStreamDefaultWriter"),Qe(e,"First parameter"),et(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;var t,r=e._state;if("writable"===r)!ot(e)&&e._backpressure?Ft(this):Mt(this),Tt(this);else if("erroring"===r)It(this,e._storedError),Tt(this);else if("closed"===r)Mt(this),Tt(t=this),Ot(t);else{var n=e._storedError;It(this,n),Rt(this,n)}}return Object.defineProperty(e.prototype,"closed",{get:function(){return ct(this)?this._closedPromise:d(Ct("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!ct(this))throw Ct("desiredSize");if(void 0===this._ownerWritableStream)throw Pt("desiredSize");return function(e){var t=e._ownerWritableStream,r=t._state;if("errored"===r||"erroring"===r)return null;if("closed"===r)return 0;return _t(t._writableStreamController)}(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return ct(this)?this._readyPromise:d(Ct("ready"))},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){return void 0===e&&(e=void 0),ct(this)?void 0===this._ownerWritableStream?d(Pt("abort")):function(e,t){return tt(e._ownerWritableStream,t)}(this,e):d(Ct("abort"))},e.prototype.close=function(){if(!ct(this))return d(Ct("close"));var e=this._ownerWritableStream;return void 0===e?d(Pt("close")):ot(e)?d(new TypeError("Cannot close an already-closing stream")):ft(this)},e.prototype.releaseLock=function(){if(!ct(this))throw Ct("releaseLock");void 0!==this._ownerWritableStream&&pt(this)},e.prototype.write=function(e){return void 0===e&&(e=void 0),ct(this)?void 0===this._ownerWritableStream?d(Pt("write to")):vt(this,e):d(Ct("write"))},e}();function ct(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function ft(e){return rt(e._ownerWritableStream)}function dt(e,t){"pending"===e._closedPromiseState?Et(e,t):function(e,t){Rt(e,t)}(e,t)}function ht(e,t){"pending"===e._readyPromiseState?Lt(e,t):function(e,t){It(e,t)}(e,t)}function pt(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");ht(e,r),dt(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function vt(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,a=function(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return St(e,t),1}}(n,t);if(r!==e._ownerWritableStream)return d(Pt("write to"));var i=r._state;if("errored"===i)return d(r._storedError);if(ot(r)||"closed"===i)return d(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===i)return d(r._storedError);var o=function(e){return c(function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)})}(r);return function(e,t,r){try{ce(e,t,r)}catch(t){return void St(e,t)}var n=e._controlledWritableStream;if(!ot(n)&&"writable"===n._state){var a=kt(e);lt(n,a)}At(e)}(n,t,a),o}Object.defineProperties(ut.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(ut.prototype,t.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});var yt={},gt=function(){function e(){throw new TypeError("Illegal constructor")}return e.prototype.error=function(e){if(void 0===e&&(e=void 0),!function(e){if(!a(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream"))return!1;return!0}(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&wt(this,e)},e.prototype[O]=function(e){var t=this._abortAlgorithm(e);return bt(this),t},e.prototype[F]=function(){fe(this)},e}();function mt(e,t,r,n,a,i,o,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,fe(t),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=o,t._writeAlgorithm=n,t._closeAlgorithm=a,t._abortAlgorithm=i;var l=kt(t);lt(e,l),p(f(r()),function(){t._started=!0,At(t)},function(r){t._started=!0,nt(e,r)})}function bt(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function _t(e){return e._strategyHWM-e._queueTotalSize}function At(e){var t=e._controlledWritableStream;if(e._started&&void 0===t._inFlightWriteRequest)if("erroring"!==t._state){if(0!==e._queue.length){var r=e._queue.peek().value;r===yt?function(e){var t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),ue(e);var r=e._closeAlgorithm();bt(e),p(r,function(){!function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var t=e._writer;void 0!==t&&Ot(t)}(t)},function(e){!function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),nt(e,t)}(t,e)})}(e):function(e,t){var r=e._controlledWritableStream;(function(e){e._inFlightWriteRequest=e._writeRequests.shift()})(r),p(e._writeAlgorithm(t),function(){!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);var t=r._state;if(ue(e),!ot(r)&&"writable"===t){var n=kt(e);lt(r,n)}At(e)},function(t){"writable"===r._state&&bt(e),function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,nt(e,t)}(r,t)})}(e,r)}}else it(t)}function St(e,t){"writable"===e._controlledWritableStream._state&&wt(e,t)}function kt(e){return _t(e)<=0}function wt(e,t){var r=e._controlledWritableStream;bt(e),at(r,t)}function xt(e){return new TypeError("WritableStream.prototype."+e+" can only be used on a WritableStream")}function Ct(e){return new TypeError("WritableStreamDefaultWriter.prototype."+e+" can only be used on a WritableStreamDefaultWriter")}function Pt(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function Tt(e){e._closedPromise=c(function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"})}function Rt(e,t){Tt(e),Et(e,t)}function Et(e,t){void 0!==e._closedPromise_reject&&(m(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function Ot(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function Ft(e){e._readyPromise=c(function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r}),e._readyPromiseState="pending"}function It(e,t){Ft(e),Lt(e,t)}function Mt(e){Ft(e),jt(e)}function Lt(e,t){void 0!==e._readyPromise_reject&&(m(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function jt(e){void 0!==e._readyPromise_resolve&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}Object.defineProperties(gt.prototype,{error:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(gt.prototype,t.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});var Dt,Nt="undefined"!=typeof DOMException?DOMException:void 0,qt=function(e){if("function"!=typeof e&&"object"!=typeof e)return!1;try{return new e,!0}catch(e){return!1}}(Nt)?Nt:((Dt=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}).prototype=Object.create(Error.prototype),Object.defineProperty(Dt.prototype,"constructor",{value:Dt,writable:!0,configurable:!0}),Dt);function Wt(e,t,n,a,i,o){var s=V(e),l=Je(t);e._disturbed=!0;var u=!1,g=f(void 0);return c(function(b,_){var A,S,k,w;if(void 0!==o){if(A=function(){var r=new qt("Aborted","AbortError"),n=[];a||n.push(function(){return"writable"===t._state?tt(t,r):f(void 0)}),i||n.push(function(){return"readable"===e._state?cr(e,r):f(void 0)}),R(function(){return Promise.all(n.map(function(e){return e()}))},!0,r)},o.aborted)return void A();o.addEventListener("abort",A)}if(T(e,s._closedPromise,function(e){a?E(!0,e):R(function(){return tt(t,e)},!0,e)}),T(t,l._closedPromise,function(t){i?E(!0,t):R(function(){return cr(e,t)},!0,t)}),S=e,k=s._closedPromise,w=function(){n?E():R(function(){return function(e){var t=e._ownerWritableStream,r=t._state;return ot(t)||"closed"===r?f(void 0):"errored"===r?d(t._storedError):ft(e)}(l)})},"closed"===S._state?w():v(k,w),ot(t)||"closed"===t._state){var C=new TypeError("the destination writable stream closed before all data could be piped to it");i?E(!0,C):R(function(){return cr(e,C)},!0,C)}function P(){var e=g;return h(g,function(){return e!==g?P():void 0})}function T(e,t,r){"errored"===e._state?r(e._storedError):y(t,r)}function R(e,r,n){function a(){p(e(),function(){return O(r,n)},function(e){return O(!0,e)})}u||(u=!0,"writable"!==t._state||ot(t)?a():v(P(),a))}function E(e,r){u||(u=!0,"writable"!==t._state||ot(t)?O(e,r):v(P(),function(){return O(e,r)}))}function O(e,t){pt(l),x(s),void 0!==o&&o.removeEventListener("abort",A),e?_(t):b(void 0)}m(c(function(e,t){!function n(a){a?e():h(u?f(!0):h(l._readyPromise,function(){return c(function(e,t){te(s,{_chunkSteps:function(t){g=h(vt(l,t),void 0,r),e(!1)},_closeSteps:function(){return e(!0)},_errorSteps:t})})}),n,t)}(!1)}))})}var Ut=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Bt(this))throw $t("desiredSize");return Qt(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!Bt(this))throw $t("close");if(!Kt(this))throw new TypeError("The stream is not in a state that permits close");Vt(this)},e.prototype.enqueue=function(e){if(void 0===e&&(e=void 0),!Bt(this))throw $t("enqueue");if(!Kt(this))throw new TypeError("The stream is not in a state that permits enqueue");return Yt(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Bt(this))throw $t("error");Xt(this,e)},e.prototype[I]=function(e){fe(this);var t=this._cancelAlgorithm(e);return Ht(this),t},e.prototype[M]=function(e){var t=this._controlledReadableStream;if(this._queue.length>0){var r=ue(this);this._closeRequested&&0===this._queue.length?(Ht(this),fr(t)):Gt(this),e._chunkSteps(r)}else Y(t,e),Gt(this)},e}();function Bt(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")}function Gt(e){zt(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,p(e._pullAlgorithm(),function(){e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Gt(e))},function(t){Xt(e,t)})))}function zt(e){var t=e._controlledReadableStream;return!!Kt(e)&&(!!e._started&&(!!(ur(t)&&Q(t)>0)||Qt(e)>0))}function Ht(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Vt(e){if(Kt(e)){var t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(Ht(e),fr(t))}}function Yt(e,t){if(Kt(e)){var r=e._controlledReadableStream;if(ur(r)&&Q(r)>0)X(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(t){throw Xt(e,t),t}try{ce(e,t,n)}catch(t){throw Xt(e,t),t}}Gt(e)}}function Xt(e,t){var r=e._controlledReadableStream;"readable"===r._state&&(fe(e),Ht(e),dr(r,t))}function Qt(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Kt(e){var t=e._controlledReadableStream._state;return!e._closeRequested&&"readable"===t}function Jt(e,t,r,n,a,i,o){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,fe(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=o,t._strategyHWM=i,t._pullAlgorithm=n,t._cancelAlgorithm=a,e._readableStreamController=t,p(f(r()),function(){t._started=!0,Gt(t)},function(e){Xt(t,e)})}function $t(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function Zt(e,t,r){return N(e,r),function(r){return A(e,t,[r])}}function er(e,t,r){return N(e,r),function(r){return A(e,t,[r])}}function tr(e,t,r){return N(e,r),function(r){return _(e,t,[r])}}function rr(e,t){if("bytes"!==(e=""+e))throw new TypeError(t+" '"+e+"' is not a valid enumeration value for ReadableStreamType");return e}function nr(e,t){if("byob"!==(e=""+e))throw new TypeError(t+" '"+e+"' is not a valid enumeration value for ReadableStreamReaderMode");return e}function ar(e,t){D(e,t);var r=null==e?void 0:e.preventAbort,n=null==e?void 0:e.preventCancel,a=null==e?void 0:e.preventClose,i=null==e?void 0:e.signal;return void 0!==i&&function(e,t){if(!function(e){if("object"!=typeof e||null===e)return!1;try{return"boolean"==typeof e.aborted}catch(e){return!1}}(e))throw new TypeError(t+" is not an AbortSignal.")}(i,t+" has member 'signal' that"),{preventAbort:Boolean(r),preventCancel:Boolean(n),preventClose:Boolean(a),signal:i}}Object.defineProperties(Ut.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(Ut.prototype,t.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});var ir=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),void 0===e?e=null:q(e,"First parameter");var r=Ge(t,"Second parameter"),n=function(e,t){D(e,t);var r=e,n=null==r?void 0:r.autoAllocateChunkSize,a=null==r?void 0:r.cancel,i=null==r?void 0:r.pull,o=null==r?void 0:r.start,s=null==r?void 0:r.type;return{autoAllocateChunkSize:void 0===n?void 0:z(n,t+" has member 'autoAllocateChunkSize' that"),cancel:void 0===a?void 0:Zt(a,r,t+" has member 'cancel' that"),pull:void 0===i?void 0:er(i,r,t+" has member 'pull' that"),start:void 0===o?void 0:tr(o,r,t+" has member 'start' that"),type:void 0===s?void 0:rr(s,t+" has member 'type' that")}}(e,"First parameter");if(sr(this),"bytes"===n.type){if(void 0!==r.size)throw new RangeError("The strategy for a byte stream cannot have a size function");Fe(this,n,Ue(r,0))}else{var a=Be(r);!function(e,t,r,n){var a=Object.create(Ut.prototype),i=function(){},o=function(){return f(void 0)},s=function(){return f(void 0)};void 0!==t.start&&(i=function(){return t.start(a)}),void 0!==t.pull&&(o=function(){return t.pull(a)}),void 0!==t.cancel&&(s=function(e){return t.cancel(e)}),Jt(e,a,i,o,s,r,n)}(this,n,Ue(r,1),a)}}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!lr(this))throw hr("locked");return ur(this)},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),lr(this)?ur(this)?d(new TypeError("Cannot cancel a stream that already has a reader")):cr(this,e):d(hr("cancel"))},e.prototype.getReader=function(e){if(void 0===e&&(e=void 0),!lr(this))throw hr("getReader");return void 0===function(e,t){D(e,t);var r=null==e?void 0:e.mode;return{mode:void 0===r?void 0:nr(r,t+" has member 'mode' that")}}(e,"First parameter").mode?V(this):new Ne(this)},e.prototype.pipeThrough=function(e,t){if(void 0===t&&(t={}),!lr(this))throw hr("pipeThrough");W(e,1,"pipeThrough");var r=function(e,t){D(e,t);var r=null==e?void 0:e.readable;U(r,"readable","ReadableWritablePair"),H(r,t+" has member 'readable' that");var n=null==e?void 0:e.writable;return U(n,"writable","ReadableWritablePair"),Qe(n,t+" has member 'writable' that"),{readable:r,writable:n}}(e,"First parameter"),n=ar(t,"Second parameter");if(ur(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(et(r.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return m(Wt(this,r.writable,n.preventClose,n.preventAbort,n.preventCancel,n.signal)),r.readable},e.prototype.pipeTo=function(e,t){if(void 0===t&&(t={}),!lr(this))return d(hr("pipeTo"));if(void 0===e)return d("Parameter 1 is required in 'pipeTo'.");if(!Ze(e))return d(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var r;try{r=ar(t,"Second parameter")}catch(e){return d(e)}return ur(this)?d(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):et(e)?d(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Wt(this,e,r.preventClose,r.preventAbort,r.preventCancel,r.signal)},e.prototype.tee=function(){if(!lr(this))throw hr("tee");var e=function(e,t){var r,n,a,i,o,s=V(e),l=!1,u=!1,d=!1,h=c(function(e){o=e});function p(){return l?f(void 0):(l=!0,te(s,{_chunkSteps:function(e){b(function(){l=!1;var t=e,r=e;u||Yt(a._readableStreamController,t),d||Yt(i._readableStreamController,r)})},_closeSteps:function(){l=!1,u||Vt(a._readableStreamController),d||Vt(i._readableStreamController),u&&d||o(void 0)},_errorSteps:function(){l=!1}}),f(void 0))}function v(){}return a=or(v,p,function(t){if(u=!0,r=t,d){var a=de([r,n]),i=cr(e,a);o(i)}return h}),i=or(v,p,function(t){if(d=!0,n=t,u){var a=de([r,n]),i=cr(e,a);o(i)}return h}),y(s._closedPromise,function(e){Xt(a._readableStreamController,e),Xt(i._readableStreamController,e),u&&d||o(void 0)}),[a,i]}(this);return de(e)},e.prototype.values=function(e){if(void 0===e&&(e=void 0),!lr(this))throw hr("values");var t,r,n,a,i,o=function(e,t){D(e,t);var r=null==e?void 0:e.preventCancel;return{preventCancel:Boolean(r)}}(e,"First parameter");return t=this,r=o.preventCancel,n=V(t),a=new ne(n,r),(i=Object.create(ae))._asyncIteratorImpl=a,i},e}();function or(e,t,r,n,a){void 0===n&&(n=1),void 0===a&&(a=function(){return 1});var i=Object.create(ir.prototype);return sr(i),Jt(i,Object.create(Ut.prototype),e,t,r,n,a),i}function sr(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function lr(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function ur(e){return void 0!==e._reader}function cr(e,t){return e._disturbed=!0,"closed"===e._state?f(void 0):"errored"===e._state?d(e._storedError):(fr(e),g(e._readableStreamController[I](t),r))}function fr(e){e._state="closed";var t=e._reader;void 0!==t&&(E(t),ee(t)&&(t._readRequests.forEach(function(e){e._closeSteps()}),t._readRequests=new S))}function dr(e,t){e._state="errored",e._storedError=t;var r=e._reader;void 0!==r&&(R(r,t),ee(r)?(r._readRequests.forEach(function(e){e._errorSteps(t)}),r._readRequests=new S):(r._readIntoRequests.forEach(function(e){e._errorSteps(t)}),r._readIntoRequests=new S))}function hr(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}function pr(e,t){D(e,t);var r=null==e?void 0:e.highWaterMark;return U(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:B(r)}}Object.defineProperties(ir.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(ir.prototype,t.toStringTag,{value:"ReadableStream",configurable:!0}),"symbol"==typeof t.asyncIterator&&Object.defineProperty(ir.prototype,t.asyncIterator,{value:ir.prototype.values,writable:!0,configurable:!0});var vr=function(e){return e.byteLength},yr=function(){function e(e){W(e,1,"ByteLengthQueuingStrategy"),e=pr(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!mr(this))throw gr("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!mr(this))throw gr("size");return vr},enumerable:!1,configurable:!0}),e}();function gr(e){return new TypeError("ByteLengthQueuingStrategy.prototype."+e+" can only be used on a ByteLengthQueuingStrategy")}function mr(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")}Object.defineProperties(yr.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(yr.prototype,t.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});var br=function(){return 1},_r=function(){function e(e){W(e,1,"CountQueuingStrategy"),e=pr(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!Sr(this))throw Ar("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!Sr(this))throw Ar("size");return br},enumerable:!1,configurable:!0}),e}();function Ar(e){return new TypeError("CountQueuingStrategy.prototype."+e+" can only be used on a CountQueuingStrategy")}function Sr(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")}function kr(e,t,r){return N(e,r),function(r){return A(e,t,[r])}}function wr(e,t,r){return N(e,r),function(r){return _(e,t,[r])}}function xr(e,t,r){return N(e,r),function(r,n){return A(e,t,[r,n])}}Object.defineProperties(_r.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(_r.prototype,t.toStringTag,{value:"CountQueuingStrategy",configurable:!0});var Cr=function(){function e(e,t,r){void 0===e&&(e={}),void 0===t&&(t={}),void 0===r&&(r={}),void 0===e&&(e=null);var n=Ge(t,"Second parameter"),a=Ge(r,"Third parameter"),i=function(e,t){D(e,t);var r=null==e?void 0:e.flush,n=null==e?void 0:e.readableType,a=null==e?void 0:e.start,i=null==e?void 0:e.transform,o=null==e?void 0:e.writableType;return{flush:void 0===r?void 0:kr(r,e,t+" has member 'flush' that"),readableType:n,start:void 0===a?void 0:wr(a,e,t+" has member 'start' that"),transform:void 0===i?void 0:xr(i,e,t+" has member 'transform' that"),writableType:o}}(e,"First parameter");if(void 0!==i.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==i.writableType)throw new RangeError("Invalid writableType specified");var o,s=Ue(a,0),l=Be(a),u=Ue(n,1),h=Be(n);!function(e,t,r,n,a,i){function o(){return t}e._writable=function(e,t,r,n,a,i){void 0===a&&(a=1),void 0===i&&(i=function(){return 1});var o=Object.create(Ke.prototype);return $e(o),mt(o,Object.create(gt.prototype),e,t,r,n,a,i),o}(o,function(t){return function(e,t){var r=e._transformStreamController;if(e._backpressure){var n=e._backpressureChangePromise;return g(n,function(){var n=e._writable,a=n._state;if("erroring"===a)throw n._storedError;return Lr(r,t)})}return Lr(r,t)}(e,t)},function(){return function(e){var t=e._readable,r=e._transformStreamController,n=r._flushAlgorithm();return Ir(r),g(n,function(){if("errored"===t._state)throw t._storedError;Vt(t._readableStreamController)},function(r){throw Tr(e,r),t._storedError})}(e)},function(t){return function(e,t){return Tr(e,t),f(void 0)}(e,t)},r,n),e._readable=or(o,function(){return function(e){return Er(e,!1),e._backpressureChangePromise}(e)},function(t){return Rr(e,t),f(void 0)},a,i),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Er(e,!0),e._transformStreamController=void 0}(this,c(function(e){o=e}),u,h,s,l),function(e,t){var r=Object.create(Or.prototype),n=function(e){try{return Mr(r,e),f(void 0)}catch(e){return d(e)}},a=function(){return f(void 0)};void 0!==t.transform&&(n=function(e){return t.transform(e,r)});void 0!==t.flush&&(a=function(){return t.flush(r)});!function(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}(e,r,n,a)}(this,i),void 0!==i.start?o(i.start(this._transformStreamController)):o(void 0)}return Object.defineProperty(e.prototype,"readable",{get:function(){if(!Pr(this))throw Dr("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"writable",{get:function(){if(!Pr(this))throw Dr("writable");return this._writable},enumerable:!1,configurable:!0}),e}();function Pr(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function Tr(e,t){Xt(e._readable._readableStreamController,t),Rr(e,t)}function Rr(e,t){Ir(e._transformStreamController),St(e._writable._writableStreamController,t),e._backpressure&&Er(e,!1)}function Er(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=c(function(t){e._backpressureChangePromise_resolve=t}),e._backpressure=t}Object.defineProperties(Cr.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(Cr.prototype,t.toStringTag,{value:"TransformStream",configurable:!0});var Or=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Fr(this))throw jr("desiredSize");return Qt(this._controlledTransformStream._readable._readableStreamController)},enumerable:!1,configurable:!0}),e.prototype.enqueue=function(e){if(void 0===e&&(e=void 0),!Fr(this))throw jr("enqueue");Mr(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Fr(this))throw jr("error");var t;t=e,Tr(this._controlledTransformStream,t)},e.prototype.terminate=function(){if(!Fr(this))throw jr("terminate");!function(e){var t=e._controlledTransformStream;Vt(t._readable._readableStreamController);var r=new TypeError("TransformStream terminated");Rr(t,r)}(this)},e}();function Fr(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function Ir(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function Mr(e,t){var r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!Kt(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{Yt(n,t)}catch(e){throw Rr(r,e),r._readable._storedError}(function(e){return!zt(e)})(n)!==r._backpressure&&Er(r,!0)}function Lr(e,t){return g(e._transformAlgorithm(t),void 0,function(t){throw Tr(e._controlledTransformStream,t),t})}function jr(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function Dr(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}Object.defineProperties(Or.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(Or.prototype,t.toStringTag,{value:"TransformStreamDefaultController",configurable:!0}),e.ByteLengthQueuingStrategy=yr,e.CountQueuingStrategy=_r,e.ReadableByteStreamController=ve,e.ReadableStream=ir,e.ReadableStreamBYOBReader=Ne,e.ReadableStreamBYOBRequest=pe,e.ReadableStreamDefaultController=Ut,e.ReadableStreamDefaultReader=Z,e.TransformStream=Cr,e.TransformStreamDefaultController=Or,e.WritableStream=Ke,e.WritableStreamDefaultController=gt,e.WritableStreamDefaultWriter=ut,Object.defineProperty(e,"__esModule",{value:!0})})(t)},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getDocument=getDocument,exports.setPDFNetworkStreamFactory=setPDFNetworkStreamFactory,exports.version=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultCMapReaderFactory=exports.DefaultCanvasFactory=exports.build=void 0;var _regenerator=_interopRequireDefault(__w_pdfjs_require__(2)),_util=__w_pdfjs_require__(4),_display_utils=__w_pdfjs_require__(1),_font_loader=__w_pdfjs_require__(114),_node_utils=__w_pdfjs_require__(115),_annotation_storage=__w_pdfjs_require__(116),_api_compatibility=__w_pdfjs_require__(117),_canvas=__w_pdfjs_require__(118),_worker_options=__w_pdfjs_require__(120),_is_node=__w_pdfjs_require__(6),_message_handler=__w_pdfjs_require__(121),_metadata=__w_pdfjs_require__(122),_optional_content_config=__w_pdfjs_require__(123),_transport_stream=__w_pdfjs_require__(124);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function asyncGeneratorStep(e,t,r,n,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(e){asyncGeneratorStep(i,n,a,o,s,"next",e)}function s(e){asyncGeneratorStep(i,n,a,o,s,"throw",e)}o(void 0)})}}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _createForOfIteratorHelper(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=r){var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DefaultCanvasFactory=_is_node.isNodeJS?_node_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;var DefaultCMapReaderFactory=_is_node.isNodeJS?_node_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory,createPDFNetworkStream;function setPDFNetworkStreamFactory(e){createPDFNetworkStream=e}function getDocument(e){var t,r=new PDFDocumentLoadingTask;if("string"==typeof e||e instanceof URL)t={url:e};else if((0,_util.isArrayBuffer)(e))t={data:e};else if(e instanceof PDFDataRangeTransport)t={range:e};else{if("object"!==_typeof(e))throw new Error("Invalid parameter in getDocument, need either string, URL, Uint8Array, or parameter object.");if(!e.url&&!e.data&&!e.range)throw new Error("Invalid parameter object: need either .data, .range or .url");t=e}var n=Object.create(null),a=null,i=null;for(var o in t){var s=t[o];switch(o){case"url":if("undefined"!=typeof window)try{n[o]=new URL(s,window.location).href;continue}catch(e){(0,_util.warn)('Cannot create valid URL: "'.concat(e,'".'))}else if("string"==typeof s||s instanceof URL){n[o]=s.toString();continue}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.");case"range":a=s;continue;case"worker":i=s;continue;case"data":if(_is_node.isNodeJS&&"undefined"!=typeof Buffer&&s instanceof Buffer)n[o]=new Uint8Array(s);else{if(s instanceof Uint8Array)break;if("string"==typeof s)n[o]=(0,_util.stringToBytes)(s);else if("object"!==_typeof(s)||null===s||isNaN(s.length)){if(!(0,_util.isArrayBuffer)(s))throw new Error("Invalid PDF binary data: either typed array, string, or array-like object is expected in the data property.");n[o]=new Uint8Array(s)}else n[o]=new Uint8Array(s)}continue}n[o]=s}if(n.rangeChunkSize=n.rangeChunkSize||DEFAULT_RANGE_CHUNK_SIZE,n.CMapReaderFactory=n.CMapReaderFactory||DefaultCMapReaderFactory,n.ignoreErrors=!0!==n.stopAtErrors,n.fontExtraProperties=!0===n.fontExtraProperties,n.pdfBug=!0===n.pdfBug,n.enableXfa=!0===n.enableXfa,("string"!=typeof n.docBaseUrl||(0,_display_utils.isDataScheme)(n.docBaseUrl))&&(n.docBaseUrl=null),Number.isInteger(n.maxImageSize)||(n.maxImageSize=-1),"boolean"!=typeof n.isEvalSupported&&(n.isEvalSupported=!0),"boolean"!=typeof n.disableFontFace&&(n.disableFontFace=_api_compatibility.apiCompatibilityParams.disableFontFace||!1),void 0===n.ownerDocument&&(n.ownerDocument=globalThis.document),"boolean"!=typeof n.disableRange&&(n.disableRange=!1),"boolean"!=typeof n.disableStream&&(n.disableStream=!1),"boolean"!=typeof n.disableAutoFetch&&(n.disableAutoFetch=!1),(0,_util.setVerbosityLevel)(n.verbosity),!i){var l={verbosity:n.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};i=l.port?PDFWorker.fromPort(l):new PDFWorker(l),r._worker=i}var u=r.docId;return i.promise.then(function(){if(r.destroyed)throw new Error("Loading aborted");var e=_fetchDocument(i,n,a,u),t=new Promise(function(e){var t;a?t=new _transport_stream.PDFDataTransportStream({length:n.length,initialData:n.initialData,progressiveDone:n.progressiveDone,contentDispositionFilename:n.contentDispositionFilename,disableRange:n.disableRange,disableStream:n.disableStream},a):n.data||(t=createPDFNetworkStream({url:n.url,length:n.length,httpHeaders:n.httpHeaders,withCredentials:n.withCredentials,rangeChunkSize:n.rangeChunkSize,disableRange:n.disableRange,disableStream:n.disableStream})),e(t)});return Promise.all([e,t]).then(function(e){var t=_slicedToArray(e,2),a=t[0],o=t[1];if(r.destroyed)throw new Error("Loading aborted");var s=new _message_handler.MessageHandler(u,a,i.port);s.postMessageTransfers=i.postMessageTransfers;var l=new WorkerTransport(s,r,o,n);r._transport=l,s.send("Ready",null)})}).catch(r._capability.reject),r}function _fetchDocument(e,t,r,n){return e.destroyed?Promise.reject(new Error("Worker was destroyed")):(r&&(t.length=r.length,t.initialData=r.initialData,t.progressiveDone=r.progressiveDone,t.contentDispositionFilename=r.contentDispositionFilename),e.messageHandler.sendWithPromise("GetDocRequest",{docId:n,apiVersion:"2.9.359",source:{data:t.data,url:t.url,password:t.password,disableAutoFetch:t.disableAutoFetch,rangeChunkSize:t.rangeChunkSize,length:t.length},maxImageSize:t.maxImageSize,disableFontFace:t.disableFontFace,postMessageTransfers:e.postMessageTransfers,docBaseUrl:t.docBaseUrl,ignoreErrors:t.ignoreErrors,isEvalSupported:t.isEvalSupported,fontExtraProperties:t.fontExtraProperties,enableXfa:t.enableXfa}).then(function(t){if(e.destroyed)throw new Error("Worker was destroyed");return t}))}exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;var PDFDocumentLoadingTask=function(){var e=0;return function(){function t(){_classCallCheck(this,t),this._capability=(0,_util.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d"+e++,this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}return _createClass(t,[{key:"promise",get:function(){return this._capability.promise}},{key:"destroy",value:function(){var e=this;return this.destroyed=!0,(this._transport?this._transport.destroy():Promise.resolve()).then(function(){e._transport=null,e._worker&&(e._worker.destroy(),e._worker=null)})}}]),t}()}(),PDFDataRangeTransport=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;_classCallCheck(this,e),this.length=t,this.initialData=r,this.progressiveDone=n,this.contentDispositionFilename=a,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}return _createClass(e,[{key:"addRangeListener",value:function(e){this._rangeListeners.push(e)}},{key:"addProgressListener",value:function(e){this._progressListeners.push(e)}},{key:"addProgressiveReadListener",value:function(e){this._progressiveReadListeners.push(e)}},{key:"addProgressiveDoneListener",value:function(e){this._progressiveDoneListeners.push(e)}},{key:"onDataRange",value:function(e,t){var r,n=_createForOfIteratorHelper(this._rangeListeners);try{for(n.s();!(r=n.n()).done;){(0,r.value)(e,t)}}catch(e){n.e(e)}finally{n.f()}}},{key:"onDataProgress",value:function(e,t){var r=this;this._readyCapability.promise.then(function(){var n,a=_createForOfIteratorHelper(r._progressListeners);try{for(a.s();!(n=a.n()).done;){(0,n.value)(e,t)}}catch(e){a.e(e)}finally{a.f()}})}},{key:"onDataProgressiveRead",value:function(e){var t=this;this._readyCapability.promise.then(function(){var r,n=_createForOfIteratorHelper(t._progressiveReadListeners);try{for(n.s();!(r=n.n()).done;){(0,r.value)(e)}}catch(e){n.e(e)}finally{n.f()}})}},{key:"onDataProgressiveDone",value:function(){var e=this;this._readyCapability.promise.then(function(){var t,r=_createForOfIteratorHelper(e._progressiveDoneListeners);try{for(r.s();!(t=r.n()).done;){(0,t.value)()}}catch(e){r.e(e)}finally{r.f()}})}},{key:"transportReady",value:function(){this._readyCapability.resolve()}},{key:"requestDataRange",value:function(e,t){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}},{key:"abort",value:function(){}}]),e}();exports.PDFDataRangeTransport=PDFDataRangeTransport;var PDFDocumentProxy=function(){function e(t,r){_classCallCheck(this,e),this._pdfInfo=t,this._transport=r}return _createClass(e,[{key:"annotationStorage",get:function(){return this._transport.annotationStorage}},{key:"numPages",get:function(){return this._pdfInfo.numPages}},{key:"fingerprint",get:function(){return this._pdfInfo.fingerprint}},{key:"isPureXfa",get:function(){return this._pdfInfo.isPureXfa}},{key:"getPage",value:function(e){return this._transport.getPage(e)}},{key:"getPageIndex",value:function(e){return this._transport.getPageIndex(e)}},{key:"getDestinations",value:function(){return this._transport.getDestinations()}},{key:"getDestination",value:function(e){return this._transport.getDestination(e)}},{key:"getPageLabels",value:function(){return this._transport.getPageLabels()}},{key:"getPageLayout",value:function(){return this._transport.getPageLayout()}},{key:"getPageMode",value:function(){return this._transport.getPageMode()}},{key:"getViewerPreferences",value:function(){return this._transport.getViewerPreferences()}},{key:"getOpenAction",value:function(){return this._transport.getOpenAction()}},{key:"getAttachments",value:function(){return this._transport.getAttachments()}},{key:"getJavaScript",value:function(){return this._transport.getJavaScript()}},{key:"getJSActions",value:function(){return this._transport.getDocJSActions()}},{key:"getOutline",value:function(){return this._transport.getOutline()}},{key:"getOptionalContentConfig",value:function(){return this._transport.getOptionalContentConfig()}},{key:"getPermissions",value:function(){return this._transport.getPermissions()}},{key:"getMetadata",value:function(){return this._transport.getMetadata()}},{key:"getMarkInfo",value:function(){return this._transport.getMarkInfo()}},{key:"getData",value:function(){return this._transport.getData()}},{key:"getDownloadInfo",value:function(){return this._transport.downloadInfoCapability.promise}},{key:"getStats",value:function(){return this._transport.getStats()}},{key:"cleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._transport.startCleanup(e||this.isPureXfa)}},{key:"destroy",value:function(){return this.loadingTask.destroy()}},{key:"loadingParams",get:function(){return this._transport.loadingParams}},{key:"loadingTask",get:function(){return this._transport.loadingTask}},{key:"saveDocument",value:function(){return arguments.length>0&&(0,_display_utils.deprecated)("saveDocument no longer accepts any options."),this._transport.annotationStorage.size<=0&&(0,_display_utils.deprecated)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead."),this._transport.saveDocument()}},{key:"getFieldObjects",value:function(){return this._transport.getFieldObjects()}},{key:"hasJSActions",value:function(){return this._transport.hasJSActions()}},{key:"getCalculationOrderIds",value:function(){return this._transport.getCalculationOrderIds()}}]),e}();exports.PDFDocumentProxy=PDFDocumentProxy;var PDFPageProxy=function(){function e(t,r,n,a){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];_classCallCheck(this,e),this._pageIndex=t,this._pageInfo=r,this._ownerDocument=a,this._transport=n,this._stats=i?new _display_utils.StatTimer:null,this._pdfBug=i,this.commonObjs=n.commonObjs,this.objs=new PDFObjects,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this._intentStates=new Map,this.destroyed=!1}return _createClass(e,[{key:"pageNumber",get:function(){return this._pageIndex+1}},{key:"rotate",get:function(){return this._pageInfo.rotate}},{key:"ref",get:function(){return this._pageInfo.ref}},{key:"userUnit",get:function(){return this._pageInfo.userUnit}},{key:"view",get:function(){return this._pageInfo.view}},{key:"getViewport",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.scale,r=e.rotation,n=void 0===r?this.rotate:r,a=e.offsetX,i=void 0===a?0:a,o=e.offsetY,s=void 0===o?0:o,l=e.dontFlip,u=void 0!==l&&l;return new _display_utils.PageViewport({viewBox:this.view,scale:t,rotation:n,offsetX:i,offsetY:s,dontFlip:u})}},{key:"getAnnotations",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).intent,t=void 0===e?null:e;return this._annotationsPromise&&this._annotationsIntent===t||(this._annotationsPromise=this._transport.getAnnotations(this._pageIndex,t),this._annotationsIntent=t),this._annotationsPromise}},{key:"getJSActions",value:function(){return this._jsActionsPromise||(this._jsActionsPromise=this._transport.getPageJSActions(this._pageIndex))}},{key:"getXfa",value:function(){return this._xfaPromise||(this._xfaPromise=this._transport.getPageXfa(this._pageIndex))}},{key:"render",value:function(e){var t,r,n=this,a=e.canvasContext,i=e.viewport,o=e.intent,s=void 0===o?"display":o,l=e.renderInteractiveForms,u=void 0!==l&&l,c=e.transform,f=void 0===c?null:c,d=e.imageLayer,h=void 0===d?null:d,p=e.canvasFactory,v=void 0===p?null:p,y=e.background,g=void 0===y?null:y,m=e.includeAnnotationStorage,b=void 0!==m&&m,_=e.optionalContentConfigPromise,A=void 0===_?null:_;void 0!==(null===(t=arguments[0])||void 0===t?void 0:t.annotationStorage)&&((0,_display_utils.deprecated)("render no longer accepts an `annotationStorage` option, please use the `includeAnnotationStorage`-boolean instead."),b||(b=!!arguments[0].annotationStorage)),this._stats&&this._stats.time("Overall");var S="print"===s?"print":"display";this.pendingCleanup=!1,A||(A=this._transport.getOptionalContentConfig());var k=this._intentStates.get(S);k||(k=Object.create(null),this._intentStates.set(S,k)),k.streamReaderCancelTimeout&&(clearTimeout(k.streamReaderCancelTimeout),k.streamReaderCancelTimeout=null);var w=v||new DefaultCanvasFactory({ownerDocument:this._ownerDocument}),x=b?this._transport.annotationStorage.serializable:null;k.displayReadyCapability||(k.displayReadyCapability=(0,_util.createPromiseCapability)(),k.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:S,renderInteractiveForms:!0===u,annotationStorage:x}));var C=function(e){k.renderTasks.delete(P),(n.cleanupAfterRender||"print"===S)&&(n.pendingCleanup=!0),n._tryCleanup(),e?(P.capability.reject(e),n._abortOperatorList({intentState:k,reason:e})):P.capability.resolve(),n._stats&&(n._stats.timeEnd("Rendering"),n._stats.timeEnd("Overall"))},P=new InternalRenderTask({callback:C,params:{canvasContext:a,viewport:i,transform:f,imageLayer:h,background:g},objs:this.objs,commonObjs:this.commonObjs,operatorList:k.operatorList,pageIndex:this._pageIndex,canvasFactory:w,useRequestAnimationFrame:"print"!==S,pdfBug:this._pdfBug});((r=k).renderTasks||(r.renderTasks=new Set)).add(P);var T=P.task;return Promise.all([k.displayReadyCapability.promise,A]).then(function(e){var t=_slicedToArray(e,2),r=t[0],a=t[1];n.pendingCleanup?C():(n._stats&&n._stats.time("Rendering"),P.initializeGraphics({transparency:r,optionalContentConfig:a}),P.operatorListChanged())}).catch(C),T}},{key:"getOperatorList",value:function(){var e,t,r=this._intentStates.get("oplist");(r||(r=Object.create(null),this._intentStates.set("oplist",r)),r.opListReadCapability)||((e=Object.create(null)).operatorListChanged=function(){r.operatorList.lastChunk&&(r.opListReadCapability.resolve(r.operatorList),r.renderTasks.delete(e))},r.opListReadCapability=(0,_util.createPromiseCapability)(),((t=r).renderTasks||(t.renderTasks=new Set)).add(e),r.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:"oplist"}));return r.opListReadCapability.promise}},{key:"streamTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.normalizeWhitespace,r=void 0!==t&&t,n=e.disableCombineTextItems,a=void 0!==n&&n,i=e.includeMarkedContent,o=void 0!==i&&i;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,normalizeWhitespace:!0===r,combineTextItems:!0!==a,includeMarkedContent:!0===o},{highWaterMark:100,size:function(e){return e.items.length}})}},{key:"getTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.streamTextContent(e);return new Promise(function(e,r){var n=t.getReader(),a={items:[],styles:Object.create(null)};!function t(){n.read().then(function(r){var n,i=r.value;r.done?e(a):(Object.assign(a.styles,i.styles),(n=a.items).push.apply(n,_toConsumableArray(i.items)),t())},r)}()})}},{key:"getStructTree",value:function(){return this._structTreePromise||(this._structTreePromise=this._transport.getStructTree(this._pageIndex))}},{key:"_destroy",value:function(){this.destroyed=!0,this._transport.pageCache[this._pageIndex]=null;var e,t=[],r=_createForOfIteratorHelper(this._intentStates);try{for(r.s();!(e=r.n()).done;){var n=_slicedToArray(e.value,2),a=n[0],i=n[1];if(this._abortOperatorList({intentState:i,reason:new Error("Page was destroyed."),force:!0}),"oplist"!==a){var o,s=_createForOfIteratorHelper(i.renderTasks);try{for(s.s();!(o=s.n()).done;){var l=o.value;t.push(l.completed),l.cancel()}}catch(e){s.e(e)}finally{s.f()}}}}catch(e){r.e(e)}finally{r.f()}return this.objs.clear(),this._annotationsPromise=null,this._jsActionsPromise=null,this._xfaPromise=null,this._structTreePromise=null,this.pendingCleanup=!1,Promise.all(t)}},{key:"cleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.pendingCleanup=!0,this._tryCleanup(e)}},{key:"_tryCleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.pendingCleanup)return!1;var t,r=_createForOfIteratorHelper(this._intentStates.values());try{for(r.s();!(t=r.n()).done;){var n=t.value,a=n.renderTasks,i=n.operatorList;if(a.size>0||!i.lastChunk)return!1}}catch(e){r.e(e)}finally{r.f()}return this._intentStates.clear(),this.objs.clear(),this._annotationsPromise=null,this._jsActionsPromise=null,this._xfaPromise=null,this._structTreePromise=null,e&&this._stats&&(this._stats=new _display_utils.StatTimer),this.pendingCleanup=!1,!0}},{key:"_startRenderPage",value:function(e,t){var r=this._intentStates.get(t);r&&(this._stats&&this._stats.timeEnd("Page Request"),r.displayReadyCapability&&r.displayReadyCapability.resolve(e))}},{key:"_renderPageChunk",value:function(e,t){for(var r=0,n=e.length;r<n;r++)t.operatorList.fnArray.push(e.fnArray[r]),t.operatorList.argsArray.push(e.argsArray[r]);t.operatorList.lastChunk=e.lastChunk;var a,i=_createForOfIteratorHelper(t.renderTasks);try{for(i.s();!(a=i.n()).done;){a.value.operatorListChanged()}}catch(e){i.e(e)}finally{i.f()}e.lastChunk&&this._tryCleanup()}},{key:"_pumpOperatorList",value:function(e){var t=this;(0,_util.assert)(e.intent,'PDFPageProxy._pumpOperatorList: Expected "intent" argument.');var r=this._transport.messageHandler.sendWithStream("GetOperatorList",e).getReader(),n=this._intentStates.get(e.intent);n.streamReader=r;!function e(){r.read().then(function(r){var a=r.value;r.done?n.streamReader=null:t._transport.destroyed||(t._renderPageChunk(a,n),e())},function(e){if(n.streamReader=null,!t._transport.destroyed){if(n.operatorList){n.operatorList.lastChunk=!0;var r,a=_createForOfIteratorHelper(n.renderTasks);try{for(a.s();!(r=a.n()).done;)r.value.operatorListChanged()}catch(e){a.e(e)}finally{a.f()}t._tryCleanup()}if(n.displayReadyCapability)n.displayReadyCapability.reject(e);else{if(!n.opListReadCapability)throw e;n.opListReadCapability.reject(e)}}})}()}},{key:"_abortOperatorList",value:function(e){var t=this,r=e.intentState,n=e.reason,a=e.force,i=void 0!==a&&a;if((0,_util.assert)(n instanceof Error||"object"===_typeof(n)&&null!==n,'PDFPageProxy._abortOperatorList: Expected "reason" argument.'),r.streamReader){if(!i){if(r.renderTasks.size>0)return;if(n instanceof _display_utils.RenderingCancelledException)return void(r.streamReaderCancelTimeout=setTimeout(function(){t._abortOperatorList({intentState:r,reason:n,force:!0}),r.streamReaderCancelTimeout=null},RENDERING_CANCELLED_TIMEOUT))}if(r.streamReader.cancel(new _util.AbortException(null==n?void 0:n.message)),r.streamReader=null,!this._transport.destroyed){var o,s=_createForOfIteratorHelper(this._intentStates);try{for(s.s();!(o=s.n()).done;){var l=_slicedToArray(o.value,2),u=l[0];if(l[1]===r){this._intentStates.delete(u);break}}}catch(e){s.e(e)}finally{s.f()}this.cleanup()}}}},{key:"stats",get:function(){return this._stats}}]),e}();exports.PDFPageProxy=PDFPageProxy;var LoopbackPort=function(){function e(){_classCallCheck(this,e),this._listeners=[],this._deferred=Promise.resolve(void 0)}return _createClass(e,[{key:"postMessage",value:function(e,t){var r=this;var n=new WeakMap,a={data:function e(r){if("object"!==_typeof(r)||null===r)return r;if(n.has(r))return n.get(r);var a,i;if((a=r.buffer)&&(0,_util.isArrayBuffer)(a))return i=null!=t&&t.includes(a)?new r.constructor(a,r.byteOffset,r.byteLength):new r.constructor(r),n.set(r,i),i;if(r instanceof Map){i=new Map,n.set(r,i);var o,s=_createForOfIteratorHelper(r);try{for(s.s();!(o=s.n()).done;){var l=_slicedToArray(o.value,2),u=l[0],c=l[1];i.set(u,e(c))}}catch(e){s.e(e)}finally{s.f()}return i}if(r instanceof Set){i=new Set,n.set(r,i);var f,d=_createForOfIteratorHelper(r);try{for(d.s();!(f=d.n()).done;){var h=f.value;i.add(e(h))}}catch(e){d.e(e)}finally{d.f()}return i}if(r instanceof URL)throw new Error("LoopbackPort.postMessage - cannot clone: ".concat(r));for(var p in i=Array.isArray(r)?[]:Object.create(null),n.set(r,i),r){for(var v,y=void 0,g=r;!(y=Object.getOwnPropertyDescriptor(g,p));)g=Object.getPrototypeOf(g);if(void 0!==y.value)if("function"!=typeof y.value)i[p]=e(y.value);else if(null!==(v=r.hasOwnProperty)&&void 0!==v&&v.call(r,p))throw new Error("LoopbackPort.postMessage - cannot clone: ".concat(r[p]))}return i}(e)};this._deferred.then(function(){var e,t=_createForOfIteratorHelper(r._listeners);try{for(t.s();!(e=t.n()).done;){e.value.call(r,a)}}catch(e){t.e(e)}finally{t.f()}})}},{key:"addEventListener",value:function(e,t){this._listeners.push(t)}},{key:"removeEventListener",value:function(e,t){var r=this._listeners.indexOf(t);this._listeners.splice(r,1)}},{key:"terminate",value:function(){this._listeners.length=0}}]),e}();exports.LoopbackPort=LoopbackPort;var PDFWorker=function PDFWorkerClosure(){var pdfWorkerPorts=new WeakMap,isWorkerDisabled=!1,fallbackWorkerSrc,nextFakeWorkerId=0,fakeWorkerCapability;if(_is_node.isNodeJS&&"function"==typeof require)isWorkerDisabled=!0,fallbackWorkerSrc="./pdf.worker.js";else if("object"===("undefined"==typeof document?"undefined":_typeof(document))&&"currentScript"in document){var _document$currentScri,pdfjsFilePath=null===(_document$currentScri=document.currentScript)||void 0===_document$currentScri?void 0:_document$currentScri.src;pdfjsFilePath&&(fallbackWorkerSrc=pdfjsFilePath.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}function _getWorkerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(void 0!==fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}function getMainThreadWorkerMessageHandler(){var e;try{var t;e=null===(t=globalThis.pdfjsWorker)||void 0===t?void 0:t.WorkerMessageHandler}catch(e){}return e||null}function setupFakeWorkerGlobal(){if(fakeWorkerCapability)return fakeWorkerCapability.promise;fakeWorkerCapability=(0,_util.createPromiseCapability)();var loader=function(){var _ref12=_asyncToGenerator(_regenerator.default.mark(function _callee(){var mainWorkerMessageHandler,worker;return _regenerator.default.wrap(function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if(mainWorkerMessageHandler=getMainThreadWorkerMessageHandler(),!mainWorkerMessageHandler){_context.next=3;break}return _context.abrupt("return",mainWorkerMessageHandler);case 3:if(!_is_node.isNodeJS||"function"!=typeof require){_context.next=6;break}return worker=eval("require")(_getWorkerSrc()),_context.abrupt("return",worker.WorkerMessageHandler);case 6:return _context.next=8,(0,_display_utils.loadScript)(_getWorkerSrc());case 8:return _context.abrupt("return",window.pdfjsWorker.WorkerMessageHandler);case 9:case"end":return _context.stop()}},_callee)}));return function(){return _ref12.apply(this,arguments)}}();return loader().then(fakeWorkerCapability.resolve,fakeWorkerCapability.reject),fakeWorkerCapability.promise}function createCDNWrapper(e){var t="importScripts('"+e+"');";return URL.createObjectURL(new Blob([t]))}var PDFWorker=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.name,n=void 0===r?null:r,a=t.port,i=void 0===a?null:a,o=t.verbosity,s=void 0===o?(0,_util.getVerbosityLevel)():o;if(_classCallCheck(this,e),i&&pdfWorkerPorts.has(i))throw new Error("Cannot use more than one PDFWorker per port");if(this.name=n,this.destroyed=!1,this.postMessageTransfers=!0,this.verbosity=s,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,i)return pdfWorkerPorts.set(i,this),void this._initializeFromPort(i);this._initialize()}return _createClass(e,[{key:"promise",get:function(){return this._readyCapability.promise}},{key:"port",get:function(){return this._port}},{key:"messageHandler",get:function(){return this._messageHandler}},{key:"_initializeFromPort",value:function(e){this._port=e,this._messageHandler=new _message_handler.MessageHandler("main","worker",e),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve()}},{key:"_initialize",value:function(){var e=this;if("undefined"!=typeof Worker&&!isWorkerDisabled&&!getMainThreadWorkerMessageHandler()){var t=_getWorkerSrc();try{(0,_util.isSameOrigin)(window.location.href,t)||(t=createCDNWrapper(new URL(t,window.location).href));var r=new Worker(t),n=new _message_handler.MessageHandler("main","worker",r),a=function(){r.removeEventListener("error",i),n.destroy(),r.terminate(),e.destroyed?e._readyCapability.reject(new Error("Worker was destroyed")):e._setupFakeWorker()},i=function(){e._webWorker||a()};r.addEventListener("error",i),n.on("test",function(t){r.removeEventListener("error",i),e.destroyed?a():t?(e._messageHandler=n,e._port=r,e._webWorker=r,t.supportTransfers||(e.postMessageTransfers=!1),e._readyCapability.resolve(),n.send("configure",{verbosity:e.verbosity})):(e._setupFakeWorker(),n.destroy(),r.terminate())}),n.on("ready",function(t){if(r.removeEventListener("error",i),e.destroyed)a();else try{o()}catch(t){e._setupFakeWorker()}});var o=function(){var t=new Uint8Array([e.postMessageTransfers?255:0]);try{n.send("test",t,[t.buffer])}catch(e){(0,_util.warn)("Cannot use postMessage transfers."),t[0]=0,n.send("test",t)}};return void o()}catch(e){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}},{key:"_setupFakeWorker",value:function(){var e=this;isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),isWorkerDisabled=!0),setupFakeWorkerGlobal().then(function(t){if(e.destroyed)e._readyCapability.reject(new Error("Worker was destroyed"));else{var r=new LoopbackPort;e._port=r;var n="fake"+nextFakeWorkerId++,a=new _message_handler.MessageHandler(n+"_worker",n,r);t.setup(a,r);var i=new _message_handler.MessageHandler(n,n+"_worker",r);e._messageHandler=i,e._readyCapability.resolve(),i.send("configure",{verbosity:e.verbosity})}}).catch(function(t){e._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(t.message,'".')))})}},{key:"destroy",value:function(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),pdfWorkerPorts.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}}],[{key:"fromPort",value:function(t){if(!t||!t.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return pdfWorkerPorts.has(t.port)?pdfWorkerPorts.get(t.port):new e(t)}},{key:"getWorkerSrc",value:function(){return _getWorkerSrc()}}]),e}();return PDFWorker}();exports.PDFWorker=PDFWorker;var WorkerTransport=function(){function e(t,r,n,a){_classCallCheck(this,e),this.messageHandler=t,this.loadingTask=r,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({docId:r.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),ownerDocument:a.ownerDocument}),this._params=a,this.CMapReaderFactory=new a.CMapReaderFactory({baseUrl:a.cMapUrl,isCompressed:a.cMapPacked}),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.pageCache=[],this.pagePromises=[],this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}return _createClass(e,[{key:"annotationStorage",get:function(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}},{key:"destroy",value:function(){var e=this;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,_util.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));var t,r=[],n=_createForOfIteratorHelper(this.pageCache);try{for(n.s();!(t=n.n()).done;){var a=t.value;a&&r.push(a._destroy())}}catch(e){n.e(e)}finally{n.f()}this.pageCache.length=0,this.pagePromises.length=0,this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();var i=this.messageHandler.sendWithPromise("Terminate",null);return r.push(i),Promise.all(r).then(function(){e.commonObjs.clear(),e.fontLoader.clear(),e._hasJSActionsPromise=null,e._networkStream&&e._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),e.messageHandler&&(e.messageHandler.destroy(),e.messageHandler=null),e.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}},{key:"setupMessageHandler",value:function(){var e=this,t=this.messageHandler,r=this.loadingTask;t.on("GetReader",function(t,r){(0,_util.assert)(e._networkStream,"GetReader - no `IPDFStream` instance available."),e._fullReader=e._networkStream.getFullReader(),e._fullReader.onProgress=function(t){e._lastProgress={loaded:t.loaded,total:t.total}},r.onPull=function(){e._fullReader.read().then(function(e){var t=e.value;e.done?r.close():((0,_util.assert)((0,_util.isArrayBuffer)(t),"GetReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(t),1,[t]))}).catch(function(e){r.error(e)})},r.onCancel=function(t){e._fullReader.cancel(t),r.ready.catch(function(t){if(!e.destroyed)throw t})}}),t.on("ReaderHeadersReady",function(t){var n=(0,_util.createPromiseCapability)(),a=e._fullReader;return a.headersReady.then(function(){a.isStreamingSupported&&a.isRangeSupported||(e._lastProgress&&r.onProgress&&r.onProgress(e._lastProgress),a.onProgress=function(e){r.onProgress&&r.onProgress({loaded:e.loaded,total:e.total})}),n.resolve({isStreamingSupported:a.isStreamingSupported,isRangeSupported:a.isRangeSupported,contentLength:a.contentLength})},n.reject),n.promise}),t.on("GetRangeReader",function(t,r){(0,_util.assert)(e._networkStream,"GetRangeReader - no `IPDFStream` instance available.");var n=e._networkStream.getRangeReader(t.begin,t.end);n?(r.onPull=function(){n.read().then(function(e){var t=e.value;e.done?r.close():((0,_util.assert)((0,_util.isArrayBuffer)(t),"GetRangeReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(t),1,[t]))}).catch(function(e){r.error(e)})},r.onCancel=function(t){n.cancel(t),r.ready.catch(function(t){if(!e.destroyed)throw t})}):r.close()}),t.on("GetDoc",function(t){var n=t.pdfInfo;e._numPages=n.numPages,r._capability.resolve(new PDFDocumentProxy(n,e))}),t.on("DocException",function(e){var t;switch(e.name){case"PasswordException":t=new _util.PasswordException(e.message,e.code);break;case"InvalidPDFException":t=new _util.InvalidPDFException(e.message);break;case"MissingPDFException":t=new _util.MissingPDFException(e.message);break;case"UnexpectedResponseException":t=new _util.UnexpectedResponseException(e.message,e.status);break;case"UnknownErrorException":t=new _util.UnknownErrorException(e.message,e.details)}if(!(t instanceof Error)){(0,_util.warn)("DocException - expected a valid Error.")}r._capability.reject(t)}),t.on("PasswordRequest",function(t){if(e._passwordCapability=(0,_util.createPromiseCapability)(),r.onPassword){try{r.onPassword(function(t){e._passwordCapability.resolve({password:t})},t.code)}catch(t){e._passwordCapability.reject(t)}}else e._passwordCapability.reject(new _util.PasswordException(t.message,t.code));return e._passwordCapability.promise}),t.on("DataLoaded",function(t){r.onProgress&&r.onProgress({loaded:t.length,total:t.length}),e.downloadInfoCapability.resolve(t)}),t.on("StartRenderPage",function(t){e.destroyed||e.pageCache[t.pageIndex]._startRenderPage(t.transparency,t.intent)}),t.on("commonobj",function(r){var n;if(!e.destroyed){var a=_slicedToArray(r,3),i=a[0],o=a[1],s=a[2];if(!e.commonObjs.has(i))switch(o){case"Font":var l=e._params;if("error"in s){var u=s.error;(0,_util.warn)("Error during font loading: ".concat(u)),e.commonObjs.resolve(i,u);break}var c=null;l.pdfBug&&null!==(n=globalThis.FontInspector)&&void 0!==n&&n.enabled&&(c={registerFont:function(e,t){globalThis.FontInspector.fontAdded(e,t)}});var f=new _font_loader.FontFaceObject(s,{isEvalSupported:l.isEvalSupported,disableFontFace:l.disableFontFace,ignoreErrors:l.ignoreErrors,onUnsupportedFeature:e._onUnsupportedFeature.bind(e),fontRegistry:c});e.fontLoader.bind(f).catch(function(e){return t.sendWithPromise("FontFallback",{id:i})}).finally(function(){!l.fontExtraProperties&&f.data&&(f.data=null),e.commonObjs.resolve(i,f)});break;case"FontPath":case"Image":e.commonObjs.resolve(i,s);break;default:throw new Error("Got unknown common object type ".concat(o))}}}),t.on("obj",function(t){var r;if(!e.destroyed){var n=_slicedToArray(t,4),a=n[0],i=n[1],o=n[2],s=n[3],l=e.pageCache[i];if(!l.objs.has(a))switch(o){case"Image":l.objs.resolve(a,s);(null==s?void 0:null===(r=s.data)||void 0===r?void 0:r.length)>8e6&&(l.cleanupAfterRender=!0);break;default:throw new Error("Got unknown object type ".concat(o))}}}),t.on("DocProgress",function(t){e.destroyed||r.onProgress&&r.onProgress({loaded:t.loaded,total:t.total})}),t.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),t.on("FetchBuiltInCMap",function(t,r){if(e.destroyed)r.error(new Error("Worker was destroyed"));else{var n=!1;r.onPull=function(){n?r.close():(n=!0,e.CMapReaderFactory.fetch(t).then(function(e){r.enqueue(e,1,[e.cMapData.buffer])}).catch(function(e){r.error(e)}))}}})}},{key:"_onUnsupportedFeature",value:function(e){var t=e.featureId;this.destroyed||this.loadingTask.onUnsupportedFeature&&this.loadingTask.onUnsupportedFeature(t)}},{key:"getData",value:function(){return this.messageHandler.sendWithPromise("GetData",null)}},{key:"getPage",value:function(e){var t=this;if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request"));var r=e-1;if(r in this.pagePromises)return this.pagePromises[r];var n=this.messageHandler.sendWithPromise("GetPage",{pageIndex:r}).then(function(e){if(t.destroyed)throw new Error("Transport destroyed");var n=new PDFPageProxy(r,e,t,t._params.ownerDocument,t._params.pdfBug);return t.pageCache[r]=n,n});return this.pagePromises[r]=n,n}},{key:"getPageIndex",value:function(e){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:e}).catch(function(e){return Promise.reject(new Error(e))})}},{key:"getAnnotations",value:function(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}},{key:"saveDocument",value:function(){var e,t,r=this;return this.messageHandler.sendWithPromise("SaveDocument",{numPages:this._numPages,annotationStorage:this.annotationStorage.serializable,filename:null!==(e=null===(t=this._fullReader)||void 0===t?void 0:t.filename)&&void 0!==e?e:null}).finally(function(){r.annotationStorage.resetModified()})}},{key:"getFieldObjects",value:function(){return this.messageHandler.sendWithPromise("GetFieldObjects",null)}},{key:"hasJSActions",value:function(){return this._hasJSActionsPromise||(this._hasJSActionsPromise=this.messageHandler.sendWithPromise("HasJSActions",null))}},{key:"getCalculationOrderIds",value:function(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}},{key:"getDestinations",value:function(){return this.messageHandler.sendWithPromise("GetDestinations",null)}},{key:"getDestination",value:function(e){return"string"!=typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}},{key:"getPageLabels",value:function(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}},{key:"getPageLayout",value:function(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}},{key:"getPageMode",value:function(){return this.messageHandler.sendWithPromise("GetPageMode",null)}},{key:"getViewerPreferences",value:function(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}},{key:"getOpenAction",value:function(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}},{key:"getAttachments",value:function(){return this.messageHandler.sendWithPromise("GetAttachments",null)}},{key:"getJavaScript",value:function(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}},{key:"getDocJSActions",value:function(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}},{key:"getPageJSActions",value:function(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}},{key:"getPageXfa",value:function(e){return this.messageHandler.sendWithPromise("GetPageXfa",{pageIndex:e})}},{key:"getStructTree",value:function(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}},{key:"getOutline",value:function(){return this.messageHandler.sendWithPromise("GetOutline",null)}},{key:"getOptionalContentConfig",value:function(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(function(e){return new _optional_content_config.OptionalContentConfig(e)})}},{key:"getPermissions",value:function(){return this.messageHandler.sendWithPromise("GetPermissions",null)}},{key:"getMetadata",value:function(){var e=this;return this.messageHandler.sendWithPromise("GetMetadata",null).then(function(t){var r,n,a,i;return{info:t[0],metadata:t[1]?new _metadata.Metadata(t[1]):null,contentDispositionFilename:null!==(r=null===(n=e._fullReader)||void 0===n?void 0:n.filename)&&void 0!==r?r:null,contentLength:null!==(a=null===(i=e._fullReader)||void 0===i?void 0:i.contentLength)&&void 0!==a?a:null}})}},{key:"getMarkInfo",value:function(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}},{key:"getStats",value:function(){return this.messageHandler.sendWithPromise("GetStats",null)}},{key:"startCleanup",value:function(){var e=_asyncToGenerator(_regenerator.default.mark(function e(){var t,r,n,a,i=arguments;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]&&i[0],e.next=3,this.messageHandler.sendWithPromise("Cleanup",null);case 3:if(!this.destroyed){e.next=5;break}return e.abrupt("return");case 5:r=0,n=this.pageCache.length;case 6:if(!(r<n)){e.next=16;break}if(a=this.pageCache[r]){e.next=10;break}return e.abrupt("continue",13);case 10:if(a.cleanup()){e.next=13;break}throw new Error("startCleanup: Page ".concat(r+1," is currently rendering."));case 13:r++,e.next=6;break;case 16:this.commonObjs.clear(),t||this.fontLoader.clear(),this._hasJSActionsPromise=null;case 19:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"loadingParams",get:function(){var e=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:e.disableAutoFetch,disableFontFace:e.disableFontFace})}}]),e}(),PDFObjects=function(){function e(){_classCallCheck(this,e),this._objs=Object.create(null)}return _createClass(e,[{key:"_ensureObj",value:function(e){return this._objs[e]?this._objs[e]:this._objs[e]={capability:(0,_util.createPromiseCapability)(),data:null,resolved:!1}}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return this._ensureObj(e).capability.promise.then(t),null;var r=this._objs[e];if(!r||!r.resolved)throw new Error("Requesting object that isn't resolved yet ".concat(e,"."));return r.data}},{key:"has",value:function(e){var t=this._objs[e];return(null==t?void 0:t.resolved)||!1}},{key:"resolve",value:function(e,t){var r=this._ensureObj(e);r.resolved=!0,r.data=t,r.capability.resolve(t)}},{key:"clear",value:function(){this._objs=Object.create(null)}}]),e}(),RenderTask=function(){function e(t){_classCallCheck(this,e),this._internalRenderTask=t,this.onContinue=null}return _createClass(e,[{key:"promise",get:function(){return this._internalRenderTask.capability.promise}},{key:"cancel",value:function(){this._internalRenderTask.cancel()}}]),e}(),InternalRenderTask=function(){var e=new WeakSet;return function(){function t(e){var r=e.callback,n=e.params,a=e.objs,i=e.commonObjs,o=e.operatorList,s=e.pageIndex,l=e.canvasFactory,u=e.useRequestAnimationFrame,c=void 0!==u&&u,f=e.pdfBug,d=void 0!==f&&f;_classCallCheck(this,t),this.callback=r,this.params=n,this.objs=a,this.commonObjs=i,this.operatorListIdx=null,this.operatorList=o,this._pageIndex=s,this.canvasFactory=l,this._pdfBug=d,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===c&&"undefined"!=typeof window,this.cancelled=!1,this.capability=(0,_util.createPromiseCapability)(),this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=n.canvasContext.canvas}return _createClass(t,[{key:"completed",get:function(){return this.capability.promise.catch(function(){})}},{key:"initializeGraphics",value:function(t){var r,n=t.transparency,a=void 0!==n&&n,i=t.optionalContentConfig;if(!this.cancelled){if(this._canvas){if(e.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");e.add(this._canvas)}this._pdfBug&&null!==(r=globalThis.StepperManager)&&void 0!==r&&r.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var o=this.params,s=o.canvasContext,l=o.viewport,u=o.transform,c=o.imageLayer,f=o.background;this.gfx=new _canvas.CanvasGraphics(s,this.commonObjs,this.objs,this.canvasFactory,c,i),this.gfx.beginDrawing({transform:u,viewport:l,transparency:a,background:f}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.running=!1,this.cancelled=!0,this.gfx&&this.gfx.endDrawing(),this._canvas&&e.delete(this._canvas),this.callback(t||new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this._pageIndex+1),"canvas"))}},{key:"operatorListChanged",value:function(){this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}},{key:"_continue",value:function(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}},{key:"_scheduleNext",value:function(){var e=this;this._useRequestAnimationFrame?window.requestAnimationFrame(function(){e._nextBound().catch(e._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}},{key:"_next",value:function(){var t=_asyncToGenerator(_regenerator.default.mark(function t(){return _regenerator.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.cancelled){t.next=2;break}return t.abrupt("return");case 2:this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this._canvas&&e.delete(this._canvas),this.callback()));case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}]),t}()}(),version="2.9.359";exports.version=version;var build="e667c8cbc";exports.build=build},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var a=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),i=r(4);function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t,r,n,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),e}var v,y=function(){function e(t){var r=t.docId,n=t.onUnsupportedFeature,a=t.ownerDocument,o=void 0===a?globalThis.document:a;d(this,e),this.constructor===e&&(0,i.unreachable)("Cannot initialize BaseFontLoader."),this.docId=r,this._onUnsupportedFeature=n,this._document=o,this.nativeFontFaces=[],this.styleElement=null}return p(e,[{key:"addNativeFontFace",value:function(e){this.nativeFontFaces.push(e),this._document.fonts.add(e)}},{key:"insertRule",value:function(e){var t=this.styleElement;t||((t=this.styleElement=this._document.createElement("style")).id="PDFJS_FONT_STYLE_TAG_".concat(this.docId),this._document.documentElement.getElementsByTagName("head")[0].appendChild(t));var r=t.sheet;r.insertRule(e,r.cssRules.length)}},{key:"clear",value:function(){var e,t=c(this.nativeFontFaces);try{for(t.s();!(e=t.n()).done;){var r=e.value;this._document.fonts.delete(r)}}catch(e){t.e(e)}finally{t.f()}this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}},{key:"bind",value:function(){var e,t=(e=a.default.mark(function e(t){var r,n,o=this;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.attached&&!t.missingFile){e.next=2;break}return e.abrupt("return");case 2:if(t.attached=!0,!this.isFontLoadingAPISupported){e.next=19;break}if(!(r=t.createNativeFontFace())){e.next=18;break}return this.addNativeFontFace(r),e.prev=7,e.next=10,r.loaded;case 10:e.next=18;break;case 12:throw e.prev=12,e.t0=e.catch(7),this._onUnsupportedFeature({featureId:i.UNSUPPORTED_FEATURES.errorFontLoadNative}),(0,i.warn)("Failed to load font '".concat(r.family,"': '").concat(e.t0,"'.")),t.disableFontFace=!0,e.t0;case 18:return e.abrupt("return");case 19:if(!(n=t.createFontFaceRule())){e.next=26;break}if(this.insertRule(n),!this.isSyncFontLoadingSupported){e.next=24;break}return e.abrupt("return");case 24:return e.next=26,new Promise(function(e){var r=o._queueLoadingCallback(e);o._prepareFontLoadEvent([n],[t],r)});case 26:case"end":return e.stop()}},e,this,[[7,12]])}),function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(e){u(i,n,a,o,s,"next",e)}function s(e){u(i,n,a,o,s,"throw",e)}o(void 0)})});return function(e){return t.apply(this,arguments)}}()},{key:"_queueLoadingCallback",value:function(e){(0,i.unreachable)("Abstract method `_queueLoadingCallback`.")}},{key:"isFontLoadingAPISupported",get:function(){var e;return(0,i.shadow)(this,"isFontLoadingAPISupported",!(null===(e=this._document)||void 0===e||!e.fonts))}},{key:"isSyncFontLoadingSupported",get:function(){(0,i.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}},{key:"_loadTestFont",get:function(){(0,i.unreachable)("Abstract method `_loadTestFont`.")}},{key:"_prepareFontLoadEvent",value:function(e,t,r){(0,i.unreachable)("Abstract method `_prepareFontLoadEvent`.")}}]),e}();t.FontLoader=v,t.FontLoader=v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(r,y);var t=s(r);function r(e){var n;return d(this,r),(n=t.call(this,e)).loadingContext={requests:[],nextRequestId:0},n.loadTestFontId=0,n}return p(r,[{key:"isSyncFontLoadingSupported",get:function(){var e=!1;if("undefined"==typeof navigator)e=!0;else{var t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);(null==t?void 0:t[1])>=14&&(e=!0)}return(0,i.shadow)(this,"isSyncFontLoadingSupported",e)}},{key:"_queueLoadingCallback",value:function(e){var t=this.loadingContext,r={id:"pdfjs-font-loading-".concat(t.nextRequestId++),done:!1,complete:function(){for((0,i.assert)(!r.done,"completeRequest() cannot be called twice."),r.done=!0;t.requests.length>0&&t.requests[0].done;){var e=t.requests.shift();setTimeout(e.callback,0)}},callback:e};return t.requests.push(r),r}},{key:"_loadTestFont",get:function(){return(0,i.shadow)(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}},{key:"_prepareFontLoadEvent",value:function(e,t,r){var n,a,o=this;function s(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function l(e,t,r,n){return e.substring(0,t)+n+e.substring(t+r)}var u=this._document.createElement("canvas");u.width=1,u.height=1;var f=u.getContext("2d"),d=0;var h="lt".concat(Date.now()).concat(this.loadTestFontId++),p=this._loadTestFont,v=s(p=l(p,976,h.length,h),16);for(n=0,a=h.length-3;n<a;n+=4)v=v-1482184792+s(h,n)|0;n<h.length&&(v=v-1482184792+s(h+"XXX",n)|0),p=l(p,16,4,(0,i.string32)(v));var y="url(data:font/opentype;base64,".concat(btoa(p),");"),g='@font-face {font-family:"'.concat(h,'";src:').concat(y,"}");this.insertRule(g);var m,b=[],_=c(t);try{for(_.s();!(m=_.n()).done;){var A=m.value;b.push(A.loadedName)}}catch(e){_.e(e)}finally{_.f()}b.push(h);var S=this._document.createElement("div");S.style.visibility="hidden",S.style.width=S.style.height="10px",S.style.position="absolute",S.style.top=S.style.left="0px";for(var k=0,w=b;k<w.length;k++){var x=w[k],C=this._document.createElement("span");C.textContent="Hi",C.style.fontFamily=x,S.appendChild(C)}this._document.body.appendChild(S),function e(t,r){if(++d>30)return(0,i.warn)("Load test font never loaded."),void r();f.font="30px "+t,f.fillText(".",0,20),f.getImageData(0,0,1,1).data[3]>0?r():setTimeout(e.bind(null,t,r))}(h,function(){o._document.body.removeChild(S),r.complete()})}}]),r}();var g=function(){function e(t,r){var n=r.isEvalSupported,a=void 0===n||n,i=r.disableFontFace,o=void 0!==i&&i,s=r.ignoreErrors,l=void 0!==s&&s,u=r.onUnsupportedFeature,c=r.fontRegistry,f=void 0===c?null:c;for(var h in d(this,e),this.compiledGlyphs=Object.create(null),t)this[h]=t[h];this.isEvalSupported=!1!==a,this.disableFontFace=!0===o,this.ignoreErrors=!0===l,this._onUnsupportedFeature=u,this.fontRegistry=f}return p(e,[{key:"createNativeFontFace",value:function(){if(!this.data||this.disableFontFace)return null;var e;if(this.cssFontInfo){var t={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(t.style="oblique ".concat(this.cssFontInfo.italicAngle,"deg")),e=new FontFace(this.cssFontInfo.fontFamily,this.data,t)}else e=new FontFace(this.loadedName,this.data,{});return this.fontRegistry&&this.fontRegistry.registerFont(this),e}},{key:"createFontFaceRule",value:function(){if(!this.data||this.disableFontFace)return null;var e,t=(0,i.bytesToString)(this.data),r="url(data:".concat(this.mimetype,";base64,").concat(btoa(t),");");if(this.cssFontInfo){var n="font-weight: ".concat(this.cssFontInfo.fontWeight,";");this.cssFontInfo.italicAngle&&(n+="font-style: oblique ".concat(this.cssFontInfo.italicAngle,"deg;")),e='@font-face {font-family:"'.concat(this.cssFontInfo.fontFamily,'";').concat(n,"src:").concat(r,"}")}else e='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(r,"}");return this.fontRegistry&&this.fontRegistry.registerFont(this,r),e}},{key:"getPathGenerator",value:function(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];var r;try{r=e.get(this.loadedName+"_path_"+t)}catch(e){if(!this.ignoreErrors)throw e;return this._onUnsupportedFeature({featureId:i.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,i.warn)('getPathGenerator - ignoring character: "'.concat(e,'".')),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&i.IsEvalSupportedCached.value){var n,a=[],o=c(r);try{for(o.s();!(n=o.n()).done;){var s=n.value,l=void 0!==s.args?s.args.join(","):"";a.push("c.",s.cmd,"(",l,");\n")}}catch(e){o.e(e)}finally{o.f()}return this.compiledGlyphs[t]=new Function("c","size",a.join(""))}return this.compiledGlyphs[t]=function(e,t){var n,a=c(r);try{for(a.s();!(n=a.n()).done;){var i=n.value;"scale"===i.cmd&&(i.args=[t,-t]),e[i.cmd].apply(e,i.args)}}catch(e){a.e(e)}finally{a.f()}}}}]),e}();t.FontFaceObject=g},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.NodeCMapReaderFactory=t.NodeCanvasFactory=void 0;var a=r(1),i=r(6),o=r(4);function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),e}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=d(e);if(t){var i=d(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=function e(){h(this,e),(0,o.unreachable)("Not implemented: NodeCanvasFactory")};t.NodeCanvasFactory=p;var v=function e(){h(this,e),(0,o.unreachable)("Not implemented: NodeCMapReaderFactory")};t.NodeCMapReaderFactory=v,i.isNodeJS&&(t.NodeCanvasFactory=p=function(e){u(r,a.BaseCanvasFactory);var t=f(r);function r(){return h(this,r),t.apply(this,arguments)}return l(r,[{key:"create",value:function(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");var r=require("canvas").createCanvas(e,t);return{canvas:r,context:r.getContext("2d")}}}]),r}(),t.NodeCMapReaderFactory=v=function(e){u(r,a.BaseCMapReaderFactory);var t=f(r);function r(){return h(this,r),t.apply(this,arguments)}return l(r,[{key:"_fetchData",value:function(e,t){return new Promise(function(r,n){require("fs").readFile(e,function(e,a){!e&&a?r({cMapData:new Uint8Array(a),compressionType:t}):n(new Error(e))})})}}]),r}())},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationStorage=void 0;var n=r(4);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._storage=new Map,this._modified=!1,this.onSetModified=null,this.onResetModified=null}var t,r,i;return t=e,(r=[{key:"getValue",value:function(e,t){var r=this._storage.get(e);return void 0!==r?r:t}},{key:"setValue",value:function(e,t){var r=this._storage.get(e),n=!1;if(void 0!==r)for(var i=0,o=Object.entries(t);i<o.length;i++){var s=a(o[i],2),l=s[0],u=s[1];r[l]!==u&&(n=!0,r[l]=u)}else this._storage.set(e,t),n=!0;n&&this._setModified()}},{key:"getAll",value:function(){return this._storage.size>0?(0,n.objectFromMap)(this._storage):null}},{key:"size",get:function(){return this._storage.size}},{key:"_setModified",value:function(){this._modified||(this._modified=!0,"function"==typeof this.onSetModified&&this.onSetModified())}},{key:"resetModified",value:function(){this._modified&&(this._modified=!1,"function"==typeof this.onResetModified&&this.onResetModified())}},{key:"serializable",get:function(){return this._storage.size>0?this._storage:null}}])&&o(t.prototype,r),i&&o(t,i),e}();t.AnnotationStorage=s},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.apiCompatibilityParams=void 0;var n=r(6),a=Object.create(null);n.isNodeJS&&(a.disableFontFace=!0);var i=Object.freeze(a);t.apiCompatibilityParams=i},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var n=r(4),a=r(119);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=f(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var h=16,p=1.000001;function v(e){if(!e.mozCurrentTransform){e._originalSave=e.save,e._originalRestore=e.restore,e._originalRotate=e.rotate,e._originalScale=e.scale,e._originalTranslate=e.translate,e._originalTransform=e.transform,e._originalSetTransform=e.setTransform,e._originalResetTransform=e.resetTransform,e._transformMatrix=e._transformMatrix||[1,0,0,1,0,0],e._transformStack=[];try{var t=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"lineWidth");e._setLineWidth=t.set,e._getLineWidth=t.get,Object.defineProperty(e,"lineWidth",{set:function(e){this._setLineWidth(e*p)},get:function(){return this._getLineWidth()}})}catch(e){}Object.defineProperty(e,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(e,"mozCurrentTransformInverse",{get:function(){var e=c(this._transformMatrix,6),t=e[0],r=e[1],n=e[2],a=e[3],i=e[4],o=e[5],s=t*a-r*n,l=r*n-t*a;return[a/s,r/l,n/l,t/s,(a*i-n*o)/l,(r*i-t*o)/s]}}),e.save=function(){var e=this._transformMatrix;this._transformStack.push(e),this._transformMatrix=e.slice(0,6),this._originalSave()},e.restore=function(){var e=this._transformStack.pop();e&&(this._transformMatrix=e,this._originalRestore())},e.translate=function(e,t){var r=this._transformMatrix;r[4]=r[0]*e+r[2]*t+r[4],r[5]=r[1]*e+r[3]*t+r[5],this._originalTranslate(e,t)},e.scale=function(e,t){var r=this._transformMatrix;r[0]=r[0]*e,r[1]=r[1]*e,r[2]=r[2]*t,r[3]=r[3]*t,this._originalScale(e,t)},e.transform=function(t,r,n,a,i,o){var s=this._transformMatrix;this._transformMatrix=[s[0]*t+s[2]*r,s[1]*t+s[3]*r,s[0]*n+s[2]*a,s[1]*n+s[3]*a,s[0]*i+s[2]*o+s[4],s[1]*i+s[3]*o+s[5]],e._originalTransform(t,r,n,a,i,o)},e.setTransform=function(t,r,n,a,i,o){this._transformMatrix=[t,r,n,a,i,o],e._originalSetTransform(t,r,n,a,i,o)},e.resetTransform=function(){this._transformMatrix=[1,0,0,1,0,0],e._originalResetTransform()},e.rotate=function(e){var t=Math.cos(e),r=Math.sin(e),n=this._transformMatrix;this._transformMatrix=[n[0]*t+n[2]*r,n[1]*t+n[3]*r,n[0]*-r+n[2]*t,n[1]*-r+n[3]*t,n[4],n[5]],this._originalRotate(e)}}}var y=function(){function e(t){s(this,e),this.canvasFactory=t,this.cache=Object.create(null)}return u(e,[{key:"getCanvas",value:function(e,t,r,n){var a;return void 0!==this.cache[e]?(a=this.cache[e],this.canvasFactory.reset(a,t,r),a.context.setTransform(1,0,0,1,0,0)):(a=this.canvasFactory.create(t,r),this.cache[e]=a),n&&v(a.context),a}},{key:"clear",value:function(){for(var e in this.cache){var t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}}]),e}();var g=function(){function e(){s(this,e),this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=n.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=n.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=n.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.resumeSMaskCtx=null,this.transferMaps=null}return u(e,[{key:"clone",value:function(){return Object.create(this)}},{key:"setCurrentPoint",value:function(e,t){this.x=e,this.y=t}}]),e}(),m=function(){function e(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("undefined"!=typeof ImageData&&t instanceof ImageData)e.putImageData(t,0,0);else{var a,i,o,s,l,u,c,f,d,p=t.height,v=t.width,y=p%h,g=(p-y)/h,m=0===y?g:g+1,b=e.createImageData(v,h),_=0,A=t.data,S=b.data;if(r)switch(r.length){case 1:u=r[0],c=r[0],f=r[0],d=r[0];break;case 4:u=r[0],c=r[1],f=r[2],d=r[3]}if(t.kind===n.ImageKind.GRAYSCALE_1BPP){var k=A.byteLength,w=new Uint32Array(S.buffer,0,S.byteLength>>2),x=w.length,C=v+7>>3,P=4294967295,T=n.IsLittleEndianCached.value?4278190080:255;if(d&&255===d[0]&&0===d[255]){var R=[T,P];P=R[0],T=R[1]}for(i=0;i<m;i++){for(s=i<g?h:y,a=0,o=0;o<s;o++){for(var E=k-_,O=0,F=E>C?v:8*E-7,I=-8&F,M=0,L=0;O<I;O+=8)L=A[_++],w[a++]=128&L?P:T,w[a++]=64&L?P:T,w[a++]=32&L?P:T,w[a++]=16&L?P:T,w[a++]=8&L?P:T,w[a++]=4&L?P:T,w[a++]=2&L?P:T,w[a++]=1&L?P:T;for(;O<F;O++)0===M&&(L=A[_++],M=128),w[a++]=L&M?P:T,M>>=1}for(;a<x;)w[a++]=0;e.putImageData(b,0,i*h)}}else if(t.kind===n.ImageKind.RGBA_32BPP){var j=!!(u||c||f);for(o=0,l=v*h*4,i=0;i<g;i++){if(S.set(A.subarray(_,_+l)),_+=l,j)for(var D=0;D<l;D+=4)u&&(S[D+0]=u[S[D+0]]),c&&(S[D+1]=c[S[D+1]]),f&&(S[D+2]=f[S[D+2]]);e.putImageData(b,0,o),o+=h}if(i<m){if(l=v*y*4,S.set(A.subarray(_,_+l)),j)for(var N=0;N<l;N+=4)u&&(S[N+0]=u[S[N+0]]),c&&(S[N+1]=c[S[N+1]]),f&&(S[N+2]=f[S[N+2]]);e.putImageData(b,0,o)}}else{if(t.kind!==n.ImageKind.RGB_24BPP)throw new Error("bad image kind: ".concat(t.kind));var q=!!(u||c||f);for(l=v*(s=h),i=0;i<m;i++){for(i>=g&&(l=v*(s=y)),a=0,o=l;o--;)S[a++]=A[_++],S[a++]=A[_++],S[a++]=A[_++],S[a++]=255;if(q)for(var W=0;W<a;W+=4)u&&(S[W+0]=u[S[W+0]]),c&&(S[W+1]=c[S[W+1]]),f&&(S[W+2]=f[S[W+2]]);e.putImageData(b,0,i*h)}}}}function t(e,t){for(var r=t.height,n=t.width,a=r%h,i=(r-a)/h,o=0===a?i:i+1,s=e.createImageData(n,h),l=0,u=t.data,c=s.data,f=0;f<o;f++){for(var d=f<i?h:a,p=3,v=0;v<d;v++)for(var y=void 0,g=0,m=0;m<n;m++)g||(y=u[l++],g=128),c[p]=y&g?0:255,p+=4,g>>=1;e.putImageData(s,0,f*h)}}function r(e,t){for(var r=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],n=0,a=r.length;n<a;n++){var i=r[n];void 0!==e[i]&&(t[i]=e[i])}void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function l(e){e.strokeStyle="#000000",e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",void 0!==e.setLineDash&&(e.setLineDash([]),e.lineDashOffset=0)}function c(e,t,r,n){for(var a=e.length,i=3;i<a;i+=4){var o=e[i];if(0===o)e[i-3]=t,e[i-2]=r,e[i-1]=n;else if(o<255){var s=255-o;e[i-3]=e[i-3]*o+t*s>>8,e[i-2]=e[i-2]*o+r*s>>8,e[i-1]=e[i-1]*o+n*s>>8}}}function f(e,t,r){for(var n=e.length,a=3;a<n;a+=4){var i=r?r[e[a]]:e[a];t[a]=t[a]*i*(1/255)|0}}function d(e,t,r){for(var n=e.length,a=3;a<n;a+=4){var i=77*e[a-3]+152*e[a-2]+28*e[a-1];t[a]=r?t[a]*r[i>>8]>>8:t[a]*i>>16}}function p(e,t,r){var n=t.canvas,a=t.context;e.setTransform(t.scaleX,0,0,t.scaleY,t.offsetX,t.offsetY),function(e,t,r,n,a,i,o){var s,l=!!i,u=l?i[0]:0,h=l?i[1]:0,p=l?i[2]:0;s="Luminosity"===a?d:f;for(var v=Math.min(n,Math.ceil(1048576/r)),y=0;y<n;y+=v){var g=Math.min(v,n-y),m=e.getImageData(0,y,r,g),b=t.getImageData(0,y,r,g);l&&c(m.data,u,h,p),s(m.data,b.data,o),e.putImageData(b,0,y)}}(a,r,n.width,n.height,t.subtype,t.backdrop,t.transferMap),e.drawImage(n,0,0)}var m=["butt","round","square"],b=["miter","round","bevel"],_={},A={},S=function(){function c(e,t,r,n,a,i){s(this,c),this.ctx=e,this.current=new g,this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=r,this.canvasFactory=n,this.imageLayer=a,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.contentVisible=!0,this.markedContentStack=[],this.optionalContentConfig=i,this.cachedCanvases=new y(this.canvasFactory),e&&v(e),this._cachedGetSinglePixelWidth=null}return u(c,[{key:"beginDrawing",value:function(e){var t=e.transform,r=e.viewport,n=e.transparency,a=void 0!==n&&n,i=e.background,o=void 0===i?null:i,s=this.ctx.canvas.width,u=this.ctx.canvas.height;if(this.ctx.save(),this.ctx.fillStyle=o||"rgb(255, 255, 255)",this.ctx.fillRect(0,0,s,u),this.ctx.restore(),a){var c=this.cachedCanvases.getCanvas("transparent",s,u,!0);this.compositeCtx=this.ctx,this.transparentCanvas=c.canvas,this.ctx=c.context,this.ctx.save(),this.ctx.transform.apply(this.ctx,this.compositeCtx.mozCurrentTransform)}this.ctx.save(),l(this.ctx),t&&this.ctx.transform.apply(this.ctx,t),this.ctx.transform.apply(this.ctx,r.transform),this.baseTransform=this.ctx.mozCurrentTransform.slice(),this._combinedScaleFactor=Math.hypot(this.baseTransform[0],this.baseTransform[2]),this.imageLayer&&this.imageLayer.beginLayout()}},{key:"executeOperatorList",value:function(e,t,r,a){var i=e.argsArray,s=e.fnArray,l=t||0,u=i.length;if(u===l)return l;for(var c,f=u-l>10&&"function"==typeof r,d=f?Date.now()+15:0,h=0,p=this.commonObjs,v=this.objs;;){if(void 0!==a&&l===a.nextBreakPoint)return a.breakIt(l,r),l;if((c=s[l])!==n.OPS.dependency)this[c].apply(this,i[l]);else{var y,g=o(i[l]);try{for(g.s();!(y=g.n()).done;){var m=y.value,b=m.startsWith("g_")?p:v;if(!b.has(m))return b.get(m,r),l}}catch(e){g.e(e)}finally{g.f()}}if(++l===u)return l;if(f&&++h>10){if(Date.now()>d)return r(),l;h=0}}}},{key:"endDrawing",value:function(){for(;this.stateStack.length||null!==this.current.activeSMask;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null),this.cachedCanvases.clear(),this.imageLayer&&this.imageLayer.endLayout()}},{key:"setLineWidth",value:function(e){this.current.lineWidth=e,this.ctx.lineWidth=e}},{key:"setLineCap",value:function(e){this.ctx.lineCap=m[e]}},{key:"setLineJoin",value:function(e){this.ctx.lineJoin=b[e]}},{key:"setMiterLimit",value:function(e){this.ctx.miterLimit=e}},{key:"setDash",value:function(e,t){var r=this.ctx;void 0!==r.setLineDash&&(r.setLineDash(e),r.lineDashOffset=t)}},{key:"setRenderingIntent",value:function(e){}},{key:"setFlatness",value:function(e){}},{key:"setGState",value:function(e){for(var t=0,r=e.length;t<r;t++){var n=e[t],a=n[0],i=n[1];switch(a){case"LW":this.setLineWidth(i);break;case"LC":this.setLineCap(i);break;case"LJ":this.setLineJoin(i);break;case"ML":this.setMiterLimit(i);break;case"D":this.setDash(i[0],i[1]);break;case"RI":this.setRenderingIntent(i);break;case"FL":this.setFlatness(i);break;case"Font":this.setFont(i[0],i[1]);break;case"CA":this.current.strokeAlpha=n[1];break;case"ca":this.current.fillAlpha=n[1],this.ctx.globalAlpha=n[1];break;case"BM":this.ctx.globalCompositeOperation=i;break;case"SMask":this.current.activeSMask&&(this.stateStack.length>0&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask?this.suspendSMaskGroup():this.endSMaskGroup()),this.current.activeSMask=i?this.tempSMask:null,this.current.activeSMask&&this.beginSMaskGroup(),this.tempSMask=null;break;case"TR":this.current.transferMaps=i}}}},{key:"beginSMaskGroup",value:function(){var e=this.current.activeSMask,t=e.canvas.width,n=e.canvas.height,a="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(a,t,n,!0),o=this.ctx,s=o.mozCurrentTransform;this.ctx.save();var l=i.context;l.scale(1/e.scaleX,1/e.scaleY),l.translate(-e.offsetX,-e.offsetY),l.transform.apply(l,s),e.startTransformInverse=l.mozCurrentTransformInverse,r(o,l),this.ctx=l,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(o),this.groupLevel++}},{key:"suspendSMaskGroup",value:function(){var e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),p(this.ctx,this.current.activeSMask,e),this.ctx.restore(),this.ctx.save(),r(e,this.ctx),this.current.resumeSMaskCtx=e;var t=n.Util.transform(this.current.activeSMask.startTransformInverse,e.mozCurrentTransform);this.ctx.transform.apply(this.ctx,t),e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,e.canvas.width,e.canvas.height),e.restore()}},{key:"resumeSMaskGroup",value:function(){var e=this.current.resumeSMaskCtx,t=this.ctx;this.ctx=e,this.groupStack.push(t),this.groupLevel++}},{key:"endSMaskGroup",value:function(){var e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),p(this.ctx,this.current.activeSMask,e),this.ctx.restore(),r(e,this.ctx);var t=n.Util.transform(this.current.activeSMask.startTransformInverse,e.mozCurrentTransform);this.ctx.transform.apply(this.ctx,t)}},{key:"save",value:function(){this.ctx.save();var e=this.current;this.stateStack.push(e),this.current=e.clone(),this.current.resumeSMaskCtx=null}},{key:"restore",value:function(){this.current.resumeSMaskCtx&&this.resumeSMaskGroup(),null===this.current.activeSMask||0!==this.stateStack.length&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask||this.endSMaskGroup(),0!==this.stateStack.length?(this.current=this.stateStack.pop(),this.ctx.restore(),this.pendingClip=null,this._cachedGetSinglePixelWidth=null):this.current.activeSMask=null}},{key:"transform",value:function(e,t,r,n,a,i){this.ctx.transform(e,t,r,n,a,i),this._cachedGetSinglePixelWidth=null}},{key:"constructPath",value:function(e,t){for(var r=this.ctx,a=this.current,i=a.x,o=a.y,s=0,l=0,u=e.length;s<u;s++)switch(0|e[s]){case n.OPS.rectangle:i=t[l++],o=t[l++];var c=t[l++],f=t[l++],d=i+c,h=o+f;r.moveTo(i,o),0===c||0===f?r.lineTo(d,h):(r.lineTo(d,o),r.lineTo(d,h),r.lineTo(i,h)),r.closePath();break;case n.OPS.moveTo:i=t[l++],o=t[l++],r.moveTo(i,o);break;case n.OPS.lineTo:i=t[l++],o=t[l++],r.lineTo(i,o);break;case n.OPS.curveTo:i=t[l+4],o=t[l+5],r.bezierCurveTo(t[l],t[l+1],t[l+2],t[l+3],i,o),l+=6;break;case n.OPS.curveTo2:r.bezierCurveTo(i,o,t[l],t[l+1],t[l+2],t[l+3]),i=t[l+2],o=t[l+3],l+=4;break;case n.OPS.curveTo3:i=t[l+2],o=t[l+3],r.bezierCurveTo(t[l],t[l+1],i,o,i,o),l+=4;break;case n.OPS.closePath:r.closePath()}a.setCurrentPoint(i,o)}},{key:"closePath",value:function(){this.ctx.closePath()}},{key:"stroke",value:function(e){e=void 0===e||e;var t=this.ctx,r=this.current.strokeColor;if(t.globalAlpha=this.current.strokeAlpha,this.contentVisible)if("object"===i(r)&&null!=r&&r.getPattern){var n=this.getSinglePixelWidth();t.save(),t.strokeStyle=r.getPattern(t,this),t.lineWidth=Math.max(n,this.current.lineWidth),t.stroke(),t.restore()}else{var a=this.getSinglePixelWidth();a<0&&-a>=this.current.lineWidth?(t.save(),t.resetTransform(),t.lineWidth=Math.round(this._combinedScaleFactor),t.stroke(),t.restore()):(t.lineWidth=Math.max(a,this.current.lineWidth),t.stroke())}e&&this.consumePath(),t.globalAlpha=this.current.fillAlpha}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"fill",value:function(e){e=void 0===e||e;var t=this.ctx,r=this.current.fillColor,n=!1;this.current.patternFill&&(t.save(),t.fillStyle=r.getPattern(t,this),n=!0),this.contentVisible&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),n&&t.restore(),e&&this.consumePath()}},{key:"eoFill",value:function(){this.pendingEOFill=!0,this.fill()}},{key:"fillStroke",value:function(){this.fill(!1),this.stroke(!1),this.consumePath()}},{key:"eoFillStroke",value:function(){this.pendingEOFill=!0,this.fillStroke()}},{key:"closeFillStroke",value:function(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}},{key:"endPath",value:function(){this.consumePath()}},{key:"clip",value:function(){this.pendingClip=_}},{key:"eoClip",value:function(){this.pendingClip=A}},{key:"beginText",value:function(){this.current.textMatrix=n.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}},{key:"endText",value:function(){var e=this.pendingTextPaths,t=this.ctx;if(void 0!==e){t.save(),t.beginPath();for(var r=0;r<e.length;r++){var n=e[r];t.setTransform.apply(t,n.transform),t.translate(n.x,n.y),n.addToPath(t,n.fontSize)}t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()}},{key:"setCharSpacing",value:function(e){this.current.charSpacing=e}},{key:"setWordSpacing",value:function(e){this.current.wordSpacing=e}},{key:"setHScale",value:function(e){this.current.textHScale=e/100}},{key:"setLeading",value:function(e){this.current.leading=-e}},{key:"setFont",value:function(e,t){var r=this.commonObjs.get(e),a=this.current;if(!r)throw new Error("Can't find font for ".concat(e));if(a.fontMatrix=r.fontMatrix||n.FONT_IDENTITY_MATRIX,0!==a.fontMatrix[0]&&0!==a.fontMatrix[3]||(0,n.warn)("Invalid font matrix for font "+e),t<0?(t=-t,a.fontDirection=-1):a.fontDirection=1,this.current.font=r,this.current.fontSize=t,!r.isType3Font){var i=r.loadedName||"sans-serif",o="normal";r.black?o="900":r.bold&&(o="bold");var s=r.italic?"italic":"normal",l='"'.concat(i,'", ').concat(r.fallbackName),u=t;t<16?u=16:t>100&&(u=100),this.current.fontSizeScale=t/u,this.ctx.font="".concat(s," ").concat(o," ").concat(u,"px ").concat(l)}}},{key:"setTextRenderingMode",value:function(e){this.current.textRenderingMode=e}},{key:"setTextRise",value:function(e){this.current.textRise=e}},{key:"moveText",value:function(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}},{key:"setLeadingMoveText",value:function(e,t){this.setLeading(-t),this.moveText(e,t)}},{key:"setTextMatrix",value:function(e,t,r,n,a,i){this.current.textMatrix=[e,t,r,n,a,i],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}},{key:"nextLine",value:function(){this.moveText(0,this.current.leading)}},{key:"paintChar",value:function(e,t,r,a,i){var o,s=this.ctx,l=this.current,u=l.font,c=l.textRenderingMode,f=l.fontSize/l.fontSizeScale,d=c&n.TextRenderingMode.FILL_STROKE_MASK,h=!!(c&n.TextRenderingMode.ADD_TO_PATH_FLAG),p=l.patternFill&&!u.missingFile;((u.disableFontFace||h||p)&&(o=u.getPathGenerator(this.commonObjs,e)),u.disableFontFace||p?(s.save(),s.translate(t,r),s.beginPath(),o(s,f),a&&s.setTransform.apply(s,a),d!==n.TextRenderingMode.FILL&&d!==n.TextRenderingMode.FILL_STROKE||s.fill(),d!==n.TextRenderingMode.STROKE&&d!==n.TextRenderingMode.FILL_STROKE||(i&&(s.resetTransform(),s.lineWidth=Math.round(this._combinedScaleFactor)),s.stroke()),s.restore()):(d!==n.TextRenderingMode.FILL&&d!==n.TextRenderingMode.FILL_STROKE||s.fillText(e,t,r),d!==n.TextRenderingMode.STROKE&&d!==n.TextRenderingMode.FILL_STROKE||(i?(s.save(),s.moveTo(t,r),s.resetTransform(),s.lineWidth=Math.round(this._combinedScaleFactor),s.strokeText(e,0,0),s.restore()):s.strokeText(e,t,r))),h)&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:s.mozCurrentTransform,x:t,y:r,fontSize:f,addToPath:o})}},{key:"isFontSubpixelAAEnabled",get:function(){var e=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10).context;e.scale(1.5,1),e.fillText("I",0,10);for(var t=e.getImageData(0,0,10,10).data,r=!1,a=3;a<t.length;a+=4)if(t[a]>0&&t[a]<255){r=!0;break}return(0,n.shadow)(this,"isFontSubpixelAAEnabled",r)}},{key:"showText",value:function(e){var t=this.current,r=t.font;if(r.isType3Font)return this.showType3Text(e);var a=t.fontSize;if(0!==a){var i,o=this.ctx,s=t.fontSizeScale,l=t.charSpacing,u=t.wordSpacing,c=t.fontDirection,f=t.textHScale*c,d=e.length,h=r.vertical,p=h?1:-1,v=r.defaultVMetrics,y=a*t.fontMatrix[0],g=t.textRenderingMode===n.TextRenderingMode.FILL&&!r.disableFontFace&&!t.patternFill;if(o.save(),t.patternFill){o.save();var m=t.fillColor.getPattern(o,this);i=o.mozCurrentTransform,o.restore(),o.fillStyle=m}o.transform.apply(o,t.textMatrix),o.translate(t.x,t.y+t.textRise),c>0?o.scale(f,-1):o.scale(f,1);var b=t.lineWidth,_=!1,A=t.textMatrixScale;if(0===A||0===b){var S=t.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;S!==n.TextRenderingMode.STROKE&&S!==n.TextRenderingMode.FILL_STROKE||(this._cachedGetSinglePixelWidth=null,_=(b=this.getSinglePixelWidth())<0)}else b/=A;1!==s&&(o.scale(s,s),b/=s),o.lineWidth=b;var k,w=0;for(k=0;k<d;++k){var x=e[k];if((0,n.isNum)(x))w+=p*x*a/1e3;else{var C=!1,P=(x.isSpace?u:0)+l,T=x.fontChar,R=x.accent,E=void 0,O=void 0,F=x.width;if(h){var I=x.vmetric||v,M=-(x.vmetric?I[1]:.5*F)*y,L=I[2]*y;F=I?-I[0]:F,E=M/s,O=(w+L)/s}else E=w/s,O=0;if(r.remeasure&&F>0){var j=1e3*o.measureText(T).width/a*s;if(F<j&&this.isFontSubpixelAAEnabled){var D=F/j;C=!0,o.save(),o.scale(D,1),E/=D}else F!==j&&(E+=(F-j)/2e3*a/s)}if(this.contentVisible&&(x.isInFont||r.missingFile))if(g&&!R)o.fillText(T,E,O);else if(this.paintChar(T,E,O,i,_),R){var N=E+a*R.offset.x/s,q=O-a*R.offset.y/s;this.paintChar(R.fontChar,N,q,i,_)}w+=h?F*y-P*c:F*y+P*c,C&&o.restore()}}h?t.y-=w:t.x+=w*f,o.restore()}}},{key:"showType3Text",value:function(e){var t,r,a,i,o=this.ctx,s=this.current,l=s.font,u=s.fontSize,c=s.fontDirection,f=l.vertical?1:-1,d=s.charSpacing,h=s.wordSpacing,p=s.textHScale*c,v=s.fontMatrix||n.FONT_IDENTITY_MATRIX,y=e.length;if(!(s.textRenderingMode===n.TextRenderingMode.INVISIBLE)&&0!==u){for(this._cachedGetSinglePixelWidth=null,o.save(),o.transform.apply(o,s.textMatrix),o.translate(s.x,s.y),o.scale(p,c),t=0;t<y;++t)if(r=e[t],(0,n.isNum)(r))i=f*r*u/1e3,this.ctx.translate(i,0),s.x+=i*p;else{var g=(r.isSpace?h:0)+d,m=l.charProcOperatorList[r.operatorListId];if(m)this.contentVisible&&(this.processingType3=r,this.save(),o.scale(u,u),o.transform.apply(o,v),this.executeOperatorList(m),this.restore()),a=n.Util.applyTransform([r.width,0],v)[0]*u+g,o.translate(a,0),s.x+=a*p;else(0,n.warn)('Type3 character "'.concat(r.operatorListId,'" is not available.'))}o.restore(),this.processingType3=null}}},{key:"setCharWidth",value:function(e,t){}},{key:"setCharWidthAndBounds",value:function(e,t,r,n,a,i){this.ctx.rect(r,n,a-r,i-n),this.clip(),this.endPath()}},{key:"getColorN_Pattern",value:function(e){var t,r=this;if("TilingPattern"===e[0]){var n=e[1],i=this.baseTransform||this.ctx.mozCurrentTransform.slice(),o={createCanvasGraphics:function(e){return new c(e,r.commonObjs,r.objs,r.canvasFactory)}};t=new a.TilingPattern(e,n,this.ctx,o,i)}else t=(0,a.getShadingPattern)(e);return t}},{key:"setStrokeColorN",value:function(){this.current.strokeColor=this.getColorN_Pattern(arguments)}},{key:"setFillColorN",value:function(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}},{key:"setStrokeRGBColor",value:function(e,t,r){var a=n.Util.makeHexColor(e,t,r);this.ctx.strokeStyle=a,this.current.strokeColor=a}},{key:"setFillRGBColor",value:function(e,t,r){var a=n.Util.makeHexColor(e,t,r);this.ctx.fillStyle=a,this.current.fillColor=a,this.current.patternFill=!1}},{key:"shadingFill",value:function(e){if(this.contentVisible){var t=this.ctx;this.save();var r=(0,a.getShadingPattern)(e);t.fillStyle=r.getPattern(t,this,!0);var i=t.mozCurrentTransformInverse;if(i){var o=t.canvas,s=o.width,l=o.height,u=n.Util.applyTransform([0,0],i),c=n.Util.applyTransform([0,l],i),f=n.Util.applyTransform([s,0],i),d=n.Util.applyTransform([s,l],i),h=Math.min(u[0],c[0],f[0],d[0]),p=Math.min(u[1],c[1],f[1],d[1]),v=Math.max(u[0],c[0],f[0],d[0]),y=Math.max(u[1],c[1],f[1],d[1]);this.ctx.fillRect(h,p,v-h,y-p)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.restore()}}},{key:"beginInlineImage",value:function(){(0,n.unreachable)("Should not call beginInlineImage")}},{key:"beginImageData",value:function(){(0,n.unreachable)("Should not call beginImageData")}},{key:"paintFormXObjectBegin",value:function(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(e)&&6===e.length&&this.transform.apply(this,e),this.baseTransform=this.ctx.mozCurrentTransform,t)){var r=t[2]-t[0],n=t[3]-t[1];this.ctx.rect(t[0],t[1],r,n),this.clip(),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}},{key:"beginGroup",value:function(e){if(this.contentVisible){this.save();var t=this.ctx;e.isolated||(0,n.info)("TODO: Support non-isolated groups."),e.knockout&&(0,n.warn)("Knockout groups not supported.");var a=t.mozCurrentTransform;if(e.matrix&&t.transform.apply(t,e.matrix),!e.bbox)throw new Error("Bounding box is required.");var i=n.Util.getAxialAlignedBoundingBox(e.bbox,t.mozCurrentTransform),o=[0,0,t.canvas.width,t.canvas.height];i=n.Util.intersect(i,o)||[0,0,0,0];var s=Math.floor(i[0]),l=Math.floor(i[1]),u=Math.max(Math.ceil(i[2])-s,1),c=Math.max(Math.ceil(i[3])-l,1),f=1,d=1;u>4096&&(f=u/4096,u=4096),c>4096&&(d=c/4096,c=4096);var h="groupAt"+this.groupLevel;e.smask&&(h+="_smask_"+this.smaskCounter++%2);var p=this.cachedCanvases.getCanvas(h,u,c,!0),v=p.context;v.scale(1/f,1/d),v.translate(-s,-l),v.transform.apply(v,a),e.smask?this.smaskStack.push({canvas:p.canvas,context:v,offsetX:s,offsetY:l,scaleX:f,scaleY:d,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(s,l),t.scale(f,d)),r(t,v),this.ctx=v,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++,this.current.activeSMask=null}}},{key:"endGroup",value:function(e){if(this.contentVisible){this.groupLevel--;var t=this.ctx;this.ctx=this.groupStack.pop(),void 0!==this.ctx.imageSmoothingEnabled?this.ctx.imageSmoothingEnabled=!1:this.ctx.mozImageSmoothingEnabled=!1,e.smask?this.tempSMask=this.smaskStack.pop():this.ctx.drawImage(t.canvas,0,0),this.restore()}}},{key:"beginAnnotations",value:function(){this.save(),this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)}},{key:"endAnnotations",value:function(){this.restore()}},{key:"beginAnnotation",value:function(e,t,r){if(this.save(),l(this.ctx),this.current=new g,Array.isArray(e)&&4===e.length){var n=e[2]-e[0],a=e[3]-e[1];this.ctx.rect(e[0],e[1],n,a),this.clip(),this.endPath()}this.transform.apply(this,t),this.transform.apply(this,r)}},{key:"endAnnotation",value:function(){this.restore()}},{key:"paintImageMaskXObject",value:function(e){if(this.contentVisible){var r=this.ctx,n=e.width,a=e.height,i=this.current.fillColor,o=this.current.patternFill,s=this.processingType3;if(s&&void 0===s.compiled&&(s.compiled=n<=1e3&&a<=1e3?function(e){var t,r,n,a,i=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),o=e.width,s=e.height,l=o+1,u=new Uint8Array(l*(s+1)),c=o+7&-8,f=e.data,d=new Uint8Array(c*s),h=0;for(t=0,r=f.length;t<r;t++)for(var p=f[t],v=128;v>0;)d[h++]=p&v?0:255,v>>=1;var y=0;for(0!==d[h=0]&&(u[0]=1,++y),n=1;n<o;n++)d[h]!==d[h+1]&&(u[n]=d[h]?2:1,++y),h++;for(0!==d[h]&&(u[n]=2,++y),t=1;t<s;t++){a=t*l,d[(h=t*c)-c]!==d[h]&&(u[a]=d[h]?1:8,++y);var g=(d[h]?4:0)+(d[h-c]?8:0);for(n=1;n<o;n++)i[g=(g>>2)+(d[h+1]?4:0)+(d[h-c+1]?8:0)]&&(u[a+n]=i[g],++y),h++;if(d[h-c]!==d[h]&&(u[a+n]=d[h]?2:4,++y),y>1e3)return null}for(a=t*l,0!==d[h=c*(s-1)]&&(u[a]=8,++y),n=1;n<o;n++)d[h]!==d[h+1]&&(u[a+n]=d[h]?4:8,++y),h++;if(0!==d[h]&&(u[a+n]=4,++y),y>1e3)return null;var m=new Int32Array([0,l,-1,0,-l,0,0,0,1]),b=[];for(t=0;y&&t<=s;t++){for(var _=t*l,A=_+o;_<A&&!u[_];)_++;if(_!==A){var S=[_%l,t],k=_,w=u[_];do{var x=m[w];do{_+=x}while(!u[_]);var C=u[_];5!==C&&10!==C?(w=C,u[_]=0):(w=C&51*w>>4,u[_]&=w>>2|w<<2),S.push(_%l,_/l|0),u[_]||--y}while(k!==_);b.push(S),--t}}return function(e){e.save(),e.scale(1/o,-1/s),e.translate(0,-s),e.beginPath();for(var t=0,r=b.length;t<r;t++){var n=b[t];e.moveTo(n[0],n[1]);for(var a=2,i=n.length;a<i;a+=2)e.lineTo(n[a],n[a+1])}e.fill(),e.beginPath(),e.restore()}}({data:e.data,width:n,height:a}):null),null!=s&&s.compiled)s.compiled(r);else{var l=this.cachedCanvases.getCanvas("maskCanvas",n,a),u=l.context;u.save(),t(u,e),u.globalCompositeOperation="source-in",u.fillStyle=o?i.getPattern(u,this):i,u.fillRect(0,0,n,a),u.restore(),this.paintInlineImageXObject(l.canvas)}}}},{key:"paintImageMaskXObjectRepeat",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0;if(this.contentVisible){var s=e.width,l=e.height,u=this.current.fillColor,c=this.current.patternFill,f=this.cachedCanvases.getCanvas("maskCanvas",s,l),d=f.context;d.save(),t(d,e),d.globalCompositeOperation="source-in",d.fillStyle=c?u.getPattern(d,this):u,d.fillRect(0,0,s,l),d.restore();for(var h=this.ctx,p=0,v=o.length;p<v;p+=2)h.save(),h.transform(r,n,a,i,o[p],o[p+1]),h.scale(1,-1),h.drawImage(f.canvas,0,0,s,l,0,-1,1,1),h.restore()}}},{key:"paintImageMaskXObjectGroup",value:function(e){if(this.contentVisible)for(var r=this.ctx,n=this.current.fillColor,a=this.current.patternFill,i=0,o=e.length;i<o;i++){var s=e[i],l=s.width,u=s.height,c=this.cachedCanvases.getCanvas("maskCanvas",l,u),f=c.context;f.save(),t(f,s),f.globalCompositeOperation="source-in",f.fillStyle=a?n.getPattern(f,this):n,f.fillRect(0,0,l,u),f.restore(),r.save(),r.transform.apply(r,s.transform),r.scale(1,-1),r.drawImage(c.canvas,0,0,l,u,0,-1,1,1),r.restore()}}},{key:"paintImageXObject",value:function(e){if(this.contentVisible){var t=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);t?this.paintInlineImageXObject(t):(0,n.warn)("Dependent image isn't ready yet")}}},{key:"paintImageXObjectRepeat",value:function(e,t,r,a){if(this.contentVisible){var i=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);if(i){for(var o=i.width,s=i.height,l=[],u=0,c=a.length;u<c;u+=2)l.push({transform:[t,0,0,r,a[u],a[u+1]],x:0,y:0,w:o,h:s});this.paintInlineImageXObjectGroup(i,l)}else(0,n.warn)("Dependent image isn't ready yet")}}},{key:"paintInlineImageXObject",value:function(t){if(this.contentVisible){var r=t.width,n=t.height,a=this.ctx;this.save(),a.scale(1/r,-1/n);var i,o,s,l=a.mozCurrentTransformInverse,u=Math.max(Math.hypot(l[0],l[1]),1),c=Math.max(Math.hypot(l[2],l[3]),1);"function"==typeof HTMLElement&&t instanceof HTMLElement||!t.data?i=t:(e(s=(o=this.cachedCanvases.getCanvas("inlineImage",r,n)).context,t,this.current.transferMaps),i=o.canvas);for(var f=r,d=n,h="prescale1";u>2&&f>1||c>2&&d>1;){var p=f,v=d;u>2&&f>1&&(u/=f/(p=Math.ceil(f/2))),c>2&&d>1&&(c/=d/(v=Math.ceil(d/2))),(s=(o=this.cachedCanvases.getCanvas(h,p,v)).context).clearRect(0,0,p,v),s.drawImage(i,0,0,f,d,0,0,p,v),i=o.canvas,f=p,d=v,h="prescale1"===h?"prescale2":"prescale1"}if(a.drawImage(i,0,0,f,d,0,-n,r,n),this.imageLayer){var y=this.getCanvasPosition(0,-n);this.imageLayer.appendImage({imgData:t,left:y[0],top:y[1],width:r/l[0],height:n/l[3]})}this.restore()}}},{key:"paintInlineImageXObjectGroup",value:function(t,r){if(this.contentVisible){var n=this.ctx,a=t.width,i=t.height,o=this.cachedCanvases.getCanvas("inlineImage",a,i);e(o.context,t,this.current.transferMaps);for(var s=0,l=r.length;s<l;s++){var u=r[s];if(n.save(),n.transform.apply(n,u.transform),n.scale(1,-1),n.drawImage(o.canvas,u.x,u.y,u.w,u.h,0,-1,1,1),this.imageLayer){var c=this.getCanvasPosition(u.x,u.y);this.imageLayer.appendImage({imgData:t,left:c[0],top:c[1],width:a,height:i})}n.restore()}}}},{key:"paintSolidColorImageMask",value:function(){this.contentVisible&&this.ctx.fillRect(0,0,1,1)}},{key:"markPoint",value:function(e){}},{key:"markPointProps",value:function(e,t){}},{key:"beginMarkedContent",value:function(e){this.markedContentStack.push({visible:!0})}},{key:"beginMarkedContentProps",value:function(e,t){"OC"===e?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(t)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}},{key:"endMarkedContent",value:function(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}},{key:"beginCompat",value:function(){}},{key:"endCompat",value:function(){}},{key:"consumePath",value:function(){var e=this.ctx;this.pendingClip&&(this.pendingClip===A?e.clip("evenodd"):e.clip(),this.pendingClip=null),e.beginPath()}},{key:"getSinglePixelWidth",value:function(){if(null===this._cachedGetSinglePixelWidth){var e=this.ctx.mozCurrentTransform,t=Math.abs(e[0]*e[3]-e[2]*e[1]),r=Math.pow(e[0],2)+Math.pow(e[2],2),n=Math.pow(e[1],2)+Math.pow(e[3],2),a=Math.sqrt(Math.max(r,n))/t;r!==n&&this._combinedScaleFactor*a>1?this._cachedGetSinglePixelWidth=-this._combinedScaleFactor*a:t>Number.EPSILON?this._cachedGetSinglePixelWidth=a:this._cachedGetSinglePixelWidth=1}return this._cachedGetSinglePixelWidth}},{key:"getCanvasPosition",value:function(e,t){var r=this.ctx.mozCurrentTransform;return[r[0]*e+r[2]*t+r[4],r[1]*e+r[3]*t+r[5]]}},{key:"isContentVisible",value:function(){for(var e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}}]),c}();for(var k in n.OPS)S.prototype[n.OPS[k]]=S.prototype[k];return S}();t.CanvasGraphics=m},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getShadingPattern=function(e){switch(e[0]){case"RadialAxial":return new m(e);case"Mesh":return new A(e);case"Dummy":return new S}throw new Error("Unknown IR type: ".concat(e[0]))},t.TilingPattern=void 0;var a,i=r(4);function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=f(e);if(t){var i=f(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),e}function v(e){return"undefined"!=typeof DOMMatrix?new DOMMatrix(e):(a||(a=document.createElementNS("http://www.w3.org/2000/svg","svg")),a.createSVGMatrix(e))}function y(e,t){if(t&&"undefined"!=typeof Path2D){var r=t[2]-t[0],n=t[3]-t[1],a=new Path2D;a.rect(t[0],t[1],r,n),e.clip(a)}}var g=function(){function e(){d(this,e),this.constructor===e&&(0,i.unreachable)("Cannot initialize BaseShadingPattern.")}return p(e,[{key:"getPattern",value:function(){(0,i.unreachable)("Abstract method `getPattern` called.")}}]),e}(),m=function(e){l(r,g);var t=c(r);function r(e){var n;return d(this,r),(n=t.call(this))._type=e[1],n._bbox=e[2],n._colorStops=e[3],n._p0=e[4],n._p1=e[5],n._r0=e[6],n._r1=e[7],n._matrix=e[8],n}return p(r,[{key:"getPattern",value:function(e,t,r){var n,a=t.cachedCanvases.getCanvas("pattern",e.canvas.width,e.canvas.height,!0),i=a.context;i.clearRect(0,0,i.canvas.width,i.canvas.height),i.beginPath(),i.rect(0,0,i.canvas.width,i.canvas.height),r?i.setTransform.apply(i,e.mozCurrentTransform):(i.setTransform.apply(i,t.baseTransform),this._matrix&&i.transform.apply(i,this._matrix)),y(i,this._bbox),"axial"===this._type?n=i.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(n=i.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));var s,l=o(this._colorStops);try{for(l.s();!(s=l.n()).done;){var u=s.value;n.addColorStop(u[0],u[1])}}catch(e){l.e(e)}finally{l.f()}i.fillStyle=n,i.fill();var c=e.createPattern(a.canvas,"repeat");return c.setTransform(v(e.mozCurrentTransformInverse)),c}}]),r}();function b(e,t,r,n,a,i,o,s){var l,u=t.coords,c=t.colors,f=e.data,d=4*e.width;u[r+1]>u[n+1]&&(l=r,r=n,n=l,l=i,i=o,o=l),u[n+1]>u[a+1]&&(l=n,n=a,a=l,l=o,o=s,s=l),u[r+1]>u[n+1]&&(l=r,r=n,n=l,l=i,i=o,o=l);var h=(u[r]+t.offsetX)*t.scaleX,p=(u[r+1]+t.offsetY)*t.scaleY,v=(u[n]+t.offsetX)*t.scaleX,y=(u[n+1]+t.offsetY)*t.scaleY,g=(u[a]+t.offsetX)*t.scaleX,m=(u[a+1]+t.offsetY)*t.scaleY;if(!(p>=m))for(var b,_,A,S,k,w,x,C,P=c[i],T=c[i+1],R=c[i+2],E=c[o],O=c[o+1],F=c[o+2],I=c[s],M=c[s+1],L=c[s+2],j=Math.round(p),D=Math.round(m),N=j;N<=D;N++){if(N<y){var q=void 0;b=h-(h-v)*(q=N<p?0:p===y?1:(p-N)/(p-y)),_=P-(P-E)*q,A=T-(T-O)*q,S=R-(R-F)*q}else{var W=void 0;b=v-(v-g)*(W=N>m?1:y===m?0:(y-N)/(y-m)),_=E-(E-I)*W,A=O-(O-M)*W,S=F-(F-L)*W}var U=void 0;k=h-(h-g)*(U=N<p?0:N>m?1:(p-N)/(p-m)),w=P-(P-I)*U,x=T-(T-M)*U,C=R-(R-L)*U;for(var B=Math.round(Math.min(b,k)),G=Math.round(Math.max(b,k)),z=d*N+4*B,H=B;H<=G;H++)(U=(b-H)/(b-k))<0?U=0:U>1&&(U=1),f[z++]=_-(_-w)*U|0,f[z++]=A-(A-x)*U|0,f[z++]=S-(S-C)*U|0,f[z++]=255}}function _(e,t,r){var n,a,i=t.coords,o=t.colors;switch(t.type){case"lattice":var s=t.verticesPerRow,l=Math.floor(i.length/s)-1,u=s-1;for(n=0;n<l;n++)for(var c=n*s,f=0;f<u;f++,c++)b(e,r,i[c],i[c+1],i[c+s],o[c],o[c+1],o[c+s]),b(e,r,i[c+s+1],i[c+1],i[c+s],o[c+s+1],o[c+1],o[c+s]);break;case"triangles":for(n=0,a=i.length;n<a;n+=3)b(e,r,i[n],i[n+1],i[n+2],o[n],o[n+1],o[n+2]);break;default:throw new Error("illegal figure")}}var A=function(e){l(r,g);var t=c(r);function r(e){var n;return d(this,r),(n=t.call(this))._coords=e[2],n._colors=e[3],n._figures=e[4],n._bounds=e[5],n._matrix=e[6],n._bbox=e[7],n._background=e[8],n}return p(r,[{key:"_createMeshCanvas",value:function(e,t,r){var n=Math.floor(this._bounds[0]),a=Math.floor(this._bounds[1]),i=Math.ceil(this._bounds[2])-n,s=Math.ceil(this._bounds[3])-a,l=Math.min(Math.ceil(Math.abs(i*e[0]*1.1)),3e3),u=Math.min(Math.ceil(Math.abs(s*e[1]*1.1)),3e3),c=i/l,f=s/u,d={coords:this._coords,colors:this._colors,offsetX:-n,offsetY:-a,scaleX:1/c,scaleY:1/f},h=l+4,p=u+4,v=r.getCanvas("mesh",h,p,!1),y=v.context,g=y.createImageData(l,u);if(t)for(var m=g.data,b=0,A=m.length;b<A;b+=4)m[b]=t[0],m[b+1]=t[1],m[b+2]=t[2],m[b+3]=255;var S,k=o(this._figures);try{for(k.s();!(S=k.n()).done;){_(g,S.value,d)}}catch(e){k.e(e)}finally{k.f()}return y.putImageData(g,2,2),{canvas:v.canvas,offsetX:n-2*c,offsetY:a-2*f,scaleX:c,scaleY:f}}},{key:"getPattern",value:function(e,t,r){var n;if(y(e,this._bbox),r)n=i.Util.singularValueDecompose2dScale(e.mozCurrentTransform);else if(n=i.Util.singularValueDecompose2dScale(t.baseTransform),this._matrix){var a=i.Util.singularValueDecompose2dScale(this._matrix);n=[n[0]*a[0],n[1]*a[1]]}var o=this._createMeshCanvas(n,r?null:this._background,t.cachedCanvases);return r||(e.setTransform.apply(e,t.baseTransform),this._matrix&&e.transform.apply(e,this._matrix)),e.translate(o.offsetX,o.offsetY),e.scale(o.scaleX,o.scaleY),e.createPattern(o.canvas,"no-repeat")}}]),r}(),S=function(e){l(r,g);var t=c(r);function r(){return d(this,r),t.apply(this,arguments)}return p(r,[{key:"getPattern",value:function(){return"hotpink"}}]),r}();var k=1,w=2,x=function(){function e(t,r,n,a,i){d(this,e),this.operatorList=t[2],this.matrix=t[3]||[1,0,0,1,0,0],this.bbox=t[4],this.xstep=t[5],this.ystep=t[6],this.paintType=t[7],this.tilingType=t[8],this.color=r,this.ctx=n,this.canvasGraphicsFactory=a,this.baseTransform=i}return p(e,[{key:"createPatternCanvas",value:function(e){var t=this.operatorList,r=this.bbox,n=this.xstep,a=this.ystep,o=this.paintType,s=this.tilingType,l=this.color,u=this.canvasGraphicsFactory;(0,i.info)("TilingType: "+s);var c=r[0],f=r[1],d=r[2],h=r[3],p=i.Util.singularValueDecompose2dScale(this.matrix),v=i.Util.singularValueDecompose2dScale(this.baseTransform),y=[p[0]*v[0],p[1]*v[1]],g=this.getSizeAndScale(n,this.ctx.canvas.width,y[0]),m=this.getSizeAndScale(a,this.ctx.canvas.height,y[1]),b=e.cachedCanvases.getCanvas("pattern",g.size,m.size,!0),_=b.context,A=u.createCanvasGraphics(_);return A.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(A,o,l),A.transform(g.scale,0,0,m.scale,0,0),this.clipBbox(A,r,c,f,d,h),A.baseTransform=A.ctx.mozCurrentTransform.slice(),A.executeOperatorList(t),A.endDrawing(),{canvas:b.canvas,scaleX:g.scale,scaleY:m.scale}}},{key:"getSizeAndScale",value:function(t,r,n){t=Math.abs(t);var a=Math.max(e.MAX_PATTERN_SIZE,r),i=Math.ceil(t*n);return i>=a?i=a:n=i/t,{scale:n,size:i}}},{key:"clipBbox",value:function(e,t,r,n,a,i){if(Array.isArray(t)&&4===t.length){var o=a-r,s=i-n;e.ctx.rect(r,n,o,s),e.clip(),e.endPath()}}},{key:"setFillAndStrokeStyleToContext",value:function(e,t,r){var n=e.ctx,a=e.current;switch(t){case k:var o=this.ctx;n.fillStyle=o.fillStyle,n.strokeStyle=o.strokeStyle,a.fillColor=o.fillStyle,a.strokeColor=o.strokeStyle;break;case w:var s=i.Util.makeHexColor(r[0],r[1],r[2]);n.fillStyle=s,n.strokeStyle=s,a.fillColor=s,a.strokeColor=s;break;default:throw new i.FormatError("Unsupported paint type: ".concat(t))}}},{key:"getPattern",value:function(e,t,r){var n=(e=this.ctx).mozCurrentTransformInverse;r||(n=i.Util.transform(n,t.baseTransform),this.matrix&&(n=i.Util.transform(n,this.matrix)));var a=this.createPatternCanvas(t),o=v(n);o=o.scale(1/a.scaleX,1/a.scaleY);var s=e.createPattern(a.canvas,"repeat");return s.setTransform(o),s}}],[{key:"MAX_PATTERN_SIZE",get:function(){return(0,i.shadow)(this,"MAX_PATTERN_SIZE",3e3)}}]),e}();t.TilingPattern=x},(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;var r=Object.create(null);t.GlobalWorkerOptions=r,r.workerPort=void 0===r.workerPort?null:r.workerPort,r.workerSrc=void 0===r.workerSrc?"":r.workerSrc},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),a=r(4);function i(e,t,r,n,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var l={UNKNOWN:0,DATA:1,ERROR:2},u=1,c=2,f=3,d=4,h=5,p=6,v=7,y=8;function g(e){if("object"!==s(e)||null===e)return e;switch(e.name){case"AbortException":return new a.AbortException(e.message);case"MissingPDFException":return new a.MissingPDFException(e.message);case"UnexpectedResponseException":return new a.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new a.UnknownErrorException(e.message,e.details);default:return new a.UnknownErrorException(e.message,e.toString())}}var m=function(){function e(t,r,n){var a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourceName=t,this.targetName=r,this.comObj=n,this.callbackId=1,this.streamId=1,this.postMessageTransfers=!0,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=function(e){var t=e.data;if(t.targetName===a.sourceName)if(t.stream)a._processStreamMessage(t);else if(t.callback){var r=t.callbackId,i=a.callbackCapabilities[r];if(!i)throw new Error("Cannot resolve callback ".concat(r));if(delete a.callbackCapabilities[r],t.callback===l.DATA)i.resolve(t.data);else{if(t.callback!==l.ERROR)throw new Error("Unexpected callback case");i.reject(g(t.reason))}}else{var o=a.actionHandler[t.action];if(!o)throw new Error("Unknown action from worker: ".concat(t.action));if(t.callbackId){var s=a.sourceName,u=t.sourceName;new Promise(function(e){e(o(t.data))}).then(function(e){n.postMessage({sourceName:s,targetName:u,callback:l.DATA,callbackId:t.callbackId,data:e})},function(e){n.postMessage({sourceName:s,targetName:u,callback:l.ERROR,callbackId:t.callbackId,reason:g(e)})})}else t.streamId?a._createStreamSink(t):o(t.data)}},n.addEventListener("message",this._onComObjOnMessage)}var t,r,s;return t=e,(r=[{key:"on",value:function(e,t){var r=this.actionHandler;if(r[e])throw new Error('There is already an actionName called "'.concat(e,'"'));r[e]=t}},{key:"send",value:function(e,t,r){this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},r)}},{key:"sendWithPromise",value:function(e,t,r){var n=this.callbackId++,i=(0,a.createPromiseCapability)();this.callbackCapabilities[n]=i;try{this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:n,data:t},r)}catch(e){i.reject(e)}return i.promise}},{key:"sendWithStream",value:function(e,t,r,n){var i=this,o=this.streamId++,s=this.sourceName,l=this.targetName,c=this.comObj;return new ReadableStream({start:function(r){var u=(0,a.createPromiseCapability)();return i.streamControllers[o]={controller:r,startCall:u,pullCall:null,cancelCall:null,isClosed:!1},i._postMessage({sourceName:s,targetName:l,action:e,streamId:o,data:t,desiredSize:r.desiredSize},n),u.promise},pull:function(e){var t=(0,a.createPromiseCapability)();return i.streamControllers[o].pullCall=t,c.postMessage({sourceName:s,targetName:l,stream:p,streamId:o,desiredSize:e.desiredSize}),t.promise},cancel:function(e){(0,a.assert)(e instanceof Error,"cancel must have a valid reason");var t=(0,a.createPromiseCapability)();return i.streamControllers[o].cancelCall=t,i.streamControllers[o].isClosed=!0,c.postMessage({sourceName:s,targetName:l,stream:u,streamId:o,reason:g(e)}),t.promise}},r)}},{key:"_createStreamSink",value:function(e){var t=this,r=this.actionHandler[e.action],n=e.streamId,i=this.sourceName,o=e.sourceName,s=this.comObj,l={enqueue:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,s=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var l=this.desiredSize;this.desiredSize-=r,l>0&&this.desiredSize<=0&&(this.sinkCapability=(0,a.createPromiseCapability)(),this.ready=this.sinkCapability.promise),t._postMessage({sourceName:i,targetName:o,stream:d,streamId:n,chunk:e},s)}},close:function(){this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:i,targetName:o,stream:f,streamId:n}),delete t.streamSinks[n])},error:function(e){(0,a.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:i,targetName:o,stream:h,streamId:n,reason:g(e)}))},sinkCapability:(0,a.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};l.sinkCapability.resolve(),l.ready=l.sinkCapability.promise,this.streamSinks[n]=l,new Promise(function(t){t(r(e.data,l))}).then(function(){s.postMessage({sourceName:i,targetName:o,stream:y,streamId:n,success:!0})},function(e){s.postMessage({sourceName:i,targetName:o,stream:y,streamId:n,reason:g(e)})})}},{key:"_processStreamMessage",value:function(e){var t=e.streamId,r=this.sourceName,n=e.sourceName,i=this.comObj;switch(e.stream){case y:e.success?this.streamControllers[t].startCall.resolve():this.streamControllers[t].startCall.reject(g(e.reason));break;case v:e.success?this.streamControllers[t].pullCall.resolve():this.streamControllers[t].pullCall.reject(g(e.reason));break;case p:if(!this.streamSinks[t]){i.postMessage({sourceName:r,targetName:n,stream:v,streamId:t,success:!0});break}this.streamSinks[t].desiredSize<=0&&e.desiredSize>0&&this.streamSinks[t].sinkCapability.resolve(),this.streamSinks[t].desiredSize=e.desiredSize;var o=this.streamSinks[e.streamId].onPull;new Promise(function(e){e(o&&o())}).then(function(){i.postMessage({sourceName:r,targetName:n,stream:v,streamId:t,success:!0})},function(e){i.postMessage({sourceName:r,targetName:n,stream:v,streamId:t,reason:g(e)})});break;case d:if((0,a.assert)(this.streamControllers[t],"enqueue should have stream controller"),this.streamControllers[t].isClosed)break;this.streamControllers[t].controller.enqueue(e.chunk);break;case f:if((0,a.assert)(this.streamControllers[t],"close should have stream controller"),this.streamControllers[t].isClosed)break;this.streamControllers[t].isClosed=!0,this.streamControllers[t].controller.close(),this._deleteStreamController(t);break;case h:(0,a.assert)(this.streamControllers[t],"error should have stream controller"),this.streamControllers[t].controller.error(g(e.reason)),this._deleteStreamController(t);break;case c:e.success?this.streamControllers[t].cancelCall.resolve():this.streamControllers[t].cancelCall.reject(g(e.reason)),this._deleteStreamController(t);break;case u:if(!this.streamSinks[t])break;var s=this.streamSinks[e.streamId].onCancel;new Promise(function(t){t(s&&s(g(e.reason)))}).then(function(){i.postMessage({sourceName:r,targetName:n,stream:c,streamId:t,success:!0})},function(e){i.postMessage({sourceName:r,targetName:n,stream:c,streamId:t,reason:g(e)})}),this.streamSinks[t].sinkCapability.reject(g(e.reason)),this.streamSinks[t].isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}},{key:"_deleteStreamController",value:function(){var e,t=(e=n.default.mark(function e(t){return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.allSettled([this.streamControllers[t].startCall,this.streamControllers[t].pullCall,this.streamControllers[t].cancelCall].map(function(e){return e&&e.promise}));case 2:delete this.streamControllers[t];case 3:case"end":return e.stop()}},e,this)}),function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,l,"next",e)}function l(e){i(o,n,a,s,l,"throw",e)}s(void 0)})});return function(e){return t.apply(this,arguments)}}()},{key:"_postMessage",value:function(e,t){t&&this.postMessageTransfers?this.comObj.postMessage(e,t):this.comObj.postMessage(e)}},{key:"destroy",value:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}])&&o(t.prototype,r),s&&o(t,s),e}();t.MessageHandler=m},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var n=r(4);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var i=function(){function e(t){var r=t.parsedData,n=t.rawData;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._metadataMap=r,this._data=n}var t,r,i;return t=e,(r=[{key:"getRaw",value:function(){return this._data}},{key:"get",value:function(e){var t;return null!==(t=this._metadataMap.get(e))&&void 0!==t?t:null}},{key:"getAll",value:function(){return(0,n.objectFromMap)(this._metadataMap)}},{key:"has",value:function(e){return this._metadataMap.has(e)}}])&&a(t.prototype,r),i&&a(t,i),e}();t.Metadata=i},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalContentConfig=void 0;var n=r(4);function a(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw o}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var l=function e(t,r){s(this,e),this.visible=!0,this.name=t,this.intent=r},u=function(){function e(t){if(s(this,e),this.name=null,this.creator=null,this._order=null,this._groups=new Map,null!==t){this.name=t.name,this.creator=t.creator,this._order=t.order;var r,n=a(t.groups);try{for(n.s();!(r=n.n()).done;){var i=r.value;this._groups.set(i.id,new l(i.name,i.intent))}}catch(e){n.e(e)}finally{n.f()}if("OFF"===t.baseState){var o,u=a(this._groups);try{for(u.s();!(o=u.n()).done;){o.value.visible=!1}}catch(e){u.e(e)}finally{u.f()}}var c,f=a(t.on);try{for(f.s();!(c=f.n()).done;){var d=c.value;this._groups.get(d).visible=!0}}catch(e){f.e(e)}finally{f.f()}var h,p=a(t.off);try{for(p.s();!(h=p.n()).done;){var v=h.value;this._groups.get(v).visible=!1}}catch(e){p.e(e)}finally{p.f()}}}var t,r,i;return t=e,(r=[{key:"_evaluateVisibilityExpression",value:function(e){var t=e.length;if(t<2)return!0;for(var r=e[0],a=1;a<t;a++){var i=e[a],o=void 0;if(Array.isArray(i))o=this._evaluateVisibilityExpression(i);else{if(!this._groups.has(i))return(0,n.warn)("Optional content group not found: ".concat(i)),!0;o=this._groups.get(i).visible}switch(r){case"And":if(!o)return!1;break;case"Or":if(o)return!0;break;case"Not":return!o;default:return!0}}return"And"===r}},{key:"isVisible",value:function(e){if("OCG"===e.type)return this._groups.has(e.id)?this._groups.get(e.id).visible:((0,n.warn)("Optional content group not found: ".concat(e.id)),!0);if("OCMD"===e.type){if(e.expression)return this._evaluateVisibilityExpression(e.expression);if(!e.policy||"AnyOn"===e.policy){var t,r=a(e.ids);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(!this._groups.has(i))return(0,n.warn)("Optional content group not found: ".concat(i)),!0;if(this._groups.get(i).visible)return!0}}catch(e){r.e(e)}finally{r.f()}return!1}if("AllOn"===e.policy){var o,s=a(e.ids);try{for(s.s();!(o=s.n()).done;){var l=o.value;if(!this._groups.has(l))return(0,n.warn)("Optional content group not found: ".concat(l)),!0;if(!this._groups.get(l).visible)return!1}}catch(e){s.e(e)}finally{s.f()}return!0}if("AnyOff"===e.policy){var u,c=a(e.ids);try{for(c.s();!(u=c.n()).done;){var f=u.value;if(!this._groups.has(f))return(0,n.warn)("Optional content group not found: ".concat(f)),!0;if(!this._groups.get(f).visible)return!0}}catch(e){c.e(e)}finally{c.f()}return!1}if("AllOff"===e.policy){var d,h=a(e.ids);try{for(h.s();!(d=h.n()).done;){var p=d.value;if(!this._groups.has(p))return(0,n.warn)("Optional content group not found: ".concat(p)),!0;if(this._groups.get(p).visible)return!1}}catch(e){h.e(e)}finally{h.f()}return!0}return(0,n.warn)("Unknown optional content policy ".concat(e.policy,".")),!0}return(0,n.warn)("Unknown group type ".concat(e.type,".")),!0}},{key:"setVisibility",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._groups.has(e)?this._groups.get(e).visible=!!t:(0,n.warn)("Optional content group not found: ".concat(e))}},{key:"getOrder",value:function(){return this._groups.size?this._order?this._order.slice():Array.from(this._groups.keys()):null}},{key:"getGroups",value:function(){return this._groups.size>0?(0,n.objectFromMap)(this._groups):null}},{key:"getGroup",value:function(e){return this._groups.get(e)||null}}])&&o(t.prototype,r),i&&o(t,i),e}();t.OptionalContentConfig=u},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),a=r(4),i=r(1);function o(e,t,r,n,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function s(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function s(e){o(i,n,a,s,l,"next",e)}function l(e){o(i,n,a,s,l,"throw",e)}s(void 0)})}}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),e}var h=function(){function e(t,r){var n=this;c(this,e),(0,a.assert)(r,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=t.progressiveDone||!1,this._contentDispositionFilename=t.contentDispositionFilename||null;var i=t.initialData;if((null==i?void 0:i.length)>0){var o=new Uint8Array(i).buffer;this._queuedChunks.push(o)}this._pdfDataRangeTransport=r,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._contentLength=t.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener(function(e,t){n._onReceiveData({begin:e,chunk:t})}),this._pdfDataRangeTransport.addProgressListener(function(e,t){n._onProgress({loaded:e,total:t})}),this._pdfDataRangeTransport.addProgressiveReadListener(function(e){n._onReceiveData({chunk:e})}),this._pdfDataRangeTransport.addProgressiveDoneListener(function(){n._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}return d(e,[{key:"_onReceiveData",value:function(e){var t=new Uint8Array(e.chunk).buffer;if(void 0===e.begin)this._fullRequestReader?this._fullRequestReader._enqueue(t):this._queuedChunks.push(t);else{var r=this._rangeReaders.some(function(r){return r._begin===e.begin&&(r._enqueue(t),!0)});(0,a.assert)(r,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}},{key:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"_onProgress",value:function(e){if(void 0===e.total){var t=this._rangeReaders[0];null!=t&&t.onProgress&&t.onProgress({loaded:e.loaded})}else{var r=this._fullRequestReader;null!=r&&r.onProgress&&r.onProgress({loaded:e.loaded,total:e.total})}}},{key:"_onProgressiveDone",value:function(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}},{key:"_removeRangeReader",value:function(e){var t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}},{key:"getFullReader",value:function(){(0,a.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");var e=this._queuedChunks;return this._queuedChunks=null,new p(this,e,this._progressiveDone,this._contentDispositionFilename)}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=new v(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t,r=l(this._rangeReaders.slice(0));try{for(r.s();!(t=r.n()).done;){t.value.cancel(e)}}catch(e){r.e(e)}finally{r.f()}this._pdfDataRangeTransport.abort()}}]),e}();t.PDFDataTransportStream=h;var p=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;c(this,e),this._stream=t,this._done=n||!1,this._filename=(0,i.isPdfFile)(a)?a:null,this._queuedChunks=r||[],this._loaded=0;var o,s=l(this._queuedChunks);try{for(s.s();!(o=s.n()).done;){var u=o.value;this._loaded+=u.byteLength}}catch(e){s.e(e)}finally{s.f()}this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}return d(e,[{key:"_enqueue",value:function(e){if(!this._done){if(this._requests.length>0)this._requests.shift().resolve({value:e,done:!1});else this._queuedChunks.push(e);this._loaded+=e.byteLength}}},{key:"headersReady",get:function(){return this._headersReady}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._stream._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._stream._isStreamingSupported}},{key:"contentLength",get:function(){return this._stream._contentLength}},{key:"read",value:function(){var e=s(n.default.mark(function e(){var t,r;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this._queuedChunks.length>0)){e.next=3;break}return t=this._queuedChunks.shift(),e.abrupt("return",{value:t,done:!1});case 3:if(!this._done){e.next=5;break}return e.abrupt("return",{value:void 0,done:!0});case 5:return r=(0,a.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 8:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0;var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;){t.value.resolve({value:void 0,done:!0})}}catch(e){r.e(e)}finally{r.f()}this._requests.length=0}},{key:"progressiveDone",value:function(){this._done||(this._done=!0)}}]),e}(),v=function(){function e(t,r,n){c(this,e),this._stream=t,this._begin=r,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}return d(e,[{key:"_enqueue",value:function(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;){t.value.resolve({value:void 0,done:!0})}}catch(e){r.e(e)}finally{r.f()}this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:function(){var e=s(n.default.mark(function e(){var t,r;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._queuedChunk){e.next=4;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 4:if(!this._done){e.next=6;break}return e.abrupt("return",{value:void 0,done:!0});case 6:return r=(0,a.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 9:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0;var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;){t.value.resolve({value:void 0,done:!0})}}catch(e){r.e(e)}finally{r.f()}this._requests.length=0,this._stream._removeRangeReader(this)}}]),e}()},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayer=void 0;var a=r(1),i=r(4),o=r(116),s=r(126);function l(e,t,r){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(r):a.value}})(e,t,r||e)}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=p(e);if(t){var i=p(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return h(e)}(this,r)}}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=y(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function y(e,t){if(e){if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _(e,t,r){return t&&b(e.prototype,t),r&&b(e,r),e}var A=function(){function e(){m(this,e)}return _(e,null,[{key:"create",value:function(e){switch(e.data.annotationType){case i.AnnotationType.LINK:return new k(e);case i.AnnotationType.TEXT:return new w(e);case i.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new C(e);case"Btn":return e.data.radioButton?new T(e):e.data.checkBox?new P(e):new R(e);case"Ch":return new E(e)}return new x(e);case i.AnnotationType.POPUP:return new O(e);case i.AnnotationType.FREETEXT:return new I(e);case i.AnnotationType.LINE:return new M(e);case i.AnnotationType.SQUARE:return new L(e);case i.AnnotationType.CIRCLE:return new j(e);case i.AnnotationType.POLYLINE:return new D(e);case i.AnnotationType.CARET:return new q(e);case i.AnnotationType.INK:return new W(e);case i.AnnotationType.POLYGON:return new N(e);case i.AnnotationType.HIGHLIGHT:return new U(e);case i.AnnotationType.UNDERLINE:return new B(e);case i.AnnotationType.SQUIGGLY:return new G(e);case i.AnnotationType.STRIKEOUT:return new z(e);case i.AnnotationType.STAMP:return new H(e);case i.AnnotationType.FILEATTACHMENT:return new V(e);default:return new S(e)}}}]),e}(),S=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.isRenderable,a=void 0!==n&&n,i=r.ignoreBorder,o=void 0!==i&&i,s=r.createQuadrilaterals,l=void 0!==s&&s;m(this,e),this.isRenderable=a,this.data=t.data,this.layer=t.layer,this.page=t.page,this.viewport=t.viewport,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderInteractiveForms=t.renderInteractiveForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._mouseState=t.mouseState,a&&(this.container=this._createContainer(o)),l&&(this.quadrilaterals=this._createQuadrilaterals(o))}return _(e,[{key:"_createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.data,r=this.page,n=this.viewport,a=document.createElement("section"),o=t.rect[2]-t.rect[0],s=t.rect[3]-t.rect[1];a.setAttribute("data-annotation-id",t.id);var l=i.Util.normalizeRect([t.rect[0],r.view[3]-t.rect[1]+r.view[1],t.rect[2],r.view[3]-t.rect[3]+r.view[1]]);if(a.style.transform="matrix(".concat(n.transform.join(","),")"),a.style.transformOrigin="".concat(-l[0],"px ").concat(-l[1],"px"),!e&&t.borderStyle.width>0){a.style.borderWidth="".concat(t.borderStyle.width,"px"),t.borderStyle.style!==i.AnnotationBorderStyleType.UNDERLINE&&(o-=2*t.borderStyle.width,s-=2*t.borderStyle.width);var u=t.borderStyle.horizontalCornerRadius,c=t.borderStyle.verticalCornerRadius;if(u>0||c>0){var f="".concat(u,"px / ").concat(c,"px");a.style.borderRadius=f}switch(t.borderStyle.style){case i.AnnotationBorderStyleType.SOLID:a.style.borderStyle="solid";break;case i.AnnotationBorderStyleType.DASHED:a.style.borderStyle="dashed";break;case i.AnnotationBorderStyleType.BEVELED:(0,i.warn)("Unimplemented border style: beveled");break;case i.AnnotationBorderStyleType.INSET:(0,i.warn)("Unimplemented border style: inset");break;case i.AnnotationBorderStyleType.UNDERLINE:a.style.borderBottomStyle="solid"}t.color?a.style.borderColor=i.Util.makeHexColor(0|t.color[0],0|t.color[1],0|t.color[2]):a.style.borderWidth=0}return a.style.left="".concat(l[0],"px"),a.style.top="".concat(l[1],"px"),a.style.width="".concat(o,"px"),a.style.height="".concat(s,"px"),a}},{key:"_createQuadrilaterals",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.data.quadPoints)return null;var t,r=[],n=this.data.rect,a=v(this.data.quadPoints);try{for(a.s();!(t=a.n()).done;){var i=t.value;this.data.rect=[i[2].x,i[2].y,i[1].x,i[1].y],r.push(this._createContainer(e))}}catch(e){a.e(e)}finally{a.f()}return this.data.rect=n,r}},{key:"_createPopup",value:function(e,t){var r=this.container;this.quadrilaterals&&(e=e||this.quadrilaterals,r=this.quadrilaterals[0]),e||((e=document.createElement("div")).style.height=r.style.height,e.style.width=r.style.width,r.appendChild(e));var n=new F({container:r,trigger:e,color:t.color,title:t.title,modificationDate:t.modificationDate,contents:t.contents,hideWrapper:!0}).render();n.style.left=r.style.width,r.appendChild(n)}},{key:"_renderQuadrilaterals",value:function(e){var t,r=v(this.quadrilaterals);try{for(r.s();!(t=r.n()).done;){t.value.className=e}}catch(e){r.e(e)}finally{r.f()}return this.quadrilaterals}},{key:"render",value:function(){(0,i.unreachable)("Abstract method `AnnotationElement.render` called")}}]),e}(),k=function(e){c(r,S);var t=d(r);function r(e){m(this,r);var n=!!(e.data.url||e.data.dest||e.data.action||e.data.isTooltipOnly||e.data.actions&&(e.data.actions.Action||e.data.actions["Mouse Up"]||e.data.actions["Mouse Down"]));return t.call(this,e,{isRenderable:n,createQuadrilaterals:!0})}return _(r,[{key:"render",value:function(){var e=this.data,t=this.linkService,r=document.createElement("a");return e.url?(0,a.addLinkAttributes)(r,{url:e.url,target:e.newWindow?a.LinkTarget.BLANK:t.externalLinkTarget,rel:t.externalLinkRel,enabled:t.externalLinkEnabled}):e.action?this._bindNamedAction(r,e.action):e.dest?this._bindLink(r,e.dest):e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions?this._bindJSAction(r,e):this._bindLink(r,""),this.quadrilaterals?this._renderQuadrilaterals("linkAnnotation").map(function(e,t){var n=0===t?r:r.cloneNode();return e.appendChild(n),e}):(this.container.className="linkAnnotation",this.container.appendChild(r),this.container)}},{key:"_bindLink",value:function(e,t){var r=this;e.href=this.linkService.getDestinationHash(t),e.onclick=function(){return t&&r.linkService.goToDestination(t),!1},(t||""===t)&&(e.className="internalLink")}},{key:"_bindNamedAction",value:function(e,t){var r=this;e.href=this.linkService.getAnchorUrl(""),e.onclick=function(){return r.linkService.executeNamedAction(t),!1},e.className="internalLink"}},{key:"_bindJSAction",value:function(e,t){var r=this;e.href=this.linkService.getAnchorUrl("");for(var n=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]),a=function(){var a=o[i],s=n.get(a);if(!s)return"continue";e[s]=function(){var e;return null===(e=r.linkService.eventBus)||void 0===e||e.dispatch("dispatcheventinsandbox",{source:r,detail:{id:t.id,name:a}}),!1}},i=0,o=Object.keys(t.actions);i<o.length;i++)a();e.className="internalLink"}}]),r}(),w=function(e){c(r,S);var t=d(r);function r(e){m(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,{isRenderable:n})}return _(r,[{key:"render",value:function(){this.container.className="textAnnotation";var e=document.createElement("img");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.alt="[{{type}} Annotation]",e.dataset.l10nId="text_annotation_type",e.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(e,this.data),this.container.appendChild(e),this.container}}]),r}(),x=function(e){c(r,S);var t=d(r);function r(){return m(this,r),t.apply(this,arguments)}return _(r,[{key:"render",value:function(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}},{key:"_getKeyModifier",value:function(e){return navigator.platform.includes("Win")&&e.ctrlKey||navigator.platform.includes("Mac")&&e.metaKey}},{key:"_setEventListener",value:function(e,t,r,n){var a=this;t.includes("mouse")?e.addEventListener(t,function(e){var t;null===(t=a.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:a,detail:{id:a.data.id,name:r,value:n(e),shift:e.shiftKey,modifier:a._getKeyModifier(e)}})}):e.addEventListener(t,function(e){var t;null===(t=a.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:a,detail:{id:a.data.id,name:r,value:e.target.checked}})})}},{key:"_setEventListeners",value:function(e,t,r){var n,a=v(t);try{for(a.s();!(n=a.n()).done;){var i,o=u(n.value,2),s=o[0],l=o[1];("Action"===l||null!==(i=this.data.actions)&&void 0!==i&&i[l])&&this._setEventListener(e,s,l,r)}}catch(e){a.e(e)}finally{a.f()}}},{key:"_dispatchEventFromSandbox",value:function(e,t){for(var r=this,n=function(e,t,r){var n=r.detail[e];r.target.style[t]=s.ColorConverters["".concat(n[0],"_HTML")](n.slice(1))},a={display:function(e){var t=e.detail.display%2==1;e.target.style.visibility=t?"hidden":"visible",r.annotationStorage.setValue(r.data.id,{hidden:t,print:0===e.detail.display||3===e.detail.display})},print:function(e){r.annotationStorage.setValue(r.data.id,{print:e.detail.print})},hidden:function(e){e.target.style.visibility=e.detail.hidden?"hidden":"visible",r.annotationStorage.setValue(r.data.id,{hidden:e.detail.hidden})},focus:function(e){setTimeout(function(){return e.target.focus({preventScroll:!1})},0)},userName:function(e){e.target.title=e.detail.userName},readonly:function(e){e.detail.readonly?e.target.setAttribute("readonly",""):e.target.removeAttribute("readonly")},required:function(e){e.detail.required?e.target.setAttribute("required",""):e.target.removeAttribute("required")},bgColor:function(e){n("bgColor","backgroundColor",e)},fillColor:function(e){n("fillColor","backgroundColor",e)},fgColor:function(e){n("fgColor","color",e)},textColor:function(e){n("textColor","color",e)},borderColor:function(e){n("borderColor","borderColor",e)},strokeColor:function(e){n("strokeColor","borderColor",e)}},i=0,o=Object.keys(t.detail);i<o.length;i++){var l=o[i],u=e[l]||a[l];u&&u(t)}}}]),r}(),C=function(e){c(r,x);var t=d(r);function r(e){m(this,r);var n=e.renderInteractiveForms||!e.data.hasAppearance&&!!e.data.fieldValue;return t.call(this,e,{isRenderable:n})}return _(r,[{key:"setPropertyOnSiblings",value:function(e,t,r,n){var a,i=this.annotationStorage,o=v(document.getElementsByName(e.name));try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s!==e){s[t]=r;var l=Object.create(null);l[n]=r,i.setValue(s.getAttribute("id"),l)}}}catch(e){o.e(e)}finally{o.f()}}},{key:"render",value:function(){var e=this,t=this.annotationStorage,r=this.data.id;this.container.className="textWidgetAnnotation";var n=null;if(this.renderInteractiveForms){var a=t.getValue(r,{value:this.data.fieldValue,valueAsString:this.data.fieldValue}),i=a.valueAsString||a.value||"",o={userValue:null,formattedValue:null,beforeInputSelectionRange:null,beforeInputValue:null};this.data.multiLine?(n=document.createElement("textarea")).textContent=i:((n=document.createElement("input")).type="text",n.setAttribute("value",i)),o.userValue=i,n.setAttribute("id",r),n.addEventListener("input",function(a){t.setValue(r,{value:a.target.value}),e.setPropertyOnSiblings(n,"value",a.target.value,"value")});var s=function(e){o.formattedValue&&(e.target.value=o.formattedValue),e.target.scrollLeft=0,o.beforeInputSelectionRange=null};if(this.enableScripting&&this.hasJSActions){var l;n.addEventListener("focus",function(e){o.userValue&&(e.target.value=o.userValue)}),n.addEventListener("updatefromsandbox",function(n){var a={value:function(e){o.userValue=e.detail.value||"",t.setValue(r,{value:o.userValue.toString()}),o.formattedValue||(e.target.value=o.userValue)},valueAsString:function(e){o.formattedValue=e.detail.valueAsString||"",e.target!==document.activeElement&&(e.target.value=o.formattedValue),t.setValue(r,{formattedValue:o.formattedValue})},selRange:function(e){var t=u(e.detail.selRange,2),r=t[0],n=t[1];r>=0&&n<e.target.value.length&&e.target.setSelectionRange(r,n)}};e._dispatchEventFromSandbox(a,n)}),n.addEventListener("keydown",function(t){var n;o.beforeInputValue=t.target.value;var a=-1;"Escape"===t.key?a=0:"Enter"===t.key?a=2:"Tab"===t.key&&(a=3),-1!==a&&(o.userValue=t.target.value,null===(n=e.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:e,detail:{id:r,name:"Keystroke",value:t.target.value,willCommit:!0,commitKey:a,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}}))});var c=s;s=null,n.addEventListener("blur",function(t){var n;e._mouseState.isDown&&(o.userValue=t.target.value,null===(n=e.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:e,detail:{id:r,name:"Keystroke",value:t.target.value,willCommit:!0,commitKey:1,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}}));c(t)}),n.addEventListener("mousedown",function(e){o.beforeInputValue=e.target.value,o.beforeInputSelectionRange=null}),n.addEventListener("keyup",function(e){e.target.selectionStart===e.target.selectionEnd&&(o.beforeInputSelectionRange=null)}),n.addEventListener("select",function(e){o.beforeInputSelectionRange=[e.target.selectionStart,e.target.selectionEnd]}),null!==(l=this.data.actions)&&void 0!==l&&l.Keystroke&&n.addEventListener("input",function(t){var n,a=-1,i=-1;if(o.beforeInputSelectionRange){var s=u(o.beforeInputSelectionRange,2);a=s[0],i=s[1]}null===(n=e.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:e,detail:{id:r,name:"Keystroke",value:o.beforeInputValue,change:t.data,willCommit:!1,selStart:a,selEnd:i}})}),this._setEventListeners(n,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],function(e){return e.target.value})}if(s&&n.addEventListener("blur",s),n.disabled=this.data.readOnly,n.name=this.data.fieldName,null!==this.data.maxLen&&(n.maxLength=this.data.maxLen),this.data.comb){var f=(this.data.rect[2]-this.data.rect[0])/this.data.maxLen;n.classList.add("comb"),n.style.letterSpacing="calc(".concat(f,"px - 1ch)")}}else(n=document.createElement("div")).textContent=this.data.fieldValue,n.style.verticalAlign="middle",n.style.display="table-cell";return this._setTextStyle(n),this.container.appendChild(n),this.container}},{key:"_setTextStyle",value:function(e){var t=this.data.defaultAppearanceData,r=t.fontSize,n=t.fontColor,a=e.style;r&&(a.fontSize="".concat(r,"px")),a.color=i.Util.makeHexColor(n[0],n[1],n[2]),null!==this.data.textAlignment&&(a.textAlign=["left","center","right"][this.data.textAlignment])}}]),r}(),P=function(e){c(r,x);var t=d(r);function r(e){return m(this,r),t.call(this,e,{isRenderable:e.renderInteractiveForms})}return _(r,[{key:"render",value:function(){var e=this,t=this.annotationStorage,r=this.data,n=r.id,a=t.getValue(n,{value:r.fieldValue&&(r.exportValue&&r.exportValue===r.fieldValue||!r.exportValue&&"Off"!==r.fieldValue)}).value;"string"==typeof a&&(a="Off"!==a,t.setValue(n,{value:a})),this.container.className="buttonWidgetAnnotation checkBox";var i=document.createElement("input");return i.disabled=r.readOnly,i.type="checkbox",i.name=this.data.fieldName,a&&i.setAttribute("checked",!0),i.setAttribute("id",n),i.addEventListener("change",function(e){var r,a=e.target.name,i=v(document.getElementsByName(a));try{for(i.s();!(r=i.n()).done;){var o=r.value;o!==e.target&&(o.checked=!1,t.setValue(o.parentNode.getAttribute("data-annotation-id"),{value:!1}))}}catch(e){i.e(e)}finally{i.f()}t.setValue(n,{value:e.target.checked})}),this.enableScripting&&this.hasJSActions&&(i.addEventListener("updatefromsandbox",function(r){var a={value:function(e){e.target.checked="Off"!==e.detail.value,t.setValue(n,{value:e.target.checked})}};e._dispatchEventFromSandbox(a,r)}),this._setEventListeners(i,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],function(e){return e.target.checked})),this.container.appendChild(i),this.container}}]),r}(),T=function(e){c(r,x);var t=d(r);function r(e){return m(this,r),t.call(this,e,{isRenderable:e.renderInteractiveForms})}return _(r,[{key:"render",value:function(){var e=this;this.container.className="buttonWidgetAnnotation radioButton";var t=this.annotationStorage,r=this.data,n=r.id,a=t.getValue(n,{value:r.fieldValue===r.buttonValue}).value;"string"==typeof a&&(a=a!==r.buttonValue,t.setValue(n,{value:a}));var i=document.createElement("input");if(i.disabled=r.readOnly,i.type="radio",i.name=r.fieldName,a&&i.setAttribute("checked",!0),i.setAttribute("id",n),i.addEventListener("change",function(e){var r,a=e.target,i=v(document.getElementsByName(a.name));try{for(i.s();!(r=i.n()).done;){var o=r.value;o!==a&&t.setValue(o.getAttribute("id"),{value:!1})}}catch(e){i.e(e)}finally{i.f()}t.setValue(n,{value:a.checked})}),this.enableScripting&&this.hasJSActions){var o=r.buttonValue;i.addEventListener("updatefromsandbox",function(r){var a={value:function(e){var r,a=o===e.detail.value,i=v(document.getElementsByName(e.target.name));try{for(i.s();!(r=i.n()).done;){var s=r.value,l=s.getAttribute("id");s.checked=l===n&&a,t.setValue(l,{value:s.checked})}}catch(e){i.e(e)}finally{i.f()}}};e._dispatchEventFromSandbox(a,r)}),this._setEventListeners(i,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],function(e){return e.target.checked})}return this.container.appendChild(i),this.container}}]),r}(),R=function(e){c(r,k);var t=d(r);function r(){return m(this,r),t.apply(this,arguments)}return _(r,[{key:"render",value:function(){var e=l(p(r.prototype),"render",this).call(this);return e.className="buttonWidgetAnnotation pushButton",this.data.alternativeText&&(e.title=this.data.alternativeText),e}}]),r}(),E=function(e){c(r,x);var t=d(r);function r(e){return m(this,r),t.call(this,e,{isRenderable:e.renderInteractiveForms})}return _(r,[{key:"render",value:function(){var e=this;this.container.className="choiceWidgetAnnotation";var t=this.annotationStorage,r=this.data.id;t.getValue(r,{value:this.data.fieldValue.length>0?this.data.fieldValue[0]:void 0});var n=document.createElement("select");n.disabled=this.data.readOnly,n.name=this.data.fieldName,n.setAttribute("id",r),this.data.combo||(n.size=this.data.options.length,this.data.multiSelect&&(n.multiple=!0));var a,i=v(this.data.options);try{for(i.s();!(a=i.n()).done;){var o=a.value,s=document.createElement("option");s.textContent=o.displayValue,s.value=o.exportValue,this.data.fieldValue.includes(o.exportValue)&&s.setAttribute("selected",!0),n.appendChild(s)}}catch(e){i.e(e)}finally{i.f()}var l=function(e,t){var r=t?"value":"textContent",n=e.target.options;return e.target.multiple?Array.prototype.filter.call(n,function(e){return e.selected}).map(function(e){return e[r]}):-1===n.selectedIndex?null:n[n.selectedIndex][r]},u=function(e){var t=e.target.options;return Array.prototype.map.call(t,function(e){return{displayValue:e.textContent,exportValue:e.value}})};return this.enableScripting&&this.hasJSActions?(n.addEventListener("updatefromsandbox",function(a){var i={value:function(e){var a=n.options,i=e.detail.value,o=new Set(Array.isArray(i)?i:[i]);Array.prototype.forEach.call(a,function(e){e.selected=o.has(e.value)}),t.setValue(r,{value:l(e,!0)})},multipleSelection:function(e){n.multiple=!0},remove:function(e){var a=n.options,i=e.detail.remove;(a[i].selected=!1,n.remove(i),a.length>0)&&(-1===Array.prototype.findIndex.call(a,function(e){return e.selected})&&(a[0].selected=!0));t.setValue(r,{value:l(e,!0),items:u(e)})},clear:function(e){for(;0!==n.length;)n.remove(0);t.setValue(r,{value:null,items:[]})},insert:function(e){var a=e.detail.insert,i=a.index,o=a.displayValue,s=a.exportValue,c=document.createElement("option");c.textContent=o,c.value=s,n.insertBefore(c,n.children[i]),t.setValue(r,{value:l(e,!0),items:u(e)})},items:function(e){for(var a=e.detail.items;0!==n.length;)n.remove(0);var i,o=v(a);try{for(o.s();!(i=o.n()).done;){var s=i.value,c=s.displayValue,f=s.exportValue,d=document.createElement("option");d.textContent=c,d.value=f,n.appendChild(d)}}catch(e){o.e(e)}finally{o.f()}n.options.length>0&&(n.options[0].selected=!0),t.setValue(r,{value:l(e,!0),items:u(e)})},indices:function(e){var n=new Set(e.detail.indices),a=e.target.options;Array.prototype.forEach.call(a,function(e,t){e.selected=n.has(t)}),t.setValue(r,{value:l(e,!0)})},editable:function(e){e.target.disabled=!e.detail.editable}};e._dispatchEventFromSandbox(i,a)}),n.addEventListener("input",function(n){var a,i=l(n,!0),o=l(n,!1);t.setValue(r,{value:i}),null===(a=e.linkService.eventBus)||void 0===a||a.dispatch("dispatcheventinsandbox",{source:e,detail:{id:r,name:"Keystroke",value:o,changeEx:i,willCommit:!0,commitKey:1,keyDown:!1}})}),this._setEventListeners(n,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"]],function(e){return e.target.checked})):n.addEventListener("input",function(e){t.setValue(r,{value:l(e)})}),this.container.appendChild(n),this.container}}]),r}(),O=function(e){c(r,S);var t=d(r);function r(e){m(this,r);var n=!(!e.data.title&&!e.data.contents);return t.call(this,e,{isRenderable:n})}return _(r,[{key:"render",value:function(){if(this.container.className="popupAnnotation",["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;var e='[data-annotation-id="'.concat(this.data.parentId,'"]'),t=this.layer.querySelectorAll(e);if(0===t.length)return this.container;var r=new F({container:this.container,trigger:Array.from(t),color:this.data.color,title:this.data.title,modificationDate:this.data.modificationDate,contents:this.data.contents}),n=this.page,a=i.Util.normalizeRect([this.data.parentRect[0],n.view[3]-this.data.parentRect[1]+n.view[1],this.data.parentRect[2],n.view[3]-this.data.parentRect[3]+n.view[1]]),o=a[0]+this.data.parentRect[2]-this.data.parentRect[0],s=a[1];return this.container.style.transformOrigin="".concat(-o,"px ").concat(-s,"px"),this.container.style.left="".concat(o,"px"),this.container.style.top="".concat(s,"px"),this.container.appendChild(r.render()),this.container}}]),r}(),F=function(){function e(t){m(this,e),this.container=t.container,this.trigger=t.trigger,this.color=t.color,this.title=t.title,this.modificationDate=t.modificationDate,this.contents=t.contents,this.hideWrapper=t.hideWrapper||!1,this.pinned=!1}return _(e,[{key:"render",value:function(){var e=document.createElement("div");e.className="popupWrapper",this.hideElement=this.hideWrapper?e:this.container,this.hideElement.hidden=!0;var t=document.createElement("div");t.className="popup";var r=this.color;if(r){var n=.7*(255-r[0])+r[0],o=.7*(255-r[1])+r[1],s=.7*(255-r[2])+r[2];t.style.backgroundColor=i.Util.makeHexColor(0|n,0|o,0|s)}var l=document.createElement("h1");l.textContent=this.title,t.appendChild(l);var u=a.PDFDateString.toDateObject(this.modificationDate);if(u){var c=document.createElement("span");c.textContent="{{date}}, {{time}}",c.dataset.l10nId="annotation_date_string",c.dataset.l10nArgs=JSON.stringify({date:u.toLocaleDateString(),time:u.toLocaleTimeString()}),t.appendChild(c)}var f=this._formatContents(this.contents);t.appendChild(f),Array.isArray(this.trigger)||(this.trigger=[this.trigger]);var d,h=v(this.trigger);try{for(h.s();!(d=h.n()).done;){var p=d.value;p.addEventListener("click",this._toggle.bind(this)),p.addEventListener("mouseover",this._show.bind(this,!1)),p.addEventListener("mouseout",this._hide.bind(this,!1))}}catch(e){h.e(e)}finally{h.f()}return t.addEventListener("click",this._hide.bind(this,!0)),e.appendChild(t),e}},{key:"_formatContents",value:function(e){for(var t=document.createElement("p"),r=e.split(/(?:\r\n?|\n)/),n=0,a=r.length;n<a;++n){var i=r[n];t.appendChild(document.createTextNode(i)),n<a-1&&t.appendChild(document.createElement("br"))}return t}},{key:"_toggle",value:function(){this.pinned?this._hide(!0):this._show(!0)}},{key:"_show",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(this.pinned=!0),this.hideElement.hidden&&(this.hideElement.hidden=!1,this.container.style.zIndex+=1)}},{key:"_hide",value:function(){(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.pinned=!1),this.hideElement.hidden||this.pinned||(this.hideElement.hidden=!0,this.container.style.zIndex-=1)}}]),e}(),I=function(e){c(r,S);var t=d(r);function r(e){m(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,{isRenderable:n,ignoreBorder:!0})}return _(r,[{key:"render",value:function(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),r}(),M=function(e){c(r,S);var t=d(r);function r(e){m(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,{isRenderable:n,ignoreBorder:!0})}return _(r,[{key:"render",value:function(){this.container.className="lineAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),a=this.svgFactory.createElement("svg:line");return a.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),a.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),a.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),a.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),a.setAttribute("stroke-width",e.borderStyle.width||1),a.setAttribute("stroke","transparent"),n.appendChild(a),this.container.append(n),this._createPopup(a,e),this.container}}]),r}(),L=function(e){c(r,S);var t=d(r);function r(e){m(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,{isRenderable:n,ignoreBorder:!0})}return _(r,[{key:"render",value:function(){this.container.className="squareAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),a=e.borderStyle.width,i=this.svgFactory.createElement("svg:rect");return i.setAttribute("x",a/2),i.setAttribute("y",a/2),i.setAttribute("width",t-a),i.setAttribute("height",r-a),i.setAttribute("stroke-width",a||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","none"),n.appendChild(i),this.container.append(n),this._createPopup(i,e),this.container}}]),r}(),j=function(e){c(r,S);var t=d(r);function r(e){m(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,{isRenderable:n,ignoreBorder:!0})}return _(r,[{key:"render",value:function(){this.container.className="circleAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),a=e.borderStyle.width,i=this.svgFactory.createElement("svg:ellipse");return i.setAttribute("cx",t/2),i.setAttribute("cy",r/2),i.setAttribute("rx",t/2-a/2),i.setAttribute("ry",r/2-a/2),i.setAttribute("stroke-width",a||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","none"),n.appendChild(i),this.container.append(n),this._createPopup(i,e),this.container}}]),r}(),D=function(e){c(r,S);var t=d(r);function r(e){var n;m(this,r);var a=!!(e.data.hasPopup||e.data.title||e.data.contents);return(n=t.call(this,e,{isRenderable:a,ignoreBorder:!0})).containerClassName="polylineAnnotation",n.svgElementName="svg:polyline",n}return _(r,[{key:"render",value:function(){this.container.className=this.containerClassName;var e,t=this.data,r=t.rect[2]-t.rect[0],n=t.rect[3]-t.rect[1],a=this.svgFactory.create(r,n),i=[],o=v(t.vertices);try{for(o.s();!(e=o.n()).done;){var s=e.value,l=s.x-t.rect[0],u=t.rect[3]-s.y;i.push(l+","+u)}}catch(e){o.e(e)}finally{o.f()}i=i.join(" ");var c=this.svgFactory.createElement(this.svgElementName);return c.setAttribute("points",i),c.setAttribute("stroke-width",t.borderStyle.width||1),c.setAttribute("stroke","transparent"),c.setAttribute("fill","none"),a.appendChild(c),this.container.append(a),this._createPopup(c,t),this.container}}]),r}(),N=function(e){c(r,D);var t=d(r);function r(e){var n;return m(this,r),(n=t.call(this,e)).containerClassName="polygonAnnotation",n.svgElementName="svg:polygon",n}return r}(),q=function(e){c(r,S);var t=d(r);function r(e){m(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,{isRenderable:n,ignoreBorder:!0})}return _(r,[{key:"render",value:function(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),r}(),W=function(e){c(r,S);var t=d(r);function r(e){var n;m(this,r);var a=!!(e.data.hasPopup||e.data.title||e.data.contents);return(n=t.call(this,e,{isRenderable:a,ignoreBorder:!0})).containerClassName="inkAnnotation",n.svgElementName="svg:polyline",n}return _(r,[{key:"render",value:function(){this.container.className=this.containerClassName;var e,t=this.data,r=t.rect[2]-t.rect[0],n=t.rect[3]-t.rect[1],a=this.svgFactory.create(r,n),i=v(t.inkLists);try{for(i.s();!(e=i.n()).done;){var o,s=e.value,l=[],u=v(s);try{for(u.s();!(o=u.n()).done;){var c=o.value,f=c.x-t.rect[0],d=t.rect[3]-c.y;l.push("".concat(f,",").concat(d))}}catch(e){u.e(e)}finally{u.f()}l=l.join(" ");var h=this.svgFactory.createElement(this.svgElementName);h.setAttribute("points",l),h.setAttribute("stroke-width",t.borderStyle.width||1),h.setAttribute("stroke","transparent"),h.setAttribute("fill","none"),this._createPopup(h,t),a.appendChild(h)}}catch(e){i.e(e)}finally{i.f()}return this.container.append(a),this.container}}]),r}(),U=function(e){c(r,S);var t=d(r);function r(e){m(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,{isRenderable:n,ignoreBorder:!0,createQuadrilaterals:!0})}return _(r,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("highlightAnnotation"):(this.container.className="highlightAnnotation",this.container)}}]),r}(),B=function(e){c(r,S);var t=d(r);function r(e){m(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,{isRenderable:n,ignoreBorder:!0,createQuadrilaterals:!0})}return _(r,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("underlineAnnotation"):(this.container.className="underlineAnnotation",this.container)}}]),r}(),G=function(e){c(r,S);var t=d(r);function r(e){m(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,{isRenderable:n,ignoreBorder:!0,createQuadrilaterals:!0})}return _(r,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("squigglyAnnotation"):(this.container.className="squigglyAnnotation",this.container)}}]),r}(),z=function(e){c(r,S);var t=d(r);function r(e){m(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,{isRenderable:n,ignoreBorder:!0,createQuadrilaterals:!0})}return _(r,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("strikeoutAnnotation"):(this.container.className="strikeoutAnnotation",this.container)}}]),r}(),H=function(e){c(r,S);var t=d(r);function r(e){m(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,{isRenderable:n,ignoreBorder:!0})}return _(r,[{key:"render",value:function(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),r}(),V=function(e){c(r,S);var t=d(r);function r(e){var n,o;m(this,r);var s=(o=t.call(this,e,{isRenderable:!0})).data.file,l=s.filename,u=s.content;return o.filename=(0,a.getFilenameFromUrl)(l),o.content=u,null===(n=o.linkService.eventBus)||void 0===n||n.dispatch("fileattachmentannotation",{source:h(o),id:(0,i.stringToPDFString)(l),filename:l,content:u}),o}return _(r,[{key:"render",value:function(){this.container.className="fileAttachmentAnnotation";var e=document.createElement("div");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.addEventListener("dblclick",this._download.bind(this)),this.data.hasPopup||!this.data.title&&!this.data.contents||this._createPopup(e,this.data),this.container.appendChild(e),this.container}},{key:"_download",value:function(){var e;null===(e=this.downloadManager)||void 0===e||e.openOrDownloadData(this.container,this.content,this.filename)}}]),r}(),Y=function(){function e(){m(this,e)}return _(e,null,[{key:"render",value:function(e){var t,r=[],n=[],s=v(e.annotations);try{for(s.s();!(t=s.n()).done;){var l=t.value;l&&(l.annotationType!==i.AnnotationType.POPUP?r.push(l):n.push(l))}}catch(e){s.e(e)}finally{s.f()}n.length&&r.push.apply(r,n);for(var u=0,c=r;u<c.length;u++){var f=c[u],d=A.create({data:f,layer:e.div,page:e.page,viewport:e.viewport,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderInteractiveForms:!1!==e.renderInteractiveForms,svgFactory:new a.DOMSVGFactory,annotationStorage:e.annotationStorage||new o.AnnotationStorage,enableScripting:e.enableScripting,hasJSActions:e.hasJSActions,mouseState:e.mouseState||{isDown:!1}});if(d.isRenderable){var h=d.render();if(f.hidden&&(h.style.visibility="hidden"),Array.isArray(h)){var p,y=v(h);try{for(y.s();!(p=y.n()).done;){var g=p.value;e.div.appendChild(g)}}catch(e){y.e(e)}finally{y.f()}}else d instanceof O?e.div.prepend(h):e.div.appendChild(h)}}}},{key:"update",value:function(e){var t,r="matrix(".concat(e.viewport.transform.join(","),")"),n=v(e.annotations);try{for(n.s();!(t=n.n()).done;){var a=t.value,i=e.div.querySelectorAll('[data-annotation-id="'.concat(a.id,'"]'));if(i){var o,s=v(i);try{for(s.s();!(o=s.n()).done;){o.value.style.transform=r}}catch(e){s.e(e)}finally{s.f()}}}}catch(e){n.e(e)}finally{n.f()}e.div.hidden=!1}}]),e}();t.AnnotationLayer=Y},(e,t)=>{"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorConverters=void 0;var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,o=[{key:"CMYK_G",value:function(e){var t=r(e,4),n=t[0],a=t[1],i=t[2],o=t[3];return["G",1-Math.min(1,.3*n+.59*i+.11*a+o)]}},{key:"G_CMYK",value:function(e){return["CMYK",0,0,0,1-r(e,1)[0]]}},{key:"G_RGB",value:function(e){var t=r(e,1)[0];return["RGB",t,t,t]}},{key:"G_HTML",value:function(e){var t=i(r(e,1)[0]);return"#".concat(t).concat(t).concat(t)}},{key:"RGB_G",value:function(e){var t=r(e,3);return["G",.3*t[0]+.59*t[1]+.11*t[2]]}},{key:"RGB_HTML",value:function(e){var t=r(e,3),n=t[0],a=t[1],o=t[2],s=i(n),l=i(a),u=i(o);return"#".concat(s).concat(l).concat(u)}},{key:"T_HTML",value:function(){return"#00000000"}},{key:"CMYK_RGB",value:function(e){var t=r(e,4),n=t[0],a=t[1],i=t[2],o=t[3];return["RGB",1-Math.min(1,n+o),1-Math.min(1,i+o),1-Math.min(1,a+o)]}},{key:"CMYK_HTML",value:function(e){return this.RGB_HTML(this.CMYK_RGB(e))}},{key:"RGB_CMYK",value:function(e){var t=r(e,3),n=1-t[0],a=1-t[1],i=1-t[2];return["CMYK",n,a,i,Math.min(n,a,i)]}}],(n=null)&&a(t.prototype,n),o&&a(t,o),e}();t.ColorConverters=o},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderTextLayer=function(e){var t=new g({textContent:e.textContent,textContentStream:e.textContentStream,container:e.container,viewport:e.viewport,textDivs:e.textDivs,textContentItemsStr:e.textContentItemsStr,enhanceTextSelection:e.enhanceTextSelection});return t._render(e.timeout),t};var n=r(4);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw i}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var s=1e5,l=30,u=.8,c=new Map,f=/^\s+$/g;function d(e,t,r,a){var i=document.createElement("span"),o={angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1};e._textDivs.push(i);var s=n.Util.transform(e._viewport.transform,t.transform),d=Math.atan2(s[1],s[0]),h=r[t.fontName];h.vertical&&(d+=Math.PI/2);var p,v,y=Math.hypot(s[2],s[3]),g=y*function(e,t){var r=c.get(e);if(r)return r;t.save(),t.font="".concat(l,"px ").concat(e);var n=t.measureText(""),a=n.fontBoundingBoxAscent,i=Math.abs(n.fontBoundingBoxDescent);if(a){t.restore();var o=a/(a+i);return c.set(e,o),o}t.strokeStyle="red",t.clearRect(0,0,l,l),t.strokeText("g",0,0);var s=t.getImageData(0,0,l,l).data;i=0;for(var f=s.length-1-3;f>=0;f-=4)if(s[f]>0){i=Math.ceil(f/4/l);break}t.clearRect(0,0,l,l),t.strokeText("A",0,l),a=0;for(var d=0,h=(s=t.getImageData(0,0,l,l).data).length;d<h;d+=4)if(s[d]>0){a=l-Math.floor(d/4/l);break}if(t.restore(),a){var p=a/(a+i);return c.set(e,p),p}return c.set(e,u),u}(h.fontFamily,a);0===d?(p=s[4],v=s[5]-g):(p=s[4]+g*Math.sin(d),v=s[5]-g*Math.cos(d)),i.style.left="".concat(p,"px"),i.style.top="".concat(v,"px"),i.style.fontSize="".concat(y,"px"),i.style.fontFamily=h.fontFamily,i.setAttribute("role","presentation"),i.textContent=t.str,i.dir=t.dir,e._fontInspectorEnabled&&(i.dataset.fontName=t.fontName),0!==d&&(o.angle=d*(180/Math.PI));var m=!1;if(t.str.length>1||e._enhanceTextSelection&&f.test(t.str))m=!0;else if(t.transform[0]!==t.transform[3]){var b=Math.abs(t.transform[0]),_=Math.abs(t.transform[3]);b!==_&&Math.max(b,_)/Math.min(b,_)>1.5&&(m=!0)}if(m&&(h.vertical?o.canvasWidth=t.height*e._viewport.scale:o.canvasWidth=t.width*e._viewport.scale),e._textDivProperties.set(i,o),e._textContentStream&&e._layoutText(i),e._enhanceTextSelection&&o.hasText){var A=1,S=0;0!==d&&(A=Math.cos(d),S=Math.sin(d));var k,w,x=(h.vertical?t.height:t.width)*e._viewport.scale,C=y;0!==d?(k=[A,S,-S,A,p,v],w=n.Util.getAxialAlignedBoundingBox([0,0,x,C],k)):w=[p,v,p+x,v+C],e._bounds.push({left:w[0],top:w[1],right:w[2],bottom:w[3],div:i,size:[x,C],m:k})}}function h(e){if(!e._canceled){var t=e._textDivs,r=e._capability,n=t.length;if(n>s)return e._renderingDone=!0,void r.resolve();if(!e._textContentStream)for(var a=0;a<n;a++)e._layoutText(t[a]);e._renderingDone=!0,r.resolve()}}function p(e,t,r){for(var n=0,a=0;a<r;a++){var i=e[t++];i>0&&(n=n?Math.min(i,n):i)}return n}function v(e){for(var t=e._bounds,r=e._viewport,a=function(e,t,r){var n=r.map(function(e,t){return{x1:e.left,y1:e.top,x2:e.right,y2:e.bottom,index:t,x1New:void 0,x2New:void 0}});y(e,n);var a,o=new Array(r.length),s=i(n);try{for(s.s();!(a=s.n()).done;){var l=a.value,u=l.index;o[u]={left:l.x1New,top:0,right:l.x2New,bottom:0}}}catch(e){s.e(e)}finally{s.f()}r.map(function(t,r){var a=o[r],i=n[r];i.x1=t.top,i.y1=e-a.right,i.x2=t.bottom,i.y2=e-a.left,i.index=r,i.x1New=void 0,i.x2New=void 0}),y(t,n);var c,f=i(n);try{for(f.s();!(c=f.n()).done;){var d=c.value,h=d.index;o[h].top=d.x1New,o[h].bottom=d.x2New}}catch(e){f.e(e)}finally{f.f()}return o}(r.width,r.height,t),o=0;o<a.length;o++){var s=t[o].div,l=e._textDivProperties.get(s);if(0!==l.angle){for(var u=a[o],c=t[o],f=c.m,d=f[0],h=f[1],v=[[0,0],[0,c.size[1]],[c.size[0],0],c.size],g=new Float64Array(64),m=0,b=v.length;m<b;m++){var _=n.Util.applyTransform(v[m],f);g[m+0]=d&&(u.left-_[0])/d,g[m+4]=h&&(u.top-_[1])/h,g[m+8]=d&&(u.right-_[0])/d,g[m+12]=h&&(u.bottom-_[1])/h,g[m+16]=h&&(u.left-_[0])/-h,g[m+20]=d&&(u.top-_[1])/d,g[m+24]=h&&(u.right-_[0])/-h,g[m+28]=d&&(u.bottom-_[1])/d,g[m+32]=d&&(u.left-_[0])/-d,g[m+36]=h&&(u.top-_[1])/-h,g[m+40]=d&&(u.right-_[0])/-d,g[m+44]=h&&(u.bottom-_[1])/-h,g[m+48]=h&&(u.left-_[0])/h,g[m+52]=d&&(u.top-_[1])/-d,g[m+56]=h&&(u.right-_[0])/h,g[m+60]=d&&(u.bottom-_[1])/-d}var A=1+Math.min(Math.abs(d),Math.abs(h));l.paddingLeft=p(g,32,16)/A,l.paddingTop=p(g,48,16)/A,l.paddingRight=p(g,0,16)/A,l.paddingBottom=p(g,16,16)/A,e._textDivProperties.set(s,l)}else l.paddingLeft=t[o].left-a[o].left,l.paddingTop=t[o].top-a[o].top,l.paddingRight=a[o].right-t[o].right,l.paddingBottom=a[o].bottom-t[o].bottom,e._textDivProperties.set(s,l)}}function y(e,t){t.sort(function(e,t){return e.x1-t.x1||e.index-t.index});var r,n=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}],a=i(t);try{for(a.s();!(r=a.n()).done;){for(var o=r.value,s=0;s<n.length&&n[s].end<=o.y1;)s++;for(var l=n.length-1;l>=0&&n[l].start>=o.y2;)l--;var u=void 0,c=void 0,f=void 0,d=void 0,h=-1/0;for(f=s;f<=l;f++){c=(u=n[f]).boundary;var p=void 0;(p=c.x2>o.x1?c.index>o.index?c.x1New:o.x1:void 0===c.x2New?(c.x2+o.x1)/2:c.x2New)>h&&(h=p)}for(o.x1New=h,f=s;f<=l;f++)void 0===(c=(u=n[f]).boundary).x2New?c.x2>o.x1?c.index>o.index&&(c.x2New=c.x2):c.x2New=h:c.x2New>h&&(c.x2New=Math.max(h,c.x2));var v=[],y=null;for(f=s;f<=l;f++){var g=(c=(u=n[f]).boundary).x2>o.x2?c:o;y===g?v[v.length-1].end=u.end:(v.push({start:u.start,end:u.end,boundary:g}),y=g)}for(n[s].start<o.y1&&(v[0].start=o.y1,v.unshift({start:n[s].start,end:o.y1,boundary:n[s].boundary})),o.y2<n[l].end&&(v[v.length-1].end=o.y2,v.push({start:o.y2,end:n[l].end,boundary:n[l].boundary})),f=s;f<=l;f++)if(void 0===(c=(u=n[f]).boundary).x2New){var m=!1;for(d=s-1;!m&&d>=0&&n[d].start>=c.y1;d--)m=n[d].boundary===c;for(d=l+1;!m&&d<n.length&&n[d].end<=c.y2;d++)m=n[d].boundary===c;for(d=0;!m&&d<v.length;d++)m=v[d].boundary===c;m||(c.x2New=h)}Array.prototype.splice.apply(n,[s,l-s+1].concat(v))}}catch(e){a.e(e)}finally{a.f()}for(var b=0,_=n;b<_.length;b++){var A=_[b].boundary;void 0===A.x2New&&(A.x2New=Math.max(e,A.x2))}}var g=function(){function e(t){var r,a=this,i=t.textContent,o=t.textContentStream,s=t.container,l=t.viewport,u=t.textDivs,c=t.textContentItemsStr,f=t.enhanceTextSelection;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._textContent=i,this._textContentStream=o,this._container=s,this._document=s.ownerDocument,this._viewport=l,this._textDivs=u||[],this._textContentItemsStr=c||[],this._enhanceTextSelection=!!f,this._fontInspectorEnabled=!(null===(r=globalThis.FontInspector)||void 0===r||!r.enabled),this._reader=null,this._layoutTextLastFontSize=null,this._layoutTextLastFontFamily=null,this._layoutTextCtx=null,this._textDivProperties=new WeakMap,this._renderingDone=!1,this._canceled=!1,this._capability=(0,n.createPromiseCapability)(),this._renderTimer=null,this._bounds=[],this._capability.promise.finally(function(){a._layoutTextCtx&&(a._layoutTextCtx.canvas.width=0,a._layoutTextCtx.canvas.height=0,a._layoutTextCtx=null)}).catch(function(){})}var t,r,i;return t=e,(r=[{key:"promise",get:function(){return this._capability.promise}},{key:"cancel",value:function(){this._canceled=!0,this._reader&&(this._reader.cancel(new n.AbortException("TextLayer task cancelled.")),this._reader=null),null!==this._renderTimer&&(clearTimeout(this._renderTimer),this._renderTimer=null),this._capability.reject(new Error("TextLayer task cancelled."))}},{key:"_processItems",value:function(e,t){for(var r=0,n=e.length;r<n;r++)if(void 0!==e[r].str)this._textContentItemsStr.push(e[r].str),d(this,e[r],t,this._layoutTextCtx);else if("beginMarkedContentProps"===e[r].type||"beginMarkedContent"===e[r].type){var a=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),null!==e[r].id&&this._container.setAttribute("id","".concat(e[r].id)),a.appendChild(this._container)}else"endMarkedContent"===e[r].type&&(this._container=this._container.parentNode)}},{key:"_layoutText",value:function(e){var t=this._textDivProperties.get(e),r="";if(0!==t.canvasWidth&&t.hasText){var n=e.style,a=n.fontSize,i=n.fontFamily;a===this._layoutTextLastFontSize&&i===this._layoutTextLastFontFamily||(this._layoutTextCtx.font="".concat(a," ").concat(i),this._layoutTextLastFontSize=a,this._layoutTextLastFontFamily=i);var o=this._layoutTextCtx.measureText(e.textContent).width;o>0&&(t.scale=t.canvasWidth/o,r="scaleX(".concat(t.scale,")"))}if(0!==t.angle&&(r="rotate(".concat(t.angle,"deg) ").concat(r)),r.length>0&&(this._enhanceTextSelection&&(t.originalTransform=r),e.style.transform=r),t.hasText&&this._container.appendChild(e),t.hasEOL){var s=document.createElement("br");s.setAttribute("role","presentation"),this._container.appendChild(s)}}},{key:"_render",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=(0,n.createPromiseCapability)(),a=Object.create(null),i=this._document.createElement("canvas");if(i.height=i.width=l,i.mozOpaque=!0,this._layoutTextCtx=i.getContext("2d",{alpha:!1}),this._textContent){var o=this._textContent.items,s=this._textContent.styles;this._processItems(o,s),r.resolve()}else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');this._reader=this._textContentStream.getReader(),function t(){e._reader.read().then(function(n){var i=n.value;n.done?r.resolve():(Object.assign(a,i.styles),e._processItems(i.items,a),t())},r.reject)}()}r.promise.then(function(){a=null,t?e._renderTimer=setTimeout(function(){h(e),e._renderTimer=null},t):h(e)},this._capability.reject)}},{key:"expandTextDivs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._enhanceTextSelection&&this._renderingDone){null!==this._bounds&&(v(this),this._bounds=null);for(var t=[],r=[],n=0,a=this._textDivs.length;n<a;n++){var i=this._textDivs[n],o=this._textDivProperties.get(i);o.hasText&&(e?(t.length=0,r.length=0,o.originalTransform&&t.push(o.originalTransform),o.paddingTop>0?(r.push("".concat(o.paddingTop,"px")),t.push("translateY(".concat(-o.paddingTop,"px)"))):r.push(0),o.paddingRight>0?r.push("".concat(o.paddingRight/o.scale,"px")):r.push(0),o.paddingBottom>0?r.push("".concat(o.paddingBottom,"px")):r.push(0),o.paddingLeft>0?(r.push("".concat(o.paddingLeft/o.scale,"px")),t.push("translateX(".concat(-o.paddingLeft/o.scale,"px)"))):r.push(0),i.style.padding=r.join(" "),t.length&&(i.style.transform=t.join(" "))):(i.style.padding=null,i.style.transform=o.originalTransform))}}}}])&&a(t.prototype,r),i&&a(t,i),e}()},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var n=r(4),a=r(1),i=r(6);function o(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),e}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=function e(){h(this,e),(0,n.unreachable)("Not implemented: SVGGraphics")};t.SVGGraphics=p;var v=function(e){if(Number.isInteger(e))return e.toString();var t=e.toFixed(10),r=t.length-1;if("0"!==t[r])return t;do{r--}while("0"===t[r]);return t.substring(0,"."===t[r]?r:r+1)},y=function(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":"scale(".concat(v(e[0])," ").concat(v(e[3]),")");if(e[0]===e[3]&&e[1]===-e[2]){var t=180*Math.acos(e[0])/Math.PI;return"rotate(".concat(v(t),")")}}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return"translate(".concat(v(e[4])," ").concat(v(e[5]),")");return"matrix(".concat(v(e[0])," ").concat(v(e[1])," ").concat(v(e[2])," ").concat(v(e[3])," ").concat(v(e[4])," ")+"".concat(v(e[5]),")")},g={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},m=["butt","round","square"],b=["miter","round","bevel"],_=function(){for(var e=new Uint8Array([137,80,78,71,13,10,26,10]),t=12,r=new Int32Array(256),a=0;a<256;a++){for(var o=a,s=0;s<8;s++)o=1&o?3988292384^o>>1&2147483647:o>>1&2147483647;r[a]=o}function l(e,t,n,a){var i=a,o=t.length;n[i]=o>>24&255,n[i+1]=o>>16&255,n[i+2]=o>>8&255,n[i+3]=255&o,n[i+=4]=255&e.charCodeAt(0),n[i+1]=255&e.charCodeAt(1),n[i+2]=255&e.charCodeAt(2),n[i+3]=255&e.charCodeAt(3),i+=4,n.set(t,i);var s=function(e,t,n){for(var a=-1,i=t;i<n;i++){var o=255&(a^e[i]);a=a>>>8^r[o]}return-1^a}(n,a+4,i+=t.length);n[i]=s>>24&255,n[i+1]=s>>16&255,n[i+2]=s>>8&255,n[i+3]=255&s}function u(e){var t=e.length,r=Math.ceil(t/65535),n=new Uint8Array(2+t+5*r+4),a=0;n[a++]=120,n[a++]=156;for(var i=0;t>65535;)n[a++]=0,n[a++]=255,n[a++]=255,n[a++]=0,n[a++]=0,n.set(e.subarray(i,i+65535),a),a+=65535,i+=65535,t-=65535;n[a++]=1,n[a++]=255&t,n[a++]=t>>8&255,n[a++]=255&~t,n[a++]=(65535&~t)>>8&255,n.set(e.subarray(i),a),a+=e.length-i;var o=function(e,t,r){for(var n=1,a=0,i=t;i<r;++i)a=(a+(n=(n+(255&e[i]))%65521))%65521;return a<<16|n}(e,0,e.length);return n[a++]=o>>24&255,n[a++]=o>>16&255,n[a++]=o>>8&255,n[a++]=255&o,n}function c(r,a,o,s){var c,f,d,h=r.width,p=r.height,v=r.data;switch(a){case n.ImageKind.GRAYSCALE_1BPP:f=0,c=1,d=h+7>>3;break;case n.ImageKind.RGB_24BPP:f=2,c=8,d=3*h;break;case n.ImageKind.RGBA_32BPP:f=6,c=8,d=4*h;break;default:throw new Error("invalid format")}for(var y=new Uint8Array((1+d)*p),g=0,m=0,b=0;b<p;++b)y[g++]=0,y.set(v.subarray(m,m+d),g),m+=d,g+=d;if(a===n.ImageKind.GRAYSCALE_1BPP&&s){g=0;for(var _=0;_<p;_++){g++;for(var A=0;A<d;A++)y[g++]^=255}}var S=new Uint8Array([h>>24&255,h>>16&255,h>>8&255,255&h,p>>24&255,p>>16&255,p>>8&255,255&p,c,f,0,0,0]),k=function(e){if(!i.isNodeJS)return u(e);try{var t;t=parseInt(process.versions.node)>=8?e:Buffer.from(e);var r=require("zlib").deflateSync(t,{level:9});return r instanceof Uint8Array?r:new Uint8Array(r)}catch(e){(0,n.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return u(e)}(y),w=e.length+3*t+S.length+k.length,x=new Uint8Array(w),C=0;return x.set(e,C),l("IHDR",S,x,C+=e.length),l("IDATA",k,x,C+=t+S.length),C+=t+k.length,l("IEND",new Uint8Array(0),x,C),(0,n.createObjectURL)(x,"image/png",o)}return function(e,t,r){return c(e,void 0===e.kind?n.ImageKind.GRAYSCALE_1BPP:e.kind,t,r)}}(),A=function(){function e(){h(this,e),this.fontSizeScale=1,this.fontWeight=g.fontWeight,this.fontSize=0,this.textMatrix=n.IDENTITY_MATRIX,this.fontMatrix=n.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=n.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=g.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}return d(e,[{key:"clone",value:function(){return Object.create(this)}},{key:"setCurrentPoint",value:function(e,t){this.x=e,this.y=t}}]),e}(),S=0,k=0,w=0;t.SVGGraphics=p=function(){function e(t,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var o in h(this,e),this.svgFactory=new a.DOMSVGFactory,this.current=new A,this.transformMatrix=n.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=t,this.objs=r,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!i,this._operatorIdMapping=[],n.OPS)this._operatorIdMapping[n.OPS[o]]=o}return d(e,[{key:"save",value:function(){this.transformStack.push(this.transformMatrix);var e=this.current;this.extraStack.push(e),this.current=e.clone()}},{key:"restore",value:function(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}},{key:"group",value:function(e){this.save(),this.executeOpTree(e),this.restore()}},{key:"loadDependencies",value:function(e){for(var t=this,r=e.fnArray,a=e.argsArray,i=0,o=r.length;i<o;i++)if(r[i]===n.OPS.dependency){var s,u=l(a[i]);try{var c=function(){var e=s.value,r=e.startsWith("g_")?t.commonObjs:t.objs,n=new Promise(function(t){r.get(e,t)});t.current.dependencies.push(n)};for(u.s();!(s=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}return Promise.all(this.current.dependencies)}},{key:"transform",value:function(e,t,r,a,i,o){var s=[e,t,r,a,i,o];this.transformMatrix=n.Util.transform(this.transformMatrix,s),this.tgrp=null}},{key:"getSVG",value:function(e,t){var r=this;this.viewport=t;var a=this._initialize(t);return this.loadDependencies(e).then(function(){return r.transformMatrix=n.IDENTITY_MATRIX,r.executeOpTree(r.convertOpList(e)),a})}},{key:"convertOpList",value:function(e){for(var t=this._operatorIdMapping,r=e.argsArray,n=e.fnArray,a=[],i=0,o=n.length;i<o;i++){var s=n[i];a.push({fnId:s,fn:t[s],args:r[i]})}return function(e){var t,r=[],n=[],a=l(e);try{for(a.s();!(t=a.n()).done;){var i=t.value;"save"!==i.fn?"restore"===i.fn?r=n.pop():r.push(i):(r.push({fnId:92,fn:"group",items:[]}),n.push(r),r=r[r.length-1].items)}}catch(e){a.e(e)}finally{a.f()}return r}(a)}},{key:"executeOpTree",value:function(e){var t,r=l(e);try{for(r.s();!(t=r.n()).done;){var a=t.value,i=a.fn,o=a.fnId,s=a.args;switch(0|o){case n.OPS.beginText:this.beginText();break;case n.OPS.dependency:break;case n.OPS.setLeading:this.setLeading(s);break;case n.OPS.setLeadingMoveText:this.setLeadingMoveText(s[0],s[1]);break;case n.OPS.setFont:this.setFont(s);break;case n.OPS.showText:case n.OPS.showSpacedText:this.showText(s[0]);break;case n.OPS.endText:this.endText();break;case n.OPS.moveText:this.moveText(s[0],s[1]);break;case n.OPS.setCharSpacing:this.setCharSpacing(s[0]);break;case n.OPS.setWordSpacing:this.setWordSpacing(s[0]);break;case n.OPS.setHScale:this.setHScale(s[0]);break;case n.OPS.setTextMatrix:this.setTextMatrix(s[0],s[1],s[2],s[3],s[4],s[5]);break;case n.OPS.setTextRise:this.setTextRise(s[0]);break;case n.OPS.setTextRenderingMode:this.setTextRenderingMode(s[0]);break;case n.OPS.setLineWidth:this.setLineWidth(s[0]);break;case n.OPS.setLineJoin:this.setLineJoin(s[0]);break;case n.OPS.setLineCap:this.setLineCap(s[0]);break;case n.OPS.setMiterLimit:this.setMiterLimit(s[0]);break;case n.OPS.setFillRGBColor:this.setFillRGBColor(s[0],s[1],s[2]);break;case n.OPS.setStrokeRGBColor:this.setStrokeRGBColor(s[0],s[1],s[2]);break;case n.OPS.setStrokeColorN:this.setStrokeColorN(s);break;case n.OPS.setFillColorN:this.setFillColorN(s);break;case n.OPS.shadingFill:this.shadingFill(s[0]);break;case n.OPS.setDash:this.setDash(s[0],s[1]);break;case n.OPS.setRenderingIntent:this.setRenderingIntent(s[0]);break;case n.OPS.setFlatness:this.setFlatness(s[0]);break;case n.OPS.setGState:this.setGState(s[0]);break;case n.OPS.fill:this.fill();break;case n.OPS.eoFill:this.eoFill();break;case n.OPS.stroke:this.stroke();break;case n.OPS.fillStroke:this.fillStroke();break;case n.OPS.eoFillStroke:this.eoFillStroke();break;case n.OPS.clip:this.clip("nonzero");break;case n.OPS.eoClip:this.clip("evenodd");break;case n.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case n.OPS.paintImageXObject:this.paintImageXObject(s[0]);break;case n.OPS.paintInlineImageXObject:this.paintInlineImageXObject(s[0]);break;case n.OPS.paintImageMaskXObject:this.paintImageMaskXObject(s[0]);break;case n.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(s[0],s[1]);break;case n.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case n.OPS.closePath:this.closePath();break;case n.OPS.closeStroke:this.closeStroke();break;case n.OPS.closeFillStroke:this.closeFillStroke();break;case n.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case n.OPS.nextLine:this.nextLine();break;case n.OPS.transform:this.transform(s[0],s[1],s[2],s[3],s[4],s[5]);break;case n.OPS.constructPath:this.constructPath(s[0],s[1]);break;case n.OPS.endPath:this.endPath();break;case 92:this.group(a.items);break;default:(0,n.warn)("Unimplemented operator ".concat(i))}}}catch(e){r.e(e)}finally{r.f()}}},{key:"setWordSpacing",value:function(e){this.current.wordSpacing=e}},{key:"setCharSpacing",value:function(e){this.current.charSpacing=e}},{key:"nextLine",value:function(){this.moveText(0,this.current.leading)}},{key:"setTextMatrix",value:function(e,t,r,n,a,i){var o=this.current;o.textMatrix=o.lineMatrix=[e,t,r,n,a,i],o.textMatrixScale=Math.hypot(e,t),o.x=o.lineX=0,o.y=o.lineY=0,o.xcoords=[],o.ycoords=[],o.tspan=this.svgFactory.createElement("svg:tspan"),o.tspan.setAttributeNS(null,"font-family",o.fontFamily),o.tspan.setAttributeNS(null,"font-size","".concat(v(o.fontSize),"px")),o.tspan.setAttributeNS(null,"y",v(-o.y)),o.txtElement=this.svgFactory.createElement("svg:text"),o.txtElement.appendChild(o.tspan)}},{key:"beginText",value:function(){var e=this.current;e.x=e.lineX=0,e.y=e.lineY=0,e.textMatrix=n.IDENTITY_MATRIX,e.lineMatrix=n.IDENTITY_MATRIX,e.textMatrixScale=1,e.tspan=this.svgFactory.createElement("svg:tspan"),e.txtElement=this.svgFactory.createElement("svg:text"),e.txtgrp=this.svgFactory.createElement("svg:g"),e.xcoords=[],e.ycoords=[]}},{key:"moveText",value:function(e,t){var r=this.current;r.x=r.lineX+=e,r.y=r.lineY+=t,r.xcoords=[],r.ycoords=[],r.tspan=this.svgFactory.createElement("svg:tspan"),r.tspan.setAttributeNS(null,"font-family",r.fontFamily),r.tspan.setAttributeNS(null,"font-size","".concat(v(r.fontSize),"px")),r.tspan.setAttributeNS(null,"y",v(-r.y))}},{key:"showText",value:function(e){var t=this.current,r=t.font,a=t.fontSize;if(0!==a){var i,o=t.fontSizeScale,s=t.charSpacing,u=t.wordSpacing,c=t.fontDirection,f=t.textHScale*c,d=r.vertical,h=d?1:-1,p=r.defaultVMetrics,m=a*t.fontMatrix[0],b=0,_=l(e);try{for(_.s();!(i=_.n()).done;){var A=i.value;if(null!==A)if((0,n.isNum)(A))b+=h*A*a/1e3;else{var S=(A.isSpace?u:0)+s,k=A.fontChar,w=void 0,x=void 0,C=A.width;if(d){var P=void 0,T=A.vmetric||p;P=-(P=A.vmetric?T[1]:.5*C)*m;var R=T[2]*m;C=T?-T[0]:C,w=P/o,x=(b+R)/o}else w=b/o,x=0;(A.isInFont||r.missingFile)&&(t.xcoords.push(t.x+w),d&&t.ycoords.push(-t.y+x),t.tspan.textContent+=k);b+=d?C*m-S*c:C*m+S*c}else b+=c*u}}catch(e){_.e(e)}finally{_.f()}t.tspan.setAttributeNS(null,"x",t.xcoords.map(v).join(" ")),d?t.tspan.setAttributeNS(null,"y",t.ycoords.map(v).join(" ")):t.tspan.setAttributeNS(null,"y",v(-t.y)),d?t.y-=b:t.x+=b*f,t.tspan.setAttributeNS(null,"font-family",t.fontFamily),t.tspan.setAttributeNS(null,"font-size","".concat(v(t.fontSize),"px")),t.fontStyle!==g.fontStyle&&t.tspan.setAttributeNS(null,"font-style",t.fontStyle),t.fontWeight!==g.fontWeight&&t.tspan.setAttributeNS(null,"font-weight",t.fontWeight);var E=t.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;if(E===n.TextRenderingMode.FILL||E===n.TextRenderingMode.FILL_STROKE?(t.fillColor!==g.fillColor&&t.tspan.setAttributeNS(null,"fill",t.fillColor),t.fillAlpha<1&&t.tspan.setAttributeNS(null,"fill-opacity",t.fillAlpha)):t.textRenderingMode===n.TextRenderingMode.ADD_TO_PATH?t.tspan.setAttributeNS(null,"fill","transparent"):t.tspan.setAttributeNS(null,"fill","none"),E===n.TextRenderingMode.STROKE||E===n.TextRenderingMode.FILL_STROKE){var O=1/(t.textMatrixScale||1);this._setStrokeAttributes(t.tspan,O)}var F=t.textMatrix;0!==t.textRise&&((F=F.slice())[5]+=t.textRise),t.txtElement.setAttributeNS(null,"transform","".concat(y(F)," scale(").concat(v(f),", -1)")),t.txtElement.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.txtElement.appendChild(t.tspan),t.txtgrp.appendChild(t.txtElement),this._ensureTransformGroup().appendChild(t.txtElement)}}},{key:"setLeadingMoveText",value:function(e,t){this.setLeading(-t),this.moveText(e,t)}},{key:"addFontStyle",value:function(e){if(!e.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.appendChild(this.cssStyle));var t=(0,n.createObjectURL)(e.data,e.mimetype,this.forceDataSchema);this.cssStyle.textContent+='@font-face { font-family: "'.concat(e.loadedName,'";')+" src: url(".concat(t,"); }\n")}},{key:"setFont",value:function(e){var t=this.current,r=this.commonObjs.get(e[0]),a=e[1];t.font=r,!this.embedFonts||r.missingFile||this.embeddedFonts[r.loadedName]||(this.addFontStyle(r),this.embeddedFonts[r.loadedName]=r),t.fontMatrix=r.fontMatrix||n.FONT_IDENTITY_MATRIX;var i="normal";r.black?i="900":r.bold&&(i="bold");var o=r.italic?"italic":"normal";a<0?(a=-a,t.fontDirection=-1):t.fontDirection=1,t.fontSize=a,t.fontFamily=r.loadedName,t.fontWeight=i,t.fontStyle=o,t.tspan=this.svgFactory.createElement("svg:tspan"),t.tspan.setAttributeNS(null,"y",v(-t.y)),t.xcoords=[],t.ycoords=[]}},{key:"endText",value:function(){var e,t=this.current;t.textRenderingMode&n.TextRenderingMode.ADD_TO_PATH_FLAG&&null!==(e=t.txtElement)&&void 0!==e&&e.hasChildNodes()&&(t.element=t.txtElement,this.clip("nonzero"),this.endPath())}},{key:"setLineWidth",value:function(e){e>0&&(this.current.lineWidth=e)}},{key:"setLineCap",value:function(e){this.current.lineCap=m[e]}},{key:"setLineJoin",value:function(e){this.current.lineJoin=b[e]}},{key:"setMiterLimit",value:function(e){this.current.miterLimit=e}},{key:"setStrokeAlpha",value:function(e){this.current.strokeAlpha=e}},{key:"setStrokeRGBColor",value:function(e,t,r){this.current.strokeColor=n.Util.makeHexColor(e,t,r)}},{key:"setFillAlpha",value:function(e){this.current.fillAlpha=e}},{key:"setFillRGBColor",value:function(e,t,r){this.current.fillColor=n.Util.makeHexColor(e,t,r),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}},{key:"setStrokeColorN",value:function(e){this.current.strokeColor=this._makeColorN_Pattern(e)}},{key:"setFillColorN",value:function(e){this.current.fillColor=this._makeColorN_Pattern(e)}},{key:"shadingFill",value:function(e){var t=this.viewport.width,r=this.viewport.height,a=n.Util.inverseTransform(this.transformMatrix),i=n.Util.applyTransform([0,0],a),o=n.Util.applyTransform([0,r],a),s=n.Util.applyTransform([t,0],a),l=n.Util.applyTransform([t,r],a),u=Math.min(i[0],o[0],s[0],l[0]),c=Math.min(i[1],o[1],s[1],l[1]),f=Math.max(i[0],o[0],s[0],l[0]),d=Math.max(i[1],o[1],s[1],l[1]),h=this.svgFactory.createElement("svg:rect");h.setAttributeNS(null,"x",u),h.setAttributeNS(null,"y",c),h.setAttributeNS(null,"width",f-u),h.setAttributeNS(null,"height",d-c),h.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&h.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().appendChild(h)}},{key:"_makeColorN_Pattern",value:function(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}},{key:"_makeTilingPattern",value:function(e){var t=e[1],r=e[2],a=e[3]||n.IDENTITY_MATRIX,i=s(e[4],4),l=i[0],u=i[1],c=i[2],f=i[3],d=e[5],h=e[6],p=e[7],v="shading".concat(w++),y=s(n.Util.applyTransform([l,u],a),2),g=y[0],m=y[1],b=s(n.Util.applyTransform([c,f],a),2),_=b[0],A=b[1],S=s(n.Util.singularValueDecompose2dScale(a),2),k=d*S[0],x=h*S[1],C=this.svgFactory.createElement("svg:pattern");C.setAttributeNS(null,"id",v),C.setAttributeNS(null,"patternUnits","userSpaceOnUse"),C.setAttributeNS(null,"width",k),C.setAttributeNS(null,"height",x),C.setAttributeNS(null,"x","".concat(g)),C.setAttributeNS(null,"y","".concat(m));var P=this.svg,T=this.transformMatrix,R=this.current.fillColor,E=this.current.strokeColor,O=this.svgFactory.create(_-g,A-m);if(this.svg=O,this.transformMatrix=a,2===p){var F=n.Util.makeHexColor.apply(n.Util,o(t));this.current.fillColor=F,this.current.strokeColor=F}return this.executeOpTree(this.convertOpList(r)),this.svg=P,this.transformMatrix=T,this.current.fillColor=R,this.current.strokeColor=E,C.appendChild(O.childNodes[0]),this.defs.appendChild(C),"url(#".concat(v,")")}},{key:"_makeShadingPattern",value:function(e){switch(e[0]){case"RadialAxial":var t,r="shading".concat(w++),a=e[3];switch(e[1]){case"axial":var i=e[4],o=e[5];(t=this.svgFactory.createElement("svg:linearGradient")).setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"x1",i[0]),t.setAttributeNS(null,"y1",i[1]),t.setAttributeNS(null,"x2",o[0]),t.setAttributeNS(null,"y2",o[1]);break;case"radial":var s=e[4],u=e[5],c=e[6],f=e[7];(t=this.svgFactory.createElement("svg:radialGradient")).setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"cx",u[0]),t.setAttributeNS(null,"cy",u[1]),t.setAttributeNS(null,"r",f),t.setAttributeNS(null,"fx",s[0]),t.setAttributeNS(null,"fy",s[1]),t.setAttributeNS(null,"fr",c);break;default:throw new Error("Unknown RadialAxial type: ".concat(e[1]))}var d,h=l(a);try{for(h.s();!(d=h.n()).done;){var p=d.value,v=this.svgFactory.createElement("svg:stop");v.setAttributeNS(null,"offset",p[0]),v.setAttributeNS(null,"stop-color",p[1]),t.appendChild(v)}}catch(e){h.e(e)}finally{h.f()}return this.defs.appendChild(t),"url(#".concat(r,")");case"Mesh":return(0,n.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: ".concat(e[0]))}}},{key:"setDash",value:function(e,t){this.current.dashArray=e,this.current.dashPhase=t}},{key:"constructPath",value:function(e,t){var r,a=this.current,i=a.x,o=a.y,s=[],u=0,c=l(e);try{for(c.s();!(r=c.n()).done;){switch(0|r.value){case n.OPS.rectangle:i=t[u++],o=t[u++];var f=t[u++],d=t[u++],h=i+f,p=o+d;s.push("M",v(i),v(o),"L",v(h),v(o),"L",v(h),v(p),"L",v(i),v(p),"Z");break;case n.OPS.moveTo:i=t[u++],o=t[u++],s.push("M",v(i),v(o));break;case n.OPS.lineTo:i=t[u++],o=t[u++],s.push("L",v(i),v(o));break;case n.OPS.curveTo:i=t[u+4],o=t[u+5],s.push("C",v(t[u]),v(t[u+1]),v(t[u+2]),v(t[u+3]),v(i),v(o)),u+=6;break;case n.OPS.curveTo2:s.push("C",v(i),v(o),v(t[u]),v(t[u+1]),v(t[u+2]),v(t[u+3])),i=t[u+2],o=t[u+3],u+=4;break;case n.OPS.curveTo3:i=t[u+2],o=t[u+3],s.push("C",v(t[u]),v(t[u+1]),v(i),v(o),v(i),v(o)),u+=4;break;case n.OPS.closePath:s.push("Z")}}}catch(e){c.e(e)}finally{c.f()}s=s.join(" "),a.path&&e.length>0&&e[0]!==n.OPS.rectangle&&e[0]!==n.OPS.moveTo?s=a.path.getAttributeNS(null,"d")+s:(a.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(a.path)),a.path.setAttributeNS(null,"d",s),a.path.setAttributeNS(null,"fill","none"),a.element=a.path,a.setCurrentPoint(i,o)}},{key:"endPath",value:function(){var e=this.current;if(e.path=null,this.pendingClip)if(e.element){var t="clippath".concat(S++),r=this.svgFactory.createElement("svg:clipPath");r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"transform",y(this.transformMatrix));var n=e.element.cloneNode(!0);if("evenodd"===this.pendingClip?n.setAttributeNS(null,"clip-rule","evenodd"):n.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,r.appendChild(n),this.defs.appendChild(r),e.activeClipUrl){e.clipGroup=null;var a,i=l(this.extraStack);try{for(i.s();!(a=i.n()).done;){a.value.clipGroup=null}}catch(e){i.e(e)}finally{i.f()}r.setAttributeNS(null,"clip-path",e.activeClipUrl)}e.activeClipUrl="url(#".concat(t,")"),this.tgrp=null}else this.pendingClip=null}},{key:"clip",value:function(e){this.pendingClip=e}},{key:"closePath",value:function(){var e=this.current;if(e.path){var t="".concat(e.path.getAttributeNS(null,"d"),"Z");e.path.setAttributeNS(null,"d",t)}}},{key:"setLeading",value:function(e){this.current.leading=-e}},{key:"setTextRise",value:function(e){this.current.textRise=e}},{key:"setTextRenderingMode",value:function(e){this.current.textRenderingMode=e}},{key:"setHScale",value:function(e){this.current.textHScale=e/100}},{key:"setRenderingIntent",value:function(e){}},{key:"setFlatness",value:function(e){}},{key:"setGState",value:function(e){var t,r=l(e);try{for(r.s();!(t=r.n()).done;){var a=s(t.value,2),i=a[0],o=a[1];switch(i){case"LW":this.setLineWidth(o);break;case"LC":this.setLineCap(o);break;case"LJ":this.setLineJoin(o);break;case"ML":this.setMiterLimit(o);break;case"D":this.setDash(o[0],o[1]);break;case"RI":this.setRenderingIntent(o);break;case"FL":this.setFlatness(o);break;case"Font":this.setFont(o);break;case"CA":this.setStrokeAlpha(o);break;case"ca":this.setFillAlpha(o);break;default:(0,n.warn)("Unimplemented graphic state operator ".concat(i))}}}catch(e){r.e(e)}finally{r.f()}}},{key:"fill",value:function(){var e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}},{key:"stroke",value:function(){var e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}},{key:"_setStrokeAttributes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this.current,n=r.dashArray;1!==t&&n.length>0&&(n=n.map(function(e){return t*e})),e.setAttributeNS(null,"stroke",r.strokeColor),e.setAttributeNS(null,"stroke-opacity",r.strokeAlpha),e.setAttributeNS(null,"stroke-miterlimit",v(r.miterLimit)),e.setAttributeNS(null,"stroke-linecap",r.lineCap),e.setAttributeNS(null,"stroke-linejoin",r.lineJoin),e.setAttributeNS(null,"stroke-width",v(t*r.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",n.map(v).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",v(t*r.dashPhase)+"px")}},{key:"eoFill",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}},{key:"fillStroke",value:function(){this.stroke(),this.fill()}},{key:"eoFillStroke",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"closeFillStroke",value:function(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function(){this.closePath(),this.eoFillStroke()}},{key:"paintSolidColorImageMask",value:function(){var e=this.svgFactory.createElement("svg:rect");e.setAttributeNS(null,"x","0"),e.setAttributeNS(null,"y","0"),e.setAttributeNS(null,"width","1px"),e.setAttributeNS(null,"height","1px"),e.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().appendChild(e)}},{key:"paintImageXObject",value:function(e){var t=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);t?this.paintInlineImageXObject(t):(0,n.warn)("Dependent image with object ID ".concat(e," is not ready yet"))}},{key:"paintInlineImageXObject",value:function(e,t){var r=e.width,n=e.height,a=_(e,this.forceDataSchema,!!t),i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y","0"),i.setAttributeNS(null,"width",v(r)),i.setAttributeNS(null,"height",v(n)),this.current.element=i,this.clip("nonzero");var o=this.svgFactory.createElement("svg:image");o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a),o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y",v(-n)),o.setAttributeNS(null,"width",v(r)+"px"),o.setAttributeNS(null,"height",v(n)+"px"),o.setAttributeNS(null,"transform","scale(".concat(v(1/r)," ").concat(v(-1/n),")")),t?t.appendChild(o):this._ensureTransformGroup().appendChild(o)}},{key:"paintImageMaskXObject",value:function(e){var t=this.current,r=e.width,n=e.height,a=t.fillColor;t.maskId="mask".concat(k++);var i=this.svgFactory.createElement("svg:mask");i.setAttributeNS(null,"id",t.maskId);var o=this.svgFactory.createElement("svg:rect");o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y","0"),o.setAttributeNS(null,"width",v(r)),o.setAttributeNS(null,"height",v(n)),o.setAttributeNS(null,"fill",a),o.setAttributeNS(null,"mask","url(#".concat(t.maskId,")")),this.defs.appendChild(i),this._ensureTransformGroup().appendChild(o),this.paintInlineImageXObject(e,i)}},{key:"paintFormXObjectBegin",value:function(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){var r=t[2]-t[0],n=t[3]-t[1],a=this.svgFactory.createElement("svg:rect");a.setAttributeNS(null,"x",t[0]),a.setAttributeNS(null,"y",t[1]),a.setAttributeNS(null,"width",v(r)),a.setAttributeNS(null,"height",v(n)),this.current.element=a,this.clip("nonzero"),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){}},{key:"_initialize",value:function(e){var t=this.svgFactory.create(e.width,e.height),r=this.svgFactory.createElement("svg:defs");t.appendChild(r),this.defs=r;var n=this.svgFactory.createElement("svg:g");return n.setAttributeNS(null,"transform",y(e.transform)),t.appendChild(n),this.svg=n,t}},{key:"_ensureClipGroup",value:function(){if(!this.current.clipGroup){var e=this.svgFactory.createElement("svg:g");e.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.appendChild(e),this.current.clipGroup=e}return this.current.clipGroup}},{key:"_ensureTransformGroup",value:function(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",y(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}]),e}()},(e,t)=>{"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=a(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw o}}}}function a(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayer=void 0;var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,a,i;return t=e,i=[{key:"setupStorage",value:function(e,t,r,a){var i=a.getValue(t,{value:null});switch(r.name){case"textarea":e.textContent=null!==i.value?i.value:"",e.addEventListener("input",function(e){a.setValue(t,{value:e.target.value})});break;case"input":null!==i.value&&e.setAttribute("value",i.value),"radio"===r.attributes.type?e.addEventListener("change",function(e){var r,i=e.target,o=n(document.getElementsByName(i.name));try{for(o.s();!(r=o.n()).done;){var s=r.value;if(s!==i){var l=s.id;a.setValue(l.split("-")[0],{value:!1})}}}catch(e){o.e(e)}finally{o.f()}a.setValue(t,{value:i.checked})}):e.addEventListener("input",function(e){a.setValue(t,{value:e.target.value})});break;case"select":if(null!==i.value){var o,s=n(r.children);try{for(s.s();!(o=s.n()).done;){var l=o.value;l.attributes.value===i.value&&(l.attributes.selected=!0)}}catch(e){s.e(e)}finally{s.f()}}e.addEventListener("input",function(e){var r=e.target.options,n=-1===r.selectedIndex?null:r[r.selectedIndex].value;a.setValue(t,{value:n})})}}},{key:"setAttributes",value:function(e,t,n){for(var a=t.attributes,i=0,o=Object.entries(a);i<o.length;i++){var s=r(o[i],2),l=s[0],u=s[1];null!=u&&"fieldId"!==l&&("style"!==l?"textContent"===l?e.textContent=u:e.setAttribute(l,u):Object.assign(e.style,u))}n&&void 0!==a.fieldId&&this.setupStorage(e,a.fieldId,t,n)}},{key:"render",value:function(e){var t=e.annotationStorage,n=e.xfa,a=document.createElement(n.name);n.attributes&&this.setAttributes(a,n);var i=[[n,-1,a]],o=e.div;o.appendChild(a);var s=e.viewport.transform.join(",");for(o.style.transform="matrix(".concat(s,")"),o.setAttribute("class","xfaLayer xfaFont");i.length>0;){var l=r(i[i.length-1],3),u=l[0],c=l[1],f=l[2];if(c+1!==u.children.length){var d=u.children[++i[i.length-1][1]];if(null!==d){var h=d.name;if("#text"!==h){var p=document.createElement(h);f.appendChild(p),d.attributes&&this.setAttributes(p,d,t),d.children&&d.children.length>0?i.push([d,-1,p]):d.value&&p.appendChild(document.createTextNode(d.value))}else f.appendChild(document.createTextNode(d.value))}}else i.pop()}}},{key:"update",value:function(e){var t="matrix(".concat(e.viewport.transform.join(","),")");e.div.style.transform=t,e.div.hidden=!1}}],(a=null)&&o(t.prototype,a),i&&o(t,i),e}();t.XfaLayer=s},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var a=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),i=r(4),o=r(131);function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=c(e);if(t){var i=c(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t,r,n,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function d(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(e){f(i,n,a,o,s,"next",e)}function s(e){f(i,n,a,o,s,"throw",e)}o(void 0)})}}function h(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function g(e,t,r){return t&&y(e.prototype,t),r&&y(e,r),e}var m=require("fs"),b=require("http"),_=require("https"),A=require("url"),S=/^file:\/\/\/[a-zA-Z]:\//;var k=function(){function e(t){var r,n;v(this,e),this.source=t,this.url=(r=t.url,"file:"===(n=A.parse(r)).protocol||n.host?n:/^[a-z]:[/\\]/i.test(r)?A.parse("file:///".concat(r)):(n.host||(n.protocol="file:"),n)),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return g(e,[{key:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"getFullReader",value:function(){return(0,i.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new R(this):new P(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=this.isFsUrl?new E(this,e,t):new T(this,e,t);return this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t,r=h(this._rangeRequestReaders.slice(0));try{for(r.s();!(t=r.n()).done;){t.value.cancel(e)}}catch(e){r.e(e)}finally{r.f()}}}]),e}();t.PDFNodeStream=k;var w=function(){function e(t){v(this,e),this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;var r=t.source;this._contentLength=r.length,this._loaded=0,this._filename=null,this._disableRange=r.disableRange||!1,this._rangeChunkSize=r.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!r.disableStream,this._isRangeSupported=!r.disableRange,this._readableStream=null,this._readCapability=(0,i.createPromiseCapability)(),this._headersCapability=(0,i.createPromiseCapability)()}return g(e,[{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var e=d(a.default.mark(function e(){var t,r;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:if(!this._done){e.next=4;break}return e.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){e.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){e.next=10;break}return this._readCapability=(0,i.createPromiseCapability)(),e.abrupt("return",this.read());case 10:return this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),r=new Uint8Array(t).buffer,e.abrupt("return",{value:r,done:!1});case 14:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}},{key:"_error",value:function(e){this._storedError=e,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(e){var t=this;this._readableStream=e,e.on("readable",function(){t._readCapability.resolve()}),e.on("end",function(){e.destroy(),t._done=!0,t._readCapability.resolve()}),e.on("error",function(e){t._error(e)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new i.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}]),e}(),x=function(){function e(t){v(this,e),this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,i.createPromiseCapability)();var r=t.source;this._isStreamingSupported=!r.disableStream}return g(e,[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var e=d(a.default.mark(function e(){var t,r;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:if(!this._done){e.next=4;break}return e.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){e.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){e.next=10;break}return this._readCapability=(0,i.createPromiseCapability)(),e.abrupt("return",this.read());case 10:return this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded}),r=new Uint8Array(t).buffer,e.abrupt("return",{value:r,done:!1});case 14:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}},{key:"_error",value:function(e){this._storedError=e,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(e){var t=this;this._readableStream=e,e.on("readable",function(){t._readCapability.resolve()}),e.on("end",function(){e.destroy(),t._done=!0,t._readCapability.resolve()}),e.on("error",function(e){t._error(e)}),this._storedError&&this._readableStream.destroy(this._storedError)}}]),e}();function C(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}var P=function(e){s(r,w);var t=u(r);function r(e){var n;v(this,r);var a=function(t){if(404===t.statusCode){var r=new i.MissingPDFException('Missing PDF "'.concat(n._url,'".'));return n._storedError=r,void n._headersCapability.reject(r)}n._headersCapability.resolve(),n._setReadableStream(t);var a=function(e){return n._readableStream.headers[e.toLowerCase()]},s=(0,o.validateRangeRequestCapabilities)({getResponseHeader:a,isHttp:e.isHttp,rangeChunkSize:n._rangeChunkSize,disableRange:n._disableRange}),l=s.allowRangeRequests,u=s.suggestedLength;n._isRangeSupported=l,n._contentLength=u||n._contentLength,n._filename=(0,o.extractFilenameFromHeader)(a)};return(n=t.call(this,e))._request=null,"http:"===n._url.protocol?n._request=b.request(C(n._url,e.httpHeaders),a):n._request=_.request(C(n._url,e.httpHeaders),a),n._request.on("error",function(e){n._storedError=e,n._headersCapability.reject(e)}),n._request.end(),n}return r}(),T=function(e){s(r,x);var t=u(r);function r(e,n,a){var o;for(var s in v(this,r),(o=t.call(this,e))._httpHeaders={},e.httpHeaders){var l=e.httpHeaders[s];void 0!==l&&(o._httpHeaders[s]=l)}o._httpHeaders.Range="bytes=".concat(n,"-").concat(a-1);var u=function(e){if(404!==e.statusCode)o._setReadableStream(e);else{var t=new i.MissingPDFException('Missing PDF "'.concat(o._url,'".'));o._storedError=t}};return o._request=null,"http:"===o._url.protocol?o._request=b.request(C(o._url,o._httpHeaders),u):o._request=_.request(C(o._url,o._httpHeaders),u),o._request.on("error",function(e){o._storedError=e}),o._request.end(),o}return r}(),R=function(e){s(r,w);var t=u(r);function r(e){var n;v(this,r),n=t.call(this,e);var a=decodeURIComponent(n._url.path);return S.test(n._url.href)&&(a=a.replace(/^\//,"")),m.lstat(a,function(e,t){if(e)return"ENOENT"===e.code&&(e=new i.MissingPDFException('Missing PDF "'.concat(a,'".'))),n._storedError=e,void n._headersCapability.reject(e);n._contentLength=t.size,n._setReadableStream(m.createReadStream(a)),n._headersCapability.resolve()}),n}return r}(),E=function(e){s(r,x);var t=u(r);function r(e,n,a){var i;v(this,r),i=t.call(this,e);var o=decodeURIComponent(i._url.path);return S.test(i._url.href)&&(o=o.replace(/^\//,"")),i._setReadableStream(m.createReadStream(o,{start:n,end:a-1})),i}return r}()},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=function(e,t){if(404===e||0===e&&t.startsWith("file:"))return new n.MissingPDFException('Missing PDF "'+t+'".');return new n.UnexpectedResponseException("Unexpected server response (".concat(e,') while retrieving PDF "').concat(t,'".'),e)},t.extractFilenameFromHeader=function(e){var t=e("Content-Disposition");if(t){var r=(0,a.getFilenameFromContentDispositionHeader)(t);if(r.includes("%"))try{r=decodeURIComponent(r)}catch(e){}if((0,i.isPdfFile)(r))return r}return null},t.validateRangeRequestCapabilities=function(e){var t=e.getResponseHeader,r=e.isHttp,a=e.rangeChunkSize,i=e.disableRange;(0,n.assert)(a>0,"Range chunk size must be larger than zero");var o={allowRangeRequests:!1,suggestedLength:void 0},s=parseInt(t("Content-Length"),10);if(!Number.isInteger(s))return o;if(o.suggestedLength=s,s<=2*a)return o;if(i||!r)return o;if("bytes"!==t("Accept-Ranges"))return o;if("identity"!==(t("Content-Encoding")||"identity"))return o;return o.allowRangeRequests=!0,o},t.validateResponseStatus=function(e){return 200===e||206===e};var n=r(4),a=r(132),i=r(1)},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=function(e){var t=!0,r=l("filename\\*","i").exec(e);if(r){var i=f(r=r[1]);return c(i=h(i=d(i=unescape(i))))}if(r=function(e){for(var t,r=[],n=l("filename\\*((?!0\\d)\\d+)(\\*?)","ig");null!==(t=n.exec(e));){var i=t,o=a(i,4),s=o[1],u=o[2],c=o[3];if((s=parseInt(s,10))in r){if(0===s)break}else r[s]=[u,c]}for(var h=[],p=0;p<r.length&&p in r;++p){var v=a(r[p],2),y=v[0],g=v[1];g=f(g),y&&(g=unescape(g),0===p&&(g=d(g))),h.push(g)}return h.join("")}(e)){var o=h(r);return c(o)}if(r=l("filename","i").exec(e)){var s=f(r=r[1]);return c(s=h(s))}function l(e,t){return new RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function u(e,r){if(e){if(!/^[\x00-\xFF]+$/.test(r))return r;try{var a=new TextDecoder(e,{fatal:!0}),i=(0,n.stringToBytes)(r);r=a.decode(i),t=!1}catch(n){if(/^utf-?8$/i.test(e))try{r=decodeURIComponent(escape(r)),t=!1}catch(e){}}}return r}function c(e){return t&&/[\x80-\xff]/.test(e)&&(e=u("utf-8",e),t&&(e=u("iso-8859-1",e))),e}function f(e){if(e.startsWith('"')){for(var t=e.slice(1).split('\\"'),r=0;r<t.length;++r){var n=t[r].indexOf('"');-1!==n&&(t[r]=t[r].slice(0,n),t.length=r+1),t[r]=t[r].replace(/\\(.)/g,"$1")}e=t.join('"')}return e}function d(e){var t=e.indexOf("'");if(-1===t)return e;var r=e.slice(0,t),n=e.slice(t+1),a=n.replace(/^[^']*'/,"");return u(r,a)}function h(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(e,t,r,n){if("q"===r||"Q"===r)return n=(n=n.replace(/_/g," ")).replace(/=([0-9a-fA-F]{2})/g,function(e,t){return String.fromCharCode(parseInt(t,16))}),u(t,n);try{n=atob(n)}catch(e){}return u(t,n)})}return""};var n=r(4);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),a=r(4),i=r(131);function o(e,t,r,n,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function s(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function s(e){o(i,n,a,s,l,"next",e)}function l(e){o(i,n,a,s,l,"throw",e)}s(void 0)})}}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),e}var h=function(){function e(t,r){c(this,e),this.url=t,r=r||{},this.isHttp=/^https?:/i.test(t),this.httpHeaders=this.isHttp&&r.httpHeaders||{},this.withCredentials=r.withCredentials||!1,this.getXhr=r.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}return d(e,[{key:"requestRange",value:function(e,t,r){var n={begin:e,end:t};for(var a in r)n[a]=r[a];return this.request(n)}},{key:"requestFull",value:function(e){return this.request(e)}},{key:"request",value:function(e){var t=this.getXhr(),r=this.currXhrId++,n=this.pendingRequests[r]={xhr:t};for(var a in t.open("GET",this.url),t.withCredentials=this.withCredentials,this.httpHeaders){var i=this.httpHeaders[a];void 0!==i&&t.setRequestHeader(a,i)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range","bytes=".concat(e.begin,"-").concat(e.end-1)),n.expectedStatus=206):n.expectedStatus=200,t.responseType="arraybuffer",e.onError&&(t.onerror=function(r){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,r),t.onprogress=this.onProgress.bind(this,r),n.onHeadersReceived=e.onHeadersReceived,n.onDone=e.onDone,n.onError=e.onError,n.onProgress=e.onProgress,t.send(null),r}},{key:"onProgress",value:function(e,t){var r=this.pendingRequests[e];r&&r.onProgress&&r.onProgress(t)}},{key:"onStateChange",value:function(e,t){var r=this.pendingRequests[e];if(r){var n=r.xhr;if(n.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),4===n.readyState&&e in this.pendingRequests)if(delete this.pendingRequests[e],0===n.status&&this.isHttp)r.onError&&r.onError(n.status);else{var i=n.status||200;if(200===i&&206===r.expectedStatus||i===r.expectedStatus){var o=function(e){var t=e.response;return"string"!=typeof t?t:(0,a.stringToBytes)(t).buffer}(n);if(206===i){var s=n.getResponseHeader("Content-Range"),l=/bytes (\d+)-(\d+)\/(\d+)/.exec(s);r.onDone({begin:parseInt(l[1],10),chunk:o})}else o?r.onDone({begin:0,chunk:o}):r.onError&&r.onError(n.status)}else r.onError&&r.onError(n.status)}}}},{key:"getRequestXhr",value:function(e){return this.pendingRequests[e].xhr}},{key:"isPendingRequest",value:function(e){return e in this.pendingRequests}},{key:"abortRequest",value:function(e){var t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}]),e}(),p=function(){function e(t){c(this,e),this._source=t,this._manager=new h(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}return d(e,[{key:"_onRangeRequestReaderClosed",value:function(e){var t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}},{key:"getFullReader",value:function(){return(0,a.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new v(this._manager,this._source),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){var r=new y(this._manager,e,t);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t,r=l(this._rangeRequestReaders.slice(0));try{for(r.s();!(t=r.n()).done;){t.value.cancel(e)}}catch(e){r.e(e)}finally{r.f()}}}]),e}();t.PDFNetworkStream=p;var v=function(){function e(t,r){c(this,e),this._manager=t;var n={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=r.url,this._fullRequestId=t.requestFull(n),this._headersReceivedCapability=(0,a.createPromiseCapability)(),this._disableRange=r.disableRange||!1,this._contentLength=r.length,this._rangeChunkSize=r.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}return d(e,[{key:"_onHeadersReceived",value:function(){var e=this._fullRequestId,t=this._manager.getRequestXhr(e),r=function(e){return t.getResponseHeader(e)},n=(0,i.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),a=n.allowRangeRequests,o=n.suggestedLength;a&&(this._isRangeSupported=!0),this._contentLength=o||this._contentLength,this._filename=(0,i.extractFilenameFromHeader)(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function(e){e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk));if(this._done=!0,!(this._cachedChunks.length>0)){var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;){t.value.resolve({value:void 0,done:!0})}}catch(e){r.e(e)}finally{r.f()}this._requests.length=0}}},{key:"_onError",value:function(e){var t=this._url,r=(0,i.createResponseStatusError)(e,t);this._storedError=r,this._headersReceivedCapability.reject(r);var n,a=l(this._requests);try{for(a.s();!(n=a.n()).done;){n.value.reject(r)}}catch(e){a.e(e)}finally{a.f()}this._requests.length=0,this._cachedChunks.length=0}},{key:"_onProgress",value:function(e){this.onProgress&&this.onProgress({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"contentLength",get:function(){return this._contentLength}},{key:"headersReady",get:function(){return this._headersReceivedCapability.promise}},{key:"read",value:function(){var e=s(n.default.mark(function e(){var t,r;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._storedError){e.next=2;break}throw this._storedError;case 2:if(!(this._cachedChunks.length>0)){e.next=5;break}return t=this._cachedChunks.shift(),e.abrupt("return",{value:t,done:!1});case 5:if(!this._done){e.next=7;break}return e.abrupt("return",{value:void 0,done:!0});case 7:return r=(0,a.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 10:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0,this._headersReceivedCapability.reject(e);var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;){t.value.resolve({value:void 0,done:!0})}}catch(e){r.e(e)}finally{r.f()}this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}]),e}(),y=function(){function e(t,r,n){c(this,e),this._manager=t;var a={onDone:this._onDone.bind(this),onProgress:this._onProgress.bind(this)};this._requestId=t.requestRange(r,n,a),this._requests=[],this._queuedChunk=null,this._done=!1,this.onProgress=null,this.onClosed=null}return d(e,[{key:"_close",value:function(){this.onClosed&&this.onClosed(this)}},{key:"_onDone",value:function(e){var t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t;this._done=!0;var r,n=l(this._requests);try{for(n.s();!(r=n.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(e){n.e(e)}finally{n.f()}this._requests.length=0,this._close()}},{key:"_onProgress",value:function(e){!this.isStreamingSupported&&this.onProgress&&this.onProgress({loaded:e.loaded})}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:function(){var e=s(n.default.mark(function e(){var t,r;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null===this._queuedChunk){e.next=4;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 4:if(!this._done){e.next=6;break}return e.abrupt("return",{value:void 0,done:!0});case 6:return r=(0,a.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 9:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0;var t,r=l(this._requests);try{for(r.s();!(t=r.n()).done;){t.value.resolve({value:void 0,done:!0})}}catch(e){r.e(e)}finally{r.f()}this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}]),e}()},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),a=r(4),i=r(131);function o(e,t,r,n,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function s(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function s(e){o(i,n,a,s,l,"next",e)}function l(e){o(i,n,a,s,l,"throw",e)}s(void 0)})}}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),e}function h(e,t,r){return{method:"GET",headers:e,signal:null==r?void 0:r.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function p(e){var t=new Headers;for(var r in e){var n=e[r];void 0!==n&&t.append(r,n)}return t}var v=function(){function e(t){c(this,e),this.source=t,this.isHttp=/^https?:/i.test(t.url),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return d(e,[{key:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"getFullReader",value:function(){return(0,a.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new y(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=new g(this,e,t);return this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t,r=l(this._rangeRequestReaders.slice(0));try{for(r.s();!(t=r.n()).done;){t.value.cancel(e)}}catch(e){r.e(e)}finally{r.f()}}}]),e}();t.PDFFetchStream=v;var y=function(){function e(t){var r=this;c(this,e),this._stream=t,this._reader=null,this._loaded=0,this._filename=null;var n=t.source;this._withCredentials=n.withCredentials||!1,this._contentLength=n.length,this._headersCapability=(0,a.createPromiseCapability)(),this._disableRange=n.disableRange||!1,this._rangeChunkSize=n.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._isStreamingSupported=!n.disableStream,this._isRangeSupported=!n.disableRange,this._headers=p(this._stream.httpHeaders);var o=n.url;fetch(o,h(this._headers,this._withCredentials,this._abortController)).then(function(e){if(!(0,i.validateResponseStatus)(e.status))throw(0,i.createResponseStatusError)(e.status,o);r._reader=e.body.getReader(),r._headersCapability.resolve();var t=function(t){return e.headers.get(t)},n=(0,i.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:r._stream.isHttp,rangeChunkSize:r._rangeChunkSize,disableRange:r._disableRange}),s=n.allowRangeRequests,l=n.suggestedLength;r._isRangeSupported=s,r._contentLength=l||r._contentLength,r._filename=(0,i.extractFilenameFromHeader)(t),!r._isStreamingSupported&&r._isRangeSupported&&r.cancel(new a.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}return d(e,[{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var e=s(n.default.mark(function e(){var t,r,a,i;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._headersCapability.promise;case 2:return e.next=4,this._reader.read();case 4:if(t=e.sent,r=t.value,!(a=t.done)){e.next=9;break}return e.abrupt("return",{value:r,done:a});case 9:return this._loaded+=r.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),i=new Uint8Array(r).buffer,e.abrupt("return",{value:i,done:!1});case 13:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}}]),e}(),g=function(){function e(t,r,n){var o=this;c(this,e),this._stream=t,this._reader=null,this._loaded=0;var s=t.source;this._withCredentials=s.withCredentials||!1,this._readCapability=(0,a.createPromiseCapability)(),this._isStreamingSupported=!s.disableStream,"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._headers=p(this._stream.httpHeaders),this._headers.append("Range","bytes=".concat(r,"-").concat(n-1));var l=s.url;fetch(l,h(this._headers,this._withCredentials,this._abortController)).then(function(e){if(!(0,i.validateResponseStatus)(e.status))throw(0,i.createResponseStatusError)(e.status,l);o._readCapability.resolve(),o._reader=e.body.getReader()}).catch(function(e){if("AbortError"!==(null==e?void 0:e.name))throw e}),this.onProgress=null}return d(e,[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var e=s(n.default.mark(function e(){var t,r,a,i;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:return e.next=4,this._reader.read();case 4:if(t=e.sent,r=t.value,!(a=t.done)){e.next=9;break}return e.abrupt("return",{value:r,done:a});case 9:return this._loaded+=r.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded}),i=new Uint8Array(r).buffer,e.abrupt("return",{value:i,done:!1});case 13:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}}]),e}()}],__webpack_module_cache__={};function __w_pdfjs_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__w_pdfjs_require__),r.loaded=!0,r.exports}__w_pdfjs_require__.nmd=(e=>(e.paths=[],e.children||(e.children=[]),e));var __webpack_exports__={};return(()=>{"use strict";var e=__webpack_exports__;Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addLinkAttributes",{enumerable:!0,get:function(){return t.addLinkAttributes}}),Object.defineProperty(e,"getFilenameFromUrl",{enumerable:!0,get:function(){return t.getFilenameFromUrl}}),Object.defineProperty(e,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return t.getPdfFilenameFromUrl}}),Object.defineProperty(e,"isPdfFile",{enumerable:!0,get:function(){return t.isPdfFile}}),Object.defineProperty(e,"LinkTarget",{enumerable:!0,get:function(){return t.LinkTarget}}),Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return t.loadScript}}),Object.defineProperty(e,"PDFDateString",{enumerable:!0,get:function(){return t.PDFDateString}}),Object.defineProperty(e,"RenderingCancelledException",{enumerable:!0,get:function(){return t.RenderingCancelledException}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return r.build}}),Object.defineProperty(e,"getDocument",{enumerable:!0,get:function(){return r.getDocument}}),Object.defineProperty(e,"LoopbackPort",{enumerable:!0,get:function(){return r.LoopbackPort}}),Object.defineProperty(e,"PDFDataRangeTransport",{enumerable:!0,get:function(){return r.PDFDataRangeTransport}}),Object.defineProperty(e,"PDFWorker",{enumerable:!0,get:function(){return r.PDFWorker}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return r.version}}),Object.defineProperty(e,"CMapCompressionType",{enumerable:!0,get:function(){return n.CMapCompressionType}}),Object.defineProperty(e,"createObjectURL",{enumerable:!0,get:function(){return n.createObjectURL}}),Object.defineProperty(e,"createPromiseCapability",{enumerable:!0,get:function(){return n.createPromiseCapability}}),Object.defineProperty(e,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return n.createValidAbsoluteUrl}}),Object.defineProperty(e,"InvalidPDFException",{enumerable:!0,get:function(){return n.InvalidPDFException}}),Object.defineProperty(e,"MissingPDFException",{enumerable:!0,get:function(){return n.MissingPDFException}}),Object.defineProperty(e,"OPS",{enumerable:!0,get:function(){return n.OPS}}),Object.defineProperty(e,"PasswordResponses",{enumerable:!0,get:function(){return n.PasswordResponses}}),Object.defineProperty(e,"PermissionFlag",{enumerable:!0,get:function(){return n.PermissionFlag}}),Object.defineProperty(e,"removeNullCharacters",{enumerable:!0,get:function(){return n.removeNullCharacters}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return n.shadow}}),Object.defineProperty(e,"UnexpectedResponseException",{enumerable:!0,get:function(){return n.UnexpectedResponseException}}),Object.defineProperty(e,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return n.UNSUPPORTED_FEATURES}}),Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return n.Util}}),Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return n.VerbosityLevel}}),Object.defineProperty(e,"AnnotationLayer",{enumerable:!0,get:function(){return a.AnnotationLayer}}),Object.defineProperty(e,"apiCompatibilityParams",{enumerable:!0,get:function(){return i.apiCompatibilityParams}}),Object.defineProperty(e,"GlobalWorkerOptions",{enumerable:!0,get:function(){return o.GlobalWorkerOptions}}),Object.defineProperty(e,"renderTextLayer",{enumerable:!0,get:function(){return s.renderTextLayer}}),Object.defineProperty(e,"SVGGraphics",{enumerable:!0,get:function(){return l.SVGGraphics}}),Object.defineProperty(e,"XfaLayer",{enumerable:!0,get:function(){return u.XfaLayer}});var t=__w_pdfjs_require__(1),r=__w_pdfjs_require__(113),n=__w_pdfjs_require__(4),a=__w_pdfjs_require__(125),i=__w_pdfjs_require__(117),o=__w_pdfjs_require__(120),s=__w_pdfjs_require__(127),l=__w_pdfjs_require__(128),u=__w_pdfjs_require__(129);if(__w_pdfjs_require__(6).isNodeJS){var c=__w_pdfjs_require__(130).PDFNodeStream;(0,r.setPDFNetworkStreamFactory)(function(e){return new c(e)})}else{var f,d=__w_pdfjs_require__(133).PDFNetworkStream;(0,t.isFetchSupported)()&&(f=__w_pdfjs_require__(134).PDFFetchStream),(0,r.setPDFNetworkStreamFactory)(function(e){return f&&(0,t.isValidFetchUrl)(e.url)?new f(e):new d(e)})}})(),__webpack_exports__})()});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf.worker",[],t):"object"==typeof exports?exports["pdfjs-dist/build/pdf.worker"]=t():e["pdfjs-dist/build/pdf.worker"]=e.pdfjsWorker=t()}(this,function(){return(()=>{var e=[,(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerTask=t.WorkerMessageHandler=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),a=r(4),i=r(113),o=r(115),s=r(172),c=r(6),u=r(197),l=r(198),f=r(117);function h(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=m(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function d(e){return y(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(e)||g()}function p(e,t){return y(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||m(e,t)||g()}function g(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(e,t){if(e){if("string"==typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function y(e){if(Array.isArray(e))return e}function b(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function S(e,t,r){return t&&k(e.prototype,t),r&&k(e,r),e}var x=function(){function e(t){w(this,e),this.name=t,this.terminated=!1,this._capability=(0,a.createPromiseCapability)()}return S(e,[{key:"finished",get:function(){return this._capability.promise}},{key:"finish",value:function(){this._capability.resolve()}},{key:"terminate",value:function(){this.terminated=!0}},{key:"ensureNotTerminated",value:function(){if(this.terminated)throw new Error("Worker task was terminated")}}]),e}();t.WorkerTask=x;var A=function(){function e(){w(this,e)}return S(e,null,[{key:"setup",value:function(t,r){var n=!1;t.on("test",function(e){if(!n)if(n=!0,e instanceof Uint8Array){var r=255===e[0];t.postMessageTransfers=r,t.send("test",{supportTransfers:r})}else t.send("test",null)}),t.on("configure",function(e){(0,a.setVerbosityLevel)(e.verbosity)}),t.on("GetDocRequest",function(t){return e.createDocumentHandler(t,r)})}},{key:"createDocumentHandler",value:function(e,t){var r,c=!1,g=null,m=[],v=(0,a.getVerbosityLevel)(),y=e.apiVersion;if("2.9.359"!==y)throw new Error('The API version "'.concat(y,'" does not match ')+'the Worker version "'.concat("2.9.359",'".'));var w=[];for(var k in[])w.push(k);if(w.length)throw new Error("The `Array.prototype` contains unexpected enumerable properties: "+w.join(", ")+"; thus breaking e.g. `for...in` iteration of `Array`s.");var S=e.docId,A=e.docBaseUrl,O=e.docId+"_worker",C=new u.MessageHandler(O,S,t);function T(){if(c)throw new Error("Worker was terminated")}function F(e){m.push(e)}function _(e){e.finish();var t=m.indexOf(e);m.splice(t,1)}function P(e){return I.apply(this,arguments)}function I(){var e;return e=n.default.mark(function e(t){var a,i,o,s,c,u;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.ensureDoc("checkHeader");case 2:return e.next=4,r.ensureDoc("parseStartXRef");case 4:return e.next=6,r.ensureDoc("parse",[t]);case 6:if(t){e.next=9;break}return e.next=9,r.ensureDoc("checkFirstPage");case 9:return e.next=11,Promise.all([r.ensureDoc("numPages"),r.ensureDoc("fingerprint"),r.ensureDoc("isPureXfa")]);case 11:if(a=e.sent,i=p(a,3),o=i[0],s=i[1],!(c=i[2])){e.next=21;break}return F(u=new x("loadXfaFonts")),e.next=21,r.loadXfaFonts(C,u).catch(function(e){}).then(function(){return _(u)});case 21:return e.abrupt("return",{numPages:o,fingerprint:s,isPureXfa:c});case 22:case"end":return e.stop()}},e)}),(I=function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(e){b(i,n,a,o,s,"next",e)}function s(e){b(i,n,a,o,s,"throw",e)}o(void 0)})}).apply(this,arguments)}function E(e,t,r){var n,i=(0,a.createPromiseCapability)(),s=e.source;if(s.data){try{n=new o.LocalPdfManager(S,s.data,s.password,t,r,A),i.resolve(n)}catch(e){i.reject(e)}return i.promise}var c,u=[];try{c=new l.PDFWorkerStream(C)}catch(e){return i.reject(e),i.promise}var f=c.getFullReader();f.headersReady.then(function(){if(f.isRangeSupported){var e=s.disableAutoFetch||f.isStreamingSupported;n=new o.NetworkPdfManager(S,c,{msgHandler:C,password:s.password,length:f.contentLength,disableAutoFetch:e,rangeChunkSize:s.rangeChunkSize},t,r,A);for(var a=0;a<u.length;a++)n.sendProgressiveData(u[a]);u=[],i.resolve(n),g=null}}).catch(function(e){i.reject(e),g=null});var h=0;return new Promise(function(e,c){f.read().then(function e(l){var d=l.value,p=l.done;try{if(T(),p)return n||function(){var e=(0,a.arraysToBytes)(u);s.length&&e.length!==s.length&&(0,a.warn)("reported HTTP length is different from actual");try{n=new o.LocalPdfManager(S,e,s.password,t,r,A),i.resolve(n)}catch(e){i.reject(e)}u=[]}(),void(g=null);h+=(0,a.arrayByteLength)(d),f.isStreamingSupported||C.send("DocProgress",{loaded:h,total:Math.max(h,f.contentLength||0)}),n?n.sendProgressiveData(d):u.push(d),f.read().then(e,c)}catch(e){c(e)}},c)}).catch(function(e){i.reject(e),g=null}),g=function(e){c.cancelAllRequests(e)},i.promise}return C.postMessageTransfers=e.postMessageTransfers,C.on("GetPage",function(e){return r.getPage(e.pageIndex).then(function(e){return Promise.all([r.ensure(e,"rotate"),r.ensure(e,"ref"),r.ensure(e,"userUnit"),r.ensure(e,"view")]).then(function(e){var t=p(e,4);return{rotate:t[0],ref:t[1],userUnit:t[2],view:t[3]}})})}),C.on("GetPageIndex",function(e){var t=e.ref,n=i.Ref.get(t.num,t.gen);return r.ensureCatalog("getPageIndex",[n])}),C.on("GetDestinations",function(e){return r.ensureCatalog("destinations")}),C.on("GetDestination",function(e){return r.ensureCatalog("getDestination",[e.id])}),C.on("GetPageLabels",function(e){return r.ensureCatalog("pageLabels")}),C.on("GetPageLayout",function(e){return r.ensureCatalog("pageLayout")}),C.on("GetPageMode",function(e){return r.ensureCatalog("pageMode")}),C.on("GetViewerPreferences",function(e){return r.ensureCatalog("viewerPreferences")}),C.on("GetOpenAction",function(e){return r.ensureCatalog("openAction")}),C.on("GetAttachments",function(e){return r.ensureCatalog("attachments")}),C.on("GetJavaScript",function(e){return r.ensureCatalog("javaScript")}),C.on("GetDocJSActions",function(e){return r.ensureCatalog("jsActions")}),C.on("GetPageJSActions",function(e){var t=e.pageIndex;return r.getPage(t).then(function(e){return r.ensure(e,"jsActions")})}),C.on("GetPageXfa",function(e){var t=e.pageIndex;return r.getPage(t).then(function(e){return r.ensure(e,"xfaData")})}),C.on("GetOutline",function(e){return r.ensureCatalog("documentOutline")}),C.on("GetOptionalContentConfig",function(e){return r.ensureCatalog("optionalContentConfig")}),C.on("GetPermissions",function(e){return r.ensureCatalog("permissions")}),C.on("GetMetadata",function(e){return Promise.all([r.ensureDoc("documentInfo"),r.ensureCatalog("metadata")])}),C.on("GetMarkInfo",function(e){return r.ensureCatalog("markInfo")}),C.on("GetData",function(e){return r.requestLoadedStream(),r.onLoadedStream().then(function(e){return e.bytes})}),C.on("GetStats",function(e){return r.ensureXRef("stats")}),C.on("GetAnnotations",function(e){var t=e.pageIndex,n=e.intent;return r.getPage(t).then(function(e){return e.getAnnotationsData(n)})}),C.on("GetFieldObjects",function(e){return r.ensureDoc("fieldObjects")}),C.on("HasJSActions",function(e){return r.ensureDoc("hasJSActions")}),C.on("GetCalculationOrderIds",function(e){return r.ensureDoc("calculationOrderIds")}),C.on("SaveDocument",function(e){var t=e.numPages,n=e.annotationStorage,o=e.filename;r.requestLoadedStream();for(var c=[r.onLoadedStream(),r.ensureCatalog("acroForm"),r.ensureDoc("xref"),r.ensureDoc("startXRef")],u=function(e){c.push(r.getPage(e).then(function(t){var r=new x("Save: page ".concat(e));return F(r),t.save(C,r,n).finally(function(){_(r)})}))},l=0;l<t;l++)u(l);return Promise.all(c).then(function(e){var t,r=d(e),n=r[0],c=r[1],u=r[2],l=r[3],f=[],p=h(r.slice(4));try{for(p.s();!(t=p.n()).done;){f=t.value.filter(function(e){return null!==e}).reduce(function(e,t){return e.concat(t)},f)}}catch(e){p.e(e)}finally{p.f()}if(0===f.length)return n.bytes;var g=c instanceof i.Dict&&c.get("XFA")||[],m=null;if(Array.isArray(g))for(var v=0,y=g.length;v<y;v+=2)"datasets"===g[v]&&(m=g[v+1]);else(0,a.warn)("Unsupported XFA type.");var b=Object.create(null);if(u.trailer){var w=Object.create(null),k=u.trailer.get("Info")||null;k instanceof i.Dict&&k.forEach(function(e,t){(0,a.isString)(e)&&(0,a.isString)(t)&&(w[e]=(0,a.stringToPDFString)(t))}),b={rootRef:u.trailer.getRaw("Root")||null,encryptRef:u.trailer.getRaw("Encrypt")||null,newRef:u.getNewRef(),infoRef:u.trailer.getRaw("Info")||null,info:w,fileIds:u.trailer.get("ID")||null,startXRef:l,filename:o}}return u.resetNewRef(),(0,s.incrementalUpdate)({originalData:n.bytes,xrefInfo:b,newRefs:f,xref:u,datasetsRef:m})})}),C.on("GetOperatorList",function(e,t){var n=e.pageIndex;r.getPage(n).then(function(r){var i=new x("GetOperatorList: page ".concat(n));F(i);var o=v>=a.VerbosityLevel.INFOS?Date.now():0;r.getOperatorList({handler:C,sink:t,task:i,intent:e.intent,renderInteractiveForms:e.renderInteractiveForms,annotationStorage:e.annotationStorage}).then(function(e){_(i),o&&(0,a.info)("page=".concat(n+1," - getOperatorList: time=")+"".concat(Date.now()-o,"ms, len=").concat(e.length)),t.close()},function(e){_(i),i.terminated||(C.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorOperatorList}),t.error(e))})})}),C.on("GetTextContent",function(e,t){var n=e.pageIndex;t.onPull=function(e){},t.onCancel=function(e){},r.getPage(n).then(function(r){var i=new x("GetTextContent: page "+n);F(i);var o=v>=a.VerbosityLevel.INFOS?Date.now():0;r.extractTextContent({handler:C,task:i,sink:t,normalizeWhitespace:e.normalizeWhitespace,includeMarkedContent:e.includeMarkedContent,combineTextItems:e.combineTextItems}).then(function(){_(i),o&&(0,a.info)("page=".concat(n+1," - getTextContent: time=")+"".concat(Date.now()-o,"ms")),t.close()},function(e){_(i),i.terminated||t.error(e)})})}),C.on("GetStructTree",function(e){return r.getPage(e.pageIndex).then(function(e){return r.ensure(e,"getStructTree")})}),C.on("FontFallback",function(e){return r.fontFallback(e.id,C)}),C.on("Cleanup",function(e){return r.cleanup(!0)}),C.on("Terminate",function(e){c=!0;var t=[];if(r){r.terminate(new a.AbortException("Worker was terminated."));var n=r.cleanup();t.push(n),r=null}else(0,i.clearPrimitiveCaches)();g&&g(new a.AbortException("Worker was terminated."));var o,s=h(m);try{for(s.s();!(o=s.n()).done;){var u=o.value;t.push(u.finished),u.terminate()}}catch(e){s.e(e)}finally{s.f()}return Promise.all(t).then(function(){C.destroy(),C=null})}),C.on("Ready",function(t){!function(e){function t(e){T(),C.send("GetDoc",{pdfInfo:e})}function n(e){if(T(),e instanceof a.PasswordException){var t=new x("PasswordException: response ".concat(e.code));F(t),C.sendWithPromise("PasswordRequest",e).then(function(e){var n=e.password;_(t),r.updatePassword(n),i()}).catch(function(){_(t),C.send("DocException",e)})}else e instanceof a.InvalidPDFException||e instanceof a.MissingPDFException||e instanceof a.UnexpectedResponseException||e instanceof a.UnknownErrorException?C.send("DocException",e):C.send("DocException",new a.UnknownErrorException(e.message,e.toString()))}function i(){T(),P(!1).then(t,function(e){T(),e instanceof f.XRefParseException?(r.requestLoadedStream(),r.onLoadedStream().then(function(){T(),P(!0).then(t,n)})):n(e)})}T(),E(e,{maxImageSize:e.maxImageSize,disableFontFace:e.disableFontFace,ignoreErrors:e.ignoreErrors,isEvalSupported:e.isEvalSupported,fontExtraProperties:e.fontExtraProperties},e.enableXfa).then(function(e){if(c)throw e.terminate(new a.AbortException("Worker was terminated.")),new Error("Worker was terminated");(r=e).onLoadedStream().then(function(e){C.send("DataLoaded",{length:e.bytes.byteLength})})}).then(i,n)}(e),e=null}),O}},{key:"initializeFromPort",value:function(t){var r=new u.MessageHandler("worker","main",t);e.setup(r,t),r.send("ready",null)}}]),e}();t.WorkerMessageHandler=A,"undefined"==typeof window&&!c.isNodeJS&&"undefined"!=typeof self&&function(e){return"function"==typeof e.postMessage&&"onmessage"in e}(self)&&A.initializeFromPort(self)},(e,t,r)=>{"use strict";e.exports=r(3)},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=function(e){var t,r=Object.prototype,a=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof v?t:v,i=Object.create(a.prototype),o=new _(n||[]);return i._invoke=function(e,t,r){var n=h;return function(a,i){if(n===p)throw new Error("Generator is already running");if(n===g){if("throw"===a)throw i;return I()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=C(o,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var c=f(e,t,r);if("normal"===c.type){if(n=r.done?g:d,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=g,r.method="throw",r.arg=c.arg)}}}(e,r,o),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",p="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};w[o]=function(){return this};var k=Object.getPrototypeOf,S=k&&k(k(P([])));S&&S!==r&&a.call(S,o)&&(w=S);var x=b.prototype=v.prototype=Object.create(w);function A(e){["next","throw","return"].forEach(function(t){u(e,t,function(e){return this._invoke(t,e)})})}function O(e,t){var r;this._invoke=function(i,o){function s(){return new t(function(r,s){!function r(i,o,s,c){var u=f(e[i],e,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"===n(h)&&a.call(h,"__await")?t.resolve(h.__await).then(function(e){r("next",e,s,c)},function(e){r("throw",e,s,c)}):t.resolve(h).then(function(e){l.value=e,s(l)},function(e){return r("throw",e,s,c)})}c(u.arg)}(i,o,r,s)})}return r=r?r.then(s,s):s()}}function C(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method))return m;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var a=f(n,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function F(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function P(e){if(e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function r(){for(;++n<e.length;)if(a.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}return{next:I}}function I(){return{value:t,done:!0}}return y.prototype=x.constructor=b,b.constructor=y,y.displayName=u(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,c,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},A(O.prototype),O.prototype[s]=function(){return this},e.AsyncIterator=O,e.async=function(t,r,n,a,i){void 0===i&&(i=Promise);var o=new O(l(t,r,n,a),i);return e.isGeneratorFunction(r)?o:o.next().then(function(e){return e.done?e.value:o.next()})},A(x),u(x,c,"Generator"),x[o]=function(){return this},x.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=P,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(F),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,a){return s.type="throw",s.arg=e,r.next=n,a&&(r.method="next",r.arg=t),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),F(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;F(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}("object"===n(e=r.nmd(e))?e.exports:{});try{regeneratorRuntime=a}catch(e){Function("r","regeneratorRuntime = r")(a)}},(e,t,r)=>{"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,n=f(e);if(t){var a=f(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.arrayByteLength=F,t.arraysToBytes=function(e){var t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];for(var r=0,n=0;n<t;n++)r+=F(e[n]);for(var a=0,i=new Uint8Array(r),o=0;o<t;o++){var s=e[o];s instanceof Uint8Array||(s="string"==typeof s?T(s):new Uint8Array(s));var c=s.byteLength;i.set(s,a),a+=c}return i},t.assert=m,t.bytesToString=function(e){m(null!==e&&"object"===o(e)&&void 0!==e.length,"Invalid argument for bytesToString");var t=e.length;if(t<8192)return String.fromCharCode.apply(null,e);for(var r=[],n=0;n<t;n+=8192){var a=Math.min(n+8192,t),i=e.subarray(n,a);r.push(String.fromCharCode.apply(null,i))}return r.join("")},t.createObjectURL=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(URL.createObjectURL&&!r)return URL.createObjectURL(new Blob([e],{type:t}));for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a="data:".concat(t,";base64,"),i=0,o=e.length;i<o;i+=3){var s=255&e[i],c=255&e[i+1],u=255&e[i+2],l=s>>2,f=(3&s)<<4|c>>4,h=i+1<o?(15&c)<<2|u>>6:64,d=i+2<o?63&u:64;a+=n[l]+n[f]+n[h]+n[d]}return a},t.createPromiseCapability=function(){var e=Object.create(null),t=!1;return Object.defineProperty(e,"settled",{get:function(){return t}}),e.promise=new Promise(function(r,n){e.resolve=function(e){t=!0,r(e)},e.reject=function(e){t=!0,n(e)}}),e},t.createValidAbsoluteUrl=function(e,t){if(!e)return null;try{var r=t?new URL(e,t):new URL(e);if(function(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r))return r}catch(e){}return null},t.escapeString=function(e){return e.replace(/([()\\\n\r])/g,function(e){return"\n"===e?"\\n":"\r"===e?"\\r":"\\".concat(e)})},t.getModificationDate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")},t.getVerbosityLevel=function(){return d},t.info=function(e){d>=h.INFOS&&console.log("Info: ".concat(e))},t.isArrayBuffer=function(e){return"object"===o(e)&&null!==e&&void 0!==e.byteLength},t.isArrayEqual=function(e,t){if(e.length!==t.length)return!1;for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0},t.isAscii=function(e){return/^[\x00-\x7F]*$/.test(e)},t.isBool=function(e){return"boolean"==typeof e},t.isNum=function(e){return"number"==typeof e},t.isSameOrigin=function(e,t){var r;try{if(!(r=new URL(e)).origin||"null"===r.origin)return!1}catch(e){return!1}var n=new URL(t,r);return r.origin===n.origin},t.isString=function(e){return"string"==typeof e},t.objectFromMap=function(e){var t,r=Object.create(null),n=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=a(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw o}}}}(e);try{for(n.s();!(t=n.n()).done;){var i=(c=t.value,u=2,function(e){if(Array.isArray(e))return e}(c)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(c,u)||a(c,u)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=i[0],s=i[1];r[o]=s}}catch(e){n.e(e)}finally{n.f()}var c,u;return r},t.objectSize=function(e){return Object.keys(e).length},t.removeNullCharacters=function(e){if("string"!=typeof e)return p("The argument for removeNullCharacters must be a string."),e;return e.replace(C,"")},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(d=e)},t.shadow=v,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=T,t.stringToPDFString=function(e){var t=e.length,r=[];if("þ"===e[0]&&"ÿ"===e[1])for(var n=2;n<t;n+=2)r.push(String.fromCharCode(e.charCodeAt(n)<<8|e.charCodeAt(n+1)));else if("ÿ"===e[0]&&"þ"===e[1])for(var a=2;a<t;a+=2)r.push(String.fromCharCode(e.charCodeAt(a+1)<<8|e.charCodeAt(a)));else for(var i=0;i<t;++i){var o=j[e.charCodeAt(i)];r.push(o?String.fromCharCode(o):e.charAt(i))}return r.join("")},t.stringToUTF16BEString=function(e){for(var t=["þÿ"],r=0,n=e.length;r<n;r++){var a=e.charCodeAt(r);t.push(String.fromCharCode(a>>8&255),String.fromCharCode(255&a))}return t.join("")},t.stringToUTF8String=function(e){return decodeURIComponent(escape(e))},t.unreachable=g,t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=p,t.VerbosityLevel=t.Util=t.UNSUPPORTED_FEATURES=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.PageActionEventType=t.OPS=t.MissingPDFException=t.IsLittleEndianCached=t.IsEvalSupportedCached=t.InvalidPDFException=t.ImageKind=t.IDENTITY_MATRIX=t.FormatError=t.FontType=t.FONT_IDENTITY_MATRIX=t.DocumentActionEventType=t.CMapCompressionType=t.BaseException=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0,r(5);t.IDENTITY_MATRIX=[1,0,0,1,0,0];t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];t.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};t.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};t.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};t.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"};t.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"};t.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"};t.AnnotationReplyType={GROUP:"Group",REPLY:"R"};t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};t.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};t.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};t.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"};t.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};t.PageActionEventType={O:"PageOpen",C:"PageClose"};t.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"};t.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};var h={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=h;t.CMapCompressionType={NONE:0,BINARY:1,STREAM:2};t.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};t.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",signatures:"signatures",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontBuildPath:"errorFontBuildPath",errorFontGetPath:"errorFontGetPath",errorMarkedContent:"errorMarkedContent"};t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var d=h.WARNINGS;function p(e){d>=h.WARNINGS&&console.log("Warning: ".concat(e))}function g(e){throw new Error(e)}function m(e,t){e||g(t)}function v(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}var y=function(){function e(t){this.constructor===e&&g("Cannot initialize BaseException."),this.message=t,this.name=this.constructor.name}return e.prototype=new Error,e.constructor=e,e}();t.BaseException=y;var b=function(e){c(r,y);var t=l(r);function r(e,n){var a;return s(this,r),(a=t.call(this,e)).code=n,a}return r}();t.PasswordException=b;var w=function(e){c(r,y);var t=l(r);function r(e,n){var a;return s(this,r),(a=t.call(this,e)).details=n,a}return r}();t.UnknownErrorException=w;var k=function(e){c(r,y);var t=l(r);function r(){return s(this,r),t.apply(this,arguments)}return r}();t.InvalidPDFException=k;var S=function(e){c(r,y);var t=l(r);function r(){return s(this,r),t.apply(this,arguments)}return r}();t.MissingPDFException=S;var x=function(e){c(r,y);var t=l(r);function r(e,n){var a;return s(this,r),(a=t.call(this,e)).status=n,a}return r}();t.UnexpectedResponseException=x;var A=function(e){c(r,y);var t=l(r);function r(){return s(this,r),t.apply(this,arguments)}return r}();t.FormatError=A;var O=function(e){c(r,y);var t=l(r);function r(){return s(this,r),t.apply(this,arguments)}return r}();t.AbortException=O;var C=/\x00/g;function T(e){m("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),n=0;n<t;++n)r[n]=255&e.charCodeAt(n);return r}function F(e){return void 0!==e.length?e.length:(m(void 0!==e.byteLength,"arrayByteLength - invalid argument."),e.byteLength)}var _={get value(){return v(this,"value",((e=new Uint8Array(4))[0]=1,1===new Uint32Array(e.buffer,0,1)[0]));var e}};t.IsLittleEndianCached=_;var P={get value(){return v(this,"value",function(){try{return new Function(""),!0}catch(e){return!1}}())}};t.IsEvalSupportedCached=P;var I=function(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Array(256).keys()).map(function(e){return e.toString(16).padStart(2,"0")}),E=function(){function e(){s(this,e)}var t,r,a;return t=e,a=[{key:"makeHexColor",value:function(e,t,r){return"#".concat(I[e]).concat(I[t]).concat(I[r])}},{key:"transform",value:function(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}},{key:"applyTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}},{key:"applyInverseTransform",value:function(e,t){var r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]}},{key:"getAxialAlignedBoundingBox",value:function(t,r){var n=e.applyTransform(t,r),a=e.applyTransform(t.slice(2,4),r),i=e.applyTransform([t[0],t[3]],r),o=e.applyTransform([t[2],t[1]],r);return[Math.min(n[0],a[0],i[0],o[0]),Math.min(n[1],a[1],i[1],o[1]),Math.max(n[0],a[0],i[0],o[0]),Math.max(n[1],a[1],i[1],o[1])]}},{key:"inverseTransform",value:function(e){var t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}},{key:"apply3dTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]}},{key:"singularValueDecompose2dScale",value:function(e){var t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],n=e[0]*t[1]+e[1]*t[3],a=e[2]*t[0]+e[3]*t[2],i=e[2]*t[1]+e[3]*t[3],o=(r+i)/2,s=Math.sqrt(Math.pow(r+i,2)-4*(r*i-a*n))/2,c=o+s||1,u=o-s||1;return[Math.sqrt(c),Math.sqrt(u)]}},{key:"normalizeRect",value:function(e){var t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}},{key:"intersect",value:function(t,r){function n(e,t){return e-t}var a=[t[0],t[2],r[0],r[2]].sort(n),i=[t[1],t[3],r[1],r[3]].sort(n),o=[];return t=e.normalizeRect(t),r=e.normalizeRect(r),a[0]===t[0]&&a[1]===r[0]||a[0]===r[0]&&a[1]===t[0]?(o[0]=a[1],o[2]=a[2],i[0]===t[1]&&i[1]===r[1]||i[0]===r[1]&&i[1]===t[1]?(o[1]=i[1],o[3]=i[2],o):null):null}}],(r=null)&&n(t.prototype,r),a&&n(t,a),e}();t.Util=E;var j=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364]},(e,t,r)=>{"use strict";var n=r(6);"undefined"!=typeof globalThis&&globalThis._pdfjsCompatibilityChecked||("undefined"!=typeof globalThis&&globalThis.Math===Math||(globalThis=r(7)),globalThis._pdfjsCompatibilityChecked=!0,!globalThis.btoa&&n.isNodeJS&&(globalThis.btoa=function(e){return Buffer.from(e,"binary").toString("base64")}),!globalThis.atob&&n.isNodeJS&&(globalThis.atob=function(e){return Buffer.from(e,"base64").toString("binary")}),Object.fromEntries||r(53),globalThis.Promise.allSettled||(globalThis.Promise=r(84)),function(){var e=!1;if("undefined"!=typeof ReadableStream)try{new ReadableStream({start:function(e){e.close()}}),e=!0}catch(e){}e||(globalThis.ReadableStream=r(112).ReadableStream)}())},(e,t)=>{"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0;var n=!("object"!==("undefined"==typeof process?"undefined":r(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=n},(e,t,r)=>{r(8),e.exports=r(10)},(e,t,r)=>{r(9)({global:!0},{globalThis:r(10)})},(e,t,r)=>{var n=r(10),a=r(11).f,i=r(26),o=r(29),s=r(30),c=r(40),u=r(52);e.exports=function(e,t){var r,l,f,h,d,p=e.target,g=e.global,m=e.stat;if(r=g?n:m?n[p]||s(p,{}):(n[p]||{}).prototype)for(l in t){if(h=t[l],f=e.noTargetGet?(d=a(r,l))&&d.value:r[l],!u(g?l:p+(m?".":"#")+l,e.forced)&&void 0!==f){if(typeof h==typeof f)continue;c(h,f)}(e.sham||f&&f.sham)&&i(h,"sham",!0),o(r,l,h,e)}}},e=>{var t=function(e){return e&&e.Math==Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||function(){return this}()||Function("return this")()},(e,t,r)=>{var n=r(12),a=r(14),i=r(15),o=r(16),s=r(20),c=r(22),u=r(24),l=Object.getOwnPropertyDescriptor;t.f=n?l:function(e,t){if(e=o(e),t=s(t,!0),u)try{return l(e,t)}catch(e){}if(c(e,t))return i(!a.f.call(e,t),e[t])}},(e,t,r)=>{var n=r(13);e.exports=!n(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},(e,t)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,a=n&&!r.call({1:2},1);t.f=a?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},(e,t,r)=>{var n=r(17),a=r(19);e.exports=function(e){return n(a(e))}},(e,t,r)=>{var n=r(13),a=r(18),i="".split;e.exports=n(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==a(e)?i.call(e,""):Object(e)}:Object},e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},(e,t,r)=>{var n=r(21);e.exports=function(e,t){if(!n(e))return e;var r,a;if(t&&"function"==typeof(r=e.toString)&&!n(a=r.call(e)))return a;if("function"==typeof(r=e.valueOf)&&!n(a=r.call(e)))return a;if(!t&&"function"==typeof(r=e.toString)&&!n(a=r.call(e)))return a;throw TypeError("Can't convert object to primitive value")}},e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},(e,t,r)=>{var n=r(23),a={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return a.call(n(e),t)}},(e,t,r)=>{var n=r(19);e.exports=function(e){return Object(n(e))}},(e,t,r)=>{var n=r(12),a=r(13),i=r(25);e.exports=!n&&!a(function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},(e,t,r)=>{var n=r(10),a=r(21),i=n.document,o=a(i)&&a(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},(e,t,r)=>{var n=r(12),a=r(27),i=r(15);e.exports=n?function(e,t,r){return a.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},(e,t,r)=>{var n=r(12),a=r(24),i=r(28),o=r(20),s=Object.defineProperty;t.f=n?s:function(e,t,r){if(i(e),t=o(t,!0),i(r),a)try{return s(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},(e,t,r)=>{var n=r(21);e.exports=function(e){if(!n(e))throw TypeError(String(e)+" is not an object");return e}},(e,t,r)=>{var n=r(10),a=r(26),i=r(22),o=r(30),s=r(31),c=r(33),u=c.get,l=c.enforce,f=String(String).split("String");(e.exports=function(e,t,r,s){var c,u=!!s&&!!s.unsafe,h=!!s&&!!s.enumerable,d=!!s&&!!s.noTargetGet;"function"==typeof r&&("string"!=typeof t||i(r,"name")||a(r,"name",t),(c=l(r)).source||(c.source=f.join("string"==typeof t?t:""))),e!==n?(u?!d&&e[t]&&(h=!0):delete e[t],h?e[t]=r:a(e,t,r)):h?e[t]=r:o(t,r)})(Function.prototype,"toString",function(){return"function"==typeof this&&u(this).source||s(this)})},(e,t,r)=>{var n=r(10),a=r(26);e.exports=function(e,t){try{a(n,e,t)}catch(r){n[e]=t}return t}},(e,t,r)=>{var n=r(32),a=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(e){return a.call(e)}),e.exports=n.inspectSource},(e,t,r)=>{var n=r(10),a=r(30),i=n["__core-js_shared__"]||a("__core-js_shared__",{});e.exports=i},(e,t,r)=>{var n,a,i,o=r(34),s=r(10),c=r(21),u=r(26),l=r(22),f=r(32),h=r(35),d=r(39),p=s.WeakMap;if(o||f.state){var g=f.state||(f.state=new p),m=g.get,v=g.has,y=g.set;n=function(e,t){if(v.call(g,e))throw new TypeError("Object already initialized");return t.facade=e,y.call(g,e,t),t},a=function(e){return m.call(g,e)||{}},i=function(e){return v.call(g,e)}}else{var b=h("state");d[b]=!0,n=function(e,t){if(l(e,b))throw new TypeError("Object already initialized");return t.facade=e,u(e,b,t),t},a=function(e){return l(e,b)?e[b]:{}},i=function(e){return l(e,b)}}e.exports={set:n,get:a,has:i,enforce:function(e){return i(e)?a(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!c(t)||(r=a(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}}},(e,t,r)=>{var n=r(10),a=r(31),i=n.WeakMap;e.exports="function"==typeof i&&/native code/.test(a(i))},(e,t,r)=>{var n=r(36),a=r(38),i=n("keys");e.exports=function(e){return i[e]||(i[e]=a(e))}},(e,t,r)=>{var n=r(37),a=r(32);(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.13.1",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},e=>{e.exports=!1},e=>{var t=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+r).toString(36)}},e=>{e.exports={}},(e,t,r)=>{var n=r(22),a=r(41),i=r(11),o=r(27);e.exports=function(e,t){for(var r=a(t),s=o.f,c=i.f,u=0;u<r.length;u++){var l=r[u];n(e,l)||s(e,l,c(t,l))}}},(e,t,r)=>{var n=r(42),a=r(44),i=r(51),o=r(28);e.exports=n("Reflect","ownKeys")||function(e){var t=a.f(o(e)),r=i.f;return r?t.concat(r(e)):t}},(e,t,r)=>{var n=r(43),a=r(10),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(n[e])||i(a[e]):n[e]&&n[e][t]||a[e]&&a[e][t]}},(e,t,r)=>{var n=r(10);e.exports=n},(e,t,r)=>{var n=r(45),a=r(50).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,a)}},(e,t,r)=>{var n=r(22),a=r(16),i=r(46).indexOf,o=r(39);e.exports=function(e,t){var r,s=a(e),c=0,u=[];for(r in s)!n(o,r)&&n(s,r)&&u.push(r);for(;t.length>c;)n(s,r=t[c++])&&(~i(u,r)||u.push(r));return u}},(e,t,r)=>{var n=r(16),a=r(47),i=r(49),o=function(e){return function(t,r,o){var s,c=n(t),u=a(c.length),l=i(o,u);if(e&&r!=r){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===r)return e||l||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},(e,t,r)=>{var n=r(48),a=Math.min;e.exports=function(e){return e>0?a(n(e),9007199254740991):0}},e=>{var t=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:t)(e)}},(e,t,r)=>{var n=r(48),a=Math.max,i=Math.min;e.exports=function(e,t){var r=n(e);return r<0?a(r+t,0):i(r,t)}},e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(e,t)=>{t.f=Object.getOwnPropertySymbols},(e,t,r)=>{var n=r(13),a=/#|\.prototype\./,i=function(e,t){var r=s[o(e)];return r==u||r!=c&&("function"==typeof t?n(t):!!t)},o=i.normalize=function(e){return String(e).replace(a,".").toLowerCase()},s=i.data={},c=i.NATIVE="N",u=i.POLYFILL="P";e.exports=i},(e,t,r)=>{r(54),r(74);var n=r(43);e.exports=n.Object.fromEntries},(e,t,r)=>{"use strict";var n=r(16),a=r(55),i=r(65),o=r(33),s=r(66),c=o.set,u=o.getterFor("Array Iterator");e.exports=s(Array,"Array",function(e,t){c(this,{type:"Array Iterator",target:n(e),index:0,kind:t})},function(){var e=u(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values"),i.Arguments=i.Array,a("keys"),a("values"),a("entries")},(e,t,r)=>{var n=r(56),a=r(61),i=r(27),o=n("unscopables"),s=Array.prototype;null==s[o]&&i.f(s,o,{configurable:!0,value:a(null)}),e.exports=function(e){s[o][e]=!0}},(e,t,r)=>{var n=r(10),a=r(36),i=r(22),o=r(38),s=r(57),c=r(60),u=a("wks"),l=n.Symbol,f=c?l:l&&l.withoutSetter||o;e.exports=function(e){return i(u,e)&&(s||"string"==typeof u[e])||(s&&i(l,e)?u[e]=l[e]:u[e]=f("Symbol."+e)),u[e]}},(e,t,r)=>{var n=r(58),a=r(13);e.exports=!!Object.getOwnPropertySymbols&&!a(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})},(e,t,r)=>{var n,a,i=r(10),o=r(59),s=i.process,c=s&&s.versions,u=c&&c.v8;u?a=(n=u.split("."))[0]<4?1:n[0]+n[1]:o&&(!(n=o.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=o.match(/Chrome\/(\d+)/))&&(a=n[1]),e.exports=a&&+a},(e,t,r)=>{var n=r(42);e.exports=n("navigator","userAgent")||""},(e,t,r)=>{var n=r(57);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(e,t,r)=>{var n,a=r(28),i=r(62),o=r(50),s=r(39),c=r(64),u=r(25),l=r(35),f=l("IE_PROTO"),h=function(){},d=function(e){return"<script>"+e+"<\/script>"},p=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;p=n?function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t}(n):((t=u("iframe")).style.display="none",c.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F);for(var r=o.length;r--;)delete p.prototype[o[r]];return p()};s[f]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(h.prototype=a(e),r=new h,h.prototype=null,r[f]=e):r=p(),void 0===t?r:i(r,t)}},(e,t,r)=>{var n=r(12),a=r(27),i=r(28),o=r(63);e.exports=n?Object.defineProperties:function(e,t){i(e);for(var r,n=o(t),s=n.length,c=0;s>c;)a.f(e,r=n[c++],t[r]);return e}},(e,t,r)=>{var n=r(45),a=r(50);e.exports=Object.keys||function(e){return n(e,a)}},(e,t,r)=>{var n=r(42);e.exports=n("document","documentElement")},e=>{e.exports={}},(e,t,r)=>{"use strict";var n=r(9),a=r(67),i=r(69),o=r(72),s=r(71),c=r(26),u=r(29),l=r(56),f=r(37),h=r(65),d=r(68),p=d.IteratorPrototype,g=d.BUGGY_SAFARI_ITERATORS,m=l("iterator"),v=function(){return this};e.exports=function(e,t,r,l,d,y,b){a(r,t,l);var w,k,S,x=function(e){if(e===d&&F)return F;if(!g&&e in C)return C[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},A=t+" Iterator",O=!1,C=e.prototype,T=C[m]||C["@@iterator"]||d&&C[d],F=!g&&T||x(d),_="Array"==t&&C.entries||T;if(_&&(w=i(_.call(new e)),p!==Object.prototype&&w.next&&(f||i(w)===p||(o?o(w,p):"function"!=typeof w[m]&&c(w,m,v)),s(w,A,!0,!0),f&&(h[A]=v))),"values"==d&&T&&"values"!==T.name&&(O=!0,F=function(){return T.call(this)}),f&&!b||C[m]===F||c(C,m,F),h[t]=F,d)if(k={values:x("values"),keys:y?F:x("keys"),entries:x("entries")},b)for(S in k)!g&&!O&&S in C||u(C,S,k[S]);else n({target:t,proto:!0,forced:g||O},k);return k}},(e,t,r)=>{"use strict";var n=r(68).IteratorPrototype,a=r(61),i=r(15),o=r(71),s=r(65),c=function(){return this};e.exports=function(e,t,r){var u=t+" Iterator";return e.prototype=a(n,{next:i(1,r)}),o(e,u,!1,!0),s[u]=c,e}},(e,t,r)=>{"use strict";var n,a,i,o=r(13),s=r(69),c=r(26),u=r(22),l=r(56),f=r(37),h=l("iterator"),d=!1;[].keys&&("next"in(i=[].keys())?(a=s(s(i)))!==Object.prototype&&(n=a):d=!0);var p=null==n||o(function(){var e={};return n[h].call(e)!==e});p&&(n={}),f&&!p||u(n,h)||c(n,h,function(){return this}),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:d}},(e,t,r)=>{var n=r(22),a=r(23),i=r(35),o=r(70),s=i("IE_PROTO"),c=Object.prototype;e.exports=o?Object.getPrototypeOf:function(e){return e=a(e),n(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?c:null}},(e,t,r)=>{var n=r(13);e.exports=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},(e,t,r)=>{var n=r(27).f,a=r(22),i=r(56)("toStringTag");e.exports=function(e,t,r){e&&!a(e=r?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},(e,t,r)=>{var n=r(28),a=r(73);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),t=r instanceof Array}catch(e){}return function(r,i){return n(r),a(i),t?e.call(r,i):r.__proto__=i,r}}():void 0)},(e,t,r)=>{var n=r(21);e.exports=function(e){if(!n(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},(e,t,r)=>{var n=r(9),a=r(75),i=r(83);n({target:"Object",stat:!0},{fromEntries:function(e){var t={};return a(e,function(e,r){i(t,e,r)},{AS_ENTRIES:!0}),t}})},(e,t,r)=>{var n=r(28),a=r(76),i=r(47),o=r(77),s=r(79),c=r(82),u=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,r){var l,f,h,d,p,g,m,v=r&&r.that,y=!(!r||!r.AS_ENTRIES),b=!(!r||!r.IS_ITERATOR),w=!(!r||!r.INTERRUPTED),k=o(t,v,1+y+w),S=function(e){return l&&c(l),new u(!0,e)},x=function(e){return y?(n(e),w?k(e[0],e[1],S):k(e[0],e[1])):w?k(e,S):k(e)};if(b)l=e;else{if("function"!=typeof(f=s(e)))throw TypeError("Target is not iterable");if(a(f)){for(h=0,d=i(e.length);d>h;h++)if((p=x(e[h]))&&p instanceof u)return p;return new u(!1)}l=f.call(e)}for(g=l.next;!(m=g.call(l)).done;){try{p=x(m.value)}catch(e){throw c(l),e}if("object"==typeof p&&p&&p instanceof u)return p}return new u(!1)}},(e,t,r)=>{var n=r(56),a=r(65),i=n("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(a.Array===e||o[i]===e)}},(e,t,r)=>{var n=r(78);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,a){return e.call(t,r,n,a)}}return function(){return e.apply(t,arguments)}}},e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},(e,t,r)=>{var n=r(80),a=r(65),i=r(56)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[n(e)]}},(e,t,r)=>{var n=r(81),a=r(18),i=r(56)("toStringTag"),o="Arguments"==a(function(){return arguments}());e.exports=n?a:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?r:o?a(t):"Object"==(n=a(t))&&"function"==typeof t.callee?"Arguments":n}},(e,t,r)=>{var n={};n[r(56)("toStringTag")]="z",e.exports="[object z]"===String(n)},(e,t,r)=>{var n=r(28);e.exports=function(e){var t=e.return;if(void 0!==t)return n(t.call(e)).value}},(e,t,r)=>{"use strict";var n=r(20),a=r(27),i=r(15);e.exports=function(e,t,r){var o=n(t);o in e?a.f(e,o,i(0,r)):e[o]=r}},(e,t,r)=>{r(85),r(86),r(88),r(105),r(106),r(107),r(108),r(110);var n=r(43);e.exports=n.Promise},(e,t,r)=>{"use strict";var n=r(9),a=r(69),i=r(72),o=r(61),s=r(26),c=r(15),u=r(75),l=function(e,t){var r=this;if(!(r instanceof l))return new l(e,t);i&&(r=i(new Error(void 0),a(r))),void 0!==t&&s(r,"message",String(t));var n=[];return u(e,n.push,{that:n}),s(r,"errors",n),r};l.prototype=o(Error.prototype,{constructor:c(5,l),message:c(5,""),name:c(5,"AggregateError")}),n({global:!0},{AggregateError:l})},(e,t,r)=>{var n=r(81),a=r(29),i=r(87);n||a(Object.prototype,"toString",i,{unsafe:!0})},(e,t,r)=>{"use strict";var n=r(81),a=r(80);e.exports=n?{}.toString:function(){return"[object "+a(this)+"]"}},(e,t,r)=>{"use strict";var n,a,i,o,s=r(9),c=r(37),u=r(10),l=r(42),f=r(89),h=r(29),d=r(90),p=r(72),g=r(71),m=r(91),v=r(21),y=r(78),b=r(92),w=r(31),k=r(75),S=r(93),x=r(94),A=r(95).set,O=r(98),C=r(100),T=r(102),F=r(101),_=r(103),P=r(33),I=r(52),E=r(56),j=r(104),R=r(97),M=r(58),N=E("species"),B="Promise",D=P.get,L=P.set,U=P.getterFor(B),q=f&&f.prototype,X=f,H=q,$=u.TypeError,z=u.document,G=u.process,W=F.f,V=W,K=!!(z&&z.createEvent&&u.dispatchEvent),Y="function"==typeof PromiseRejectionEvent,J=!1,Z=I(B,function(){var e=w(X)!==String(X);if(!e&&66===M)return!0;if(c&&!H.finally)return!0;if(M>=51&&/native code/.test(X))return!1;var t=new X(function(e){e(1)}),r=function(e){e(function(){},function(){})};return(t.constructor={})[N]=r,!(J=t.then(function(){})instanceof r)||!e&&j&&!Y}),Q=Z||!S(function(e){X.all(e).catch(function(){})}),ee=function(e){var t;return!(!v(e)||"function"!=typeof(t=e.then))&&t},te=function(e,t){if(!e.notified){e.notified=!0;var r=e.reactions;O(function(){for(var n=e.value,a=1==e.state,i=0;r.length>i;){var o,s,c,u=r[i++],l=a?u.ok:u.fail,f=u.resolve,h=u.reject,d=u.domain;try{l?(a||(2===e.rejection&&ie(e),e.rejection=1),!0===l?o=n:(d&&d.enter(),o=l(n),d&&(d.exit(),c=!0)),o===u.promise?h($("Promise-chain cycle")):(s=ee(o))?s.call(o,f,h):f(o)):h(n)}catch(e){d&&!c&&d.exit(),h(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&ne(e)})}},re=function(e,t,r){var n,a;K?((n=z.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),u.dispatchEvent(n)):n={promise:t,reason:r},!Y&&(a=u["on"+e])?a(n):"unhandledrejection"===e&&T("Unhandled promise rejection",r)},ne=function(e){A.call(u,function(){var t,r=e.facade,n=e.value;if(ae(e)&&(t=_(function(){R?G.emit("unhandledRejection",n,r):re("unhandledrejection",r,n)}),e.rejection=R||ae(e)?2:1,t.error))throw t.value})},ae=function(e){return 1!==e.rejection&&!e.parent},ie=function(e){A.call(u,function(){var t=e.facade;R?G.emit("rejectionHandled",t):re("rejectionhandled",t,e.value)})},oe=function(e,t,r){return function(n){e(t,n,r)}},se=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,te(e,!0))},ce=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw $("Promise can't be resolved itself");var n=ee(t);n?O(function(){var r={done:!1};try{n.call(t,oe(ce,r,e),oe(se,r,e))}catch(t){se(r,t,e)}}):(e.value=t,e.state=1,te(e,!1))}catch(t){se({done:!1},t,e)}}};if(Z&&(H=(X=function(e){b(this,X,B),y(e),n.call(this);var t=D(this);try{e(oe(ce,t),oe(se,t))}catch(e){se(t,e)}}).prototype,(n=function(e){L(this,{type:B,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(H,{then:function(e,t){var r=U(this),n=W(x(this,X));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=R?G.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&te(r,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new n,t=D(e);this.promise=e,this.resolve=oe(ce,t),this.reject=oe(se,t)},F.f=W=function(e){return e===X||e===i?new a(e):V(e)},!c&&"function"==typeof f&&q!==Object.prototype)){o=q.then,J||(h(q,"then",function(e,t){var r=this;return new X(function(e,t){o.call(r,e,t)}).then(e,t)},{unsafe:!0}),h(q,"catch",H.catch,{unsafe:!0}));try{delete q.constructor}catch(e){}p&&p(q,H)}s({global:!0,wrap:!0,forced:Z},{Promise:X}),g(X,B,!1,!0),m(B),i=l(B),s({target:B,stat:!0,forced:Z},{reject:function(e){var t=W(this);return t.reject.call(void 0,e),t.promise}}),s({target:B,stat:!0,forced:c||Z},{resolve:function(e){return C(c&&this===i?X:this,e)}}),s({target:B,stat:!0,forced:Q},{all:function(e){var t=this,r=W(t),n=r.resolve,a=r.reject,i=_(function(){var r=y(t.resolve),i=[],o=0,s=1;k(e,function(e){var c=o++,u=!1;i.push(void 0),s++,r.call(t,e).then(function(e){u||(u=!0,i[c]=e,--s||n(i))},a)}),--s||n(i)});return i.error&&a(i.value),r.promise},race:function(e){var t=this,r=W(t),n=r.reject,a=_(function(){var a=y(t.resolve);k(e,function(e){a.call(t,e).then(r.resolve,n)})});return a.error&&n(a.value),r.promise}})},(e,t,r)=>{var n=r(10);e.exports=n.Promise},(e,t,r)=>{var n=r(29);e.exports=function(e,t,r){for(var a in t)n(e,a,t[a],r);return e}},(e,t,r)=>{"use strict";var n=r(42),a=r(27),i=r(56),o=r(12),s=i("species");e.exports=function(e){var t=n(e),r=a.f;o&&t&&!t[s]&&r(t,s,{configurable:!0,get:function(){return this}})}},e=>{e.exports=function(e,t,r){if(!(e instanceof t))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return e}},(e,t,r)=>{var n=r(56)("iterator"),a=!1;try{var i=0,o={next:function(){return{done:!!i++}},return:function(){a=!0}};o[n]=function(){return this},Array.from(o,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!a)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},e(i)}catch(e){}return r}},(e,t,r)=>{var n=r(28),a=r(78),i=r(56)("species");e.exports=function(e,t){var r,o=n(e).constructor;return void 0===o||null==(r=n(o)[i])?t:a(r)}},(e,t,r)=>{var n,a,i,o=r(10),s=r(13),c=r(77),u=r(64),l=r(25),f=r(96),h=r(97),d=o.location,p=o.setImmediate,g=o.clearImmediate,m=o.process,v=o.MessageChannel,y=o.Dispatch,b=0,w={},k=function(e){if(w.hasOwnProperty(e)){var t=w[e];delete w[e],t()}},S=function(e){return function(){k(e)}},x=function(e){k(e.data)},A=function(e){o.postMessage(e+"",d.protocol+"//"+d.host)};p&&g||(p=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return w[++b]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},n(b),b},g=function(e){delete w[e]},h?n=function(e){m.nextTick(S(e))}:y&&y.now?n=function(e){y.now(S(e))}:v&&!f?(i=(a=new v).port2,a.port1.onmessage=x,n=c(i.postMessage,i,1)):o.addEventListener&&"function"==typeof postMessage&&!o.importScripts&&d&&"file:"!==d.protocol&&!s(A)?(n=A,o.addEventListener("message",x,!1)):n="onreadystatechange"in l("script")?function(e){u.appendChild(l("script")).onreadystatechange=function(){u.removeChild(this),k(e)}}:function(e){setTimeout(S(e),0)}),e.exports={set:p,clear:g}},(e,t,r)=>{var n=r(59);e.exports=/(?:iphone|ipod|ipad).*applewebkit/i.test(n)},(e,t,r)=>{var n=r(18),a=r(10);e.exports="process"==n(a.process)},(e,t,r)=>{var n,a,i,o,s,c,u,l,f=r(10),h=r(11).f,d=r(95).set,p=r(96),g=r(99),m=r(97),v=f.MutationObserver||f.WebKitMutationObserver,y=f.document,b=f.process,w=f.Promise,k=h(f,"queueMicrotask"),S=k&&k.value;S||(n=function(){var e,t;for(m&&(e=b.domain)&&e.exit();a;){t=a.fn,a=a.next;try{t()}catch(e){throw a?o():i=void 0,e}}i=void 0,e&&e.enter()},p||m||g||!v||!y?w&&w.resolve?((u=w.resolve(void 0)).constructor=w,l=u.then,o=function(){l.call(u,n)}):o=m?function(){b.nextTick(n)}:function(){d.call(f,n)}:(s=!0,c=y.createTextNode(""),new v(n).observe(c,{characterData:!0}),o=function(){c.data=s=!s})),e.exports=S||function(e){var t={fn:e,next:void 0};i&&(i.next=t),a||(a=t,o()),i=t}},(e,t,r)=>{var n=r(59);e.exports=/web0s(?!.*chrome)/i.test(n)},(e,t,r)=>{var n=r(28),a=r(21),i=r(101);e.exports=function(e,t){if(n(e),a(t)&&t.constructor===e)return t;var r=i.f(e);return(0,r.resolve)(t),r.promise}},(e,t,r)=>{"use strict";var n=r(78),a=function(e){var t,r;this.promise=new e(function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n}),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new a(e)}},(e,t,r)=>{var n=r(10);e.exports=function(e,t){var r=n.console;r&&r.error&&(1===arguments.length?r.error(e):r.error(e,t))}},e=>{e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},e=>{e.exports="object"==typeof window},(e,t,r)=>{"use strict";var n=r(9),a=r(78),i=r(101),o=r(103),s=r(75);n({target:"Promise",stat:!0},{allSettled:function(e){var t=this,r=i.f(t),n=r.resolve,c=r.reject,u=o(function(){var r=a(t.resolve),i=[],o=0,c=1;s(e,function(e){var a=o++,s=!1;i.push(void 0),c++,r.call(t,e).then(function(e){s||(s=!0,i[a]={status:"fulfilled",value:e},--c||n(i))},function(e){s||(s=!0,i[a]={status:"rejected",reason:e},--c||n(i))})}),--c||n(i)});return u.error&&c(u.value),r.promise}})},(e,t,r)=>{"use strict";var n=r(9),a=r(78),i=r(42),o=r(101),s=r(103),c=r(75);n({target:"Promise",stat:!0},{any:function(e){var t=this,r=o.f(t),n=r.resolve,u=r.reject,l=s(function(){var r=a(t.resolve),o=[],s=0,l=1,f=!1;c(e,function(e){var a=s++,c=!1;o.push(void 0),l++,r.call(t,e).then(function(e){c||f||(f=!0,n(e))},function(e){c||f||(c=!0,o[a]=e,--l||u(new(i("AggregateError"))(o,"No one promise resolved")))})}),--l||u(new(i("AggregateError"))(o,"No one promise resolved"))});return l.error&&u(l.value),r.promise}})},(e,t,r)=>{"use strict";var n=r(9),a=r(37),i=r(89),o=r(13),s=r(42),c=r(94),u=r(100),l=r(29);if(n({target:"Promise",proto:!0,real:!0,forced:!!i&&o(function(){i.prototype.finally.call({then:function(){}},function(){})})},{finally:function(e){var t=c(this,s("Promise")),r="function"==typeof e;return this.then(r?function(r){return u(t,e()).then(function(){return r})}:e,r?function(r){return u(t,e()).then(function(){throw r})}:e)}}),!a&&"function"==typeof i){var f=s("Promise").prototype.finally;i.prototype.finally!==f&&l(i.prototype,"finally",f,{unsafe:!0})}},(e,t,r)=>{"use strict";var n=r(109).charAt,a=r(33),i=r(66),o=a.set,s=a.getterFor("String Iterator");i(String,"String",function(e){o(this,{type:"String Iterator",string:String(e),index:0})},function(){var e,t=s(this),r=t.string,a=t.index;return a>=r.length?{value:void 0,done:!0}:(e=n(r,a),t.index+=e.length,{value:e,done:!1})})},(e,t,r)=>{var n=r(48),a=r(19),i=function(e){return function(t,r){var i,o,s=String(a(t)),c=n(r),u=s.length;return c<0||c>=u?e?"":void 0:(i=s.charCodeAt(c))<55296||i>56319||c+1===u||(o=s.charCodeAt(c+1))<56320||o>57343?e?s.charAt(c):i:e?s.slice(c,c+2):o-56320+(i-55296<<10)+65536}};e.exports={codeAt:i(!1),charAt:i(!0)}},(e,t,r)=>{var n=r(10),a=r(111),i=r(54),o=r(26),s=r(56),c=s("iterator"),u=s("toStringTag"),l=i.values;for(var f in a){var h=n[f],d=h&&h.prototype;if(d){if(d[c]!==l)try{o(d,c,l)}catch(e){d[c]=l}if(d[u]||o(d,u,f),a[f])for(var p in i)if(d[p]!==i[p])try{o(d,p,i[p])}catch(e){d[p]=i[p]}}}},e=>{e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t){(function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:function(e){return"Symbol("+e+")"};function r(){}var n="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0;function a(e){return"object"==typeof e&&null!==e||"function"==typeof e}var i=r,o=Promise,s=Promise.prototype.then,c=Promise.resolve.bind(o),u=Promise.reject.bind(o);function l(e){return new o(e)}function f(e){return c(e)}function h(e){return u(e)}function d(e,t,r){return s.call(e,t,r)}function p(e,t,r){d(d(e,t,r),void 0,i)}function g(e,t){p(e,t)}function m(e,t){p(e,void 0,t)}function v(e,t,r){return d(e,t,r)}function y(e){d(e,void 0,i)}var b=function(){var e=n&&n.queueMicrotask;if("function"==typeof e)return e;var t=f(void 0);return function(e){return d(t,e)}}();function w(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function k(e,t,r){try{return f(w(e,t,r))}catch(e){return h(e)}}var S=function(){function e(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}return Object.defineProperty(e.prototype,"length",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.push=function(e){var t=this._back,r=t;16383===t._elements.length&&(r={_elements:[],_next:void 0}),t._elements.push(e),r!==t&&(this._back=r,t._next=r),++this._size},e.prototype.shift=function(){var e=this._front,t=e,r=this._cursor,n=r+1,a=e._elements,i=a[r];return 16384===n&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),a[r]=void 0,i},e.prototype.forEach=function(e){for(var t=this._cursor,r=this._front,n=r._elements;!(t===n.length&&void 0===r._next||t===n.length&&(t=0,0===(n=(r=r._next)._elements).length));)e(n[t]),++t},e.prototype.peek=function(){var e=this._front,t=this._cursor;return e._elements[t]},e}();function x(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?T(e):"closed"===t._state?function(e){T(e),P(e)}(e):F(e,t._storedError)}function A(e,t){return lr(e._ownerReadableStream,t)}function O(e){"readable"===e._ownerReadableStream._state?_(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,t){F(e,t)}(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function C(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function T(e){e._closedPromise=l(function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r})}function F(e,t){T(e),_(e,t)}function _(e,t){void 0!==e._closedPromise_reject&&(y(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function P(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}var I=t("[[AbortSteps]]"),E=t("[[ErrorSteps]]"),j=t("[[CancelSteps]]"),R=t("[[PullSteps]]"),M=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},N=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function B(e,t){if(void 0!==e&&("object"!=typeof(r=e)&&"function"!=typeof r))throw new TypeError(t+" is not an object.");var r}function D(e,t){if("function"!=typeof e)throw new TypeError(t+" is not a function.")}function L(e,t){if(!function(e){return"object"==typeof e&&null!==e||"function"==typeof e}(e))throw new TypeError(t+" is not an object.")}function U(e,t,r){if(void 0===e)throw new TypeError("Parameter "+t+" is required in '"+r+"'.")}function q(e,t,r){if(void 0===e)throw new TypeError(t+" is required in '"+r+"'.")}function X(e){return Number(e)}function H(e){return 0===e?0:e}function $(e,t){var r=Number.MAX_SAFE_INTEGER,n=Number(e);if(n=H(n),!M(n))throw new TypeError(t+" is not a finite number");if((n=function(e){return H(N(e))}(n))<0||n>r)throw new TypeError(t+" is outside the accepted range of 0 to "+r+", inclusive");return M(n)&&0!==n?n:0}function z(e,t){if(!cr(e))throw new TypeError(t+" is not a ReadableStream.")}function G(e){return new Q(e)}function W(e,t){e._reader._readRequests.push(t)}function V(e,t,r){var n=e._reader._readRequests.shift();r?n._closeSteps():n._chunkSteps(t)}function K(e){return e._reader._readRequests.length}function Y(e){var t=e._reader;return void 0!==t&&!!ee(t)}var J,Z,Q=function(){function e(e){if(U(e,1,"ReadableStreamDefaultReader"),z(e,"First parameter"),ur(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");x(this,e),this._readRequests=new S}return Object.defineProperty(e.prototype,"closed",{get:function(){return ee(this)?this._closedPromise:h(re("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),ee(this)?void 0===this._ownerReadableStream?h(C("cancel")):A(this,e):h(re("cancel"))},e.prototype.read=function(){if(!ee(this))return h(re("read"));if(void 0===this._ownerReadableStream)return h(C("read from"));var e,t,r=l(function(r,n){e=r,t=n});return te(this,{_chunkSteps:function(t){return e({value:t,done:!1})},_closeSteps:function(){return e({value:void 0,done:!0})},_errorSteps:function(e){return t(e)}}),r},e.prototype.releaseLock=function(){if(!ee(this))throw re("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");O(this)}},e}();function ee(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function te(e,t){var r=e._ownerReadableStream;r._disturbed=!0,"closed"===r._state?t._closeSteps():"errored"===r._state?t._errorSteps(r._storedError):r._readableStreamController[R](t)}function re(e){return new TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}Object.defineProperties(Q.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(Q.prototype,t.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0}),"symbol"==typeof t.asyncIterator&&((J={})[t.asyncIterator]=function(){return this},Z=J,Object.defineProperty(Z,t.asyncIterator,{enumerable:!1}));var ne=function(){function e(e,t){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=e,this._preventCancel=t}return e.prototype.next=function(){var e=this,t=function(){return e._nextSteps()};return this._ongoingPromise=this._ongoingPromise?v(this._ongoingPromise,t,t):t(),this._ongoingPromise},e.prototype.return=function(e){var t=this,r=function(){return t._returnSteps(e)};return this._ongoingPromise?v(this._ongoingPromise,r,r):r()},e.prototype._nextSteps=function(){var e=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var t,r,n=this._reader;if(void 0===n._ownerReadableStream)return h(C("iterate"));var a=l(function(e,n){t=e,r=n});return te(n,{_chunkSteps:function(r){e._ongoingPromise=void 0,b(function(){return t({value:r,done:!1})})},_closeSteps:function(){e._ongoingPromise=void 0,e._isFinished=!0,O(n),t({value:void 0,done:!0})},_errorSteps:function(t){e._ongoingPromise=void 0,e._isFinished=!0,O(n),r(t)}}),a},e.prototype._returnSteps=function(e){if(this._isFinished)return Promise.resolve({value:e,done:!0});this._isFinished=!0;var t=this._reader;if(void 0===t._ownerReadableStream)return h(C("finish iterating"));if(!this._preventCancel){var r=A(t,e);return O(t),v(r,function(){return{value:e,done:!0}})}return O(t),f({value:e,done:!0})},e}(),ae={next:function(){return ie(this)?this._asyncIteratorImpl.next():h(oe("next"))},return:function(e){return ie(this)?this._asyncIteratorImpl.return(e):h(oe("return"))}};function ie(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl")}function oe(e){return new TypeError("ReadableStreamAsyncIterator."+e+" can only be used on a ReadableSteamAsyncIterator")}void 0!==Z&&Object.setPrototypeOf(ae,Z);var se=Number.isNaN||function(e){return e!=e};function ce(e){return!!function(e){if("number"!=typeof e)return!1;if(se(e))return!1;if(e<0)return!1;return!0}(e)&&e!==1/0}function ue(e){var t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function le(e,t,r){if(!ce(r=Number(r)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function fe(e){e._queue=new S,e._queueTotalSize=0}function he(e){return e.slice()}function de(e){return e}var pe=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"view",{get:function(){if(!ve(this))throw je("view");return this._view},enumerable:!1,configurable:!0}),e.prototype.respond=function(e){if(!ve(this))throw je("respond");if(U(e,1,"respond"),e=$(e,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");this._view.buffer,function(e,t){if(!ce(t=Number(t)))throw new RangeError("bytesWritten must be a finite");Te(e,t)}(this._associatedReadableByteStreamController,e)},e.prototype.respondWithNewView=function(e){if(!ve(this))throw je("respondWithNewView");if(U(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");!function(e,t){var r=e._pendingPullIntos.peek();if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.byteLength!==t.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");r.buffer=t.buffer,Te(e,t.byteLength)}(this._associatedReadableByteStreamController,e)},e}();Object.defineProperties(pe.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(pe.prototype,t.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var ge=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"byobRequest",{get:function(){if(!me(this))throw Re("byobRequest");if(null===this._byobRequest&&this._pendingPullIntos.length>0){var e=this._pendingPullIntos.peek(),t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled),r=Object.create(pe.prototype);!function(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}(r,this,t),this._byobRequest=r}return this._byobRequest},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!me(this))throw Re("desiredSize");return Ie(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!me(this))throw Re("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");!function(e){var t=e._controlledReadableByteStream;if(e._closeRequested||"readable"!==t._state)return;if(e._queueTotalSize>0)return void(e._closeRequested=!0);if(e._pendingPullIntos.length>0){var r=e._pendingPullIntos.peek();if(r.bytesFilled>0){var n=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Pe(e,n),n}}_e(e),fr(t)}(this)},e.prototype.enqueue=function(e){if(!me(this))throw Re("enqueue");if(U(e,1,"enqueue"),!ArrayBuffer.isView(e))throw new TypeError("chunk must be an array buffer view");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");!function(e,t){var r=e._controlledReadableByteStream;if(e._closeRequested||"readable"!==r._state)return;var n=t.buffer,a=t.byteOffset,i=t.byteLength,o=de(n);if(Y(r))if(0===K(r))ke(e,o,a,i);else{var s=new Uint8Array(o,a,i);V(r,s,!1)}else Be(r)?(ke(e,o,a,i),Ce(e)):ke(e,o,a,i);ye(e)}(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!me(this))throw Re("error");Pe(this,e)},e.prototype[j]=function(e){this._pendingPullIntos.length>0&&(this._pendingPullIntos.peek().bytesFilled=0);fe(this);var t=this._cancelAlgorithm(e);return _e(this),t},e.prototype[R]=function(e){var t=this._controlledReadableByteStream;if(this._queueTotalSize>0){var r=this._queue.shift();this._queueTotalSize-=r.byteLength,Ae(this);var n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);e._chunkSteps(n)}else{var a=this._autoAllocateChunkSize;if(void 0!==a){var i=void 0;try{i=new ArrayBuffer(a)}catch(t){return void e._errorSteps(t)}var o={buffer:i,byteOffset:0,byteLength:a,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(o)}W(t,e),ye(this)}},e}();function me(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")}function ve(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function ye(e){(function(e){var t=e._controlledReadableByteStream;if("readable"!==t._state)return!1;if(e._closeRequested)return!1;if(!e._started)return!1;if(Y(t)&&K(t)>0)return!0;if(Be(t)&&Ne(t)>0)return!0;if(Ie(e)>0)return!0;return!1})(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,p(e._pullAlgorithm(),function(){e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,ye(e))},function(t){Pe(e,t)})))}function be(e,t){var r=!1;"closed"===e._state&&(r=!0);var n=we(t);"default"===t.readerType?V(e,n,r):function(e,t,r){var n=e._reader._readIntoRequests.shift();r?n._closeSteps(t):n._chunkSteps(t)}(e,n,r)}function we(e){var t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function ke(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function Se(e,t){var r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,a=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),i=t.bytesFilled+a,o=i-i%r,s=a,c=!1;o>n&&(s=o-t.bytesFilled,c=!0);for(var u,l,f,h,d,p=e._queue;s>0;){var g=p.peek(),m=Math.min(s,g.byteLength),v=t.byteOffset+t.bytesFilled;u=t.buffer,l=v,f=g.buffer,h=g.byteOffset,d=m,new Uint8Array(u).set(new Uint8Array(f,h,d),l),g.byteLength===m?p.shift():(g.byteOffset+=m,g.byteLength-=m),e._queueTotalSize-=m,xe(e,m,t),s-=m}return c}function xe(e,t,r){Oe(e),r.bytesFilled+=t}function Ae(e){0===e._queueTotalSize&&e._closeRequested?(_e(e),fr(e._controlledReadableByteStream)):ye(e)}function Oe(e){null!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Ce(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos.peek();Se(e,t)&&(Fe(e),be(e._controlledReadableByteStream,t))}}function Te(e,t){var r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");!function(e,t){t.buffer=de(t.buffer);var r=e._controlledReadableByteStream;if(Be(r))for(;Ne(r)>0;)be(r,Fe(e))}(e,r)}else!function(e,t,r){if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range");if(xe(e,t,r),!(r.bytesFilled<r.elementSize)){Fe(e);var n=r.bytesFilled%r.elementSize;if(n>0){var a=r.byteOffset+r.bytesFilled,i=r.buffer.slice(a-n,a);ke(e,i,0,i.byteLength)}r.buffer=de(r.buffer),r.bytesFilled-=n,be(e._controlledReadableByteStream,r),Ce(e)}}(e,t,r);ye(e)}function Fe(e){var t=e._pendingPullIntos.shift();return Oe(e),t}function _e(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function Pe(e,t){var r=e._controlledReadableByteStream;"readable"===r._state&&(!function(e){Oe(e),e._pendingPullIntos=new S}(e),fe(e),_e(e),hr(r,t))}function Ie(e){var t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Ee(e,t,r){var n=Object.create(ge.prototype),a=function(){},i=function(){return f(void 0)},o=function(){return f(void 0)};void 0!==t.start&&(a=function(){return t.start(n)}),void 0!==t.pull&&(i=function(){return t.pull(n)}),void 0!==t.cancel&&(o=function(e){return t.cancel(e)});var s=t.autoAllocateChunkSize;if(0===s)throw new TypeError("autoAllocateChunkSize must be greater than 0");!function(e,t,r,n,a,i,o){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,fe(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=i,t._pullAlgorithm=n,t._cancelAlgorithm=a,t._autoAllocateChunkSize=o,t._pendingPullIntos=new S,e._readableStreamController=t,p(f(r()),function(){t._started=!0,ye(t)},function(e){Pe(t,e)})}(e,n,a,i,o,r,s)}function je(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function Re(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}function Me(e,t){e._reader._readIntoRequests.push(t)}function Ne(e){return e._reader._readIntoRequests.length}function Be(e){var t=e._reader;return void 0!==t&&!!Le(t)}Object.defineProperties(ge.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(ge.prototype,t.toStringTag,{value:"ReadableByteStreamController",configurable:!0});var De=function(){function e(e){if(U(e,1,"ReadableStreamBYOBReader"),z(e,"First parameter"),ur(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!me(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");x(this,e),this._readIntoRequests=new S}return Object.defineProperty(e.prototype,"closed",{get:function(){return Le(this)?this._closedPromise:h(Ue("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),Le(this)?void 0===this._ownerReadableStream?h(C("cancel")):A(this,e):h(Ue("cancel"))},e.prototype.read=function(e){if(!Le(this))return h(Ue("read"));if(!ArrayBuffer.isView(e))return h(new TypeError("view must be an array buffer view"));if(0===e.byteLength)return h(new TypeError("view must have non-zero byteLength"));if(0===e.buffer.byteLength)return h(new TypeError("view's buffer must have non-zero byteLength"));if(void 0===this._ownerReadableStream)return h(C("read from"));var t,r,n=l(function(e,n){t=e,r=n});return function(e,t,r){var n=e._ownerReadableStream;n._disturbed=!0,"errored"===n._state?r._errorSteps(n._storedError):function(e,t,r){var n=e._controlledReadableByteStream,a=1;t.constructor!==DataView&&(a=t.constructor.BYTES_PER_ELEMENT);var i=t.constructor,o={buffer:de(t.buffer),byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:a,viewConstructor:i,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(o),void Me(n,r);if("closed"!==n._state){if(e._queueTotalSize>0){if(Se(e,o)){var s=we(o);return Ae(e),void r._chunkSteps(s)}if(e._closeRequested){var c=new TypeError("Insufficient bytes to fill elements in the given buffer");return Pe(e,c),void r._errorSteps(c)}}e._pendingPullIntos.push(o),Me(n,r),ye(e)}else{var u=new i(o.buffer,o.byteOffset,0);r._closeSteps(u)}}(n._readableStreamController,t,r)}(this,e,{_chunkSteps:function(e){return t({value:e,done:!1})},_closeSteps:function(e){return t({value:e,done:!0})},_errorSteps:function(e){return r(e)}}),n},e.prototype.releaseLock=function(){if(!Le(this))throw Ue("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");O(this)}},e}();function Le(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function Ue(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}function qe(e,t){var r=e.highWaterMark;if(void 0===r)return t;if(se(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function Xe(e){var t=e.size;return t||function(){return 1}}function He(e,t){B(e,t);var r=null==e?void 0:e.highWaterMark,n=null==e?void 0:e.size;return{highWaterMark:void 0===r?void 0:X(r),size:void 0===n?void 0:$e(n,t+" has member 'size' that")}}function $e(e,t){return D(e,t),function(t){return X(e(t))}}function ze(e,t,r){return D(e,r),function(r){return k(e,t,[r])}}function Ge(e,t,r){return D(e,r),function(){return k(e,t,[])}}function We(e,t,r){return D(e,r),function(r){return w(e,t,[r])}}function Ve(e,t,r){return D(e,r),function(r,n){return k(e,t,[r,n])}}function Ke(e,t){if(!Qe(e))throw new TypeError(t+" is not a WritableStream.")}Object.defineProperties(De.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(De.prototype,t.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});var Ye=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),void 0===e?e=null:L(e,"First parameter");var r=He(t,"Second parameter"),n=function(e,t){B(e,t);var r=null==e?void 0:e.abort,n=null==e?void 0:e.close,a=null==e?void 0:e.start,i=null==e?void 0:e.type,o=null==e?void 0:e.write;return{abort:void 0===r?void 0:ze(r,e,t+" has member 'abort' that"),close:void 0===n?void 0:Ge(n,e,t+" has member 'close' that"),start:void 0===a?void 0:We(a,e,t+" has member 'start' that"),write:void 0===o?void 0:Ve(o,e,t+" has member 'write' that"),type:i}}(e,"First parameter");if(Ze(this),void 0!==n.type)throw new RangeError("Invalid type is specified");var a=Xe(r);!function(e,t,r,n){var a=Object.create(vt.prototype),i=function(){},o=function(){return f(void 0)},s=function(){return f(void 0)},c=function(){return f(void 0)};void 0!==t.start&&(i=function(){return t.start(a)});void 0!==t.write&&(o=function(e){return t.write(e,a)});void 0!==t.close&&(s=function(){return t.close()});void 0!==t.abort&&(c=function(e){return t.abort(e)});yt(e,a,i,o,s,c,r,n)}(this,n,qe(r,1),a)}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!Qe(this))throw Ot("locked");return et(this)},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){return void 0===e&&(e=void 0),Qe(this)?et(this)?h(new TypeError("Cannot abort a stream that already has a writer")):tt(this,e):h(Ot("abort"))},e.prototype.close=function(){return Qe(this)?et(this)?h(new TypeError("Cannot close a stream that already has a writer")):ot(this)?h(new TypeError("Cannot close an already-closing stream")):rt(this):h(Ot("close"))},e.prototype.getWriter=function(){if(!Qe(this))throw Ot("getWriter");return Je(this)},e}();function Je(e){return new ut(e)}function Ze(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new S,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function Qe(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function et(e){return void 0!==e._writer}function tt(e,t){var r=e._state;if("closed"===r||"errored"===r)return f(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;var n=!1;"erroring"===r&&(n=!0,t=void 0);var a=l(function(r,a){e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:a,_reason:t,_wasAlreadyErroring:n}});return e._pendingAbortRequest._promise=a,n||at(e,t),a}function rt(e){var t=e._state;if("closed"===t||"errored"===t)return h(new TypeError("The stream (in "+t+" state) is not in the writable state and cannot be closed"));var r,n=l(function(t,r){var n={_resolve:t,_reject:r};e._closeRequest=n}),a=e._writer;return void 0!==a&&e._backpressure&&"writable"===t&&Nt(a),le(r=e._writableStreamController,mt,0),kt(r),n}function nt(e,t){"writable"!==e._state?it(e):at(e,t)}function at(e,t){var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&dt(n,t),!function(e){if(void 0===e._inFlightWriteRequest&&void 0===e._inFlightCloseRequest)return!1;return!0}(e)&&r._started&&it(e)}function it(e){e._state="errored",e._writableStreamController[E]();var t=e._storedError;if(e._writeRequests.forEach(function(e){e._reject(t)}),e._writeRequests=new S,void 0!==e._pendingAbortRequest){var r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring)return r._reject(t),void st(e);p(e._writableStreamController[I](r._reason),function(){r._resolve(),st(e)},function(t){r._reject(t),st(e)})}else st(e)}function ot(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function st(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var t=e._writer;void 0!==t&&Pt(t,e._storedError)}function ct(e,t){var r=e._writer;void 0!==r&&t!==e._backpressure&&(t?function(e){Et(e)}(r):Nt(r)),e._backpressure=t}Object.defineProperties(Ye.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(Ye.prototype,t.toStringTag,{value:"WritableStream",configurable:!0});var ut=function(){function e(e){if(U(e,1,"WritableStreamDefaultWriter"),Ke(e,"First parameter"),et(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;var t,r=e._state;if("writable"===r)!ot(e)&&e._backpressure?Et(this):Rt(this),Ft(this);else if("erroring"===r)jt(this,e._storedError),Ft(this);else if("closed"===r)Rt(this),Ft(t=this),It(t);else{var n=e._storedError;jt(this,n),_t(this,n)}}return Object.defineProperty(e.prototype,"closed",{get:function(){return lt(this)?this._closedPromise:h(Ct("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!lt(this))throw Ct("desiredSize");if(void 0===this._ownerWritableStream)throw Tt("desiredSize");return function(e){var t=e._ownerWritableStream,r=t._state;if("errored"===r||"erroring"===r)return null;if("closed"===r)return 0;return wt(t._writableStreamController)}(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return lt(this)?this._readyPromise:h(Ct("ready"))},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){return void 0===e&&(e=void 0),lt(this)?void 0===this._ownerWritableStream?h(Tt("abort")):function(e,t){return tt(e._ownerWritableStream,t)}(this,e):h(Ct("abort"))},e.prototype.close=function(){if(!lt(this))return h(Ct("close"));var e=this._ownerWritableStream;return void 0===e?h(Tt("close")):ot(e)?h(new TypeError("Cannot close an already-closing stream")):ft(this)},e.prototype.releaseLock=function(){if(!lt(this))throw Ct("releaseLock");void 0!==this._ownerWritableStream&&pt(this)},e.prototype.write=function(e){return void 0===e&&(e=void 0),lt(this)?void 0===this._ownerWritableStream?h(Tt("write to")):gt(this,e):h(Ct("write"))},e}();function lt(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function ft(e){return rt(e._ownerWritableStream)}function ht(e,t){"pending"===e._closedPromiseState?Pt(e,t):function(e,t){_t(e,t)}(e,t)}function dt(e,t){"pending"===e._readyPromiseState?Mt(e,t):function(e,t){jt(e,t)}(e,t)}function pt(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");dt(e,r),ht(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function gt(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,a=function(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return St(e,t),1}}(n,t);if(r!==e._ownerWritableStream)return h(Tt("write to"));var i=r._state;if("errored"===i)return h(r._storedError);if(ot(r)||"closed"===i)return h(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===i)return h(r._storedError);var o=function(e){return l(function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)})}(r);return function(e,t,r){try{le(e,t,r)}catch(t){return void St(e,t)}var n=e._controlledWritableStream;if(!ot(n)&&"writable"===n._state){var a=xt(e);ct(n,a)}kt(e)}(n,t,a),o}Object.defineProperties(ut.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(ut.prototype,t.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});var mt={},vt=function(){function e(){throw new TypeError("Illegal constructor")}return e.prototype.error=function(e){if(void 0===e&&(e=void 0),!function(e){if(!a(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream"))return!1;return!0}(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&At(this,e)},e.prototype[I]=function(e){var t=this._abortAlgorithm(e);return bt(this),t},e.prototype[E]=function(){fe(this)},e}();function yt(e,t,r,n,a,i,o,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,fe(t),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=o,t._writeAlgorithm=n,t._closeAlgorithm=a,t._abortAlgorithm=i;var c=xt(t);ct(e,c),p(f(r()),function(){t._started=!0,kt(t)},function(r){t._started=!0,nt(e,r)})}function bt(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function wt(e){return e._strategyHWM-e._queueTotalSize}function kt(e){var t=e._controlledWritableStream;if(e._started&&void 0===t._inFlightWriteRequest)if("erroring"!==t._state){if(0!==e._queue.length){var r=e._queue.peek().value;r===mt?function(e){var t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),ue(e);var r=e._closeAlgorithm();bt(e),p(r,function(){!function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var t=e._writer;void 0!==t&&It(t)}(t)},function(e){!function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),nt(e,t)}(t,e)})}(e):function(e,t){var r=e._controlledWritableStream;(function(e){e._inFlightWriteRequest=e._writeRequests.shift()})(r),p(e._writeAlgorithm(t),function(){!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);var t=r._state;if(ue(e),!ot(r)&&"writable"===t){var n=xt(e);ct(r,n)}kt(e)},function(t){"writable"===r._state&&bt(e),function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,nt(e,t)}(r,t)})}(e,r)}}else it(t)}function St(e,t){"writable"===e._controlledWritableStream._state&&At(e,t)}function xt(e){return wt(e)<=0}function At(e,t){var r=e._controlledWritableStream;bt(e),at(r,t)}function Ot(e){return new TypeError("WritableStream.prototype."+e+" can only be used on a WritableStream")}function Ct(e){return new TypeError("WritableStreamDefaultWriter.prototype."+e+" can only be used on a WritableStreamDefaultWriter")}function Tt(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function Ft(e){e._closedPromise=l(function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"})}function _t(e,t){Ft(e),Pt(e,t)}function Pt(e,t){void 0!==e._closedPromise_reject&&(y(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function It(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function Et(e){e._readyPromise=l(function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r}),e._readyPromiseState="pending"}function jt(e,t){Et(e),Mt(e,t)}function Rt(e){Et(e),Nt(e)}function Mt(e,t){void 0!==e._readyPromise_reject&&(y(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function Nt(e){void 0!==e._readyPromise_resolve&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}Object.defineProperties(vt.prototype,{error:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(vt.prototype,t.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});var Bt,Dt="undefined"!=typeof DOMException?DOMException:void 0,Lt=function(e){if("function"!=typeof e&&"object"!=typeof e)return!1;try{return new e,!0}catch(e){return!1}}(Dt)?Dt:((Bt=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}).prototype=Object.create(Error.prototype),Object.defineProperty(Bt.prototype,"constructor",{value:Bt,writable:!0,configurable:!0}),Bt);function Ut(e,t,n,a,i,o){var s=G(e),c=Je(t);e._disturbed=!0;var u=!1,v=f(void 0);return l(function(b,w){var k,S,x,A;if(void 0!==o){if(k=function(){var r=new Lt("Aborted","AbortError"),n=[];a||n.push(function(){return"writable"===t._state?tt(t,r):f(void 0)}),i||n.push(function(){return"readable"===e._state?lr(e,r):f(void 0)}),_(function(){return Promise.all(n.map(function(e){return e()}))},!0,r)},o.aborted)return void k();o.addEventListener("abort",k)}if(F(e,s._closedPromise,function(e){a?P(!0,e):_(function(){return tt(t,e)},!0,e)}),F(t,c._closedPromise,function(t){i?P(!0,t):_(function(){return lr(e,t)},!0,t)}),S=e,x=s._closedPromise,A=function(){n?P():_(function(){return function(e){var t=e._ownerWritableStream,r=t._state;return ot(t)||"closed"===r?f(void 0):"errored"===r?h(t._storedError):ft(e)}(c)})},"closed"===S._state?A():g(x,A),ot(t)||"closed"===t._state){var C=new TypeError("the destination writable stream closed before all data could be piped to it");i?P(!0,C):_(function(){return lr(e,C)},!0,C)}function T(){var e=v;return d(v,function(){return e!==v?T():void 0})}function F(e,t,r){"errored"===e._state?r(e._storedError):m(t,r)}function _(e,r,n){function a(){p(e(),function(){return I(r,n)},function(e){return I(!0,e)})}u||(u=!0,"writable"!==t._state||ot(t)?a():g(T(),a))}function P(e,r){u||(u=!0,"writable"!==t._state||ot(t)?I(e,r):g(T(),function(){return I(e,r)}))}function I(e,t){pt(c),O(s),void 0!==o&&o.removeEventListener("abort",k),e?w(t):b(void 0)}y(l(function(e,t){!function n(a){a?e():d(u?f(!0):d(c._readyPromise,function(){return l(function(e,t){te(s,{_chunkSteps:function(t){v=d(gt(c,t),void 0,r),e(!1)},_closeSteps:function(){return e(!0)},_errorSteps:t})})}),n,t)}(!1)}))})}var qt=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Xt(this))throw Zt("desiredSize");return Kt(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!Xt(this))throw Zt("close");if(!Yt(this))throw new TypeError("The stream is not in a state that permits close");Gt(this)},e.prototype.enqueue=function(e){if(void 0===e&&(e=void 0),!Xt(this))throw Zt("enqueue");if(!Yt(this))throw new TypeError("The stream is not in a state that permits enqueue");return Wt(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Xt(this))throw Zt("error");Vt(this,e)},e.prototype[j]=function(e){fe(this);var t=this._cancelAlgorithm(e);return zt(this),t},e.prototype[R]=function(e){var t=this._controlledReadableStream;if(this._queue.length>0){var r=ue(this);this._closeRequested&&0===this._queue.length?(zt(this),fr(t)):Ht(this),e._chunkSteps(r)}else W(t,e),Ht(this)},e}();function Xt(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")}function Ht(e){$t(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,p(e._pullAlgorithm(),function(){e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Ht(e))},function(t){Vt(e,t)})))}function $t(e){var t=e._controlledReadableStream;return!!Yt(e)&&(!!e._started&&(!!(ur(t)&&K(t)>0)||Kt(e)>0))}function zt(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Gt(e){if(Yt(e)){var t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(zt(e),fr(t))}}function Wt(e,t){if(Yt(e)){var r=e._controlledReadableStream;if(ur(r)&&K(r)>0)V(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(t){throw Vt(e,t),t}try{le(e,t,n)}catch(t){throw Vt(e,t),t}}Ht(e)}}function Vt(e,t){var r=e._controlledReadableStream;"readable"===r._state&&(fe(e),zt(e),hr(r,t))}function Kt(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Yt(e){var t=e._controlledReadableStream._state;return!e._closeRequested&&"readable"===t}function Jt(e,t,r,n,a,i,o){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,fe(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=o,t._strategyHWM=i,t._pullAlgorithm=n,t._cancelAlgorithm=a,e._readableStreamController=t,p(f(r()),function(){t._started=!0,Ht(t)},function(e){Vt(t,e)})}function Zt(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function Qt(e,t,r){return D(e,r),function(r){return k(e,t,[r])}}function er(e,t,r){return D(e,r),function(r){return k(e,t,[r])}}function tr(e,t,r){return D(e,r),function(r){return w(e,t,[r])}}function rr(e,t){if("bytes"!==(e=""+e))throw new TypeError(t+" '"+e+"' is not a valid enumeration value for ReadableStreamType");return e}function nr(e,t){if("byob"!==(e=""+e))throw new TypeError(t+" '"+e+"' is not a valid enumeration value for ReadableStreamReaderMode");return e}function ar(e,t){B(e,t);var r=null==e?void 0:e.preventAbort,n=null==e?void 0:e.preventCancel,a=null==e?void 0:e.preventClose,i=null==e?void 0:e.signal;return void 0!==i&&function(e,t){if(!function(e){if("object"!=typeof e||null===e)return!1;try{return"boolean"==typeof e.aborted}catch(e){return!1}}(e))throw new TypeError(t+" is not an AbortSignal.")}(i,t+" has member 'signal' that"),{preventAbort:Boolean(r),preventCancel:Boolean(n),preventClose:Boolean(a),signal:i}}Object.defineProperties(qt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(qt.prototype,t.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});var ir=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),void 0===e?e=null:L(e,"First parameter");var r=He(t,"Second parameter"),n=function(e,t){B(e,t);var r=e,n=null==r?void 0:r.autoAllocateChunkSize,a=null==r?void 0:r.cancel,i=null==r?void 0:r.pull,o=null==r?void 0:r.start,s=null==r?void 0:r.type;return{autoAllocateChunkSize:void 0===n?void 0:$(n,t+" has member 'autoAllocateChunkSize' that"),cancel:void 0===a?void 0:Qt(a,r,t+" has member 'cancel' that"),pull:void 0===i?void 0:er(i,r,t+" has member 'pull' that"),start:void 0===o?void 0:tr(o,r,t+" has member 'start' that"),type:void 0===s?void 0:rr(s,t+" has member 'type' that")}}(e,"First parameter");if(sr(this),"bytes"===n.type){if(void 0!==r.size)throw new RangeError("The strategy for a byte stream cannot have a size function");Ee(this,n,qe(r,0))}else{var a=Xe(r);!function(e,t,r,n){var a=Object.create(qt.prototype),i=function(){},o=function(){return f(void 0)},s=function(){return f(void 0)};void 0!==t.start&&(i=function(){return t.start(a)}),void 0!==t.pull&&(o=function(){return t.pull(a)}),void 0!==t.cancel&&(s=function(e){return t.cancel(e)}),Jt(e,a,i,o,s,r,n)}(this,n,qe(r,1),a)}}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!cr(this))throw dr("locked");return ur(this)},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),cr(this)?ur(this)?h(new TypeError("Cannot cancel a stream that already has a reader")):lr(this,e):h(dr("cancel"))},e.prototype.getReader=function(e){if(void 0===e&&(e=void 0),!cr(this))throw dr("getReader");return void 0===function(e,t){B(e,t);var r=null==e?void 0:e.mode;return{mode:void 0===r?void 0:nr(r,t+" has member 'mode' that")}}(e,"First parameter").mode?G(this):new De(this)},e.prototype.pipeThrough=function(e,t){if(void 0===t&&(t={}),!cr(this))throw dr("pipeThrough");U(e,1,"pipeThrough");var r=function(e,t){B(e,t);var r=null==e?void 0:e.readable;q(r,"readable","ReadableWritablePair"),z(r,t+" has member 'readable' that");var n=null==e?void 0:e.writable;return q(n,"writable","ReadableWritablePair"),Ke(n,t+" has member 'writable' that"),{readable:r,writable:n}}(e,"First parameter"),n=ar(t,"Second parameter");if(ur(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(et(r.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return y(Ut(this,r.writable,n.preventClose,n.preventAbort,n.preventCancel,n.signal)),r.readable},e.prototype.pipeTo=function(e,t){if(void 0===t&&(t={}),!cr(this))return h(dr("pipeTo"));if(void 0===e)return h("Parameter 1 is required in 'pipeTo'.");if(!Qe(e))return h(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var r;try{r=ar(t,"Second parameter")}catch(e){return h(e)}return ur(this)?h(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):et(e)?h(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Ut(this,e,r.preventClose,r.preventAbort,r.preventCancel,r.signal)},e.prototype.tee=function(){if(!cr(this))throw dr("tee");var e=function(e,t){var r,n,a,i,o,s=G(e),c=!1,u=!1,h=!1,d=l(function(e){o=e});function p(){return c?f(void 0):(c=!0,te(s,{_chunkSteps:function(e){b(function(){c=!1;var t=e,r=e;u||Wt(a._readableStreamController,t),h||Wt(i._readableStreamController,r)})},_closeSteps:function(){c=!1,u||Gt(a._readableStreamController),h||Gt(i._readableStreamController),u&&h||o(void 0)},_errorSteps:function(){c=!1}}),f(void 0))}function g(){}return a=or(g,p,function(t){if(u=!0,r=t,h){var a=he([r,n]),i=lr(e,a);o(i)}return d}),i=or(g,p,function(t){if(h=!0,n=t,u){var a=he([r,n]),i=lr(e,a);o(i)}return d}),m(s._closedPromise,function(e){Vt(a._readableStreamController,e),Vt(i._readableStreamController,e),u&&h||o(void 0)}),[a,i]}(this);return he(e)},e.prototype.values=function(e){if(void 0===e&&(e=void 0),!cr(this))throw dr("values");var t,r,n,a,i,o=function(e,t){B(e,t);var r=null==e?void 0:e.preventCancel;return{preventCancel:Boolean(r)}}(e,"First parameter");return t=this,r=o.preventCancel,n=G(t),a=new ne(n,r),(i=Object.create(ae))._asyncIteratorImpl=a,i},e}();function or(e,t,r,n,a){void 0===n&&(n=1),void 0===a&&(a=function(){return 1});var i=Object.create(ir.prototype);return sr(i),Jt(i,Object.create(qt.prototype),e,t,r,n,a),i}function sr(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function cr(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function ur(e){return void 0!==e._reader}function lr(e,t){return e._disturbed=!0,"closed"===e._state?f(void 0):"errored"===e._state?h(e._storedError):(fr(e),v(e._readableStreamController[j](t),r))}function fr(e){e._state="closed";var t=e._reader;void 0!==t&&(P(t),ee(t)&&(t._readRequests.forEach(function(e){e._closeSteps()}),t._readRequests=new S))}function hr(e,t){e._state="errored",e._storedError=t;var r=e._reader;void 0!==r&&(_(r,t),ee(r)?(r._readRequests.forEach(function(e){e._errorSteps(t)}),r._readRequests=new S):(r._readIntoRequests.forEach(function(e){e._errorSteps(t)}),r._readIntoRequests=new S))}function dr(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}function pr(e,t){B(e,t);var r=null==e?void 0:e.highWaterMark;return q(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:X(r)}}Object.defineProperties(ir.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(ir.prototype,t.toStringTag,{value:"ReadableStream",configurable:!0}),"symbol"==typeof t.asyncIterator&&Object.defineProperty(ir.prototype,t.asyncIterator,{value:ir.prototype.values,writable:!0,configurable:!0});var gr=function(e){return e.byteLength},mr=function(){function e(e){U(e,1,"ByteLengthQueuingStrategy"),e=pr(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!yr(this))throw vr("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!yr(this))throw vr("size");return gr},enumerable:!1,configurable:!0}),e}();function vr(e){return new TypeError("ByteLengthQueuingStrategy.prototype."+e+" can only be used on a ByteLengthQueuingStrategy")}function yr(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")}Object.defineProperties(mr.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(mr.prototype,t.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});var br=function(){return 1},wr=function(){function e(e){U(e,1,"CountQueuingStrategy"),e=pr(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!Sr(this))throw kr("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!Sr(this))throw kr("size");return br},enumerable:!1,configurable:!0}),e}();function kr(e){return new TypeError("CountQueuingStrategy.prototype."+e+" can only be used on a CountQueuingStrategy")}function Sr(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")}function xr(e,t,r){return D(e,r),function(r){return k(e,t,[r])}}function Ar(e,t,r){return D(e,r),function(r){return w(e,t,[r])}}function Or(e,t,r){return D(e,r),function(r,n){return k(e,t,[r,n])}}Object.defineProperties(wr.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(wr.prototype,t.toStringTag,{value:"CountQueuingStrategy",configurable:!0});var Cr=function(){function e(e,t,r){void 0===e&&(e={}),void 0===t&&(t={}),void 0===r&&(r={}),void 0===e&&(e=null);var n=He(t,"Second parameter"),a=He(r,"Third parameter"),i=function(e,t){B(e,t);var r=null==e?void 0:e.flush,n=null==e?void 0:e.readableType,a=null==e?void 0:e.start,i=null==e?void 0:e.transform,o=null==e?void 0:e.writableType;return{flush:void 0===r?void 0:xr(r,e,t+" has member 'flush' that"),readableType:n,start:void 0===a?void 0:Ar(a,e,t+" has member 'start' that"),transform:void 0===i?void 0:Or(i,e,t+" has member 'transform' that"),writableType:o}}(e,"First parameter");if(void 0!==i.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==i.writableType)throw new RangeError("Invalid writableType specified");var o,s=qe(a,0),c=Xe(a),u=qe(n,1),d=Xe(n);!function(e,t,r,n,a,i){function o(){return t}e._writable=function(e,t,r,n,a,i){void 0===a&&(a=1),void 0===i&&(i=function(){return 1});var o=Object.create(Ye.prototype);return Ze(o),yt(o,Object.create(vt.prototype),e,t,r,n,a,i),o}(o,function(t){return function(e,t){var r=e._transformStreamController;if(e._backpressure){var n=e._backpressureChangePromise;return v(n,function(){var n=e._writable,a=n._state;if("erroring"===a)throw n._storedError;return Mr(r,t)})}return Mr(r,t)}(e,t)},function(){return function(e){var t=e._readable,r=e._transformStreamController,n=r._flushAlgorithm();return jr(r),v(n,function(){if("errored"===t._state)throw t._storedError;Gt(t._readableStreamController)},function(r){throw Fr(e,r),t._storedError})}(e)},function(t){return function(e,t){return Fr(e,t),f(void 0)}(e,t)},r,n),e._readable=or(o,function(){return function(e){return Pr(e,!1),e._backpressureChangePromise}(e)},function(t){return _r(e,t),f(void 0)},a,i),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Pr(e,!0),e._transformStreamController=void 0}(this,l(function(e){o=e}),u,d,s,c),function(e,t){var r=Object.create(Ir.prototype),n=function(e){try{return Rr(r,e),f(void 0)}catch(e){return h(e)}},a=function(){return f(void 0)};void 0!==t.transform&&(n=function(e){return t.transform(e,r)});void 0!==t.flush&&(a=function(){return t.flush(r)});!function(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}(e,r,n,a)}(this,i),void 0!==i.start?o(i.start(this._transformStreamController)):o(void 0)}return Object.defineProperty(e.prototype,"readable",{get:function(){if(!Tr(this))throw Br("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"writable",{get:function(){if(!Tr(this))throw Br("writable");return this._writable},enumerable:!1,configurable:!0}),e}();function Tr(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function Fr(e,t){Vt(e._readable._readableStreamController,t),_r(e,t)}function _r(e,t){jr(e._transformStreamController),St(e._writable._writableStreamController,t),e._backpressure&&Pr(e,!1)}function Pr(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=l(function(t){e._backpressureChangePromise_resolve=t}),e._backpressure=t}Object.defineProperties(Cr.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(Cr.prototype,t.toStringTag,{value:"TransformStream",configurable:!0});var Ir=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Er(this))throw Nr("desiredSize");return Kt(this._controlledTransformStream._readable._readableStreamController)},enumerable:!1,configurable:!0}),e.prototype.enqueue=function(e){if(void 0===e&&(e=void 0),!Er(this))throw Nr("enqueue");Rr(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Er(this))throw Nr("error");var t;t=e,Fr(this._controlledTransformStream,t)},e.prototype.terminate=function(){if(!Er(this))throw Nr("terminate");!function(e){var t=e._controlledTransformStream;Gt(t._readable._readableStreamController);var r=new TypeError("TransformStream terminated");_r(t,r)}(this)},e}();function Er(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function jr(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function Rr(e,t){var r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!Yt(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{Wt(n,t)}catch(e){throw _r(r,e),r._readable._storedError}(function(e){return!$t(e)})(n)!==r._backpressure&&Pr(r,!0)}function Mr(e,t){return v(e._transformAlgorithm(t),void 0,function(t){throw Fr(e._controlledTransformStream,t),t})}function Nr(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function Br(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}Object.defineProperties(Ir.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(Ir.prototype,t.toStringTag,{value:"TransformStreamDefaultController",configurable:!0}),e.ByteLengthQueuingStrategy=mr,e.CountQueuingStrategy=wr,e.ReadableByteStreamController=ge,e.ReadableStream=ir,e.ReadableStreamBYOBReader=De,e.ReadableStreamBYOBRequest=pe,e.ReadableStreamDefaultController=qt,e.ReadableStreamDefaultReader=Q,e.TransformStream=Cr,e.TransformStreamDefaultController=Ir,e.WritableStream=Ye,e.WritableStreamDefaultController=vt,e.WritableStreamDefaultWriter=ut,Object.defineProperty(e,"__esModule",{value:!0})})(t)},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearPrimitiveCaches=function(){m._clearCache(),g._clearCache(),b._clearCache()},t.isCmd=function(e,t){return e instanceof m&&(void 0===t||e.cmd===t)},t.isDict=function(e,t){return e instanceof y&&(void 0===t||S(e.get("Type"),t))},t.isEOF=function(e){return e===p},t.isName=S,t.isRef=function(e){return e instanceof b},t.isRefsEqual=function(e,t){return e.num===t.num&&e.gen===t.gen},t.isStream=function(e){return e instanceof i.BaseStream},t.RefSetCache=t.RefSet=t.Ref=t.Name=t.EOF=t.Dict=t.Cmd=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),a=r(4),i=r(114);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function c(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),e}var p={};t.EOF=p;var g=function(){var e=Object.create(null);return function(){function t(e){f(this,t),this.name=e}return d(t,null,[{key:"get",value:function(r){var n=e[r];return n||(e[r]=new t(r))}},{key:"_clearCache",value:function(){e=Object.create(null)}}]),t}()}();t.Name=g;var m=function(){var e=Object.create(null);return function(){function t(e){f(this,t),this.cmd=e}return d(t,null,[{key:"get",value:function(r){var n=e[r];return n||(e[r]=new t(r))}},{key:"_clearCache",value:function(){e=Object.create(null)}}]),t}()}();t.Cmd=m;var v=function(){return v},y=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;f(this,e),this._map=Object.create(null),this.xref=t,this.objId=null,this.suppressEncryption=!1,this.__nonSerializable__=v}return d(e,[{key:"assignXref",value:function(e){this.xref=e}},{key:"size",get:function(){return Object.keys(this._map).length}},{key:"get",value:function(e,t,r){var n=this._map[e];return void 0===n&&void 0!==t&&void 0===(n=this._map[t])&&void 0!==r&&(n=this._map[r]),n instanceof b&&this.xref?this.xref.fetch(n,this.suppressEncryption):n}},{key:"getAsync",value:function(){var e,t=(e=n.default.mark(function e(t,r,a){var i;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===(i=this._map[t])&&void 0!==r&&void 0===(i=this._map[r])&&void 0!==a&&(i=this._map[a]),!(i instanceof b&&this.xref)){e.next=4;break}return e.abrupt("return",this.xref.fetchAsync(i,this.suppressEncryption));case 4:return e.abrupt("return",i);case 5:case"end":return e.stop()}},e,this)}),function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(e){l(i,n,a,o,s,"next",e)}function s(e){l(i,n,a,o,s,"throw",e)}o(void 0)})});return function(e,r,n){return t.apply(this,arguments)}}()},{key:"getArray",value:function(e,t,r){var n=this._map[e];if(void 0===n&&void 0!==t&&void 0===(n=this._map[t])&&void 0!==r&&(n=this._map[r]),n instanceof b&&this.xref&&(n=this.xref.fetch(n,this.suppressEncryption)),Array.isArray(n))for(var a=0,i=(n=n.slice()).length;a<i;a++)n[a]instanceof b&&this.xref&&(n[a]=this.xref.fetch(n[a],this.suppressEncryption));return n}},{key:"getRaw",value:function(e){return this._map[e]}},{key:"getKeys",value:function(){return Object.keys(this._map)}},{key:"getRawValues",value:function(){return Object.values(this._map)}},{key:"set",value:function(e,t){this._map[e]=t}},{key:"has",value:function(e){return void 0!==this._map[e]}},{key:"forEach",value:function(e){for(var t in this._map)e(t,this.get(t))}}],[{key:"empty",get:function(){var t=new e(null);return t.set=function(e,t){(0,a.unreachable)("Should not call `set` on the empty dictionary.")},(0,a.shadow)(this,"empty",t)}},{key:"merge",value:function(t){var r=t.xref,n=t.dictArray,a=t.mergeSubDicts,i=void 0!==a&&a,c=new e(r);if(!i){var u,l=s(n);try{for(l.s();!(u=l.n()).done;){var f=u.value;if(f instanceof e)for(var h=0,d=Object.entries(f._map);h<d.length;h++){var p=o(d[h],2),g=p[0],m=p[1];void 0===c._map[g]&&(c._map[g]=m)}}}catch(e){l.e(e)}finally{l.f()}return c.size>0?c:e.empty}var v,y=new Map,b=s(n);try{for(b.s();!(v=b.n()).done;){var w=v.value;if(w instanceof e)for(var k=0,S=Object.entries(w._map);k<S.length;k++){var x=o(S[k],2),A=x[0],O=x[1],C=y.get(A);void 0===C&&(C=[],y.set(A,C)),C.push(O)}}}catch(e){b.e(e)}finally{b.f()}var T,F=s(y);try{for(F.s();!(T=F.n()).done;){var _=o(T.value,2),P=_[0],I=_[1];if(1!==I.length&&I[0]instanceof e){var E,j=new e(r),R=s(I);try{for(R.s();!(E=R.n()).done;){var M=E.value;if(M instanceof e)for(var N=0,B=Object.entries(M._map);N<B.length;N++){var D=o(B[N],2),L=D[0],U=D[1];void 0===j._map[L]&&(j._map[L]=U)}}}catch(e){R.e(e)}finally{R.f()}j.size>0&&(c._map[P]=j)}else c._map[P]=I[0]}}catch(e){F.e(e)}finally{F.f()}return y.clear(),c.size>0?c:e.empty}}]),e}();t.Dict=y;var b=function(){var e=Object.create(null);return function(){function t(e,r){f(this,t),this.num=e,this.gen=r}return d(t,[{key:"toString",value:function(){return 0===this.gen?"".concat(this.num,"R"):"".concat(this.num,"R").concat(this.gen)}}],[{key:"get",value:function(r,n){var a=0===n?"".concat(r,"R"):"".concat(r,"R").concat(n),i=e[a];return i||(e[a]=new t(r,n))}},{key:"_clearCache",value:function(){e=Object.create(null)}}]),t}()}();t.Ref=b;var w=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;f(this,e),this._set=new Set(t&&t._set)}return d(e,[{key:"has",value:function(e){return this._set.has(e.toString())}},{key:"put",value:function(e){this._set.add(e.toString())}},{key:"remove",value:function(e){this._set.delete(e.toString())}},{key:"forEach",value:function(e){var t,r=s(this._set.values());try{for(r.s();!(t=r.n()).done;){e(t.value)}}catch(e){r.e(e)}finally{r.f()}}},{key:"clear",value:function(){this._set.clear()}}]),e}();t.RefSet=w;var k=function(){function e(){f(this,e),this._map=new Map}return d(e,[{key:"size",get:function(){return this._map.size}},{key:"get",value:function(e){return this._map.get(e.toString())}},{key:"has",value:function(e){return this._map.has(e.toString())}},{key:"put",value:function(e,t){this._map.set(e.toString(),t)}},{key:"putAlias",value:function(e,t){this._map.set(e.toString(),this.get(t))}},{key:"forEach",value:function(e){var t,r=s(this._map.values());try{for(r.s();!(t=r.n()).done;){e(t.value)}}catch(e){r.e(e)}finally{r.f()}}},{key:"clear",value:function(){this._map.clear()}}]),e}();function S(e,t){return e instanceof g&&(void 0===t||e.name===t)}t.RefSetCache=k},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseStream=void 0;var n=r(4);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.constructor===e&&(0,n.unreachable)("Cannot initialize BaseStream.")}var t,r,i;return t=e,(r=[{key:"length",get:function(){(0,n.unreachable)("Abstract getter `length` accessed")}},{key:"isEmpty",get:function(){(0,n.unreachable)("Abstract getter `isEmpty` accessed")}},{key:"isDataLoaded",get:function(){return(0,n.shadow)(this,"isDataLoaded",!0)}},{key:"getByte",value:function(){(0,n.unreachable)("Abstract method `getByte` called")}},{key:"getBytes",value:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,n.unreachable)("Abstract method `getBytes` called")}},{key:"peekByte",value:function(){var e=this.getByte();return-1!==e&&this.pos--,e}},{key:"peekBytes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.getBytes(e,t);return this.pos-=r.length,r}},{key:"getUint16",value:function(){var e=this.getByte(),t=this.getByte();return-1===e||-1===t?-1:(e<<8)+t}},{key:"getInt32",value:function(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()}},{key:"getByteRange",value:function(e,t){(0,n.unreachable)("Abstract method `getByteRange` called")}},{key:"getString",value:function(e){return(0,n.bytesToString)(this.getBytes(e,!1))}},{key:"skip",value:function(e){this.pos+=e||1}},{key:"reset",value:function(){(0,n.unreachable)("Abstract method `reset` called")}},{key:"moveStart",value:function(){(0,n.unreachable)("Abstract method `moveStart` called")}},{key:"makeSubStream",value:function(e,t){arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,n.unreachable)("Abstract method `makeSubStream` called")}},{key:"getBaseStreams",value:function(){return null}}])&&a(t.prototype,r),i&&a(t,i),e}();t.BaseStream=i},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkPdfManager=t.LocalPdfManager=void 0;var a=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),i=r(4),o=r(116),s=r(117),c=r(119),u=r(118);function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=p(e);if(t){var i=p(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return d(e)}(this,r)}}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function m(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(e){g(i,n,a,o,s,"next",e)}function s(e){g(i,n,a,o,s,"throw",e)}o(void 0)})}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function b(e,t,r){return t&&y(e.prototype,t),r&&y(e,r),e}function w(e){if(e){var t=(0,i.createValidAbsoluteUrl)(e);if(t)return t.href;(0,i.warn)('Invalid absolute docBaseUrl: "'.concat(e,'".'))}return null}var k=function(){function e(){v(this,e),this.constructor===e&&(0,i.unreachable)("Cannot initialize BasePdfManager.")}return b(e,[{key:"docId",get:function(){return this._docId}},{key:"password",get:function(){return this._password}},{key:"docBaseUrl",get:function(){return this._docBaseUrl}},{key:"onLoadedStream",value:function(){(0,i.unreachable)("Abstract method `onLoadedStream` called")}},{key:"ensureDoc",value:function(e,t){return this.ensure(this.pdfDocument,e,t)}},{key:"ensureXRef",value:function(e,t){return this.ensure(this.pdfDocument.xref,e,t)}},{key:"ensureCatalog",value:function(e,t){return this.ensure(this.pdfDocument.catalog,e,t)}},{key:"getPage",value:function(e){return this.pdfDocument.getPage(e)}},{key:"fontFallback",value:function(e,t){return this.pdfDocument.fontFallback(e,t)}},{key:"loadXfaFonts",value:function(e,t){return this.pdfDocument.loadXfaFonts(e,t)}},{key:"cleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.pdfDocument.cleanup(e)}},{key:"ensure",value:function(){var e=m(a.default.mark(function e(t,r,n){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:(0,i.unreachable)("Abstract method `ensure` called");case 1:case"end":return e.stop()}},e)}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"requestRange",value:function(e,t){(0,i.unreachable)("Abstract method `requestRange` called")}},{key:"requestLoadedStream",value:function(){(0,i.unreachable)("Abstract method `requestLoadedStream` called")}},{key:"sendProgressiveData",value:function(e){(0,i.unreachable)("Abstract method `sendProgressiveData` called")}},{key:"updatePassword",value:function(e){this._password=e}},{key:"terminate",value:function(e){(0,i.unreachable)("Abstract method `terminate` called")}}]),e}(),S=function(e){l(r,k);var t=h(r);function r(e,n,a,i,o,s){var l;v(this,r),(l=t.call(this))._docId=e,l._password=a,l._docBaseUrl=w(s),l.evaluatorOptions=i,l.enableXfa=o;var f=new u.Stream(n);return l.pdfDocument=new c.PDFDocument(d(l),f),l._loadedStreamPromise=Promise.resolve(f),l}return b(r,[{key:"ensure",value:function(){var e=m(a.default.mark(function e(t,r,n){var i;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof(i=t[r])){e.next=3;break}return e.abrupt("return",i.apply(t,n));case 3:return e.abrupt("return",i);case 4:case"end":return e.stop()}},e)}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"requestRange",value:function(e,t){return Promise.resolve()}},{key:"requestLoadedStream",value:function(){}},{key:"onLoadedStream",value:function(){return this._loadedStreamPromise}},{key:"terminate",value:function(e){}}]),r}();t.LocalPdfManager=S;var x=function(e){l(r,k);var t=h(r);function r(e,n,a,i,s,u){var l;return v(this,r),(l=t.call(this))._docId=e,l._password=a.password,l._docBaseUrl=w(u),l.msgHandler=a.msgHandler,l.evaluatorOptions=i,l.enableXfa=s,l.streamManager=new o.ChunkedStreamManager(n,{msgHandler:a.msgHandler,length:a.length,disableAutoFetch:a.disableAutoFetch,rangeChunkSize:a.rangeChunkSize}),l.pdfDocument=new c.PDFDocument(d(l),l.streamManager.getStream()),l}return b(r,[{key:"ensure",value:function(){var e=m(a.default.mark(function e(t,r,n){var i;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,"function"!=typeof(i=t[r])){e.next=4;break}return e.abrupt("return",i.apply(t,n));case 4:return e.abrupt("return",i);case 7:if(e.prev=7,e.t0=e.catch(0),e.t0 instanceof s.MissingDataException){e.next=11;break}throw e.t0;case 11:return e.next=13,this.requestRange(e.t0.begin,e.t0.end);case 13:return e.abrupt("return",this.ensure(t,r,n));case 14:case"end":return e.stop()}},e,this,[[0,7]])}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"requestRange",value:function(e,t){return this.streamManager.requestRange(e,t)}},{key:"requestLoadedStream",value:function(){this.streamManager.requestAllChunks()}},{key:"sendProgressiveData",value:function(e){this.streamManager.onReceiveData({chunk:e})}},{key:"onLoadedStream",value:function(){return this.streamManager.onLoadedStream()}},{key:"terminate",value:function(e){this.streamManager.abort(e)}}]),r}();t.NetworkPdfManager=x},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.ChunkedStreamManager=t.ChunkedStream=void 0;var a=r(4),i=r(117),o=r(118);function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=p(e);if(t){var i=p(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(r,o.Stream);var t=d(r);function r(e,n,a){var i;return u(this,r),(i=t.call(this,new Uint8Array(e),0,e,null)).chunkSize=n,i._loadedChunks=new Set,i.numChunks=Math.ceil(e/n),i.manager=a,i.progressiveDataLength=0,i.lastSuccessfulEnsureByteChunk=-1,i}return f(r,[{key:"getMissingChunks",value:function(){for(var e=[],t=0,r=this.numChunks;t<r;++t)this._loadedChunks.has(t)||e.push(t);return e}},{key:"numChunksLoaded",get:function(){return this._loadedChunks.size}},{key:"isDataLoaded",get:function(){return this.numChunksLoaded===this.numChunks}},{key:"onReceiveData",value:function(e,t){var r=this.chunkSize;if(e%r!=0)throw new Error("Bad begin offset: ".concat(e));var n=e+t.byteLength;if(n%r!=0&&n!==this.bytes.length)throw new Error("Bad end offset: ".concat(n));this.bytes.set(new Uint8Array(t),e);for(var a=Math.floor(e/r),i=Math.floor((n-1)/r)+1,o=a;o<i;++o)this._loadedChunks.add(o)}},{key:"onReceiveProgressiveData",value:function(e){var t=this.progressiveDataLength,r=Math.floor(t/this.chunkSize);this.bytes.set(new Uint8Array(e),t),t+=e.byteLength,this.progressiveDataLength=t;for(var n=t>=this.end?this.numChunks:Math.floor(t/this.chunkSize),a=r;a<n;++a)this._loadedChunks.add(a)}},{key:"ensureByte",value:function(e){if(!(e<this.progressiveDataLength)){var t=Math.floor(e/this.chunkSize);if(t!==this.lastSuccessfulEnsureByteChunk){if(!this._loadedChunks.has(t))throw new i.MissingDataException(e,e+1);this.lastSuccessfulEnsureByteChunk=t}}}},{key:"ensureRange",value:function(e,t){if(!(e>=t||t<=this.progressiveDataLength))for(var r=this.chunkSize,n=Math.floor(e/r),a=Math.floor((t-1)/r)+1,o=n;o<a;++o)if(!this._loadedChunks.has(o))throw new i.MissingDataException(e,t)}},{key:"nextEmptyChunk",value:function(e){for(var t=this.numChunks,r=0;r<t;++r){var n=(e+r)%t;if(!this._loadedChunks.has(n))return n}return null}},{key:"hasChunk",value:function(e){return this._loadedChunks.has(e)}},{key:"getByte",value:function(){var e=this.pos;return e>=this.end?-1:(e>=this.progressiveDataLength&&this.ensureByte(e),this.bytes[this.pos++])}},{key:"getBytes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.bytes,n=this.pos,a=this.end;if(!e){a>this.progressiveDataLength&&this.ensureRange(n,a);var i=r.subarray(n,a);return t?new Uint8ClampedArray(i):i}var o=n+e;o>a&&(o=a),o>this.progressiveDataLength&&this.ensureRange(n,o),this.pos=o;var s=r.subarray(n,o);return t?new Uint8ClampedArray(s):s}},{key:"getByteRange",value:function(e,t){return e<0&&(e=0),t>this.end&&(t=this.end),t>this.progressiveDataLength&&this.ensureRange(e,t),this.bytes.subarray(e,t)}},{key:"makeSubStream",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;function n(){}t?e+t>this.progressiveDataLength&&this.ensureRange(e,e+t):e>=this.progressiveDataLength&&this.ensureByte(e),n.prototype=Object.create(this),n.prototype.getMissingChunks=function(){for(var e=this.chunkSize,t=Math.floor(this.start/e),r=Math.floor((this.end-1)/e)+1,n=[],a=t;a<r;++a)this._loadedChunks.has(a)||n.push(a);return n},Object.defineProperty(n.prototype,"isDataLoaded",{get:function(){return this.numChunksLoaded===this.numChunks||0===this.getMissingChunks().length},configurable:!0});var a=new n;return a.pos=a.start=e,a.end=e+t||this.end,a.dict=r,a}},{key:"getBaseStreams",value:function(){return[this]}}]),r}();t.ChunkedStream=g;var m=function(){function e(t,r){u(this,e),this.length=r.length,this.chunkSize=r.rangeChunkSize,this.stream=new g(this.length,this.chunkSize,this),this.pdfNetworkStream=t,this.disableAutoFetch=r.disableAutoFetch,this.msgHandler=r.msgHandler,this.currRequestId=0,this._chunksNeededByRequest=new Map,this._requestsByChunk=new Map,this._promisesByRequest=new Map,this.progressiveDataLength=0,this.aborted=!1,this._loadedStreamCapability=(0,a.createPromiseCapability)()}return f(e,[{key:"onLoadedStream",value:function(){return this._loadedStreamCapability.promise}},{key:"sendRequest",value:function(e,t){var r=this,n=this.pdfNetworkStream.getRangeReader(e,t);n.isStreamingSupported||(n.onProgress=this.onProgress.bind(this));var i=[],o=0;new Promise(function(e,t){n.read().then(function s(c){try{if(!c.done){var u=c.value;return i.push(u),o+=(0,a.arrayByteLength)(u),n.isStreamingSupported&&r.onProgress({loaded:o}),void n.read().then(s,t)}var l=(0,a.arraysToBytes)(i);i=null,e(l)}catch(e){t(e)}},t)}).then(function(t){r.aborted||r.onReceiveData({chunk:t,begin:e})})}},{key:"requestAllChunks",value:function(){var e=this.stream.getMissingChunks();return this._requestChunks(e),this._loadedStreamCapability.promise}},{key:"_requestChunks",value:function(e){var t=this,r=this.currRequestId++,n=new Set;this._chunksNeededByRequest.set(r,n);var i,o=s(e);try{for(o.s();!(i=o.n()).done;){var c=i.value;this.stream.hasChunk(c)||n.add(c)}}catch(e){o.e(e)}finally{o.f()}if(0===n.size)return Promise.resolve();var u=(0,a.createPromiseCapability)();this._promisesByRequest.set(r,u);var l,f=[],h=s(n);try{for(h.s();!(l=h.n()).done;){var d=l.value,p=this._requestsByChunk.get(d);p||(p=[],this._requestsByChunk.set(d,p),f.push(d)),p.push(r)}}catch(e){h.e(e)}finally{h.f()}if(f.length>0){var g,m=s(this.groupChunks(f));try{for(m.s();!(g=m.n()).done;){var v=g.value,y=v.beginChunk*this.chunkSize,b=Math.min(v.endChunk*this.chunkSize,this.length);this.sendRequest(y,b)}}catch(e){m.e(e)}finally{m.f()}}return u.promise.catch(function(e){if(!t.aborted)throw e})}},{key:"getStream",value:function(){return this.stream}},{key:"requestRange",value:function(e,t){t=Math.min(t,this.length);for(var r=this.getBeginChunk(e),n=this.getEndChunk(t),a=[],i=r;i<n;++i)a.push(i);return this._requestChunks(a)}},{key:"requestRanges",value:function(){var e,t=[],r=s(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]);try{for(r.s();!(e=r.n()).done;)for(var n=e.value,a=this.getBeginChunk(n.begin),i=this.getEndChunk(n.end),o=a;o<i;++o)t.includes(o)||t.push(o)}catch(e){r.e(e)}finally{r.f()}return t.sort(function(e,t){return e-t}),this._requestChunks(t)}},{key:"groupChunks",value:function(e){for(var t=[],r=-1,n=-1,a=0,i=e.length;a<i;++a){var o=e[a];r<0&&(r=o),n>=0&&n+1!==o&&(t.push({beginChunk:r,endChunk:n+1}),r=o),a+1===e.length&&t.push({beginChunk:r,endChunk:o+1}),n=o}return t}},{key:"onProgress",value:function(e){this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize+e.loaded,total:this.length})}},{key:"onReceiveData",value:function(e){var t=e.chunk,r=void 0===e.begin,n=r?this.progressiveDataLength:e.begin,a=n+t.byteLength,i=Math.floor(n/this.chunkSize),o=a<this.length?Math.floor(a/this.chunkSize):Math.ceil(a/this.chunkSize);r?(this.stream.onReceiveProgressiveData(t),this.progressiveDataLength=a):this.stream.onReceiveData(n,t),this.stream.isDataLoaded&&this._loadedStreamCapability.resolve(this.stream);for(var c=[],u=i;u<o;++u){var l=this._requestsByChunk.get(u);if(l){this._requestsByChunk.delete(u);var f,h=s(l);try{for(h.s();!(f=h.n()).done;){var d=f.value,p=this._chunksNeededByRequest.get(d);p.has(u)&&p.delete(u),p.size>0||c.push(d)}}catch(e){h.e(e)}finally{h.f()}}}if(!this.disableAutoFetch&&0===this._requestsByChunk.size){var g;if(1===this.stream.numChunksLoaded){var m=this.stream.numChunks-1;this.stream.hasChunk(m)||(g=m)}else g=this.stream.nextEmptyChunk(o);Number.isInteger(g)&&this._requestChunks([g])}for(var v=0,y=c;v<y.length;v++){var b=y[v],w=this._promisesByRequest.get(b);this._promisesByRequest.delete(b),w.resolve()}this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize,total:this.length})}},{key:"onError",value:function(e){this._loadedStreamCapability.reject(e)}},{key:"getBeginChunk",value:function(e){return Math.floor(e/this.chunkSize)}},{key:"getEndChunk",value:function(e){return Math.floor((e-1)/this.chunkSize)+1}},{key:"abort",value:function(e){this.aborted=!0,this.pdfNetworkStream&&this.pdfNetworkStream.cancelAllRequests(e);var t,r=s(this._promisesByRequest.values());try{for(r.s();!(t=r.n()).done;){t.value.reject(e)}}catch(e){r.e(e)}finally{r.f()}}}]),e}();t.ChunkedStreamManager=m},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.collectActions=function(e,t,r){var n=Object.create(null),s=m({dict:t,key:"AA",stopWhenFound:!1});if(s)for(var c=s.length-1;c>=0;c--){var u=s[c];if(u instanceof i.Dict){var l,f=o(u.getKeys());try{for(f.s();!(l=f.n()).done;){var h=l.value,d=r[h];if(d){var p=u.getRaw(h),g=new i.RefSet,v=[];y(p,e,v,g),v.length>0&&(n[d]=v)}}}catch(e){f.e(e)}finally{f.f()}}}if(t.has("A")){var b=t.get("A"),w=new i.RefSet,k=[];y(b,e,k,w),k.length>0&&(n.Action=k)}return(0,a.objectSize)(n)>0?n:null},t.encodeToXmlString=function(e){for(var t=[],r=0,n=0,a=e.length;n<a;n++){var i=e.codePointAt(n);if(32<=i&&i<=126){var o=b[i];o&&(r<n&&t.push(e.substring(r,n)),t.push(o),r=n+1)}else r<n&&t.push(e.substring(r,n)),t.push("&#x".concat(i.toString(16).toUpperCase(),";")),i>55295&&(i<57344||i>65533)&&n++,r=n+1}if(0===t.length)return e;r<e.length&&t.push(e.substring(r,e.length));return t.join("")},t.escapePDFName=function(e){for(var t=[],r=0,n=0,a=e.length;n<a;n++){var i=e.charCodeAt(n);(i<33||i>126||35===i||40===i||41===i||60===i||62===i||91===i||93===i||123===i||125===i||47===i||37===i)&&(r<n&&t.push(e.substring(r,n)),t.push("#".concat(i.toString(16))),r=n+1)}if(0===t.length)return e;r<e.length&&t.push(e.substring(r,e.length));return t.join("")},t.getArrayLookupTableFactory=function(e){var t;return function(){if(e){var r=e();e=null,t=Object.create(null);for(var n=0,a=r.length;n<a;n+=2)t[r[n]]=r[n+1];r=null}return t}},t.getInheritableProperty=m,t.getLookupTableFactory=function(e){var t;return function(){return e&&(t=Object.create(null),e(t),e=null),t}},t.isWhiteSpace=function(e){return 32===e||9===e||13===e||10===e},t.log2=function(e){if(e<=0)return 0;return Math.ceil(Math.log2(e))},t.parseXFAPath=function(e){var t=/(.+)\[([0-9]+)\]$/;return e.split(".").map(function(e){var r=e.match(t);return r?{name:r[1],pos:parseInt(r[2],10)}:{name:e,pos:0}})},t.readInt8=function(e,t){return e[t]<<24>>24},t.readUint16=function(e,t){return e[t]<<8|e[t+1]},t.readUint32=function(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0},t.toRomanNumerals=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,a.assert)(Number.isInteger(e)&&e>0,"The number should be a positive integer.");var r,n=[];for(;e>=1e3;)e-=1e3,n.push("M");r=e/100|0,e%=100,n.push(v[r]),r=e/10|0,e%=10,n.push(v[10+r]),n.push(v[20+e]);var i=n.join("");return t?i.toLowerCase():i},t.validateCSSFont=function(e){var t=new Set(["100","200","300","400","500","600","700","800","900","1000","normal","bold","bolder","lighter"]),r=e.fontFamily,n=e.fontWeight,i=e.italicAngle;if(/^".*"$/.test(r)){if(/[^\\]"/.test(r.slice(1,r.length-1)))return(0,a.warn)('XFA - FontFamily contains some unescaped ": '.concat(r,".")),!1}else if(/^'.*'$/.test(r)){if(/[^\\]'/.test(r.slice(1,r.length-1)))return(0,a.warn)("XFA - FontFamily contains some unescaped ': ".concat(r,".")),!1}else{var s,c=o(r.split(/[ \t]+/));try{for(c.s();!(s=c.n()).done;){var u=s.value;if(/^([0-9]|(-([0-9]|-)))/.test(u)||!/^[a-zA-Z0-9\-_\\]+$/.test(u))return(0,a.warn)("XFA - FontFamily contains some invalid <custom-ident>: ".concat(r,".")),!1}}catch(e){c.e(e)}finally{c.f()}}var l=n?n.toString():"";e.fontWeight=t.has(l)?l:"400";var f=parseFloat(i);return e.italicAngle=isNaN(f)||f<-90||f>90?"14":i.toString(),!0},t.XRefParseException=t.XRefEntryException=t.MissingDataException=void 0;var a=r(4),i=r(113);function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){c=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(c)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=h(e);if(t){var i=h(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){u(r,a.BaseException);var t=f(r);function r(e,n){var a;return c(this,r),(a=t.call(this,"Missing data [".concat(e,", ").concat(n,")"))).begin=e,a.end=n,a}return r}();t.MissingDataException=d;var p=function(e){u(r,a.BaseException);var t=f(r);function r(){return c(this,r),t.apply(this,arguments)}return r}();t.XRefEntryException=p;var g=function(e){u(r,a.BaseException);var t=f(r);function r(){return c(this,r),t.apply(this,arguments)}return r}();function m(e){for(var t,r=e.dict,n=e.key,a=e.getArray,o=void 0!==a&&a,s=e.stopWhenFound,c=void 0===s||s,u=new i.RefSet;r instanceof i.Dict&&(!r.objId||!u.has(r.objId));){r.objId&&u.put(r.objId);var l=o?r.getArray(n):r.get(n);if(void 0!==l){if(c)return l;t||(t=[]),t.push(l)}r=r.get("Parent")}return t}t.XRefParseException=g;var v=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"];function y(e,t,r,n){if(e){var s=null;if((0,i.isRef)(e)){if(n.has(e))return;s=e,n.put(s),e=t.fetch(e)}if(Array.isArray(e)){var c,u=o(e);try{for(u.s();!(c=u.n()).done;){y(c.value,t,r,n)}}catch(e){u.e(e)}finally{u.f()}}else if(e instanceof i.Dict){if((0,i.isName)(e.get("S"),"JavaScript")&&e.has("JS")){var l,f=e.get("JS");l=(0,i.isStream)(f)?f.getString():f,(l=(0,a.stringToPDFString)(l))&&r.push(l)}y(e.getRaw("Next"),t,r,n)}s&&n.remove(s)}}var b={60:"&lt;",62:"&gt;",38:"&amp;",34:"&quot;",39:"&apos;"}},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.StringStream=t.Stream=t.NullStream=void 0;var a=r(114),i=r(4);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=f(e);if(t){var i=f(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){c(u,a.BaseStream);var t,r,n,i=l(u);function u(e,t,r,n){var a;return o(this,u),(a=i.call(this)).bytes=e instanceof Uint8Array?e:new Uint8Array(e),a.start=t||0,a.pos=a.start,a.end=t+r||a.bytes.length,a.dict=n,a}return t=u,(r=[{key:"length",get:function(){return this.end-this.start}},{key:"isEmpty",get:function(){return 0===this.length}},{key:"getByte",value:function(){return this.pos>=this.end?-1:this.bytes[this.pos++]}},{key:"getBytes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.bytes,n=this.pos,a=this.end;if(!e){var i=r.subarray(n,a);return t?new Uint8ClampedArray(i):i}var o=n+e;o>a&&(o=a),this.pos=o;var s=r.subarray(n,o);return t?new Uint8ClampedArray(s):s}},{key:"getByteRange",value:function(e,t){return e<0&&(e=0),t>this.end&&(t=this.end),this.bytes.subarray(e,t)}},{key:"reset",value:function(){this.pos=this.start}},{key:"moveStart",value:function(){this.start=this.pos}},{key:"makeSubStream",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new u(this.bytes.buffer,e,t,r)}}])&&s(t.prototype,r),n&&s(t,n),u}();t.Stream=h;var d=function(e){c(r,h);var t=l(r);function r(e){return o(this,r),t.call(this,(0,i.stringToBytes)(e))}return r}();t.StringStream=d;var p=function(e){c(r,h);var t=l(r);function r(){return o(this,r),t.call(this,new Uint8Array(0))}return r}();t.NullStream=p},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDocument=t.Page=void 0;var a=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),i=r(4),o=r(113),s=r(117),c=r(118),u=r(120),l=r(114),f=r(173),h=r(165),d=r(125),p=r(171),g=r(163),m=r(123),v=r(127),y=r(170),b=r(175),w=r(196);function k(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function S(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(e){k(i,n,a,o,s,"next",e)}function s(e){k(i,n,a,o,s,"throw",e)}o(void 0)})}}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||O(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=O(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function O(e,t){if(e){if("string"==typeof e)return C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,t):void 0}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function F(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=_(e);if(t){var i=_(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function E(e,t,r){return t&&I(e.prototype,t),r&&I(e,r),e}var j=[0,0,612,792],R=function(){function e(t){var r=t.pdfManager,n=t.xref,a=t.pageIndex,i=t.pageDict,o=t.ref,s=t.globalIdFactory,c=t.fontCache,u=t.builtInCMapCache,l=t.globalImageCache,f=t.nonBlendModesSet,h=t.xfaFactory;P(this,e),this.pdfManager=r,this.pageIndex=a,this.pageDict=i,this.xref=n,this.ref=o,this.fontCache=c,this.builtInCMapCache=u,this.globalImageCache=l,this.nonBlendModesSet=f,this.evaluatorOptions=r.evaluatorOptions,this.resourcesPromise=null,this.xfaFactory=h;var d={obj:0};this._localIdFactory=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&T(e,t)}(r,s);var t=F(r);function r(){return P(this,r),t.apply(this,arguments)}return E(r,null,[{key:"createObjId",value:function(){return"p".concat(a,"_").concat(++d.obj)}},{key:"getPageObjId",value:function(){return"page".concat(o.toString())}}]),r}()}return E(e,[{key:"_getInheritableProperty",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=(0,s.getInheritableProperty)({dict:this.pageDict,key:e,getArray:t,stopWhenFound:!1});return Array.isArray(r)?1!==r.length&&(0,o.isDict)(r[0])?o.Dict.merge({xref:this.xref,dictArray:r}):r[0]:r}},{key:"content",get:function(){return this.pageDict.getArray("Contents")}},{key:"resources",get:function(){return(0,i.shadow)(this,"resources",this._getInheritableProperty("Resources")||o.Dict.empty)}},{key:"_getBoundingBox",value:function(e){if(this.xfaData){var t=this.xfaData.attributes.style,r=t.width,n=t.height;return[0,0,parseInt(r),parseInt(n)]}var a=this._getInheritableProperty(e,!0);if(Array.isArray(a)&&4===a.length){if(a[2]-a[0]!=0&&a[3]-a[1]!=0)return a;(0,i.warn)("Empty /".concat(e," entry."))}return null}},{key:"mediaBox",get:function(){return(0,i.shadow)(this,"mediaBox",this._getBoundingBox("MediaBox")||j)}},{key:"cropBox",get:function(){return(0,i.shadow)(this,"cropBox",this._getBoundingBox("CropBox")||this.mediaBox)}},{key:"userUnit",get:function(){var e=this.pageDict.get("UserUnit");return(!(0,i.isNum)(e)||e<=0)&&(e=1),(0,i.shadow)(this,"userUnit",e)}},{key:"view",get:function(){var e,t=this.cropBox,r=this.mediaBox;if(t===r||(0,i.isArrayEqual)(t,r))e=r;else{var n=i.Util.intersect(t,r);n&&n[2]-n[0]!=0&&n[3]-n[1]!=0?e=n:(0,i.warn)("Empty /CropBox and /MediaBox intersection.")}return(0,i.shadow)(this,"view",e||r)}},{key:"rotate",get:function(){var e=this._getInheritableProperty("Rotate")||0;return e%90!=0?e=0:e>=360?e%=360:e<0&&(e=(e%360+360)%360),(0,i.shadow)(this,"rotate",e)}},{key:"getContentStream",value:function(){return this.pdfManager.ensure(this,"content").then(function(e){return e instanceof l.BaseStream?e:Array.isArray(e)?new v.StreamsSequenceStream(e):new c.NullStream})}},{key:"xfaData",get:function(){return this.xfaFactory?(0,i.shadow)(this,"xfaData",this.xfaFactory.getPage(this.pageIndex)):(0,i.shadow)(this,"xfaData",null)}},{key:"save",value:function(e,t,r){var n=new m.PartialEvaluator({xref:this.xref,handler:e,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,globalImageCache:this.globalImageCache,options:this.evaluatorOptions});return this._parsedAnnotations.then(function(e){var a,o=[],s=A(e);try{for(s.s();!(a=s.n()).done;){var c=a.value;c.mustBePrinted(r)&&o.push(c.save(n,t,r).catch(function(e){return(0,i.warn)("save - ignoring annotation data during "+'"'.concat(t.name,'" task: "').concat(e,'".')),null}))}}catch(e){s.e(e)}finally{s.f()}return Promise.all(o)})}},{key:"loadResources",value:function(e){var t=this;return this.resourcesPromise||(this.resourcesPromise=this.pdfManager.ensure(this,"resources")),this.resourcesPromise.then(function(){return new p.ObjectLoader(t.resources,e,t.xref).load()})}},{key:"getOperatorList",value:function(e){var t=this,r=e.handler,n=e.sink,a=e.task,o=e.intent,s=e.renderInteractiveForms,c=e.annotationStorage,u=this.getContentStream(),l=this.loadResources(["ColorSpace","ExtGState","Font","Pattern","Properties","Shading","XObject"]),f=new m.PartialEvaluator({xref:this.xref,handler:r,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,globalImageCache:this.globalImageCache,options:this.evaluatorOptions}),h=Promise.all([u,l]).then(function(e){var i=x(e,1)[0],s=new g.OperatorList(o,n);return r.send("StartRenderPage",{transparency:f.hasBlendModes(t.resources,t.nonBlendModesSet),pageIndex:t.pageIndex,intent:o}),f.getOperatorList({stream:i,task:a,resources:t.resources,operatorList:s}).then(function(){return s})});return Promise.all([h,this._parsedAnnotations]).then(function(e){var t=x(e,2),r=t[0],n=t[1];if(0===n.length)return r.flush(!0),{length:r.totalLength};var u,l=[],h=A(n);try{for(h.s();!(u=h.n()).done;){var d=u.value;("display"===o&&d.mustBeViewed(c)||"print"===o&&d.mustBePrinted(c))&&l.push(d.getOperatorList(f,a,s,c).catch(function(e){return(0,i.warn)("getOperatorList - ignoring annotation data during "+'"'.concat(a.name,'" task: "').concat(e,'".')),null}))}}catch(e){h.e(e)}finally{h.f()}return Promise.all(l).then(function(e){r.addOp(i.OPS.beginAnnotations,[]);var t,n=A(e);try{for(n.s();!(t=n.n()).done;){var a=t.value;r.addOpList(a)}}catch(e){n.e(e)}finally{n.f()}return r.addOp(i.OPS.endAnnotations,[]),r.flush(!0),{length:r.totalLength}})})}},{key:"extractTextContent",value:function(e){var t=this,r=e.handler,n=e.task,a=e.normalizeWhitespace,i=e.includeMarkedContent,o=e.sink,s=e.combineTextItems,c=this.getContentStream(),u=this.loadResources(["ExtGState","Font","Properties","XObject"]);return Promise.all([c,u]).then(function(e){var c=x(e,1)[0];return new m.PartialEvaluator({xref:t.xref,handler:r,pageIndex:t.pageIndex,idFactory:t._localIdFactory,fontCache:t.fontCache,builtInCMapCache:t.builtInCMapCache,globalImageCache:t.globalImageCache,options:t.evaluatorOptions}).getTextContent({stream:c,task:n,resources:t.resources,normalizeWhitespace:a,includeMarkedContent:i,combineTextItems:s,sink:o})})}},{key:"getStructTree",value:function(){var e=S(a.default.mark(function e(){var t,r;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.pdfManager.ensureCatalog("structTreeRoot");case 2:if(t=e.sent){e.next=5;break}return e.abrupt("return",null);case 5:return e.next=7,this.pdfManager.ensure(this,"_parseStructTree",[t]);case 7:return r=e.sent,e.abrupt("return",r.serializable);case 9:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"_parseStructTree",value:function(e){var t=new y.StructTreePage(e,this.pageDict);return t.parse(),t}},{key:"getAnnotationsData",value:function(e){return this._parsedAnnotations.then(function(t){for(var r=[],n=0,a=t.length;n<a;n++)(!e||"display"===e&&t[n].viewable||"print"===e&&t[n].printable)&&r.push(t[n].data);return r})}},{key:"annotations",get:function(){var e=this._getInheritableProperty("Annots");return(0,i.shadow)(this,"annotations",Array.isArray(e)?e:[])}},{key:"_parsedAnnotations",get:function(){var e=this,t=this.pdfManager.ensure(this,"annotations").then(function(){var t,r=[],n=A(e.annotations);try{for(n.s();!(t=n.n()).done;){var a=t.value;r.push(u.AnnotationFactory.create(e.xref,a,e.pdfManager,e._localIdFactory,!1).catch(function(e){return(0,i.warn)('_parsedAnnotations: "'.concat(e,'".')),null}))}}catch(e){n.e(e)}finally{n.f()}return Promise.all(r).then(function(e){return e.filter(function(e){return!!e})})});return(0,i.shadow)(this,"_parsedAnnotations",t)}},{key:"jsActions",get:function(){var e=(0,s.collectActions)(this.xref,this.pageDict,i.PageActionEventType);return(0,i.shadow)(this,"jsActions",e)}}]),e}();t.Page=R;var M=new Uint8Array([37,80,68,70,45]),N=new Uint8Array([115,116,97,114,116,120,114,101,102]),B=new Uint8Array([101,110,100,111,98,106]),D=/^[1-9]\.[0-9]$/;function L(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1024,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=t.length,i=e.peekBytes(r),o=i.length-a;if(o<=0)return!1;if(n)for(var s=a-1,c=i.length-1;c>=s;){for(var u=0;u<a&&i[c-u]===t[s-u];)u++;if(u>=a)return e.pos+=c-s,!0;c--}else for(var l=0;l<=o;){for(var f=0;f<a&&i[l+f]===t[f];)f++;if(f>=a)return e.pos+=l,!0;l++}return!1}var U=function(){function e(t,r){var n;if(P(this,e),(0,o.isStream)(r))n=r;else{if(!(0,i.isArrayBuffer)(r))throw new Error("PDFDocument: Unknown argument type");n=new c.Stream(r)}if(n.length<=0)throw new i.InvalidPDFException("The PDF file is empty, i.e. its size is zero bytes.");this.pdfManager=t,this.stream=n,this.xref=new w.XRef(n,t),this._pagePromises=[],this._version=null;var a={font:0};this._globalIdFactory=function(){function e(){P(this,e)}return E(e,null,[{key:"getDocId",value:function(){return"g_".concat(t.docId)}},{key:"createFontId",value:function(){return"f".concat(++a.font)}},{key:"createObjId",value:function(){(0,i.unreachable)("Abstract method `createObjId` called.")}},{key:"getPageObjId",value:function(){(0,i.unreachable)("Abstract method `getPageObjId` called.")}}]),e}()}return E(e,[{key:"parse",value:function(e){this.xref.parse(e),this.catalog=new h.Catalog(this.pdfManager,this.xref),this.catalog.version&&(this._version=this.catalog.version)}},{key:"linearization",get:function(){var e=null;try{e=d.Linearization.create(this.stream)}catch(e){if(e instanceof s.MissingDataException)throw e;(0,i.info)(e)}return(0,i.shadow)(this,"linearization",e)}},{key:"startXRef",get:function(){var e=this.stream,t=0;if(this.linearization)e.reset(),L(e,B)&&(t=e.pos+6-e.start);else{for(var r=N.length,n=!1,a=e.end;!n&&a>0;)(a-=1024-r)<0&&(a=0),e.pos=a,n=L(e,N,1024,!0);if(n){var o;e.skip(9);do{o=e.getByte()}while((0,s.isWhiteSpace)(o));for(var c="";o>=32&&o<=57;)c+=String.fromCharCode(o),o=e.getByte();t=parseInt(c,10),isNaN(t)&&(t=0)}}return(0,i.shadow)(this,"startXRef",t)}},{key:"checkHeader",value:function(){var e=this.stream;if(e.reset(),L(e,M)){e.moveStart();for(var t,r="";(t=e.getByte())>32&&!(r.length>=12);)r+=String.fromCharCode(t);this._version||(this._version=r.substring(5))}}},{key:"parseStartXRef",value:function(){this.xref.setStartXRef(this.startXRef)}},{key:"numPages",get:function(){if(this.xfaFactory)return(0,i.shadow)(this,"numPages",this.xfaFactory.numberPages);var e=this.linearization,t=e?e.numPages:this.catalog.numPages;return(0,i.shadow)(this,"numPages",t)}},{key:"_hasOnlyDocumentSignatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!Array.isArray(e)&&e.every(function(e){if(!((e=t.xref.fetchIfRef(e))instanceof o.Dict))return!1;if(e.has("Kids"))return++r>10?((0,i.warn)("_hasOnlyDocumentSignatures: maximum recursion depth reached"),!1):t._hasOnlyDocumentSignatures(e.get("Kids"),r);var n=(0,o.isName)(e.get("FT"),"Sig"),a=e.get("Rect"),s=Array.isArray(a)&&a.every(function(e){return 0===e});return n&&s})}},{key:"xfaData",get:function(){var e=this.catalog.acroForm;if(!e)return null;var t=e.get("XFA"),r={"xdp:xdp":"",template:"",datasets:"",config:"",connectionSet:"",localeSet:"",stylesheet:"","/xdp:xdp":""};if((0,o.isStream)(t)&&!t.isEmpty)try{return r["xdp:xdp"]=(0,i.stringToUTF8String)(t.getString()),r}catch(e){return(0,i.warn)("XFA - Invalid utf-8 string."),null}if(!Array.isArray(t)||0===t.length)return null;for(var n=0,a=t.length;n<a;n+=2){var s=void 0;if(s=0===n?"xdp:xdp":n===a-2?"/xdp:xdp":t[n],r.hasOwnProperty(s)){var c=this.xref.fetchIfRef(t[n+1]);if((0,o.isStream)(c)&&!c.isEmpty)try{r[s]=(0,i.stringToUTF8String)(c.getString())}catch(e){return(0,i.warn)("XFA - Invalid utf-8 string."),null}}}return r}},{key:"xfaFactory",get:function(){if(this.pdfManager.enableXfa&&this.formInfo.hasXfa&&!this.formInfo.hasAcroForm){var e=this.xfaData;return(0,i.shadow)(this,"xfaFactory",e?new b.XFAFactory(e):null)}return(0,i.shadow)(this,"xfaFaxtory",null)}},{key:"isPureXfa",get:function(){return null!==this.xfaFactory}},{key:"loadXfaFonts",value:function(){var e=S(a.default.mark(function e(t,r){var n,c,u,l,f,h,d,v,y,b,w,k,S,O,C,T,F,_,P;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.pdfManager.ensureCatalog("acroForm");case 2:if(n=e.sent){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,n.getAsync("DR");case 7:if((c=e.sent)instanceof o.Dict){e.next=10;break}return e.abrupt("return");case 10:return u=new p.ObjectLoader(c,["Font"],this.xref),e.next=13,u.load();case 13:if((l=c.get("Font"))instanceof o.Dict){e.next=16;break}return e.abrupt("return");case 16:f=new m.PartialEvaluator({xref:this.xref,handler:t,pageIndex:-1,idFactory:this._globalIdFactory,fontCache:this.catalog.fontCache,builtInCMapCache:this.catalog.builtInCMapCache}),h=new g.OperatorList,d={font:null,clone:function(){return this}},v=new Map,l.forEach(function(e,t){v.set(e,t)}),y=[],b=A(v),e.prev=23,b.s();case 25:if((w=b.n()).done){e.next=39;break}if(k=x(w.value,2),S=k[0],O=k[1],(C=O.get("FontDescriptor"))instanceof o.Dict){e.next=30;break}return e.abrupt("continue",37);case 30:if(T=C.get("FontFamily"),F=C.get("FontWeight"),_=-C.get("ItalicAngle"),P={fontFamily:T,fontWeight:F,italicAngle:_},(0,s.validateCSSFont)(P)){e.next=36;break}return e.abrupt("continue",37);case 36:y.push(f.handleSetFont(c,[o.Name.get(S),1],null,h,r,d,null,P).catch(function(e){return(0,i.warn)('loadXfaFonts: "'.concat(e,'".')),null}));case 37:e.next=25;break;case 39:e.next=44;break;case 41:e.prev=41,e.t0=e.catch(23),b.e(e.t0);case 44:return e.prev=44,b.f(),e.finish(44);case 47:return e.next=49,Promise.all(y);case 49:case"end":return e.stop()}},e,this,[[23,41,44,47]])}));return function(t,r){return e.apply(this,arguments)}}()},{key:"formInfo",get:function(){var e={hasFields:!1,hasAcroForm:!1,hasXfa:!1,hasSignatures:!1},t=this.catalog.acroForm;if(!t)return(0,i.shadow)(this,"formInfo",e);try{var r=t.get("Fields"),n=Array.isArray(r)&&r.length>0;e.hasFields=n;var a=t.get("XFA");e.hasXfa=Array.isArray(a)&&a.length>0||(0,o.isStream)(a)&&!a.isEmpty;var c=!!(1&t.get("SigFlags")),u=c&&this._hasOnlyDocumentSignatures(r);e.hasAcroForm=n&&!u,e.hasSignatures=c}catch(e){if(e instanceof s.MissingDataException)throw e;(0,i.warn)('Cannot fetch form information: "'.concat(e,'".'))}return(0,i.shadow)(this,"formInfo",e)}},{key:"documentInfo",get:function(){var e={Title:i.isString,Author:i.isString,Subject:i.isString,Keywords:i.isString,Creator:i.isString,Producer:i.isString,CreationDate:i.isString,ModDate:i.isString,Trapped:o.isName},t=this._version;"string"==typeof t&&D.test(t)||((0,i.warn)("Invalid PDF header version number: ".concat(t)),t=null);var r,n={PDFFormatVersion:t,IsLinearized:!!this.linearization,IsAcroFormPresent:this.formInfo.hasAcroForm,IsXFAPresent:this.formInfo.hasXfa,IsCollectionPresent:!!this.catalog.collection,IsSignaturesPresent:this.formInfo.hasSignatures};try{r=this.xref.trailer.get("Info")}catch(e){if(e instanceof s.MissingDataException)throw e;(0,i.info)("The document information dictionary is invalid.")}if((0,o.isDict)(r)){var a,c=A(r.getKeys());try{for(c.s();!(a=c.n()).done;){var u=a.value,l=r.get(u);if(e[u])e[u](l)?n[u]="string"!=typeof l?l:(0,i.stringToPDFString)(l):(0,i.info)('Bad value in document info for "'.concat(u,'".'));else if("string"==typeof u){var f=void 0;if((0,i.isString)(l))f=(0,i.stringToPDFString)(l);else{if(!((0,o.isName)(l)||(0,i.isNum)(l)||(0,i.isBool)(l))){(0,i.info)('Unsupported value in document info for (custom) "'.concat(u,'".'));continue}f=l}n.Custom||(n.Custom=Object.create(null)),n.Custom[u]=f}}}catch(e){c.e(e)}finally{c.f()}}return(0,i.shadow)(this,"documentInfo",n)}},{key:"fingerprint",get:function(){for(var e,t=this.xref.trailer.get("ID"),r=[],n=0,a=(e=Array.isArray(t)&&t[0]&&(0,i.isString)(t[0])&&"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"!==t[0]?(0,i.stringToBytes)(t[0]):(0,f.calculateMD5)(this.stream.getByteRange(0,1024),0,1024)).length;n<a;n++){var o=e[n].toString(16);r.push(o.padStart(2,"0"))}return(0,i.shadow)(this,"fingerprint",r.join(""))}},{key:"_getLinearizationPage",value:function(e){var t=this.catalog,r=this.linearization,n=o.Ref.get(r.objectNumberFirst,0);return this.xref.fetchAsync(n).then(function(e){if((0,o.isDict)(e,"Page")||(0,o.isDict)(e)&&!e.has("Type")&&e.has("Contents"))return n&&!t.pageKidsCountCache.has(n)&&t.pageKidsCountCache.put(n,1),[e,n];throw new i.FormatError("The Linearization dictionary doesn't point to a valid Page dictionary.")}).catch(function(r){return(0,i.info)(r),t.getPageDict(e)})}},{key:"getPage",value:function(e){var t=this;if(void 0!==this._pagePromises[e])return this._pagePromises[e];var r=this.catalog,n=this.linearization;if(this.xfaFactory)return Promise.resolve(new R({pdfManager:this.pdfManager,xref:this.xref,pageIndex:e,pageDict:o.Dict.empty,ref:null,globalIdFactory:this._globalIdFactory,fontCache:r.fontCache,builtInCMapCache:r.builtInCMapCache,globalImageCache:r.globalImageCache,nonBlendModesSet:r.nonBlendModesSet,xfaFactory:this.xfaFactory}));var a=n&&n.pageFirst===e?this._getLinearizationPage(e):r.getPageDict(e);return this._pagePromises[e]=a.then(function(n){var a=x(n,2),i=a[0],o=a[1];return new R({pdfManager:t.pdfManager,xref:t.xref,pageIndex:e,pageDict:i,ref:o,globalIdFactory:t._globalIdFactory,fontCache:r.fontCache,builtInCMapCache:r.builtInCMapCache,globalImageCache:r.globalImageCache,nonBlendModesSet:r.nonBlendModesSet,xfaFactory:null})})}},{key:"checkFirstPage",value:function(){var e=this;return this.getPage(0).catch(function(){var t=S(a.default.mark(function t(r){return a.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r instanceof s.XRefEntryException)){t.next=5;break}return e._pagePromises.length=0,t.next=4,e.cleanup();case 4:throw new s.XRefParseException;case 5:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}())}},{key:"fontFallback",value:function(e,t){return this.catalog.fontFallback(e,t)}},{key:"cleanup",value:function(){var e=S(a.default.mark(function e(){var t,r=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]&&r[0],e.abrupt("return",this.catalog?this.catalog.cleanup(t):(0,o.clearPrimitiveCaches)());case 2:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"_collectFieldObjects",value:function(e,t,r){var n=this.xref.fetchIfRef(t);if(n.has("T")){var a=(0,i.stringToPDFString)(n.get("T"));e=""===e?a:"".concat(e,".").concat(a)}if(r.has(e)||r.set(e,[]),r.get(e).push(u.AnnotationFactory.create(this.xref,t,this.pdfManager,this._localIdFactory,!0).then(function(e){return e&&e.getFieldObject()}).catch(function(e){return(0,i.warn)('_collectFieldObjects: "'.concat(e,'".')),null})),n.has("Kids")){var o,s=A(n.get("Kids"));try{for(s.s();!(o=s.n()).done;){var c=o.value;this._collectFieldObjects(e,c,r)}}catch(e){s.e(e)}finally{s.f()}}}},{key:"fieldObjects",get:function(){if(!this.formInfo.hasFields)return(0,i.shadow)(this,"fieldObjects",Promise.resolve(null));var e,t=Object.create(null),r=new Map,n=A(this.catalog.acroForm.get("Fields"));try{for(n.s();!(e=n.n()).done;){var a=e.value;this._collectFieldObjects("",a,r)}}catch(e){n.e(e)}finally{n.f()}var o,s=[],c=A(r);try{var u=function(){var e=x(o.value,2),r=e[0],n=e[1];s.push(Promise.all(n).then(function(e){(e=e.filter(function(e){return!!e})).length>0&&(t[r]=e)}))};for(c.s();!(o=c.n()).done;)u()}catch(e){c.e(e)}finally{c.f()}return(0,i.shadow)(this,"fieldObjects",Promise.all(s).then(function(){return t}))}},{key:"hasJSActions",get:function(){var e=this.pdfManager.ensureDoc("_parseHasJSActions");return(0,i.shadow)(this,"hasJSActions",e)}},{key:"_parseHasJSActions",value:function(){var e=S(a.default.mark(function e(){var t,r,n,i;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([this.pdfManager.ensureCatalog("jsActions"),this.pdfManager.ensureDoc("fieldObjects")]);case 2:if(t=e.sent,r=x(t,2),n=r[0],i=r[1],!n){e.next=8;break}return e.abrupt("return",!0);case 8:if(!i){e.next=10;break}return e.abrupt("return",Object.values(i).some(function(e){return e.some(function(e){return null!==e.actions})}));case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"calculationOrderIds",get:function(){var e=this.catalog.acroForm;if(!e||!e.has("CO"))return(0,i.shadow)(this,"calculationOrderIds",null);var t=e.get("CO");if(!Array.isArray(t)||0===t.length)return(0,i.shadow)(this,"calculationOrderIds",null);var r=t.filter(o.isRef).map(function(e){return e.toString()});return 0===r.length?(0,i.shadow)(this,"calculationOrderIds",null):(0,i.shadow)(this,"calculationOrderIds",r)}}]),e}();t.PDFDocument=U},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getQuadPoints=j,t.MarkupAnnotation=t.AnnotationFactory=t.AnnotationBorderStyle=t.Annotation=void 0;var a=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),i=r(4),o=r(117),s=r(121),c=r(113),u=r(165),l=r(122),f=r(167),h=r(171),d=r(163),p=r(118),g=r(172);function m(e,t,r){return(m="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=k(e)););return e}(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(r):a.value}})(e,t,r||e)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,n=k(e);if(t){var a=k(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return w(this,r)}}function w(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function S(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=C(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function x(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function A(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(e){x(i,n,a,o,s,"next",e)}function s(e){x(i,n,a,o,s,"throw",e)}o(void 0)})}}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||C(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){if(e){if("string"==typeof e)return T(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function P(e,t,r){return t&&_(e.prototype,t),r&&_(e,r),e}var I=function(){function e(){F(this,e)}return P(e,null,[{key:"create",value:function(e,t,r,n,a){var i=this;return Promise.all([r.ensureCatalog("acroForm"),a?this._getPageIndex(e,t,r):-1]).then(function(o){var s=O(o,2),c=s[0],u=s[1];return r.ensure(i,"_create",[e,t,r,n,c,a,u])})}},{key:"_create",value:function(e,t,r,n,a,s){var u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:-1,l=e.fetchIfRef(t);if((0,c.isDict)(l)){var f=(0,c.isRef)(t)?t.toString():"annot_".concat(n.createObjId()),h=l.get("Subtype"),d={xref:e,ref:t,dict:l,subtype:h=(0,c.isName)(h)?h.name:null,id:f,pdfManager:r,acroForm:a instanceof c.Dict?a:c.Dict.empty,collectFields:s,pageIndex:u};switch(h){case"Link":return new $(d);case"Text":return new H(d);case"Widget":var p=(0,o.getInheritableProperty)({dict:l,key:"FT"});switch(p=(0,c.isName)(p)?p.name:null){case"Tx":return new L(d);case"Btn":return new U(d);case"Ch":return new q(d);case"Sig":return new X(d)}return(0,i.warn)('Unimplemented widget field type "'.concat(p,'", ')+"falling back to base field type."),new D(d);case"Popup":return new z(d);case"FreeText":return new G(d);case"Line":return new W(d);case"Square":return new V(d);case"Circle":return new K(d);case"PolyLine":return new Y(d);case"Polygon":return new J(d);case"Caret":return new Z(d);case"Ink":return new Q(d);case"Highlight":return new ee(d);case"Underline":return new te(d);case"Squiggly":return new re(d);case"StrikeOut":return new ne(d);case"Stamp":return new ae(d);case"FileAttachment":return new ie(d);default:return s||(h?(0,i.warn)('Unimplemented annotation type "'.concat(h,'", ')+"falling back to base annotation."):(0,i.warn)("Annotation is missing the required /Subtype.")),new M(d)}}}},{key:"_getPageIndex",value:function(){var e=A(a.default.mark(function e(t,r,n){var o,s,u;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.fetchIfRefAsync(r);case 3:if(o=e.sent,(0,c.isDict)(o)){e.next=6;break}return e.abrupt("return",-1);case 6:if(s=o.getRaw("P"),(0,c.isRef)(s)){e.next=9;break}return e.abrupt("return",-1);case 9:return e.next=11,n.ensureCatalog("getPageIndex",[s]);case 11:return u=e.sent,e.abrupt("return",u);case 15:return e.prev=15,e.t0=e.catch(0),(0,i.warn)('_getPageIndex: "'.concat(e.t0,'".')),e.abrupt("return",-1);case 19:case"end":return e.stop()}},e,null,[[0,15]])}));return function(t,r,n){return e.apply(this,arguments)}}()}]),e}();function E(e){var t=new Uint8ClampedArray(3);if(!Array.isArray(e))return t;switch(e.length){case 0:return null;case 1:return l.ColorSpace.singletons.gray.getRgbItem(e,0,t,0),t;case 3:return l.ColorSpace.singletons.rgb.getRgbItem(e,0,t,0),t;case 4:return l.ColorSpace.singletons.cmyk.getRgbItem(e,0,t,0),t;default:return t}}function j(e,t){if(!e.has("QuadPoints"))return null;var r=e.getArray("QuadPoints");if(!Array.isArray(r)||0===r.length||r.length%8>0)return null;for(var n=[],a=0,i=r.length/8;a<i;a++){n.push([]);for(var o=8*a,s=8*a+8;o<s;o+=2){var c=r[o],u=r[o+1];if(null!==t&&(c<t[0]||c>t[2]||u<t[1]||u>t[3]))return null;n[a].push({x:c,y:u})}}return n.map(function(e){var t=e.reduce(function(e,t){var r=O(e,4),n=r[0],a=r[1],i=r[2],o=r[3];return[Math.min(n,t.x),Math.max(a,t.x),Math.min(i,t.y),Math.max(o,t.y)]},[Number.MAX_VALUE,Number.MIN_VALUE,Number.MAX_VALUE,Number.MIN_VALUE]),r=O(t,4),n=r[0],a=r[1],i=r[2],o=r[3];return[{x:n,y:o},{x:a,y:o},{x:n,y:i},{x:a,y:i}]})}function R(e,t,r){var n=O(i.Util.getAxialAlignedBoundingBox(t,r),4),a=n[0],o=n[1],s=n[2],c=n[3];if(a===s||o===c)return[1,0,0,1,e[0],e[1]];var u=(e[2]-e[0])/(s-a),l=(e[3]-e[1])/(c-o);return[u,0,0,l,e[0]-a*u,e[1]-o*l]}t.AnnotationFactory=I;var M=function(){function e(t){F(this,e);var r=t.dict;if(this.setContents(r.get("Contents")),this.setModificationDate(r.get("M")),this.setFlags(r.get("F")),this.setRectangle(r.getArray("Rect")),this.setColor(r.getArray("C")),this.setBorderStyle(r),this.setAppearance(r),this._streams=[],this.appearance&&this._streams.push(this.appearance),this.data={annotationFlags:this.flags,borderStyle:this.borderStyle,color:this.color,contents:this.contents,hasAppearance:!!this.appearance,id:t.id,modificationDate:this.modificationDate,rect:this.rectangle,subtype:t.subtype},t.collectFields){var n=r.get("Kids");if(Array.isArray(n)){var a,s=[],u=S(n);try{for(u.s();!(a=u.n()).done;){var l=a.value;(0,c.isRef)(l)&&s.push(l.toString())}}catch(e){u.e(e)}finally{u.f()}0!==s.length&&(this.data.kidIds=s)}this.data.actions=(0,o.collectActions)(t.xref,r,i.AnnotationActionEventType),this.data.fieldName=this._constructFieldName(r),this.data.pageIndex=t.pageIndex}this._fallbackFontDict=null}return P(e,[{key:"_hasFlag",value:function(e,t){return!!(e&t)}},{key:"_isViewable",value:function(e){return!this._hasFlag(e,i.AnnotationFlag.INVISIBLE)&&!this._hasFlag(e,i.AnnotationFlag.NOVIEW)}},{key:"_isPrintable",value:function(e){return this._hasFlag(e,i.AnnotationFlag.PRINT)&&!this._hasFlag(e,i.AnnotationFlag.INVISIBLE)}},{key:"mustBeViewed",value:function(e){var t=e&&e.get(this.data.id);return t&&void 0!==t.hidden?!t.hidden:this.viewable&&!this._hasFlag(this.flags,i.AnnotationFlag.HIDDEN)}},{key:"mustBePrinted",value:function(e){var t=e&&e.get(this.data.id);return t&&void 0!==t.print?t.print:this.printable}},{key:"viewable",get:function(){return null!==this.data.quadPoints&&(0===this.flags||this._isViewable(this.flags))}},{key:"printable",get:function(){return null!==this.data.quadPoints&&(0!==this.flags&&this._isPrintable(this.flags))}},{key:"setContents",value:function(e){this.contents=(0,i.stringToPDFString)(e||"")}},{key:"setModificationDate",value:function(e){this.modificationDate=(0,i.isString)(e)?e:null}},{key:"setFlags",value:function(e){this.flags=Number.isInteger(e)&&e>0?e:0}},{key:"hasFlag",value:function(e){return this._hasFlag(this.flags,e)}},{key:"setRectangle",value:function(e){Array.isArray(e)&&4===e.length?this.rectangle=i.Util.normalizeRect(e):this.rectangle=[0,0,0,0]}},{key:"setColor",value:function(e){this.color=E(e)}},{key:"setBorderStyle",value:function(e){if(this.borderStyle=new N,(0,c.isDict)(e))if(e.has("BS")){var t=e.get("BS"),r=t.get("Type");r&&!(0,c.isName)(r,"Border")||(this.borderStyle.setWidth(t.get("W"),this.rectangle),this.borderStyle.setStyle(t.get("S")),this.borderStyle.setDashArray(t.getArray("D")))}else if(e.has("Border")){var n=e.getArray("Border");Array.isArray(n)&&n.length>=3&&(this.borderStyle.setHorizontalCornerRadius(n[0]),this.borderStyle.setVerticalCornerRadius(n[1]),this.borderStyle.setWidth(n[2],this.rectangle),4===n.length&&this.borderStyle.setDashArray(n[3]))}else this.borderStyle.setWidth(0)}},{key:"setAppearance",value:function(e){this.appearance=null;var t=e.get("AP");if((0,c.isDict)(t)){var r=t.get("N");if((0,c.isStream)(r))this.appearance=r;else if((0,c.isDict)(r)){var n=e.get("AS");(0,c.isName)(n)&&r.has(n.name)&&(this.appearance=r.get(n.name))}}}},{key:"loadResources",value:function(e){return this.appearance.dict.getAsync("Resources").then(function(t){if(t)return new h.ObjectLoader(t,e,t.xref).load().then(function(){return t})})}},{key:"getOperatorList",value:function(e,t,r,n){var a=this;if(!this.appearance)return Promise.resolve(new d.OperatorList);var o=this.appearance,s=this.data,c=o.dict,u=this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"]),l=c.getArray("BBox")||[0,0,1,1],f=c.getArray("Matrix")||[1,0,0,1,0,0],h=R(s.rect,l,f);return u.then(function(r){var n=new d.OperatorList;return n.addOp(i.OPS.beginAnnotation,[s.rect,h,f]),e.getOperatorList({stream:o,task:t,resources:r,operatorList:n,fallbackFontDict:a._fallbackFontDict}).then(function(){return n.addOp(i.OPS.endAnnotation,[]),a.reset(),n})})}},{key:"save",value:function(){var e=A(a.default.mark(function e(t,r,n){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null);case 1:case"end":return e.stop()}},e)}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"getFieldObject",value:function(){return this.data.kidIds?{id:this.data.id,actions:this.data.actions,name:this.data.fieldName,type:"",kidIds:this.data.kidIds,page:this.data.pageIndex}:null}},{key:"reset",value:function(){var e,t=S(this._streams);try{for(t.s();!(e=t.n()).done;){e.value.reset()}}catch(e){t.e(e)}finally{t.f()}}},{key:"_constructFieldName",value:function(e){if(!e.has("T")&&!e.has("Parent"))return(0,i.warn)("Unknown field name, falling back to empty field name."),"";if(!e.has("Parent"))return(0,i.stringToPDFString)(e.get("T"));var t=[];e.has("T")&&t.unshift((0,i.stringToPDFString)(e.get("T")));var r=e,n=new c.RefSet;for(e.objId&&n.put(e.objId);r.has("Parent")&&(r=r.get("Parent"))instanceof c.Dict&&(!r.objId||!n.has(r.objId));)r.objId&&n.put(r.objId),r.has("T")&&t.unshift((0,i.stringToPDFString)(r.get("T")));return t.join(".")}}]),e}();t.Annotation=M;var N=function(){function e(){F(this,e),this.width=1,this.style=i.AnnotationBorderStyleType.SOLID,this.dashArray=[3],this.horizontalCornerRadius=0,this.verticalCornerRadius=0}return P(e,[{key:"setWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0,0];if((0,c.isName)(e))this.width=0;else if(Number.isInteger(e)){if(e>0){var r=(t[2]-t[0])/2,n=(t[3]-t[1])/2;r>0&&n>0&&(e>r||e>n)&&((0,i.warn)("AnnotationBorderStyle.setWidth - ignoring width: ".concat(e)),e=1)}this.width=e}}},{key:"setStyle",value:function(e){if((0,c.isName)(e))switch(e.name){case"S":this.style=i.AnnotationBorderStyleType.SOLID;break;case"D":this.style=i.AnnotationBorderStyleType.DASHED;break;case"B":this.style=i.AnnotationBorderStyleType.BEVELED;break;case"I":this.style=i.AnnotationBorderStyleType.INSET;break;case"U":this.style=i.AnnotationBorderStyleType.UNDERLINE}}},{key:"setDashArray",value:function(e){if(Array.isArray(e)&&e.length>0){var t,r=!0,n=!0,a=S(e);try{for(a.s();!(t=a.n()).done;){var i=t.value;if(!(+i>=0)){r=!1;break}i>0&&(n=!1)}}catch(e){a.e(e)}finally{a.f()}r&&!n?this.dashArray=e:this.width=0}else e&&(this.width=0)}},{key:"setHorizontalCornerRadius",value:function(e){Number.isInteger(e)&&(this.horizontalCornerRadius=e)}},{key:"setVerticalCornerRadius",value:function(e){Number.isInteger(e)&&(this.verticalCornerRadius=e)}}]),e}();t.AnnotationBorderStyle=N;var B=function(e){v(r,M);var t=b(r);function r(e){var n;F(this,r),n=t.call(this,e);var a=e.dict;if(a.has("IRT")){var o=a.getRaw("IRT");n.data.inReplyTo=(0,c.isRef)(o)?o.toString():null;var s=a.get("RT");n.data.replyType=(0,c.isName)(s)?s.name:i.AnnotationReplyType.REPLY}if(n.data.replyType===i.AnnotationReplyType.GROUP){var u=a.get("IRT");n.data.title=(0,i.stringToPDFString)(u.get("T")||""),n.setContents(u.get("Contents")),n.data.contents=n.contents,u.has("CreationDate")?(n.setCreationDate(u.get("CreationDate")),n.data.creationDate=n.creationDate):n.data.creationDate=null,u.has("M")?(n.setModificationDate(u.get("M")),n.data.modificationDate=n.modificationDate):n.data.modificationDate=null,n.data.hasPopup=u.has("Popup"),u.has("C")?(n.setColor(u.getArray("C")),n.data.color=n.color):n.data.color=null}else n.data.title=(0,i.stringToPDFString)(a.get("T")||""),n.setCreationDate(a.get("CreationDate")),n.data.creationDate=n.creationDate,n.data.hasPopup=a.has("Popup"),a.has("C")||(n.data.color=null);return n}return P(r,[{key:"setCreationDate",value:function(e){this.creationDate=(0,i.isString)(e)?e:null}},{key:"_setDefaultAppearance",value:function(e){var t=e.xref,r=e.extra,n=e.strokeColor,a=e.fillColor,i=e.blendMode,o=e.strokeAlpha,s=e.fillAlpha,u=e.pointsCallback,l=Number.MAX_VALUE,f=Number.MAX_VALUE,h=Number.MIN_VALUE,d=Number.MIN_VALUE,g=["q"];r&&g.push(r),n&&g.push("".concat(n[0]," ").concat(n[1]," ").concat(n[2]," RG")),a&&g.push("".concat(a[0]," ").concat(a[1]," ").concat(a[2]," rg"));var m=this.data.quadPoints;m||(m=[[{x:this.rectangle[0],y:this.rectangle[3]},{x:this.rectangle[2],y:this.rectangle[3]},{x:this.rectangle[0],y:this.rectangle[1]},{x:this.rectangle[2],y:this.rectangle[1]}]]);var v,y=S(m);try{for(y.s();!(v=y.n()).done;){var b=O(u(g,v.value),4),w=b[0],k=b[1],x=b[2],A=b[3];l=Math.min(l,w),h=Math.max(h,k),f=Math.min(f,x),d=Math.max(d,A)}}catch(e){y.e(e)}finally{y.f()}g.push("Q");var C=new c.Dict(t),T=new c.Dict(t);T.set("Subtype",c.Name.get("Form"));var F=new p.StringStream(g.join(" "));F.dict=T,C.set("Fm0",F);var _=new c.Dict(t);i&&_.set("BM",c.Name.get(i)),"number"==typeof o&&_.set("CA",o),"number"==typeof s&&_.set("ca",s);var P=new c.Dict(t);P.set("GS0",_);var I=new c.Dict(t);I.set("ExtGState",P),I.set("XObject",C);var E=new c.Dict(t);E.set("Resources",I);var j=this.data.rect=[l,f,h,d];E.set("BBox",j),this.appearance=new p.StringStream("/GS0 gs /Fm0 Do"),this.appearance.dict=E,this._streams.push(this.appearance,F)}}]),r}();t.MarkupAnnotation=B;var D=function(e){v(r,M);var t=b(r);function r(e){var n;F(this,r),n=t.call(this,e);var a=e.dict,u=n.data;n.ref=e.ref,u.annotationType=i.AnnotationType.WIDGET,void 0===u.fieldName&&(u.fieldName=n._constructFieldName(a)),void 0===u.actions&&(u.actions=(0,o.collectActions)(e.xref,a,i.AnnotationActionEventType));var l=(0,o.getInheritableProperty)({dict:a,key:"V",getArray:!0});u.fieldValue=n._decodeFormValue(l);var f=(0,o.getInheritableProperty)({dict:a,key:"DV",getArray:!0});u.defaultFieldValue=n._decodeFormValue(f),u.alternativeText=(0,i.stringToPDFString)(a.get("TU")||"");var h=(0,o.getInheritableProperty)({dict:a,key:"DA"})||e.acroForm.get("DA");n._defaultAppearance=(0,i.isString)(h)?h:"",u.defaultAppearanceData=(0,s.parseDefaultAppearance)(n._defaultAppearance);var d=(0,o.getInheritableProperty)({dict:a,key:"FT"});u.fieldType=(0,c.isName)(d)?d.name:null;var p=(0,o.getInheritableProperty)({dict:a,key:"DR"}),g=e.acroForm.get("DR"),m=n.appearance&&n.appearance.dict.get("Resources");return n._fieldResources={localResources:p,acroFormResources:g,appearanceResources:m,mergedResources:c.Dict.merge({xref:e.xref,dictArray:[p,m,g],mergeSubDicts:!0})},u.fieldFlags=(0,o.getInheritableProperty)({dict:a,key:"Ff"}),(!Number.isInteger(u.fieldFlags)||u.fieldFlags<0)&&(u.fieldFlags=0),u.readOnly=n.hasFieldFlag(i.AnnotationFieldFlag.READONLY),u.hidden=n._hasFlag(u.annotationFlags,i.AnnotationFlag.HIDDEN),n}return P(r,[{key:"_decodeFormValue",value:function(e){return Array.isArray(e)?e.filter(function(e){return(0,i.isString)(e)}).map(function(e){return(0,i.stringToPDFString)(e)}):(0,c.isName)(e)?(0,i.stringToPDFString)(e.name):(0,i.isString)(e)?(0,i.stringToPDFString)(e):null}},{key:"hasFieldFlag",value:function(e){return!!(this.data.fieldFlags&e)}},{key:"getOperatorList",value:function(e,t,n,a){var o=this;return!n||this instanceof X?this._hasText?this._getAppearance(e,t,a).then(function(s){if(o.appearance&&null===s)return m(k(r.prototype),"getOperatorList",o).call(o,e,t,n,a);var c=new d.OperatorList;if(!o._defaultAppearance||null===s)return c;var u=[1,0,0,1,0,0],l=[0,0,o.data.rect[2]-o.data.rect[0],o.data.rect[3]-o.data.rect[1]],f=R(o.data.rect,l,u);c.addOp(i.OPS.beginAnnotation,[o.data.rect,f,u]);var h=new p.StringStream(s);return e.getOperatorList({stream:h,task:t,resources:o._fieldResources.mergedResources,operatorList:c}).then(function(){return c.addOp(i.OPS.endAnnotation,[]),c})}):m(k(r.prototype),"getOperatorList",this).call(this,e,t,n,a):Promise.resolve(new d.OperatorList)}},{key:"save",value:function(){var e=A(a.default.mark(function e(t,r,n){var o,s,u,l,f,h,d,p,m,v,y,b,w,k,S;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return",null);case 2:if(o=n.get(this.data.id),(s=o&&o.value)!==this.data.fieldValue&&void 0!==s){e.next=6;break}return e.abrupt("return",null);case 6:return e.next=8,this._getAppearance(t,r,n);case 8:if(null!==(u=e.sent)){e.next=11;break}return e.abrupt("return",null);case 11:if(l=t.xref,f=l.fetchIfRef(this.ref),(0,c.isDict)(f)){e.next=15;break}return e.abrupt("return",null);case 15:return h=[0,0,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1]],d={path:(0,i.stringToPDFString)(f.get("T")||""),value:s},p=l.getNewRef(),(m=new c.Dict(l)).set("N",p),v=l.encrypt,y=null,b=null,v&&(y=v.createCipherTransform(this.ref.num,this.ref.gen),b=v.createCipherTransform(p.num,p.gen),u=b.encryptString(u)),f.set("V",(0,i.isAscii)(s)?s:(0,i.stringToUTF16BEString)(s)),f.set("AP",m),f.set("M","D:".concat((0,i.getModificationDate)())),(w=new c.Dict(l)).set("Length",u.length),w.set("Subtype",c.Name.get("Form")),w.set("Resources",this._getSaveFieldResources(l)),w.set("BBox",h),k=["".concat(this.ref.num," ").concat(this.ref.gen," obj\n")],(0,g.writeDict)(f,k,y),k.push("\nendobj\n"),S=["".concat(p.num," ").concat(p.gen," obj\n")],(0,g.writeDict)(w,S,b),S.push(" stream\n",u,"\nendstream\nendobj\n"),e.abrupt("return",[{ref:this.ref,data:k.join(""),xfa:d},{ref:p,data:S.join(""),xfa:null}]);case 39:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"_getAppearance",value:function(){var e=A(a.default.mark(function e(t,r,n){var o,c,u,l,f,h,d,p,g,m,v,y,b,w,k,S,x,A;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=this.hasFieldFlag(i.AnnotationFieldFlag.PASSWORD),n&&!o){e.next=3;break}return e.abrupt("return",null);case 3:if(c=n.get(this.data.id),void 0!==(u=c&&c.value)){e.next=7;break}return e.abrupt("return",null);case 7:if(""!==(u=u.trim())){e.next=10;break}return e.abrupt("return","");case 10:return l=-1,this.data.multiLine&&(l=u.split(/\r\n|\r|\n/).length),h=f=2,d=this.data.rect[3]-this.data.rect[1],p=this.data.rect[2]-this.data.rect[0],this._defaultAppearance||(this.data.defaultAppearanceData=(0,s.parseDefaultAppearance)(this._defaultAppearance="/Helvetica 0 Tf 0 g")),g=this._computeFontSize(d,l),m=O(g,2),v=m[0],y=m[1],e.next=20,this._getFontData(t,r);case 20:if(b=e.sent,w=b.descent,isNaN(w)&&(w=0),k=f+Math.abs(w)*y,S=this.data.textAlignment,!this.data.multiLine){e.next=27;break}return e.abrupt("return",this._getMultilineAppearance(v,u,b,y,p,d,S,h,k));case 27:if(x=b.encodeString(u).join(""),!this.data.comb){e.next=30;break}return e.abrupt("return",this._getCombAppearance(v,b,x,p,h,k));case 30:if(!(0===S||S>2)){e.next=32;break}return e.abrupt("return","/Tx BMC q BT "+v+" 1 0 0 1 ".concat(h," ").concat(k," Tm (").concat((0,i.escapeString)(x),") Tj")+" ET Q EMC");case 32:return A=this._renderText(x,b,y,p,S,h,k),e.abrupt("return","/Tx BMC q BT "+v+" 1 0 0 1 0 0 Tm ".concat(A)+" ET Q EMC");case 34:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"_getFontData",value:function(){var e=A(a.default.mark(function e(t,r){var n,i,o,s,u;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=new d.OperatorList,i={font:null,clone:function(){return this}},o=this.data.defaultAppearanceData,s=o.fontName,u=o.fontSize,e.next=5,t.handleSetFont(this._fieldResources.mergedResources,[s&&c.Name.get(s),u],null,n,r,i,null);case 5:return e.abrupt("return",i.font);case 6:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"_computeFontSize",value:function(e,t){var r=this.data.defaultAppearanceData.fontSize;if(!r){var n=function(e){return Math.round(10*e)/10};if(-1===t)r=n(.8*e);else{var a=(r=10)/.8,i=Math.round(e/a);r=n(.8*(a=e/(i=Math.max(i,t))))}var o=this.data.defaultAppearanceData,c=o.fontName,u=o.fontColor;this._defaultAppearance=(0,s.createDefaultAppearance)({fontSize:r,fontName:c,fontColor:u})}return[this._defaultAppearance,r]}},{key:"_renderText",value:function(e,t,r,n,a,o,s){var c,u,l=r/1e3,f=0,h=S(t.charsToGlyphs(e));try{for(h.s();!(c=h.n()).done;){f+=c.value.width*l}}catch(e){h.e(e)}finally{h.f()}return u=(u=1===a?(n-f)/2:2===a?n-f-o:o).toFixed(2),s=s.toFixed(2),"".concat(u," ").concat(s," Td (").concat((0,i.escapeString)(e),") Tj")}},{key:"_getSaveFieldResources",value:function(e){var t=this._fieldResources,r=t.localResources,n=t.appearanceResources,a=t.acroFormResources,i=this.data.defaultAppearanceData&&this.data.defaultAppearanceData.fontName;if(!i)return r||c.Dict.empty;for(var o=0,s=[r,n];o<s.length;o++){var u=s[o];if(u instanceof c.Dict){var l=u.get("Font");if(l instanceof c.Dict&&l.has(i))return u}}if(a instanceof c.Dict){var f=a.get("Font");if(f instanceof c.Dict&&f.has(i)){var h=new c.Dict(e);h.set(i,f.getRaw(i));var d=new c.Dict(e);return d.set("Font",h),c.Dict.merge({xref:e,dictArray:[d,r],mergeSubDicts:!0})}}return r||c.Dict.empty}},{key:"getFieldObject",value:function(){return null}}]),r}(),L=function(e){v(r,D);var t=b(r);function r(e){var n;F(this,r),(n=t.call(this,e))._hasText=!0;var a=e.dict;(0,i.isString)(n.data.fieldValue)||(n.data.fieldValue="");var s=(0,o.getInheritableProperty)({dict:a,key:"Q"});(!Number.isInteger(s)||s<0||s>2)&&(s=null),n.data.textAlignment=s;var c=(0,o.getInheritableProperty)({dict:a,key:"MaxLen"});return(!Number.isInteger(c)||c<0)&&(c=null),n.data.maxLen=c,n.data.multiLine=n.hasFieldFlag(i.AnnotationFieldFlag.MULTILINE),n.data.comb=n.hasFieldFlag(i.AnnotationFieldFlag.COMB)&&!n.hasFieldFlag(i.AnnotationFieldFlag.MULTILINE)&&!n.hasFieldFlag(i.AnnotationFieldFlag.PASSWORD)&&!n.hasFieldFlag(i.AnnotationFieldFlag.FILESELECT)&&null!==n.data.maxLen,n}return P(r,[{key:"_getCombAppearance",value:function(e,t,r,n,a,o){var s,c=(n/this.data.maxLen).toFixed(2),u=[],l=S(t.getCharPositions(r));try{for(l.s();!(s=l.n()).done;){var f=O(s.value,2),h=f[0],d=f[1];u.push("(".concat((0,i.escapeString)(r.substring(h,d)),") Tj"))}}catch(e){l.e(e)}finally{l.f()}var p=u.join(" ".concat(c," 0 Td "));return"/Tx BMC q BT "+e+" 1 0 0 1 ".concat(a," ").concat(o," Tm ").concat(p)+" ET Q EMC"}},{key:"_getMultilineAppearance",value:function(e,t,r,n,a,i,o,s,c){var u,l=[],f=a-2*s,h=S(t.split(/\r\n|\r|\n/));try{for(h.s();!(u=h.n()).done;){var d,p=u.value,g=S(this._splitLine(p,r,n,f));try{for(g.s();!(d=g.n()).done;){var m=d.value,v=0===l.length?s:0;l.push(this._renderText(m,r,n,a,o,v,-n))}}catch(e){g.e(e)}finally{g.f()}}}catch(e){h.e(e)}finally{h.f()}var y=l.join("\n");return"/Tx BMC q BT "+e+" 1 0 0 1 0 ".concat(i," Tm ").concat(y)+" ET Q EMC"}},{key:"_splitLine",value:function(e,t,r,n){e=t.encodeString(e).join("");var a=t.charsToGlyphs(e);if(a.length<=1)return[e];for(var i=t.getCharPositions(e),o=r/1e3,s=[],c=-1,u=-1,l=-1,f=0,h=0,d=0,p=a.length;d<p;d++){var g=O(i[d],2),m=g[0],v=g[1],y=a[d],b=y.width*o;" "===y.unicode?h+b>n?(s.push(e.substring(f,m)),f=m,h=b,c=-1,l=-1):(h+=b,c=m,u=v,l=d):h+b>n?-1!==c?(s.push(e.substring(f,u)),f=u,d=l+1,c=-1,h=0):(s.push(e.substring(f,m)),f=m,h=b):h+=b}return f<e.length&&s.push(e.substring(f,e.length)),s}},{key:"getFieldObject",value:function(){return{id:this.data.id,value:this.data.fieldValue,defaultValue:this.data.defaultFieldValue,multiline:this.data.multiLine,password:this.hasFieldFlag(i.AnnotationFieldFlag.PASSWORD),charLimit:this.data.maxLen,comb:this.data.comb,editable:!this.data.readOnly,hidden:this.data.hidden,name:this.data.fieldName,rect:this.data.rect,actions:this.data.actions,page:this.data.pageIndex,type:"text"}}}]),r}(),U=function(e){v(r,D);var t=b(r);function r(e){var n;return F(this,r),(n=t.call(this,e)).checkedAppearance=null,n.uncheckedAppearance=null,n.data.checkBox=!n.hasFieldFlag(i.AnnotationFieldFlag.RADIO)&&!n.hasFieldFlag(i.AnnotationFieldFlag.PUSHBUTTON),n.data.radioButton=n.hasFieldFlag(i.AnnotationFieldFlag.RADIO)&&!n.hasFieldFlag(i.AnnotationFieldFlag.PUSHBUTTON),n.data.pushButton=n.hasFieldFlag(i.AnnotationFieldFlag.PUSHBUTTON),n.data.isTooltipOnly=!1,n.data.checkBox?n._processCheckBox(e):n.data.radioButton?n._processRadioButton(e):n.data.pushButton?n._processPushButton(e):(0,i.warn)("Invalid field flags for button widget annotation"),n}return P(r,[{key:"getOperatorList",value:function(e,t,n,a){if(this.data.pushButton)return m(k(r.prototype),"getOperatorList",this).call(this,e,t,!1,a);if(a){var i,o=a.get(this.data.id),s=o&&o.value;if(void 0===s)return m(k(r.prototype),"getOperatorList",this).call(this,e,t,n,a);if(i=s?this.checkedAppearance:this.uncheckedAppearance){var c=this.appearance;this.appearance=i;var u=m(k(r.prototype),"getOperatorList",this).call(this,e,t,n,a);return this.appearance=c,u}return Promise.resolve(new d.OperatorList)}return m(k(r.prototype),"getOperatorList",this).call(this,e,t,n,a)}},{key:"save",value:function(){var e=A(a.default.mark(function e(t,r,n){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.data.checkBox){e.next=2;break}return e.abrupt("return",this._saveCheckbox(t,r,n));case 2:if(!this.data.radioButton){e.next=4;break}return e.abrupt("return",this._saveRadioButton(t,r,n));case 4:return e.abrupt("return",null);case 5:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"_saveCheckbox",value:function(){var e=A(a.default.mark(function e(t,r,n){var o,s,u,l,f,h,d,p;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return",null);case 2:if(o=n.get(this.data.id),void 0!==(s=o&&o.value)){e.next=6;break}return e.abrupt("return",null);case 6:if((this.data.fieldValue&&"Off"!==this.data.fieldValue)!==s){e.next=9;break}return e.abrupt("return",null);case 9:if(u=t.xref.fetchIfRef(this.ref),(0,c.isDict)(u)){e.next=12;break}return e.abrupt("return",null);case 12:return l={path:(0,i.stringToPDFString)(u.get("T")||""),value:s?this.data.exportValue:""},f=c.Name.get(s?this.data.exportValue:"Off"),u.set("V",f),u.set("AS",f),u.set("M","D:".concat((0,i.getModificationDate)())),h=t.xref.encrypt,d=null,h&&(d=h.createCipherTransform(this.ref.num,this.ref.gen)),p=["".concat(this.ref.num," ").concat(this.ref.gen," obj\n")],(0,g.writeDict)(u,p,d),p.push("\nendobj\n"),e.abrupt("return",[{ref:this.ref,data:p.join(""),xfa:l}]);case 24:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"_saveRadioButton",value:function(){var e=A(a.default.mark(function e(t,r,n){var o,s,u,l,f,h,d,p,m,v,y,b;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return",null);case 2:if(o=n.get(this.data.id),void 0!==(s=o&&o.value)){e.next=6;break}return e.abrupt("return",null);case 6:if(this.data.fieldValue===this.data.buttonValue!==s){e.next=9;break}return e.abrupt("return",null);case 9:if(u=t.xref.fetchIfRef(this.ref),(0,c.isDict)(u)){e.next=12;break}return e.abrupt("return",null);case 12:return l={path:(0,i.stringToPDFString)(u.get("T")||""),value:s?this.data.buttonValue:""},f=c.Name.get(s?this.data.buttonValue:"Off"),h=null,d=t.xref.encrypt,s&&((0,c.isRef)(this.parent)?(p=t.xref.fetch(this.parent),m=null,d&&(m=d.createCipherTransform(this.parent.num,this.parent.gen)),p.set("V",f),h=["".concat(this.parent.num," ").concat(this.parent.gen," obj\n")],(0,g.writeDict)(p,h,m),h.push("\nendobj\n")):(0,c.isDict)(this.parent)&&this.parent.set("V",f)),u.set("AS",f),u.set("M","D:".concat((0,i.getModificationDate)())),v=null,d&&(v=d.createCipherTransform(this.ref.num,this.ref.gen)),y=["".concat(this.ref.num," ").concat(this.ref.gen," obj\n")],(0,g.writeDict)(u,y,v),y.push("\nendobj\n"),b=[{ref:this.ref,data:y.join(""),xfa:l}],null!==h&&b.push({ref:this.parent,data:h.join(""),xfa:null}),e.abrupt("return",b);case 27:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"_processCheckBox",value:function(e){var t=e.dict.get("AP");if((0,c.isDict)(t)){var r=t.get("N");if((0,c.isDict)(r)){var n=r.getKeys();n.includes("Off")||n.push("Off"),2===n.length&&(this.data.exportValue="Off"===n[0]?n[1]:n[0],this.checkedAppearance=r.get(this.data.exportValue),this.uncheckedAppearance=r.get("Off")||null,this._streams.push(this.checkedAppearance),this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance),this._fallbackFontDict=this.fallbackFontDict)}}}},{key:"_processRadioButton",value:function(e){this.data.fieldValue=this.data.buttonValue=null;var t=e.dict.get("Parent");if((0,c.isDict)(t)){this.parent=e.dict.getRaw("Parent");var r=t.get("V");(0,c.isName)(r)&&(this.data.fieldValue=this._decodeFormValue(r))}var n=e.dict.get("AP");if((0,c.isDict)(n)){var a=n.get("N");if((0,c.isDict)(a)){var i,o=S(a.getKeys());try{for(o.s();!(i=o.n()).done;){var s=i.value;if("Off"!==s){this.data.buttonValue=this._decodeFormValue(s);break}}}catch(e){o.e(e)}finally{o.f()}this.checkedAppearance=a.get(this.data.buttonValue),this.uncheckedAppearance=a.get("Off")||null,this._streams.push(this.checkedAppearance),this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance),this._fallbackFontDict=this.fallbackFontDict}}}},{key:"_processPushButton",value:function(e){e.dict.has("A")||e.dict.has("AA")||this.data.alternativeText?(this.data.isTooltipOnly=!e.dict.has("A")&&!e.dict.has("AA"),u.Catalog.parseDestDictionary({destDict:e.dict,resultObj:this.data,docBaseUrl:e.pdfManager.docBaseUrl})):(0,i.warn)("Push buttons without action dictionaries are not supported")}},{key:"getFieldObject",value:function(){var e,t="button";return this.data.checkBox?(t="checkbox",e=this.data.exportValue):this.data.radioButton&&(t="radiobutton",e=this.data.buttonValue),{id:this.data.id,value:this.data.fieldValue||"Off",defaultValue:this.data.defaultFieldValue,exportValues:e,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,hidden:this.data.hidden,actions:this.data.actions,page:this.data.pageIndex,type:t}}},{key:"fallbackFontDict",get:function(){var e=new c.Dict;return e.set("BaseFont",c.Name.get("ZapfDingbats")),e.set("Type",c.Name.get("FallbackType")),e.set("Subtype",c.Name.get("FallbackType")),e.set("Encoding",c.Name.get("ZapfDingbatsEncoding")),(0,i.shadow)(this,"fallbackFontDict",e)}}]),r}(),q=function(e){v(r,D);var t=b(r);function r(e){var n;F(this,r),(n=t.call(this,e)).data.options=[];var a=(0,o.getInheritableProperty)({dict:e.dict,key:"Opt"});if(Array.isArray(a))for(var s=e.xref,c=0,u=a.length;c<u;c++){var l=s.fetchIfRef(a[c]),f=Array.isArray(l);n.data.options[c]={exportValue:n._decodeFormValue(f?s.fetchIfRef(l[0]):l),displayValue:n._decodeFormValue(f?s.fetchIfRef(l[1]):l)}}return(0,i.isString)(n.data.fieldValue)?n.data.fieldValue=[n.data.fieldValue]:n.data.fieldValue||(n.data.fieldValue=[]),n.data.combo=n.hasFieldFlag(i.AnnotationFieldFlag.COMBO),n.data.multiSelect=n.hasFieldFlag(i.AnnotationFieldFlag.MULTISELECT),n._hasText=!0,n}return P(r,[{key:"getFieldObject",value:function(){var e=this.data.combo?"combobox":"listbox",t=this.data.fieldValue.length>0?this.data.fieldValue[0]:null;return{id:this.data.id,value:t,defaultValue:this.data.defaultFieldValue,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,numItems:this.data.fieldValue.length,multipleSelection:this.data.multiSelect,hidden:this.data.hidden,actions:this.data.actions,items:this.data.options,page:this.data.pageIndex,type:e}}}]),r}(),X=function(e){v(r,D);var t=b(r);function r(e){var n;return F(this,r),(n=t.call(this,e)).data.fieldValue=null,n}return P(r,[{key:"getFieldObject",value:function(){return{id:this.data.id,value:null,page:this.data.pageIndex,type:"signature"}}}]),r}(),H=function(e){v(r,B);var t=b(r);function r(e){var n;F(this,r);n=t.call(this,e);var a=e.dict;return n.data.annotationType=i.AnnotationType.TEXT,n.data.hasAppearance?n.data.name="NoIcon":(n.data.rect[1]=n.data.rect[3]-22,n.data.rect[2]=n.data.rect[0]+22,n.data.name=a.has("Name")?a.get("Name").name:"Note"),a.has("State")?(n.data.state=a.get("State")||null,n.data.stateModel=a.get("StateModel")||null):(n.data.state=null,n.data.stateModel=null),n}return r}(),$=function(e){v(r,M);var t=b(r);function r(e){var n;F(this,r),(n=t.call(this,e)).data.annotationType=i.AnnotationType.LINK;var a=j(e.dict,n.rectangle);return a&&(n.data.quadPoints=a),u.Catalog.parseDestDictionary({destDict:e.dict,resultObj:n.data,docBaseUrl:e.pdfManager.docBaseUrl}),n}return r}(),z=function(e){v(r,M);var t=b(r);function r(e){var n;F(this,r),(n=t.call(this,e)).data.annotationType=i.AnnotationType.POPUP;var a=e.dict.get("Parent");if(!a)return(0,i.warn)("Popup annotation has a missing or invalid parent annotation."),w(n);var o=a.get("Subtype");n.data.parentType=(0,c.isName)(o)?o.name:null;var s=e.dict.getRaw("Parent");n.data.parentId=(0,c.isRef)(s)?s.toString():null;var u=a.getArray("Rect");Array.isArray(u)&&4===u.length?n.data.parentRect=i.Util.normalizeRect(u):n.data.parentRect=[0,0,0,0];var l=a.get("RT");if((0,c.isName)(l,i.AnnotationReplyType.GROUP)&&(a=a.get("IRT")),a.has("M")?(n.setModificationDate(a.get("M")),n.data.modificationDate=n.modificationDate):n.data.modificationDate=null,a.has("C")?(n.setColor(a.getArray("C")),n.data.color=n.color):n.data.color=null,!n.viewable){var f=a.get("F");n._isViewable(f)&&n.setFlags(f)}return n.data.title=(0,i.stringToPDFString)(a.get("T")||""),n.data.contents=(0,i.stringToPDFString)(a.get("Contents")||""),n}return r}(),G=function(e){v(r,B);var t=b(r);function r(e){var n;return F(this,r),(n=t.call(this,e)).data.annotationType=i.AnnotationType.FREETEXT,n}return r}(),W=function(e){v(r,B);var t=b(r);function r(e){var n;F(this,r),(n=t.call(this,e)).data.annotationType=i.AnnotationType.LINE;var a=e.dict.getArray("L");if(n.data.lineCoordinates=i.Util.normalizeRect(a),!n.appearance){var o=n.color?Array.from(n.color).map(function(e){return e/255}):[0,0,0],s=e.dict.get("CA"),c=null,u=e.dict.getArray("IC");u&&(c=(u=E(u))?Array.from(u).map(function(e){return e/255}):null);var l=c?s:null,f=n.borderStyle.width||1,h=2*f,d=[n.data.lineCoordinates[0]-h,n.data.lineCoordinates[1]-h,n.data.lineCoordinates[2]+h,n.data.lineCoordinates[3]+h];i.Util.intersect(n.rectangle,d)||(n.rectangle=d),n._setDefaultAppearance({xref:e.xref,extra:"".concat(f," w"),strokeColor:o,fillColor:c,strokeAlpha:s,fillAlpha:l,pointsCallback:function(e,t){return e.push("".concat(a[0]," ").concat(a[1]," m"),"".concat(a[2]," ").concat(a[3]," l"),"S"),[t[0].x-f,t[1].x+f,t[3].y-f,t[1].y+f]}})}return n}return r}(),V=function(e){v(r,B);var t=b(r);function r(e){var n;if(F(this,r),(n=t.call(this,e)).data.annotationType=i.AnnotationType.SQUARE,!n.appearance){var a=n.color?Array.from(n.color).map(function(e){return e/255}):[0,0,0],o=e.dict.get("CA"),s=null,c=e.dict.getArray("IC");c&&(c=E(c),s=c?Array.from(c).map(function(e){return e/255}):null);var u=s?o:null;n._setDefaultAppearance({xref:e.xref,extra:"".concat(n.borderStyle.width," w"),strokeColor:a,fillColor:s,strokeAlpha:o,fillAlpha:u,pointsCallback:function(e,t){var r=t[2].x+n.borderStyle.width/2,a=t[2].y+n.borderStyle.width/2,i=t[3].x-t[2].x-n.borderStyle.width,o=t[1].y-t[3].y-n.borderStyle.width;return e.push("".concat(r," ").concat(a," ").concat(i," ").concat(o," re")),s?e.push("B"):e.push("S"),[t[0].x,t[1].x,t[3].y,t[1].y]}})}return n}return r}(),K=function(e){v(r,B);var t=b(r);function r(e){var n;if(F(this,r),(n=t.call(this,e)).data.annotationType=i.AnnotationType.CIRCLE,!n.appearance){var a=n.color?Array.from(n.color).map(function(e){return e/255}):[0,0,0],o=e.dict.get("CA"),s=null,c=e.dict.getArray("IC");c&&(c=E(c),s=c?Array.from(c).map(function(e){return e/255}):null);var u=s?o:null,l=4/3*Math.tan(Math.PI/8);n._setDefaultAppearance({xref:e.xref,extra:"".concat(n.borderStyle.width," w"),strokeColor:a,fillColor:s,strokeAlpha:o,fillAlpha:u,pointsCallback:function(e,t){var r=t[0].x+n.borderStyle.width/2,a=t[0].y-n.borderStyle.width/2,i=t[3].x-n.borderStyle.width/2,o=t[3].y+n.borderStyle.width/2,c=r+(i-r)/2,u=a+(o-a)/2,f=(i-r)/2*l,h=(o-a)/2*l;return e.push("".concat(c," ").concat(o," m"),"".concat(c+f," ").concat(o," ").concat(i," ").concat(u+h," ").concat(i," ").concat(u," c"),"".concat(i," ").concat(u-h," ").concat(c+f," ").concat(a," ").concat(c," ").concat(a," c"),"".concat(c-f," ").concat(a," ").concat(r," ").concat(u-h," ").concat(r," ").concat(u," c"),"".concat(r," ").concat(u+h," ").concat(c-f," ").concat(o," ").concat(c," ").concat(o," c"),"h"),s?e.push("B"):e.push("S"),[t[0].x,t[1].x,t[3].y,t[1].y]}})}return n}return r}(),Y=function(e){v(r,B);var t=b(r);function r(e){var n;F(this,r),(n=t.call(this,e)).data.annotationType=i.AnnotationType.POLYLINE,n.data.vertices=[];var a=e.dict.getArray("Vertices");if(!Array.isArray(a))return w(n);for(var o=0,s=a.length;o<s;o+=2)n.data.vertices.push({x:a[o],y:a[o+1]});if(!n.appearance){var c,u=n.color?Array.from(n.color).map(function(e){return e/255}):[0,0,0],l=e.dict.get("CA"),f=n.borderStyle.width||1,h=2*f,d=[1/0,1/0,-1/0,-1/0],p=S(n.data.vertices);try{for(p.s();!(c=p.n()).done;){var g=c.value;d[0]=Math.min(d[0],g.x-h),d[1]=Math.min(d[1],g.y-h),d[2]=Math.max(d[2],g.x+h),d[3]=Math.max(d[3],g.y+h)}}catch(e){p.e(e)}finally{p.f()}i.Util.intersect(n.rectangle,d)||(n.rectangle=d),n._setDefaultAppearance({xref:e.xref,extra:"".concat(f," w"),strokeColor:u,strokeAlpha:l,pointsCallback:function(e,t){for(var r=n.data.vertices,a=0,i=r.length;a<i;a++)e.push("".concat(r[a].x," ").concat(r[a].y," ").concat(0===a?"m":"l"));return e.push("S"),[t[0].x,t[1].x,t[3].y,t[1].y]}})}return n}return r}(),J=function(e){v(r,Y);var t=b(r);function r(e){var n;return F(this,r),(n=t.call(this,e)).data.annotationType=i.AnnotationType.POLYGON,n}return r}(),Z=function(e){v(r,B);var t=b(r);function r(e){var n;return F(this,r),(n=t.call(this,e)).data.annotationType=i.AnnotationType.CARET,n}return r}(),Q=function(e){v(r,B);var t=b(r);function r(e){var n;F(this,r),(n=t.call(this,e)).data.annotationType=i.AnnotationType.INK,n.data.inkLists=[];var a=e.dict.getArray("InkList");if(!Array.isArray(a))return w(n);for(var o=e.xref,s=0,c=a.length;s<c;++s){n.data.inkLists.push([]);for(var u=0,l=a[s].length;u<l;u+=2)n.data.inkLists[s].push({x:o.fetchIfRef(a[s][u]),y:o.fetchIfRef(a[s][u+1])})}if(!n.appearance){var f,h=n.color?Array.from(n.color).map(function(e){return e/255}):[0,0,0],d=e.dict.get("CA"),p=n.borderStyle.width||1,g=2*p,m=[1/0,1/0,-1/0,-1/0],v=S(n.data.inkLists);try{for(v.s();!(f=v.n()).done;){var y,b=S(f.value);try{for(b.s();!(y=b.n()).done;){var k=y.value;m[0]=Math.min(m[0],k.x-g),m[1]=Math.min(m[1],k.y-g),m[2]=Math.max(m[2],k.x+g),m[3]=Math.max(m[3],k.y+g)}}catch(e){b.e(e)}finally{b.f()}}}catch(e){v.e(e)}finally{v.f()}i.Util.intersect(n.rectangle,m)||(n.rectangle=m),n._setDefaultAppearance({xref:e.xref,extra:"".concat(p," w"),strokeColor:h,strokeAlpha:d,pointsCallback:function(e,t){var r,a=S(n.data.inkLists);try{for(a.s();!(r=a.n()).done;){for(var i=r.value,o=0,s=i.length;o<s;o++)e.push("".concat(i[o].x," ").concat(i[o].y," ").concat(0===o?"m":"l"));e.push("S")}}catch(e){a.e(e)}finally{a.f()}return[t[0].x,t[1].x,t[3].y,t[1].y]}})}return n}return r}(),ee=function(e){v(r,B);var t=b(r);function r(e){var n;if(F(this,r),(n=t.call(this,e)).data.annotationType=i.AnnotationType.HIGHLIGHT,n.data.quadPoints=j(e.dict,null)){var a=n.appearance&&n.appearance.dict.get("Resources");if(!n.appearance||!a||!a.has("ExtGState")){n.appearance&&(0,i.warn)("HighlightAnnotation - ignoring built-in appearance stream.");var o=n.color?Array.from(n.color).map(function(e){return e/255}):[1,1,0],s=e.dict.get("CA");n._setDefaultAppearance({xref:e.xref,fillColor:o,blendMode:"Multiply",fillAlpha:s,pointsCallback:function(e,t){return e.push("".concat(t[0].x," ").concat(t[0].y," m"),"".concat(t[1].x," ").concat(t[1].y," l"),"".concat(t[3].x," ").concat(t[3].y," l"),"".concat(t[2].x," ").concat(t[2].y," l"),"f"),[t[0].x,t[1].x,t[3].y,t[1].y]}})}}else n.data.hasPopup=!1;return n}return r}(),te=function(e){v(r,B);var t=b(r);function r(e){var n;if(F(this,r),(n=t.call(this,e)).data.annotationType=i.AnnotationType.UNDERLINE,n.data.quadPoints=j(e.dict,null)){if(!n.appearance){var a=n.color?Array.from(n.color).map(function(e){return e/255}):[0,0,0],o=e.dict.get("CA");n._setDefaultAppearance({xref:e.xref,extra:"[] 0 d 1 w",strokeColor:a,strokeAlpha:o,pointsCallback:function(e,t){return e.push("".concat(t[2].x," ").concat(t[2].y," m"),"".concat(t[3].x," ").concat(t[3].y," l"),"S"),[t[0].x,t[1].x,t[3].y,t[1].y]}})}}else n.data.hasPopup=!1;return n}return r}(),re=function(e){v(r,B);var t=b(r);function r(e){var n;if(F(this,r),(n=t.call(this,e)).data.annotationType=i.AnnotationType.SQUIGGLY,n.data.quadPoints=j(e.dict,null)){if(!n.appearance){var a=n.color?Array.from(n.color).map(function(e){return e/255}):[0,0,0],o=e.dict.get("CA");n._setDefaultAppearance({xref:e.xref,extra:"[] 0 d 1 w",strokeColor:a,strokeAlpha:o,pointsCallback:function(e,t){var r=(t[0].y-t[2].y)/6,n=r,a=t[2].x,i=t[2].y,o=t[3].x;e.push("".concat(a," ").concat(i+n," m"));do{a+=2,n=0===n?r:0,e.push("".concat(a," ").concat(i+n," l"))}while(a<o);return e.push("S"),[t[2].x,o,i-2*r,i+2*r]}})}}else n.data.hasPopup=!1;return n}return r}(),ne=function(e){v(r,B);var t=b(r);function r(e){var n;if(F(this,r),(n=t.call(this,e)).data.annotationType=i.AnnotationType.STRIKEOUT,n.data.quadPoints=j(e.dict,null)){if(!n.appearance){var a=n.color?Array.from(n.color).map(function(e){return e/255}):[0,0,0],o=e.dict.get("CA");n._setDefaultAppearance({xref:e.xref,extra:"[] 0 d 1 w",strokeColor:a,strokeAlpha:o,pointsCallback:function(e,t){return e.push("".concat((t[0].x+t[2].x)/2," ")+"".concat((t[0].y+t[2].y)/2," m"),"".concat((t[1].x+t[3].x)/2," ")+"".concat((t[1].y+t[3].y)/2," l"),"S"),[t[0].x,t[1].x,t[3].y,t[1].y]}})}}else n.data.hasPopup=!1;return n}return r}(),ae=function(e){v(r,B);var t=b(r);function r(e){var n;return F(this,r),(n=t.call(this,e)).data.annotationType=i.AnnotationType.STAMP,n}return r}(),ie=function(e){v(r,B);var t=b(r);function r(e){var n;F(this,r),n=t.call(this,e);var a=new f.FileSpec(e.dict.get("FS"),e.xref);return n.data.annotationType=i.AnnotationType.FILEATTACHMENT,n.data.file=a.serializable,n}return r}()},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.createDefaultAppearance=function(e){var t,r=e.fontSize,n=e.fontName,a=e.fontColor;t=a.every(function(e){return 0===e})?"0 g":Array.from(a).map(function(e){return(e/255).toFixed(2)}).join(" ")+" rg";return"/".concat((0,o.escapePDFName)(n)," ").concat(r," Tf ").concat(t)},t.parseDefaultAppearance=function(e){return new m(e).parse()};var a=r(4),i=r(122),o=r(117),s=r(123),c=r(113),u=r(118);function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=g(e);if(t){var i=g(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(f,s.EvaluatorPreprocessor);var t,r,n,o=p(f);function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),o.call(this,new u.StringStream(e))}return t=f,(r=[{key:"parse",value:function(){var e={fn:0,args:[]},t={fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3)};try{for(;e.args.length=0,this.read(e);)if(0===this.savedStatesDepth){var r=e.fn,n=e.args;switch(0|r){case a.OPS.setFont:var o=l(n,2),s=o[0],u=o[1];s instanceof c.Name&&(t.fontName=s.name),"number"==typeof u&&u>0&&(t.fontSize=u);break;case a.OPS.setFillRGBColor:i.ColorSpace.singletons.rgb.getRgbItem(n,0,t.fontColor,0);break;case a.OPS.setFillGray:i.ColorSpace.singletons.gray.getRgbItem(n,0,t.fontColor,0);break;case a.OPS.setFillColorSpace:i.ColorSpace.singletons.cmyk.getRgbItem(n,0,t.fontColor,0)}}}catch(e){(0,a.warn)('parseDefaultAppearance - ignoring errors: "'.concat(e,'".'))}return t}}])&&h(t.prototype,r),n&&h(t,n),f}()},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorSpace=void 0;var a=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),i=r(4),o=r(113),s=r(117);function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=f(e);if(t){var i=f(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function g(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),e}var m=function(){function e(t,r){d(this,e),this.constructor===e&&(0,i.unreachable)("Cannot initialize ColorSpace."),this.name=t,this.numComps=r}return g(e,[{key:"getRgb",value:function(e,t){var r=new Uint8ClampedArray(3);return this.getRgbItem(e,t,r,0),r}},{key:"getRgbItem",value:function(e,t,r,n){(0,i.unreachable)("Should not call ColorSpace.getRgbItem")}},{key:"getRgbBuffer",value:function(e,t,r,n,a,o,s){(0,i.unreachable)("Should not call ColorSpace.getRgbBuffer")}},{key:"getOutputLength",value:function(e,t){(0,i.unreachable)("Should not call ColorSpace.getOutputLength")}},{key:"isPassthrough",value:function(e){return!1}},{key:"isDefaultDecode",value:function(t,r){return e.isDefaultDecode(t,this.numComps)}},{key:"fillRgb",value:function(e,t,r,n,a,i,o,s,c){var u=t*r,l=null,f=1<<o,h=r!==a||t!==n;if(this.isPassthrough(o))l=s;else if(1===this.numComps&&u>f&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){for(var d=o<=8?new Uint8Array(f):new Uint16Array(f),p=0;p<f;p++)d[p]=p;var g=new Uint8ClampedArray(3*f);if(this.getRgbBuffer(d,0,f,g,0,o,0),h){l=new Uint8Array(3*u);for(var m=0,v=0;v<u;++v){var y=3*s[v];l[m++]=g[y],l[m++]=g[y+1],l[m++]=g[y+2]}}else for(var b=0,w=0;w<u;++w){var k=3*s[w];e[b++]=g[k],e[b++]=g[k+1],e[b++]=g[k+2],b+=c}}else h?(l=new Uint8ClampedArray(3*u),this.getRgbBuffer(s,0,u,l,0,o,0)):this.getRgbBuffer(s,0,n*i,e,0,o,c);if(l)if(h)!function(e,t,r,n,a,i,o){o=1!==o?0:o;for(var s,c=r/a,u=n/i,l=0,f=new Uint16Array(a),h=3*r,d=0;d<a;d++)f[d]=3*Math.floor(d*c);for(var p=0;p<i;p++)for(var g=Math.floor(p*u)*h,m=0;m<a;m++)s=g+f[m],t[l++]=e[s++],t[l++]=e[s++],t[l++]=e[s++],l+=o}(l,e,t,r,n,a,c);else for(var S=0,x=0,A=0,O=n*i;A<O;A++)e[S++]=l[x++],e[S++]=l[x++],e[S++]=l[x++],S+=c}},{key:"usesZeroToOneRange",get:function(){return(0,i.shadow)(this,"usesZeroToOneRange",!0)}}],[{key:"_cache",value:function(e,t,r,n){if(!r)throw new Error('ColorSpace._cache - expected "localColorSpaceCache" argument.');if(!n)throw new Error('ColorSpace._cache - expected "parsedColorSpace" argument.');var a,i;e instanceof o.Ref&&(i=e,e=t.fetch(e)),e instanceof o.Name&&(a=e.name),(a||i)&&r.set(a,i,n)}},{key:"getCached",value:function(e,t,r){if(!r)throw new Error('ColorSpace.getCached - expected "localColorSpaceCache" argument.');if(e instanceof o.Ref){var n=r.getByRef(e);if(n)return n;try{e=t.fetch(e)}catch(e){if(e instanceof s.MissingDataException)throw e}}if(e instanceof o.Name){var a=r.getByName(e.name);if(a)return a}return null}},{key:"parseAsync",value:function(){var e,t=(e=a.default.mark(function e(t){var r,n,i,o,s,c,u;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cs,n=t.xref,i=t.resources,o=void 0===i?null:i,s=t.pdfFunctionFactory,c=t.localColorSpaceCache,u=this._parse(r,n,o,s),this._cache(r,n,c,u),e.abrupt("return",u);case 4:case"end":return e.stop()}},e,this)}),function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(e){h(i,n,a,o,s,"next",e)}function s(e){h(i,n,a,o,s,"throw",e)}o(void 0)})});return function(e){return t.apply(this,arguments)}}()},{key:"parse",value:function(e){var t=e.cs,r=e.xref,n=e.resources,a=void 0===n?null:n,i=e.pdfFunctionFactory,o=e.localColorSpaceCache,s=this.getCached(t,r,o);if(s)return s;var c=this._parse(t,r,a,i);return this._cache(t,r,o,c),c}},{key:"_parse",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3?arguments[3]:void 0;if(e=t.fetchIfRef(e),(0,o.isName)(e))switch(e.name){case"DeviceGray":case"G":return this.singletons.gray;case"DeviceRGB":case"RGB":return this.singletons.rgb;case"DeviceCMYK":case"CMYK":return this.singletons.cmyk;case"Pattern":return new y(null);default:if((0,o.isDict)(r)){var a=r.get("ColorSpace");if((0,o.isDict)(a)){var s=a.get(e.name);if(s){if((0,o.isName)(s))return this._parse(s,t,r,n);e=s;break}}}throw new i.FormatError("Unrecognized ColorSpace: ".concat(e.name))}if(Array.isArray(e)){var c,u,l,f,h,d,p=t.fetchIfRef(e[0]).name;switch(p){case"DeviceGray":case"G":return this.singletons.gray;case"DeviceRGB":case"RGB":return this.singletons.rgb;case"DeviceCMYK":case"CMYK":return this.singletons.cmyk;case"CalGray":return f=(c=t.fetchIfRef(e[1])).getArray("WhitePoint"),h=c.getArray("BlackPoint"),d=c.get("Gamma"),new x(f,h,d);case"CalRGB":f=(c=t.fetchIfRef(e[1])).getArray("WhitePoint"),h=c.getArray("BlackPoint"),d=c.getArray("Gamma");var g=c.getArray("Matrix");return new A(f,h,d,g);case"ICCBased":var m=t.fetchIfRef(e[1]).dict;u=m.get("N");var w=m.get("Alternate");if(w){var k=this._parse(w,t,r,n);if(k.numComps===u)return k;(0,i.warn)("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(1===u)return this.singletons.gray;if(3===u)return this.singletons.rgb;if(4===u)return this.singletons.cmyk;break;case"Pattern":return(l=e[1]||null)&&(l=this._parse(l,t,r,n)),new y(l);case"Indexed":case"I":l=this._parse(e[1],t,r,n);var S=t.fetchIfRef(e[2])+1,C=t.fetchIfRef(e[3]);return new b(l,S,C);case"Separation":case"DeviceN":var T=t.fetchIfRef(e[1]);u=Array.isArray(T)?T.length:1,l=this._parse(e[2],t,r,n);var F=n.create(e[3]);return new v(u,l,F);case"Lab":f=(c=t.fetchIfRef(e[1])).getArray("WhitePoint"),h=c.getArray("BlackPoint");var _=c.getArray("Range");return new O(f,h,_);default:throw new i.FormatError("Unimplemented ColorSpace object: ".concat(p))}}throw new i.FormatError("Unrecognized ColorSpace object: ".concat(e))}},{key:"isDefaultDecode",value:function(e,t){if(!Array.isArray(e))return!0;if(2*t!==e.length)return(0,i.warn)("The decode map is not the correct length"),!0;for(var r=0,n=e.length;r<n;r+=2)if(0!==e[r]||1!==e[r+1])return!1;return!0}},{key:"singletons",get:function(){return(0,i.shadow)(this,"singletons",{get gray(){return(0,i.shadow)(this,"gray",new w)},get rgb(){return(0,i.shadow)(this,"rgb",new k)},get cmyk(){return(0,i.shadow)(this,"cmyk",new S)}})}}]),e}();t.ColorSpace=m;var v=function(e){c(r,m);var t=l(r);function r(e,n,a){var i;return d(this,r),(i=t.call(this,"Alternate",e)).base=n,i.tintFn=a,i.tmpBuf=new Float32Array(n.numComps),i}return g(r,[{key:"getRgbItem",value:function(e,t,r,n){var a=this.tmpBuf;this.tintFn(e,t,a,0),this.base.getRgbItem(a,0,r,n)}},{key:"getRgbBuffer",value:function(e,t,r,n,a,i,o){var s,c,u=this.tintFn,l=this.base,f=1/((1<<i)-1),h=l.numComps,d=l.usesZeroToOneRange,p=(l.isPassthrough(8)||!d)&&0===o,g=p?a:0,m=p?n:new Uint8ClampedArray(h*r),v=this.numComps,y=new Float32Array(v),b=new Float32Array(h);for(s=0;s<r;s++){for(c=0;c<v;c++)y[c]=e[t++]*f;if(u(y,0,b,0),d)for(c=0;c<h;c++)m[g++]=255*b[c];else l.getRgbItem(b,0,m,g),g+=h}p||l.getRgbBuffer(m,0,r,n,a,8,o)}},{key:"getOutputLength",value:function(e,t){return this.base.getOutputLength(e*this.base.numComps/this.numComps,t)}}]),r}(),y=function(e){c(r,m);var t=l(r);function r(e){var n;return d(this,r),(n=t.call(this,"Pattern",null)).base=e,n}return g(r,[{key:"isDefaultDecode",value:function(e,t){(0,i.unreachable)("Should not call PatternCS.isDefaultDecode")}}]),r}(),b=function(e){c(r,m);var t=l(r);function r(e,n,a){var s;d(this,r),(s=t.call(this,"Indexed",1)).base=e,s.highVal=n;var c=e.numComps*n;if(s.lookup=new Uint8Array(c),(0,o.isStream)(a)){var u=a.getBytes(c);s.lookup.set(u)}else{if("string"!=typeof a)throw new i.FormatError("IndexedCS - unrecognized lookup table: ".concat(a));for(var l=0;l<c;++l)s.lookup[l]=255&a.charCodeAt(l)}return s}return g(r,[{key:"getRgbItem",value:function(e,t,r,n){var a=this.base.numComps,i=e[t]*a;this.base.getRgbBuffer(this.lookup,i,1,r,n,8,0)}},{key:"getRgbBuffer",value:function(e,t,r,n,a,i,o){for(var s=this.base,c=s.numComps,u=s.getOutputLength(c,o),l=this.lookup,f=0;f<r;++f){var h=e[t++]*c;s.getRgbBuffer(l,h,1,n,a,8,o),a+=u}}},{key:"getOutputLength",value:function(e,t){return this.base.getOutputLength(e*this.base.numComps,t)}},{key:"isDefaultDecode",value:function(e,t){return!Array.isArray(e)||(2!==e.length?((0,i.warn)("Decode map length is not correct"),!0):!Number.isInteger(t)||t<1?((0,i.warn)("Bits per component is not correct"),!0):0===e[0]&&e[1]===(1<<t)-1)}}]),r}(),w=function(e){c(r,m);var t=l(r);function r(){return d(this,r),t.call(this,"DeviceGray",1)}return g(r,[{key:"getRgbItem",value:function(e,t,r,n){var a=255*e[t];r[n]=r[n+1]=r[n+2]=a}},{key:"getRgbBuffer",value:function(e,t,r,n,a,i,o){for(var s=255/((1<<i)-1),c=t,u=a,l=0;l<r;++l){var f=s*e[c++];n[u++]=f,n[u++]=f,n[u++]=f,u+=o}}},{key:"getOutputLength",value:function(e,t){return e*(3+t)}}]),r}(),k=function(e){c(r,m);var t=l(r);function r(){return d(this,r),t.call(this,"DeviceRGB",3)}return g(r,[{key:"getRgbItem",value:function(e,t,r,n){r[n]=255*e[t],r[n+1]=255*e[t+1],r[n+2]=255*e[t+2]}},{key:"getRgbBuffer",value:function(e,t,r,n,a,i,o){if(8!==i||0!==o)for(var s=255/((1<<i)-1),c=t,u=a,l=0;l<r;++l)n[u++]=s*e[c++],n[u++]=s*e[c++],n[u++]=s*e[c++],u+=o;else n.set(e.subarray(t,t+3*r),a)}},{key:"getOutputLength",value:function(e,t){return e*(3+t)/3|0}},{key:"isPassthrough",value:function(e){return 8===e}}]),r}(),S=function(){function e(e,t,r,n,a){var i=e[t]*r,o=e[t+1]*r,s=e[t+2]*r,c=e[t+3]*r;n[a]=255+i*(-4.387332384609988*i+54.48615194189176*o+18.82290502165302*s+212.25662451639585*c-285.2331026137004)+o*(1.7149763477362134*o-5.6096736904047315*s+-17.873870861415444*c-5.497006427196366)+s*(-2.5217340131683033*s-21.248923337353073*c+17.5119270841813)+c*(-21.86122147463605*c-189.48180835922747),n[a+1]=255+i*(8.841041422036149*i+60.118027045597366*o+6.871425592049007*s+31.159100130055922*c-79.2970844816548)+o*(-15.310361306967817*o+17.575251261109482*s+131.35250912493976*c-190.9453302588951)+s*(4.444339102852739*s+9.8632861493405*c-24.86741582555878)+c*(-20.737325471181034*c-187.80453709719578),n[a+2]=255+i*(.8842522430003296*i+8.078677503112928*o+30.89978309703729*s-.23883238689178934*c-14.183576799673286)+o*(10.49593273432072*o+63.02378494754052*s+50.606957656360734*c-112.23884253719248)+s*(.03296041114873217*s+115.60384449646641*c-193.58209356861505)+c*(-22.33816807309886*c-180.12613974708367)}return function(t){c(n,m);var r=l(n);function n(){return d(this,n),r.call(this,"DeviceCMYK",4)}return g(n,[{key:"getRgbItem",value:function(t,r,n,a){e(t,r,1,n,a)}},{key:"getRgbBuffer",value:function(t,r,n,a,i,o,s){for(var c=1/((1<<o)-1),u=0;u<n;u++)e(t,r,c,a,i),r+=4,i+=3+s}},{key:"getOutputLength",value:function(e,t){return e/4*(3+t)|0}}]),n}()}(),x=function(){function e(e,t,r,n,a,i){var o=t[r]*i,s=Math.pow(o,e.G),c=e.YW*s,u=Math.max(295.8*Math.pow(c,.3333333333333333)-40.8,0);n[a]=u,n[a+1]=u,n[a+2]=u}return function(t){c(n,m);var r=l(n);function n(e,t,a){var o;if(d(this,n),o=r.call(this,"CalGray",1),!e)throw new i.FormatError("WhitePoint missing - required for color space CalGray");if(t=t||[0,0,0],a=a||1,o.XW=e[0],o.YW=e[1],o.ZW=e[2],o.XB=t[0],o.YB=t[1],o.ZB=t[2],o.G=a,o.XW<0||o.ZW<0||1!==o.YW)throw new i.FormatError("Invalid WhitePoint components for ".concat(o.name)+", no fallback available");return(o.XB<0||o.YB<0||o.ZB<0)&&((0,i.info)("Invalid BlackPoint for ".concat(o.name,", falling back to default.")),o.XB=o.YB=o.ZB=0),0===o.XB&&0===o.YB&&0===o.ZB||(0,i.warn)("".concat(o.name,", BlackPoint: XB: ").concat(o.XB,", YB: ").concat(o.YB,", ")+"ZB: ".concat(o.ZB,", only default values are supported.")),o.G<1&&((0,i.info)("Invalid Gamma: ".concat(o.G," for ").concat(o.name,", ")+"falling back to default."),o.G=1),o}return g(n,[{key:"getRgbItem",value:function(t,r,n,a){e(this,t,r,n,a,1)}},{key:"getRgbBuffer",value:function(t,r,n,a,i,o,s){for(var c=1/((1<<o)-1),u=0;u<n;++u)e(this,t,r,a,i,c),r+=1,i+=3+s}},{key:"getOutputLength",value:function(e,t){return e*(3+t)}}]),n}()}(),A=function(){var e=new Float32Array([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296]),t=new Float32Array([.9869929,-.1470543,.1599627,.4323053,.5183603,.0492912,-.0085287,.0400428,.9684867]),r=new Float32Array([3.2404542,-1.5371385,-.4985314,-.969266,1.8760108,.041556,.0556434,-.2040259,1.0572252]),n=new Float32Array([1,1,1]),a=new Float32Array(3),o=new Float32Array(3),s=new Float32Array(3),u=Math.pow(24/116,3)/8;function f(e,t,r){r[0]=e[0]*t[0]+e[1]*t[1]+e[2]*t[2],r[1]=e[3]*t[0]+e[4]*t[1]+e[5]*t[2],r[2]=e[6]*t[0]+e[7]*t[1]+e[8]*t[2]}function h(e){return e<=.0031308?p(0,1,12.92*e):e>=.99554525?1:p(0,1,1.055*Math.pow(e,1/2.4)-.055)}function p(e,t,r){return Math.max(e,Math.min(t,r))}function v(e){return e<0?-v(-e):e>8?Math.pow((e+16)/116,3):e*u}function y(i,c,u,l,d,g){var m=p(0,1,c[u]*g),y=p(0,1,c[u+1]*g),b=p(0,1,c[u+2]*g),w=1===m?1:Math.pow(m,i.GR),k=1===y?1:Math.pow(y,i.GG),S=1===b?1:Math.pow(b,i.GB),x=i.MXA*w+i.MXB*k+i.MXC*S,A=i.MYA*w+i.MYB*k+i.MYC*S,O=i.MZA*w+i.MZB*k+i.MZC*S,C=o;C[0]=x,C[1]=A,C[2]=O;var T=s;!function(r,n,i){if(1===r[0]&&1===r[2])return i[0]=n[0],i[1]=n[1],void(i[2]=n[2]);var o=i;f(e,n,o);var s=a;!function(e,t,r){r[0]=1*t[0]/e[0],r[1]=1*t[1]/e[1],r[2]=1*t[2]/e[2]}(r,o,s),f(t,s,i)}(i.whitePoint,C,T);var F=o;!function(e,t,r){if(0===e[0]&&0===e[1]&&0===e[2])return r[0]=t[0],r[1]=t[1],void(r[2]=t[2]);var n=v(0),a=(1-n)/(1-v(e[0])),i=1-a,o=(1-n)/(1-v(e[1])),s=1-o,c=(1-n)/(1-v(e[2])),u=1-c;r[0]=t[0]*a+i,r[1]=t[1]*o+s,r[2]=t[2]*c+u}(i.blackPoint,T,F);var _=s;!function(r,n,i){var o=i;f(e,n,o);var s=a;!function(e,t,r){r[0]=.95047*t[0]/e[0],r[1]=1*t[1]/e[1],r[2]=1.08883*t[2]/e[2]}(r,o,s),f(t,s,i)}(n,F,_);var P=o;f(r,_,P),l[d]=255*h(P[0]),l[d+1]=255*h(P[1]),l[d+2]=255*h(P[2])}return function(e){c(r,m);var t=l(r);function r(e,n,a,o){var s;if(d(this,r),s=t.call(this,"CalRGB",3),!e)throw new i.FormatError("WhitePoint missing - required for color space CalRGB");n=n||new Float32Array(3),a=a||new Float32Array([1,1,1]),o=o||new Float32Array([1,0,0,0,1,0,0,0,1]);var c=e[0],u=e[1],l=e[2];s.whitePoint=e;var f=n[0],h=n[1],p=n[2];if(s.blackPoint=n,s.GR=a[0],s.GG=a[1],s.GB=a[2],s.MXA=o[0],s.MYA=o[1],s.MZA=o[2],s.MXB=o[3],s.MYB=o[4],s.MZB=o[5],s.MXC=o[6],s.MYC=o[7],s.MZC=o[8],c<0||l<0||1!==u)throw new i.FormatError("Invalid WhitePoint components for ".concat(s.name)+", no fallback available");return(f<0||h<0||p<0)&&((0,i.info)("Invalid BlackPoint for ".concat(s.name," [").concat(f,", ").concat(h,", ").concat(p,"], ")+"falling back to default."),s.blackPoint=new Float32Array(3)),(s.GR<0||s.GG<0||s.GB<0)&&((0,i.info)("Invalid Gamma [".concat(s.GR,", ").concat(s.GG,", ").concat(s.GB,"] for ")+"".concat(s.name,", falling back to default.")),s.GR=s.GG=s.GB=1),s}return g(r,[{key:"getRgbItem",value:function(e,t,r,n){y(this,e,t,r,n,1)}},{key:"getRgbBuffer",value:function(e,t,r,n,a,i,o){for(var s=1/((1<<i)-1),c=0;c<r;++c)y(this,e,t,n,a,s),t+=3,a+=3+o}},{key:"getOutputLength",value:function(e,t){return e*(3+t)/3|0}}]),r}()}(),O=function(){function e(e){return e>=6/29?Math.pow(e,3):108/841*(e-4/29)}function t(e,t,r,n){return r+e*(n-r)/t}function r(r,n,a,i,o,s){var c=n[a],u=n[a+1],l=n[a+2];!1!==i&&(c=t(c,i,0,100),u=t(u,i,r.amin,r.amax),l=t(l,i,r.bmin,r.bmax)),u>r.amax?u=r.amax:u<r.amin&&(u=r.amin),l>r.bmax?l=r.bmax:l<r.bmin&&(l=r.bmin);var f,h,d,p=(c+16)/116,g=p+u/500,m=p-l/200,v=r.XW*e(g),y=r.YW*e(p),b=r.ZW*e(m);r.ZW<1?(f=3.1339*v+-1.617*y+-.4906*b,h=-.9785*v+1.916*y+.0333*b,d=.072*v+-.229*y+1.4057*b):(f=3.2406*v+-1.5372*y+-.4986*b,h=-.9689*v+1.8758*y+.0415*b,d=.0557*v+-.204*y+1.057*b),o[s]=255*Math.sqrt(f),o[s+1]=255*Math.sqrt(h),o[s+2]=255*Math.sqrt(d)}return function(e){c(n,m);var t=l(n);function n(e,r,a){var o;if(d(this,n),o=t.call(this,"Lab",3),!e)throw new i.FormatError("WhitePoint missing - required for color space Lab");if(r=r||[0,0,0],a=a||[-100,100,-100,100],o.XW=e[0],o.YW=e[1],o.ZW=e[2],o.amin=a[0],o.amax=a[1],o.bmin=a[2],o.bmax=a[3],o.XB=r[0],o.YB=r[1],o.ZB=r[2],o.XW<0||o.ZW<0||1!==o.YW)throw new i.FormatError("Invalid WhitePoint components, no fallback available");return(o.XB<0||o.YB<0||o.ZB<0)&&((0,i.info)("Invalid BlackPoint, falling back to default"),o.XB=o.YB=o.ZB=0),(o.amin>o.amax||o.bmin>o.bmax)&&((0,i.info)("Invalid Range, falling back to defaults"),o.amin=-100,o.amax=100,o.bmin=-100,o.bmax=100),o}return g(n,[{key:"getRgbItem",value:function(e,t,n,a){r(this,e,t,!1,n,a)}},{key:"getRgbBuffer",value:function(e,t,n,a,i,o,s){for(var c=(1<<o)-1,u=0;u<n;u++)r(this,e,t,c,a,i),t+=3,i+=3+s}},{key:"getOutputLength",value:function(e,t){return e*(3+t)/3|0}},{key:"isDefaultDecode",value:function(e,t){return!0}},{key:"usesZeroToOneRange",get:function(){return(0,i.shadow)(this,"usesZeroToOneRange",!1)}}]),n}()}()},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PartialEvaluator=t.EvaluatorPreprocessor=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),a=r(4),i=r(124),o=r(113),s=r(142),c=r(146),u=r(145),l=r(148),f=r(149),h=r(156),d=r(150),p=r(157),g=r(125),m=r(159),v=r(160),y=r(122),b=r(127),w=r(147),k=r(117),S=r(161),x=r(162),A=r(118),O=r(163),C=r(164);function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||I(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function _(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(e){F(i,n,a,o,s,"next",e)}function s(e){F(i,n,a,o,s,"throw",e)}o(void 0)})}}function P(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=I(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function I(e,t){if(e){if("string"==typeof e)return E(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(e,t):void 0}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function M(e,t,r){return t&&R(e.prototype,t),r&&R(e,r),e}var N=Object.freeze({maxImageSize:-1,disableFontFace:!1,ignoreErrors:!1,isEvalSupported:!0,fontExtraProperties:!1}),B=1,D=2,L=Promise.resolve();function U(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Array.isArray(e)){for(var r=0,n=e.length;r<n;r++){var i=U(e[r],!0);if(i)return i}return(0,a.warn)("Unsupported blend mode Array: ".concat(e)),"source-over"}if(!(0,o.isName)(e))return t?null:"source-over";switch(e.name){case"Normal":case"Compatible":return"source-over";case"Multiply":return"multiply";case"Screen":return"screen";case"Overlay":return"overlay";case"Darken":return"darken";case"Lighten":return"lighten";case"ColorDodge":return"color-dodge";case"ColorBurn":return"color-burn";case"HardLight":return"hard-light";case"SoftLight":return"soft-light";case"Difference":return"difference";case"Exclusion":return"exclusion";case"Hue":return"hue";case"Saturation":return"saturation";case"Color":return"color";case"Luminosity":return"luminosity"}return t?null:((0,a.warn)("Unsupported blend mode: ".concat(e.name)),"source-over")}var q=function(){function e(){j(this,e),this.reset()}return M(e,[{key:"check",value:function(){return!(++this.checked<e.CHECK_TIME_EVERY)&&(this.checked=0,this.endTime<=Date.now())}},{key:"reset",value:function(){this.endTime=Date.now()+e.TIME_SLOT_DURATION_MS,this.checked=0}}],[{key:"TIME_SLOT_DURATION_MS",get:function(){return(0,a.shadow)(this,"TIME_SLOT_DURATION_MS",20)}},{key:"CHECK_TIME_EVERY",get:function(){return(0,a.shadow)(this,"CHECK_TIME_EVERY",100)}}]),e}(),X=function(){function e(t){var r=t.xref,n=t.handler,a=t.pageIndex,i=t.idFactory,o=t.fontCache,s=t.builtInCMapCache,c=t.globalImageCache,u=t.options,l=void 0===u?null:u;j(this,e),this.xref=r,this.handler=n,this.pageIndex=a,this.idFactory=i,this.fontCache=o,this.builtInCMapCache=s,this.globalImageCache=c,this.options=l||N,this.parsingType3Font=!1,this._fetchBuiltInCMapBound=this.fetchBuiltInCMap.bind(this)}return M(e,[{key:"_pdfFunctionFactory",get:function(){var e=new p.PDFFunctionFactory({xref:this.xref,isEvalSupported:this.options.isEvalSupported});return(0,a.shadow)(this,"_pdfFunctionFactory",e)}},{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:N,t=Object.create(this);return t.options=e,t}},{key:"hasBlendModes",value:function(e,t){if(!(e instanceof o.Dict))return!1;if(e.objId&&t.has(e.objId))return!1;var r=new o.RefSet(t);e.objId&&r.put(e.objId);for(var n=[e],i=this.xref;n.length;){var s=n.shift(),c=s.get("ExtGState");if(c instanceof o.Dict){var u,l=P(c.getRawValues());try{for(l.s();!(u=l.n()).done;){var f=u.value;if(f instanceof o.Ref){if(r.has(f))continue;try{f=i.fetch(f)}catch(e){r.put(f),(0,a.info)('hasBlendModes - ignoring ExtGState: "'.concat(e,'".'));continue}}if(f instanceof o.Dict){f.objId&&r.put(f.objId);var h=f.get("BM");if(h instanceof o.Name){if("Normal"!==h.name)return!0}else if(void 0!==h&&Array.isArray(h)){var d,p=P(h);try{for(p.s();!(d=p.n()).done;){var g=d.value;if(g instanceof o.Name&&"Normal"!==g.name)return!0}}catch(e){p.e(e)}finally{p.f()}}}}}catch(e){l.e(e)}finally{l.f()}}var m=s.get("XObject");if(m instanceof o.Dict){var v,y=P(m.getRawValues());try{for(y.s();!(v=y.n()).done;){var b=v.value;if(b instanceof o.Ref){if(r.has(b))continue;try{b=i.fetch(b)}catch(e){r.put(b),(0,a.info)('hasBlendModes - ignoring XObject: "'.concat(e,'".'));continue}}if((0,o.isStream)(b)){b.dict.objId&&r.put(b.dict.objId);var w=b.dict.get("Resources");w instanceof o.Dict&&(w.objId&&r.has(w.objId)||(n.push(w),w.objId&&r.put(w.objId)))}}}catch(e){y.e(e)}finally{y.f()}}}return r.forEach(function(e){t.put(e)}),!1}},{key:"fetchBuiltInCMap",value:function(){var e=_(n.default.mark(function e(t){var r,i,o,s;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.builtInCMapCache.get(t))){e.next=3;break}return e.abrupt("return",r);case 3:return i=this.handler.sendWithStream("FetchBuiltInCMap",{name:t}),o=i.getReader(),e.next=7,new Promise(function(e,t){!function r(){o.read().then(function(t){var n=t.value;t.done||(e(n),r())},t)}()});case 7:return(s=e.sent).compressionType!==a.CMapCompressionType.NONE&&this.builtInCMapCache.set(t,s),e.abrupt("return",s);case 10:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"buildFormXObject",value:function(){var e=_(n.default.mark(function e(t,r,i,s,c,u,l){var f,h,d,p,g,m,v,b,w,k;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(f=r.dict,h=f.getArray("Matrix"),d=f.getArray("BBox"),d=Array.isArray(d)&&4===d.length?a.Util.normalizeRect(d):null,p=null,!f.has("OC")){e.next=10;break}return e.next=8,this.parseMarkedContentProps(f.get("OC"),t);case 8:p=e.sent,s.addOp(a.OPS.beginMarkedContentProps,["OC",p]);case 10:if(!(m=f.get("Group"))){e.next=30;break}if(g={matrix:h,bbox:d,smask:i,isolated:!1,knockout:!1},v=m.get("S"),b=null,!(0,o.isName)(v,"Transparency")){e.next=28;break}if(g.isolated=m.get("I")||!1,g.knockout=m.get("K")||!1,!m.has("CS")){e.next=28;break}if(w=m.getRaw("CS"),!(k=y.ColorSpace.getCached(w,this.xref,l))){e.next=25;break}b=k,e.next=28;break;case 25:return e.next=27,this.parseColorSpace({cs:w,resources:t,localColorSpaceCache:l});case 27:b=e.sent;case 28:i&&i.backdrop&&(b=b||y.ColorSpace.singletons.rgb,i.backdrop=b.getRgb(i.backdrop,0)),s.addOp(a.OPS.beginGroup,[g]);case 30:return s.addOp(a.OPS.paintFormXObjectBegin,[h,d]),e.abrupt("return",this.getOperatorList({stream:r,task:c,resources:f.get("Resources")||t,operatorList:s,initialState:u}).then(function(){s.addOp(a.OPS.paintFormXObjectEnd,[]),m&&s.addOp(a.OPS.endGroup,[g]),p&&s.addOp(a.OPS.endMarkedContent,[])}));case 32:case"end":return e.stop()}},e,this)}));return function(t,r,n,a,i,o,s){return e.apply(this,arguments)}}()},{key:"_sendImgData",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t?[t.data.buffer]:null;return this.parsingType3Font||r?this.handler.send("commonobj",[e,"Image",t],n):this.handler.send("obj",[e,this.pageIndex,"Image",t],n)}},{key:"buildPaintImageXObject",value:function(){var e=_(n.default.mark(function e(t){var r,i,o,s,c,u,l,f,h,d,p,g,m,v,y,w,k,S,x,A,O,T,F,_,P,I=this;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.resources,i=t.image,o=t.isInline,s=void 0!==o&&o,c=t.operatorList,u=t.cacheKey,l=t.localImageCache,f=t.localColorSpaceCache,h=i.dict,d=h.objId,p=h.get("Width","W"),g=h.get("Height","H"),p&&(0,a.isNum)(p)&&g&&(0,a.isNum)(g)){e.next=8;break}return(0,a.warn)("Image dimensions are missing, or not numbers."),e.abrupt("return",void 0);case 8:if(!(-1!==(m=this.options.maxImageSize)&&p*g>m)){e.next=12;break}return(0,a.warn)("Image exceeded maximum allowed size and was removed."),e.abrupt("return",void 0);case 12:if(!(h.get("ImageMask","IM")||!1)){e.next=25;break}return w=h.get("Width","W"),k=h.get("Height","H"),S=w+7>>3,x=i.getBytes(S*k,!0),A=h.getArray("Decode","D"),(v=C.PDFImage.createMask({imgArray:x,width:w,height:k,imageIsFromDecodeStream:i instanceof b.DecodeStream,inverseDecode:!!A&&A[0]>0})).cached=!!u,y=[v],c.addOp(a.OPS.paintImageMaskXObject,y),u&&l.set(u,d,{fn:a.OPS.paintImageMaskXObject,args:y}),e.abrupt("return",void 0);case 25:if(O=h.get("SMask","SM")||!1,T=h.get("Mask")||!1,200,!s||O||T||!(p+g<200)){e.next=33;break}return F=new C.PDFImage({xref:this.xref,res:r,image:i,isInline:s,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:f}),v=F.createImageData(!0),c.addOp(a.OPS.paintInlineImageXObject,[v]),e.abrupt("return",void 0);case 33:return _="img_".concat(this.idFactory.createObjId()),P=!1,this.parsingType3Font?_="".concat(this.idFactory.getDocId(),"_type3_").concat(_):d&&(P=this.globalImageCache.shouldCache(d,this.pageIndex))&&(_="".concat(this.idFactory.getDocId(),"_").concat(_)),c.addDependency(_),y=[_,p,g],C.PDFImage.buildImage({xref:this.xref,res:r,image:i,isInline:s,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:f}).then(function(e){return v=e.createImageData(!1),u&&d&&P&&I.globalImageCache.addByteSize(d,v.data.length),I._sendImgData(_,v,P)}).catch(function(e){return(0,a.warn)('Unable to decode image "'.concat(_,'": "').concat(e,'".')),I._sendImgData(_,null,P)}),c.addOp(a.OPS.paintImageXObject,y),u&&(l.set(u,d,{fn:a.OPS.paintImageXObject,args:y}),d&&((0,a.assert)(!s,"Cannot cache an inline image globally."),this.globalImageCache.addPageIndex(d,this.pageIndex),P&&this.globalImageCache.setData(d,{objId:_,fn:a.OPS.paintImageXObject,args:y,byteSize:0}))),e.abrupt("return",void 0);case 41:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"handleSMask",value:function(e,t,r,n,a,i){var o=e.get("G"),s={subtype:e.get("S").name,backdrop:e.get("BC")},c=e.get("TR");if((0,p.isPDFFunction)(c)){for(var u=this._pdfFunctionFactory.create(c),l=new Uint8Array(256),f=new Float32Array(1),h=0;h<256;h++)f[0]=h/255,u(f,0,f,0),l[h]=255*f[0]|0;s.transferMap=l}return this.buildFormXObject(t,o,s,r,n,a.state.clone(),i)}},{key:"handleTransferFunction",value:function(e){var t;if(Array.isArray(e))t=e;else{if(!(0,p.isPDFFunction)(e))return null;t=[e]}var r,n=[],a=0,i=0,s=P(t);try{for(s.s();!(r=s.n()).done;){var c=r.value,u=this.xref.fetchIfRef(c);if(a++,(0,o.isName)(u,"Identity"))n.push(null);else{if(!(0,p.isPDFFunction)(u))return null;for(var l=this._pdfFunctionFactory.create(u),f=new Uint8Array(256),h=new Float32Array(1),d=0;d<256;d++)h[0]=d/255,l(h,0,h,0),f[d]=255*h[0]|0;n.push(f),i++}}}catch(e){s.e(e)}finally{s.f()}return 1!==a&&4!==a?null:0===i?null:n}},{key:"handleTilingType",value:function(e,t,r,n,i,s,c,u,l){var f=this,d=new O.OperatorList,p=o.Dict.merge({xref:this.xref,dictArray:[i.get("Resources"),r]});return this.getOperatorList({stream:n,task:c,resources:p,operatorList:d}).then(function(){var r=d.getIR(),n=(0,h.getTilingPatternIR)(r,i,t);s.addDependencies(d.dependencies),s.addOp(e,n),u&&l.set(u,i.objId,{operatorListIR:r,dict:i})}).catch(function(e){if(!(e instanceof a.AbortException)){if(f.options.ignoreErrors)return f.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorTilingPattern}),void(0,a.warn)('handleTilingType - ignoring pattern: "'.concat(e,'".'));throw e}})}},{key:"handleSetFont",value:function(e,t,r,n,i,c){var u=this,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,f=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,h=t&&t[0]instanceof o.Name?t[0].name:null;return this.loadFont(h,r,e,l,f).then(function(t){return t.font.isType3Font?t.loadType3Data(u,e,i).then(function(){return n.addDependencies(t.type3Dependencies),t}).catch(function(e){return u.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorFontLoadType3}),new H({loadedName:"g_font_error",font:new s.ErrorFont("Type3 font load error: ".concat(e)),dict:t.font,evaluatorOptions:u.options})}):t}).then(function(e){return c.font=e.font,e.send(u.handler),e.loadedName})}},{key:"handleText",value:function(t,r){var n=r.font,i=n.charsToGlyphs(t);n.data&&((!!(r.textRenderingMode&a.TextRenderingMode.ADD_TO_PATH_FLAG)||"Pattern"===r.fillColorSpace.name||n.disableFontFace||this.options.disableFontFace)&&e.buildFontPaths(n,i,this.handler,this.options));return i}},{key:"ensureStateFont",value:function(e){if(!e.font){var t=new a.FormatError("Missing setFont (Tf) operator before text rendering operator.");if(this.options.ignoreErrors)return this.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorFontState}),void(0,a.warn)('ensureStateFont: "'.concat(t,'".'));throw t}}},{key:"setGState",value:function(){var e=_(n.default.mark(function e(t){var r,i,s,c,u,l,f,h,d,p,g,m,v,y,b,w,k=this;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(r=t.resources,i=t.gState,s=t.operatorList,c=t.cacheKey,u=t.task,l=t.stateManager,f=t.localGStateCache,h=t.localColorSpaceCache,d=i.objId,p=!0,g=[],m=i.getKeys(),v=Promise.resolve(),y=function(e,t){var n=m[e],c=i.get(n);switch(n){case"Type":break;case"LW":case"LC":case"LJ":case"ML":case"D":case"RI":case"FL":case"CA":case"ca":g.push([n,c]);break;case"Font":p=!1,v=v.then(function(){return k.handleSetFont(r,null,c[0],s,u,l.state).then(function(e){s.addDependency(e),g.push([n,[e,c[1]]])})});break;case"BM":g.push([n,U(c)]);break;case"SMask":if((0,o.isName)(c,"None")){g.push([n,!1]);break}(0,o.isDict)(c)?(p=!1,v=v.then(function(){return k.handleSMask(c,r,s,u,l,h)}),g.push([n,!0])):(0,a.warn)("Unsupported SMask type");break;case"TR":var f=k.handleTransferFunction(c);g.push([n,f]);break;case"OP":case"op":case"OPM":case"BG":case"BG2":case"UCR":case"UCR2":case"TR2":case"HT":case"SM":case"SA":case"AIS":case"TK":(0,a.info)("graphic state operator "+n);break;default:(0,a.info)("Unknown graphic state operator "+n)}},b=0,w=m.length;b<w;b++)y(b);return e.abrupt("return",v.then(function(){g.length>0&&s.addOp(a.OPS.setGState,[g]),p&&f.set(c,d,g)}));case 9:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()},{key:"loadFont",value:function(t,r,i){var u,l=this,f=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,d=function(){var e=_(n.default.mark(function e(){return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new H({loadedName:"g_font_error",font:new s.ErrorFont('Font "'.concat(t,'" is not available.')),dict:r,evaluatorOptions:l.options}));case 1:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),p=this.xref;if(r){if(!(0,o.isRef)(r))throw new a.FormatError('The "font" object should be a reference.');u=r}else{var g=i.get("Font");g&&(u=g.getRaw(t))}if(!u){var m='Font "'.concat(t||r&&r.toString(),'" is not available');if(!this.options.ignoreErrors&&!this.parsingType3Font)return(0,a.warn)("".concat(m,".")),d();this.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorFontMissing}),(0,a.warn)("".concat(m," -- attempting to fallback to a default font.")),u=f||e.fallbackFontDict}if(this.fontCache.has(u))return this.fontCache.get(u);if(r=p.fetchIfRef(u),!(0,o.isDict)(r))return d();if(r.cacheKey&&this.fontCache.has(r.cacheKey))return this.fontCache.get(r.cacheKey);var v,y=(0,a.createPromiseCapability)();try{(v=this.preEvaluateFont(r)).cssFontInfo=h}catch(e){return(0,a.warn)('loadFont - preEvaluateFont failed: "'.concat(e,'".')),d()}var b,w=v,k=w.descriptor,S=w.hash,x=(0,o.isRef)(u);if(x&&(b="f".concat(u.toString())),S&&(0,o.isDict)(k)){k.fontAliases||(k.fontAliases=Object.create(null));var A=k.fontAliases;if(A[S]){var O=A[S].aliasRef;if(x&&O&&this.fontCache.has(O))return this.fontCache.putAlias(u,O),this.fontCache.get(u)}else A[S]={fontID:this.idFactory.createFontId()};x&&(A[S].aliasRef=u),b=A[S].fontID}return x?this.fontCache.put(u,y.promise):(b||(b=this.idFactory.createFontId()),r.cacheKey="cacheKey_".concat(b),this.fontCache.put(r.cacheKey,y.promise)),(0,a.assert)(b&&b.startsWith("f"),'The "fontID" must be (correctly) defined.'),r.loadedName="".concat(this.idFactory.getDocId(),"_").concat(b),this.translateFont(v).then(function(e){void 0!==e.fontType&&(p.stats.fontTypes[e.fontType]=!0);y.resolve(new H({loadedName:r.loadedName,font:e,dict:r,evaluatorOptions:l.options}))}).catch(function(e){l.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorFontTranslate}),(0,a.warn)('loadFont - translateFont failed: "'.concat(e,'".'));try{var t=k&&k.get("FontFile3"),n=t&&t.get("Subtype"),i=(0,c.getFontType)(v.type,n&&n.name);p.stats.fontTypes[i]=!0}catch(e){}y.resolve(new H({loadedName:r.loadedName,font:new s.ErrorFont(e instanceof Error?e.message:e),dict:r,evaluatorOptions:l.options}))}),y.promise}},{key:"buildPath",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=e.length-1;if(r||(r=[]),i<0||e.fnArray[i]!==a.OPS.constructPath)n&&((0,a.warn)('Encountered path operator "'.concat(t,'" inside of a text object.')),e.addOp(a.OPS.save,null)),e.addOp(a.OPS.constructPath,[[t],r]),n&&e.addOp(a.OPS.restore,null);else{var o=e.argsArray[i];o[0].push(t),Array.prototype.push.apply(o[1],r)}}},{key:"parseColorSpace",value:function(e){var t=this,r=e.cs,n=e.resources,i=e.localColorSpaceCache;return y.ColorSpace.parseAsync({cs:r,xref:this.xref,resources:n,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:i}).catch(function(e){if(e instanceof a.AbortException)return null;if(t.options.ignoreErrors)return t.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorColorSpace}),(0,a.warn)('parseColorSpace - ignoring ColorSpace: "'.concat(e,'".')),null;throw e})}},{key:"handleColorN",value:function(e,t,r,n,i,s,c,u,l){var f=r.pop();if(f instanceof o.Name){var d=f.name,p=l.getByName(d);if(p)try{var g=n.base?n.base.getRgb(r,0):null,m=(0,h.getTilingPatternIR)(p.operatorListIR,p.dict,g);return void e.addOp(t,m)}catch(e){}var v=i.get(d);if(v){var y=(0,o.isStream)(v)?v.dict:v,b=y.get("PatternType");if(b===B){var w=n.base?n.base.getRgb(r,0):null;return this.handleTilingType(t,w,s,v,y,e,c,d,l)}if(b===D){var k=y.get("Shading"),S=y.getArray("Matrix");return v=h.Pattern.parseShading(k,S,this.xref,s,this.handler,this._pdfFunctionFactory,u),void e.addOp(t,v.getIR())}throw new a.FormatError("Unknown PatternType: ".concat(b))}}throw new a.FormatError("Unknown PatternName: ".concat(f))}},{key:"_parseVisibilityExpression",value:function(e,t,r){if(++t>10)(0,a.warn)("Visibility expression is too deeply nested");else{var n=e.length,i=this.xref.fetchIfRef(e[0]);if(n<2||!(0,o.isName)(i))(0,a.warn)("Invalid visibility expression");else{switch(i.name){case"And":case"Or":case"Not":r.push(i.name);break;default:return void(0,a.warn)("Invalid operator ".concat(i.name," in visibility expression"))}for(var s=1;s<n;s++){var c=e[s],u=this.xref.fetchIfRef(c);if(Array.isArray(u)){var l=[];r.push(l),this._parseVisibilityExpression(u,t,l)}else(0,o.isRef)(c)&&r.push(c.toString())}}}}},{key:"parseMarkedContentProps",value:function(){var e=_(n.default.mark(function e(t,r){var i,s,c,u,l,f,h,d,p,g;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0,o.isName)(t)){e.next=5;break}s=r.get("Properties"),i=s.get(t.name),e.next=10;break;case 5:if(!(0,o.isDict)(t)){e.next=9;break}i=t,e.next=10;break;case 9:throw new a.FormatError("Optional content properties malformed.");case 10:if("OCG"!==(c=i.get("Type").name)){e.next=15;break}return e.abrupt("return",{type:c,id:i.objId});case 15:if("OCMD"!==c){e.next=31;break}if(u=i.get("VE"),!Array.isArray(u)){e.next=22;break}if(l=[],this._parseVisibilityExpression(u,0,l),!(l.length>0)){e.next=22;break}return e.abrupt("return",{type:"OCMD",expression:l});case 22:if(f=i.get("OCGs"),!Array.isArray(f)&&!(0,o.isDict)(f)){e.next=29;break}if(h=[],Array.isArray(f)){d=P(f);try{for(d.s();!(p=d.n()).done;)g=p.value,h.push(g.toString())}catch(e){d.e(e)}finally{d.f()}}else h.push(f.objId);return e.abrupt("return",{type:c,ids:h,policy:(0,o.isName)(i.get("P"))?i.get("P").name:null,expression:null});case 29:if(!(0,o.isRef)(f)){e.next=31;break}return e.abrupt("return",{type:c,id:f.toString()});case 31:return e.abrupt("return",null);case 32:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getOperatorList",value:function(e){var t=this,r=e.stream,n=e.task,i=e.resources,s=e.operatorList,c=e.initialState,u=void 0===c?null:c,l=e.fallbackFontDict,f=void 0===l?null:l;if(i=i||o.Dict.empty,u=u||new G,!s)throw new Error('getOperatorList: missing "operatorList" parameter');var d=this,p=this.xref,g=!1,v=new m.LocalImageCache,b=new m.LocalColorSpaceCache,w=new m.LocalGStateCache,k=new m.LocalTilingPatternCache,S=i.get("XObject")||o.Dict.empty,x=i.get("Pattern")||o.Dict.empty,A=new $(u),O=new W(r,p,A),C=new q;function T(e){for(var t=0,r=O.savedStatesDepth;t<r;t++)s.addOp(a.OPS.restore,[])}return new Promise(function e(t,r){var c=function(n){Promise.all([n,s.ready]).then(function(){try{e(t,r)}catch(e){r(e)}},r)};n.ensureNotTerminated(),C.reset();for(var u,l,m,F,_,P={};!(u=C.check())&&(P.args=null,O.read(P));){var I=P.args,E=P.fn;switch(0|E){case a.OPS.paintXObject:if(_=I[0].name){var j=v.getByName(_);if(j){s.addOp(j.fn,j.args),I=null;continue}}return void c(new Promise(function(e,t){if(!_)throw new a.FormatError("XObject must be referred to by name.");var r=S.getRaw(_);if(r instanceof o.Ref){var c=v.getByRef(r);if(c)return s.addOp(c.fn,c.args),void e();var u=d.globalImageCache.getData(r,d.pageIndex);if(u)return s.addDependency(u.objId),s.addOp(u.fn,u.args),void e();r=p.fetch(r)}if(!(0,o.isStream)(r))throw new a.FormatError("XObject should be a stream");var l=r.dict.get("Subtype");if(!(0,o.isName)(l))throw new a.FormatError("XObject should have a Name subtype");if("Form"===l.name)return A.save(),void d.buildFormXObject(i,r,null,s,n,A.state.clone(),b).then(function(){A.restore(),e()},t);if("Image"!==l.name){if("PS"!==l.name)throw new a.FormatError("Unhandled XObject subtype ".concat(l.name));(0,a.info)("Ignored XObject subtype PS"),e()}else d.buildPaintImageXObject({resources:i,image:r,operatorList:s,cacheKey:_,localImageCache:v,localColorSpaceCache:b}).then(e,t)}).catch(function(e){if(!(e instanceof a.AbortException)){if(d.options.ignoreErrors)return d.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorXObject}),void(0,a.warn)('getOperatorList - ignoring XObject: "'.concat(e,'".'));throw e}}));case a.OPS.setFont:var R=I[1];return void c(d.handleSetFont(i,I,null,s,n,A.state,f).then(function(e){s.addDependency(e),s.addOp(a.OPS.setFont,[e,R])}));case a.OPS.beginText:g=!0;break;case a.OPS.endText:g=!1;break;case a.OPS.endInlineImage:var M=I[0].cacheKey;if(M){var N=v.getByName(M);if(N){s.addOp(N.fn,N.args),I=null;continue}}return void c(d.buildPaintImageXObject({resources:i,image:I[0],isInline:!0,operatorList:s,cacheKey:M,localImageCache:v,localColorSpaceCache:b}));case a.OPS.showText:if(!A.state.font){d.ensureStateFont(A.state);continue}I[0]=d.handleText(I[0],A.state);break;case a.OPS.showSpacedText:if(!A.state.font){d.ensureStateFont(A.state);continue}var B=I[0],D=[],U=B.length,q=A.state;for(l=0;l<U;++l){var X=B[l];(0,a.isString)(X)?Array.prototype.push.apply(D,d.handleText(X,q)):(0,a.isNum)(X)&&D.push(X)}I[0]=D,E=a.OPS.showText;break;case a.OPS.nextLineShowText:if(!A.state.font){d.ensureStateFont(A.state);continue}s.addOp(a.OPS.nextLine),I[0]=d.handleText(I[0],A.state),E=a.OPS.showText;break;case a.OPS.nextLineSetSpacingShowText:if(!A.state.font){d.ensureStateFont(A.state);continue}s.addOp(a.OPS.nextLine),s.addOp(a.OPS.setWordSpacing,[I.shift()]),s.addOp(a.OPS.setCharSpacing,[I.shift()]),I[0]=d.handleText(I[0],A.state),E=a.OPS.showText;break;case a.OPS.setTextRenderingMode:A.state.textRenderingMode=I[0];break;case a.OPS.setFillColorSpace:var H=y.ColorSpace.getCached(I[0],p,b);if(H){A.state.fillColorSpace=H;continue}return void c(d.parseColorSpace({cs:I[0],resources:i,localColorSpaceCache:b}).then(function(e){e&&(A.state.fillColorSpace=e)}));case a.OPS.setStrokeColorSpace:var $=y.ColorSpace.getCached(I[0],p,b);if($){A.state.strokeColorSpace=$;continue}return void c(d.parseColorSpace({cs:I[0],resources:i,localColorSpaceCache:b}).then(function(e){e&&(A.state.strokeColorSpace=e)}));case a.OPS.setFillColor:I=(F=A.state.fillColorSpace).getRgb(I,0),E=a.OPS.setFillRGBColor;break;case a.OPS.setStrokeColor:I=(F=A.state.strokeColorSpace).getRgb(I,0),E=a.OPS.setStrokeRGBColor;break;case a.OPS.setFillGray:A.state.fillColorSpace=y.ColorSpace.singletons.gray,I=y.ColorSpace.singletons.gray.getRgb(I,0),E=a.OPS.setFillRGBColor;break;case a.OPS.setStrokeGray:A.state.strokeColorSpace=y.ColorSpace.singletons.gray,I=y.ColorSpace.singletons.gray.getRgb(I,0),E=a.OPS.setStrokeRGBColor;break;case a.OPS.setFillCMYKColor:A.state.fillColorSpace=y.ColorSpace.singletons.cmyk,I=y.ColorSpace.singletons.cmyk.getRgb(I,0),E=a.OPS.setFillRGBColor;break;case a.OPS.setStrokeCMYKColor:A.state.strokeColorSpace=y.ColorSpace.singletons.cmyk,I=y.ColorSpace.singletons.cmyk.getRgb(I,0),E=a.OPS.setStrokeRGBColor;break;case a.OPS.setFillRGBColor:A.state.fillColorSpace=y.ColorSpace.singletons.rgb,I=y.ColorSpace.singletons.rgb.getRgb(I,0);break;case a.OPS.setStrokeRGBColor:A.state.strokeColorSpace=y.ColorSpace.singletons.rgb,I=y.ColorSpace.singletons.rgb.getRgb(I,0);break;case a.OPS.setFillColorN:if("Pattern"===(F=A.state.fillColorSpace).name)return void c(d.handleColorN(s,a.OPS.setFillColorN,I,F,x,i,n,b,k));I=F.getRgb(I,0),E=a.OPS.setFillRGBColor;break;case a.OPS.setStrokeColorN:if("Pattern"===(F=A.state.strokeColorSpace).name)return void c(d.handleColorN(s,a.OPS.setStrokeColorN,I,F,x,i,n,b,k));I=F.getRgb(I,0),E=a.OPS.setStrokeRGBColor;break;case a.OPS.shadingFill:var z=i.get("Shading");if(!z)throw new a.FormatError("No shading resource found");var G=z.get(I[0].name);if(!G)throw new a.FormatError("No shading object found");I=[h.Pattern.parseShading(G,null,p,i,d.handler,d._pdfFunctionFactory,b).getIR()],E=a.OPS.shadingFill;break;case a.OPS.setGState:if(_=I[0].name){var W=w.getByName(_);if(W){W.length>0&&s.addOp(a.OPS.setGState,[W]),I=null;continue}}return void c(new Promise(function(e,t){if(!_)throw new a.FormatError("GState must be referred to by name.");var r=i.get("ExtGState");if(!(r instanceof o.Dict))throw new a.FormatError("ExtGState should be a dictionary.");var c=r.get(_);if(!(c instanceof o.Dict))throw new a.FormatError("GState should be a dictionary.");d.setGState({resources:i,gState:c,operatorList:s,cacheKey:_,task:n,stateManager:A,localGStateCache:w,localColorSpaceCache:b}).then(e,t)}).catch(function(e){if(!(e instanceof a.AbortException)){if(d.options.ignoreErrors)return d.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorExtGState}),void(0,a.warn)('getOperatorList - ignoring ExtGState: "'.concat(e,'".'));throw e}}));case a.OPS.moveTo:case a.OPS.lineTo:case a.OPS.curveTo:case a.OPS.curveTo2:case a.OPS.curveTo3:case a.OPS.closePath:case a.OPS.rectangle:d.buildPath(s,E,I,g);continue;case a.OPS.markPoint:case a.OPS.markPointProps:case a.OPS.beginCompat:case a.OPS.endCompat:continue;case a.OPS.beginMarkedContentProps:if(!(0,o.isName)(I[0])){(0,a.warn)("Expected name for beginMarkedContentProps arg0=".concat(I[0]));continue}if("OC"===I[0].name)return void c(d.parseMarkedContentProps(I[1],i).then(function(e){s.addOp(a.OPS.beginMarkedContentProps,["OC",e])}).catch(function(e){if(!(e instanceof a.AbortException)){if(d.options.ignoreErrors)return d.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorMarkedContent}),void(0,a.warn)('getOperatorList - ignoring beginMarkedContentProps: "'.concat(e,'".'));throw e}}));I=[I[0].name,I[1]instanceof o.Dict?I[1].get("MCID"):null];break;case a.OPS.beginMarkedContent:case a.OPS.endMarkedContent:default:if(null!==I){for(l=0,m=I.length;l<m&&!(I[l]instanceof o.Dict);l++);if(l<m){(0,a.warn)("getOperatorList - ignoring operator: "+E);continue}}}s.addOp(E,I)}u?c(L):(T(),t())}).catch(function(e){if(!(e instanceof a.AbortException)){if(t.options.ignoreErrors)return t.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorOperatorList}),(0,a.warn)('getOperatorList - ignoring errors during "'.concat(n.name,'" ')+'task: "'.concat(e,'".')),void T();throw e}})}},{key:"getTextContent",value:function(e){var t=this,r=e.stream,n=e.task,i=e.resources,s=e.stateManager,c=void 0===s?null:s,u=e.normalizeWhitespace,f=void 0!==u&&u,h=e.combineTextItems,d=void 0!==h&&h,p=e.includeMarkedContent,g=void 0!==p&&p,y=e.sink,b=e.seenStyles,w=void 0===b?new Set:b;i=i||o.Dict.empty,c=c||new $(new z);var k,S=/\s/g,x={items:[],styles:Object.create(null)},A={initialized:!1,str:[],totalWidth:0,totalHeight:0,width:0,height:0,vertical:!1,lastCharSize:0,prevTransform:null,textAdvanceScale:0,spaceWidth:0,spaceInFlowMin:0,spaceInFlowMax:0,trackingSpaceMin:1/0,transform:null,fontName:null,hasEOL:!1,isLastCharWhiteSpace:!1},O=.3,C=.3,T=1.3,F=this,_=this.xref,P=[],I=null,E=new m.LocalImageCache,j=new m.LocalGStateCache,R=new W(r,_,c);function M(){var e=k.font,t=[k.fontSize*k.textHScale,0,0,k.fontSize,0,k.textRise];if(e.isType3Font&&k.fontSize<=1&&!(0,a.isArrayEqual)(k.fontMatrix,a.FONT_IDENTITY_MATRIX)){var r=e.bbox[3]-e.bbox[1];r>0&&(t[3]*=r*k.fontMatrix[3])}return a.Util.transform(k.ctm,a.Util.transform(k.textMatrix,t))}function N(){if(A.initialized)return A;var e=k.font,t=e.loadedName;w.has(t)||(w.add(t),x.styles[t]={fontFamily:e.fallbackName,ascent:e.ascent,descent:e.descent,vertical:e.vertical}),A.fontName=t;var r=A.transform=M();e.vertical?(A.width=A.totalWidth=Math.hypot(r[0],r[1]),A.height=A.totalHeight=0,A.vertical=!0):(A.width=A.totalWidth=0,A.height=A.totalHeight=Math.hypot(r[2],r[3]),A.vertical=!1);var n=Math.hypot(k.textLineMatrix[0],k.textLineMatrix[1]),a=Math.hypot(k.ctm[0],k.ctm[1]);A.textAdvanceScale=a*n,A.lastCharSize=A.lastCharSize||0;var i=e.spaceWidth/1e3*k.fontSize;return i?(A.spaceWidth=i,A.trackingSpaceMin=i*O,A.spaceInFlowMin=i*C,A.spaceInFlowMax=i*T):(A.spaceWidth=0,A.trackingSpaceMin=1/0),A.hasEOL=!1,A.initialized=!0,A}function B(){if(A.initialized){var e=Math.hypot(k.textLineMatrix[0],k.textLineMatrix[1]),t=Math.hypot(k.ctm[0],k.ctm[1])*e;t!==A.textAdvanceScale&&(A.vertical?(A.totalHeight+=A.height*A.textAdvanceScale,A.height=0):(A.totalWidth+=A.width*A.textAdvanceScale,A.width=0),A.textAdvanceScale=t)}}function D(e){var t=e.str.join(""),r=(0,v.bidi)(t,-1,e.vertical);return{str:f?function(e){for(var t,r=e.length,n=0;n<r&&(t=e.charCodeAt(n))>=32&&t<=127;)n++;return n<r?e.replace(S," "):e}(r.str):r.str,dir:r.dir,width:e.totalWidth,height:e.totalHeight,transform:e.transform,fontName:e.fontName,hasEOL:e.hasEOL}}function U(e,t){return F.loadFont(e,t,i).then(function(e){k.font=e.font,k.fontMatrix=e.font.fontMatrix||a.FONT_IDENTITY_MATRIX})}function X(e){var t=e.chars,r=e.extraSpacing,n=e.isFirstChunk,a=k.font;if(t){var i=(0,l.getNormalizedUnicodes)(),o=a.charsToGlyphs(t),s=k.fontMatrix[0]*k.fontSize;n&&function(e){if(d&&k.font&&A.prevTransform){var t=M(),r=t[4],n=t[5],a=A.prevTransform[4],i=A.prevTransform[5];if(a!==r||i!==n){var o=(r-a)/A.textAdvanceScale,s=(n-i)/A.textAdvanceScale,c=-.5*A.lastCharSize;if(k.font.vertical){if(Math.abs(o)>A.width/A.textAdvanceScale)return void H();if(c>s)return;s>A.trackingSpaceMin?A.height+=s:G(s,0,A.prevTransform)||(0===A.str.length?(x.items.push({str:" ",dir:"ltr",width:0,height:s,transform:A.prevTransform,fontName:A.fontName,hasEOL:!1}),A.isLastCharWhiteSpace=!0):A.height+=s)}else Math.abs(s)>A.height/A.textAdvanceScale?H():c>o||(o<=A.trackingSpaceMin?A.width+=o:G(o,0,A.prevTransform)||(0===A.str.length?(x.items.push({str:" ",dir:"ltr",width:o,height:0,transform:A.prevTransform,fontName:A.fontName,hasEOL:!1}),A.isLastCharWhiteSpace=!0):A.width+=o))}}}();for(var c=N(),u=0,f=0,h=0,p=o.length;h<p;h++){var g=o[h],m=k.charSpacing+(h===p-1?r:0),v=g.unicode;g.isSpace?(m+=k.wordSpacing,c.isLastCharWhiteSpace=!0):(v=i[v]||v,v=(0,l.reverseIfRtl)(v),c.isLastCharWhiteSpace=!1),c.str.push(v);var y=(a.vertical&&g.vmetric?g.vmetric[0]:g.width)*s;if(a.vertical?(k.translateTextMatrix(0,y),y=Math.abs(y)):(y*=k.textHScale,k.translateTextMatrix(y,0)),u+=y,m){a.vertical||(m*=k.textHScale),y+=m;var b=m>A.trackingSpaceMin&&G(m,u);a.vertical?k.translateTextMatrix(0,m):k.translateTextMatrix(m,0),b?(c=N(),u=0):u+=m}f=y}c.lastCharSize=f,a.vertical?c.height+=u:c.width+=u,c.prevTransform=M()}else{var w=k.charSpacing+r;w&&(a.vertical?k.translateTextMatrix(0,w):k.translateTextMatrix(w*k.textHScale,0))}}function H(){A.initialized?(A.hasEOL=!0,V()):x.items.length>0?x.items[x.items.length-1].hasEOL=!0:x.items.push({str:"",dir:"ltr",width:0,height:0,transform:M(),fontName:k.font.loadedName,hasEOL:!0}),A.isLastCharWhiteSpace=!1,A.lastCharSize=0}function G(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(A.spaceInFlowMin<=e&&e<=A.spaceInFlowMax)return A.initialized&&(A.str.push(" "),A.isLastCharWhiteSpace=!0),!1;var n=A.fontName,a=0;return e*=A.textAdvanceScale,A.vertical?(A.height+=t,a=e,e=0):A.width+=t,V(),!!A.isLastCharWhiteSpace||(A.isLastCharWhiteSpace=!0,x.items.push({str:" ",dir:"ltr",width:e,height:a,transform:r||M(),fontName:n,hasEOL:!1}),!0)}function V(){A.initialized&&A.str&&(A.vertical?A.totalHeight+=A.height*A.textAdvanceScale:A.totalWidth+=A.width*A.textAdvanceScale,x.items.push(D(A)),A.initialized=!1,A.str.length=0)}function K(){var e=x.items.length;e>0&&(y.enqueue(x,e),x.items=[],x.styles=Object.create(null))}var Y=new q;return new Promise(function e(t,r){var s=function(n){K(),Promise.all([n,y.ready]).then(function(){try{e(t,r)}catch(e){r(e)}},r)};n.ensureNotTerminated(),Y.reset();for(var u,l={},h=[];!(u=Y.check())&&(h.length=0,l.args=h,R.read(l));){k=c.state;var p=l.fn;switch(h=l.args,0|p){case a.OPS.setFont:var m=h[0].name,v=h[1];if(k.font&&m===k.fontName&&v===k.fontSize)break;return V(),k.fontName=m,k.fontSize=v,void s(U(m,null));case a.OPS.setTextRise:V(),k.textRise=h[0];break;case a.OPS.setHScale:V(),k.textHScale=h[0]/100;break;case a.OPS.setLeading:V(),k.leading=h[0];break;case a.OPS.moveText:k.translateTextLineMatrix(h[0],h[1]),k.textMatrix=k.textLineMatrix.slice();break;case a.OPS.setLeadingMoveText:V(),k.leading=-h[1],k.translateTextLineMatrix(h[0],h[1]),k.textMatrix=k.textLineMatrix.slice();break;case a.OPS.nextLine:H(),k.carriageReturn();break;case a.OPS.setTextMatrix:k.setTextMatrix(h[0],h[1],h[2],h[3],h[4],h[5]),k.setTextLineMatrix(h[0],h[1],h[2],h[3],h[4],h[5]),B();break;case a.OPS.setCharSpacing:k.charSpacing=h[0];break;case a.OPS.setWordSpacing:k.wordSpacing=h[0];break;case a.OPS.beginText:V(),k.textMatrix=a.IDENTITY_MATRIX.slice(),k.textLineMatrix=a.IDENTITY_MATRIX.slice();break;case a.OPS.showSpacedText:if(!c.state.font){F.ensureStateFont(c.state);continue}for(var b=(k.font.vertical?1:-1)*k.fontSize/1e3,S=h[0],O=!0,C=0,T=S.length;C<T-1;C++){var M=S[C];if("string"==typeof M)P.push(M);else if("number"==typeof M&&0!==M){var N=P.join("");P.length=0,X({chars:N,extraSpacing:M*b,isFirstChunk:O}),N&&O&&(O=!1)}}var D=S[S.length-1];if("string"==typeof D&&P.push(D),P.length>0){var q=P.join("");P.length=0,X({chars:q,extraSpacing:0,isFirstChunk:O})}break;case a.OPS.showText:if(!c.state.font){F.ensureStateFont(c.state);continue}X({chars:h[0],extraSpacing:0,isFirstChunk:!0});break;case a.OPS.nextLineShowText:if(!c.state.font){F.ensureStateFont(c.state);continue}A.hasEOL=!0,V(),k.carriageReturn(),X({chars:h[0],extraSpacing:0,isFirstChunk:!0});break;case a.OPS.nextLineSetSpacingShowText:if(!c.state.font){F.ensureStateFont(c.state);continue}A.hasEOL=!0,V(),k.wordSpacing=h[0],k.charSpacing=h[1],k.carriageReturn(),X({chars:h[2],extraSpacing:0,isFirstChunk:!0});break;case a.OPS.paintXObject:V(),I||(I=i.get("XObject")||o.Dict.empty);var z=h[0].name;if(z&&E.getByName(z))break;return void s(new Promise(function(e,t){if(!z)throw new a.FormatError("XObject must be referred to by name.");var r=I.getRaw(z);if(r instanceof o.Ref){if(E.getByRef(r))return void e();if(F.globalImageCache.getData(r,F.pageIndex))return void e();r=_.fetch(r)}if(!(0,o.isStream)(r))throw new a.FormatError("XObject should be a stream");var s=r.dict.get("Subtype");if(!(0,o.isName)(s))throw new a.FormatError("XObject should have a Name subtype");if("Form"!==s.name)return E.set(z,r.dict.objId,!0),void e();var u=c.state.clone(),l=new $(u),h=r.dict.getArray("Matrix");Array.isArray(h)&&6===h.length&&l.transform(h),K();var p={enqueueInvoked:!1,enqueue:function(e,t){this.enqueueInvoked=!0,y.enqueue(e,t)},get desiredSize(){return y.desiredSize},get ready(){return y.ready}};F.getTextContent({stream:r,task:n,resources:r.dict.get("Resources")||i,stateManager:l,normalizeWhitespace:f,combineTextItems:d,includeMarkedContent:g,sink:p,seenStyles:w}).then(function(){p.enqueueInvoked||E.set(z,r.dict.objId,!0),e()},t)}).catch(function(e){if(!(e instanceof a.AbortException)){if(!F.options.ignoreErrors)throw e;(0,a.warn)('getTextContent - ignoring XObject: "'.concat(e,'".'))}}));case a.OPS.setGState:if((z=h[0].name)&&j.getByName(z))break;return void s(new Promise(function(e,t){if(!z)throw new a.FormatError("GState must be referred to by name.");var r=i.get("ExtGState");if(!(r instanceof o.Dict))throw new a.FormatError("ExtGState should be a dictionary.");var n=r.get(z);if(!(n instanceof o.Dict))throw new a.FormatError("GState should be a dictionary.");var s=n.get("Font");if(!s)return j.set(z,n.objId,!0),void e();V(),k.fontName=null,k.fontSize=s[1],U(null,s[0]).then(e,t)}).catch(function(e){if(!(e instanceof a.AbortException)){if(!F.options.ignoreErrors)throw e;(0,a.warn)('getTextContent - ignoring ExtGState: "'.concat(e,'".'))}}));case a.OPS.beginMarkedContent:g&&x.items.push({type:"beginMarkedContent",tag:(0,o.isName)(h[0])?h[0].name:null});break;case a.OPS.beginMarkedContentProps:if(g){V();var G=null;(0,o.isDict)(h[1])&&(G=h[1].get("MCID")),x.items.push({type:"beginMarkedContentProps",id:Number.isInteger(G)?"".concat(F.idFactory.getPageObjId(),"_mcid").concat(G):null,tag:(0,o.isName)(h[0])?h[0].name:null})}break;case a.OPS.endMarkedContent:g&&(V(),x.items.push({type:"endMarkedContent"}))}if(x.items.length>=y.desiredSize){u=!0;break}}u?s(L):(V(),K(),t())}).catch(function(e){if(!(e instanceof a.AbortException)){if(t.options.ignoreErrors)return(0,a.warn)('getTextContent - ignoring errors during "'.concat(n.name,'" ')+'task: "'.concat(e,'".')),V(),void K();throw e}})}},{key:"extractDataStructures",value:function(e,t,r){var n,i=this,s=this.xref,l=this.readToUnicode(r.toUnicode||e.get("ToUnicode")||t.get("ToUnicode"));if(r.composite){var f=e.get("CIDSystemInfo");(0,o.isDict)(f)&&(r.cidSystemInfo={registry:(0,a.stringToPDFString)(f.get("Registry")),ordering:(0,a.stringToPDFString)(f.get("Ordering")),supplement:f.get("Supplement")});var h=e.get("CIDToGIDMap");(0,o.isStream)(h)&&(n=h.getBytes())}var d,p=[],g=null;if(e.has("Encoding")){if(d=e.get("Encoding"),(0,o.isDict)(d)){if(g=d.get("BaseEncoding"),g=(0,o.isName)(g)?g.name:null,d.has("Differences"))for(var m=d.get("Differences"),v=0,y=0,b=m.length;y<b;y++){var w=s.fetchIfRef(m[y]);if((0,a.isNum)(w))v=w;else{if(!(0,o.isName)(w))throw new a.FormatError("Invalid entry in 'Differences' array: ".concat(w));p[v++]=w.name}}}else{if(!(0,o.isName)(d))throw new a.FormatError("Encoding is not a Name nor a Dict");g=d.name}"MacRomanEncoding"!==g&&"MacExpertEncoding"!==g&&"WinAnsiEncoding"!==g&&(g=null)}if(g)r.defaultEncoding=(0,u.getEncoding)(g);else{var k=!!(r.flags&c.FontFlags.Symbolic),S=!!(r.flags&c.FontFlags.Nonsymbolic);d=u.StandardEncoding,"TrueType"!==r.type||S||(d=u.WinAnsiEncoding),k&&(d=u.MacRomanEncoding,r.file||(/Symbol/i.test(r.name)?d=u.SymbolSetEncoding:/Dingbats|Wingdings/i.test(r.name)&&(d=u.ZapfDingbatsEncoding))),r.defaultEncoding=d}return r.differences=p,r.baseEncodingName=g,r.hasEncoding=!!g||p.length>0,r.dict=e,l.then(function(e){return r.toUnicode=e,i.buildToUnicode(r)}).then(function(e){return r.toUnicode=e,n&&(r.cidToGidMap=i.readCidToGidMap(n,e)),r})}},{key:"_buildSimpleFontToUnicode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,a.assert)(!e.composite,"Must be a simple font.");var r=[],n=e.defaultEncoding.slice(),i=e.baseEncodingName,o=e.differences;for(var s in o){var c=o[s];".notdef"!==c&&(n[s]=c)}var f=(0,w.getGlyphsUnicode)();for(var h in n){var p=n[h];if(""!==p)if(void 0!==f[p])r[h]=String.fromCharCode(f[p]);else{var g=0;switch(p[0]){case"G":3===p.length&&(g=parseInt(p.substring(1),16));break;case"g":5===p.length&&(g=parseInt(p.substring(1),16));break;case"C":case"c":if(p.length>=3&&p.length<=4){var m=p.substring(1);if(t){g=parseInt(m,16);break}if(g=+m,Number.isNaN(g)&&Number.isInteger(parseInt(m,16)))return this._buildSimpleFontToUnicode(e,!0)}break;default:var v=(0,l.getUnicodeForGlyph)(p,f);-1!==v&&(g=v)}if(g>0&&g<=1114111&&Number.isInteger(g)){if(i&&g===+h){var y=(0,u.getEncoding)(i);if(y&&(p=y[h])){r[h]=String.fromCharCode(f[p]);continue}}r[h]=String.fromCodePoint(g)}}}return new d.ToUnicodeMap(r)}},{key:"buildToUnicode",value:function(e){if(e.hasIncludedToUnicodeMap=!!e.toUnicode&&e.toUnicode.length>0,e.hasIncludedToUnicodeMap)return!e.composite&&e.hasEncoding&&(e.fallbackToUnicode=this._buildSimpleFontToUnicode(e)),Promise.resolve(e.toUnicode);if(!e.composite)return Promise.resolve(this._buildSimpleFontToUnicode(e));if(e.composite&&(e.cMap.builtInCMap&&!(e.cMap instanceof i.IdentityCMap)||"Adobe"===e.cidSystemInfo.registry&&("GB1"===e.cidSystemInfo.ordering||"CNS1"===e.cidSystemInfo.ordering||"Japan1"===e.cidSystemInfo.ordering||"Korea1"===e.cidSystemInfo.ordering))){var t=e.cidSystemInfo.registry,r=e.cidSystemInfo.ordering,n=o.Name.get(t+"-"+r+"-UCS2");return i.CMapFactory.create({encoding:n,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}).then(function(t){var r=e.cMap,n=[];return r.forEach(function(e,r){if(r>65535)throw new a.FormatError("Max size of CID is 65,535");var i=t.lookup(r);i&&(n[e]=String.fromCharCode((i.charCodeAt(0)<<8)+i.charCodeAt(1)))}),new d.ToUnicodeMap(n)})}return Promise.resolve(new d.IdentityToUnicodeMap(e.firstChar,e.lastChar))}},{key:"readToUnicode",value:function(e){var t=this;return e?(0,o.isName)(e)?i.CMapFactory.create({encoding:e,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}).then(function(e){return e instanceof i.IdentityCMap?new d.IdentityToUnicodeMap(0,65535):new d.ToUnicodeMap(e.getMap())}):(0,o.isStream)(e)?i.CMapFactory.create({encoding:e,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}).then(function(e){if(e instanceof i.IdentityCMap)return new d.IdentityToUnicodeMap(0,65535);var t=new Array(e.length);return e.forEach(function(e,r){for(var n=[],a=0;a<r.length;a+=2){var i=r.charCodeAt(a)<<8|r.charCodeAt(a+1);if(55296==(63488&i)){a+=2;var o=r.charCodeAt(a)<<8|r.charCodeAt(a+1);n.push(((1023&i)<<10)+(1023&o)+65536)}else n.push(i)}t[e]=String.fromCodePoint.apply(String,n)}),new d.ToUnicodeMap(t)},function(e){if(e instanceof a.AbortException)return null;if(t.options.ignoreErrors)return t.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorFontToUnicode}),(0,a.warn)('readToUnicode - ignoring ToUnicode data: "'.concat(e,'".')),null;throw e}):Promise.resolve(null):Promise.resolve(null)}},{key:"readCidToGidMap",value:function(e,t){for(var r=[],n=0,a=e.length;n<a;n++){var i=e[n++]<<8|e[n],o=n>>1;(0!==i||t.has(o))&&(r[o]=i)}return r}},{key:"extractWidths",value:function(e,t,r){var n,a,i,s,u,l,f,h,d=this.xref,p=[],g=0,m=[];if(r.composite){if(g=e.has("DW")?e.get("DW"):1e3,h=e.get("W"))for(a=0,i=h.length;a<i;a++)if(l=d.fetchIfRef(h[a++]),f=d.fetchIfRef(h[a]),Array.isArray(f))for(s=0,u=f.length;s<u;s++)p[l++]=d.fetchIfRef(f[s]);else{var v=d.fetchIfRef(h[++a]);for(s=l;s<=f;s++)p[s]=v}if(r.vertical){var y=e.getArray("DW2")||[880,-1e3];if(n=[y[1],.5*g,y[0]],y=e.get("W2"))for(a=0,i=y.length;a<i;a++)if(l=d.fetchIfRef(y[a++]),f=d.fetchIfRef(y[a]),Array.isArray(f))for(s=0,u=f.length;s<u;s++)m[l++]=[d.fetchIfRef(f[s++]),d.fetchIfRef(f[s++]),d.fetchIfRef(f[s])];else{var b=[d.fetchIfRef(y[++a]),d.fetchIfRef(y[++a]),d.fetchIfRef(y[++a])];for(s=l;s<=f;s++)m[s]=b}}}else{var w=r.firstChar;if(h=e.get("Widths")){for(s=w,a=0,i=h.length;a<i;a++)p[s++]=d.fetchIfRef(h[a]);g=parseFloat(t.get("MissingWidth"))||0}else{var k=e.get("BaseFont");if((0,o.isName)(k)){var S=this.getBaseFontMetrics(k.name);p=this.buildCharCodeToWidth(S.widths,r),g=S.defaultWidth}}}var x=!0,A=g;for(var O in p){var C=p[O];if(C)if(A){if(A!==C){x=!1;break}}else A=C}x&&(r.flags|=c.FontFlags.FixedPitch),r.defaultWidth=g,r.widths=p,r.defaultVMetrics=n,r.vmetrics=m}},{key:"isSerifFont",value:function(e){var t=e.split("-")[0];return t in(0,f.getSerifFonts)()||-1!==t.search(/serif/gi)}},{key:"getBaseFontMetrics",value:function(e){var t=0,r=Object.create(null),n=!1,i=(0,f.getStdFontMap)()[e]||e,o=(0,S.getMetrics)();i in o||(i=this.isSerifFont(e)?"Times-Roman":"Helvetica");var s=o[i];return(0,a.isNum)(s)?(t=s,n=!0):r=s(),{defaultWidth:t,monospace:n,widths:r}}},{key:"buildCharCodeToWidth",value:function(e,t){for(var r=Object.create(null),n=t.differences,a=t.defaultEncoding,i=0;i<256;i++)i in n&&e[n[i]]?r[i]=e[n[i]]:i in a&&e[a[i]]&&(r[i]=e[a[i]]);return r}},{key:"preEvaluateFont",value:function(e){var t=e,r=e.get("Subtype");if(!(0,o.isName)(r))throw new a.FormatError("invalid font Subtype");var n,i,s=!1;if("Type0"===r.name){var c=e.get("DescendantFonts");if(!c)throw new a.FormatError("Descendant fonts are not specified");if(!((e=Array.isArray(c)?this.xref.fetchIfRef(c[0]):c)instanceof o.Dict))throw new a.FormatError("Descendant font is not a dictionary.");if(r=e.get("Subtype"),!(0,o.isName)(r))throw new a.FormatError("invalid font Subtype");s=!0}var u=e.get("FirstChar")||0,l=e.get("LastChar")||(s?65535:255),f=e.get("FontDescriptor");if(f){n=new x.MurmurHash3_64;var h=t.getRaw("Encoding");if((0,o.isName)(h))n.update(h.name);else if((0,o.isRef)(h))n.update(h.toString());else if((0,o.isDict)(h)){var d,p=P(h.getRawValues());try{for(p.s();!(d=p.n()).done;){var g=d.value;if((0,o.isName)(g))n.update(g.name);else if((0,o.isRef)(g))n.update(g.toString());else if(Array.isArray(g)){for(var m=g.length,v=new Array(m),y=0;y<m;y++){var b=g[y];(0,o.isName)(b)?v[y]=b.name:((0,a.isNum)(b)||(0,o.isRef)(b))&&(v[y]=b.toString())}n.update(v.join())}}}catch(e){p.e(e)}finally{p.f()}}if(n.update("".concat(u,"-").concat(l)),i=e.get("ToUnicode")||t.get("ToUnicode"),(0,o.isStream)(i)){var w=i.str||i,k=w.buffer?new Uint8Array(w.buffer.buffer,0,w.bufferLength):new Uint8Array(w.bytes.buffer,w.start,w.end-w.start);n.update(k)}else(0,o.isName)(i)&&n.update(i.name);var S=e.get("Widths")||t.get("Widths");if(Array.isArray(S)){var A,O=[],C=P(S);try{for(C.s();!(A=C.n()).done;){var T=A.value;((0,a.isNum)(T)||(0,o.isRef)(T))&&O.push(T.toString())}}catch(e){C.e(e)}finally{C.f()}n.update(O.join())}if(s){n.update("compositeFont");var F=e.get("W")||t.get("W");if(Array.isArray(F)){var _,I=[],E=P(F);try{for(E.s();!(_=E.n()).done;){var j=_.value;if((0,a.isNum)(j)||(0,o.isRef)(j))I.push(j.toString());else if(Array.isArray(j)){var R,M=[],N=P(j);try{for(N.s();!(R=N.n()).done;){var B=R.value;((0,a.isNum)(B)||(0,o.isRef)(B))&&M.push(B.toString())}}catch(e){N.e(e)}finally{N.f()}I.push("[".concat(M.join(),"]"))}}}catch(e){E.e(e)}finally{E.f()}n.update(I.join())}}}return{descriptor:f,dict:e,baseDict:t,composite:s,type:r.name,firstChar:u,lastChar:l,toUnicode:i,hash:n?n.hexdigest():""}}},{key:"translateFont",value:function(){var e=_(n.default.mark(function e(t){var r,u,l,h,d,p,g,m,v,y,b,w,k,S,x,O,C,T,F,_,P,I,E,j,R,M,N,B,D=this;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.descriptor,u=t.dict,l=t.baseDict,h=t.composite,d=t.type,p=t.firstChar,g=t.lastChar,m=t.toUnicode,v=t.cssFontInfo,y="Type3"===d,r){e.next=19;break}if(!y){e.next=9;break}(r=new o.Dict(null)).set("FontName",o.Name.get(d)),r.set("FontBBox",u.getArray("FontBBox")||[0,0,0,0]),e.next=19;break;case 9:if(w=u.get("BaseFont"),(0,o.isName)(w)){e.next=12;break}throw new a.FormatError("Base font is not specified");case 12:return w=w.name.replace(/[,_]/g,"-"),k=this.getBaseFontMetrics(w),S=w.split("-")[0],x=(this.isSerifFont(S)?c.FontFlags.Serif:0)|(k.monospace?c.FontFlags.FixedPitch:0)|((0,f.getSymbolsFonts)()[S]?c.FontFlags.Symbolic:c.FontFlags.Nonsymbolic),b={type:d,name:w,widths:k.widths,defaultWidth:k.defaultWidth,flags:x,firstChar:p,lastChar:g,toUnicode:m,isType3Font:y},O=u.get("Widths"),e.abrupt("return",this.extractDataStructures(u,u,b).then(function(e){if(O){for(var t=[],r=p,n=0,a=O.length;n<a;n++)t[r++]=D.xref.fetchIfRef(O[n]);e.widths=t}else e.widths=D.buildCharCodeToWidth(k.widths,e);return new s.Font(w,null,e)}));case 19:if(C=r.get("FontName"),T=u.get("BaseFont"),(0,a.isString)(C)&&(C=o.Name.get(C)),(0,a.isString)(T)&&(T=o.Name.get(T)),y||(F=C&&C.name,_=T&&T.name,F!==_&&((0,a.info)("The FontDescriptor's FontName is \"".concat(F,'" but ')+"should be the same as the Font's BaseFont \"".concat(_,'".')),F&&_&&_.startsWith(F)&&(C=T))),C=C||T,(0,o.isName)(C)){e.next=27;break}throw new a.FormatError("invalid font name");case 27:e.prev=27,P=r.get("FontFile","FontFile2","FontFile3"),e.next=37;break;case 31:if(e.prev=31,e.t0=e.catch(27),this.options.ignoreErrors){e.next=35;break}throw e.t0;case 35:(0,a.warn)('translateFont - fetching "'.concat(C.name,'" font file: "').concat(e.t0,'".')),P=new A.NullStream;case 37:if(P&&P.dict&&((M=P.dict.get("Subtype"))instanceof o.Name&&(I=M.name),E=P.dict.get("Length1"),j=P.dict.get("Length2"),R=P.dict.get("Length3")),b={type:d,name:C.name,subtype:I,file:P,length1:E,length2:j,length3:R,loadedName:l.loadedName,composite:h,fixedPitch:!1,fontMatrix:u.getArray("FontMatrix")||a.FONT_IDENTITY_MATRIX,firstChar:p,lastChar:g,toUnicode:m,bbox:r.getArray("FontBBox"),ascent:r.get("Ascent"),descent:r.get("Descent"),xHeight:r.get("XHeight"),capHeight:r.get("CapHeight"),flags:r.get("Flags"),italicAngle:r.get("ItalicAngle"),isType3Font:y,cssFontInfo:v},!h){e.next=47;break}return N=l.get("Encoding"),(0,o.isName)(N)&&(b.cidEncoding=N.name),e.next=44,i.CMapFactory.create({encoding:N,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});case 44:B=e.sent,b.cMap=B,b.vertical=b.cMap.vertical;case 47:return e.abrupt("return",this.extractDataStructures(u,l,b).then(function(e){return D.extractWidths(u,r,e),new s.Font(C.name,P,e)}));case 48:case"end":return e.stop()}},e,this,[[27,31]])}));return function(t){return e.apply(this,arguments)}}()}],[{key:"buildFontPaths",value:function(e,t,r,n){function i(t){var i="".concat(e.loadedName,"_path_").concat(t);try{if(e.renderer.hasBuiltPath(t))return;r.send("commonobj",[i,"FontPath",e.renderer.getPathJs(t)])}catch(e){if(n.ignoreErrors)return r.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorFontBuildPath}),void(0,a.warn)("buildFontPaths - ignoring ".concat(i,' glyph: "').concat(e,'".'));throw e}}var o,s=P(t);try{for(s.s();!(o=s.n()).done;){var c=o.value;i(c.fontChar);var u=c.accent;u&&u.fontChar&&i(u.fontChar)}}catch(e){s.e(e)}finally{s.f()}}},{key:"fallbackFontDict",get:function(){var e=new o.Dict;return e.set("BaseFont",o.Name.get("PDFJS-FallbackFont")),e.set("Type",o.Name.get("FallbackType")),e.set("Subtype",o.Name.get("FallbackType")),e.set("Encoding",o.Name.get("WinAnsiEncoding")),(0,a.shadow)(this,"fallbackFontDict",e)}}]),e}();t.PartialEvaluator=X;var H=function(){function e(t){var r=t.loadedName,n=t.font,a=t.dict,i=t.evaluatorOptions;j(this,e),this.loadedName=r,this.font=n,this.dict=a,this._evaluatorOptions=i||N,this.type3Loaded=null,this.type3Dependencies=n.isType3Font?new Set:null,this.sent=!1}return M(e,[{key:"send",value:function(e){this.sent||(this.sent=!0,e.send("commonobj",[this.loadedName,"Font",this.font.exportData(this._evaluatorOptions.fontExtraProperties)]))}},{key:"fallback",value:function(e){this.font.data&&(this.font.disableFontFace=!0,X.buildFontPaths(this.font,this.font.glyphCacheValues,e,this._evaluatorOptions))}},{key:"loadType3Data",value:function(e,t,r){var n=this;if(this.type3Loaded)return this.type3Loaded;if(!this.font.isType3Font)throw new Error("Must be a Type3 font.");var i=Object.create(e.options);i.ignoreErrors=!1;var o=e.clone(i);o.parsingType3Font=!0;var s,c=this.font,u=this.type3Dependencies,l=Promise.resolve(),f=this.dict.get("CharProcs"),h=this.dict.get("Resources")||t,d=Object.create(null),p=P(f.getKeys());try{var g=function(){var e=s.value;l=l.then(function(){var t=f.get(e),i=new O.OperatorList;return o.getOperatorList({stream:t,task:r,resources:h,operatorList:i}).then(function(){i.fnArray[0]===a.OPS.setCharWidthAndBounds&&n._removeType3ColorOperators(i),d[e]=i.getIR();var t,r=P(i.dependencies);try{for(r.s();!(t=r.n()).done;){var o=t.value;u.add(o)}}catch(e){r.e(e)}finally{r.f()}}).catch(function(t){(0,a.warn)('Type3 font resource "'.concat(e,'" is not available.'));var r=new O.OperatorList;d[e]=r.getIR()})})};for(p.s();!(s=p.n()).done;)g()}catch(e){p.e(e)}finally{p.f()}return this.type3Loaded=l.then(function(){c.charProcOperatorList=d}),this.type3Loaded}},{key:"_removeType3ColorOperators",value:function(e){for(var t=1,r=e.length;t<r;){switch(e.fnArray[t]){case a.OPS.setStrokeColorSpace:case a.OPS.setFillColorSpace:case a.OPS.setStrokeColor:case a.OPS.setStrokeColorN:case a.OPS.setFillColor:case a.OPS.setFillColorN:case a.OPS.setStrokeGray:case a.OPS.setFillGray:case a.OPS.setStrokeRGBColor:case a.OPS.setFillRGBColor:case a.OPS.setStrokeCMYKColor:case a.OPS.setFillCMYKColor:case a.OPS.shadingFill:case a.OPS.setRenderingIntent:e.fnArray.splice(t,1),e.argsArray.splice(t,1),r--;continue;case a.OPS.setGState:for(var n=T(e.argsArray[t],1)[0],i=0,o=n.length;i<o;){switch(T(n[i],1)[0]){case"TR":case"TR2":case"HT":case"BG":case"BG2":case"UCR":case"UCR2":n.splice(i,1),o--;continue}i++}}t++}}}]),e}(),$=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new G;j(this,e),this.state=t,this.stateStack=[]}return M(e,[{key:"save",value:function(){var e=this.state;this.stateStack.push(this.state),this.state=e.clone()}},{key:"restore",value:function(){var e=this.stateStack.pop();e&&(this.state=e)}},{key:"transform",value:function(e){this.state.ctm=a.Util.transform(this.state.ctm,e)}}]),e}(),z=function(){function e(){j(this,e),this.ctm=new Float32Array(a.IDENTITY_MATRIX),this.fontName=null,this.fontSize=0,this.font=null,this.fontMatrix=a.FONT_IDENTITY_MATRIX,this.textMatrix=a.IDENTITY_MATRIX.slice(),this.textLineMatrix=a.IDENTITY_MATRIX.slice(),this.charSpacing=0,this.wordSpacing=0,this.leading=0,this.textHScale=1,this.textRise=0}return M(e,[{key:"setTextMatrix",value:function(e,t,r,n,a,i){var o=this.textMatrix;o[0]=e,o[1]=t,o[2]=r,o[3]=n,o[4]=a,o[5]=i}},{key:"setTextLineMatrix",value:function(e,t,r,n,a,i){var o=this.textLineMatrix;o[0]=e,o[1]=t,o[2]=r,o[3]=n,o[4]=a,o[5]=i}},{key:"translateTextMatrix",value:function(e,t){var r=this.textMatrix;r[4]=r[0]*e+r[2]*t+r[4],r[5]=r[1]*e+r[3]*t+r[5]}},{key:"translateTextLineMatrix",value:function(e,t){var r=this.textLineMatrix;r[4]=r[0]*e+r[2]*t+r[4],r[5]=r[1]*e+r[3]*t+r[5]}},{key:"carriageReturn",value:function(){this.translateTextLineMatrix(0,-this.leading),this.textMatrix=this.textLineMatrix.slice()}},{key:"clone",value:function(){var e=Object.create(this);return e.textMatrix=this.textMatrix.slice(),e.textLineMatrix=this.textLineMatrix.slice(),e.fontMatrix=this.fontMatrix.slice(),e}}]),e}(),G=function(){function e(){j(this,e),this.ctm=new Float32Array(a.IDENTITY_MATRIX),this.font=null,this.textRenderingMode=a.TextRenderingMode.FILL,this.fillColorSpace=y.ColorSpace.singletons.gray,this.strokeColorSpace=y.ColorSpace.singletons.gray}return M(e,[{key:"clone",value:function(){return Object.create(this)}}]),e}(),W=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new $;j(this,e),this.parser=new g.Parser({lexer:new g.Lexer(t,e.opMap),xref:r}),this.stateManager=n,this.nonProcessedArgs=[],this._numInvalidPathOPS=0}return M(e,[{key:"savedStatesDepth",get:function(){return this.stateManager.stateStack.length}},{key:"read",value:function(t){for(var r=t.args;;){var n=this.parser.getObj();if(n instanceof o.Cmd){var i=n.cmd,s=e.opMap[i];if(!s){(0,a.warn)('Unknown command "'.concat(i,'".'));continue}var c=s.id,u=s.numArgs,l=null!==r?r.length:0;if(s.variableArgs)l>u&&(0,a.info)("Command ".concat(i,": expected [0, ").concat(u,"] args, ")+"but received ".concat(l," args."));else{if(l!==u){for(var f=this.nonProcessedArgs;l>u;)f.push(r.shift()),l--;for(;l<u&&0!==f.length;)null===r&&(r=[]),r.unshift(f.pop()),l++}if(l<u){var h="command ".concat(i,": expected ").concat(u," args, ")+"but received ".concat(l," args.");if(c>=a.OPS.moveTo&&c<=a.OPS.endPath&&++this._numInvalidPathOPS>e.MAX_INVALID_PATH_OPS)throw new a.FormatError("Invalid ".concat(h));(0,a.warn)("Skipping ".concat(h)),null!==r&&(r.length=0);continue}}return this.preprocessCommand(c,r),t.fn=c,t.args=r,!0}if(n===o.EOF)return!1;if(null!==n&&(null===r&&(r=[]),r.push(n),r.length>33))throw new a.FormatError("Too many arguments")}}},{key:"preprocessCommand",value:function(e,t){switch(0|e){case a.OPS.save:this.stateManager.save();break;case a.OPS.restore:this.stateManager.restore();break;case a.OPS.transform:this.stateManager.transform(t)}}}],[{key:"opMap",get:function(){var e=(0,k.getLookupTableFactory)(function(e){e.w={id:a.OPS.setLineWidth,numArgs:1,variableArgs:!1},e.J={id:a.OPS.setLineCap,numArgs:1,variableArgs:!1},e.j={id:a.OPS.setLineJoin,numArgs:1,variableArgs:!1},e.M={id:a.OPS.setMiterLimit,numArgs:1,variableArgs:!1},e.d={id:a.OPS.setDash,numArgs:2,variableArgs:!1},e.ri={id:a.OPS.setRenderingIntent,numArgs:1,variableArgs:!1},e.i={id:a.OPS.setFlatness,numArgs:1,variableArgs:!1},e.gs={id:a.OPS.setGState,numArgs:1,variableArgs:!1},e.q={id:a.OPS.save,numArgs:0,variableArgs:!1},e.Q={id:a.OPS.restore,numArgs:0,variableArgs:!1},e.cm={id:a.OPS.transform,numArgs:6,variableArgs:!1},e.m={id:a.OPS.moveTo,numArgs:2,variableArgs:!1},e.l={id:a.OPS.lineTo,numArgs:2,variableArgs:!1},e.c={id:a.OPS.curveTo,numArgs:6,variableArgs:!1},e.v={id:a.OPS.curveTo2,numArgs:4,variableArgs:!1},e.y={id:a.OPS.curveTo3,numArgs:4,variableArgs:!1},e.h={id:a.OPS.closePath,numArgs:0,variableArgs:!1},e.re={id:a.OPS.rectangle,numArgs:4,variableArgs:!1},e.S={id:a.OPS.stroke,numArgs:0,variableArgs:!1},e.s={id:a.OPS.closeStroke,numArgs:0,variableArgs:!1},e.f={id:a.OPS.fill,numArgs:0,variableArgs:!1},e.F={id:a.OPS.fill,numArgs:0,variableArgs:!1},e["f*"]={id:a.OPS.eoFill,numArgs:0,variableArgs:!1},e.B={id:a.OPS.fillStroke,numArgs:0,variableArgs:!1},e["B*"]={id:a.OPS.eoFillStroke,numArgs:0,variableArgs:!1},e.b={id:a.OPS.closeFillStroke,numArgs:0,variableArgs:!1},e["b*"]={id:a.OPS.closeEOFillStroke,numArgs:0,variableArgs:!1},e.n={id:a.OPS.endPath,numArgs:0,variableArgs:!1},e.W={id:a.OPS.clip,numArgs:0,variableArgs:!1},e["W*"]={id:a.OPS.eoClip,numArgs:0,variableArgs:!1},e.BT={id:a.OPS.beginText,numArgs:0,variableArgs:!1},e.ET={id:a.OPS.endText,numArgs:0,variableArgs:!1},e.Tc={id:a.OPS.setCharSpacing,numArgs:1,variableArgs:!1},e.Tw={id:a.OPS.setWordSpacing,numArgs:1,variableArgs:!1},e.Tz={id:a.OPS.setHScale,numArgs:1,variableArgs:!1},e.TL={id:a.OPS.setLeading,numArgs:1,variableArgs:!1},e.Tf={id:a.OPS.setFont,numArgs:2,variableArgs:!1},e.Tr={id:a.OPS.setTextRenderingMode,numArgs:1,variableArgs:!1},e.Ts={id:a.OPS.setTextRise,numArgs:1,variableArgs:!1},e.Td={id:a.OPS.moveText,numArgs:2,variableArgs:!1},e.TD={id:a.OPS.setLeadingMoveText,numArgs:2,variableArgs:!1},e.Tm={id:a.OPS.setTextMatrix,numArgs:6,variableArgs:!1},e["T*"]={id:a.OPS.nextLine,numArgs:0,variableArgs:!1},e.Tj={id:a.OPS.showText,numArgs:1,variableArgs:!1},e.TJ={id:a.OPS.showSpacedText,numArgs:1,variableArgs:!1},e["'"]={id:a.OPS.nextLineShowText,numArgs:1,variableArgs:!1},e['"']={id:a.OPS.nextLineSetSpacingShowText,numArgs:3,variableArgs:!1},e.d0={id:a.OPS.setCharWidth,numArgs:2,variableArgs:!1},e.d1={id:a.OPS.setCharWidthAndBounds,numArgs:6,variableArgs:!1},e.CS={id:a.OPS.setStrokeColorSpace,numArgs:1,variableArgs:!1},e.cs={id:a.OPS.setFillColorSpace,numArgs:1,variableArgs:!1},e.SC={id:a.OPS.setStrokeColor,numArgs:4,variableArgs:!0},e.SCN={id:a.OPS.setStrokeColorN,numArgs:33,variableArgs:!0},e.sc={id:a.OPS.setFillColor,numArgs:4,variableArgs:!0},e.scn={id:a.OPS.setFillColorN,numArgs:33,variableArgs:!0},e.G={id:a.OPS.setStrokeGray,numArgs:1,variableArgs:!1},e.g={id:a.OPS.setFillGray,numArgs:1,variableArgs:!1},e.RG={id:a.OPS.setStrokeRGBColor,numArgs:3,variableArgs:!1},e.rg={id:a.OPS.setFillRGBColor,numArgs:3,variableArgs:!1},e.K={id:a.OPS.setStrokeCMYKColor,numArgs:4,variableArgs:!1},e.k={id:a.OPS.setFillCMYKColor,numArgs:4,variableArgs:!1},e.sh={id:a.OPS.shadingFill,numArgs:1,variableArgs:!1},e.BI={id:a.OPS.beginInlineImage,numArgs:0,variableArgs:!1},e.ID={id:a.OPS.beginImageData,numArgs:0,variableArgs:!1},e.EI={id:a.OPS.endInlineImage,numArgs:1,variableArgs:!1},e.Do={id:a.OPS.paintXObject,numArgs:1,variableArgs:!1},e.MP={id:a.OPS.markPoint,numArgs:1,variableArgs:!1},e.DP={id:a.OPS.markPointProps,numArgs:2,variableArgs:!1},e.BMC={id:a.OPS.beginMarkedContent,numArgs:1,variableArgs:!1},e.BDC={id:a.OPS.beginMarkedContentProps,numArgs:2,variableArgs:!1},e.EMC={id:a.OPS.endMarkedContent,numArgs:0,variableArgs:!1},e.BX={id:a.OPS.beginCompat,numArgs:0,variableArgs:!1},e.EX={id:a.OPS.endCompat,numArgs:0,variableArgs:!1},e.BM=null,e.BD=null,e.true=null,e.fa=null,e.fal=null,e.fals=null,e.false=null,e.nu=null,e.nul=null,e.null=null});return(0,a.shadow)(this,"opMap",e())}},{key:"MAX_INVALID_PATH_OPS",get:function(){return(0,a.shadow)(this,"MAX_INVALID_PATH_OPS",20)}}]),e}();t.EvaluatorPreprocessor=W},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityCMap=t.CMapFactory=t.CMap=void 0;var a=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),i=r(4),o=r(113),s=r(125),c=r(117),u=r(118);function l(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function f(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(e){l(i,n,a,o,s,"next",e)}function s(e){l(i,n,a,o,s,"throw",e)}o(void 0)})}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=p(e);if(t){var i=p(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function v(e,t,r){return t&&m(e.prototype,t),r&&m(e,r),e}var y=["Adobe-GB1-UCS2","Adobe-CNS1-UCS2","Adobe-Japan1-UCS2","Adobe-Korea1-UCS2","78-EUC-H","78-EUC-V","78-H","78-RKSJ-H","78-RKSJ-V","78-V","78ms-RKSJ-H","78ms-RKSJ-V","83pv-RKSJ-H","90ms-RKSJ-H","90ms-RKSJ-V","90msp-RKSJ-H","90msp-RKSJ-V","90pv-RKSJ-H","90pv-RKSJ-V","Add-H","Add-RKSJ-H","Add-RKSJ-V","Add-V","Adobe-CNS1-0","Adobe-CNS1-1","Adobe-CNS1-2","Adobe-CNS1-3","Adobe-CNS1-4","Adobe-CNS1-5","Adobe-CNS1-6","Adobe-GB1-0","Adobe-GB1-1","Adobe-GB1-2","Adobe-GB1-3","Adobe-GB1-4","Adobe-GB1-5","Adobe-Japan1-0","Adobe-Japan1-1","Adobe-Japan1-2","Adobe-Japan1-3","Adobe-Japan1-4","Adobe-Japan1-5","Adobe-Japan1-6","Adobe-Korea1-0","Adobe-Korea1-1","Adobe-Korea1-2","B5-H","B5-V","B5pc-H","B5pc-V","CNS-EUC-H","CNS-EUC-V","CNS1-H","CNS1-V","CNS2-H","CNS2-V","ETHK-B5-H","ETHK-B5-V","ETen-B5-H","ETen-B5-V","ETenms-B5-H","ETenms-B5-V","EUC-H","EUC-V","Ext-H","Ext-RKSJ-H","Ext-RKSJ-V","Ext-V","GB-EUC-H","GB-EUC-V","GB-H","GB-V","GBK-EUC-H","GBK-EUC-V","GBK2K-H","GBK2K-V","GBKp-EUC-H","GBKp-EUC-V","GBT-EUC-H","GBT-EUC-V","GBT-H","GBT-V","GBTpc-EUC-H","GBTpc-EUC-V","GBpc-EUC-H","GBpc-EUC-V","H","HKdla-B5-H","HKdla-B5-V","HKdlb-B5-H","HKdlb-B5-V","HKgccs-B5-H","HKgccs-B5-V","HKm314-B5-H","HKm314-B5-V","HKm471-B5-H","HKm471-B5-V","HKscs-B5-H","HKscs-B5-V","Hankaku","Hiragana","KSC-EUC-H","KSC-EUC-V","KSC-H","KSC-Johab-H","KSC-Johab-V","KSC-V","KSCms-UHC-H","KSCms-UHC-HW-H","KSCms-UHC-HW-V","KSCms-UHC-V","KSCpc-EUC-H","KSCpc-EUC-V","Katakana","NWP-H","NWP-V","RKSJ-H","RKSJ-V","Roman","UniCNS-UCS2-H","UniCNS-UCS2-V","UniCNS-UTF16-H","UniCNS-UTF16-V","UniCNS-UTF32-H","UniCNS-UTF32-V","UniCNS-UTF8-H","UniCNS-UTF8-V","UniGB-UCS2-H","UniGB-UCS2-V","UniGB-UTF16-H","UniGB-UTF16-V","UniGB-UTF32-H","UniGB-UTF32-V","UniGB-UTF8-H","UniGB-UTF8-V","UniJIS-UCS2-H","UniJIS-UCS2-HW-H","UniJIS-UCS2-HW-V","UniJIS-UCS2-V","UniJIS-UTF16-H","UniJIS-UTF16-V","UniJIS-UTF32-H","UniJIS-UTF32-V","UniJIS-UTF8-H","UniJIS-UTF8-V","UniJIS2004-UTF16-H","UniJIS2004-UTF16-V","UniJIS2004-UTF32-H","UniJIS2004-UTF32-V","UniJIS2004-UTF8-H","UniJIS2004-UTF8-V","UniJISPro-UCS2-HW-V","UniJISPro-UCS2-V","UniJISPro-UTF8-V","UniJISX0213-UTF32-H","UniJISX0213-UTF32-V","UniJISX02132004-UTF32-H","UniJISX02132004-UTF32-V","UniKS-UCS2-H","UniKS-UCS2-V","UniKS-UTF16-H","UniKS-UTF16-V","UniKS-UTF32-H","UniKS-UTF32-V","UniKS-UTF8-H","UniKS-UTF8-V","V","WP-Symbol"],b=Math.pow(2,24)-1,w=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];g(this,e),this.codespaceRanges=[[],[],[],[]],this.numCodespaceRanges=0,this._map=[],this.name="",this.vertical=!1,this.useCMap=null,this.builtInCMap=t}return v(e,[{key:"addCodespaceRange",value:function(e,t,r){this.codespaceRanges[e-1].push(t,r),this.numCodespaceRanges++}},{key:"mapCidRange",value:function(e,t,r){if(t-e>b)throw new Error("mapCidRange - ignoring data above MAX_MAP_RANGE.");for(;e<=t;)this._map[e++]=r++}},{key:"mapBfRange",value:function(e,t,r){if(t-e>b)throw new Error("mapBfRange - ignoring data above MAX_MAP_RANGE.");for(var n=r.length-1;e<=t;)this._map[e++]=r,r=r.substring(0,n)+String.fromCharCode(r.charCodeAt(n)+1)}},{key:"mapBfRangeToArray",value:function(e,t,r){if(t-e>b)throw new Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.");for(var n=r.length,a=0;e<=t&&a<n;)this._map[e]=r[a++],++e}},{key:"mapOne",value:function(e,t){this._map[e]=t}},{key:"lookup",value:function(e){return this._map[e]}},{key:"contains",value:function(e){return void 0!==this._map[e]}},{key:"forEach",value:function(e){var t=this._map,r=t.length;if(r<=65536)for(var n=0;n<r;n++)void 0!==t[n]&&e(n,t[n]);else for(var a in t)e(a,t[a])}},{key:"charCodeOf",value:function(e){var t=this._map;if(t.length<=65536)return t.indexOf(e);for(var r in t)if(t[r]===e)return 0|r;return-1}},{key:"getMap",value:function(){return this._map}},{key:"readCharCode",value:function(e,t,r){for(var n=0,a=this.codespaceRanges,i=0,o=a.length;i<o;i++){n=(n<<8|e.charCodeAt(t+i))>>>0;for(var s=a[i],c=0,u=s.length;c<u;){var l=s[c++],f=s[c++];if(n>=l&&n<=f)return r.charcode=n,void(r.length=i+1)}}r.charcode=0,r.length=1}},{key:"getCharCodeLength",value:function(e){for(var t=this.codespaceRanges,r=0,n=t.length;r<n;r++)for(var a=t[r],i=0,o=a.length;i<o;){var s=a[i++],c=a[i++];if(e>=s&&e<=c)return r+1}return 1}},{key:"length",get:function(){return this._map.length}},{key:"isIdentityCMap",get:function(){if("Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(var e=0;e<65536;e++)if(this._map[e]!==e)return!1;return!0}}]),e}();t.CMap=w;var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(r,w);var t=d(r);function r(e,n){var a;return g(this,r),(a=t.call(this)).vertical=e,a.addCodespaceRange(n,0,65535),a}return v(r,[{key:"mapCidRange",value:function(e,t,r){(0,i.unreachable)("should not call mapCidRange")}},{key:"mapBfRange",value:function(e,t,r){(0,i.unreachable)("should not call mapBfRange")}},{key:"mapBfRangeToArray",value:function(e,t,r){(0,i.unreachable)("should not call mapBfRangeToArray")}},{key:"mapOne",value:function(e,t){(0,i.unreachable)("should not call mapCidOne")}},{key:"lookup",value:function(e){return Number.isInteger(e)&&e<=65535?e:void 0}},{key:"contains",value:function(e){return Number.isInteger(e)&&e<=65535}},{key:"forEach",value:function(e){for(var t=0;t<=65535;t++)e(t,t)}},{key:"charCodeOf",value:function(e){return Number.isInteger(e)&&e<=65535?e:-1}},{key:"getMap",value:function(){for(var e=new Array(65536),t=0;t<=65535;t++)e[t]=t;return e}},{key:"length",get:function(){return 65536}},{key:"isIdentityCMap",get:function(){(0,i.unreachable)("should not access .isIdentityCMap")}}]),r}();t.IdentityCMap=k;var S=function(){function e(e,t){for(var r=0,n=0;n<=t;n++)r=r<<8|e[n];return r>>>0}function t(e,t){return 1===t?String.fromCharCode(e[0],e[1]):3===t?String.fromCharCode(e[0],e[1],e[2],e[3]):String.fromCharCode.apply(null,e.subarray(0,t+1))}function r(e,t,r){for(var n=0,a=r;a>=0;a--)n+=e[a]+t[a],e[a]=255&n,n>>=8}function n(e,t){for(var r=1,n=t;n>=0&&r>0;n--)r+=e[n],e[n]=255&r,r>>=8}var o=19,s=function(){function e(t){g(this,e),this.buffer=t,this.pos=0,this.end=t.length,this.tmpBuf=new Uint8Array(o)}return v(e,[{key:"readByte",value:function(){return this.pos>=this.end?-1:this.buffer[this.pos++]}},{key:"readNumber",value:function(){var e,t=0;do{var r=this.readByte();if(r<0)throw new i.FormatError("unexpected EOF in bcmap");e=!(128&r),t=t<<7|127&r}while(!e);return t}},{key:"readSigned",value:function(){var e=this.readNumber();return 1&e?~(e>>>1):e>>>1}},{key:"readHex",value:function(e,t){e.set(this.buffer.subarray(this.pos,this.pos+t+1)),this.pos+=t+1}},{key:"readHexNumber",value:function(e,t){var r,n=this.tmpBuf,a=0;do{var o=this.readByte();if(o<0)throw new i.FormatError("unexpected EOF in bcmap");r=!(128&o),n[a++]=127&o}while(!r);for(var s=t,c=0,u=0;s>=0;){for(;u<8&&n.length>0;)c=n[--a]<<u|c,u+=7;e[s]=255&c,s--,c>>=8,u-=8}}},{key:"readHexSigned",value:function(e,t){this.readHexNumber(e,t);for(var r=1&e[t]?255:0,n=0,a=0;a<=t;a++)n=(1&n)<<8|e[a],e[a]=n>>1^r}},{key:"readString",value:function(){for(var e=this.readNumber(),t="",r=0;r<e;r++)t+=String.fromCharCode(this.readNumber());return t}}]),e}();return function(){function i(){g(this,i)}return v(i,[{key:"process",value:function(){var i=f(a.default.mark(function i(o,c,u){var l,f,h,d,p,g,m,v,y,b,w,k,S,x,A,O,C,T,F,_,P;return a.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:l=new s(o),f=l.readByte(),c.vertical=!!(1&f),h=null,d=new Uint8Array(16),p=new Uint8Array(16),g=new Uint8Array(16),m=new Uint8Array(16),v=new Uint8Array(16);case 9:if(!((b=l.readByte())>=0)){a.next=68;break}if(7!==(w=b>>5)){a.next=20;break}a.t0=31&b,a.next=0===a.t0?15:1===a.t0?17:19;break;case 15:return l.readString(),a.abrupt("break",19);case 17:return h=l.readString(),a.abrupt("break",19);case 19:return a.abrupt("continue",9);case 20:if(k=!!(16&b),!((S=15&b)+1>16)){a.next=24;break}throw new Error("BinaryCMapReader.process: Invalid dataSize.");case 24:x=1,A=l.readNumber(),a.t1=w,a.next=0===a.t1?29:1===a.t1?35:2===a.t1?41:3===a.t1?46:4===a.t1?53:5===a.t1?58:65;break;case 29:for(l.readHex(d,S),l.readHexNumber(p,S),r(p,d,S),c.addCodespaceRange(S+1,e(d,S),e(p,S)),O=1;O<A;O++)n(p,S),l.readHexNumber(d,S),r(d,p,S),l.readHexNumber(p,S),r(p,d,S),c.addCodespaceRange(S+1,e(d,S),e(p,S));return a.abrupt("break",66);case 35:for(l.readHex(d,S),l.readHexNumber(p,S),r(p,d,S),l.readNumber(),C=1;C<A;C++)n(p,S),l.readHexNumber(d,S),r(d,p,S),l.readHexNumber(p,S),r(p,d,S),l.readNumber();return a.abrupt("break",66);case 41:for(l.readHex(g,S),y=l.readNumber(),c.mapOne(e(g,S),y),T=1;T<A;T++)n(g,S),k||(l.readHexNumber(v,S),r(g,v,S)),y=l.readSigned()+(y+1),c.mapOne(e(g,S),y);return a.abrupt("break",66);case 46:for(l.readHex(d,S),l.readHexNumber(p,S),r(p,d,S),y=l.readNumber(),c.mapCidRange(e(d,S),e(p,S),y),F=1;F<A;F++)n(p,S),k?d.set(p):(l.readHexNumber(d,S),r(d,p,S)),l.readHexNumber(p,S),r(p,d,S),y=l.readNumber(),c.mapCidRange(e(d,S),e(p,S),y);return a.abrupt("break",66);case 53:for(l.readHex(g,x),l.readHex(m,S),c.mapOne(e(g,x),t(m,S)),_=1;_<A;_++)n(g,x),k||(l.readHexNumber(v,x),r(g,v,x)),n(m,S),l.readHexSigned(v,S),r(m,v,S),c.mapOne(e(g,x),t(m,S));return a.abrupt("break",66);case 58:for(l.readHex(d,x),l.readHexNumber(p,x),r(p,d,x),l.readHex(m,S),c.mapBfRange(e(d,x),e(p,x),t(m,S)),P=1;P<A;P++)n(p,x),k?d.set(p):(l.readHexNumber(d,x),r(d,p,x)),l.readHexNumber(p,x),r(p,d,x),l.readHex(m,S),c.mapBfRange(e(d,x),e(p,x),t(m,S));return a.abrupt("break",66);case 65:throw new Error("BinaryCMapReader.process - unknown type: ".concat(w));case 66:a.next=9;break;case 68:if(!h){a.next=70;break}return a.abrupt("return",u(h));case 70:return a.abrupt("return",c);case 71:case"end":return a.stop()}},i)}));return function(e,t,r){return i.apply(this,arguments)}}()}]),i}()}(),x=function(){function e(e){for(var t=0,r=0;r<e.length;r++)t=t<<8|e.charCodeAt(r);return t>>>0}function t(e){if(!(0,i.isString)(e))throw new i.FormatError("Malformed CMap: expected string.")}function r(e){if(!Number.isInteger(e))throw new i.FormatError("Malformed CMap: expected int.")}function n(r,n){for(;;){var a=n.getObj();if((0,o.isEOF)(a))break;if((0,o.isCmd)(a,"endbfchar"))return;t(a);var i=e(a);t(a=n.getObj());var s=a;r.mapOne(i,s)}}function l(r,n){for(;;){var a=n.getObj();if((0,o.isEOF)(a))break;if((0,o.isCmd)(a,"endbfrange"))return;t(a);var s=e(a);t(a=n.getObj());var c=e(a);if(a=n.getObj(),Number.isInteger(a)||(0,i.isString)(a)){var u=Number.isInteger(a)?String.fromCharCode(a):a;r.mapBfRange(s,c,u)}else{if(!(0,o.isCmd)(a,"["))break;a=n.getObj();for(var l=[];!(0,o.isCmd)(a,"]")&&!(0,o.isEOF)(a);)l.push(a),a=n.getObj();r.mapBfRangeToArray(s,c,l)}}throw new i.FormatError("Invalid bf range.")}function h(n,a){for(;;){var i=a.getObj();if((0,o.isEOF)(i))break;if((0,o.isCmd)(i,"endcidchar"))return;t(i);var s=e(i);r(i=a.getObj());var c=i;n.mapOne(s,c)}}function d(n,a){for(;;){var i=a.getObj();if((0,o.isEOF)(i))break;if((0,o.isCmd)(i,"endcidrange"))return;t(i);var s=e(i);t(i=a.getObj());var c=e(i);r(i=a.getObj());var u=i;n.mapCidRange(s,c,u)}}function p(t,r){for(;;){var n=r.getObj();if((0,o.isEOF)(n))break;if((0,o.isCmd)(n,"endcodespacerange"))return;if(!(0,i.isString)(n))break;var a=e(n);if(n=r.getObj(),!(0,i.isString)(n))break;var s=e(n);t.addCodespaceRange(n.length,a,s)}throw new i.FormatError("Invalid codespace range.")}function g(e,t){var r=t.getObj();Number.isInteger(r)&&(e.vertical=!!r)}function m(e,t){var r=t.getObj();(0,o.isName)(r)&&(0,i.isString)(r.name)&&(e.name=r.name)}function v(e,t,r,n){return b.apply(this,arguments)}function b(){return(b=f(a.default.mark(function e(t,r,s,u){var f,v,y;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,y=r.getObj(),!(0,o.isEOF)(y)){e.next=7;break}return e.abrupt("break",39);case 7:if(!(0,o.isName)(y)){e.next=12;break}"WMode"===y.name?g(t,r):"CMapName"===y.name&&m(t,r),f=y,e.next=29;break;case 12:if(!(0,o.isCmd)(y)){e.next=29;break}e.t0=y.cmd,e.next="endcmap"===e.t0?16:"usecmap"===e.t0?17:"begincodespacerange"===e.t0?19:"beginbfchar"===e.t0?21:"begincidchar"===e.t0?23:"beginbfrange"===e.t0?25:"begincidrange"===e.t0?27:29;break;case 16:return e.abrupt("break",39);case 17:return(0,o.isName)(f)&&(v=f.name),e.abrupt("break",29);case 19:return p(t,r),e.abrupt("break",29);case 21:return n(t,r),e.abrupt("break",29);case 23:return h(t,r),e.abrupt("break",29);case 25:return l(t,r),e.abrupt("break",29);case 27:return d(t,r),e.abrupt("break",29);case 29:e.next=37;break;case 31:if(e.prev=31,e.t1=e.catch(1),!(e.t1 instanceof c.MissingDataException)){e.next=35;break}throw e.t1;case 35:return(0,i.warn)("Invalid cMap data: "+e.t1),e.abrupt("continue",0);case 37:e.next=0;break;case 39:if(!u&&v&&(u=v),!u){e.next=42;break}return e.abrupt("return",x(t,s,u));case 42:return e.abrupt("return",t);case 43:case"end":return e.stop()}},e,null,[[1,31]])}))).apply(this,arguments)}function x(e,t,r){return A.apply(this,arguments)}function A(){return(A=f(a.default.mark(function e(t,r,n){var i,o;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O(n,r);case 2:if(t.useCMap=e.sent,0===t.numCodespaceRanges){for(i=t.useCMap.codespaceRanges,o=0;o<i.length;o++)t.codespaceRanges[o]=i[o].slice();t.numCodespaceRanges=t.useCMap.numCodespaceRanges}return t.useCMap.forEach(function(e,r){t.contains(e)||t.mapOne(e,t.useCMap.lookup(e))}),e.abrupt("return",t);case 6:case"end":return e.stop()}},e)}))).apply(this,arguments)}function O(e,t){return C.apply(this,arguments)}function C(){return(C=f(a.default.mark(function e(t,r){var n,o,c,l,f;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("Identity-H"!==t){e.next=4;break}return e.abrupt("return",new k(!1,2));case 4:if("Identity-V"!==t){e.next=6;break}return e.abrupt("return",new k(!0,2));case 6:if(y.includes(t)){e.next=8;break}throw new Error("Unknown CMap name: "+t);case 8:if(r){e.next=10;break}throw new Error("Built-in CMap parameters are not provided.");case 10:return e.next=12,r(t);case 12:if(n=e.sent,o=n.cMapData,c=n.compressionType,l=new w(!0),c!==i.CMapCompressionType.BINARY){e.next=18;break}return e.abrupt("return",(new S).process(o,l,function(e){return x(l,r,e)}));case 18:if(c!==i.CMapCompressionType.NONE){e.next=21;break}return f=new s.Lexer(new u.Stream(o)),e.abrupt("return",v(l,f,r,null));case 21:throw new Error("TODO: Only BINARY/NONE CMap compression is currently supported.");case 22:case"end":return e.stop()}},e)}))).apply(this,arguments)}return{create:function(e){return f(a.default.mark(function t(){var r,n,i,c;return a.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.encoding,n=e.fetchBuiltInCMap,i=e.useCMap,!(0,o.isName)(r)){t.next=7;break}return t.abrupt("return",O(r.name,n));case 7:if(!(0,o.isStream)(r)){t.next=14;break}return t.next=10,v(new w,new s.Lexer(r),n,i);case 10:if(!(c=t.sent).isIdentityCMap){t.next=13;break}return t.abrupt("return",O(c.name,n));case 13:return t.abrupt("return",c);case 14:throw new Error("Encoding required.");case 15:case"end":return t.stop()}},t)}))()}}}();t.CMapFactory=x},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=t.Linearization=t.Lexer=void 0;var n=r(4),a=r(113),i=r(117),o=r(126),s=r(128),c=r(129),u=r(131),l=r(132),f=r(135),h=r(137),d=r(139),p=r(118),g=r(140),m=r(141);function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function b(e,t,r){return t&&y(e.prototype,t),r&&y(e,r),e}function w(e){for(var t=e.length,r=1,n=0,a=0;a<t;++a)n+=r+=255&e[a];return n%65521<<16|r%65521}var k=function(){function e(t){var r=t.lexer,n=t.xref,a=t.allowStreams,i=void 0!==a&&a,o=t.recoveryMode,s=void 0!==o&&o;v(this,e),this.lexer=r,this.xref=n,this.allowStreams=i,this.recoveryMode=s,this.imageCache=Object.create(null),this.refill()}return b(e,[{key:"refill",value:function(){this.buf1=this.lexer.getObj(),this.buf2=this.lexer.getObj()}},{key:"shift",value:function(){this.buf2 instanceof a.Cmd&&"ID"===this.buf2.cmd?(this.buf1=this.buf2,this.buf2=null):(this.buf1=this.buf2,this.buf2=this.lexer.getObj())}},{key:"tryShift",value:function(){try{return this.shift(),!0}catch(e){if(e instanceof i.MissingDataException)throw e;return!1}}},{key:"getObj",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.buf1;if(this.shift(),t instanceof a.Cmd)switch(t.cmd){case"BI":return this.makeInlineImage(e);case"[":for(var r=[];!(0,a.isCmd)(this.buf1,"]")&&!(0,a.isEOF)(this.buf1);)r.push(this.getObj(e));if((0,a.isEOF)(this.buf1)){if(!this.recoveryMode)throw new n.FormatError("End of file inside array");return r}return this.shift(),r;case"<<":for(var i=new a.Dict(this.xref);!(0,a.isCmd)(this.buf1,">>")&&!(0,a.isEOF)(this.buf1);)if((0,a.isName)(this.buf1)){var o=this.buf1.name;if(this.shift(),(0,a.isEOF)(this.buf1))break;i.set(o,this.getObj(e))}else(0,n.info)("Malformed dictionary: key must be a name object"),this.shift();if((0,a.isEOF)(this.buf1)){if(!this.recoveryMode)throw new n.FormatError("End of file inside dictionary");return i}return(0,a.isCmd)(this.buf2,"stream")?this.allowStreams?this.makeStream(i,e):i:(this.shift(),i);default:return t}if(Number.isInteger(t)){if(Number.isInteger(this.buf1)&&(0,a.isCmd)(this.buf2,"R")){var s=a.Ref.get(t,this.buf1);return this.shift(),this.shift(),s}return t}return"string"==typeof t&&e?e.decryptString(t):t}},{key:"findDefaultInlineStreamEnd",value:function(e){for(var t,r,o=this.lexer,s=e.pos,c=0;-1!==(t=e.getByte());)if(0===c)c=69===t?1:0;else if(1===c)c=73===t?2:0;else if((0,n.assert)(2===c,"findDefaultInlineStreamEnd - invalid state."),32===t||10===t||13===t){r=e.pos;for(var u=e.peekBytes(10),l=0,f=u.length;l<f;l++)if((0!==(t=u[l])||0===u[l+1])&&10!==t&&13!==t&&(t<32||t>127)){c=0;break}if(2!==c)continue;if(o.knownCommands){var h=o.peekObj();h instanceof a.Cmd&&!o.knownCommands[h.cmd]&&(c=0)}else(0,n.warn)("findDefaultInlineStreamEnd - `lexer.knownCommands` is undefined.");if(2===c)break}else c=0;-1===t&&((0,n.warn)("findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker"),r&&((0,n.warn)('... trying to recover by using the last "EI" occurrence.'),e.skip(-(e.pos-r))));var d=4;return e.skip(-d),t=e.peekByte(),e.skip(d),(0,i.isWhiteSpace)(t)||d--,e.pos-d-s}},{key:"findDCTDecodeInlineStreamEnd",value:function(e){for(var t,r,a=e.pos,i=!1;-1!==(t=e.getByte());)if(255===t){switch(e.getByte()){case 0:break;case 255:e.skip(-1);break;case 217:i=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:(r=e.getUint16())>2?e.skip(r-2):e.skip(-2)}if(i)break}var o=e.pos-a;return-1===t?((0,n.warn)("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead."),e.skip(-o),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),o)}},{key:"findASCII85DecodeInlineStreamEnd",value:function(e){for(var t,r=e.pos;-1!==(t=e.getByte());)if(126===t){var a=e.pos;for(t=e.peekByte();(0,i.isWhiteSpace)(t);)e.skip(),t=e.peekByte();if(62===t){e.skip();break}if(e.pos>a){var o=e.peekBytes(2);if(69===o[0]&&73===o[1])break}}var s=e.pos-r;return-1===t?((0,n.warn)("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead."),e.skip(-s),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),s)}},{key:"findASCIIHexDecodeInlineStreamEnd",value:function(e){for(var t,r=e.pos;-1!==(t=e.getByte())&&62!==t;);var a=e.pos-r;return-1===t?((0,n.warn)("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead."),e.skip(-a),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),a)}},{key:"inlineStreamSkipEI",value:function(e){for(var t,r=0;-1!==(t=e.getByte());)if(0===r)r=69===t?1:0;else if(1===r)r=73===t?2:0;else if(2===r)break}},{key:"makeInlineImage",value:function(e){for(var t,r=this.lexer,i=r.stream,o=new a.Dict(this.xref);!(0,a.isCmd)(this.buf1,"ID")&&!(0,a.isEOF)(this.buf1);){if(!(0,a.isName)(this.buf1))throw new n.FormatError("Dictionary key must be a name object");var s=this.buf1.name;if(this.shift(),(0,a.isEOF)(this.buf1))break;o.set(s,this.getObj(e))}-1!==r.beginInlineImagePos&&(t=i.pos-r.beginInlineImagePos);var c,u=o.get("Filter","F");if((0,a.isName)(u))c=u.name;else if(Array.isArray(u)){var l=this.xref.fetchIfRef(u[0]);(0,a.isName)(l)&&(c=l.name)}var f,h=i.pos;f="DCTDecode"===c||"DCT"===c?this.findDCTDecodeInlineStreamEnd(i):"ASCII85Decode"===c||"A85"===c?this.findASCII85DecodeInlineStreamEnd(i):"ASCIIHexDecode"===c||"AHx"===c?this.findASCIIHexDecodeInlineStreamEnd(i):this.findDefaultInlineStreamEnd(i);var d,p=i.makeSubStream(h,f,o);if(f<1e3&&t<5552){var g=p.getBytes();p.reset();var m=i.pos;i.pos=r.beginInlineImagePos;var v=i.getBytes(t);i.pos=m,d=w(g)+"_"+w(v);var y=this.imageCache[d];if(void 0!==y)return this.buf2=a.Cmd.get("EI"),this.shift(),y.reset(),y}return e&&(p=e.createStream(p,f)),(p=this.filter(p,o,f)).dict=o,void 0!==d&&(p.cacheKey="inline_".concat(f,"_").concat(d),this.imageCache[d]=p),this.buf2=a.Cmd.get("EI"),this.shift(),p}},{key:"_findStreamLength",value:function(e,t){var r=this.lexer.stream;r.pos=e;for(var n=t.length;r.pos<r.end;){var a=r.peekBytes(2048),i=a.length-n;if(i<=0)break;for(var o=0;o<i;){for(var s=0;s<n&&a[o+s]===t[s];)s++;if(s>=n)return r.pos+=o,r.pos-e;o++}r.pos+=i}return-1}},{key:"makeStream",value:function(e,t){var r=this.lexer,o=r.stream;r.skipToNextLine();var s=o.pos-1,c=e.get("Length");if(Number.isInteger(c)||((0,n.info)('Bad length "'.concat(c,'" in stream')),c=0),o.pos=s+c,r.nextChar(),this.tryShift()&&(0,a.isCmd)(this.buf2,"endstream"))this.shift();else{var u=new Uint8Array([101,110,100,115,116,114,101,97,109]),l=this._findStreamLength(s,u);if(l<0){for(var f=1;f<=1;f++){var h=u.length-f,d=u.slice(0,h),p=this._findStreamLength(s,d);if(p>=0){var g=o.peekBytes(h+1)[h];if(!(0,i.isWhiteSpace)(g))break;(0,n.info)('Found "'.concat((0,n.bytesToString)(d),'" when ')+"searching for endstream command."),l=p;break}}if(l<0)throw new n.FormatError("Missing endstream command.")}c=l,r.nextChar(),this.shift(),this.shift()}return this.shift(),o=o.makeSubStream(s,c,e),t&&(o=t.createStream(o,c)),(o=this.filter(o,e,c)).dict=e,o}},{key:"filter",value:function(e,t,r){var i=t.get("Filter","F"),o=t.get("DecodeParms","DP");if((0,a.isName)(i))return Array.isArray(o)&&(0,n.warn)("/DecodeParms should not contain an Array, when /Filter contains a Name."),this.makeFilter(e,i.name,r,o);var s=r;if(Array.isArray(i))for(var c=i,u=o,l=0,f=c.length;l<f;++l){if(i=this.xref.fetchIfRef(c[l]),!(0,a.isName)(i))throw new n.FormatError('Bad filter name "'.concat(i,'"'));o=null,Array.isArray(u)&&l in u&&(o=this.xref.fetchIfRef(u[l])),e=this.makeFilter(e,i.name,s,o),s=null}return e}},{key:"makeFilter",value:function(e,t,r,a){if(0===r)return(0,n.warn)('Empty "'.concat(t,'" stream.')),new p.NullStream;try{var v=this.xref.stats.streamTypes;if("FlateDecode"===t||"Fl"===t)return v[n.StreamType.FLATE]=!0,a?new g.PredictorStream(new u.FlateStream(e,r),r,a):new u.FlateStream(e,r);if("LZWDecode"===t||"LZW"===t){v[n.StreamType.LZW]=!0;var y=1;return a?(a.has("EarlyChange")&&(y=a.get("EarlyChange")),new g.PredictorStream(new d.LZWStream(e,r,y),r,a)):new d.LZWStream(e,r,y)}return"DCTDecode"===t||"DCT"===t?(v[n.StreamType.DCT]=!0,new f.JpegStream(e,r,a)):"JPXDecode"===t||"JPX"===t?(v[n.StreamType.JPX]=!0,new h.JpxStream(e,r,a)):"ASCII85Decode"===t||"A85"===t?(v[n.StreamType.A85]=!0,new o.Ascii85Stream(e,r)):"ASCIIHexDecode"===t||"AHx"===t?(v[n.StreamType.AHX]=!0,new s.AsciiHexStream(e,r)):"CCITTFaxDecode"===t||"CCF"===t?(v[n.StreamType.CCF]=!0,new c.CCITTFaxStream(e,r,a)):"RunLengthDecode"===t||"RL"===t?(v[n.StreamType.RLX]=!0,new m.RunLengthStream(e,r)):"JBIG2Decode"===t?(v[n.StreamType.JBIG]=!0,new l.Jbig2Stream(e,r,a)):((0,n.warn)('Filter "'.concat(t,'" is not supported.')),e)}catch(e){if(e instanceof i.MissingDataException)throw e;return(0,n.warn)('Invalid stream: "'.concat(e,'"')),new p.NullStream}}}]),e}();t.Parser=k;var S=[1,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,2,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];function x(e){return e>=48&&e<=57?15&e:e>=65&&e<=70||e>=97&&e<=102?9+(15&e):-1}var A=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;v(this,e),this.stream=t,this.nextChar(),this.strBuf=[],this.knownCommands=r,this._hexStringNumWarn=0,this.beginInlineImagePos=-1}return b(e,[{key:"nextChar",value:function(){return this.currentChar=this.stream.getByte()}},{key:"peekChar",value:function(){return this.stream.peekByte()}},{key:"getNumber",value:function(){var e=this.currentChar,t=!1,r=0,a=0;if(45===e?(a=-1,45===(e=this.nextChar())&&(e=this.nextChar())):43===e&&(a=1,e=this.nextChar()),10===e||13===e)do{e=this.nextChar()}while(10===e||13===e);if(46===e&&(r=10,e=this.nextChar()),e<48||e>57){if(10===r&&0===a&&((0,i.isWhiteSpace)(e)||-1===e))return(0,n.warn)("Lexer.getNumber - treating a single decimal point as zero."),0;throw new n.FormatError("Invalid number: ".concat(String.fromCharCode(e)," (charCode ").concat(e,")"))}a=a||1;for(var o=e-48,s=0,c=1;(e=this.nextChar())>=0;)if(e>=48&&e<=57){var u=e-48;t?s=10*s+u:(0!==r&&(r*=10),o=10*o+u)}else if(46===e){if(0!==r)break;r=1}else if(45===e)(0,n.warn)("Badly formatted number: minus sign in the middle");else{if(69!==e&&101!==e)break;if(43===(e=this.peekChar())||45===e)c=45===e?-1:1,this.nextChar();else if(e<48||e>57)break;t=!0}return 0!==r&&(o/=r),t&&(o*=Math.pow(10,c*s)),a*o}},{key:"getString",value:function(){var e=1,t=!1,r=this.strBuf;r.length=0;for(var a=this.nextChar();;){var i=!1;switch(0|a){case-1:(0,n.warn)("Unterminated string"),t=!0;break;case 40:++e,r.push("(");break;case 41:0==--e?(this.nextChar(),t=!0):r.push(")");break;case 92:switch(a=this.nextChar()){case-1:(0,n.warn)("Unterminated string"),t=!0;break;case 110:r.push("\n");break;case 114:r.push("\r");break;case 116:r.push("\t");break;case 98:r.push("\b");break;case 102:r.push("\f");break;case 92:case 40:case 41:r.push(String.fromCharCode(a));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:var o=15&a;i=!0,(a=this.nextChar())>=48&&a<=55&&(o=(o<<3)+(15&a),(a=this.nextChar())>=48&&a<=55&&(i=!1,o=(o<<3)+(15&a))),r.push(String.fromCharCode(o));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:r.push(String.fromCharCode(a))}break;default:r.push(String.fromCharCode(a))}if(t)break;i||(a=this.nextChar())}return r.join("")}},{key:"getName",value:function(){var e,t,r=this.strBuf;for(r.length=0;(e=this.nextChar())>=0&&!S[e];)if(35===e){if(e=this.nextChar(),S[e]){(0,n.warn)("Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number."),r.push("#");break}var i=x(e);if(-1!==i){t=e;var o=x(e=this.nextChar());if(-1===o){if((0,n.warn)("Lexer_getName: Illegal digit (".concat(String.fromCharCode(e),") ")+"in hexadecimal number."),r.push("#",String.fromCharCode(t)),S[e])break;r.push(String.fromCharCode(e));continue}r.push(String.fromCharCode(i<<4|o))}else r.push("#",String.fromCharCode(e))}else r.push(String.fromCharCode(e));return r.length>127&&(0,n.warn)("Name token is longer than allowed by the spec: ".concat(r.length)),a.Name.get(r.join(""))}},{key:"_hexStringWarn",value:function(e){5!=this._hexStringNumWarn++?this._hexStringNumWarn>5||(0,n.warn)("getHexString - ignoring invalid character: ".concat(e)):(0,n.warn)("getHexString - ignoring additional invalid characters.")}},{key:"getHexString",value:function(){var e=this.strBuf;e.length=0;var t,r,a=this.currentChar,i=!0;for(this._hexStringNumWarn=0;;){if(a<0){(0,n.warn)("Unterminated hex string");break}if(62===a){this.nextChar();break}if(1!==S[a]){if(i){if(-1===(t=x(a))){this._hexStringWarn(a),a=this.nextChar();continue}}else{if(-1===(r=x(a))){this._hexStringWarn(a),a=this.nextChar();continue}e.push(String.fromCharCode(t<<4|r))}i=!i,a=this.nextChar()}else a=this.nextChar()}return e.join("")}},{key:"getObj",value:function(){for(var e=!1,t=this.currentChar;;){if(t<0)return a.EOF;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(1!==S[t])break;t=this.nextChar()}switch(0|t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:return this.nextChar(),a.Cmd.get("[");case 93:return this.nextChar(),a.Cmd.get("]");case 60:return 60===(t=this.nextChar())?(this.nextChar(),a.Cmd.get("<<")):this.getHexString();case 62:return 62===(t=this.nextChar())?(this.nextChar(),a.Cmd.get(">>")):a.Cmd.get(">");case 123:return this.nextChar(),a.Cmd.get("{");case 125:return this.nextChar(),a.Cmd.get("}");case 41:throw this.nextChar(),new n.FormatError("Illegal character: ".concat(t))}for(var r=String.fromCharCode(t),i=this.knownCommands,o=i&&void 0!==i[r];(t=this.nextChar())>=0&&!S[t];){var s=r+String.fromCharCode(t);if(o&&void 0===i[s])break;if(128===r.length)throw new n.FormatError("Command token too long: ".concat(r.length));r=s,o=i&&void 0!==i[r]}return"true"===r||"false"!==r&&("null"===r?null:("BI"===r&&(this.beginInlineImagePos=this.stream.pos),a.Cmd.get(r)))}},{key:"peekObj",value:function(){var e,t=this.stream.pos,r=this.currentChar,a=this.beginInlineImagePos;try{e=this.getObj()}catch(e){if(e instanceof i.MissingDataException)throw e;(0,n.warn)("peekObj: ".concat(e))}return this.stream.pos=t,this.currentChar=r,this.beginInlineImagePos=a,e}},{key:"skipToNextLine",value:function(){for(var e=this.currentChar;e>=0;){if(13===e){10===(e=this.nextChar())&&this.nextChar();break}if(10===e){this.nextChar();break}e=this.nextChar()}}}]),e}();t.Lexer=A;var O=function(){function e(){v(this,e)}return b(e,null,[{key:"create",value:function(e){function t(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e.get(t);if(Number.isInteger(n)&&(r?n>=0:n>0))return n;throw new Error('The "'.concat(t,'" parameter in the linearization ')+"dictionary is invalid.")}var r,i,o=new k({lexer:new A(e),xref:null}),s=o.getObj(),c=o.getObj(),u=o.getObj(),l=o.getObj();if(!(Number.isInteger(s)&&Number.isInteger(c)&&(0,a.isCmd)(u,"obj")&&(0,a.isDict)(l)&&(0,n.isNum)(r=l.get("Linearized"))&&r>0))return null;if((i=t(l,"L"))!==e.length)throw new Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:i,hints:function(e){var t,r=e.get("H");if(Array.isArray(r)&&(2===(t=r.length)||4===t)){for(var n=0;n<t;n++){var a=r[n];if(!(Number.isInteger(a)&&a>0))throw new Error("Hint (".concat(n,") in the linearization dictionary is invalid."))}return r}throw new Error("Hint array in the linearization dictionary is invalid.")}(l),objectNumberFirst:t(l,"O"),endFirst:t(l,"E"),numPages:t(l,"N"),mainXRefEntriesOffset:t(l,"T"),pageFirst:l.has("P")?t(l,"P",!0):0}}}]),e}();t.Linearization=O},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.Ascii85Stream=void 0;var a=r(127),i=r(117);function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=u(e);if(t){var i=u(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,a.DecodeStream);var t,r,n,u=c(l);function l(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),t&&(t*=.8),(r=u.call(this,t)).str=e,r.dict=e.dict,r.input=new Uint8Array(5),r}return t=l,(r=[{key:"readBlock",value:function(){for(var e=this.str,t=e.getByte();(0,i.isWhiteSpace)(t);)t=e.getByte();if(-1!==t&&126!==t){var r,n,a=this.bufferLength;if(122===t){for(r=this.ensureBuffer(a+4),n=0;n<4;++n)r[a+n]=0;this.bufferLength+=4}else{var o=this.input;for(o[0]=t,n=1;n<5;++n){for(t=e.getByte();(0,i.isWhiteSpace)(t);)t=e.getByte();if(o[n]=t,-1===t||126===t)break}if(r=this.ensureBuffer(a+n-1),this.bufferLength+=n-1,n<5){for(;n<5;++n)o[n]=117;this.eof=!0}var s=0;for(n=0;n<5;++n)s=85*s+(o[n]-33);for(n=3;n>=0;--n)r[a+n]=255&s,s>>=8}}else this.eof=!0}}])&&o(t.prototype,r),n&&o(t,n),l}();t.Ascii85Stream=l},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.StreamsSequenceStream=t.DecodeStream=void 0;var a=r(114),i=r(118);function o(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function c(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),e}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=m(e);if(t){var i=m(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=new Uint8Array(0),y=function(e){d(r,a.BaseStream);var t=g(r);function r(e){var n;if(l(this,r),(n=t.call(this))._rawMinBufferLength=e||0,n.pos=0,n.bufferLength=0,n.eof=!1,n.buffer=v,n.minBufferLength=512,e)for(;n.minBufferLength<e;)n.minBufferLength*=2;return n}return h(r,[{key:"isEmpty",get:function(){for(;!this.eof&&0===this.bufferLength;)this.readBlock();return 0===this.bufferLength}},{key:"ensureBuffer",value:function(e){var t=this.buffer;if(e<=t.byteLength)return t;for(var r=this.minBufferLength;r<e;)r*=2;var n=new Uint8Array(r);return n.set(t),this.buffer=n}},{key:"getByte",value:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return-1;this.readBlock()}return this.buffer[this.pos++]}},{key:"getBytes",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.pos;if(e){for(this.ensureBuffer(n+e),t=n+e;!this.eof&&this.bufferLength<t;)this.readBlock();var a=this.bufferLength;t>a&&(t=a)}else{for(;!this.eof;)this.readBlock();t=this.bufferLength}this.pos=t;var i=this.buffer.subarray(n,t);return!r||i instanceof Uint8ClampedArray?i:new Uint8ClampedArray(i)}},{key:"reset",value:function(){this.pos=0}},{key:"makeSubStream",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(void 0===t)for(;!this.eof;)this.readBlock();else for(var n=e+t;this.bufferLength<=n&&!this.eof;)this.readBlock();return new i.Stream(this.buffer,e,t,r)}},{key:"getBaseStreams",value:function(){return this.str?this.str.getBaseStreams():null}}]),r}();t.DecodeStream=y;var b=function(e){d(r,y);var t=g(r);function r(e){var n;l(this,r);var a,i=0,o=s(e);try{for(o.s();!(a=o.n()).done;){var c=a.value;i+=c instanceof y?c._rawMinBufferLength:c.length}}catch(e){o.e(e)}finally{o.f()}return(n=t.call(this,i)).streams=e,n}return h(r,[{key:"readBlock",value:function(){var e=this.streams;if(0!==e.length){var t=e.shift().getBytes(),r=this.bufferLength,n=r+t.length;this.ensureBuffer(n).set(t,r),this.bufferLength=n}else this.eof=!0}},{key:"getBaseStreams",value:function(){var e,t=[],r=s(this.streams);try{for(r.s();!(e=r.n()).done;){var n=e.value.getBaseStreams();n&&t.push.apply(t,o(n))}}catch(e){r.e(e)}finally{r.f()}return t.length>0?t:null}}]),r}();t.StreamsSequenceStream=b},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.AsciiHexStream=void 0;var a=r(127);function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw i}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(l,a.DecodeStream);var t,r,n,o=u(l);function l(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),t&&(t*=.5),(r=o.call(this,t)).str=e,r.dict=e.dict,r.firstDigit=-1,r}return t=l,(r=[{key:"readBlock",value:function(){var e=this.str.getBytes(8e3);if(e.length){var t,r=e.length+1>>1,n=this.ensureBuffer(this.bufferLength+r),a=this.bufferLength,o=this.firstDigit,s=i(e);try{for(s.s();!(t=s.n()).done;){var c=t.value,u=void 0;if(c>=48&&c<=57)u=15&c;else{if(!(c>=65&&c<=70||c>=97&&c<=102)){if(62===c){this.eof=!0;break}continue}u=9+(15&c)}o<0?o=u:(n[a++]=o<<4|u,o=-1)}}catch(e){s.e(e)}finally{s.f()}o>=0&&this.eof&&(n[a++]=o<<4,o=-1),this.firstDigit=o,this.bufferLength=a}else this.eof=!0}}])&&s(t.prototype,r),n&&s(t,n),l}();t.AsciiHexStream=f},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CCITTFaxStream=void 0;var a=r(113),i=r(130),o=r(127);function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(f,o.DecodeStream);var t,r,n,l=u(f);function f(e,t,r){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(n=l.call(this,t)).str=e,n.dict=e.dict,(0,a.isDict)(r)||(r=a.Dict.empty);var o={next:function(){return e.getByte()}};return n.ccittFaxDecoder=new i.CCITTFaxDecoder(o,{K:r.get("K"),EndOfLine:r.get("EndOfLine"),EncodedByteAlign:r.get("EncodedByteAlign"),Columns:r.get("Columns"),Rows:r.get("Rows"),EndOfBlock:r.get("EndOfBlock"),BlackIs1:r.get("BlackIs1")}),n}return t=f,(r=[{key:"readBlock",value:function(){for(;!this.eof;){var e=this.ccittFaxDecoder.readNextChar();if(-1===e)return void(this.eof=!0);this.ensureBuffer(this.bufferLength+1),this.buffer[this.bufferLength++]=e}}}])&&s(t.prototype,r),n&&s(t,n),f}();t.CCITTFaxStream=f},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CCITTFaxDecoder=void 0;var n=r(4);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var i=[[-1,-1],[-1,-1],[7,8],[7,7],[6,6],[6,6],[6,5],[6,5],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2]],o=[[-1,-1],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],s=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,21],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,24],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7]],c=[[-1,-1],[-1,-1],[12,-2],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],[11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[12,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],u=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[11,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],l=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]],f=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t||"function"!=typeof t.next)throw new Error('CCITTFaxDecoder - invalid "source" parameter.');this.source=t,this.eof=!1,this.encoding=r.K||0,this.eoline=r.EndOfLine||!1,this.byteAlign=r.EncodedByteAlign||!1,this.columns=r.Columns||1728,this.rows=r.Rows||0;var n,a=r.EndOfBlock;for(null==a&&(a=!0),this.eoblock=a,this.black=r.BlackIs1||!1,this.codingLine=new Uint32Array(this.columns+1),this.refLine=new Uint32Array(this.columns+2),this.codingLine[0]=this.columns,this.codingPos=0,this.row=0,this.nextLine2D=this.encoding<0,this.inputBits=0,this.inputBuf=0,this.outputBits=0,this.rowsDone=!1;0===(n=this._lookBits(12));)this._eatBits(1);1===n&&this._eatBits(12),this.encoding>0&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1))}var t,r,f;return t=e,(r=[{key:"readNextChar",value:function(){if(this.eof)return-1;var e,t,r,a,i,o=this.refLine,s=this.codingLine,c=this.columns;if(0===this.outputBits){if(this.rowsDone&&(this.eof=!0),this.eof)return-1;var u,l,f;if(this.err=!1,this.nextLine2D){for(a=0;s[a]<c;++a)o[a]=s[a];for(o[a++]=c,o[a]=c,s[0]=0,this.codingPos=0,e=0,t=0;s[this.codingPos]<c;)switch(u=this._getTwoDimCode()){case 0:this._addPixels(o[e+1],t),o[e+1]<c&&(e+=2);break;case 1:if(u=l=0,t){do{u+=f=this._getBlackCode()}while(f>=64);do{l+=f=this._getWhiteCode()}while(f>=64)}else{do{u+=f=this._getWhiteCode()}while(f>=64);do{l+=f=this._getBlackCode()}while(f>=64)}for(this._addPixels(s[this.codingPos]+u,t),s[this.codingPos]<c&&this._addPixels(s[this.codingPos]+l,1^t);o[e]<=s[this.codingPos]&&o[e]<c;)e+=2;break;case 7:if(this._addPixels(o[e]+3,t),t^=1,s[this.codingPos]<c)for(++e;o[e]<=s[this.codingPos]&&o[e]<c;)e+=2;break;case 5:if(this._addPixels(o[e]+2,t),t^=1,s[this.codingPos]<c)for(++e;o[e]<=s[this.codingPos]&&o[e]<c;)e+=2;break;case 3:if(this._addPixels(o[e]+1,t),t^=1,s[this.codingPos]<c)for(++e;o[e]<=s[this.codingPos]&&o[e]<c;)e+=2;break;case 2:if(this._addPixels(o[e],t),t^=1,s[this.codingPos]<c)for(++e;o[e]<=s[this.codingPos]&&o[e]<c;)e+=2;break;case 8:if(this._addPixelsNeg(o[e]-3,t),t^=1,s[this.codingPos]<c)for(e>0?--e:++e;o[e]<=s[this.codingPos]&&o[e]<c;)e+=2;break;case 6:if(this._addPixelsNeg(o[e]-2,t),t^=1,s[this.codingPos]<c)for(e>0?--e:++e;o[e]<=s[this.codingPos]&&o[e]<c;)e+=2;break;case 4:if(this._addPixelsNeg(o[e]-1,t),t^=1,s[this.codingPos]<c)for(e>0?--e:++e;o[e]<=s[this.codingPos]&&o[e]<c;)e+=2;break;case-1:this._addPixels(c,0),this.eof=!0;break;default:(0,n.info)("bad 2d code"),this._addPixels(c,0),this.err=!0}}else for(s[0]=0,this.codingPos=0,t=0;s[this.codingPos]<c;){if(u=0,t)do{u+=f=this._getBlackCode()}while(f>=64);else do{u+=f=this._getWhiteCode()}while(f>=64);this._addPixels(s[this.codingPos]+u,t),t^=1}var h=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(u=this._lookBits(12),this.eoline)for(;-1!==u&&1!==u;)this._eatBits(1),u=this._lookBits(12);else for(;0===u;)this._eatBits(1),u=this._lookBits(12);1===u?(this._eatBits(12),h=!0):-1===u&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1)),this.eoblock&&h&&this.byteAlign){if(1===(u=this._lookBits(12))){if(this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1)),this.encoding>=0)for(a=0;a<4;++a)1!==(u=this._lookBits(12))&&(0,n.info)("bad rtc code: "+u),this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){for(;;){if(-1===(u=this._lookBits(13)))return this.eof=!0,-1;if(u>>1==1)break;this._eatBits(1)}this._eatBits(12),this.encoding>0&&(this._eatBits(1),this.nextLine2D=!(1&u))}s[0]>0?this.outputBits=s[this.codingPos=0]:this.outputBits=s[this.codingPos=1],this.row++}if(this.outputBits>=8)i=1&this.codingPos?0:255,this.outputBits-=8,0===this.outputBits&&s[this.codingPos]<c&&(this.codingPos++,this.outputBits=s[this.codingPos]-s[this.codingPos-1]);else{r=8,i=0;do{this.outputBits>r?(i<<=r,1&this.codingPos||(i|=255>>8-r),this.outputBits-=r,r=0):(i<<=this.outputBits,1&this.codingPos||(i|=255>>8-this.outputBits),r-=this.outputBits,this.outputBits=0,s[this.codingPos]<c?(this.codingPos++,this.outputBits=s[this.codingPos]-s[this.codingPos-1]):r>0&&(i<<=r,r=0))}while(r)}return this.black&&(i^=255),i}},{key:"_addPixels",value:function(e,t){var r=this.codingLine,a=this.codingPos;e>r[a]&&(e>this.columns&&((0,n.info)("row is wrong length"),this.err=!0,e=this.columns),1&a^t&&++a,r[a]=e),this.codingPos=a}},{key:"_addPixelsNeg",value:function(e,t){var r=this.codingLine,a=this.codingPos;if(e>r[a])e>this.columns&&((0,n.info)("row is wrong length"),this.err=!0,e=this.columns),1&a^t&&++a,r[a]=e;else if(e<r[a]){for(e<0&&((0,n.info)("invalid code"),this.err=!0,e=0);a>0&&e<r[a-1];)--a;r[a]=e}this.codingPos=a}},{key:"_findTableCode",value:function(e,t,r,n){for(var a=n||0,i=e;i<=t;++i){var o=this._lookBits(i);if(-1===o)return[!0,1,!1];if(i<t&&(o<<=t-i),!a||o>=a){var s=r[o-a];if(s[0]===i)return this._eatBits(i),[!0,s[1],!0]}}return[!1,0,!1]}},{key:"_getTwoDimCode",value:function(){var e,t=0;if(this.eoblock){if(t=this._lookBits(7),(e=i[t])&&e[0]>0)return this._eatBits(e[0]),e[1]}else{var r=this._findTableCode(1,7,i);if(r[0]&&r[2])return r[1]}return(0,n.info)("Bad two dim code"),-1}},{key:"_getWhiteCode",value:function(){var e,t=0;if(this.eoblock){if(-1===(t=this._lookBits(12)))return 1;if((e=t>>5==0?o[t]:s[t>>3])[0]>0)return this._eatBits(e[0]),e[1]}else{var r=this._findTableCode(1,9,s);if(r[0])return r[1];if((r=this._findTableCode(11,12,o))[0])return r[1]}return(0,n.info)("bad white code"),this._eatBits(1),1}},{key:"_getBlackCode",value:function(){var e,t;if(this.eoblock){if(-1===(e=this._lookBits(13)))return 1;if((t=e>>7==0?c[e]:e>>9==0&&e>>7!=0?u[(e>>1)-64]:l[e>>7])[0]>0)return this._eatBits(t[0]),t[1]}else{var r=this._findTableCode(2,6,l);if(r[0])return r[1];if((r=this._findTableCode(7,12,u,64))[0])return r[1];if((r=this._findTableCode(10,13,c))[0])return r[1]}return(0,n.info)("bad black code"),this._eatBits(1),1}},{key:"_lookBits",value:function(e){for(var t;this.inputBits<e;){if(-1===(t=this.source.next()))return 0===this.inputBits?-1:this.inputBuf<<e-this.inputBits&65535>>16-e;this.inputBuf=this.inputBuf<<8|t,this.inputBits+=8}return this.inputBuf>>this.inputBits-e&65535>>16-e}},{key:"_eatBits",value:function(e){(this.inputBits-=e)<0&&(this.inputBits=0)}}])&&a(t.prototype,r),f&&a(t,f),e}();t.CCITTFaxDecoder=f},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.FlateStream=void 0;var a=r(127),i=r(4);function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=u(e);if(t){var i=u(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),f=new Int32Array([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]),h=new Int32Array([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]),d=[new Int32Array([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,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],p=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5],g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(g,a.DecodeStream);var t,r,n,u=c(g);function g(e,t){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),(r=u.call(this,t)).str=e,r.dict=e.dict;var n=e.getByte(),a=e.getByte();if(-1===n||-1===a)throw new i.FormatError("Invalid header in flate stream: ".concat(n,", ").concat(a));if(8!=(15&n))throw new i.FormatError("Unknown compression method in flate stream: ".concat(n,", ").concat(a));if(((n<<8)+a)%31!=0)throw new i.FormatError("Bad FCHECK in flate stream: ".concat(n,", ").concat(a));if(32&a)throw new i.FormatError("FDICT bit set in flate stream: ".concat(n,", ").concat(a));return r.codeSize=0,r.codeBuf=0,r}return t=g,(r=[{key:"getBits",value:function(e){for(var t,r=this.str,n=this.codeSize,a=this.codeBuf;n<e;){if(-1===(t=r.getByte()))throw new i.FormatError("Bad encoding in flate stream");a|=t<<n,n+=8}return t=a&(1<<e)-1,this.codeBuf=a>>e,this.codeSize=n-=e,t}},{key:"getCode",value:function(e){for(var t,r=this.str,n=e[0],a=e[1],o=this.codeSize,s=this.codeBuf;o<a&&-1!==(t=r.getByte());)s|=t<<o,o+=8;var c=n[s&(1<<a)-1],u=c>>16,l=65535&c;if(u<1||o<u)throw new i.FormatError("Bad encoding in flate stream");return this.codeBuf=s>>u,this.codeSize=o-u,l}},{key:"generateHuffmanTable",value:function(e){var t,r=e.length,n=0;for(t=0;t<r;++t)e[t]>n&&(n=e[t]);for(var a=1<<n,i=new Int32Array(a),o=1,s=0,c=2;o<=n;++o,s<<=1,c<<=1)for(var u=0;u<r;++u)if(e[u]===o){var l=0,f=s;for(t=0;t<o;++t)l=l<<1|1&f,f>>=1;for(t=l;t<a;t+=c)i[t]=o<<16|u;++s}return[i,n]}},{key:"readBlock",value:function(){var e,t,r=this.str,n=this.getBits(3);if(1&n&&(this.eof=!0),0!==(n>>=1)){var a,o;if(1===n)a=d,o=p;else{if(2!==n)throw new i.FormatError("Unknown block type in flate stream");var s,c=this.getBits(5)+257,u=this.getBits(5)+1,g=this.getBits(4)+4,m=new Uint8Array(l.length);for(s=0;s<g;++s)m[l[s]]=this.getBits(3);var v=this.generateHuffmanTable(m);t=0,s=0;for(var y,b,w,k=c+u,S=new Uint8Array(k);s<k;){var x=this.getCode(v);if(16===x)y=2,b=3,w=t;else if(17===x)y=3,b=3,w=t=0;else{if(18!==x){S[s++]=t=x;continue}y=7,b=11,w=t=0}for(var A=this.getBits(y)+b;A-- >0;)S[s++]=w}a=this.generateHuffmanTable(S.subarray(0,c)),o=this.generateHuffmanTable(S.subarray(c,k))}for(var O=(e=this.buffer)?e.length:0,C=this.bufferLength;;){var T=this.getCode(a);if(T<256)C+1>=O&&(O=(e=this.ensureBuffer(C+1)).length),e[C++]=T;else{if(256===T)return void(this.bufferLength=C);var F=(T=f[T-=257])>>16;F>0&&(F=this.getBits(F)),t=(65535&T)+F,T=this.getCode(o),(F=(T=h[T])>>16)>0&&(F=this.getBits(F));var _=(65535&T)+F;C+t>=O&&(O=(e=this.ensureBuffer(C+t)).length);for(var P=0;P<t;++P,++C)e[C]=e[C-_]}}}else{var I;if(-1===(I=r.getByte()))throw new i.FormatError("Bad block header in flate stream");var E=I;if(-1===(I=r.getByte()))throw new i.FormatError("Bad block header in flate stream");if(E|=I<<8,-1===(I=r.getByte()))throw new i.FormatError("Bad block header in flate stream");var j=I;if(-1===(I=r.getByte()))throw new i.FormatError("Bad block header in flate stream");if((j|=I<<8)!==(65535&~E)&&(0!==E||0!==j))throw new i.FormatError("Bad uncompressed block length in flate stream");this.codeBuf=0,this.codeSize=0;var R=this.bufferLength,M=R+E;if(e=this.ensureBuffer(M),this.bufferLength=M,0===E)-1===r.peekByte()&&(this.eof=!0);else{var N=r.getBytes(E);e.set(N,R),N.length<E&&(this.eof=!0)}}}}])&&o(t.prototype,r),n&&o(t,n),g}();t.FlateStream=g},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.Jbig2Stream=void 0;var a=r(113),i=r(127),o=r(133),s=r(4);function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=f(e);if(t){var i=f(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(h,i.DecodeStream);var t,r,n,f=l(h);function h(e,t,r){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),(n=f.call(this,t)).stream=e,n.dict=e.dict,n.maybeLength=t,n.params=r,n}return t=h,(r=[{key:"bytes",get:function(){return(0,s.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))}},{key:"ensureBuffer",value:function(e){}},{key:"readBlock",value:function(){if(!this.eof){var e=new o.Jbig2Image,t=[];if((0,a.isDict)(this.params)){var r=this.params.get("JBIG2Globals");if((0,a.isStream)(r)){var n=r.getBytes();t.push({data:n,start:0,end:n.length})}}t.push({data:this.bytes,start:0,end:this.bytes.length});for(var i=e.parseChunks(t),s=i.length,c=0;c<s;c++)i[c]^=255;this.buffer=i,this.bufferLength=s,this.eof=!0}}}])&&c(t.prototype,r),n&&c(t,n),h}();t.Jbig2Stream=h},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.Jbig2Image=void 0;var a=r(4),i=r(117),o=r(134),s=r(130);function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=d(e);if(t){var i=d(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(r,a.BaseException);var t=h(r);function r(e){return l(this,r),t.call(this,"JBIG2 error: ".concat(e))}return r}(),g=function(){function e(){l(this,e)}return u(e,[{key:"getContexts",value:function(e){return e in this?this[e]:this[e]=new Int8Array(65536)}}]),e}(),m=function(){function e(t,r,n){l(this,e),this.data=t,this.start=r,this.end=n}return u(e,[{key:"decoder",get:function(){var e=new o.ArithmeticDecoder(this.data,this.start,this.end);return(0,a.shadow)(this,"decoder",e)}},{key:"contextCache",get:function(){var e=new g;return(0,a.shadow)(this,"contextCache",e)}}]),e}();function v(e,t,r){var n=e.getContexts(t),a=1;function i(e){for(var t=0,i=0;i<e;i++){var o=r.readBit(n,a);a=a<256?a<<1|o:511&(a<<1|o)|256,t=t<<1|o}return t>>>0}var o=i(1),s=i(1)?i(1)?i(1)?i(1)?i(1)?i(32)+4436:i(12)+340:i(8)+84:i(6)+20:i(4)+4:i(2);return 0===o?s:s>0?-s:null}function y(e,t,r){for(var n=e.getContexts("IAID"),a=1,i=0;i<r;i++){a=a<<1|t.readBit(n,a)}return r<31?a&(1<<r)-1:2147483647&a}var b=["SymbolDictionary",null,null,null,"IntermediateTextRegion",null,"ImmediateTextRegion","ImmediateLosslessTextRegion",null,null,null,null,null,null,null,null,"PatternDictionary",null,null,null,"IntermediateHalftoneRegion",null,"ImmediateHalftoneRegion","ImmediateLosslessHalftoneRegion",null,null,null,null,null,null,null,null,null,null,null,null,"IntermediateGenericRegion",null,"ImmediateGenericRegion","ImmediateLosslessGenericRegion","IntermediateGenericRefinementRegion",null,"ImmediateGenericRefinementRegion","ImmediateLosslessGenericRefinementRegion",null,null,null,null,"PageInformation","EndOfPage","EndOfStripe","EndOfFile","Profiles","Tables",null,null,null,null,null,null,null,null,"Extension"],w=[[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:2,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-2,y:0},{x:-1,y:0}],[{x:-3,y:-1},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}]],k=[{coding:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:-1,y:1},{x:0,y:1},{x:1,y:1}]},{coding:[{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:0,y:1},{x:1,y:1}]}],S=[39717,1941,229,405],x=[32,8];function A(e,t,r,n,a,i,o,s){if(e)return X(new L(s.data,s.start,s.end),t,r,!1);if(0===n&&!i&&!a&&4===o.length&&3===o[0].x&&-1===o[0].y&&-3===o[1].x&&-1===o[1].y&&2===o[2].x&&-2===o[2].y&&-2===o[3].x&&-2===o[3].y)return function(e,t,r){var n,a,i,o,s,c,u,l=r.decoder,f=r.contextCache.getContexts("GB"),h=[];for(a=0;a<t;a++)for(s=h[a]=new Uint8Array(e),c=a<1?s:h[a-1],n=(u=a<2?s:h[a-2])[0]<<13|u[1]<<12|u[2]<<11|c[0]<<7|c[1]<<6|c[2]<<5|c[3]<<4,i=0;i<e;i++)s[i]=o=l.readBit(f,n),n=(31735&n)<<1|(i+3<e?u[i+3]<<11:0)|(i+4<e?c[i+4]<<4:0)|o;return h}(t,r,s);var c=!!i,u=w[n].concat(o);u.sort(function(e,t){return e.y-t.y||e.x-t.x});var l,f,h=u.length,d=new Int8Array(h),p=new Int8Array(h),g=[],m=0,v=0,y=0,b=0;for(f=0;f<h;f++)d[f]=u[f].x,p[f]=u[f].y,v=Math.min(v,u[f].x),y=Math.max(y,u[f].x),b=Math.min(b,u[f].y),f<h-1&&u[f].y===u[f+1].y&&u[f].x===u[f+1].x-1?m|=1<<h-1-f:g.push(f);var k=g.length,x=new Int8Array(k),A=new Int8Array(k),O=new Uint16Array(k);for(l=0;l<k;l++)f=g[l],x[l]=u[f].x,A[l]=u[f].y,O[l]=1<<h-1-f;for(var C,T,F,_,P,I=-v,E=-b,j=t-y,R=S[n],M=new Uint8Array(t),N=[],B=s.decoder,D=s.contextCache.getContexts("GB"),U=0,q=0,H=0;H<r;H++){if(a)if(U^=B.readBit(D,R)){N.push(M);continue}for(M=new Uint8Array(M),N.push(M),C=0;C<t;C++)if(c&&i[H][C])M[C]=0;else{if(C>=I&&C<j&&H>=E)for(q=q<<1&m,f=0;f<k;f++)T=H+A[f],F=C+x[f],(_=N[T][F])&&(q|=_=O[f]);else for(q=0,P=h-1,f=0;f<h;f++,P--)(F=C+d[f])>=0&&F<t&&(T=H+p[f])>=0&&(_=N[T][F])&&(q|=_<<P);var $=B.readBit(D,q);M[C]=$}}return N}function O(e,t,r,n,a,i,o,s,c){var u=k[r].coding;0===r&&(u=u.concat([s[0]]));var l,f=u.length,h=new Int32Array(f),d=new Int32Array(f);for(l=0;l<f;l++)h[l]=u[l].x,d[l]=u[l].y;var g=k[r].reference;0===r&&(g=g.concat([s[1]]));var m=g.length,v=new Int32Array(m),y=new Int32Array(m);for(l=0;l<m;l++)v[l]=g[l].x,y[l]=g[l].y;for(var b=n[0].length,w=n.length,S=x[r],A=[],O=c.decoder,C=c.contextCache.getContexts("GR"),T=0,F=0;F<t;F++){if(o)if(T^=O.readBit(C,S))throw new p("prediction is not supported");var _=new Uint8Array(e);A.push(_);for(var P=0;P<e;P++){var I=void 0,E=void 0,j=0;for(l=0;l<f;l++)I=F+d[l],E=P+h[l],I<0||E<0||E>=e?j<<=1:j=j<<1|A[I][E];for(l=0;l<m;l++)I=F+y[l]-i,E=P+v[l]-a,I<0||I>=w||E<0||E>=b?j<<=1:j=j<<1|n[I][E];var R=O.readBit(C,j);_[P]=R}}return A}function C(e,t,r,n,a,i,o,s,c,u,l,f,h,d,g,m,b,w,k){if(e&&t)throw new p("refinement with Huffman is not supported");var S,x,A=[];for(S=0;S<n;S++){if(x=new Uint8Array(r),a)for(var C=0;C<r;C++)x[C]=a;A.push(x)}var T=b.decoder,F=b.contextCache,_=e?-d.tableDeltaT.decode(k):-v(F,"IADT",T),P=0;for(S=0;S<i;){_+=e?d.tableDeltaT.decode(k):v(F,"IADT",T);for(var I=P+=e?d.tableFirstS.decode(k):v(F,"IAFS",T);;){var E=0;o>1&&(E=e?k.readBits(w):v(F,"IAIT",T));var j=o*_+E,R=e?d.symbolIDTable.decode(k):y(F,T,c),M=t&&(e?k.readBit():v(F,"IARI",T)),N=s[R],B=N[0].length,D=N.length;if(M){var L=v(F,"IARDW",T),U=v(F,"IARDH",T);N=O(B+=L,D+=U,g,N,(L>>1)+v(F,"IARDX",T),(U>>1)+v(F,"IARDY",T),!1,m,b)}var q=j-(1&f?0:D-1),X=I-(2&f?B-1:0),H=void 0,$=void 0,z=void 0;if(u){for(H=0;H<D;H++)if(x=A[X+H]){z=N[H];var G=Math.min(r-q,B);switch(h){case 0:for($=0;$<G;$++)x[q+$]|=z[$];break;case 2:for($=0;$<G;$++)x[q+$]^=z[$];break;default:throw new p("operator ".concat(h," is not supported"))}}I+=D-1}else{for($=0;$<D;$++)if(x=A[q+$])switch(z=N[$],h){case 0:for(H=0;H<B;H++)x[X+H]|=z[H];break;case 2:for(H=0;H<B;H++)x[X+H]^=z[H];break;default:throw new p("operator ".concat(h," is not supported"))}I+=B-1}S++;var W=e?d.tableDeltaS.decode(k):v(F,"IADS",T);if(null===W)break;I+=W+l}}return A}function T(e,t){var r={};r.number=(0,i.readUint32)(e,t);var n=e[t+4],a=63&n;if(!b[a])throw new p("invalid segment type: "+a);r.type=a,r.typeName=b[a],r.deferredNonRetain=!!(128&n);var o=!!(64&n),s=e[t+5],c=s>>5&7,u=[31&s],l=t+6;if(7===s){c=536870911&(0,i.readUint32)(e,l-1),l+=3;var f=c+7>>3;for(u[0]=e[l++];--f>0;)u.push(e[l++])}else if(5===s||6===s)throw new p("invalid referred-to flags");r.retainBits=u;var h=4;r.number<=256?h=1:r.number<=65536&&(h=2);var d,g,m=[];for(d=0;d<c;d++){var v=void 0;v=1===h?e[l]:2===h?(0,i.readUint16)(e,l):(0,i.readUint32)(e,l),m.push(v),l+=h}if(r.referredTo=m,o?(r.pageAssociation=(0,i.readUint32)(e,l),l+=4):r.pageAssociation=e[l++],r.length=(0,i.readUint32)(e,l),l+=4,4294967295===r.length){if(38!==a)throw new p("invalid unknown segment length");var y=_(e,l),w=!!(1&e[l+P]),k=new Uint8Array(6);for(w||(k[0]=255,k[1]=172),k[2]=y.height>>>24&255,k[3]=y.height>>16&255,k[4]=y.height>>8&255,k[5]=255&y.height,d=l,g=e.length;d<g;d++){for(var S=0;S<6&&k[S]===e[d+S];)S++;if(6===S){r.length=d+6;break}}if(4294967295===r.length)throw new p("segment end was not found")}return r.headerEnd=l,r}function F(e,t,r,n){for(var a=[],i=r;i<n;){var o=T(t,i);i=o.headerEnd;var s={header:o,data:t};if(e.randomAccess||(s.start=i,i+=o.length,s.end=i),a.push(s),51===o.type)break}if(e.randomAccess)for(var c=0,u=a.length;c<u;c++)a[c].start=i,i+=a[c].header.length,a[c].end=i;return a}function _(e,t){return{width:(0,i.readUint32)(e,t),height:(0,i.readUint32)(e,t+4),x:(0,i.readUint32)(e,t+8),y:(0,i.readUint32)(e,t+12),combinationOperator:7&e[t+16]}}var P=17;function I(e,t){var r,n,a,o,s=e.header,c=e.data,u=e.end,l=e.start;switch(s.type){case 0:var f={},h=(0,i.readUint16)(c,l);if(f.huffman=!!(1&h),f.refinement=!!(2&h),f.huffmanDHSelector=h>>2&3,f.huffmanDWSelector=h>>4&3,f.bitmapSizeSelector=h>>6&1,f.aggregationInstancesSelector=h>>7&1,f.bitmapCodingContextUsed=!!(256&h),f.bitmapCodingContextRetained=!!(512&h),f.template=h>>10&3,f.refinementTemplate=h>>12&1,l+=2,!f.huffman){for(o=0===f.template?4:1,n=[],a=0;a<o;a++)n.push({x:(0,i.readInt8)(c,l),y:(0,i.readInt8)(c,l+1)}),l+=2;f.at=n}if(f.refinement&&!f.refinementTemplate){for(n=[],a=0;a<2;a++)n.push({x:(0,i.readInt8)(c,l),y:(0,i.readInt8)(c,l+1)}),l+=2;f.refinementAt=n}f.numberOfExportedSymbols=(0,i.readUint32)(c,l),l+=4,f.numberOfNewSymbols=(0,i.readUint32)(c,l),l+=4,r=[f,s.number,s.referredTo,c,l,u];break;case 6:case 7:var d={};d.info=_(c,l),l+=P;var g=(0,i.readUint16)(c,l);if(l+=2,d.huffman=!!(1&g),d.refinement=!!(2&g),d.logStripSize=g>>2&3,d.stripSize=1<<d.logStripSize,d.referenceCorner=g>>4&3,d.transposed=!!(64&g),d.combinationOperator=g>>7&3,d.defaultPixelValue=g>>9&1,d.dsOffset=g<<17>>27,d.refinementTemplate=g>>15&1,d.huffman){var m=(0,i.readUint16)(c,l);l+=2,d.huffmanFS=3&m,d.huffmanDS=m>>2&3,d.huffmanDT=m>>4&3,d.huffmanRefinementDW=m>>6&3,d.huffmanRefinementDH=m>>8&3,d.huffmanRefinementDX=m>>10&3,d.huffmanRefinementDY=m>>12&3,d.huffmanRefinementSizeSelector=!!(16384&m)}if(d.refinement&&!d.refinementTemplate){for(n=[],a=0;a<2;a++)n.push({x:(0,i.readInt8)(c,l),y:(0,i.readInt8)(c,l+1)}),l+=2;d.refinementAt=n}d.numberOfSymbolInstances=(0,i.readUint32)(c,l),l+=4,r=[d,s.referredTo,c,l,u];break;case 16:var v={},y=c[l++];v.mmr=!!(1&y),v.template=y>>1&3,v.patternWidth=c[l++],v.patternHeight=c[l++],v.maxPatternIndex=(0,i.readUint32)(c,l),l+=4,r=[v,s.number,c,l,u];break;case 22:case 23:var b={};b.info=_(c,l),l+=P;var w=c[l++];b.mmr=!!(1&w),b.template=w>>1&3,b.enableSkip=!!(8&w),b.combinationOperator=w>>4&7,b.defaultPixelValue=w>>7&1,b.gridWidth=(0,i.readUint32)(c,l),l+=4,b.gridHeight=(0,i.readUint32)(c,l),l+=4,b.gridOffsetX=4294967295&(0,i.readUint32)(c,l),l+=4,b.gridOffsetY=4294967295&(0,i.readUint32)(c,l),l+=4,b.gridVectorX=(0,i.readUint16)(c,l),l+=2,b.gridVectorY=(0,i.readUint16)(c,l),l+=2,r=[b,s.referredTo,c,l,u];break;case 38:case 39:var k={};k.info=_(c,l),l+=P;var S=c[l++];if(k.mmr=!!(1&S),k.template=S>>1&3,k.prediction=!!(8&S),!k.mmr){for(o=0===k.template?4:1,n=[],a=0;a<o;a++)n.push({x:(0,i.readInt8)(c,l),y:(0,i.readInt8)(c,l+1)}),l+=2;k.at=n}r=[k,c,l,u];break;case 48:var x={width:(0,i.readUint32)(c,l),height:(0,i.readUint32)(c,l+4),resolutionX:(0,i.readUint32)(c,l+8),resolutionY:(0,i.readUint32)(c,l+12)};4294967295===x.height&&delete x.height;var A=c[l+16];(0,i.readUint16)(c,l+17),x.lossless=!!(1&A),x.refinement=!!(2&A),x.defaultPixelValue=A>>2&1,x.combinationOperator=A>>3&3,x.requiresBuffer=!!(32&A),x.combinationOperatorOverride=!!(64&A),r=[x];break;case 49:case 50:case 51:break;case 53:r=[s.number,c,l,u];break;case 62:break;default:throw new p("segment type ".concat(s.typeName,"(").concat(s.type,")")+" is not implemented")}var O="on"+s.typeName;O in t&&t[O].apply(t,r)}function E(e,t){for(var r=0,n=e.length;r<n;r++)I(e[r],t)}var j=function(){function e(){l(this,e)}return u(e,[{key:"onPageInformation",value:function(e){this.currentPageInfo=e;var t=e.width+7>>3,r=new Uint8ClampedArray(t*e.height);if(e.defaultPixelValue)for(var n=0,a=r.length;n<a;n++)r[n]=255;this.buffer=r}},{key:"drawBitmap",value:function(e,t){var r,n,a,i,o=this.currentPageInfo,s=e.width,c=e.height,u=o.width+7>>3,l=o.combinationOperatorOverride?e.combinationOperator:o.combinationOperator,f=this.buffer,h=128>>(7&e.x),d=e.y*u+(e.x>>3);switch(l){case 0:for(r=0;r<c;r++){for(a=h,i=d,n=0;n<s;n++)t[r][n]&&(f[i]|=a),(a>>=1)||(a=128,i++);d+=u}break;case 2:for(r=0;r<c;r++){for(a=h,i=d,n=0;n<s;n++)t[r][n]&&(f[i]^=a),(a>>=1)||(a=128,i++);d+=u}break;default:throw new p("operator ".concat(l," is not supported"))}}},{key:"onImmediateGenericRegion",value:function(e,t,r,n){var a=e.info,i=new m(t,r,n),o=A(e.mmr,a.width,a.height,e.template,e.prediction,null,e.at,i);this.drawBitmap(a,o)}},{key:"onImmediateLosslessGenericRegion",value:function(){this.onImmediateGenericRegion.apply(this,arguments)}},{key:"onSymbolDictionary",value:function(e,t,r,n,a,o){var s,c;e.huffman&&(s=function(e,t,r){var n,a,i,o,s=0;switch(e.huffmanDHSelector){case 0:case 1:n=D(e.huffmanDHSelector+4);break;case 3:n=U(s,t,r),s++;break;default:throw new p("invalid Huffman DH selector")}switch(e.huffmanDWSelector){case 0:case 1:a=D(e.huffmanDWSelector+2);break;case 3:a=U(s,t,r),s++;break;default:throw new p("invalid Huffman DW selector")}e.bitmapSizeSelector?(i=U(s,t,r),s++):i=D(1);o=e.aggregationInstancesSelector?U(s,t,r):D(1);return{tableDeltaHeight:n,tableDeltaWidth:a,tableBitmapSize:i,tableAggregateInstances:o}}(e,r,this.customTables),c=new L(n,a,o));var u=this.symbols;u||(this.symbols=u={});for(var l=[],f=0,h=r.length;f<h;f++){var d=u[r[f]];d&&(l=l.concat(d))}var g=new m(n,a,o);u[t]=function(e,t,r,n,a,o,s,c,u,l,f,h){if(e&&t)throw new p("symbol refinement with Huffman is not supported");var d,g,m=[],b=0,w=(0,i.log2)(r.length+n),k=f.decoder,S=f.contextCache;for(e&&(d=D(1),g=[],w=Math.max(w,1));m.length<n;){b+=e?o.tableDeltaHeight.decode(h):v(S,"IADH",k);for(var x=0,T=0,F=e?g.length:0;;){var _=e?o.tableDeltaWidth.decode(h):v(S,"IADW",k);if(null===_)break;T+=x+=_;var P=void 0;if(t){var I=v(S,"IAAI",k);if(I>1)P=C(e,t,x,b,0,I,1,r.concat(m),w,0,0,1,0,o,u,l,f,0,h);else{var E=y(S,k,w),j=v(S,"IARDX",k),R=v(S,"IARDY",k);P=O(x,b,u,E<r.length?r[E]:m[E-r.length],j,R,!1,l,f)}m.push(P)}else e?g.push(x):(P=A(!1,x,b,s,!1,null,c,f),m.push(P))}if(e&&!t){var M=o.tableBitmapSize.decode(h);h.byteAlign();var N=void 0;if(0===M)N=q(h,T,b);else{var B=h.end,L=h.position+M;h.end=L,N=X(h,T,b,!1),h.end=B,h.position=L}var U=g.length;if(F===U-1)m.push(N);else{var H=void 0,$=void 0,z=0,G=void 0,W=void 0;for(H=F;H<U;H++){for(G=z+g[H],W=[],$=0;$<b;$++)W.push(N[$].subarray(z,G));m.push(W),z=G}}}}for(var V,K,Y=[],J=[],Z=!1,Q=r.length+n;J.length<Q;){for(var ee=e?d.decode(h):v(S,"IAEX",k);ee--;)J.push(Z);Z=!Z}for(V=0,K=r.length;V<K;V++)J[V]&&Y.push(r[V]);for(var te=0;te<n;V++,te++)J[V]&&Y.push(m[te]);return Y}(e.huffman,e.refinement,l,e.numberOfNewSymbols,e.numberOfExportedSymbols,s,e.template,e.at,e.refinementTemplate,e.refinementAt,g,c)}},{key:"onImmediateTextRegion",value:function(e,t,r,n,a){for(var o,s,c=e.info,u=this.symbols,l=[],f=0,h=t.length;f<h;f++){var d=u[t[f]];d&&(l=l.concat(d))}var g=(0,i.log2)(l.length);e.huffman&&(s=new L(r,n,a),o=function(e,t,r,n,a){for(var i=[],o=0;o<=34;o++){var s=a.readBits(4);i.push(new R([o,s,0,0]))}var c=new N(i,!1);i.length=0;for(var u=0;u<n;){var l=c.decode(a);if(l>=32){var f=void 0,h=void 0,d=void 0;switch(l){case 32:if(0===u)throw new p("no previous value in symbol ID table");h=a.readBits(2)+3,f=i[u-1].prefixLength;break;case 33:h=a.readBits(3)+3,f=0;break;case 34:h=a.readBits(7)+11,f=0;break;default:throw new p("invalid code length in symbol ID table")}for(d=0;d<h;d++)i.push(new R([u,f,0,0])),u++}else i.push(new R([u,l,0,0])),u++}a.byteAlign();var g,m,v,y=new N(i,!1),b=0;switch(e.huffmanFS){case 0:case 1:g=D(e.huffmanFS+6);break;case 3:g=U(b,t,r),b++;break;default:throw new p("invalid Huffman FS selector")}switch(e.huffmanDS){case 0:case 1:case 2:m=D(e.huffmanDS+8);break;case 3:m=U(b,t,r),b++;break;default:throw new p("invalid Huffman DS selector")}switch(e.huffmanDT){case 0:case 1:case 2:v=D(e.huffmanDT+11);break;case 3:v=U(b,t,r),b++;break;default:throw new p("invalid Huffman DT selector")}if(e.refinement)throw new p("refinement with Huffman is not supported");return{symbolIDTable:y,tableFirstS:g,tableDeltaS:m,tableDeltaT:v}}(e,t,this.customTables,l.length,s));var v=new m(r,n,a),y=C(e.huffman,e.refinement,c.width,c.height,e.defaultPixelValue,e.numberOfSymbolInstances,e.stripSize,l,g,e.transposed,e.dsOffset,e.referenceCorner,e.combinationOperator,o,e.refinementTemplate,e.refinementAt,v,e.logStripSize,s);this.drawBitmap(c,y)}},{key:"onImmediateLosslessTextRegion",value:function(){this.onImmediateTextRegion.apply(this,arguments)}},{key:"onPatternDictionary",value:function(e,t,r,n,a){var i=this.patterns;i||(this.patterns=i={});var o=new m(r,n,a);i[t]=function(e,t,r,n,a,i){var o=[];e||(o.push({x:-t,y:0}),0===a&&o.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2}));for(var s=A(e,(n+1)*t,r,a,!1,null,o,i),c=[],u=0;u<=n;u++){for(var l=[],f=t*u,h=f+t,d=0;d<r;d++)l.push(s[d].subarray(f,h));c.push(l)}return c}(e.mmr,e.patternWidth,e.patternHeight,e.maxPatternIndex,e.template,o)}},{key:"onImmediateHalftoneRegion",value:function(e,t,r,n,a){var o=this.patterns[t[0]],s=e.info,c=new m(r,n,a),u=function(e,t,r,n,a,o,s,c,u,l,f,h,d,g,m){if(s)throw new p("skip is not supported");if(0!==c)throw new p('operator "'.concat(c,'" is not supported in halftone region'));var v,y,b,w=[];for(v=0;v<a;v++){if(b=new Uint8Array(n),o)for(y=0;y<n;y++)b[y]=o;w.push(b)}var k=t.length,S=t[0],x=S[0].length,O=S.length,C=(0,i.log2)(k),T=[];e||(T.push({x:r<=1?3:2,y:-1}),0===r&&T.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2}));var F,_,P,I,E,j,R,M,N,B,D,U=[];for(e&&(F=new L(m.data,m.start,m.end)),v=C-1;v>=0;v--)_=e?X(F,u,l,!0):A(!1,u,l,r,!1,null,T,m),U[v]=_;for(P=0;P<l;P++)for(I=0;I<u;I++){for(E=0,j=0,y=C-1;y>=0;y--)j|=(E=U[y][P][I]^E)<<y;if(R=t[j],N=h+P*d-I*g>>8,(M=f+P*g+I*d>>8)>=0&&M+x<=n&&N>=0&&N+O<=a)for(v=0;v<O;v++)for(D=w[N+v],B=R[v],y=0;y<x;y++)D[M+y]|=B[y];else{var q=void 0,H=void 0;for(v=0;v<O;v++)if(!((H=N+v)<0||H>=a))for(D=w[H],B=R[v],y=0;y<x;y++)(q=M+y)>=0&&q<n&&(D[q]|=B[y])}}return w}(e.mmr,o,e.template,s.width,s.height,e.defaultPixelValue,e.enableSkip,e.combinationOperator,e.gridWidth,e.gridHeight,e.gridOffsetX,e.gridOffsetY,e.gridVectorX,e.gridVectorY,c);this.drawBitmap(s,u)}},{key:"onImmediateLosslessHalftoneRegion",value:function(){this.onImmediateHalftoneRegion.apply(this,arguments)}},{key:"onTables",value:function(e,t,r,n){var a=this.customTables;a||(this.customTables=a={}),a[e]=function(e,t,r){var n,a,o=e[t],s=4294967295&(0,i.readUint32)(e,t+1),c=4294967295&(0,i.readUint32)(e,t+5),u=new L(e,t+9,r),l=1+(o>>1&7),f=1+(o>>4&7),h=[],d=s;do{n=u.readBits(l),a=u.readBits(f),h.push(new R([d,n,a,0])),d+=1<<a}while(d<c);n=u.readBits(l),h.push(new R([s-1,n,32,0,"lower"])),n=u.readBits(l),h.push(new R([c,n,32,0])),1&o&&(n=u.readBits(l),h.push(new R([n,0])));return new N(h,!1)}(t,r,n)}}]),e}(),R=function e(t){l(this,e),2===t.length?(this.isOOB=!0,this.rangeLow=0,this.prefixLength=t[0],this.rangeLength=0,this.prefixCode=t[1],this.isLowerRange=!1):(this.isOOB=!1,this.rangeLow=t[0],this.prefixLength=t[1],this.rangeLength=t[2],this.prefixCode=t[3],this.isLowerRange="lower"===t[4])},M=function(){function e(t){l(this,e),this.children=[],t?(this.isLeaf=!0,this.rangeLength=t.rangeLength,this.rangeLow=t.rangeLow,this.isLowerRange=t.isLowerRange,this.isOOB=t.isOOB):this.isLeaf=!1}return u(e,[{key:"buildTree",value:function(t,r){var n=t.prefixCode>>r&1;if(r<=0)this.children[n]=new e(t);else{var a=this.children[n];a||(this.children[n]=a=new e(null)),a.buildTree(t,r-1)}}},{key:"decodeNode",value:function(e){if(this.isLeaf){if(this.isOOB)return null;var t=e.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-t:t)}var r=this.children[e.readBit()];if(!r)throw new p("invalid Huffman data");return r.decodeNode(e)}}]),e}(),N=function(){function e(t,r){l(this,e),r||this.assignPrefixCodes(t),this.rootNode=new M(null);for(var n=0,a=t.length;n<a;n++){var i=t[n];i.prefixLength>0&&this.rootNode.buildTree(i,i.prefixLength-1)}}return u(e,[{key:"decode",value:function(e){return this.rootNode.decodeNode(e)}},{key:"assignPrefixCodes",value:function(e){for(var t=e.length,r=0,n=0;n<t;n++)r=Math.max(r,e[n].prefixLength);for(var a=new Uint32Array(r+1),i=0;i<t;i++)a[e[i].prefixLength]++;var o,s,c,u=1,l=0;for(a[0]=0;u<=r;){for(o=l=l+a[u-1]<<1,s=0;s<t;)(c=e[s]).prefixLength===u&&(c.prefixCode=o,o++),s++;u++}}}]),e}();var B={};function D(e){var t,r=B[e];if(r)return r;switch(e){case 1:t=[[0,1,4,0],[16,2,8,2],[272,3,16,6],[65808,3,32,7]];break;case 2:t=[[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[75,6,32,62],[6,63]];break;case 3:t=[[-256,8,8,254],[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[-257,8,32,255,"lower"],[75,7,32,126],[6,62]];break;case 4:t=[[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[76,5,32,31]];break;case 5:t=[[-255,7,8,126],[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[-256,7,32,127,"lower"],[76,6,32,62]];break;case 6:t=[[-2048,5,10,28],[-1024,4,9,8],[-512,4,8,9],[-256,4,7,10],[-128,5,6,29],[-64,5,5,30],[-32,4,5,11],[0,2,7,0],[128,3,7,2],[256,3,8,3],[512,4,9,12],[1024,4,10,13],[-2049,6,32,62,"lower"],[2048,6,32,63]];break;case 7:t=[[-1024,4,9,8],[-512,3,8,0],[-256,4,7,9],[-128,5,6,26],[-64,5,5,27],[-32,4,5,10],[0,4,5,11],[32,5,5,28],[64,5,6,29],[128,4,7,12],[256,3,8,1],[512,3,9,2],[1024,3,10,3],[-1025,5,32,30,"lower"],[2048,5,32,31]];break;case 8:t=[[-15,8,3,252],[-7,9,1,508],[-5,8,1,253],[-3,9,0,509],[-2,7,0,124],[-1,4,0,10],[0,2,1,0],[2,5,0,26],[3,6,0,58],[4,3,4,4],[20,6,1,59],[22,4,4,11],[38,4,5,12],[70,5,6,27],[134,5,7,28],[262,6,7,60],[390,7,8,125],[646,6,10,61],[-16,9,32,510,"lower"],[1670,9,32,511],[2,1]];break;case 9:t=[[-31,8,4,252],[-15,9,2,508],[-11,8,2,253],[-7,9,1,509],[-5,7,1,124],[-3,4,1,10],[-1,3,1,2],[1,3,1,3],[3,5,1,26],[5,6,1,58],[7,3,5,4],[39,6,2,59],[43,4,5,11],[75,4,6,12],[139,5,7,27],[267,5,8,28],[523,6,8,60],[779,7,9,125],[1291,6,11,61],[-32,9,32,510,"lower"],[3339,9,32,511],[2,0]];break;case 10:t=[[-21,7,4,122],[-5,8,0,252],[-4,7,0,123],[-3,5,0,24],[-2,2,2,0],[2,5,0,25],[3,6,0,54],[4,7,0,124],[5,8,0,253],[6,2,6,1],[70,5,5,26],[102,6,5,55],[134,6,6,56],[198,6,7,57],[326,6,8,58],[582,6,9,59],[1094,6,10,60],[2118,7,11,125],[-22,8,32,254,"lower"],[4166,8,32,255],[2,2]];break;case 11:t=[[1,1,0,0],[2,2,1,2],[4,4,0,12],[5,4,1,13],[7,5,1,28],[9,5,2,29],[13,6,2,60],[17,7,2,122],[21,7,3,123],[29,7,4,124],[45,7,5,125],[77,7,6,126],[141,7,32,127]];break;case 12:t=[[1,1,0,0],[2,2,0,2],[3,3,1,6],[5,5,0,28],[6,5,1,29],[8,6,1,60],[10,7,0,122],[11,7,1,123],[13,7,2,124],[17,7,3,125],[25,7,4,126],[41,8,5,254],[73,8,32,255]];break;case 13:t=[[1,1,0,0],[2,3,0,4],[3,4,0,12],[4,5,0,28],[5,4,1,13],[7,3,3,5],[15,6,1,58],[17,6,2,59],[21,6,3,60],[29,6,4,61],[45,6,5,62],[77,7,6,126],[141,7,32,127]];break;case 14:t=[[-2,3,0,4],[-1,3,0,5],[0,1,0,0],[1,3,0,6],[2,3,0,7]];break;case 15:t=[[-24,7,4,124],[-8,6,2,60],[-4,5,1,28],[-2,4,0,12],[-1,3,0,4],[0,1,0,0],[1,3,0,5],[2,4,0,13],[3,5,1,29],[5,6,2,61],[9,7,4,125],[-25,7,32,126,"lower"],[25,7,32,127]];break;default:throw new p("standard table B.".concat(e," does not exist"))}for(var n=0,a=t.length;n<a;n++)t[n]=new R(t[n]);return r=new N(t,!0),B[e]=r,r}var L=function(){function e(t,r,n){l(this,e),this.data=t,this.start=r,this.end=n,this.position=r,this.shift=-1,this.currentByte=0}return u(e,[{key:"readBit",value:function(){if(this.shift<0){if(this.position>=this.end)throw new p("end of data while reading bit");this.currentByte=this.data[this.position++],this.shift=7}var e=this.currentByte>>this.shift&1;return this.shift--,e}},{key:"readBits",value:function(e){var t,r=0;for(t=e-1;t>=0;t--)r|=this.readBit()<<t;return r}},{key:"byteAlign",value:function(){this.shift=-1}},{key:"next",value:function(){return this.position>=this.end?-1:this.data[this.position++]}}]),e}();function U(e,t,r){for(var n=0,a=0,i=t.length;a<i;a++){var o=r[t[a]];if(o){if(e===n)return o;n++}}throw new p("can't find custom Huffman table")}function q(e,t,r){for(var n=[],a=0;a<r;a++){var i=new Uint8Array(t);n.push(i);for(var o=0;o<t;o++)i[o]=e.readBit();e.byteAlign()}return n}function X(e,t,r,n){for(var a,i={K:-1,Columns:t,Rows:r,BlackIs1:!0,EndOfBlock:n},o=new s.CCITTFaxDecoder(e,i),c=[],u=!1,l=0;l<r;l++){var f=new Uint8Array(t);c.push(f);for(var h=-1,d=0;d<t;d++)h<0&&(-1===(a=o.readNextChar())&&(a=0,u=!0),h=7),f[d]=a>>h&1,h--}if(n&&!u)for(var p=0;p<5&&-1!==o.readNextChar();p++);return c}var H=function(){function e(){l(this,e)}return u(e,[{key:"parseChunks",value:function(e){return function(e){for(var t=new j,r=0,n=e.length;r<n;r++){var a=e[r];E(F({},a.data,a.start,a.end),t)}return t.buffer}(e)}},{key:"parse",value:function(e){var t=function(e){var t=e.length,r=0;if(151!==e[r]||74!==e[r+1]||66!==e[r+2]||50!==e[r+3]||13!==e[r+4]||10!==e[r+5]||26!==e[r+6]||10!==e[r+7])throw new p("parseJbig2 - invalid header.");var n=Object.create(null);r+=8;var a=e[r++];n.randomAccess=!(1&a),2&a||(n.numberOfPages=(0,i.readUint32)(e,r),r+=4);var o=F(n,e,r,t),s=new j;E(o,s);for(var c=s.currentPageInfo,u=c.width,l=c.height,f=s.buffer,h=new Uint8ClampedArray(u*l),d=0,g=0,m=0;m<l;m++)for(var v=0,y=void 0,b=0;b<u;b++)v||(v=128,y=f[g++]),h[d++]=y&v?0:255,v>>=1;return{imgData:h,width:u,height:l}}(e),r=t.imgData,n=t.width,a=t.height;return this.width=n,this.height=a,r}}]),e}();t.Jbig2Image=H},(e,t)=>{"use strict";function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.ArithmeticDecoder=void 0;var n=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}],a=function(){function e(t,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data=t,this.bp=r,this.dataEnd=n,this.chigh=t[r],this.clow=0,this.byteIn(),this.chigh=this.chigh<<7&65535|this.clow>>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}var t,a,i;return t=e,(a=[{key:"byteIn",value:function(){var e=this.data,t=this.bp;255===e[t]?e[t+1]>143?(this.clow+=65280,this.ct=8):(t++,this.clow+=e[t]<<9,this.ct=7,this.bp=t):(t++,this.clow+=t<this.dataEnd?e[t]<<8:65280,this.ct=8,this.bp=t),this.clow>65535&&(this.chigh+=this.clow>>16,this.clow&=65535)}},{key:"readBit",value:function(e,t){var r,a=e[t]>>1,i=1&e[t],o=n[a],s=o.qe,c=this.a-s;if(this.chigh<s)c<s?(c=s,r=i,a=o.nmps):(c=s,r=1^i,1===o.switchFlag&&(i=r),a=o.nlps);else{if(this.chigh-=s,0!=(32768&c))return this.a=c,i;c<s?(r=1^i,1===o.switchFlag&&(i=r),a=o.nlps):(r=i,a=o.nmps)}do{0===this.ct&&this.byteIn(),c<<=1,this.chigh=this.chigh<<1&65535|this.clow>>15&1,this.clow=this.clow<<1&65535,this.ct--}while(0==(32768&c));return this.a=c,e[t]=a<<1|i,r}}])&&r(t.prototype,a),i&&r(t,i),e}();t.ArithmeticDecoder=a},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.JpegStream=void 0;var a=r(127),i=r(113),o=r(136),s=r(4);function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=f(e);if(t){var i=f(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(h,a.DecodeStream);var t,r,n,f=l(h);function h(e,t,r){var n,a;for(!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h);-1!==(a=e.getByte());)if(255===a){e.skip(-1);break}return(n=f.call(this,t)).stream=e,n.dict=e.dict,n.maybeLength=t,n.params=r,n}return t=h,(r=[{key:"bytes",get:function(){return(0,s.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))}},{key:"ensureBuffer",value:function(e){}},{key:"readBlock",value:function(){if(!this.eof){var e={decodeTransform:void 0,colorTransform:void 0},t=this.dict.getArray("Decode","D");if(this.forceRGB&&Array.isArray(t)){for(var r=this.dict.get("BitsPerComponent")||8,n=t.length,a=new Int32Array(n),s=!1,c=(1<<r)-1,u=0;u<n;u+=2)a[u]=256*(t[u+1]-t[u])|0,a[u+1]=t[u]*c|0,256===a[u]&&0===a[u+1]||(s=!0);s&&(e.decodeTransform=a)}if((0,i.isDict)(this.params)){var l=this.params.get("ColorTransform");Number.isInteger(l)&&(e.colorTransform=l)}var f=new o.JpegImage(e);f.parse(this.bytes);var h=f.getData({width:this.drawWidth,height:this.drawHeight,forceRGB:this.forceRGB,isSourcePDF:!0});this.buffer=h,this.bufferLength=h.length,this.eof=!0}}}])&&c(t.prototype,r),n&&c(t,n),h}();t.JpegStream=h},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JpegImage=void 0;var n=r(4),a=r(117);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,n=f(e);if(t){var a=f(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){c(r,n.BaseException);var t=l(r);function r(e){return s(this,r),t.call(this,"JPEG error: ".concat(e))}return r}(),d=function(e){c(r,n.BaseException);var t=l(r);function r(e,n){var a;return s(this,r),(a=t.call(this,e)).scanLines=n,a}return r}(),p=function(e){c(r,n.BaseException);var t=l(r);function r(){return s(this,r),t.apply(this,arguments)}return r}(),g=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),m=4017,v=799,y=3406,b=2276,w=1567,k=3784,S=5793,x=2896;function A(e,t){for(var r,n,a=0,i=16;i>0&&!e[i-1];)i--;var o,s=[{children:[],index:0}],c=s[0];for(r=0;r<i;r++){for(n=0;n<e[r];n++){for((c=s.pop()).children[c.index]=t[a];c.index>0;)c=s.pop();for(c.index++,s.push(c);s.length<=r;)s.push(o={children:[],index:0}),c.children[c.index]=o.children,c=o;a++}r+1<i&&(s.push(o={children:[],index:0}),c.children[c.index]=o.children,c=o)}return s[0].children}function O(e,t,r){return 64*((e.blocksPerLine+1)*t+r)}function C(e,t,r,i,s,c,u,l,f){var m=arguments.length>9&&void 0!==arguments[9]&&arguments[9],v=r.mcusPerLine,y=r.progressive,b=t,w=0,k=0;function S(){if(k>0)return w>>--k&1;if(255===(w=e[t++])){var n=e[t++];if(n){if(220===n&&m){t+=2;var i=(0,a.readUint16)(e,t);if(t+=2,i>0&&i!==r.scanLines)throw new d("Found DNL marker (0xFFDC) while parsing scan data",i)}else if(217===n){if(m){var o=I*(8===r.precision?8:0);if(o>0&&Math.round(r.scanLines/o)>=10)throw new d("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",o)}throw new p("Found EOI marker (0xFFD9) while parsing scan data")}throw new h("unexpected marker ".concat((w<<8|n).toString(16)))}}return k=7,w>>>7}function x(e){for(var t=e;;){switch(o(t=t[S()])){case"number":return t;case"object":continue}throw new h("invalid huffman sequence")}}function A(e){for(var t=0;e>0;)t=t<<1|S(),e--;return t}function C(e){if(1===e)return 1===S()?1:-1;var t=A(e);return t>=1<<e-1?t:t+(-1<<e)+1}var T=0;var F,P=0;var I=0;function E(e,t,r,n,a){var i=r%v;I=(r/v|0)*e.v+n;var o=i*e.h+a;t(e,O(e,I,o))}function j(e,t,r){I=r/e.blocksPerLine|0;var n=r%e.blocksPerLine;t(e,O(e,I,n))}var R,M,N,B,D,L,U=i.length;L=y?0===c?0===l?function(e,t){var r=x(e.huffmanTableDC),n=0===r?0:C(r)<<f;e.blockData[t]=e.pred+=n}:function(e,t){e.blockData[t]|=S()<<f}:0===l?function(e,t){if(T>0)T--;else for(var r=c,n=u;r<=n;){var a=x(e.huffmanTableAC),i=15&a,o=a>>4;if(0!==i){var s=g[r+=o];e.blockData[t+s]=C(i)*(1<<f),r++}else{if(o<15){T=A(o)+(1<<o)-1;break}r+=16}}}:function(e,t){for(var r,n,a=c,i=u,o=0;a<=i;){var s=t+g[a],l=e.blockData[s]<0?-1:1;switch(P){case 0:if(o=(n=x(e.huffmanTableAC))>>4,0==(r=15&n))o<15?(T=A(o)+(1<<o),P=4):(o=16,P=1);else{if(1!==r)throw new h("invalid ACn encoding");F=C(r),P=o?2:3}continue;case 1:case 2:e.blockData[s]?e.blockData[s]+=l*(S()<<f):0==--o&&(P=2===P?3:0);break;case 3:e.blockData[s]?e.blockData[s]+=l*(S()<<f):(e.blockData[s]=F<<f,P=0);break;case 4:e.blockData[s]&&(e.blockData[s]+=l*(S()<<f))}a++}4===P&&0==--T&&(P=0)}:function(e,t){var r=x(e.huffmanTableDC),n=0===r?0:C(r);e.blockData[t]=e.pred+=n;for(var a=1;a<64;){var i=x(e.huffmanTableAC),o=15&i,s=i>>4;if(0!==o){var c=g[a+=s];e.blockData[t+c]=C(o),a++}else{if(s<15)break;a+=16}}};var q,X,H,$,z=0;for(X=1===U?i[0].blocksPerLine*i[0].blocksPerColumn:v*r.mcusPerColumn;z<=X;){var G=s?Math.min(X-z,s):X;if(G>0){for(M=0;M<U;M++)i[M].pred=0;if(T=0,1===U)for(R=i[0],D=0;D<G;D++)j(R,L,z),z++;else for(D=0;D<G;D++){for(M=0;M<U;M++)for(H=(R=i[M]).h,$=R.v,N=0;N<$;N++)for(B=0;B<H;B++)E(R,L,z,N,B);z++}}if(k=0,!(q=_(e,t)))break;if(q.invalid){var W=G>0?"unexpected":"excessive";(0,n.warn)("decodeScan - ".concat(W," MCU data, current marker is: ").concat(q.invalid)),t=q.offset}if(!(q.marker>=65488&&q.marker<=65495))break;t+=2}return t-b}function T(e,t,r){var n,a,i,o,s,c,u,l,f,d,p,g,A,O,C,T,F,_=e.quantizationTable,P=e.blockData;if(!_)throw new h("missing required Quantization Table.");for(var I=0;I<64;I+=8)f=P[t+I],d=P[t+I+1],p=P[t+I+2],g=P[t+I+3],A=P[t+I+4],O=P[t+I+5],C=P[t+I+6],T=P[t+I+7],f*=_[I],0!=(d|p|g|A|O|C|T)?(d*=_[I+1],p*=_[I+2],g*=_[I+3],A*=_[I+4],O*=_[I+5],C*=_[I+6],T*=_[I+7],a=(n=(n=S*f+128>>8)+(a=S*A+128>>8)+1>>1)-a,F=(i=p)*k+(o=C)*w+128>>8,i=i*w-o*k+128>>8,u=(s=(s=x*(d-T)+128>>8)+(u=O<<4)+1>>1)-u,c=(l=(l=x*(d+T)+128>>8)+(c=g<<4)+1>>1)-c,o=(n=n+(o=F)+1>>1)-o,i=(a=a+i+1>>1)-i,F=s*b+l*y+2048>>12,s=s*y-l*b+2048>>12,l=F,F=c*v+u*m+2048>>12,c=c*m-u*v+2048>>12,u=F,r[I]=n+l,r[I+7]=n-l,r[I+1]=a+u,r[I+6]=a-u,r[I+2]=i+c,r[I+5]=i-c,r[I+3]=o+s,r[I+4]=o-s):(F=S*f+512>>10,r[I]=F,r[I+1]=F,r[I+2]=F,r[I+3]=F,r[I+4]=F,r[I+5]=F,r[I+6]=F,r[I+7]=F);for(var E=0;E<8;++E)f=r[E],0!=((d=r[E+8])|(p=r[E+16])|(g=r[E+24])|(A=r[E+32])|(O=r[E+40])|(C=r[E+48])|(T=r[E+56]))?(a=(n=4112+((n=S*f+2048>>12)+(a=S*A+2048>>12)+1>>1))-a,F=(i=p)*k+(o=C)*w+2048>>12,i=i*w-o*k+2048>>12,o=F,u=(s=(s=x*(d-T)+2048>>12)+(u=O)+1>>1)-u,c=(l=(l=x*(d+T)+2048>>12)+(c=g)+1>>1)-c,F=s*b+l*y+2048>>12,s=s*y-l*b+2048>>12,l=F,F=c*v+u*m+2048>>12,c=c*m-u*v+2048>>12,(f=(n=n+o+1>>1)+l)<16?f=0:f>=4080?f=255:f>>=4,(d=(a=a+i+1>>1)+(u=F))<16?d=0:d>=4080?d=255:d>>=4,(p=(i=a-i)+c)<16?p=0:p>=4080?p=255:p>>=4,(g=(o=n-o)+s)<16?g=0:g>=4080?g=255:g>>=4,(A=o-s)<16?A=0:A>=4080?A=255:A>>=4,(O=i-c)<16?O=0:O>=4080?O=255:O>>=4,(C=a-u)<16?C=0:C>=4080?C=255:C>>=4,(T=n-l)<16?T=0:T>=4080?T=255:T>>=4,P[t+E]=f,P[t+E+8]=d,P[t+E+16]=p,P[t+E+24]=g,P[t+E+32]=A,P[t+E+40]=O,P[t+E+48]=C,P[t+E+56]=T):(F=(F=S*f+8192>>14)<-2040?0:F>=2024?255:F+2056>>4,P[t+E]=F,P[t+E+8]=F,P[t+E+16]=F,P[t+E+24]=F,P[t+E+32]=F,P[t+E+40]=F,P[t+E+48]=F,P[t+E+56]=F)}function F(e,t){for(var r=t.blocksPerLine,n=t.blocksPerColumn,a=new Int16Array(64),i=0;i<n;i++)for(var o=0;o<r;o++){T(t,O(t,i,o),a)}return t.blockData}function _(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=e.length-1,i=r<t?r:t;if(t>=n)return null;var o=(0,a.readUint16)(e,t);if(o>=65472&&o<=65534)return{invalid:null,marker:o,offset:t};for(var s=(0,a.readUint16)(e,i);!(s>=65472&&s<=65534);){if(++i>=n)return null;s=(0,a.readUint16)(e,i)}return{invalid:o.toString(16),marker:s,offset:i}}var P=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.decodeTransform,n=void 0===r?null:r,a=t.colorTransform,i=void 0===a?-1:a;s(this,e),this._decodeTransform=n,this._colorTransform=i}var t,r,o;return t=e,(r=[{key:"parse",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).dnlScanLines,r=void 0===t?null:t;function i(){var t=(0,a.readUint16)(e,u),r=(u+=2)+t-2,i=_(e,r,u);i&&i.invalid&&((0,n.warn)("readDataBlock - incorrect length, current marker is: "+i.invalid),r=i.offset);var o=e.subarray(u,r);return u+=o.length,o}function o(e){for(var t=Math.ceil(e.samplesPerLine/8/e.maxH),r=Math.ceil(e.scanLines/8/e.maxV),n=0,a=e.components.length;n<a;n++){var i=e.components[n],o=Math.ceil(Math.ceil(e.samplesPerLine/8)*i.h/e.maxH),s=Math.ceil(Math.ceil(e.scanLines/8)*i.v/e.maxV),c=t*i.h,u=64*(r*i.v)*(c+1);i.blockData=new Int16Array(u),i.blocksPerLine=o,i.blocksPerColumn=s}e.mcusPerLine=t,e.mcusPerColumn=r}var s,c,u=0,l=null,f=null,m=0,v=[],y=[],b=[],w=(0,a.readUint16)(e,u);if(u+=2,65496!==w)throw new h("SOI not found");w=(0,a.readUint16)(e,u),u+=2;e:for(;65497!==w;){var k=void 0,S=void 0,x=void 0;switch(w){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var O=i();65504===w&&74===O[0]&&70===O[1]&&73===O[2]&&70===O[3]&&0===O[4]&&(l={version:{major:O[5],minor:O[6]},densityUnits:O[7],xDensity:O[8]<<8|O[9],yDensity:O[10]<<8|O[11],thumbWidth:O[12],thumbHeight:O[13],thumbData:O.subarray(14,14+3*O[12]*O[13])}),65518===w&&65===O[0]&&100===O[1]&&111===O[2]&&98===O[3]&&101===O[4]&&(f={version:O[5]<<8|O[6],flags0:O[7]<<8|O[8],flags1:O[9]<<8|O[10],transformCode:O[11]});break;case 65499:for(var T=(0,a.readUint16)(e,u)+(u+=2)-2;u<T;){var P=e[u++],I=new Uint16Array(64);if(P>>4==0)for(S=0;S<64;S++)I[g[S]]=e[u++];else{if(P>>4!=1)throw new h("DQT - invalid table spec");for(S=0;S<64;S++)I[g[S]]=(0,a.readUint16)(e,u),u+=2}v[15&P]=I}break;case 65472:case 65473:case 65474:if(s)throw new h("Only single frame JPEGs supported");u+=2,(s={}).extended=65473===w,s.progressive=65474===w,s.precision=e[u++];var E=(0,a.readUint16)(e,u);u+=2,s.scanLines=r||E,s.samplesPerLine=(0,a.readUint16)(e,u),u+=2,s.components=[],s.componentIds={};var j=e[u++],R=0,M=0;for(k=0;k<j;k++){var N=e[u],B=e[u+1]>>4,D=15&e[u+1];R<B&&(R=B),M<D&&(M=D);var L=e[u+2];x=s.components.push({h:B,v:D,quantizationId:L,quantizationTable:null}),s.componentIds[N]=x-1,u+=3}s.maxH=R,s.maxV=M,o(s);break;case 65476:var U=(0,a.readUint16)(e,u);for(u+=2,k=2;k<U;){var q=e[u++],X=new Uint8Array(16),H=0;for(S=0;S<16;S++,u++)H+=X[S]=e[u];var $=new Uint8Array(H);for(S=0;S<H;S++,u++)$[S]=e[u];k+=17+H,(q>>4==0?b:y)[15&q]=A(X,$)}break;case 65501:u+=2,c=(0,a.readUint16)(e,u),u+=2;break;case 65498:var z=1==++m&&!r;u+=2;var G=e[u++],W=[];for(k=0;k<G;k++){var V=e[u++],K=s.componentIds[V],Y=s.components[K];Y.index=V;var J=e[u++];Y.huffmanTableDC=b[J>>4],Y.huffmanTableAC=y[15&J],W.push(Y)}var Z=e[u++],Q=e[u++],ee=e[u++];try{var te=C(e,u,s,W,c,Z,Q,ee>>4,15&ee,z);u+=te}catch(t){if(t instanceof d)return(0,n.warn)("".concat(t.message," -- attempting to re-parse the JPEG image.")),this.parse(e,{dnlScanLines:t.scanLines});if(t instanceof p){(0,n.warn)("".concat(t.message," -- ignoring the rest of the image data."));break e}throw t}break;case 65500:u+=4;break;case 65535:255!==e[u]&&u--;break;default:var re=_(e,u-2,u-3);if(re&&re.invalid){(0,n.warn)("JpegImage.parse - unexpected data, current marker is: "+re.invalid),u=re.offset;break}if(!re||u>=e.length-1){(0,n.warn)("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break e}throw new h("JpegImage.parse - unknown marker: "+w.toString(16))}w=(0,a.readUint16)(e,u),u+=2}this.width=s.samplesPerLine,this.height=s.scanLines,this.jfif=l,this.adobe=f,this.components=[];for(var ne=0,ae=s.components.length;ne<ae;ne++){var ie=s.components[ne],oe=v[ie.quantizationId];oe&&(ie.quantizationTable=oe),this.components.push({index:ie.index,output:F(0,ie),scaleX:ie.h/s.maxH,scaleY:ie.v/s.maxV,blocksPerLine:ie.blocksPerLine,blocksPerColumn:ie.blocksPerColumn})}this.numComponents=this.components.length}},{key:"_getLinearizedBlockData",value:function(e,t){var r,n,a,i,o,s,c,u,l,f,h,d,p=arguments.length>2&&void 0!==arguments[2]&&arguments[2],g=this.width/e,m=this.height/t,v=0,y=this.components.length,b=e*t*y,w=new Uint8ClampedArray(b),k=new Uint32Array(e);for(c=0;c<y;c++){if(n=(r=this.components[c]).scaleX*g,a=r.scaleY*m,v=c,h=r.output,i=r.blocksPerLine+1<<3,n!==d){for(o=0;o<e;o++)u=0|o*n,k[o]=(4294967288&u)<<3|7&u;d=n}for(s=0;s<t;s++)for(f=i*(4294967288&(u=0|s*a))|(7&u)<<3,o=0;o<e;o++)w[v]=h[f+k[o]],v+=y}var S=this._decodeTransform;if(p||4!==y||S||(S=new Int32Array([-256,255,-256,255,-256,255,-256,255])),S)for(c=0;c<b;)for(u=0,l=0;u<y;u++,c++,l+=2)w[c]=(w[c]*S[l]>>8)+S[l+1];return w}},{key:"_isColorConversionNeeded",get:function(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this._colorTransform&&(82!==this.components[0].index||71!==this.components[1].index||66!==this.components[2].index):1===this._colorTransform}},{key:"_convertYccToRgb",value:function(e){for(var t,r,n,a=0,i=e.length;a<i;a+=3)t=e[a],r=e[a+1],n=e[a+2],e[a]=t-179.456+1.402*n,e[a+1]=t+135.459-.344*r-.714*n,e[a+2]=t-226.816+1.772*r;return e}},{key:"_convertYcckToRgb",value:function(e){for(var t,r,n,a,i=0,o=0,s=e.length;o<s;o+=4)t=e[o],r=e[o+1],n=e[o+2],a=e[o+3],e[i++]=r*(-660635669420364e-19*r+.000437130475926232*n-54080610064599e-18*t+.00048449797120281*a-.154362151871126)-122.67195406894+n*(-.000957964378445773*n+.000817076911346625*t-.00477271405408747*a+1.53380253221734)+t*(.000961250184130688*t-.00266257332283933*a+.48357088451265)+a*(-.000336197177618394*a+.484791561490776),e[i++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*n+.000659397001245577*t+.000426105652938837*a-.176491792462875)+n*(-.000778269941513683*n+.00130872261408275*t+.000770482631801132*a-.151051492775562)+t*(.00126935368114843*t-.00265090189010898*a+.25802910206845)+a*(-.000318913117588328*a-.213742400323665),e[i++]=r*(-.000570115196973677*r-263409051004589e-19*n+.0020741088115012*t-.00288260236853442*a+.814272968359295)-20.810012546947+n*(-153496057440975e-19*n-.000132689043961446*t+.000560833691242812*a-.195152027534049)+t*(.00174418132927582*t-.00255243321439347*a+.116935020465145)+a*(-.000343531996510555*a+.24165260232407);return e.subarray(0,i)}},{key:"_convertYcckToCmyk",value:function(e){for(var t,r,n,a=0,i=e.length;a<i;a+=4)t=e[a],r=e[a+1],n=e[a+2],e[a]=434.456-t-1.402*n,e[a+1]=119.541-t+.344*r+.714*n,e[a+2]=481.816-t-1.772*r;return e}},{key:"_convertCmykToRgb",value:function(e){for(var t,r,n,a,i=0,o=0,s=e.length;o<s;o+=4)t=e[o],r=e[o+1],n=e[o+2],a=e[o+3],e[i++]=255+t*(-6747147073602441e-20*t+.0008379262121013727*r+.0002894718188643294*n+.003264231057537806*a-1.1185611867203937)+r*(26374107616089405e-21*r-8626949158638572e-20*n-.0002748769067499491*a-.02155688794978967)+n*(-3878099212869363e-20*n-.0003267808279485286*a+.0686742238595345)-a*(.0003361971776183937*a+.7430659151342254),e[i++]=255+t*(.00013596372813588848*t+.000924537132573585*r+.00010567359618683593*n+.0004791864687436512*a-.3109689587515875)+r*(-.00023545346108370344*r+.0002702845253534714*n+.0020200308977307156*a-.7488052167015494)+n*(6834815998235662e-20*n+.00015168452363460973*a-.09751927774728933)-a*(.0003189131175883281*a+.7364883807733168),e[i++]=255+t*(13598650411385307e-21*t+.00012423956175490851*r+.0004751985097583589*n-36729317476630422e-22*a-.05562186980264034)+r*(.00016141380598724676*r+.0009692239130725186*n+.0007782692450036253*a-.44015232367526463)+n*(5.068882914068769e-7*n+.0017778369011375071*a-.7591454649749609)-a*(.0003435319965105553*a+.7063770186160144);return e.subarray(0,i)}},{key:"getData",value:function(e){var t=e.width,r=e.height,n=e.forceRGB,a=void 0!==n&&n,i=e.isSourcePDF,o=void 0!==i&&i;if(this.numComponents>4)throw new h("Unsupported color mode");var s=this._getLinearizedBlockData(t,r,o);if(1===this.numComponents&&a){for(var c=s.length,u=new Uint8ClampedArray(3*c),l=0,f=0;f<c;f++){var d=s[f];u[l++]=d,u[l++]=d,u[l++]=d}return u}if(3===this.numComponents&&this._isColorConversionNeeded)return this._convertYccToRgb(s);if(4===this.numComponents){if(this._isColorConversionNeeded)return a?this._convertYcckToRgb(s):this._convertYcckToCmyk(s);if(a)return this._convertCmykToRgb(s)}return s}}])&&i(t.prototype,r),o&&i(t,o),e}();t.JpegImage=P},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.JpxStream=void 0;var a=r(127),i=r(138),o=r(4);function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(f,a.DecodeStream);var t,r,n,l=u(f);function f(e,t,r){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(n=l.call(this,t)).stream=e,n.dict=e.dict,n.maybeLength=t,n.params=r,n}return t=f,(r=[{key:"bytes",get:function(){return(0,o.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))}},{key:"ensureBuffer",value:function(e){}},{key:"readBlock",value:function(){if(!this.eof){var e=new i.JpxImage;e.parse(this.bytes);var t=e.width,r=e.height,n=e.componentsCount,a=e.tiles.length;if(1===a)this.buffer=e.tiles[0].items;else{for(var o=new Uint8ClampedArray(t*r*n),s=0;s<a;s++)for(var c=e.tiles[s],u=c.width,l=c.height,f=c.left,h=c.top,d=c.items,p=0,g=(t*h+f)*n,m=t*n,v=u*n,y=0;y<l;y++){var b=d.subarray(p,p+v);o.set(b,g),p+=v,g+=m}this.buffer=o}this.bufferLength=this.buffer.length,this.eof=!0}}}])&&s(t.prototype,r),n&&s(t,n),f}();t.JpxStream=f},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.JpxImage=void 0;var a=r(4),i=r(117),o=r(134);function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=d(e);if(t){var i=d(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){l(r,a.BaseException);var t=h(r);function r(e){return u(this,r),t.call(this,"JPX error: ".concat(e))}return r}(),g={LL:0,LH:1,HL:1,HH:2},m=function(){function e(){u(this,e),this.failOnCorruptedImage=!1}return c(e,[{key:"parse",value:function(e){if(65359!==(0,i.readUint16)(e,0))for(var t=e.length,r=0;r<t;){var n=8,o=(0,i.readUint32)(e,r),s=(0,i.readUint32)(e,r+4);if(r+=n,1===o&&(o=4294967296*(0,i.readUint32)(e,r)+(0,i.readUint32)(e,r+4),r+=8,n+=8),0===o&&(o=t-r+n),o<n)throw new p("Invalid box field size");var c=o-n,u=!0;switch(s){case 1785737832:u=!1;break;case 1668246642:var l=e[r];if(1===l){var f=(0,i.readUint32)(e,r+3);switch(f){case 16:case 17:case 18:break;default:(0,a.warn)("Unknown colorspace "+f)}}else 2===l&&(0,a.info)("ICC profile not supported");break;case 1785737827:this.parseCodestream(e,r,r+c);break;case 1783636e3:218793738!==(0,i.readUint32)(e,r)&&(0,a.warn)("Invalid JP2 signature");break;case 1783634458:case 1718909296:case 1920099697:case 1919251232:case 1768449138:break;default:var h=String.fromCharCode(s>>24&255,s>>16&255,s>>8&255,255&s);(0,a.warn)("Unsupported header type ".concat(s," (").concat(h,")."))}u&&(r+=c)}else this.parseCodestream(e,0,e.length)}},{key:"parseImageProperties",value:function(e){for(var t=e.getByte();t>=0;){if(65361===(t<<8|(t=e.getByte()))){e.skip(4);var r=e.getInt32()>>>0,n=e.getInt32()>>>0,a=e.getInt32()>>>0,i=e.getInt32()>>>0;e.skip(16);var o=e.getUint16();return this.width=r-a,this.height=n-i,this.componentsCount=o,void(this.bitsPerComponent=8)}}throw new p("No size marker found in JPX stream")}},{key:"parseCodestream",value:function(e,t,r){var n={},o=!1;try{for(var s=t;s+1<r;){var c=(0,i.readUint16)(e,s);s+=2;var u=0,l=void 0,f=void 0,h=void 0,d=void 0,g=void 0,m=void 0;switch(c){case 65359:n.mainHeader=!0;break;case 65497:break;case 65361:u=(0,i.readUint16)(e,s);var b={};b.Xsiz=(0,i.readUint32)(e,s+4),b.Ysiz=(0,i.readUint32)(e,s+8),b.XOsiz=(0,i.readUint32)(e,s+12),b.YOsiz=(0,i.readUint32)(e,s+16),b.XTsiz=(0,i.readUint32)(e,s+20),b.YTsiz=(0,i.readUint32)(e,s+24),b.XTOsiz=(0,i.readUint32)(e,s+28),b.YTOsiz=(0,i.readUint32)(e,s+32);var w=(0,i.readUint16)(e,s+36);b.Csiz=w;var k=[];l=s+38;for(var S=0;S<w;S++){var x={precision:1+(127&e[l]),isSigned:!!(128&e[l]),XRsiz:e[l+1],YRsiz:e[l+2]};l+=3,v(x,b),k.push(x)}n.SIZ=b,n.components=k,y(n,k),n.QCC=[],n.COC=[];break;case 65372:u=(0,i.readUint16)(e,s);var A={};switch(l=s+2,31&(f=e[l++])){case 0:d=8,g=!0;break;case 1:d=16,g=!1;break;case 2:d=16,g=!0;break;default:throw new Error("Invalid SQcd value "+f)}for(A.noQuantization=8===d,A.scalarExpounded=g,A.guardBits=f>>5,h=[];l<u+s;){var O={};8===d?(O.epsilon=e[l++]>>3,O.mu=0):(O.epsilon=e[l]>>3,O.mu=(7&e[l])<<8|e[l+1],l+=2),h.push(O)}A.SPqcds=h,n.mainHeader?n.QCD=A:(n.currentTile.QCD=A,n.currentTile.QCC=[]);break;case 65373:u=(0,i.readUint16)(e,s);var C={};l=s+2;var T=void 0;switch(n.SIZ.Csiz<257?T=e[l++]:(T=(0,i.readUint16)(e,l),l+=2),31&(f=e[l++])){case 0:d=8,g=!0;break;case 1:d=16,g=!1;break;case 2:d=16,g=!0;break;default:throw new Error("Invalid SQcd value "+f)}for(C.noQuantization=8===d,C.scalarExpounded=g,C.guardBits=f>>5,h=[];l<u+s;){var F={};8===d?(F.epsilon=e[l++]>>3,F.mu=0):(F.epsilon=e[l]>>3,F.mu=(7&e[l])<<8|e[l+1],l+=2),h.push(F)}C.SPqcds=h,n.mainHeader?n.QCC[T]=C:n.currentTile.QCC[T]=C;break;case 65362:u=(0,i.readUint16)(e,s);var _={};l=s+2;var E=e[l++];_.entropyCoderWithCustomPrecincts=!!(1&E),_.sopMarkerUsed=!!(2&E),_.ephMarkerUsed=!!(4&E),_.progressionOrder=e[l++],_.layersCount=(0,i.readUint16)(e,l),l+=2,_.multipleComponentTransform=e[l++],_.decompositionLevelsCount=e[l++],_.xcb=2+(15&e[l++]),_.ycb=2+(15&e[l++]);var M=e[l++];if(_.selectiveArithmeticCodingBypass=!!(1&M),_.resetContextProbabilities=!!(2&M),_.terminationOnEachCodingPass=!!(4&M),_.verticallyStripe=!!(8&M),_.predictableTermination=!!(16&M),_.segmentationSymbolUsed=!!(32&M),_.reversibleTransformation=e[l++],_.entropyCoderWithCustomPrecincts){for(var N=[];l<u+s;){var B=e[l++];N.push({PPx:15&B,PPy:B>>4})}_.precinctsSizes=N}var D=[];_.selectiveArithmeticCodingBypass&&D.push("selectiveArithmeticCodingBypass"),_.resetContextProbabilities&&D.push("resetContextProbabilities"),_.terminationOnEachCodingPass&&D.push("terminationOnEachCodingPass"),_.verticallyStripe&&D.push("verticallyStripe"),_.predictableTermination&&D.push("predictableTermination"),D.length>0&&(o=!0,(0,a.warn)("JPX: Unsupported COD options (".concat(D.join(", "),")."))),n.mainHeader?n.COD=_:(n.currentTile.COD=_,n.currentTile.COC=[]);break;case 65424:u=(0,i.readUint16)(e,s),(m={}).index=(0,i.readUint16)(e,s+2),m.length=(0,i.readUint32)(e,s+4),m.dataEnd=m.length+s-2,m.partIndex=e[s+8],m.partsCount=e[s+9],n.mainHeader=!1,0===m.partIndex&&(m.COD=n.COD,m.COC=n.COC.slice(0),m.QCD=n.QCD,m.QCC=n.QCC.slice(0)),n.currentTile=m;break;case 65427:0===(m=n.currentTile).partIndex&&(R(n,m.index),P(n)),I(n,e,s,u=m.dataEnd-s);break;case 65363:(0,a.warn)("JPX: Codestream code 0xFF53 (COC) is not implemented.");case 65365:case 65367:case 65368:case 65380:u=(0,i.readUint16)(e,s);break;default:throw new Error("Unknown codestream code: "+c.toString(16))}s+=u}}catch(e){if(o||this.failOnCorruptedImage)throw new p(e.message);(0,a.warn)('JPX: Trying to recover from: "'.concat(e.message,'".'))}this.tiles=function(e){for(var t=e.SIZ,r=e.components,n=t.Csiz,a=[],i=0,o=e.tiles.length;i<o;i++){for(var s=e.tiles[i],c=[],u=0;u<n;u++)c[u]=j(e,s,u);var l=c[0],f=new Uint8ClampedArray(l.items.length*n),h={left:l.left,top:l.top,width:l.width,height:l.height,items:f},d=void 0,p=void 0,g=0,m=void 0,v=void 0,y=void 0,b=void 0,w=void 0;if(s.codingStyleDefaultParameters.multipleComponentTransform){var k=4===n,S=c[0].items,x=c[1].items,A=c[2].items,O=k?c[3].items:null;d=r[0].precision-8,p=.5+(128<<d);var C=s.components[0],T=n-3;if(v=S.length,C.codingStyleParameters.reversibleTransformation)for(m=0;m<v;m++,g+=T){y=S[m]+p,b=x[m],w=A[m];var F=y-(w+b>>2);f[g++]=F+w>>d,f[g++]=F>>d,f[g++]=F+b>>d}else for(m=0;m<v;m++,g+=T)y=S[m]+p,b=x[m],w=A[m],f[g++]=y+1.402*w>>d,f[g++]=y-.34413*b-.71414*w>>d,f[g++]=y+1.772*b>>d;if(k)for(m=0,g=3;m<v;m++,g+=4)f[g]=O[m]+p>>d}else for(var _=0;_<n;_++){var P=c[_].items;for(d=r[_].precision-8,p=.5+(128<<d),g=_,m=0,v=P.length;m<v;m++)f[g]=P[m]+p>>d,g+=n}a.push(h)}return a}(n),this.width=n.SIZ.Xsiz-n.SIZ.XOsiz,this.height=n.SIZ.Ysiz-n.SIZ.YOsiz,this.componentsCount=n.SIZ.Csiz}}]),e}();function v(e,t){e.x0=Math.ceil(t.XOsiz/e.XRsiz),e.x1=Math.ceil(t.Xsiz/e.XRsiz),e.y0=Math.ceil(t.YOsiz/e.YRsiz),e.y1=Math.ceil(t.Ysiz/e.YRsiz),e.width=e.x1-e.x0,e.height=e.y1-e.y0}function y(e,t){for(var r,n=e.SIZ,a=[],i=Math.ceil((n.Xsiz-n.XTOsiz)/n.XTsiz),o=Math.ceil((n.Ysiz-n.YTOsiz)/n.YTsiz),s=0;s<o;s++)for(var c=0;c<i;c++)(r={}).tx0=Math.max(n.XTOsiz+c*n.XTsiz,n.XOsiz),r.ty0=Math.max(n.YTOsiz+s*n.YTsiz,n.YOsiz),r.tx1=Math.min(n.XTOsiz+(c+1)*n.XTsiz,n.Xsiz),r.ty1=Math.min(n.YTOsiz+(s+1)*n.YTsiz,n.Ysiz),r.width=r.tx1-r.tx0,r.height=r.ty1-r.ty0,r.components=[],a.push(r);e.tiles=a;for(var u=0,l=n.Csiz;u<l;u++)for(var f=t[u],h=0,d=a.length;h<d;h++){var p={};r=a[h],p.tcx0=Math.ceil(r.tx0/f.XRsiz),p.tcy0=Math.ceil(r.ty0/f.YRsiz),p.tcx1=Math.ceil(r.tx1/f.XRsiz),p.tcy1=Math.ceil(r.ty1/f.YRsiz),p.width=p.tcx1-p.tcx0,p.height=p.tcy1-p.tcy0,r.components[u]=p}}function b(e,t,r){var n=t.codingStyleParameters,a={};return n.entropyCoderWithCustomPrecincts?(a.PPx=n.precinctsSizes[r].PPx,a.PPy=n.precinctsSizes[r].PPy):(a.PPx=15,a.PPy=15),a.xcb_=r>0?Math.min(n.xcb,a.PPx-1):Math.min(n.xcb,a.PPx),a.ycb_=r>0?Math.min(n.ycb,a.PPy-1):Math.min(n.ycb,a.PPy),a}function w(e,t,r){var n=1<<r.PPx,a=1<<r.PPy,i=0===t.resLevel,o=1<<r.PPx+(i?0:-1),s=1<<r.PPy+(i?0:-1),c=t.trx1>t.trx0?Math.ceil(t.trx1/n)-Math.floor(t.trx0/n):0,u=t.try1>t.try0?Math.ceil(t.try1/a)-Math.floor(t.try0/a):0,l=c*u;t.precinctParameters={precinctWidth:n,precinctHeight:a,numprecinctswide:c,numprecinctshigh:u,numprecincts:l,precinctWidthInSubband:o,precinctHeightInSubband:s}}function k(e,t,r){var n,a,i,o,s=r.xcb_,c=r.ycb_,u=1<<s,l=1<<c,f=t.tbx0>>s,h=t.tby0>>c,d=t.tbx1+u-1>>s,p=t.tby1+l-1>>c,g=t.resolution.precinctParameters,m=[],v=[];for(a=h;a<p;a++)for(n=f;n<d;n++){if((i={cbx:n,cby:a,tbx0:u*n,tby0:l*a,tbx1:u*(n+1),tby1:l*(a+1)}).tbx0_=Math.max(t.tbx0,i.tbx0),i.tby0_=Math.max(t.tby0,i.tby0),i.tbx1_=Math.min(t.tbx1,i.tbx1),i.tby1_=Math.min(t.tby1,i.tby1),o=Math.floor((i.tbx0_-t.tbx0)/g.precinctWidthInSubband)+Math.floor((i.tby0_-t.tby0)/g.precinctHeightInSubband)*g.numprecinctswide,i.precinctNumber=o,i.subbandType=t.type,i.Lblock=3,!(i.tbx1_<=i.tbx0_||i.tby1_<=i.tby0_)){m.push(i);var y=v[o];void 0!==y?(n<y.cbxMin?y.cbxMin=n:n>y.cbxMax&&(y.cbxMax=n),a<y.cbyMin?y.cbxMin=a:a>y.cbyMax&&(y.cbyMax=a)):v[o]=y={cbxMin:n,cbyMin:a,cbxMax:n,cbyMax:a},i.precinct=y}}t.codeblockParameters={codeblockWidth:s,codeblockHeight:c,numcodeblockwide:d-f+1,numcodeblockhigh:p-h+1},t.codeblocks=m,t.precincts=v}function S(e,t,r){for(var n=[],a=e.subbands,i=0,o=a.length;i<o;i++)for(var s=a[i].codeblocks,c=0,u=s.length;c<u;c++){var l=s[c];l.precinctNumber===t&&n.push(l)}return{layerNumber:r,codeblocks:n}}function x(e){for(var t=e.SIZ,r=e.currentTile.index,n=e.tiles[r],a=n.codingStyleDefaultParameters.layersCount,i=t.Csiz,o=0,s=0;s<i;s++)o=Math.max(o,n.components[s].codingStyleParameters.decompositionLevelsCount);var c=0,u=0,l=0,f=0;this.nextPacket=function(){for(;c<a;c++){for(;u<=o;u++){for(;l<i;l++){var e=n.components[l];if(!(u>e.codingStyleParameters.decompositionLevelsCount)){for(var t=e.resolutions[u],r=t.precinctParameters.numprecincts;f<r;){var s=S(t,f,c);return f++,s}f=0}}l=0}u=0}throw new p("Out of packets")}}function A(e){for(var t=e.SIZ,r=e.currentTile.index,n=e.tiles[r],a=n.codingStyleDefaultParameters.layersCount,i=t.Csiz,o=0,s=0;s<i;s++)o=Math.max(o,n.components[s].codingStyleParameters.decompositionLevelsCount);var c=0,u=0,l=0,f=0;this.nextPacket=function(){for(;c<=o;c++){for(;u<a;u++){for(;l<i;l++){var e=n.components[l];if(!(c>e.codingStyleParameters.decompositionLevelsCount)){for(var t=e.resolutions[c],r=t.precinctParameters.numprecincts;f<r;){var s=S(t,f,u);return f++,s}f=0}}l=0}u=0}throw new p("Out of packets")}}function O(e){var t,r,n,a,i=e.SIZ,o=e.currentTile.index,s=e.tiles[o],c=s.codingStyleDefaultParameters.layersCount,u=i.Csiz,l=0;for(n=0;n<u;n++){var f=s.components[n];l=Math.max(l,f.codingStyleParameters.decompositionLevelsCount)}var h=new Int32Array(l+1);for(r=0;r<=l;++r){var d=0;for(n=0;n<u;++n){var g=s.components[n].resolutions;r<g.length&&(d=Math.max(d,g[r].precinctParameters.numprecincts))}h[r]=d}t=0,r=0,n=0,a=0,this.nextPacket=function(){for(;r<=l;r++){for(;a<h[r];a++){for(;n<u;n++){var e=s.components[n];if(!(r>e.codingStyleParameters.decompositionLevelsCount)){var i=e.resolutions[r],o=i.precinctParameters.numprecincts;if(!(a>=o)){for(;t<c;){var f=S(i,a,t);return t++,f}t=0}}}n=0}a=0}throw new p("Out of packets")}}function C(e){var t=e.SIZ,r=e.currentTile.index,n=e.tiles[r],a=n.codingStyleDefaultParameters.layersCount,i=t.Csiz,o=_(n),s=o,c=0,u=0,l=0,f=0,h=0;this.nextPacket=function(){for(;h<s.maxNumHigh;h++){for(;f<s.maxNumWide;f++){for(;l<i;l++){for(var e=n.components[l],t=e.codingStyleParameters.decompositionLevelsCount;u<=t;u++){var r=e.resolutions[u],d=o.components[l].resolutions[u],g=F(f,h,d,s,r);if(null!==g){for(;c<a;){var m=S(r,g,c);return c++,m}c=0}}u=0}l=0}f=0}throw new p("Out of packets")}}function T(e){var t=e.SIZ,r=e.currentTile.index,n=e.tiles[r],a=n.codingStyleDefaultParameters.layersCount,i=t.Csiz,o=_(n),s=0,c=0,u=0,l=0,f=0;this.nextPacket=function(){for(;u<i;++u){for(var e=n.components[u],t=o.components[u],r=e.codingStyleParameters.decompositionLevelsCount;f<t.maxNumHigh;f++){for(;l<t.maxNumWide;l++){for(;c<=r;c++){var h=e.resolutions[c],d=t.resolutions[c],g=F(l,f,d,t,h);if(null!==g){for(;s<a;){var m=S(h,g,s);return s++,m}s=0}}c=0}l=0}f=0}throw new p("Out of packets")}}function F(e,t,r,n,a){var i=e*n.minWidth,o=t*n.minHeight;if(i%r.width!=0||o%r.height!=0)return null;var s=o/r.width*a.precinctParameters.numprecinctswide;return i/r.height+s}function _(e){for(var t=e.components.length,r=Number.MAX_VALUE,n=Number.MAX_VALUE,a=0,i=0,o=new Array(t),s=0;s<t;s++){for(var c=e.components[s],u=c.codingStyleParameters.decompositionLevelsCount,l=new Array(u+1),f=Number.MAX_VALUE,h=Number.MAX_VALUE,d=0,p=0,g=1,m=u;m>=0;--m){var v=c.resolutions[m],y=g*v.precinctParameters.precinctWidth,b=g*v.precinctParameters.precinctHeight;f=Math.min(f,y),h=Math.min(h,b),d=Math.max(d,v.precinctParameters.numprecinctswide),p=Math.max(p,v.precinctParameters.numprecinctshigh),l[m]={width:y,height:b},g<<=1}r=Math.min(r,f),n=Math.min(n,h),a=Math.max(a,d),i=Math.max(i,p),o[s]={resolutions:l,minWidth:f,minHeight:h,maxNumWide:d,maxNumHigh:p}}return{components:o,minWidth:r,minHeight:n,maxNumWide:a,maxNumHigh:i}}function P(e){for(var t=e.SIZ,r=e.currentTile.index,n=e.tiles[r],a=t.Csiz,i=0;i<a;i++){for(var o=n.components[i],s=o.codingStyleParameters.decompositionLevelsCount,c=[],u=[],l=0;l<=s;l++){var f=b(0,o,l),h={},d=1<<s-l;h.trx0=Math.ceil(o.tcx0/d),h.try0=Math.ceil(o.tcy0/d),h.trx1=Math.ceil(o.tcx1/d),h.try1=Math.ceil(o.tcy1/d),h.resLevel=l,w(0,h,f),c.push(h);var g=void 0;if(0===l)(g={}).type="LL",g.tbx0=Math.ceil(o.tcx0/d),g.tby0=Math.ceil(o.tcy0/d),g.tbx1=Math.ceil(o.tcx1/d),g.tby1=Math.ceil(o.tcy1/d),g.resolution=h,k(0,g,f),u.push(g),h.subbands=[g];else{var m=1<<s-l+1,v=[];(g={}).type="HL",g.tbx0=Math.ceil(o.tcx0/m-.5),g.tby0=Math.ceil(o.tcy0/m),g.tbx1=Math.ceil(o.tcx1/m-.5),g.tby1=Math.ceil(o.tcy1/m),g.resolution=h,k(0,g,f),u.push(g),v.push(g),(g={}).type="LH",g.tbx0=Math.ceil(o.tcx0/m),g.tby0=Math.ceil(o.tcy0/m-.5),g.tbx1=Math.ceil(o.tcx1/m),g.tby1=Math.ceil(o.tcy1/m-.5),g.resolution=h,k(0,g,f),u.push(g),v.push(g),(g={}).type="HH",g.tbx0=Math.ceil(o.tcx0/m-.5),g.tby0=Math.ceil(o.tcy0/m-.5),g.tbx1=Math.ceil(o.tcx1/m-.5),g.tby1=Math.ceil(o.tcy1/m-.5),g.resolution=h,k(0,g,f),u.push(g),v.push(g),h.subbands=v}}o.resolutions=c,o.subbands=u}var y=n.codingStyleDefaultParameters.progressionOrder;switch(y){case 0:n.packetsIterator=new x(e);break;case 1:n.packetsIterator=new A(e);break;case 2:n.packetsIterator=new O(e);break;case 3:n.packetsIterator=new C(e);break;case 4:n.packetsIterator=new T(e);break;default:throw new p("Unsupported progression order ".concat(y))}}function I(e,t,r,n){var a,o=0,s=0,c=!1;function u(e){for(;s<e;){var n=t[r+o];o++,c?(a=a<<7|n,s+=7,c=!1):(a=a<<8|n,s+=8),255===n&&(c=!0)}return a>>>(s-=e)&(1<<e)-1}function l(e){return 255===t[r+o-1]&&t[r+o]===e?(f(1),!0):255===t[r+o]&&t[r+o+1]===e&&(f(2),!0)}function f(e){o+=e}function h(){s=0,c&&(o++,c=!1)}function d(){if(0===u(1))return 1;if(0===u(1))return 2;var e=u(2);return e<3?e+3:(e=u(5))<31?e+6:(e=u(7))+37}for(var p=e.currentTile.index,g=e.tiles[p],m=e.COD.sopMarkerUsed,v=e.COD.ephMarkerUsed,y=g.packetsIterator;o<n;){h(),m&&l(145)&&f(4);var b=y.nextPacket();if(u(1)){for(var w=b.layerNumber,k=[],S=void 0,x=0,A=b.codeblocks.length;x<A;x++){var O=(S=b.codeblocks[x]).precinct,C=S.cbx-O.cbxMin,T=S.cby-O.cbyMin,F=!1,_=!1,P=void 0;if(void 0!==S.included)F=!!u(1);else{var I=void 0;if(void 0!==(O=S.precinct).inclusionTree)I=O.inclusionTree;else{var E=O.cbxMax-O.cbxMin+1,j=O.cbyMax-O.cbyMin+1;I=new N(E,j,w),P=new M(E,j),O.inclusionTree=I,O.zeroBitPlanesTree=P}if(I.reset(C,T,w))for(;;){if(!u(1)){I.incrementValue(w);break}if(!I.nextLevel()){S.included=!0,F=_=!0;break}}}if(F){if(_){for((P=O.zeroBitPlanesTree).reset(C,T);;)if(u(1)){if(!P.nextLevel())break}else P.incrementValue();S.zeroBitPlanes=P.value}for(var R=d();u(1);)S.Lblock++;var B=(0,i.log2)(R),D=u((R<1<<B?B-1:B)+S.Lblock);k.push({codeblock:S,codingpasses:R,dataLength:D})}}for(h(),v&&l(146);k.length>0;){var L=k.shift();void 0===(S=L.codeblock).data&&(S.data=[]),S.data.push({data:t,start:r+o,end:r+o+L.dataLength,codingpasses:L.codingpasses}),o+=L.dataLength}}}return o}function E(e,t,r,n,a,i,s,c){for(var u=n.tbx0,l=n.tby0,f=n.tbx1-n.tbx0,h=n.codeblocks,d="H"===n.type.charAt(0)?1:0,p="H"===n.type.charAt(1)?t:0,g=0,m=h.length;g<m;++g){var v=h[g],y=v.tbx1_-v.tbx0_,b=v.tby1_-v.tby0_;if(0!==y&&0!==b&&void 0!==v.data){var w=new B(y,b,v.subbandType,v.zeroBitPlanes,i),k=2,S=v.data,x=0,A=0,O=void 0,C=void 0,T=void 0;for(O=0,C=S.length;O<C;O++)x+=(T=S[O]).end-T.start,A+=T.codingpasses;var F=new Uint8Array(x),_=0;for(O=0,C=S.length;O<C;O++){var P=(T=S[O]).data.subarray(T.start,T.end);F.set(P,_),_+=P.length}var I=new o.ArithmeticDecoder(F,0,x);for(w.setDecoder(I),O=0;O<A;O++){switch(k){case 0:w.runSignificancePropagationPass();break;case 1:w.runMagnitudeRefinementPass();break;case 2:w.runCleanupPass(),c&&w.checkSegmentationSymbol()}k=(k+1)%3}var E=v.tbx0_-u+(v.tby0_-l)*f,j=w.coefficentsSign,R=w.coefficentsMagnitude,M=w.bitsDecoded,N=s?0:.5,D=void 0,L=void 0,U=void 0;_=0;var q="LL"!==n.type;for(O=0;O<b;O++){var X=2*(E/f|0)*(t-f)+d+p;for(D=0;D<y;D++){if(0!==(L=R[_])){L=(L+N)*a,0!==j[_]&&(L=-L),U=M[_];var H=q?X+(E<<1):E;e[H]=s&&U>=i?L:L*(1<<i-U)}E++,_++}E+=f-y}}}}function j(e,t,r){for(var n=t.components[r],a=n.codingStyleParameters,i=n.quantizationParameters,o=a.decompositionLevelsCount,s=i.SPqcds,c=i.scalarExpounded,u=i.guardBits,l=a.segmentationSymbolUsed,f=e.components[r].precision,h=a.reversibleTransformation,d=h?new U:new L,p=[],m=0,v=0;v<=o;v++){for(var y=n.resolutions[v],b=y.trx1-y.trx0,w=y.try1-y.try0,k=new Float32Array(b*w),S=0,x=y.subbands.length;S<x;S++){var A=void 0,O=void 0;c?(A=s[m].mu,O=s[m].epsilon,m++):(A=s[0].mu,O=s[0].epsilon+(v>0?1-v:0));var C=y.subbands[S],T=g[C.type];E(k,b,0,C,h?1:Math.pow(2,f+T-O)*(1+A/2048),u+O-1,h,l)}p.push({width:b,height:w,items:k})}var F=d.calculate(p,n.tcx0,n.tcy0);return{left:n.tcx0,top:n.tcy0,width:F.width,height:F.height,items:F.items}}function R(e,t){for(var r=e.SIZ.Csiz,n=e.tiles[t],a=0;a<r;a++){var i=n.components[a],o=void 0!==e.currentTile.QCC[a]?e.currentTile.QCC[a]:e.currentTile.QCD;i.quantizationParameters=o;var s=void 0!==e.currentTile.COC[a]?e.currentTile.COC[a]:e.currentTile.COD;i.codingStyleParameters=s}n.codingStyleDefaultParameters=e.currentTile.COD}t.JpxImage=m;var M=function(){function e(t,r){u(this,e);var n=(0,i.log2)(Math.max(t,r))+1;this.levels=[];for(var a=0;a<n;a++){var o={width:t,height:r,items:[]};this.levels.push(o),t=Math.ceil(t/2),r=Math.ceil(r/2)}}return c(e,[{key:"reset",value:function(e,t){for(var r,n=0,a=0;n<this.levels.length;){var i=e+t*(r=this.levels[n]).width;if(void 0!==r.items[i]){a=r.items[i];break}r.index=i,e>>=1,t>>=1,n++}n--,(r=this.levels[n]).items[r.index]=a,this.currentLevel=n,delete this.value}},{key:"incrementValue",value:function(){var e=this.levels[this.currentLevel];e.items[e.index]++}},{key:"nextLevel",value:function(){var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];return--e<0?(this.value=r,!1):(this.currentLevel=e,(t=this.levels[e]).items[t.index]=r,!0)}}]),e}(),N=function(){function e(t,r,n){u(this,e);var a=(0,i.log2)(Math.max(t,r))+1;this.levels=[];for(var o=0;o<a;o++){for(var s=new Uint8Array(t*r),c=0,l=s.length;c<l;c++)s[c]=n;var f={width:t,height:r,items:s};this.levels.push(f),t=Math.ceil(t/2),r=Math.ceil(r/2)}}return c(e,[{key:"reset",value:function(e,t,r){for(var n=0;n<this.levels.length;){var a=this.levels[n],i=e+t*a.width;a.index=i;var o=a.items[i];if(255===o)break;if(o>r)return this.currentLevel=n,this.propagateValues(),!1;e>>=1,t>>=1,n++}return this.currentLevel=n-1,!0}},{key:"incrementValue",value:function(e){var t=this.levels[this.currentLevel];t.items[t.index]=e+1,this.propagateValues()}},{key:"propagateValues",value:function(){for(var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];--e>=0;)(t=this.levels[e]).items[t.index]=r}},{key:"nextLevel",value:function(){var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];return t.items[t.index]=255,!(--e<0)&&(this.currentLevel=e,(t=this.levels[e]).items[t.index]=r,!0)}}]),e}(),B=function(){var e=new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8]),t=new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8]),r=new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]);return function(){function n(a,i,o,s,c){var l;u(this,n),this.width=a,this.height=i,l="HH"===o?r:"HL"===o?t:e,this.contextLabelTable=l;var f,h=a*i;this.neighborsSignificance=new Uint8Array(h),this.coefficentsSign=new Uint8Array(h),f=c>14?new Uint32Array(h):c>6?new Uint16Array(h):new Uint8Array(h),this.coefficentsMagnitude=f,this.processingFlags=new Uint8Array(h);var d=new Uint8Array(h);if(0!==s)for(var p=0;p<h;p++)d[p]=s;this.bitsDecoded=d,this.reset()}return c(n,[{key:"setDecoder",value:function(e){this.decoder=e}},{key:"reset",value:function(){this.contexts=new Int8Array(19),this.contexts[0]=8,this.contexts[17]=92,this.contexts[18]=6}},{key:"setNeighborsSignificance",value:function(e,t,r){var n,a=this.neighborsSignificance,i=this.width,o=this.height,s=t>0,c=t+1<i;e>0&&(n=r-i,s&&(a[n-1]+=16),c&&(a[n+1]+=16),a[n]+=4),e+1<o&&(n=r+i,s&&(a[n-1]+=16),c&&(a[n+1]+=16),a[n]+=4),s&&(a[r-1]+=1),c&&(a[r+1]+=1),a[r]|=128}},{key:"runSignificancePropagationPass",value:function(){for(var e=this.decoder,t=this.width,r=this.height,n=this.coefficentsMagnitude,a=this.coefficentsSign,i=this.neighborsSignificance,o=this.processingFlags,s=this.contexts,c=this.contextLabelTable,u=this.bitsDecoded,l=0;l<r;l+=4)for(var f=0;f<t;f++)for(var h=l*t+f,d=0;d<4;d++,h+=t){var p=l+d;if(p>=r)break;if(o[h]&=-2,!n[h]&&i[h]){var g=c[i[h]];if(e.readBit(s,g)){var m=this.decodeSignBit(p,f,h);a[h]=m,n[h]=1,this.setNeighborsSignificance(p,f,h),o[h]|=2}u[h]++,o[h]|=1}}}},{key:"decodeSignBit",value:function(e,t,r){var n,a,i,o,s,c,u=this.width,l=this.height,f=this.coefficentsMagnitude,h=this.coefficentsSign;o=t>0&&0!==f[r-1],t+1<u&&0!==f[r+1]?(i=h[r+1],n=o?1-i-(a=h[r-1]):1-i-i):n=o?1-(a=h[r-1])-a:0;var d=3*n;return o=e>0&&0!==f[r-u],e+1<l&&0!==f[r+u]?(i=h[r+u],n=o?1-i-(a=h[r-u])+d:1-i-i+d):n=o?1-(a=h[r-u])-a+d:d,n>=0?(s=9+n,c=this.decoder.readBit(this.contexts,s)):(s=9-n,c=1^this.decoder.readBit(this.contexts,s)),c}},{key:"runMagnitudeRefinementPass",value:function(){for(var e,t=this.decoder,r=this.width,n=this.height,a=this.coefficentsMagnitude,i=this.neighborsSignificance,o=this.contexts,s=this.bitsDecoded,c=this.processingFlags,u=r*n,l=4*r,f=0;f<u;f=e){e=Math.min(u,f+l);for(var h=0;h<r;h++)for(var d=f+h;d<e;d+=r)if(a[d]&&0==(1&c[d])){var p=16;if(0!=(2&c[d]))c[d]^=2,p=0===(127&i[d])?15:14;var g=t.readBit(o,p);a[d]=a[d]<<1|g,s[d]++,c[d]|=1}}}},{key:"runCleanupPass",value:function(){for(var e,t=this.decoder,r=this.width,n=this.height,a=this.neighborsSignificance,i=this.coefficentsMagnitude,o=this.coefficentsSign,s=this.contexts,c=this.contextLabelTable,u=this.bitsDecoded,l=this.processingFlags,f=r,h=2*r,d=3*r,p=0;p<n;p=e){e=Math.min(p+4,n);for(var g=p*r,m=p+3<n,v=0;v<r;v++){var y=g+v,b=0,w=y,k=p,S=void 0;if(m&&0===l[y]&&0===l[y+f]&&0===l[y+h]&&0===l[y+d]&&0===a[y]&&0===a[y+f]&&0===a[y+h]&&0===a[y+d]){if(!t.readBit(s,18)){u[y]++,u[y+f]++,u[y+h]++,u[y+d]++;continue}0!==(b=t.readBit(s,17)<<1|t.readBit(s,17))&&(k=p+b,w+=b*r),S=this.decodeSignBit(k,v,w),o[w]=S,i[w]=1,this.setNeighborsSignificance(k,v,w),l[w]|=2,w=y;for(var x=p;x<=k;x++,w+=r)u[w]++;b++}for(k=p+b;k<e;k++,w+=r)if(!i[w]&&0==(1&l[w])){var A=c[a[w]];1===t.readBit(s,A)&&(S=this.decodeSignBit(k,v,w),o[w]=S,i[w]=1,this.setNeighborsSignificance(k,v,w),l[w]|=2),u[w]++}}}}},{key:"checkSegmentationSymbol",value:function(){var e=this.decoder,t=this.contexts;if(10!==(e.readBit(t,17)<<3|e.readBit(t,17)<<2|e.readBit(t,17)<<1|e.readBit(t,17)))throw new p("Invalid segmentation symbol")}}]),n}()}(),D=function(){function e(){u(this,e),this.constructor===e&&(0,a.unreachable)("Cannot initialize Transform.")}return c(e,[{key:"calculate",value:function(e,t,r){for(var n=e[0],a=1,i=e.length;a<i;a++)n=this.iterate(n,e[a],t,r);return n}},{key:"extend",value:function(e,t,r){var n=t-1,a=t+1,i=t+r-2,o=t+r;e[n--]=e[a++],e[o++]=e[i--],e[n--]=e[a++],e[o++]=e[i--],e[n--]=e[a++],e[o++]=e[i--],e[n]=e[a],e[o]=e[i]}},{key:"filter",value:function(e,t,r){(0,a.unreachable)("Abstract method `filter` called")}},{key:"iterate",value:function(e,t,r,n){var a,i,o,s,c,u,l=e.width,f=e.height,h=e.items,d=t.width,p=t.height,g=t.items;for(o=0,a=0;a<f;a++)for(s=2*a*d,i=0;i<l;i++,o++,s+=2)g[s]=h[o];h=e.items=null;var m=new Float32Array(d+8);if(1===d){if(0!=(1&r))for(u=0,o=0;u<p;u++,o+=d)g[o]*=.5}else for(u=0,o=0;u<p;u++,o+=d)m.set(g.subarray(o,o+d),4),this.extend(m,4,d),this.filter(m,4,d),g.set(m.subarray(4,4+d),o);var v=16,y=[];for(a=0;a<v;a++)y.push(new Float32Array(p+8));var b,w=0;if(e=4+p,1===p){if(0!=(1&n))for(c=0;c<d;c++)g[c]*=.5}else for(c=0;c<d;c++){if(0===w){for(v=Math.min(d-c,v),o=c,s=4;s<e;o+=d,s++)for(b=0;b<v;b++)y[b][s]=g[o+b];w=v}var k=y[--w];if(this.extend(k,4,p),this.filter(k,4,p),0===w)for(o=c-v+1,s=4;s<e;o+=d,s++)for(b=0;b<v;b++)g[o+b]=y[b][s]}return{width:d,height:p,items:g}}}]),e}(),L=function(e){l(r,D);var t=h(r);function r(){return u(this,r),t.apply(this,arguments)}return c(r,[{key:"filter",value:function(e,t,r){var n,a,i,o,s=r>>1,c=-1.586134342059924,u=-.052980118572961,l=.882911075530934,f=.443506852043971,h=1.230174104914001;for(n=(t|=0)-3,a=s+4;a--;n+=2)e[n]*=.8128930661159609;for(i=f*e[(n=t-2)-1],a=s+3;a--&&(o=f*e[n+1],e[n]=h*e[n]-i-o,a--);n+=2)i=f*e[(n+=2)+1],e[n]=h*e[n]-i-o;for(i=l*e[(n=t-1)-1],a=s+2;a--&&(o=l*e[n+1],e[n]-=i+o,a--);n+=2)i=l*e[(n+=2)+1],e[n]-=i+o;for(i=u*e[(n=t)-1],a=s+1;a--&&(o=u*e[n+1],e[n]-=i+o,a--);n+=2)i=u*e[(n+=2)+1],e[n]-=i+o;if(0!==s)for(i=c*e[(n=t+1)-1],a=s;a--&&(o=c*e[n+1],e[n]-=i+o,a--);n+=2)i=c*e[(n+=2)+1],e[n]-=i+o}}]),r}(),U=function(e){l(r,D);var t=h(r);function r(){return u(this,r),t.apply(this,arguments)}return c(r,[{key:"filter",value:function(e,t,r){var n,a,i=r>>1;for(n=t|=0,a=i+1;a--;n+=2)e[n]-=e[n-1]+e[n+1]+2>>2;for(n=t+1,a=i;a--;n+=2)e[n]+=e[n-1]+e[n+1]>>1}}]),r}()},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.LZWStream=void 0;var a=r(127);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=c(e);if(t){var i=c(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(u,a.DecodeStream);var t,r,n,c=s(u);function u(e,t,r){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(n=c.call(this,t)).str=e,n.dict=e.dict,n.cachedData=0,n.bitsCached=0;for(var a={earlyChange:r,codeLength:9,nextCode:258,dictionaryValues:new Uint8Array(4096),dictionaryLengths:new Uint16Array(4096),dictionaryPrevCodes:new Uint16Array(4096),currentSequence:new Uint8Array(4096),currentSequenceLength:0},i=0;i<256;++i)a.dictionaryValues[i]=i,a.dictionaryLengths[i]=1;return n.lzwState=a,n}return t=u,(r=[{key:"readBits",value:function(e){for(var t=this.bitsCached,r=this.cachedData;t<e;){var n=this.str.getByte();if(-1===n)return this.eof=!0,null;r=r<<8|n,t+=8}return this.bitsCached=t-=e,this.cachedData=r,this.lastCode=null,r>>>t&(1<<e)-1}},{key:"readBlock",value:function(){var e,t,r,n=1024,a=this.lzwState;if(a){var i=a.earlyChange,o=a.nextCode,s=a.dictionaryValues,c=a.dictionaryLengths,u=a.dictionaryPrevCodes,l=a.codeLength,f=a.prevCode,h=a.currentSequence,d=a.currentSequenceLength,p=0,g=this.bufferLength,m=this.ensureBuffer(this.bufferLength+n);for(e=0;e<512;e++){var v=this.readBits(l),y=d>0;if(v<256)h[0]=v,d=1;else{if(!(v>=258)){if(256===v){l=9,o=258,d=0;continue}this.eof=!0,delete this.lzwState;break}if(v<o)for(t=(d=c[v])-1,r=v;t>=0;t--)h[t]=s[r],r=u[r];else h[d++]=h[0]}if(y&&(u[o]=f,c[o]=c[f]+1,s[o]=h[0],l=++o+i&o+i-1?l:0|Math.min(Math.log(o+i)/.6931471805599453+1,12)),f=v,n<(p+=d)){do{n+=512}while(n<p);m=this.ensureBuffer(this.bufferLength+n)}for(t=0;t<d;t++)m[g++]=h[t]}a.nextCode=o,a.codeLength=l,a.prevCode=f,a.currentSequenceLength=d,this.bufferLength=g}}}])&&i(t.prototype,r),n&&i(t,n),u}();t.LZWStream=u},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.PredictorStream=void 0;var a=r(127),i=r(4),o=r(113);function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,n=h(e);if(t){var a=h(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return l(this,r)}}function l(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?f(e):t}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(d,a.DecodeStream);var t,r,n,h=u(d);function d(e,t,r){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),n=h.call(this,t),!(0,o.isDict)(r))return l(n,e);var a=n.predictor=r.get("Predictor")||1;if(a<=1)return l(n,e);if(2!==a&&(a<10||a>15))throw new i.FormatError("Unsupported predictor: ".concat(a));n.readBlock=2===a?n.readBlockTiff:n.readBlockPng,n.str=e,n.dict=e.dict;var s=n.colors=r.get("Colors")||1,c=n.bits=r.get("BitsPerComponent")||8,u=n.columns=r.get("Columns")||1;return n.pixBytes=s*c+7>>3,n.rowBytes=u*s*c+7>>3,l(n,f(n))}return t=d,(r=[{key:"readBlockTiff",value:function(){var e=this.rowBytes,t=this.bufferLength,r=this.ensureBuffer(t+e),n=this.bits,a=this.colors,i=this.str.getBytes(e);if(this.eof=!i.length,!this.eof){var o,s=0,c=0,u=0,l=0,f=t;if(1===n&&1===a)for(o=0;o<e;++o){var h=i[o]^s;h^=h>>1,h^=h>>2,s=(1&(h^=h>>4))<<7,r[f++]=h}else if(8===n){for(o=0;o<a;++o)r[f++]=i[o];for(;o<e;++o)r[f]=r[f-a]+i[o],f++}else if(16===n){var d=2*a;for(o=0;o<d;++o)r[f++]=i[o];for(;o<e;o+=2){var p=((255&i[o])<<8)+(255&i[o+1])+((255&r[f-d])<<8)+(255&r[f-d+1]);r[f++]=p>>8&255,r[f++]=255&p}}else{var g=new Uint8Array(a+1),m=(1<<n)-1,v=0,y=t,b=this.columns;for(o=0;o<b;++o)for(var w=0;w<a;++w)u<n&&(s=s<<8|255&i[v++],u+=8),g[w]=g[w]+(s>>u-n)&m,u-=n,c=c<<n|g[w],(l+=n)>=8&&(r[y++]=c>>l-8&255,l-=8);l>0&&(r[y++]=(c<<8-l)+(s&(1<<8-l)-1))}this.bufferLength+=e}}},{key:"readBlockPng",value:function(){var e=this.rowBytes,t=this.pixBytes,r=this.str.getByte(),n=this.str.getBytes(e);if(this.eof=!n.length,!this.eof){var a=this.bufferLength,o=this.ensureBuffer(a+e),s=o.subarray(a-e,a);0===s.length&&(s=new Uint8Array(e));var c,u,l,f=a;switch(r){case 0:for(c=0;c<e;++c)o[f++]=n[c];break;case 1:for(c=0;c<t;++c)o[f++]=n[c];for(;c<e;++c)o[f]=o[f-t]+n[c]&255,f++;break;case 2:for(c=0;c<e;++c)o[f++]=s[c]+n[c]&255;break;case 3:for(c=0;c<t;++c)o[f++]=(s[c]>>1)+n[c];for(;c<e;++c)o[f]=(s[c]+o[f-t]>>1)+n[c]&255,f++;break;case 4:for(c=0;c<t;++c)u=s[c],l=n[c],o[f++]=u+l;for(;c<e;++c){u=s[c];var h=s[c-t],d=o[f-t],p=d+u-h,g=p-d;g<0&&(g=-g);var m=p-u;m<0&&(m=-m);var v=p-h;v<0&&(v=-v),l=n[c],o[f++]=g<=m&&g<=v?d+l:m<=v?u+l:h+l}break;default:throw new i.FormatError("Unsupported predictor: ".concat(r))}this.bufferLength+=e}}}])&&s(t.prototype,r),n&&s(t,n),d}();t.PredictorStream=d},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.RunLengthStream=void 0;var a=r(127);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=c(e);if(t){var i=c(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(u,a.DecodeStream);var t,r,n,c=s(u);function u(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(r=c.call(this,t)).str=e,r.dict=e.dict,r}return t=u,(r=[{key:"readBlock",value:function(){var e=this.str.getBytes(2);if(!e||e.length<2||128===e[0])this.eof=!0;else{var t,r=this.bufferLength,n=e[0];if(n<128){if((t=this.ensureBuffer(r+n+1))[r++]=e[1],n>0){var a=this.str.getBytes(n);t.set(a,r),r+=n}}else{n=257-n;var i=e[1];t=this.ensureBuffer(r+n+1);for(var o=0;o<n;o++)t[r++]=i}this.bufferLength=r}}}])&&i(t.prototype,r),n&&i(t,n),u}();t.RunLengthStream=u},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Font=t.ErrorFont=void 0;var n=r(4),a=r(143),i=r(146),o=r(147),s=r(145),c=r(149),u=r(148),l=r(150),f=r(151),h=r(152),d=r(124),p=r(153),g=r(117),m=r(118),v=r(154);function y(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=w(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||w(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){if(e){if("string"==typeof e)return k(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(e,t):void 0}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function A(e,t,r){return t&&x(e.prototype,t),r&&x(e,r),e}var O=[[57344,63743],[1048576,1114109]],C=1e3,T=["ascent","bbox","black","bold","charProcOperatorList","composite","cssFontInfo","data","defaultVMetrics","defaultWidth","descent","fallbackName","fontMatrix","fontType","isMonospace","isSerifFont","isType3Font","italic","loadedName","mimetype","missingFile","name","remeasure","subtype","type","vertical"],F=["cMap","defaultEncoding","differences","isSymbolicFont","seacMap","toFontChar","toUnicode","vmetrics","widths"];function _(e){if(e.fontMatrix&&e.fontMatrix[0]!==n.FONT_IDENTITY_MATRIX[0]){var t=.001/e.fontMatrix[0],r=e.widths;for(var a in r)r[a]*=t;e.defaultWidth*=t}}var P=function(){function e(t,r,n,a,i,o,s,c){S(this,e),this.fontChar=t,this.unicode=r,this.accent=n,this.width=a,this.vmetric=i,this.operatorListId=o,this.isSpace=s,this.isInFont=c}return A(e,[{key:"matchesForCache",value:function(e,t,r,n,a,i,o,s){return this.fontChar===e&&this.unicode===t&&this.accent===r&&this.width===n&&this.vmetric===a&&this.operatorListId===i&&this.isSpace===o&&this.isInFont===s}}]),e}();function I(e,t){return(e<<8)+t}function E(e,t){var r=(e<<8)+t;return 32768&r?r-65536:r}function j(e){return String.fromCharCode(e>>8&255,255&e)}function R(e){return e>32767?e=32767:e<-32768&&(e=-32768),String.fromCharCode(e>>8&255,255&e)}function M(e){var t=e.peekBytes(4);return"ttcf"===(0,n.bytesToString)(t)}function N(e,t){var r,a,i=t.type,o=t.subtype,s=t.composite;return function(e){var t=e.peekBytes(4);return 65536===(0,g.readUint32)(t,0)||"true"===(0,n.bytesToString)(t)}(e)||M(e)?r=s?"CIDFontType2":"TrueType":!function(e){var t=e.peekBytes(4);return"OTTO"===(0,n.bytesToString)(t)}(e)?!function(e){var t=e.peekBytes(2);return 37===t[0]&&33===t[1]||128===t[0]&&1===t[1]}(e)?!function(e){var t=e.peekBytes(4);return t[0]>=1&&t[3]>=1&&t[3]<=4}(e)?((0,n.warn)("getFontFileType: Unable to detect correct font file Type/Subtype."),r=i,a=o):s?(r="CIDFontType0",a="CIDFontType0C"):(r="MMType1"===i?"MMType1":"Type1",a="Type1C"):r=s?"CIDFontType0":"MMType1"===i?"MMType1":"Type1":r=s?"CIDFontType2":"OpenType",[r,a]}function B(e,t,r){for(var n,a=[],i=0,o=e.length;i<o;i++)-1!==(n=(0,u.getUnicodeForGlyph)(e[i],t))&&(a[i]=n);for(var s in r)-1!==(n=(0,u.getUnicodeForGlyph)(r[s],t))&&(a[+s]=n);return a}function D(e,t,r){var a=Object.create(null),i=[],o=0,s=O[o][0],c=O[o][1];for(var u in e){var l=e[u|=0];if(t(l)){if(s>c){if(++o>=O.length){(0,n.warn)("Ran out of space in font private use area.");break}s=O[o][0],c=O[o][1]}var f=s++;0===l&&(l=r),a[f]=l,i[u]=f}}return{toFontChar:i,charCodeToGlyphId:a,nextAvailableFontCharCode:s}}function L(e,t){var r,a,i,o,s=function(e,t){var r=[];for(var n in e)e[n]>=t||r.push({fontCharCode:0|n,glyphId:e[n]});0===r.length&&r.push({fontCharCode:0,glyphId:0}),r.sort(function(e,t){return e.fontCharCode-t.fontCharCode});for(var a=[],i=r.length,o=0;o<i;){var s=r[o].fontCharCode,c=[r[o].glyphId];++o;for(var u=s;o<i&&u+1===r[o].fontCharCode&&(c.push(r[o].glyphId),++o,65535!=++u););a.push([s,u,c])}return a}(e,t),c=s[s.length-1][1]>65535?2:1,u="\0\0"+j(c)+"\0\0"+(0,n.string32)(4+8*c);for(r=s.length-1;r>=0&&!(s[r][0]<=65535);--r);var l=r+1;s[r][0]<65535&&65535===s[r][1]&&(s[r][1]=65534);var f,h,d,g,m=s[r][1]<65535?1:0,v=l+m,y=p.OpenTypeFileBuilder.getSearchParams(v,2),b="",w="",k="",S="",x="",A=0;for(r=0,a=l;r<a;r++){h=(f=s[r])[0],d=f[1],b+=j(h),w+=j(d);var O=!0;for(i=1,o=(g=f[2]).length;i<o;++i)if(g[i]!==g[i-1]+1){O=!1;break}if(O){k+=j(g[0]-h&65535),S+=j(0)}else{var C=2*(v-r)+2*A;for(A+=d-h+1,k+=j(0),S+=j(C),i=0,o=g.length;i<o;++i)x+=j(g[i])}}m>0&&(w+="ÿÿ",b+="ÿÿ",k+="\0",S+="\0\0");var T="\0\0"+j(2*v)+j(y.range)+j(y.entry)+j(y.rangeShift)+w+"\0\0"+b+k+S+x,F="",_="";if(c>1){for(u+="\0\0\n"+(0,n.string32)(4+8*c+4+T.length),F="",r=0,a=s.length;r<a;r++){h=(f=s[r])[0];var P=(g=f[2])[0];for(i=1,o=g.length;i<o;++i)g[i]!==g[i-1]+1&&(d=f[0]+i-1,F+=(0,n.string32)(h)+(0,n.string32)(d)+(0,n.string32)(P),h=d+1,P=g[i]);F+=(0,n.string32)(h)+(0,n.string32)(f[1])+(0,n.string32)(P)}_="\0\f\0\0"+(0,n.string32)(F.length+16)+"\0\0\0\0"+(0,n.string32)(F.length/12)}return u+"\0"+j(T.length+4)+T+_+F}function U(e,t,r){r=r||{unitsPerEm:0,yMax:0,yMin:0,ascent:0,descent:0};var a=0,i=0,o=0,s=0,c=null,l=0;if(t){for(var f in t){(c>(f|=0)||!c)&&(c=f),l<f&&(l=f);var h=(0,u.getUnicodeRangeFor)(f);if(h<32)a|=1<<h;else if(h<64)i|=1<<h-32;else if(h<96)o|=1<<h-64;else{if(!(h<123))throw new n.FormatError("Unicode ranges Bits > 123 are reserved for internal usage");s|=1<<h-96}}l>65535&&(l=65535)}else c=0,l=255;var d=e.bbox||[0,0,0,0],p=r.unitsPerEm||1/(e.fontMatrix||n.FONT_IDENTITY_MATRIX)[0],g=e.ascentScaled?1:p/C,m=r.ascent||Math.round(g*(e.ascent||d[3])),v=r.descent||Math.round(g*(e.descent||d[1]));v>0&&e.descent>0&&d[1]<0&&(v=-v);var y=r.yMax||m,b=-r.yMin||-v;return"\0$ô\0\0\0»\0\0\0»\0\0ß\x001\0\0\0\0"+String.fromCharCode(e.fixedPitch?9:0)+"\0\0\0\0\0\0"+(0,n.string32)(a)+(0,n.string32)(i)+(0,n.string32)(o)+(0,n.string32)(s)+"*21*"+j(e.italicAngle?1:0)+j(c||e.firstChar)+j(l||e.lastChar)+j(m)+j(v)+"\0d"+j(y)+j(b)+"\0\0\0\0\0\0\0\0"+j(e.xHeight)+j(e.capHeight)+j(0)+j(c||e.firstChar)+"\0"}function q(e){var t=Math.floor(e.italicAngle*Math.pow(2,16));return"\0\0\0"+(0,n.string32)(t)+"\0\0\0\0"+(0,n.string32)(e.fixedPitch)+"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}function X(e){return e.replace(/[^\x21-\x7E]|[[\](){}<>/%]/g,"").slice(0,63)}function H(e,t){t||(t=[[],[]]);var r,n,a,i,o,s=[t[0][0]||"Original licence",t[0][1]||e,t[0][2]||"Unknown",t[0][3]||"uniqueID",t[0][4]||e,t[0][5]||"Version 0.11",t[0][6]||X(e),t[0][7]||"Unknown",t[0][8]||"Unknown",t[0][9]||"Unknown"],c=[];for(r=0,n=s.length;r<n;r++){var u=[];for(a=0,i=(o=t[1][r]||s[r]).length;a<i;a++)u.push(j(o.charCodeAt(a)));c.push(u.join(""))}var l=[s,c],f=["\0","\0"],h=["\0\0","\0"],d=["\0\0","\t"],p=s.length*f.length,g="\0\0"+j(p)+j(12*p+6),m=0;for(r=0,n=f.length;r<n;r++){var v=l[r];for(a=0,i=v.length;a<i;a++){o=v[a],g+=f[r]+h[r]+d[r]+j(a)+j(o.length)+j(m),m+=o.length}}return g+=s.join("")+c.join("")}var $=function(){function e(t,r,a){S(this,e),this.name=t,this.mimetype=null,this.disableFontFace=!1,this.loadedName=a.loadedName,this.isType3Font=a.isType3Font,this.missingFile=!1,this.cssFontInfo=a.cssFontInfo,this._charsCache=Object.create(null),this._glyphCache=Object.create(null),this.isSerifFont=!!(a.flags&i.FontFlags.Serif),this.isSymbolicFont=!!(a.flags&i.FontFlags.Symbolic),this.isMonospace=!!(a.flags&i.FontFlags.FixedPitch);var o=a.type,s=a.subtype;this.type=o,this.subtype=s;var c="sans-serif";if(this.isMonospace?c="monospace":this.isSerifFont&&(c="serif"),this.fallbackName=c,this.differences=a.differences,this.widths=a.widths,this.defaultWidth=a.defaultWidth,this.composite=a.composite,this.cMap=a.cMap,this.capHeight=a.capHeight/C,this.ascent=a.ascent/C,this.descent=a.descent/C,this.fontMatrix=a.fontMatrix,this.bbox=a.bbox,this.defaultEncoding=a.defaultEncoding,this.toUnicode=a.toUnicode,this.fallbackToUnicode=a.fallbackToUnicode||new l.ToUnicodeMap,this.toFontChar=[],"Type3"!==a.type){if(this.cidEncoding=a.cidEncoding,this.vertical=!!a.vertical,this.vertical&&(this.vmetrics=a.vmetrics,this.defaultVMetrics=a.defaultVMetrics),!r||r.isEmpty)return r&&(0,n.warn)('Font file is empty in "'+t+'" ('+this.loadedName+")"),void this.fallbackToSystemFont(a);var u,h=b(N(r,a),2);o=h[0],s=h[1],o===this.type&&s===this.subtype||(0,n.info)("Inconsistent font file Type/SubType, expected: "+"".concat(this.type,"/").concat(this.subtype," but found: ").concat(o,"/").concat(s,"."));try{switch(o){case"MMType1":(0,n.info)("MMType1 font ("+t+"), falling back to Type1.");case"Type1":case"CIDFontType0":this.mimetype="font/opentype";var d="Type1C"===s||"CIDFontType0C"===s?new f.CFFFont(r,a):new v.Type1Font(t,r,a);_(a),u=this.convert(t,d,a);break;case"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype",u=this.checkAndRepair(t,r,a),this.isOpenType&&(_(a),o="OpenType");break;default:throw new n.FormatError("Font ".concat(o," is not supported"))}}catch(e){return(0,n.warn)(e),void this.fallbackToSystemFont(a)}this.data=u,this.fontType=(0,i.getFontType)(o,s),this.fontMatrix=a.fontMatrix,this.widths=a.widths,this.defaultWidth=a.defaultWidth,this.toUnicode=a.toUnicode,this.seacMap=a.seacMap}else{for(var p=0;p<256;p++)this.toFontChar[p]=this.differences[p]||a.defaultEncoding[p];this.fontType=n.FontType.TYPE3}}return A(e,[{key:"renderer",get:function(){var e=h.FontRendererFactory.create(this,i.SEAC_ANALYSIS_ENABLED);return(0,n.shadow)(this,"renderer",e)}},{key:"exportData",value:function(){var e,t,r,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0]?[].concat(T,F):T,a=Object.create(null),i=y(n);try{for(i.s();!(r=i.n()).done;)void 0!==(t=this[e=r.value])&&(a[e]=t)}catch(e){i.e(e)}finally{i.f()}return a}},{key:"fallbackToSystemFont",value:function(e){var t=this;this.missingFile=!0;var r=this.name,a=this.type,f=this.subtype,h=r.replace(/[,_]/g,"-").replace(/\s/g,""),d=(0,c.getStdFontMap)(),p=(0,c.getNonStdFontMap)(),g=!!d[h],m=!(!p[h]||!d[p[h]]);h=d[h]||p[h]||h,this.bold=-1!==h.search(/bold/gi),this.italic=-1!==h.search(/oblique/gi)||-1!==h.search(/italic/gi),this.black=-1!==r.search(/Black/g);var v=-1!==r.search(/Narrow/g);if(this.remeasure=(!g||v)&&Object.keys(this.widths).length>0,(g||m)&&"CIDFontType2"===a&&this.cidEncoding.startsWith("Identity-")){var y=(0,c.getGlyphMapForStandardFonts)(),b=e.cidToGidMap,w=[];for(var k in y)w[+k]=y[k];if(/Arial-?Black/i.test(r)){var S=(0,c.getSupplementalGlyphMapForArialBlack)();for(var x in S)w[+x]=S[x]}else if(/Calibri/i.test(r)){var A=(0,c.getSupplementalGlyphMapForCalibri)();for(var O in A)w[+O]=A[O]}if(b)for(var C in w){var T=w[C];void 0!==b[T]&&(w[+C]=b[T])}this.toUnicode instanceof l.IdentityToUnicodeMap||this.toUnicode.forEach(function(e,t){w[+e]=t}),this.toFontChar=w,this.toUnicode=new l.ToUnicodeMap(w)}else if(/Symbol/i.test(h))this.toFontChar=B(s.SymbolSetEncoding,(0,o.getGlyphsUnicode)(),this.differences);else if(/Dingbats/i.test(h))/Wingdings/i.test(r)&&(0,n.warn)("Non-embedded Wingdings font, falling back to ZapfDingbats."),this.toFontChar=B(s.ZapfDingbatsEncoding,(0,o.getDingbatsGlyphsUnicode)(),this.differences);else if(g)this.toFontChar=B(this.defaultEncoding,(0,o.getGlyphsUnicode)(),this.differences);else{var F=(0,o.getGlyphsUnicode)(),_=[];if(this.toUnicode.forEach(function(e,r){if(!t.composite){var n=t.differences[e]||t.defaultEncoding[e],a=(0,u.getUnicodeForGlyph)(n,F);-1!==a&&(r=a)}_[+e]=r}),this.composite&&this.toUnicode instanceof l.IdentityToUnicodeMap&&/Verdana/i.test(r)){var P=(0,c.getGlyphMapForStandardFonts)();for(var I in P)_[+I]=P[I]}this.toFontChar=_}this.loadedName=h.split("-")[0],this.fontType=(0,i.getFontType)(a,f)}},{key:"checkAndRepair",value:function(e,t,r){var c=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "];function u(e,t){var r=Object.create(null);r["OS/2"]=null,r.cmap=null,r.head=null,r.hhea=null,r.hmtx=null,r.maxp=null,r.name=null,r.post=null;for(var n=0;n<t;n++){var a=l(e);c.includes(a.tag)&&(0!==a.length&&(r[a.tag]=a))}return r}function l(e){var t=e.getString(4),r=e.getInt32()>>>0,n=e.getInt32()>>>0,a=e.getInt32()>>>0,i=e.pos;e.pos=e.start?e.start:0,e.skip(n);var o=e.getBytes(a);return e.pos=i,"head"===t&&(o[8]=o[9]=o[10]=o[11]=0,o[17]|=32),{tag:t,checksum:r,length:a,offset:n,data:o}}function h(e){return{version:e.getString(4),numTables:e.getUint16(),searchRange:e.getUint16(),entrySelector:e.getUint16(),rangeShift:e.getUint16()}}function g(e,t,r,n,a,i){var o={length:0,sizeOfInstructions:0};if(r-t<=12)return o;var s,c,u,l=e.subarray(t,r),f=E(l[0],l[1]);if(f<0)return u=f=-1,(s=l)[(c=0)+1]=u,s[c]=u>>>8,n.set(l,a),o.length=l.length,o;var h,d=10,p=0;for(h=0;h<f;h++){p=(l[d]<<8|l[d+1])+1,d+=2}var g=d,m=l[d]<<8|l[d+1];o.sizeOfInstructions=m;var v=d+=2+m,y=0;for(h=0;h<p;h++){var b=l[d++];192&b&&(l[d-1]=63&b);var w=2;2&b?w=1:16&b&&(w=0);var k=2;4&b?k=1:32&b&&(k=0);var S=w+k;if(y+=S,8&b){var x=l[d++];h+=x,y+=x*S}}if(0===y)return o;var A=d+y;return A>l.length?o:!i&&m>0?(n.set(l.subarray(0,g),a),n.set([0,0],a+g),n.set(l.subarray(v,A),a+g+2),A-=m,l.length-A>3&&(A=A+3&-4),o.length=A,o):l.length-A>3?(A=A+3&-4,n.set(l.subarray(0,A),a),o.length=A,o):(n.set(l,a),o.length=l.length,o)}function v(e){var r=(t.start?t.start:0)+e.offset;t.pos=r;var n=[[],[]],a=e.length,i=r+a;if(0!==t.getUint16()||a<6)return n;var o,s,c=t.getUint16(),u=t.getUint16(),l=[];for(o=0;o<c&&t.pos+12<=i;o++){var f={platform:t.getUint16(),encoding:t.getUint16(),language:t.getUint16(),name:t.getUint16(),length:t.getUint16(),offset:t.getUint16()};(1===f.platform&&0===f.encoding&&0===f.language||3===f.platform&&1===f.encoding&&1033===f.language)&&l.push(f)}for(o=0,s=l.length;o<s;o++){var h=l[o];if(!(h.length<=0)){var d=r+u+h.offset;if(!(d+h.length>i)){t.pos=d;var p=h.name;if(h.encoding){for(var g="",m=0,v=h.length;m<v;m+=2)g+=String.fromCharCode(t.getUint16());n[1][p]=g}else n[0][p]=t.getString(h.length)}}}return n}var b,w,k,S,x=[0,0,0,0,0,0,0,0,-2,-2,-2,-2,0,0,-2,-5,-1,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,-1,-1,1,-1,-999,0,1,0,-1,-2,0,-1,-2,-1,-1,0,-1,-1,0,0,-999,-999,-1,-1,-1,-1,-2,-999,-2,-2,-999,0,-2,-2,0,0,-2,0,-2,0,0,0,-2,-1,-1,1,1,0,0,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,0,-999,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,-2,-999,-999,-999,-999,-999,-1,-1,-2,-2,0,0,0,0,-1,-1,-999,-2,-2,0,0,-1,-2,-2,0,0,0,-1,-1,-1,-2];function A(e,t){for(var r,a,i,o,s,c=e.data,u=0,l=0,f=0,h=[],d=[],p=[],g=t.tooComplexToFollowFunctions,m=!1,v=0,y=0,b=c.length;u<b;){var w=c[u++];if(64===w)if(a=c[u++],m||y)u+=a;else for(r=0;r<a;r++)h.push(c[u++]);else if(65===w)if(a=c[u++],m||y)u+=2*a;else for(r=0;r<a;r++)i=c[u++],h.push(i<<8|c[u++]);else if(176==(248&w))if(a=w-176+1,m||y)u+=a;else for(r=0;r<a;r++)h.push(c[u++]);else if(184==(248&w))if(a=w-184+1,m||y)u+=2*a;else for(r=0;r<a;r++)i=c[u++],h.push(i<<8|c[u++]);else if(43!==w||g)if(44!==w||g){if(45===w)if(m)m=!1,l=u;else{if(!(s=d.pop()))return(0,n.warn)("TT: ENDF bad stack"),void(t.hintsValid=!1);o=p.pop(),c=s.data,u=s.i,t.functionsStackDeltas[o]=h.length-s.stackTop}else if(137===w)(m||y)&&((0,n.warn)("TT: nested IDEFs not allowed"),g=!0),m=!0,f=u;else if(88===w)++v;else if(27===w)y=v;else if(89===w)y===v&&(y=0),--v;else if(28===w&&!m&&!y){var k=h[h.length-1];k>0&&(u+=k-1)}}else(m||y)&&((0,n.warn)("TT: nested FDEFs not allowed"),g=!0),m=!0,f=u,o=h.pop(),t.functionsDefined[o]={data:c,i:u};else if(!m&&!y)if(o=h[h.length-1],isNaN(o))(0,n.info)("TT: CALL empty stack (or invalid entry).");else if(t.functionsUsed[o]=!0,o in t.functionsStackDeltas){var S=h.length+t.functionsStackDeltas[o];if(S<0)return(0,n.warn)("TT: CALL invalid functions stack delta."),void(t.hintsValid=!1);h.length=S}else if(o in t.functionsDefined&&!p.includes(o)){if(d.push({data:c,i:u,stackTop:h.length-1}),p.push(o),!(s=t.functionsDefined[o]))return(0,n.warn)("TT: CALL non-existent function"),void(t.hintsValid=!1);c=s.data,u=s.i}if(!m&&!y){var A=0;for(w<=142?A=x[w]:w>=192&&w<=223?A=-1:w>=224&&(A=-2),w>=113&&w<=117&&(a=h.pop(),isNaN(a)||(A=2*-a));A<0&&h.length>0;)h.pop(),A++;for(;A>0;)h.push(NaN),A--}}t.tooComplexToFollowFunctions=g;var O=[c];u>c.length&&O.push(new Uint8Array(u-c.length)),f>l&&((0,n.warn)("TT: complementing a missing function tail"),O.push(new Uint8Array([34,45]))),function(e,t){if(t.length>1){var r,n,a=0;for(r=0,n=t.length;r<n;r++)a+=t[r].length;a=a+3&-4;var i=new Uint8Array(a),o=0;for(r=0,n=t.length;r<n;r++)i.set(t[r],o),o+=t[r].length;e.data=i,e.length=a}}(e,O)}if(M(t=new m.Stream(new Uint8Array(t.getBytes())))){var O=function(e,t){for(var r,a=function(e){var t=e.getString(4);(0,n.assert)("ttcf"===t,"Must be a TrueType Collection font.");for(var r=e.getUint16(),a=e.getUint16(),i=e.getInt32()>>>0,o=[],s=0;s<i;s++)o.push(e.getInt32()>>>0);var c={ttcTag:t,majorVersion:r,minorVersion:a,numFonts:i,offsetTable:o};switch(r){case 1:return c;case 2:return c.dsigTag=e.getInt32()>>>0,c.dsigLength=e.getInt32()>>>0,c.dsigOffset=e.getInt32()>>>0,c}throw new n.FormatError("Invalid TrueType Collection majorVersion: ".concat(r,"."))}(e),i=a.numFonts,o=a.offsetTable,s=t.split("+"),c=0;c<i;c++){e.pos=(e.start||0)+o[c];var l=h(e),f=u(e,l.numTables);if(!f.name)throw new n.FormatError('TrueType Collection font must contain a "name" table.');for(var d=v(f.name),p=0,g=d.length;p<g;p++)for(var m=0,b=d[p].length;m<b;m++){var w=d[p][m]&&d[p][m].replace(/\s/g,"");if(w){if(w===t)return{header:l,tables:f};if(!(s.length<2)){var k,S=y(s);try{for(S.s();!(k=S.n()).done;){var x=k.value;w===x&&(r={name:x,header:l,tables:f})}}catch(e){S.e(e)}finally{S.f()}}}}}if(r)return(0,n.warn)('TrueType Collection does not contain "'.concat(t,'" font, ')+'falling back to "'.concat(r.name,'" font instead.')),{header:r.header,tables:r.tables};throw new n.FormatError('TrueType Collection does not contain "'.concat(t,'" font.'))}(t,this.name);b=O.header,w=O.tables}else b=h(t),w=u(t,b.numTables);var C=!w["CFF "];if(C){if(!w.loca)throw new n.FormatError('Required "loca" table is not found');w.glyf||((0,n.warn)('Required "glyf" table is not found -- trying to recover.'),w.glyf={tag:"glyf",data:new Uint8Array(0)}),this.isOpenType=!1}else{var T=r.composite&&((r.cidToGidMap||[]).length>0||!(r.cMap instanceof d.IdentityCMap));if("OTTO"===b.version&&!T||!w.head||!w.hhea||!w.maxp||!w.post)return S=new m.Stream(w["CFF "].data),k=new f.CFFFont(S,r),_(r),this.convert(e,k,r);delete w.glyf,delete w.loca,delete w.fpgm,delete w.prep,delete w["cvt "],this.isOpenType=!0}if(!w.maxp)throw new n.FormatError('Required "maxp" table is not found');t.pos=(t.start||0)+w.maxp.offset;var F=t.getInt32(),P=t.getUint16(),j=P+1,R=!0;j>65535&&(R=!1,j=P,(0,n.warn)("Not enough space in glyfs to duplicate first glyph."));var N=0,B=0;F>=65536&&w.maxp.length>=22&&(t.pos+=8,t.getUint16()>2&&(w.maxp.data[14]=0,w.maxp.data[15]=2),t.pos+=4,N=t.getUint16(),t.pos+=4,B=t.getUint16());w.maxp.data[4]=j>>8,w.maxp.data[5]=255&j;var X=function(e,t,r,a){var i={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};if(e&&A(e,i),t&&A(t,i),e&&function(e,t){if(!e.tooComplexToFollowFunctions){if(e.functionsDefined.length>t)return(0,n.warn)("TT: more functions defined than expected"),void(e.hintsValid=!1);for(var r=0,a=e.functionsUsed.length;r<a;r++){if(r>t)return(0,n.warn)("TT: invalid function id: "+r),void(e.hintsValid=!1);if(e.functionsUsed[r]&&!e.functionsDefined[r])return(0,n.warn)("TT: undefined function: "+r),void(e.hintsValid=!1)}}}(i,a),r&&1&r.length){var o=new Uint8Array(r.length+1);o.set(r.data),r.data=o}return i.hintsValid}(w.fpgm,w.prep,w["cvt "],N);if(X||(delete w.fpgm,delete w.prep,delete w["cvt "]),function(e,t,r,a,i){if(t){e.pos=(e.start?e.start:0)+t.offset,e.pos+=4,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=8,e.pos+=2;var o=e.getUint16();o>a&&((0,n.info)("The numOfMetrics ("+o+") should not be greater than the numGlyphs ("+a+")"),o=a,t.data[34]=(65280&o)>>8,t.data[35]=255&o);var s=a-o-(r.length-4*o>>1);if(s>0){var c=new Uint8Array(r.length+2*s);c.set(r.data),i&&(c[r.length]=r.data[2],c[r.length+1]=r.data[3]),r.data=c}}else r&&(r.data=null)}(t,w.hhea,w.hmtx,j,R),!w.head)throw new n.FormatError('Required "head" table is not found');!function(e,t,r){var a,i,o,s,c=e.data,u=(a=c[0],i=c[1],o=c[2],s=c[3],(a<<24)+(i<<16)+(o<<8)+s);u>>16!=1&&((0,n.info)("Attempting to fix invalid version in head table: "+u),c[0]=0,c[1]=1,c[2]=0,c[3]=0);var l=I(c[50],c[51]);if(l<0||l>1){(0,n.info)("Attempting to fix invalid indexToLocFormat in head table: "+l);var f=t+1;if(r===f<<1)c[50]=0,c[51]=0;else{if(r!==f<<2)throw new n.FormatError("Could not fix indexToLocFormat: "+l);c[50]=0,c[51]=1}}}(w.head,P,C?w.loca.length:0);var $=Object.create(null);if(C){var z=I(w.head.data[50],w.head.data[51]),G=function(e,t,r,n,a,i,o){var s,c,u;n?(s=4,c=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]},u=function(e,t,r){e[t]=r>>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}):(s=2,c=function(e,t){return e[t]<<9|e[t+1]<<1},u=function(e,t,r){e[t]=r>>9&255,e[t+1]=r>>1&255});var l=i?r+1:r,f=s*(1+l),h=new Uint8Array(f);h.set(e.data.subarray(0,f)),e.data=h;var d,p,m=t.data,v=m.length,y=new Uint8Array(v),b=[];for(d=0,p=0;d<r+1;d++,p+=s){var w=c(h,p);w>v&&(w=v),b.push({index:d,offset:w,endOffset:0})}for(b.sort(function(e,t){return e.offset-t.offset}),d=0;d<r;d++)b[d].endOffset=b[d+1].offset;b.sort(function(e,t){return e.index-t.index});var k=Object.create(null),S=0;for(u(h,0,S),d=0,p=s;d<r;d++,p+=s){var x=g(m,b[d].offset,b[d].endOffset,y,S,a),A=x.length;0===A&&(k[d]=!0),x.sizeOfInstructions>o&&(o=x.sizeOfInstructions),u(h,p,S+=A)}if(0===S){var O=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(d=0,p=s;d<l;d++,p+=s)u(h,p,O.length);t.data=O}else if(i){var C=c(h,s);y.length>C+S?t.data=y.subarray(0,C+S):(t.data=new Uint8Array(C+S),t.data.set(y.subarray(0,S))),t.data.set(y.subarray(0,C),S),u(e.data,h.length-s,S+C)}else t.data=y.subarray(0,S);return{missingGlyphs:k,maxSizeOfInstructions:o}}(w.loca,w.glyf,P,z,X,R,B);$=G.missingGlyphs,F>=65536&&w.maxp.length>=22&&(w.maxp.data[26]=G.maxSizeOfInstructions>>8,w.maxp.data[27]=255&G.maxSizeOfInstructions)}if(!w.hhea)throw new n.FormatError('Required "hhea" table is not found');0===w.hhea.data[10]&&0===w.hhea.data[11]&&(w.hhea.data[10]=255,w.hhea.data[11]=255);var W={unitsPerEm:I(w.head.data[18],w.head.data[19]),yMax:I(w.head.data[42],w.head.data[43]),yMin:E(w.head.data[38],w.head.data[39]),ascent:I(w.hhea.data[4],w.hhea.data[5]),descent:E(w.hhea.data[6],w.hhea.data[7])};this.ascent=W.ascent/W.unitsPerEm,this.descent=W.descent/W.unitsPerEm,w.post&&function(e,r,a){var o=(t.start?t.start:0)+e.offset;t.pos=o;var s,c=o+e.length,u=t.getInt32();t.skip(28);var l,f=!0;switch(u){case 65536:s=i.MacStandardGlyphOrdering;break;case 131072:var h=t.getUint16();if(h!==a){f=!1;break}var d=[];for(l=0;l<h;++l){var p=t.getUint16();if(p>=32768){f=!1;break}d.push(p)}if(!f)break;for(var g=[],m=[];t.pos<c;){var v=t.getByte();for(m.length=v,l=0;l<v;++l)m[l]=String.fromCharCode(t.getByte());g.push(m.join(""))}for(s=[],l=0;l<h;++l){var y=d[l];y<258?s.push(i.MacStandardGlyphOrdering[y]):s.push(g[y-258])}break;case 196608:break;default:(0,n.warn)("Unknown/unsupported post table version "+u),f=!1,r.defaultEncoding&&(s=r.defaultEncoding)}r.glyphNames=s}(w.post,r,P),w.post={tag:"post",data:q(r)};var V=[];function K(e){return!$[e]}if(r.composite){var Y=r.cidToGidMap||[],J=0===Y.length;r.cMap.forEach(function(e,t){if(t>65535)throw new n.FormatError("Max size of CID is 65,535");var r=-1;J?r=t:void 0!==Y[t]&&(r=Y[t]),r>=0&&r<P&&K(r)&&(V[e]=r)})}else{var Z=function(e,t,r,a){if(!e)return(0,n.warn)("No cmap table available."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};var i,o=(t.start?t.start:0)+e.offset;t.pos=o,t.skip(2);for(var s,c=t.getUint16(),u=!1,l=0;l<c;l++){var f=t.getUint16(),h=t.getUint16(),d=t.getInt32()>>>0,p=!1;if((!s||s.platformId!==f||s.encodingId!==h)&&(0!==f||0!==h&&1!==h&&3!==h?1===f&&0===h?p=!0:3!==f||1!==h||!a&&s?r&&3===f&&0===h&&(p=!0,u=!0):(p=!0,r||(u=!0)):p=!0,p&&(s={platformId:f,encodingId:h,offset:d}),u))break}if(s&&(t.pos=o+s.offset),!s||-1===t.peekByte())return(0,n.warn)("Could not find a preferred cmap table."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};var g=t.getUint16();t.skip(4);var m,v,y=!1,b=[];if(0===g){for(m=0;m<256;m++){var w=t.getByte();w&&b.push({charCode:m,glyphId:w})}y=!0}else if(4===g){var k=t.getUint16()>>1;t.skip(6);var S,x=[];for(S=0;S<k;S++)x.push({end:t.getUint16()});for(t.skip(2),S=0;S<k;S++)x[S].start=t.getUint16();for(S=0;S<k;S++)x[S].delta=t.getUint16();var A,O=0;for(S=0;S<k;S++){i=x[S];var C=t.getUint16();C?(A=(C>>1)-(k-S),i.offsetIndex=A,O=Math.max(O,A+i.end-i.start+1)):i.offsetIndex=-1}var T=[];for(m=0;m<O;m++)T.push(t.getUint16());for(S=0;S<k;S++){o=(i=x[S]).start;var F=i.end,_=i.delta;for(A=i.offsetIndex,m=o;m<=F;m++)65535!==m&&(v=(v=A<0?m:T[A+m-o])+_&65535,b.push({charCode:m,glyphId:v}))}}else{if(6!==g)return(0,n.warn)("cmap table has unsupported format: "+g),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};var P=t.getUint16(),I=t.getUint16();for(m=0;m<I;m++){v=t.getUint16();var E=P+m;b.push({charCode:E,glyphId:v})}}b.sort(function(e,t){return e.charCode-t.charCode});for(var j=1;j<b.length;j++)b[j-1].charCode===b[j].charCode&&(b.splice(j,1),j--);return{platformId:s.platformId,encodingId:s.encodingId,mappings:b,hasShortCmap:y}}(w.cmap,t,this.isSymbolicFont,r.hasEncoding),Q=Z.platformId,ee=Z.encodingId,te=Z.mappings,re=te.length,ne=[];if(!r.hasEncoding||"MacRomanEncoding"!==r.baseEncodingName&&"WinAnsiEncoding"!==r.baseEncodingName||(ne=(0,s.getEncoding)(r.baseEncodingName)),r.hasEncoding&&!this.isSymbolicFont&&(3===Q&&1===ee||1===Q&&0===ee))for(var ae=(0,o.getGlyphsUnicode)(),ie=0;ie<256;ie++){var oe=void 0;if(oe=this.differences&&ie in this.differences?this.differences[ie]:ie in ne&&""!==ne[ie]?ne[ie]:s.StandardEncoding[ie]){var se=(0,i.recoverGlyphName)(oe,ae),ce=void 0;3===Q&&1===ee?ce=ae[se]:1===Q&&0===ee&&(ce=s.MacRomanEncoding.indexOf(se));for(var ue=0;ue<re;++ue)if(te[ue].charCode===ce){V[ie]=te[ue].glyphId;break}}}else if(0===Q)for(var le=0;le<re;++le)V[te[le].charCode]=te[le].glyphId;else for(var fe=0;fe<re;++fe){var he=te[fe].charCode;3===Q&&he>=61440&&he<=61695&&(he&=255),V[he]=te[fe].glyphId}if(r.glyphNames&&(ne.length||this.differences.length))for(var de=0;de<256;++de)if(void 0===V[de]){var pe=this.differences[de]||ne[de];if(pe){var ge=r.glyphNames.indexOf(pe);ge>0&&K(ge)&&(V[de]=ge)}}}0===V.length&&(V[0]=0);var me=j-1;if(R||(me=0),!r.cssFontInfo){var ve=D(V,K,me);this.toFontChar=ve.toFontChar,w.cmap={tag:"cmap",data:L(ve.charCodeToGlyphId,j)},w["OS/2"]&&function(e,t){t.pos=(t.start||0)+e.offset;var r=t.getUint16();t.skip(60);var n=t.getUint16();return!(r<4&&768&n||t.getUint16()>t.getUint16()||(t.skip(6),0===t.getUint16()||(e.data[8]=e.data[9]=0,0)))}(w["OS/2"],t)||(w["OS/2"]={tag:"OS/2",data:U(r,ve.charCodeToGlyphId,W)})}if(!C)try{S=new m.Stream(w["CFF "].data),(k=new a.CFFParser(S,r,i.SEAC_ANALYSIS_ENABLED).parse()).duplicateFirstGlyph();var ye=new a.CFFCompiler(k);w["CFF "].data=ye.compile()}catch(e){(0,n.warn)("Failed to compile font "+r.loadedName)}if(w.name){var be=v(w.name);w.name.data=H(e,be)}else w.name={tag:"name",data:H(this.name)};var we=new p.OpenTypeFileBuilder(b.version);for(var ke in w)we.addTable(ke,w[ke].data);return we.toArray()}},{key:"convert",value:function(e,t,r){r.fixedPitch=!1,r.builtInEncoding&&function(e,t){if(!(e.hasIncludedToUnicodeMap||t===e.defaultEncoding||e.toUnicode instanceof l.IdentityToUnicodeMap)){var r=[],n=(0,o.getGlyphsUnicode)();for(var a in t)if(!e.hasEncoding||void 0===e.differences[a]){var i=t[a],s=(0,u.getUnicodeForGlyph)(i,n);-1!==s&&(r[a]=String.fromCharCode(s))}e.toUnicode.amend(r)}}(r,r.builtInEncoding);var a=1;t instanceof f.CFFFont&&(a=t.numGlyphs-1);var c=t.getGlyphMapping(r),h=null,d=c;r.cssFontInfo||(h=D(c,t.hasGlyphId.bind(t),a),this.toFontChar=h.toFontChar,d=h.charCodeToGlyphId);var g=t.numGlyphs;function m(e,t){var r=null;for(var n in e)t===e[n]&&(r||(r=[]),r.push(0|n));return r}function v(e,t){for(var r in e)if(t===e[r])return 0|r;return h.charCodeToGlyphId[h.nextAvailableFontCharCode]=t,h.nextAvailableFontCharCode++}var y=t.seacs;if(h&&i.SEAC_ANALYSIS_ENABLED&&y&&y.length){var b=r.fontMatrix||n.FONT_IDENTITY_MATRIX,w=t.getCharset(),k=Object.create(null);for(var S in y){var x=y[S|=0],A=s.StandardEncoding[x[2]],O=s.StandardEncoding[x[3]],C=w.indexOf(A),T=w.indexOf(O);if(!(C<0||T<0)){var F={x:x[0]*b[0]+x[1]*b[2]+b[4],y:x[0]*b[1]+x[1]*b[3]+b[5]},_=m(c,S);if(_)for(var P=0,I=_.length;P<I;P++){var E=_[P],M=h.charCodeToGlyphId,N=v(M,C),B=v(M,T);k[E]={baseFontCharCode:N,accentFontCharCode:B,accentOffset:F}}}}r.seacMap=k}var X=1/(r.fontMatrix||n.FONT_IDENTITY_MATRIX)[0],$=new p.OpenTypeFileBuilder("OTTO");return $.addTable("CFF ",t.data),$.addTable("OS/2",U(r,d)),$.addTable("cmap",L(d,g)),$.addTable("head","\0\0\0\0\0\0\0\0\0\0_<õ\0\0"+R(X)+"\0\0\0\0\v~'\0\0\0\0\v~'\0\0"+R(r.descent)+"ÿ"+R(r.ascent)+j(r.italicAngle?2:0)+"\0\0\0\0\0\0\0"),$.addTable("hhea","\0\0\0"+R(r.ascent)+R(r.descent)+"\0\0ÿÿ\0\0\0\0\0\0"+R(r.capHeight)+R(Math.tan(r.italicAngle)*r.xHeight)+"\0\0\0\0\0\0\0\0\0\0\0\0"+j(g)),$.addTable("hmtx",function(){for(var e=t.charstrings,r=t.cff?t.cff.widths:null,n="\0\0\0\0",a=1,i=g;a<i;a++){var o=0;if(e){var s=e[a-1];o="width"in s?s.width:0}else r&&(o=Math.ceil(r[a]||0));n+=j(o)+j(0)}return n}()),$.addTable("maxp","\0\0P\0"+j(g)),$.addTable("name",H(e)),$.addTable("post",q(r)),$.toArray()}},{key:"spaceWidth",get:function(){for(var e,t=["space","minus","one","i","I"],r=0,a=t.length;r<a;r++){var i=t[r];if(i in this.widths){e=this.widths[i];break}var s=(0,o.getGlyphsUnicode)()[i],c=0;if(this.composite&&this.cMap.contains(s)&&(c=this.cMap.lookup(s)),!c&&this.toUnicode&&(c=this.toUnicode.charCodeOf(s)),c<=0&&(c=s),e=this.widths[c])break}return e=e||this.defaultWidth,(0,n.shadow)(this,"spaceWidth",e)}},{key:"_charToGlyph",value:function(e){var t,r,a,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=e;this.cMap&&this.cMap.contains(e)&&(o=this.cMap.lookup(e)),r=this.widths[o],r=(0,n.isNum)(r)?r:this.defaultWidth;var s=this.vmetrics&&this.vmetrics[o],c=this.toUnicode.get(e)||this.fallbackToUnicode.get(e)||e;"number"==typeof c&&(c=String.fromCharCode(c));var l=e in this.toFontChar;if(t=this.toFontChar[e]||e,this.missingFile){var f=this.differences[e]||this.defaultEncoding[e];".notdef"!==f&&""!==f||"Type1"!==this.type||(t=32),t=(0,u.mapSpecialUnicodeValues)(t)}this.isType3Font&&(a=t);var h=null;if(this.seacMap&&this.seacMap[e]){l=!0;var d=this.seacMap[e];t=d.baseFontCharCode,h={fontChar:String.fromCodePoint(d.accentFontCharCode),offset:d.accentOffset}}var p="";"number"==typeof t&&(t<=1114111?p=String.fromCodePoint(t):(0,n.warn)("charToGlyph - invalid fontCharCode: ".concat(t)));var g=this._glyphCache[e];return g&&g.matchesForCache(p,c,h,r,s,a,i,l)||(g=new P(p,c,h,r,s,a,i,l),this._glyphCache[e]=g),g}},{key:"charsToGlyphs",value:function(e){var t=this._charsCache[e];if(t)return t;if(t=[],this.cMap)for(var r=Object.create(null),n=e.length,a=0;a<n;){this.cMap.readCharCode(e,a,r);var i=r.charcode,o=r.length;a+=o;var s=this._charToGlyph(i,1===o&&32===e.charCodeAt(a-1));t.push(s)}else for(var c=0,u=e.length;c<u;++c){var l=e.charCodeAt(c),f=this._charToGlyph(l,32===l);t.push(f)}return this._charsCache[e]=t}},{key:"getCharPositions",value:function(e){var t=[];if(this.cMap)for(var r=Object.create(null),n=0;n<e.length;){this.cMap.readCharCode(e,n,r);var a=r.length;t.push([n,n+a]),n+=a}else for(var i=0,o=e.length;i<o;++i)t.push([i,i+1]);return t}},{key:"glyphCacheValues",get:function(){return Object.values(this._glyphCache)}},{key:"encodeString",value:function(e){for(var t=[],r=[],n=function(){return t.length%2==1},a=0,i=e.length;a<i;a++){var o=e.codePointAt(a);if(o>55295&&(o<57344||o>65533)&&a++,this.toUnicode){var s=String.fromCodePoint(o),c=this.toUnicode.charCodeOf(s);if(-1!==c){n()&&(t.push(r.join("")),r.length=0);for(var u=(this.cMap?this.cMap.getCharCodeLength(c):1)-1;u>=0;u--)r.push(String.fromCharCode(c>>8*u&255));continue}}n()||(t.push(r.join("")),r.length=0),r.push(String.fromCodePoint(o))}return t.push(r.join("")),t}}]),e}();t.Font=$;var z=function(){function e(t){S(this,e),this.error=t,this.loadedName="g_font_error",this.missingFile=!0}return A(e,[{key:"charsToGlyphs",value:function(){return[]}},{key:"encodeString",value:function(e){return[e]}},{key:"exportData",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return{error:this.error}}}]),e}();t.ErrorFont=z},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CFFTopDict=t.CFFStrings=t.CFFStandardStrings=t.CFFPrivateDict=t.CFFParser=t.CFFIndex=t.CFFHeader=t.CFFFDSelect=t.CFFCompiler=t.CFFCharset=t.CFF=void 0;var a=r(4),i=r(144),o=r(145);function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),e}var p=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"];t.CFFStandardStrings=p;var g=function(){var e=[null,{id:"hstem",min:2,stackClearing:!0,stem:!0},null,{id:"vstem",min:2,stackClearing:!0,stem:!0},{id:"vmoveto",min:1,stackClearing:!0},{id:"rlineto",min:2,resetStack:!0},{id:"hlineto",min:1,resetStack:!0},{id:"vlineto",min:1,resetStack:!0},{id:"rrcurveto",min:6,resetStack:!0},null,{id:"callsubr",min:1,undefStack:!0},{id:"return",min:0,undefStack:!0},null,null,{id:"endchar",min:0,stackClearing:!0},null,null,null,{id:"hstemhm",min:2,stackClearing:!0,stem:!0},{id:"hintmask",min:0,stackClearing:!0},{id:"cntrmask",min:0,stackClearing:!0},{id:"rmoveto",min:2,stackClearing:!0},{id:"hmoveto",min:1,stackClearing:!0},{id:"vstemhm",min:2,stackClearing:!0,stem:!0},{id:"rcurveline",min:8,resetStack:!0},{id:"rlinecurve",min:8,resetStack:!0},{id:"vvcurveto",min:4,resetStack:!0},{id:"hhcurveto",min:4,resetStack:!0},null,{id:"callgsubr",min:1,undefStack:!0},{id:"vhcurveto",min:4,resetStack:!0},{id:"hvcurveto",min:4,resetStack:!0}],t=[null,null,null,{id:"and",min:2,stackDelta:-1},{id:"or",min:2,stackDelta:-1},{id:"not",min:1,stackDelta:0},null,null,null,{id:"abs",min:1,stackDelta:0},{id:"add",min:2,stackDelta:-1,stackFn:function(e,t){e[t-2]=e[t-2]+e[t-1]}},{id:"sub",min:2,stackDelta:-1,stackFn:function(e,t){e[t-2]=e[t-2]-e[t-1]}},{id:"div",min:2,stackDelta:-1,stackFn:function(e,t){e[t-2]=e[t-2]/e[t-1]}},null,{id:"neg",min:1,stackDelta:0,stackFn:function(e,t){e[t-1]=-e[t-1]}},{id:"eq",min:2,stackDelta:-1},null,null,{id:"drop",min:1,stackDelta:-1},null,{id:"put",min:2,stackDelta:-2},{id:"get",min:1,stackDelta:0},{id:"ifelse",min:4,stackDelta:-3},{id:"random",min:0,stackDelta:1},{id:"mul",min:2,stackDelta:-1,stackFn:function(e,t){e[t-2]=e[t-2]*e[t-1]}},null,{id:"sqrt",min:1,stackDelta:0},{id:"dup",min:1,stackDelta:1},{id:"exch",min:2,stackDelta:0},{id:"index",min:2,stackDelta:0},{id:"roll",min:3,stackDelta:-2},null,null,null,{id:"hflex",min:7,resetStack:!0},{id:"flex",min:13,resetStack:!0},{id:"hflex1",min:9,resetStack:!0},{id:"flex1",min:11,resetStack:!0}];return function(){function r(e,t,n){f(this,r),this.bytes=e.getBytes(),this.properties=t,this.seacAnalysisEnabled=!!n}return d(r,[{key:"parse",value:function(){var e=this.properties,t=new m;this.cff=t;var r=this.parseHeader(),n=this.parseIndex(r.endPos),a=this.parseIndex(n.endPos),i=this.parseIndex(a.endPos),o=this.parseIndex(i.endPos),s=this.parseDict(a.obj.get(0)),c=this.createDict(k,s,t.strings);t.header=r.obj,t.names=this.parseNameIndex(n.obj),t.strings=this.parseStringIndex(i.obj),t.topDict=c,t.globalSubrIndex=o.obj,this.parsePrivateDict(t.topDict),t.isCIDFont=c.hasName("ROS");var u=c.getByName("CharStrings"),l=this.parseIndex(u).obj,f=c.getByName("FontMatrix");f&&(e.fontMatrix=f);var h,d,p=c.getByName("FontBBox");if(p&&(e.ascent=Math.max(p[3],p[1]),e.descent=Math.min(p[1],p[3]),e.ascentScaled=!0),t.isCIDFont){for(var g=this.parseIndex(c.getByName("FDArray")).obj,v=0,y=g.count;v<y;++v){var b=g.get(v),w=this.createDict(k,this.parseDict(b),t.strings);this.parsePrivateDict(w),t.fdArray.push(w)}d=null,h=this.parseCharsets(c.getByName("charset"),l.count,t.strings,!0),t.fdSelect=this.parseFDSelect(c.getByName("FDSelect"),l.count)}else h=this.parseCharsets(c.getByName("charset"),l.count,t.strings,!1),d=this.parseEncoding(c.getByName("Encoding"),e,t.strings,h.charset);t.charset=h,t.encoding=d;var S=this.parseCharStrings({charStrings:l,localSubrIndex:c.privateDict.subrsIndex,globalSubrIndex:o.obj,fdSelect:t.fdSelect,fdArray:t.fdArray,privateDict:c.privateDict});return t.charStrings=S.charStrings,t.seacs=S.seacs,t.widths=S.widths,t}},{key:"parseHeader",value:function(){for(var e=this.bytes,t=e.length,r=0;r<t&&1!==e[r];)++r;if(r>=t)throw new a.FormatError("Invalid CFF header");0!==r&&((0,a.info)("cff data is shifted"),e=e.subarray(r),this.bytes=e);var n=e[0],i=e[1],o=e[2],s=e[3];return{obj:new v(n,i,o,s),endPos:o}}},{key:"parseDict",value:function(e){var t=0;function r(){var r=e[t++];return 30===r?function(){var r="",n=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],a=e.length;for(;t<a;){var i=e[t++],o=i>>4,s=15&i;if(15===o)break;if(r+=n[o],15===s)break;r+=n[s]}return parseFloat(r)}():28===r?r=((r=e[t++])<<24|e[t++]<<16)>>16:29===r?r=(r=(r=(r=e[t++])<<8|e[t++])<<8|e[t++])<<8|e[t++]:r>=32&&r<=246?r-139:r>=247&&r<=250?256*(r-247)+e[t++]+108:r>=251&&r<=254?-256*(r-251)-e[t++]-108:((0,a.warn)('CFFParser_parseDict: "'+r+'" is a reserved command.'),NaN)}var n=[],i=[];t=0;for(var o=e.length;t<o;){var s=e[t];s<=21?(12===s&&(s=s<<8|e[++t]),i.push([s,n]),n=[],++t):n.push(r())}return i}},{key:"parseIndex",value:function(e){var t,r,n=new b,a=this.bytes,i=a[e++]<<8|a[e++],o=[],s=e;if(0!==i){var c=a[e++],u=e+(i+1)*c-1;for(t=0,r=i+1;t<r;++t){for(var l=0,f=0;f<c;++f)l<<=8,l+=a[e++];o.push(u+l)}s=o[i]}for(t=0,r=o.length-1;t<r;++t){var h=o[t],d=o[t+1];n.add(a.subarray(h,d))}return{obj:n,endPos:s}}},{key:"parseNameIndex",value:function(e){for(var t=[],r=0,n=e.count;r<n;++r){var i=e.get(r);t.push((0,a.bytesToString)(i))}return t}},{key:"parseStringIndex",value:function(e){for(var t=new y,r=0,n=e.count;r<n;++r){var i=e.get(r);t.add((0,a.bytesToString)(i))}return t}},{key:"createDict",value:function(e,t,r){for(var n=new e(r),a=0,i=t.length;a<i;++a){var o=t[a],s=o[0],c=o[1];n.setByKey(s,c)}return n}},{key:"parseCharString",value:function(r,n,i,o){if(!n||r.callDepth>10)return!1;for(var s=r.stackSize,c=r.stack,u=n.length,l=0;l<u;){var f=n[l++],h=null;if(12===f){var d=n[l++];0===d?(n[l-2]=139,n[l-1]=22,s=0):h=t[d]}else if(28===f)c[s]=(n[l]<<24|n[l+1]<<16)>>16,l+=2,s++;else if(14===f){if(s>=4&&(s-=4,this.seacAnalysisEnabled))return r.seac=c.slice(s,s+4),!1;h=e[f]}else if(f>=32&&f<=246)c[s]=f-139,s++;else if(f>=247&&f<=254)c[s]=f<251?(f-247<<8)+n[l]+108:-(f-251<<8)-n[l]-108,l++,s++;else if(255===f)c[s]=(n[l]<<24|n[l+1]<<16|n[l+2]<<8|n[l+3])/65536,l+=4,s++;else if(19===f||20===f)r.hints+=s>>1,l+=r.hints+7>>3,s%=2,h=e[f];else{if(10===f||29===f){var p=void 0;if(!(p=10===f?i:o))return h=e[f],(0,a.warn)("Missing subrsIndex for "+h.id),!1;var g=32768;p.count<1240?g=107:p.count<33900&&(g=1131);var m=c[--s]+g;if(m<0||m>=p.count||isNaN(m))return h=e[f],(0,a.warn)("Out of bounds subrIndex for "+h.id),!1;if(r.stackSize=s,r.callDepth++,!this.parseCharString(r,p.get(m),i,o))return!1;r.callDepth--,s=r.stackSize;continue}if(11===f)return r.stackSize=s,!0;h=e[f]}if(h){if(h.stem&&(r.hints+=s>>1,3===f||23===f?r.hasVStems=!0:!r.hasVStems||1!==f&&18!==f||((0,a.warn)("CFF stem hints are in wrong order"),n[l-1]=1===f?3:23)),"min"in h&&!r.undefStack&&s<h.min)return(0,a.warn)("Not enough parameters for "+h.id+"; actual: "+s+", expected: "+h.min),!1;r.firstStackClearing&&h.stackClearing&&(r.firstStackClearing=!1,(s-=h.min)>=2&&h.stem?s%=2:s>1&&(0,a.warn)("Found too many parameters for stack-clearing command"),s>0&&(r.width=c[s-1])),"stackDelta"in h?("stackFn"in h&&h.stackFn(c,s),s+=h.stackDelta):h.stackClearing?s=0:h.resetStack?(s=0,r.undefStack=!1):h.undefStack&&(s=0,r.undefStack=!0,r.firstStackClearing=!1)}}return r.stackSize=s,!0}},{key:"parseCharStrings",value:function(e){for(var t=e.charStrings,r=e.localSubrIndex,n=e.globalSubrIndex,i=e.fdSelect,o=e.fdArray,s=e.privateDict,c=[],u=[],l=t.count,f=0;f<l;f++){var h=t.get(f),d={callDepth:0,stackSize:0,stack:[],undefStack:!0,hints:0,firstStackClearing:!0,seac:null,width:null,hasVStems:!1},p=!0,g=null,m=s;if(i&&o.length){var v=i.getFDIndex(f);-1===v&&((0,a.warn)("Glyph index is not in fd select."),p=!1),v>=o.length&&((0,a.warn)("Invalid fd index for glyph index."),p=!1),p&&(g=(m=o[v].privateDict).subrsIndex)}else r&&(g=r);if(p&&(p=this.parseCharString(d,h,g,n)),null!==d.width){var y=m.getByName("nominalWidthX");u[f]=y+d.width}else{var b=m.getByName("defaultWidthX");u[f]=b}null!==d.seac&&(c[f]=d.seac),p||t.set(f,new Uint8Array([14]))}return{charStrings:t,seacs:c,widths:u}}},{key:"emptyPrivateDictionary",value:function(e){var t=this.createDict(S,[],e.strings);e.setByKey(18,[0,0]),e.privateDict=t}},{key:"parsePrivateDict",value:function(e){if(e.hasName("Private")){var t=e.getByName("Private");if(Array.isArray(t)&&2===t.length){var r=t[0],n=t[1];if(0===r||n>=this.bytes.length)this.emptyPrivateDictionary(e);else{var a=n+r,i=this.bytes.subarray(n,a),o=this.parseDict(i),s=this.createDict(S,o,e.strings);if(e.privateDict=s,s.getByName("Subrs")){var c=s.getByName("Subrs"),u=n+c;if(0===c||u>=this.bytes.length)this.emptyPrivateDictionary(e);else{var l=this.parseIndex(u);s.subrsIndex=l.obj}}}}else e.removeByName("Private")}else this.emptyPrivateDictionary(e)}},{key:"parseCharsets",value:function(e,t,r,n){if(0===e)return new A(!0,x.ISO_ADOBE,i.ISOAdobeCharset);if(1===e)return new A(!0,x.EXPERT,i.ExpertCharset);if(2===e)return new A(!0,x.EXPERT_SUBSET,i.ExpertSubsetCharset);var o,s,c,u=this.bytes,l=e,f=u[e++],h=[n?0:".notdef"];switch(t-=1,f){case 0:for(c=0;c<t;c++)o=u[e++]<<8|u[e++],h.push(n?o:r.get(o));break;case 1:for(;h.length<=t;)for(o=u[e++]<<8|u[e++],s=u[e++],c=0;c<=s;c++)h.push(n?o++:r.get(o++));break;case 2:for(;h.length<=t;)for(o=u[e++]<<8|u[e++],s=u[e++]<<8|u[e++],c=0;c<=s;c++)h.push(n?o++:r.get(o++));break;default:throw new a.FormatError("Unknown charset format")}var d=e,p=u.subarray(l,d);return new A(!1,f,h,p)}},{key:"parseEncoding",value:function(e,t,r,n){var i,s,c,u=Object.create(null),l=this.bytes,f=!1,h=null;if(0===e||1===e){f=!0,i=e;var d=e?o.ExpertEncoding:o.StandardEncoding;for(s=0,c=n.length;s<c;s++){var p=d.indexOf(n[s]);-1!==p&&(u[p]=s)}}else{var g=e;switch(127&(i=l[e++])){case 0:var m=l[e++];for(s=1;s<=m;s++)u[l[e++]]=s;break;case 1:var v=l[e++],y=1;for(s=0;s<v;s++)for(var b=l[e++],w=l[e++],k=b;k<=b+w;k++)u[k]=y++;break;default:throw new a.FormatError("Unknown encoding format: ".concat(i," in CFF"))}var S=e;128&i&&(l[g]&=127,function(){var t=l[e++];for(s=0;s<t;s++){var a=l[e++],i=(l[e++]<<8)+(255&l[e++]);u[a]=n.indexOf(r.get(i))}}()),h=l.subarray(g,S)}return new O(f,i&=127,u,h)}},{key:"parseFDSelect",value:function(e,t){var r,n=this.bytes,i=n[e++],o=[];switch(i){case 0:for(r=0;r<t;++r){var s=n[e++];o.push(s)}break;case 3:var c=n[e++]<<8|n[e++];for(r=0;r<c;++r){var u=n[e++]<<8|n[e++];0===r&&0!==u&&((0,a.warn)("parseFDSelect: The first range must have a first GID of 0 -- trying to recover."),u=0);for(var l=n[e++],f=n[e]<<8|n[e+1],h=u;h<f;++h)o.push(l)}e+=2;break;default:throw new a.FormatError('parseFDSelect: Unknown format "'.concat(i,'".'))}if(o.length!==t)throw new a.FormatError("parseFDSelect: Invalid font data.");return new C(i,o)}}]),r}()}();t.CFFParser=g;var m=function(){function e(){f(this,e),this.header=null,this.names=[],this.topDict=null,this.strings=new y,this.globalSubrIndex=null,this.encoding=null,this.charset=null,this.charStrings=null,this.fdArray=[],this.fdSelect=null,this.isCIDFont=!1}return d(e,[{key:"duplicateFirstGlyph",value:function(){if(this.charStrings.count>=65535)(0,a.warn)("Not enough space in charstrings to duplicate first glyph.");else{var e=this.charStrings.get(0);this.charStrings.add(e),this.isCIDFont&&this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0])}}},{key:"hasGlyphId",value:function(e){return!(e<0||e>=this.charStrings.count)&&this.charStrings.get(e).length>0}}]),e}();t.CFF=m;var v=function e(t,r,n,a){f(this,e),this.major=t,this.minor=r,this.hdrSize=n,this.offSize=a};t.CFFHeader=v;var y=function(){function e(){f(this,e),this.strings=[]}return d(e,[{key:"get",value:function(e){return e>=0&&e<=390?p[e]:e-391<=this.strings.length?this.strings[e-391]:p[0]}},{key:"getSID",value:function(e){var t=p.indexOf(e);return-1!==t?t:-1!==(t=this.strings.indexOf(e))?t+391:-1}},{key:"add",value:function(e){this.strings.push(e)}},{key:"count",get:function(){return this.strings.length}}]),e}();t.CFFStrings=y;var b=function(){function e(){f(this,e),this.objects=[],this.length=0}return d(e,[{key:"add",value:function(e){this.length+=e.length,this.objects.push(e)}},{key:"set",value:function(e,t){this.length+=t.length-this.objects[e].length,this.objects[e]=t}},{key:"get",value:function(e){return this.objects[e]}},{key:"count",get:function(){return this.objects.length}}]),e}();t.CFFIndex=b;var w=function(){function e(t,r){f(this,e),this.keyToNameMap=t.keyToNameMap,this.nameToKeyMap=t.nameToKeyMap,this.defaults=t.defaults,this.types=t.types,this.opcodes=t.opcodes,this.order=t.order,this.strings=r,this.values=Object.create(null)}return d(e,[{key:"setByKey",value:function(e,t){if(!(e in this.keyToNameMap))return!1;var r=t.length;if(0===r)return!0;for(var n=0;n<r;n++)if(isNaN(t[n]))return(0,a.warn)('Invalid CFFDict value: "'+t+'" for key "'+e+'".'),!0;var i=this.types[e];return"num"!==i&&"sid"!==i&&"offset"!==i||(t=t[0]),this.values[e]=t,!0}},{key:"setByName",value:function(e,t){if(!(e in this.nameToKeyMap))throw new a.FormatError('Invalid dictionary name "'.concat(e,'"'));this.values[this.nameToKeyMap[e]]=t}},{key:"hasName",value:function(e){return this.nameToKeyMap[e]in this.values}},{key:"getByName",value:function(e){if(!(e in this.nameToKeyMap))throw new a.FormatError("Invalid dictionary name ".concat(e,'"'));var t=this.nameToKeyMap[e];return t in this.values?this.values[t]:this.defaults[t]}},{key:"removeByName",value:function(e){delete this.values[this.nameToKeyMap[e]]}}],[{key:"createTables",value:function(e){for(var t={keyToNameMap:{},nameToKeyMap:{},defaults:{},types:{},opcodes:{},order:[]},r=0,n=e.length;r<n;++r){var a=e[r],i=Array.isArray(a[0])?(a[0][0]<<8)+a[0][1]:a[0];t.keyToNameMap[i]=a[1],t.nameToKeyMap[a[1]]=i,t.types[i]=a[2],t.defaults[i]=a[3],t.opcodes[i]=Array.isArray(a[0])?a[0]:[a[0]],t.order.push(i)}return t}}]),e}(),k=function(){var e=[[[12,30],"ROS",["sid","sid","num"],null],[[12,20],"SyntheticBase","num",null],[0,"version","sid",null],[1,"Notice","sid",null],[[12,0],"Copyright","sid",null],[2,"FullName","sid",null],[3,"FamilyName","sid",null],[4,"Weight","sid",null],[[12,1],"isFixedPitch","num",0],[[12,2],"ItalicAngle","num",0],[[12,3],"UnderlinePosition","num",-100],[[12,4],"UnderlineThickness","num",50],[[12,5],"PaintType","num",0],[[12,6],"CharstringType","num",2],[[12,7],"FontMatrix",["num","num","num","num","num","num"],[.001,0,0,.001,0,0]],[13,"UniqueID","num",null],[5,"FontBBox",["num","num","num","num"],[0,0,0,0]],[[12,8],"StrokeWidth","num",0],[14,"XUID","array",null],[15,"charset","offset",0],[16,"Encoding","offset",0],[17,"CharStrings","offset",0],[18,"Private",["offset","offset"],null],[[12,21],"PostScript","sid",null],[[12,22],"BaseFontName","sid",null],[[12,23],"BaseFontBlend","delta",null],[[12,31],"CIDFontVersion","num",0],[[12,32],"CIDFontRevision","num",0],[[12,33],"CIDFontType","num",0],[[12,34],"CIDCount","num",8720],[[12,35],"UIDBase","num",null],[[12,37],"FDSelect","offset",null],[[12,36],"FDArray","offset",null],[[12,38],"FontName","sid",null]],t=null;return function(r){s(a,w);var n=u(a);function a(r){var i;return f(this,a),null===t&&(t=w.createTables(e)),(i=n.call(this,t,r)).privateDict=null,i}return a}()}();t.CFFTopDict=k;var S=function(){var e=[[6,"BlueValues","delta",null],[7,"OtherBlues","delta",null],[8,"FamilyBlues","delta",null],[9,"FamilyOtherBlues","delta",null],[[12,9],"BlueScale","num",.039625],[[12,10],"BlueShift","num",7],[[12,11],"BlueFuzz","num",1],[10,"StdHW","num",null],[11,"StdVW","num",null],[[12,12],"StemSnapH","delta",null],[[12,13],"StemSnapV","delta",null],[[12,14],"ForceBold","num",0],[[12,17],"LanguageGroup","num",0],[[12,18],"ExpansionFactor","num",.06],[[12,19],"initialRandomSeed","num",0],[20,"defaultWidthX","num",0],[21,"nominalWidthX","num",0],[19,"Subrs","offset",null]],t=null;return function(r){s(a,w);var n=u(a);function a(r){var i;return f(this,a),null===t&&(t=w.createTables(e)),(i=n.call(this,t,r)).subrsIndex=null,i}return a}()}();t.CFFPrivateDict=S;var x={ISO_ADOBE:0,EXPERT:1,EXPERT_SUBSET:2},A=function e(t,r,n,a){f(this,e),this.predefined=t,this.format=r,this.charset=n,this.raw=a};t.CFFCharset=A;var O=function e(t,r,n,a){f(this,e),this.predefined=t,this.format=r,this.encoding=n,this.raw=a},C=function(){function e(t,r){f(this,e),this.format=t,this.fdSelect=r}return d(e,[{key:"getFDIndex",value:function(e){return e<0||e>=this.fdSelect.length?-1:this.fdSelect[e]}}]),e}();t.CFFFDSelect=C;var T=function(){function e(){f(this,e),this.offsets=Object.create(null)}return d(e,[{key:"isTracking",value:function(e){return e in this.offsets}},{key:"track",value:function(e,t){if(e in this.offsets)throw new a.FormatError("Already tracking location of ".concat(e));this.offsets[e]=t}},{key:"offset",value:function(e){for(var t in this.offsets)this.offsets[t]+=e}},{key:"setEntryLocation",value:function(e,t,r){if(!(e in this.offsets))throw new a.FormatError("Not tracking location of ".concat(e));for(var n=r.data,i=this.offsets[e],o=0,s=t.length;o<s;++o){var c=5*o+i,u=c+1,l=c+2,f=c+3,h=c+4;if(29!==n[c]||0!==n[u]||0!==n[l]||0!==n[f]||0!==n[h])throw new a.FormatError("writing to an offset that is not empty");var d=t[o];n[c]=29,n[u]=d>>24&255,n[l]=d>>16&255,n[f]=d>>8&255,n[h]=255&d}}}]),e}(),F=function(){function e(t){f(this,e),this.cff=t}return d(e,[{key:"compile",value:function(){var e=this.cff,t={data:[],length:0,add:function(e){this.data=this.data.concat(e),this.length=this.data.length}},r=this.compileHeader(e.header);t.add(r);var n=this.compileNameIndex(e.names);if(t.add(n),e.isCIDFont&&e.topDict.hasName("FontMatrix")){var i=e.topDict.getByName("FontMatrix");e.topDict.removeByName("FontMatrix");for(var o=0,s=e.fdArray.length;o<s;o++){var c=e.fdArray[o],u=i.slice(0);c.hasName("FontMatrix")&&(u=a.Util.transform(u,c.getByName("FontMatrix"))),c.setByName("FontMatrix",u)}}var l=e.topDict.getByName("XUID");l&&l.length>16&&e.topDict.removeByName("XUID"),e.topDict.setByName("charset",0);var f=this.compileTopDicts([e.topDict],t.length,e.isCIDFont);t.add(f.output);var h=f.trackers[0],d=this.compileStringIndex(e.strings.strings);t.add(d);var p=this.compileIndex(e.globalSubrIndex);if(t.add(p),e.encoding&&e.topDict.hasName("Encoding"))if(e.encoding.predefined)h.setEntryLocation("Encoding",[e.encoding.format],t);else{var g=this.compileEncoding(e.encoding);h.setEntryLocation("Encoding",[t.length],t),t.add(g)}var m=this.compileCharset(e.charset,e.charStrings.count,e.strings,e.isCIDFont);h.setEntryLocation("charset",[t.length],t),t.add(m);var v=this.compileCharStrings(e.charStrings);if(h.setEntryLocation("CharStrings",[t.length],t),t.add(v),e.isCIDFont){h.setEntryLocation("FDSelect",[t.length],t);var y=this.compileFDSelect(e.fdSelect);t.add(y),f=this.compileTopDicts(e.fdArray,t.length,!0),h.setEntryLocation("FDArray",[t.length],t),t.add(f.output);var b=f.trackers;this.compilePrivateDicts(e.fdArray,b,t)}return this.compilePrivateDicts([e.topDict],[h],t),t.add([0]),t.data}},{key:"encodeNumber",value:function(e){return Number.isInteger(e)?this.encodeInteger(e):this.encodeFloat(e)}},{key:"encodeFloat",value:function(t){var r=t.toString(),n=e.EncodeFloatRegExp.exec(r);if(n){var a=parseFloat("1e"+((n[2]?+n[2]:0)+n[1].length));r=(Math.round(t*a)/a).toString()}var i,o,s="";for(i=0,o=r.length;i<o;++i){var c=r[i];s+="e"===c?"-"===r[++i]?"c":"b":"."===c?"a":"-"===c?"e":c}var u=[30];for(i=0,o=(s+=1&s.length?"f":"ff").length;i<o;i+=2)u.push(parseInt(s.substring(i,i+2),16));return u}},{key:"encodeInteger",value:function(e){return e>=-107&&e<=107?[e+139]:e>=108&&e<=1131?[247+((e-=108)>>8),255&e]:e>=-1131&&e<=-108?[251+((e=-e-108)>>8),255&e]:e>=-32768&&e<=32767?[28,e>>8&255,255&e]:[29,e>>24&255,e>>16&255,e>>8&255,255&e]}},{key:"compileHeader",value:function(e){return[e.major,e.minor,4,e.offSize]}},{key:"compileNameIndex",value:function(e){for(var t=new b,r=0,n=e.length;r<n;++r){for(var i=e[r],o=Math.min(i.length,127),s=new Array(o),c=0;c<o;c++){var u=i[c];(u<"!"||u>"~"||"["===u||"]"===u||"("===u||")"===u||"{"===u||"}"===u||"<"===u||">"===u||"/"===u||"%"===u)&&(u="_"),s[c]=u}""===(s=s.join(""))&&(s="Bad_Font_Name"),t.add((0,a.stringToBytes)(s))}return this.compileIndex(t)}},{key:"compileTopDicts",value:function(e,t,r){for(var n=[],a=new b,i=0,o=e.length;i<o;++i){var s=e[i];r&&(s.removeByName("CIDFontVersion"),s.removeByName("CIDFontRevision"),s.removeByName("CIDFontType"),s.removeByName("CIDCount"),s.removeByName("UIDBase"));var c=new T,u=this.compileDict(s,c);n.push(c),a.add(u),c.offset(t)}return{trackers:n,output:a=this.compileIndex(a,n)}}},{key:"compilePrivateDicts",value:function(e,t,r){for(var n=0,i=e.length;n<i;++n){var o=e[n],s=o.privateDict;if(!s||!o.hasName("Private"))throw new a.FormatError("There must be a private dictionary.");var c=new T,u=this.compileDict(s,c),l=r.length;if(c.offset(l),u.length||(l=0),t[n].setEntryLocation("Private",[u.length,l],r),r.add(u),s.subrsIndex&&s.hasName("Subrs")){var f=this.compileIndex(s.subrsIndex);c.setEntryLocation("Subrs",[u.length],r),r.add(f)}}}},{key:"compileDict",value:function(e,t){for(var r=[],n=e.order,i=0;i<n.length;++i){var o=n[i];if(o in e.values){var s=e.values[o],c=e.types[o];if(Array.isArray(c)||(c=[c]),Array.isArray(s)||(s=[s]),0!==s.length){for(var u=0,l=c.length;u<l;++u){var f=c[u],h=s[u];switch(f){case"num":case"sid":r=r.concat(this.encodeNumber(h));break;case"offset":var d=e.keyToNameMap[o];t.isTracking(d)||t.track(d,r.length),r=r.concat([29,0,0,0,0]);break;case"array":case"delta":r=r.concat(this.encodeNumber(h));for(var p=1,g=s.length;p<g;++p)r=r.concat(this.encodeNumber(s[p]));break;default:throw new a.FormatError("Unknown data type of ".concat(f))}}r=r.concat(e.opcodes[o])}}}return r}},{key:"compileStringIndex",value:function(e){for(var t=new b,r=0,n=e.length;r<n;++r)t.add((0,a.stringToBytes)(e[r]));return this.compileIndex(t)}},{key:"compileGlobalSubrIndex",value:function(){var e=this.cff.globalSubrIndex;this.out.writeByteArray(this.compileIndex(e))}},{key:"compileCharStrings",value:function(e){for(var t=new b,r=0;r<e.count;r++){var n=e.get(r);0!==n.length?t.add(n):t.add(new Uint8Array([139,14]))}return this.compileIndex(t)}},{key:"compileCharset",value:function(e,t,r,n){var i,o=t-1;if(n)i=new Uint8Array([2,0,0,o>>8&255,255&o]);else{(i=new Uint8Array(1+2*o))[0]=0;for(var s=0,c=e.charset.length,u=!1,l=1;l<i.length;l+=2){var f=0;if(s<c){var h=e.charset[s++];-1===(f=r.getSID(h))&&(f=0,u||(u=!0,(0,a.warn)("Couldn't find ".concat(h," in CFF strings"))))}i[l]=f>>8&255,i[l+1]=255&f}}return this.compileTypedArray(i)}},{key:"compileEncoding",value:function(e){return this.compileTypedArray(e.raw)}},{key:"compileFDSelect",value:function(e){var t,r,n=e.format;switch(n){case 0:for((t=new Uint8Array(1+e.fdSelect.length))[0]=n,r=0;r<e.fdSelect.length;r++)t[r+1]=e.fdSelect[r];break;case 3:var a=e.fdSelect[0],i=[n,0,0,0,0,a];for(r=1;r<e.fdSelect.length;r++){var o=e.fdSelect[r];o!==a&&(i.push(r>>8&255,255&r,o),a=o)}var s=(i.length-3)/3;i[1]=s>>8&255,i[2]=255&s,i.push(r>>8&255,255&r),t=new Uint8Array(i)}return this.compileTypedArray(t)}},{key:"compileTypedArray",value:function(e){for(var t=[],r=0,n=e.length;r<n;++r)t[r]=e[r];return t}},{key:"compileIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=e.objects,n=r.length;if(0===n)return[0,0,0];var a,i,o=[n>>8&255,255&n],s=1;for(a=0;a<n;++a)s+=r[a].length;i=s<256?1:s<65536?2:s<16777216?3:4,o.push(i);var c=1;for(a=0;a<n+1;a++)1===i?o.push(255&c):2===i?o.push(c>>8&255,255&c):3===i?o.push(c>>16&255,c>>8&255,255&c):o.push(c>>>24&255,c>>16&255,c>>8&255,255&c),r[a]&&(c+=r[a].length);for(a=0;a<n;a++){t[a]&&t[a].offset(o.length);for(var u=0,l=r[a].length;u<l;u++)o.push(r[a][u])}return o}}],[{key:"EncodeFloatRegExp",get:function(){return(0,a.shadow)(this,"EncodeFloatRegExp",/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/)}}]),e}();t.CFFCompiler=F},(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ISOAdobeCharset=t.ExpertSubsetCharset=t.ExpertCharset=void 0;t.ISOAdobeCharset=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"];t.ExpertCharset=[".notdef","space","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"];t.ExpertSubsetCharset=[".notdef","space","dollaroldstyle","dollarsuperior","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","hyphensuperior","colonmonetary","onefitted","rupiah","centoldstyle","figuredash","hypheninferior","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior"]},(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEncoding=function(e){switch(e){case"WinAnsiEncoding":return o;case"StandardEncoding":return i;case"MacRomanEncoding":return a;case"SymbolSetEncoding":return s;case"ZapfDingbatsEncoding":return c;case"ExpertEncoding":return r;case"MacExpertEncoding":return n;default:return null}},t.ZapfDingbatsEncoding=t.WinAnsiEncoding=t.SymbolSetEncoding=t.StandardEncoding=t.MacRomanEncoding=t.ExpertEncoding=void 0;var r=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"];t.ExpertEncoding=r;var n=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","centoldstyle","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","","threequartersemdash","","questionsmall","","","","","Ethsmall","","","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","","","","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hypheninferior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","asuperior","centsuperior","","","","","Aacutesmall","Agravesmall","Acircumflexsmall","Adieresissmall","Atildesmall","Aringsmall","Ccedillasmall","Eacutesmall","Egravesmall","Ecircumflexsmall","Edieresissmall","Iacutesmall","Igravesmall","Icircumflexsmall","Idieresissmall","Ntildesmall","Oacutesmall","Ogravesmall","Ocircumflexsmall","Odieresissmall","Otildesmall","Uacutesmall","Ugravesmall","Ucircumflexsmall","Udieresissmall","","eightsuperior","fourinferior","threeinferior","sixinferior","eightinferior","seveninferior","Scaronsmall","","centinferior","twoinferior","","Dieresissmall","","Caronsmall","osuperior","fiveinferior","","commainferior","periodinferior","Yacutesmall","","dollarinferior","","","Thornsmall","","nineinferior","zeroinferior","Zcaronsmall","AEsmall","Oslashsmall","questiondownsmall","oneinferior","Lslashsmall","","","","","","","Cedillasmall","","","","","","OEsmall","figuredash","hyphensuperior","","","","","exclamdownsmall","","Ydieresissmall","","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","ninesuperior","zerosuperior","","esuperior","rsuperior","tsuperior","","","isuperior","ssuperior","dsuperior","","","","","","lsuperior","Ogoneksmall","Brevesmall","Macronsmall","bsuperior","nsuperior","msuperior","commasuperior","periodsuperior","Dotaccentsmall","Ringsmall","","","",""],a=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","space","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron"];t.MacRomanEncoding=a;var i=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls","","","",""];t.StandardEncoding=i;var o=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","bullet","Euro","bullet","quotesinglbase","florin","quotedblbase","ellipsis","dagger","daggerdbl","circumflex","perthousand","Scaron","guilsinglleft","OE","bullet","Zcaron","bullet","bullet","quoteleft","quoteright","quotedblleft","quotedblright","bullet","endash","emdash","tilde","trademark","scaron","guilsinglright","oe","bullet","zcaron","Ydieresis","space","exclamdown","cent","sterling","currency","yen","brokenbar","section","dieresis","copyright","ordfeminine","guillemotleft","logicalnot","hyphen","registered","macron","degree","plusminus","twosuperior","threesuperior","acute","mu","paragraph","periodcentered","cedilla","onesuperior","ordmasculine","guillemotright","onequarter","onehalf","threequarters","questiondown","Agrave","Aacute","Acircumflex","Atilde","Adieresis","Aring","AE","Ccedilla","Egrave","Eacute","Ecircumflex","Edieresis","Igrave","Iacute","Icircumflex","Idieresis","Eth","Ntilde","Ograve","Oacute","Ocircumflex","Otilde","Odieresis","multiply","Oslash","Ugrave","Uacute","Ucircumflex","Udieresis","Yacute","Thorn","germandbls","agrave","aacute","acircumflex","atilde","adieresis","aring","ae","ccedilla","egrave","eacute","ecircumflex","edieresis","igrave","iacute","icircumflex","idieresis","eth","ntilde","ograve","oacute","ocircumflex","otilde","odieresis","divide","oslash","ugrave","uacute","ucircumflex","udieresis","yacute","thorn","ydieresis"];t.WinAnsiEncoding=o;var s=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","universal","numbersign","existential","percent","ampersand","suchthat","parenleft","parenright","asteriskmath","plus","comma","minus","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","congruent","Alpha","Beta","Chi","Delta","Epsilon","Phi","Gamma","Eta","Iota","theta1","Kappa","Lambda","Mu","Nu","Omicron","Pi","Theta","Rho","Sigma","Tau","Upsilon","sigma1","Omega","Xi","Psi","Zeta","bracketleft","therefore","bracketright","perpendicular","underscore","radicalex","alpha","beta","chi","delta","epsilon","phi","gamma","eta","iota","phi1","kappa","lambda","mu","nu","omicron","pi","theta","rho","sigma","tau","upsilon","omega1","omega","xi","psi","zeta","braceleft","bar","braceright","similar","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Euro","Upsilon1","minute","lessequal","fraction","infinity","florin","club","diamond","heart","spade","arrowboth","arrowleft","arrowup","arrowright","arrowdown","degree","plusminus","second","greaterequal","multiply","proportional","partialdiff","bullet","divide","notequal","equivalence","approxequal","ellipsis","arrowvertex","arrowhorizex","carriagereturn","aleph","Ifraktur","Rfraktur","weierstrass","circlemultiply","circleplus","emptyset","intersection","union","propersuperset","reflexsuperset","notsubset","propersubset","reflexsubset","element","notelement","angle","gradient","registerserif","copyrightserif","trademarkserif","product","radical","dotmath","logicalnot","logicaland","logicalor","arrowdblboth","arrowdblleft","arrowdblup","arrowdblright","arrowdbldown","lozenge","angleleft","registersans","copyrightsans","trademarksans","summation","parenlefttp","parenleftex","parenleftbt","bracketlefttp","bracketleftex","bracketleftbt","bracelefttp","braceleftmid","braceleftbt","braceex","","angleright","integral","integraltp","integralex","integralbt","parenrighttp","parenrightex","parenrightbt","bracketrighttp","bracketrightex","bracketrightbt","bracerighttp","bracerightmid","bracerightbt",""];t.SymbolSetEncoding=s;var c=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","a1","a2","a202","a3","a4","a5","a119","a118","a117","a11","a12","a13","a14","a15","a16","a105","a17","a18","a19","a20","a21","a22","a23","a24","a25","a26","a27","a28","a6","a7","a8","a9","a10","a29","a30","a31","a32","a33","a34","a35","a36","a37","a38","a39","a40","a41","a42","a43","a44","a45","a46","a47","a48","a49","a50","a51","a52","a53","a54","a55","a56","a57","a58","a59","a60","a61","a62","a63","a64","a65","a66","a67","a68","a69","a70","a71","a72","a73","a74","a203","a75","a204","a76","a77","a78","a79","a81","a82","a83","a84","a97","a98","a99","a100","","a89","a90","a93","a94","a91","a92","a205","a85","a206","a86","a87","a88","a95","a96","","","","","","","","","","","","","","","","","","","","a101","a102","a103","a104","a106","a107","a108","a112","a111","a110","a109","a120","a121","a122","a123","a124","a125","a126","a127","a128","a129","a130","a131","a132","a133","a134","a135","a136","a137","a138","a139","a140","a141","a142","a143","a144","a145","a146","a147","a148","a149","a150","a151","a152","a153","a154","a155","a156","a157","a158","a159","a160","a161","a163","a164","a196","a165","a192","a166","a167","a168","a169","a170","a171","a172","a173","a162","a174","a175","a176","a177","a178","a179","a193","a180","a199","a181","a200","a182","","a201","a183","a184","a197","a185","a194","a198","a186","a195","a187","a188","a189","a190","a191",""];t.ZapfDingbatsEncoding=c},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFontType=function(e,t){switch(e){case"Type1":return"Type1C"===t?n.FontType.TYPE1C:n.FontType.TYPE1;case"CIDFontType0":return"CIDFontType0C"===t?n.FontType.CIDFONTTYPE0C:n.FontType.CIDFONTTYPE0;case"OpenType":return n.FontType.OPENTYPE;case"TrueType":return n.FontType.TRUETYPE;case"CIDFontType2":return n.FontType.CIDFONTTYPE2;case"MMType1":return n.FontType.MMTYPE1;case"Type0":return n.FontType.TYPE0;default:return n.FontType.UNKNOWN}},t.recoverGlyphName=c,t.type1FontGlyphMapping=function(e,t,r){var n,o,u,l=Object.create(null),f=!!(e.flags&s.Symbolic);if(e.baseEncodingName)for(u=(0,a.getEncoding)(e.baseEncodingName),o=0;o<u.length;o++)n=r.indexOf(u[o]),l[o]=n>=0?n:0;else if(f)for(o in t)l[o]=t[o];else for(u=a.StandardEncoding,o=0;o<u.length;o++)n=r.indexOf(u[o]),l[o]=n>=0?n:0;var h,d=e.differences;if(d)for(o in d){var p=d[o];if(-1===(n=r.indexOf(p))){h||(h=(0,i.getGlyphsUnicode)());var g=c(p,h);g!==p&&(n=r.indexOf(g))}l[o]=n>=0?n:0}return l},t.SEAC_ANALYSIS_ENABLED=t.MacStandardGlyphOrdering=t.FontFlags=void 0;var n=r(4),a=r(145),i=r(147),o=r(148);t.SEAC_ANALYSIS_ENABLED=!0;var s={FixedPitch:1,Serif:2,Symbolic:4,Script:8,Nonsymbolic:32,Italic:64,AllCap:65536,SmallCap:131072,ForceBold:262144};t.FontFlags=s;function c(e,t){if(void 0!==t[e])return e;var r=(0,o.getUnicodeForGlyph)(e,t);if(-1!==r)for(var a in t)if(t[a]===r)return a;return(0,n.info)("Unable to recover a standard glyph name for: "+e),e}t.MacStandardGlyphOrdering=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"]},(e,t,r)=>{"use strict";r.r(t),r.d(t,{getDingbatsGlyphsUnicode:()=>i,getGlyphsUnicode:()=>a});var n=r(117);const a=(0,n.getArrayLookupTableFactory)(function(){return["A",65,"AE",198,"AEacute",508,"AEmacron",482,"AEsmall",63462,"Aacute",193,"Aacutesmall",63457,"Abreve",258,"Abreveacute",7854,"Abrevecyrillic",1232,"Abrevedotbelow",7862,"Abrevegrave",7856,"Abrevehookabove",7858,"Abrevetilde",7860,"Acaron",461,"Acircle",9398,"Acircumflex",194,"Acircumflexacute",7844,"Acircumflexdotbelow",7852,"Acircumflexgrave",7846,"Acircumflexhookabove",7848,"Acircumflexsmall",63458,"Acircumflextilde",7850,"Acute",63177,"Acutesmall",63412,"Acyrillic",1040,"Adblgrave",512,"Adieresis",196,"Adieresiscyrillic",1234,"Adieresismacron",478,"Adieresissmall",63460,"Adotbelow",7840,"Adotmacron",480,"Agrave",192,"Agravesmall",63456,"Ahookabove",7842,"Aiecyrillic",1236,"Ainvertedbreve",514,"Alpha",913,"Alphatonos",902,"Amacron",256,"Amonospace",65313,"Aogonek",260,"Aring",197,"Aringacute",506,"Aringbelow",7680,"Aringsmall",63461,"Asmall",63329,"Atilde",195,"Atildesmall",63459,"Aybarmenian",1329,"B",66,"Bcircle",9399,"Bdotaccent",7682,"Bdotbelow",7684,"Becyrillic",1041,"Benarmenian",1330,"Beta",914,"Bhook",385,"Blinebelow",7686,"Bmonospace",65314,"Brevesmall",63220,"Bsmall",63330,"Btopbar",386,"C",67,"Caarmenian",1342,"Cacute",262,"Caron",63178,"Caronsmall",63221,"Ccaron",268,"Ccedilla",199,"Ccedillaacute",7688,"Ccedillasmall",63463,"Ccircle",9400,"Ccircumflex",264,"Cdot",266,"Cdotaccent",266,"Cedillasmall",63416,"Chaarmenian",1353,"Cheabkhasiancyrillic",1212,"Checyrillic",1063,"Chedescenderabkhasiancyrillic",1214,"Chedescendercyrillic",1206,"Chedieresiscyrillic",1268,"Cheharmenian",1347,"Chekhakassiancyrillic",1227,"Cheverticalstrokecyrillic",1208,"Chi",935,"Chook",391,"Circumflexsmall",63222,"Cmonospace",65315,"Coarmenian",1361,"Csmall",63331,"D",68,"DZ",497,"DZcaron",452,"Daarmenian",1332,"Dafrican",393,"Dcaron",270,"Dcedilla",7696,"Dcircle",9401,"Dcircumflexbelow",7698,"Dcroat",272,"Ddotaccent",7690,"Ddotbelow",7692,"Decyrillic",1044,"Deicoptic",1006,"Delta",8710,"Deltagreek",916,"Dhook",394,"Dieresis",63179,"DieresisAcute",63180,"DieresisGrave",63181,"Dieresissmall",63400,"Digammagreek",988,"Djecyrillic",1026,"Dlinebelow",7694,"Dmonospace",65316,"Dotaccentsmall",63223,"Dslash",272,"Dsmall",63332,"Dtopbar",395,"Dz",498,"Dzcaron",453,"Dzeabkhasiancyrillic",1248,"Dzecyrillic",1029,"Dzhecyrillic",1039,"E",69,"Eacute",201,"Eacutesmall",63465,"Ebreve",276,"Ecaron",282,"Ecedillabreve",7708,"Echarmenian",1333,"Ecircle",9402,"Ecircumflex",202,"Ecircumflexacute",7870,"Ecircumflexbelow",7704,"Ecircumflexdotbelow",7878,"Ecircumflexgrave",7872,"Ecircumflexhookabove",7874,"Ecircumflexsmall",63466,"Ecircumflextilde",7876,"Ecyrillic",1028,"Edblgrave",516,"Edieresis",203,"Edieresissmall",63467,"Edot",278,"Edotaccent",278,"Edotbelow",7864,"Efcyrillic",1060,"Egrave",200,"Egravesmall",63464,"Eharmenian",1335,"Ehookabove",7866,"Eightroman",8551,"Einvertedbreve",518,"Eiotifiedcyrillic",1124,"Elcyrillic",1051,"Elevenroman",8554,"Emacron",274,"Emacronacute",7702,"Emacrongrave",7700,"Emcyrillic",1052,"Emonospace",65317,"Encyrillic",1053,"Endescendercyrillic",1186,"Eng",330,"Enghecyrillic",1188,"Enhookcyrillic",1223,"Eogonek",280,"Eopen",400,"Epsilon",917,"Epsilontonos",904,"Ercyrillic",1056,"Ereversed",398,"Ereversedcyrillic",1069,"Escyrillic",1057,"Esdescendercyrillic",1194,"Esh",425,"Esmall",63333,"Eta",919,"Etarmenian",1336,"Etatonos",905,"Eth",208,"Ethsmall",63472,"Etilde",7868,"Etildebelow",7706,"Euro",8364,"Ezh",439,"Ezhcaron",494,"Ezhreversed",440,"F",70,"Fcircle",9403,"Fdotaccent",7710,"Feharmenian",1366,"Feicoptic",996,"Fhook",401,"Fitacyrillic",1138,"Fiveroman",8548,"Fmonospace",65318,"Fourroman",8547,"Fsmall",63334,"G",71,"GBsquare",13191,"Gacute",500,"Gamma",915,"Gammaafrican",404,"Gangiacoptic",1002,"Gbreve",286,"Gcaron",486,"Gcedilla",290,"Gcircle",9404,"Gcircumflex",284,"Gcommaaccent",290,"Gdot",288,"Gdotaccent",288,"Gecyrillic",1043,"Ghadarmenian",1346,"Ghemiddlehookcyrillic",1172,"Ghestrokecyrillic",1170,"Gheupturncyrillic",1168,"Ghook",403,"Gimarmenian",1331,"Gjecyrillic",1027,"Gmacron",7712,"Gmonospace",65319,"Grave",63182,"Gravesmall",63328,"Gsmall",63335,"Gsmallhook",667,"Gstroke",484,"H",72,"H18533",9679,"H18543",9642,"H18551",9643,"H22073",9633,"HPsquare",13259,"Haabkhasiancyrillic",1192,"Hadescendercyrillic",1202,"Hardsigncyrillic",1066,"Hbar",294,"Hbrevebelow",7722,"Hcedilla",7720,"Hcircle",9405,"Hcircumflex",292,"Hdieresis",7718,"Hdotaccent",7714,"Hdotbelow",7716,"Hmonospace",65320,"Hoarmenian",1344,"Horicoptic",1e3,"Hsmall",63336,"Hungarumlaut",63183,"Hungarumlautsmall",63224,"Hzsquare",13200,"I",73,"IAcyrillic",1071,"IJ",306,"IUcyrillic",1070,"Iacute",205,"Iacutesmall",63469,"Ibreve",300,"Icaron",463,"Icircle",9406,"Icircumflex",206,"Icircumflexsmall",63470,"Icyrillic",1030,"Idblgrave",520,"Idieresis",207,"Idieresisacute",7726,"Idieresiscyrillic",1252,"Idieresissmall",63471,"Idot",304,"Idotaccent",304,"Idotbelow",7882,"Iebrevecyrillic",1238,"Iecyrillic",1045,"Ifraktur",8465,"Igrave",204,"Igravesmall",63468,"Ihookabove",7880,"Iicyrillic",1048,"Iinvertedbreve",522,"Iishortcyrillic",1049,"Imacron",298,"Imacroncyrillic",1250,"Imonospace",65321,"Iniarmenian",1339,"Iocyrillic",1025,"Iogonek",302,"Iota",921,"Iotaafrican",406,"Iotadieresis",938,"Iotatonos",906,"Ismall",63337,"Istroke",407,"Itilde",296,"Itildebelow",7724,"Izhitsacyrillic",1140,"Izhitsadblgravecyrillic",1142,"J",74,"Jaarmenian",1345,"Jcircle",9407,"Jcircumflex",308,"Jecyrillic",1032,"Jheharmenian",1355,"Jmonospace",65322,"Jsmall",63338,"K",75,"KBsquare",13189,"KKsquare",13261,"Kabashkircyrillic",1184,"Kacute",7728,"Kacyrillic",1050,"Kadescendercyrillic",1178,"Kahookcyrillic",1219,"Kappa",922,"Kastrokecyrillic",1182,"Kaverticalstrokecyrillic",1180,"Kcaron",488,"Kcedilla",310,"Kcircle",9408,"Kcommaaccent",310,"Kdotbelow",7730,"Keharmenian",1364,"Kenarmenian",1343,"Khacyrillic",1061,"Kheicoptic",998,"Khook",408,"Kjecyrillic",1036,"Klinebelow",7732,"Kmonospace",65323,"Koppacyrillic",1152,"Koppagreek",990,"Ksicyrillic",1134,"Ksmall",63339,"L",76,"LJ",455,"LL",63167,"Lacute",313,"Lambda",923,"Lcaron",317,"Lcedilla",315,"Lcircle",9409,"Lcircumflexbelow",7740,"Lcommaaccent",315,"Ldot",319,"Ldotaccent",319,"Ldotbelow",7734,"Ldotbelowmacron",7736,"Liwnarmenian",1340,"Lj",456,"Ljecyrillic",1033,"Llinebelow",7738,"Lmonospace",65324,"Lslash",321,"Lslashsmall",63225,"Lsmall",63340,"M",77,"MBsquare",13190,"Macron",63184,"Macronsmall",63407,"Macute",7742,"Mcircle",9410,"Mdotaccent",7744,"Mdotbelow",7746,"Menarmenian",1348,"Mmonospace",65325,"Msmall",63341,"Mturned",412,"Mu",924,"N",78,"NJ",458,"Nacute",323,"Ncaron",327,"Ncedilla",325,"Ncircle",9411,"Ncircumflexbelow",7754,"Ncommaaccent",325,"Ndotaccent",7748,"Ndotbelow",7750,"Nhookleft",413,"Nineroman",8552,"Nj",459,"Njecyrillic",1034,"Nlinebelow",7752,"Nmonospace",65326,"Nowarmenian",1350,"Nsmall",63342,"Ntilde",209,"Ntildesmall",63473,"Nu",925,"O",79,"OE",338,"OEsmall",63226,"Oacute",211,"Oacutesmall",63475,"Obarredcyrillic",1256,"Obarreddieresiscyrillic",1258,"Obreve",334,"Ocaron",465,"Ocenteredtilde",415,"Ocircle",9412,"Ocircumflex",212,"Ocircumflexacute",7888,"Ocircumflexdotbelow",7896,"Ocircumflexgrave",7890,"Ocircumflexhookabove",7892,"Ocircumflexsmall",63476,"Ocircumflextilde",7894,"Ocyrillic",1054,"Odblacute",336,"Odblgrave",524,"Odieresis",214,"Odieresiscyrillic",1254,"Odieresissmall",63478,"Odotbelow",7884,"Ogoneksmall",63227,"Ograve",210,"Ogravesmall",63474,"Oharmenian",1365,"Ohm",8486,"Ohookabove",7886,"Ohorn",416,"Ohornacute",7898,"Ohorndotbelow",7906,"Ohorngrave",7900,"Ohornhookabove",7902,"Ohorntilde",7904,"Ohungarumlaut",336,"Oi",418,"Oinvertedbreve",526,"Omacron",332,"Omacronacute",7762,"Omacrongrave",7760,"Omega",8486,"Omegacyrillic",1120,"Omegagreek",937,"Omegaroundcyrillic",1146,"Omegatitlocyrillic",1148,"Omegatonos",911,"Omicron",927,"Omicrontonos",908,"Omonospace",65327,"Oneroman",8544,"Oogonek",490,"Oogonekmacron",492,"Oopen",390,"Oslash",216,"Oslashacute",510,"Oslashsmall",63480,"Osmall",63343,"Ostrokeacute",510,"Otcyrillic",1150,"Otilde",213,"Otildeacute",7756,"Otildedieresis",7758,"Otildesmall",63477,"P",80,"Pacute",7764,"Pcircle",9413,"Pdotaccent",7766,"Pecyrillic",1055,"Peharmenian",1354,"Pemiddlehookcyrillic",1190,"Phi",934,"Phook",420,"Pi",928,"Piwrarmenian",1363,"Pmonospace",65328,"Psi",936,"Psicyrillic",1136,"Psmall",63344,"Q",81,"Qcircle",9414,"Qmonospace",65329,"Qsmall",63345,"R",82,"Raarmenian",1356,"Racute",340,"Rcaron",344,"Rcedilla",342,"Rcircle",9415,"Rcommaaccent",342,"Rdblgrave",528,"Rdotaccent",7768,"Rdotbelow",7770,"Rdotbelowmacron",7772,"Reharmenian",1360,"Rfraktur",8476,"Rho",929,"Ringsmall",63228,"Rinvertedbreve",530,"Rlinebelow",7774,"Rmonospace",65330,"Rsmall",63346,"Rsmallinverted",641,"Rsmallinvertedsuperior",694,"S",83,"SF010000",9484,"SF020000",9492,"SF030000",9488,"SF040000",9496,"SF050000",9532,"SF060000",9516,"SF070000",9524,"SF080000",9500,"SF090000",9508,"SF100000",9472,"SF110000",9474,"SF190000",9569,"SF200000",9570,"SF210000",9558,"SF220000",9557,"SF230000",9571,"SF240000",9553,"SF250000",9559,"SF260000",9565,"SF270000",9564,"SF280000",9563,"SF360000",9566,"SF370000",9567,"SF380000",9562,"SF390000",9556,"SF400000",9577,"SF410000",9574,"SF420000",9568,"SF430000",9552,"SF440000",9580,"SF450000",9575,"SF460000",9576,"SF470000",9572,"SF480000",9573,"SF490000",9561,"SF500000",9560,"SF510000",9554,"SF520000",9555,"SF530000",9579,"SF540000",9578,"Sacute",346,"Sacutedotaccent",7780,"Sampigreek",992,"Scaron",352,"Scarondotaccent",7782,"Scaronsmall",63229,"Scedilla",350,"Schwa",399,"Schwacyrillic",1240,"Schwadieresiscyrillic",1242,"Scircle",9416,"Scircumflex",348,"Scommaaccent",536,"Sdotaccent",7776,"Sdotbelow",7778,"Sdotbelowdotaccent",7784,"Seharmenian",1357,"Sevenroman",8550,"Shaarmenian",1351,"Shacyrillic",1064,"Shchacyrillic",1065,"Sheicoptic",994,"Shhacyrillic",1210,"Shimacoptic",1004,"Sigma",931,"Sixroman",8549,"Smonospace",65331,"Softsigncyrillic",1068,"Ssmall",63347,"Stigmagreek",986,"T",84,"Tau",932,"Tbar",358,"Tcaron",356,"Tcedilla",354,"Tcircle",9417,"Tcircumflexbelow",7792,"Tcommaaccent",354,"Tdotaccent",7786,"Tdotbelow",7788,"Tecyrillic",1058,"Tedescendercyrillic",1196,"Tenroman",8553,"Tetsecyrillic",1204,"Theta",920,"Thook",428,"Thorn",222,"Thornsmall",63486,"Threeroman",8546,"Tildesmall",63230,"Tiwnarmenian",1359,"Tlinebelow",7790,"Tmonospace",65332,"Toarmenian",1337,"Tonefive",444,"Tonesix",388,"Tonetwo",423,"Tretroflexhook",430,"Tsecyrillic",1062,"Tshecyrillic",1035,"Tsmall",63348,"Twelveroman",8555,"Tworoman",8545,"U",85,"Uacute",218,"Uacutesmall",63482,"Ubreve",364,"Ucaron",467,"Ucircle",9418,"Ucircumflex",219,"Ucircumflexbelow",7798,"Ucircumflexsmall",63483,"Ucyrillic",1059,"Udblacute",368,"Udblgrave",532,"Udieresis",220,"Udieresisacute",471,"Udieresisbelow",7794,"Udieresiscaron",473,"Udieresiscyrillic",1264,"Udieresisgrave",475,"Udieresismacron",469,"Udieresissmall",63484,"Udotbelow",7908,"Ugrave",217,"Ugravesmall",63481,"Uhookabove",7910,"Uhorn",431,"Uhornacute",7912,"Uhorndotbelow",7920,"Uhorngrave",7914,"Uhornhookabove",7916,"Uhorntilde",7918,"Uhungarumlaut",368,"Uhungarumlautcyrillic",1266,"Uinvertedbreve",534,"Ukcyrillic",1144,"Umacron",362,"Umacroncyrillic",1262,"Umacrondieresis",7802,"Umonospace",65333,"Uogonek",370,"Upsilon",933,"Upsilon1",978,"Upsilonacutehooksymbolgreek",979,"Upsilonafrican",433,"Upsilondieresis",939,"Upsilondieresishooksymbolgreek",980,"Upsilonhooksymbol",978,"Upsilontonos",910,"Uring",366,"Ushortcyrillic",1038,"Usmall",63349,"Ustraightcyrillic",1198,"Ustraightstrokecyrillic",1200,"Utilde",360,"Utildeacute",7800,"Utildebelow",7796,"V",86,"Vcircle",9419,"Vdotbelow",7806,"Vecyrillic",1042,"Vewarmenian",1358,"Vhook",434,"Vmonospace",65334,"Voarmenian",1352,"Vsmall",63350,"Vtilde",7804,"W",87,"Wacute",7810,"Wcircle",9420,"Wcircumflex",372,"Wdieresis",7812,"Wdotaccent",7814,"Wdotbelow",7816,"Wgrave",7808,"Wmonospace",65335,"Wsmall",63351,"X",88,"Xcircle",9421,"Xdieresis",7820,"Xdotaccent",7818,"Xeharmenian",1341,"Xi",926,"Xmonospace",65336,"Xsmall",63352,"Y",89,"Yacute",221,"Yacutesmall",63485,"Yatcyrillic",1122,"Ycircle",9422,"Ycircumflex",374,"Ydieresis",376,"Ydieresissmall",63487,"Ydotaccent",7822,"Ydotbelow",7924,"Yericyrillic",1067,"Yerudieresiscyrillic",1272,"Ygrave",7922,"Yhook",435,"Yhookabove",7926,"Yiarmenian",1349,"Yicyrillic",1031,"Yiwnarmenian",1362,"Ymonospace",65337,"Ysmall",63353,"Ytilde",7928,"Yusbigcyrillic",1130,"Yusbigiotifiedcyrillic",1132,"Yuslittlecyrillic",1126,"Yuslittleiotifiedcyrillic",1128,"Z",90,"Zaarmenian",1334,"Zacute",377,"Zcaron",381,"Zcaronsmall",63231,"Zcircle",9423,"Zcircumflex",7824,"Zdot",379,"Zdotaccent",379,"Zdotbelow",7826,"Zecyrillic",1047,"Zedescendercyrillic",1176,"Zedieresiscyrillic",1246,"Zeta",918,"Zhearmenian",1338,"Zhebrevecyrillic",1217,"Zhecyrillic",1046,"Zhedescendercyrillic",1174,"Zhedieresiscyrillic",1244,"Zlinebelow",7828,"Zmonospace",65338,"Zsmall",63354,"Zstroke",437,"a",97,"aabengali",2438,"aacute",225,"aadeva",2310,"aagujarati",2694,"aagurmukhi",2566,"aamatragurmukhi",2622,"aarusquare",13059,"aavowelsignbengali",2494,"aavowelsigndeva",2366,"aavowelsigngujarati",2750,"abbreviationmarkarmenian",1375,"abbreviationsigndeva",2416,"abengali",2437,"abopomofo",12570,"abreve",259,"abreveacute",7855,"abrevecyrillic",1233,"abrevedotbelow",7863,"abrevegrave",7857,"abrevehookabove",7859,"abrevetilde",7861,"acaron",462,"acircle",9424,"acircumflex",226,"acircumflexacute",7845,"acircumflexdotbelow",7853,"acircumflexgrave",7847,"acircumflexhookabove",7849,"acircumflextilde",7851,"acute",180,"acutebelowcmb",791,"acutecmb",769,"acutecomb",769,"acutedeva",2388,"acutelowmod",719,"acutetonecmb",833,"acyrillic",1072,"adblgrave",513,"addakgurmukhi",2673,"adeva",2309,"adieresis",228,"adieresiscyrillic",1235,"adieresismacron",479,"adotbelow",7841,"adotmacron",481,"ae",230,"aeacute",509,"aekorean",12624,"aemacron",483,"afii00208",8213,"afii08941",8356,"afii10017",1040,"afii10018",1041,"afii10019",1042,"afii10020",1043,"afii10021",1044,"afii10022",1045,"afii10023",1025,"afii10024",1046,"afii10025",1047,"afii10026",1048,"afii10027",1049,"afii10028",1050,"afii10029",1051,"afii10030",1052,"afii10031",1053,"afii10032",1054,"afii10033",1055,"afii10034",1056,"afii10035",1057,"afii10036",1058,"afii10037",1059,"afii10038",1060,"afii10039",1061,"afii10040",1062,"afii10041",1063,"afii10042",1064,"afii10043",1065,"afii10044",1066,"afii10045",1067,"afii10046",1068,"afii10047",1069,"afii10048",1070,"afii10049",1071,"afii10050",1168,"afii10051",1026,"afii10052",1027,"afii10053",1028,"afii10054",1029,"afii10055",1030,"afii10056",1031,"afii10057",1032,"afii10058",1033,"afii10059",1034,"afii10060",1035,"afii10061",1036,"afii10062",1038,"afii10063",63172,"afii10064",63173,"afii10065",1072,"afii10066",1073,"afii10067",1074,"afii10068",1075,"afii10069",1076,"afii10070",1077,"afii10071",1105,"afii10072",1078,"afii10073",1079,"afii10074",1080,"afii10075",1081,"afii10076",1082,"afii10077",1083,"afii10078",1084,"afii10079",1085,"afii10080",1086,"afii10081",1087,"afii10082",1088,"afii10083",1089,"afii10084",1090,"afii10085",1091,"afii10086",1092,"afii10087",1093,"afii10088",1094,"afii10089",1095,"afii10090",1096,"afii10091",1097,"afii10092",1098,"afii10093",1099,"afii10094",1100,"afii10095",1101,"afii10096",1102,"afii10097",1103,"afii10098",1169,"afii10099",1106,"afii10100",1107,"afii10101",1108,"afii10102",1109,"afii10103",1110,"afii10104",1111,"afii10105",1112,"afii10106",1113,"afii10107",1114,"afii10108",1115,"afii10109",1116,"afii10110",1118,"afii10145",1039,"afii10146",1122,"afii10147",1138,"afii10148",1140,"afii10192",63174,"afii10193",1119,"afii10194",1123,"afii10195",1139,"afii10196",1141,"afii10831",63175,"afii10832",63176,"afii10846",1241,"afii299",8206,"afii300",8207,"afii301",8205,"afii57381",1642,"afii57388",1548,"afii57392",1632,"afii57393",1633,"afii57394",1634,"afii57395",1635,"afii57396",1636,"afii57397",1637,"afii57398",1638,"afii57399",1639,"afii57400",1640,"afii57401",1641,"afii57403",1563,"afii57407",1567,"afii57409",1569,"afii57410",1570,"afii57411",1571,"afii57412",1572,"afii57413",1573,"afii57414",1574,"afii57415",1575,"afii57416",1576,"afii57417",1577,"afii57418",1578,"afii57419",1579,"afii57420",1580,"afii57421",1581,"afii57422",1582,"afii57423",1583,"afii57424",1584,"afii57425",1585,"afii57426",1586,"afii57427",1587,"afii57428",1588,"afii57429",1589,"afii57430",1590,"afii57431",1591,"afii57432",1592,"afii57433",1593,"afii57434",1594,"afii57440",1600,"afii57441",1601,"afii57442",1602,"afii57443",1603,"afii57444",1604,"afii57445",1605,"afii57446",1606,"afii57448",1608,"afii57449",1609,"afii57450",1610,"afii57451",1611,"afii57452",1612,"afii57453",1613,"afii57454",1614,"afii57455",1615,"afii57456",1616,"afii57457",1617,"afii57458",1618,"afii57470",1607,"afii57505",1700,"afii57506",1662,"afii57507",1670,"afii57508",1688,"afii57509",1711,"afii57511",1657,"afii57512",1672,"afii57513",1681,"afii57514",1722,"afii57519",1746,"afii57534",1749,"afii57636",8362,"afii57645",1470,"afii57658",1475,"afii57664",1488,"afii57665",1489,"afii57666",1490,"afii57667",1491,"afii57668",1492,"afii57669",1493,"afii57670",1494,"afii57671",1495,"afii57672",1496,"afii57673",1497,"afii57674",1498,"afii57675",1499,"afii57676",1500,"afii57677",1501,"afii57678",1502,"afii57679",1503,"afii57680",1504,"afii57681",1505,"afii57682",1506,"afii57683",1507,"afii57684",1508,"afii57685",1509,"afii57686",1510,"afii57687",1511,"afii57688",1512,"afii57689",1513,"afii57690",1514,"afii57694",64298,"afii57695",64299,"afii57700",64331,"afii57705",64287,"afii57716",1520,"afii57717",1521,"afii57718",1522,"afii57723",64309,"afii57793",1460,"afii57794",1461,"afii57795",1462,"afii57796",1467,"afii57797",1464,"afii57798",1463,"afii57799",1456,"afii57800",1458,"afii57801",1457,"afii57802",1459,"afii57803",1474,"afii57804",1473,"afii57806",1465,"afii57807",1468,"afii57839",1469,"afii57841",1471,"afii57842",1472,"afii57929",700,"afii61248",8453,"afii61289",8467,"afii61352",8470,"afii61573",8236,"afii61574",8237,"afii61575",8238,"afii61664",8204,"afii63167",1645,"afii64937",701,"agrave",224,"agujarati",2693,"agurmukhi",2565,"ahiragana",12354,"ahookabove",7843,"aibengali",2448,"aibopomofo",12574,"aideva",2320,"aiecyrillic",1237,"aigujarati",2704,"aigurmukhi",2576,"aimatragurmukhi",2632,"ainarabic",1593,"ainfinalarabic",65226,"aininitialarabic",65227,"ainmedialarabic",65228,"ainvertedbreve",515,"aivowelsignbengali",2504,"aivowelsigndeva",2376,"aivowelsigngujarati",2760,"akatakana",12450,"akatakanahalfwidth",65393,"akorean",12623,"alef",1488,"alefarabic",1575,"alefdageshhebrew",64304,"aleffinalarabic",65166,"alefhamzaabovearabic",1571,"alefhamzaabovefinalarabic",65156,"alefhamzabelowarabic",1573,"alefhamzabelowfinalarabic",65160,"alefhebrew",1488,"aleflamedhebrew",64335,"alefmaddaabovearabic",1570,"alefmaddaabovefinalarabic",65154,"alefmaksuraarabic",1609,"alefmaksurafinalarabic",65264,"alefmaksurainitialarabic",65267,"alefmaksuramedialarabic",65268,"alefpatahhebrew",64302,"alefqamatshebrew",64303,"aleph",8501,"allequal",8780,"alpha",945,"alphatonos",940,"amacron",257,"amonospace",65345,"ampersand",38,"ampersandmonospace",65286,"ampersandsmall",63270,"amsquare",13250,"anbopomofo",12578,"angbopomofo",12580,"angbracketleft",12296,"angbracketright",12297,"angkhankhuthai",3674,"angle",8736,"anglebracketleft",12296,"anglebracketleftvertical",65087,"anglebracketright",12297,"anglebracketrightvertical",65088,"angleleft",9001,"angleright",9002,"angstrom",8491,"anoteleia",903,"anudattadeva",2386,"anusvarabengali",2434,"anusvaradeva",2306,"anusvaragujarati",2690,"aogonek",261,"apaatosquare",13056,"aparen",9372,"apostrophearmenian",1370,"apostrophemod",700,"apple",63743,"approaches",8784,"approxequal",8776,"approxequalorimage",8786,"approximatelyequal",8773,"araeaekorean",12686,"araeakorean",12685,"arc",8978,"arighthalfring",7834,"aring",229,"aringacute",507,"aringbelow",7681,"arrowboth",8596,"arrowdashdown",8675,"arrowdashleft",8672,"arrowdashright",8674,"arrowdashup",8673,"arrowdblboth",8660,"arrowdbldown",8659,"arrowdblleft",8656,"arrowdblright",8658,"arrowdblup",8657,"arrowdown",8595,"arrowdownleft",8601,"arrowdownright",8600,"arrowdownwhite",8681,"arrowheaddownmod",709,"arrowheadleftmod",706,"arrowheadrightmod",707,"arrowheadupmod",708,"arrowhorizex",63719,"arrowleft",8592,"arrowleftdbl",8656,"arrowleftdblstroke",8653,"arrowleftoverright",8646,"arrowleftwhite",8678,"arrowright",8594,"arrowrightdblstroke",8655,"arrowrightheavy",10142,"arrowrightoverleft",8644,"arrowrightwhite",8680,"arrowtableft",8676,"arrowtabright",8677,"arrowup",8593,"arrowupdn",8597,"arrowupdnbse",8616,"arrowupdownbase",8616,"arrowupleft",8598,"arrowupleftofdown",8645,"arrowupright",8599,"arrowupwhite",8679,"arrowvertex",63718,"asciicircum",94,"asciicircummonospace",65342,"asciitilde",126,"asciitildemonospace",65374,"ascript",593,"ascriptturned",594,"asmallhiragana",12353,"asmallkatakana",12449,"asmallkatakanahalfwidth",65383,"asterisk",42,"asteriskaltonearabic",1645,"asteriskarabic",1645,"asteriskmath",8727,"asteriskmonospace",65290,"asterisksmall",65121,"asterism",8258,"asuperior",63209,"asymptoticallyequal",8771,"at",64,"atilde",227,"atmonospace",65312,"atsmall",65131,"aturned",592,"aubengali",2452,"aubopomofo",12576,"audeva",2324,"augujarati",2708,"augurmukhi",2580,"aulengthmarkbengali",2519,"aumatragurmukhi",2636,"auvowelsignbengali",2508,"auvowelsigndeva",2380,"auvowelsigngujarati",2764,"avagrahadeva",2365,"aybarmenian",1377,"ayin",1506,"ayinaltonehebrew",64288,"ayinhebrew",1506,"b",98,"babengali",2476,"backslash",92,"backslashmonospace",65340,"badeva",2348,"bagujarati",2732,"bagurmukhi",2604,"bahiragana",12400,"bahtthai",3647,"bakatakana",12496,"bar",124,"barmonospace",65372,"bbopomofo",12549,"bcircle",9425,"bdotaccent",7683,"bdotbelow",7685,"beamedsixteenthnotes",9836,"because",8757,"becyrillic",1073,"beharabic",1576,"behfinalarabic",65168,"behinitialarabic",65169,"behiragana",12409,"behmedialarabic",65170,"behmeeminitialarabic",64671,"behmeemisolatedarabic",64520,"behnoonfinalarabic",64621,"bekatakana",12505,"benarmenian",1378,"bet",1489,"beta",946,"betasymbolgreek",976,"betdagesh",64305,"betdageshhebrew",64305,"bethebrew",1489,"betrafehebrew",64332,"bhabengali",2477,"bhadeva",2349,"bhagujarati",2733,"bhagurmukhi",2605,"bhook",595,"bihiragana",12403,"bikatakana",12499,"bilabialclick",664,"bindigurmukhi",2562,"birusquare",13105,"blackcircle",9679,"blackdiamond",9670,"blackdownpointingtriangle",9660,"blackleftpointingpointer",9668,"blackleftpointingtriangle",9664,"blacklenticularbracketleft",12304,"blacklenticularbracketleftvertical",65083,"blacklenticularbracketright",12305,"blacklenticularbracketrightvertical",65084,"blacklowerlefttriangle",9699,"blacklowerrighttriangle",9698,"blackrectangle",9644,"blackrightpointingpointer",9658,"blackrightpointingtriangle",9654,"blacksmallsquare",9642,"blacksmilingface",9787,"blacksquare",9632,"blackstar",9733,"blackupperlefttriangle",9700,"blackupperrighttriangle",9701,"blackuppointingsmalltriangle",9652,"blackuppointingtriangle",9650,"blank",9251,"blinebelow",7687,"block",9608,"bmonospace",65346,"bobaimaithai",3610,"bohiragana",12412,"bokatakana",12508,"bparen",9373,"bqsquare",13251,"braceex",63732,"braceleft",123,"braceleftbt",63731,"braceleftmid",63730,"braceleftmonospace",65371,"braceleftsmall",65115,"bracelefttp",63729,"braceleftvertical",65079,"braceright",125,"bracerightbt",63742,"bracerightmid",63741,"bracerightmonospace",65373,"bracerightsmall",65116,"bracerighttp",63740,"bracerightvertical",65080,"bracketleft",91,"bracketleftbt",63728,"bracketleftex",63727,"bracketleftmonospace",65339,"bracketlefttp",63726,"bracketright",93,"bracketrightbt",63739,"bracketrightex",63738,"bracketrightmonospace",65341,"bracketrighttp",63737,"breve",728,"brevebelowcmb",814,"brevecmb",774,"breveinvertedbelowcmb",815,"breveinvertedcmb",785,"breveinverteddoublecmb",865,"bridgebelowcmb",810,"bridgeinvertedbelowcmb",826,"brokenbar",166,"bstroke",384,"bsuperior",63210,"btopbar",387,"buhiragana",12406,"bukatakana",12502,"bullet",8226,"bulletinverse",9688,"bulletoperator",8729,"bullseye",9678,"c",99,"caarmenian",1390,"cabengali",2458,"cacute",263,"cadeva",2330,"cagujarati",2714,"cagurmukhi",2586,"calsquare",13192,"candrabindubengali",2433,"candrabinducmb",784,"candrabindudeva",2305,"candrabindugujarati",2689,"capslock",8682,"careof",8453,"caron",711,"caronbelowcmb",812,"caroncmb",780,"carriagereturn",8629,"cbopomofo",12568,"ccaron",269,"ccedilla",231,"ccedillaacute",7689,"ccircle",9426,"ccircumflex",265,"ccurl",597,"cdot",267,"cdotaccent",267,"cdsquare",13253,"cedilla",184,"cedillacmb",807,"cent",162,"centigrade",8451,"centinferior",63199,"centmonospace",65504,"centoldstyle",63394,"centsuperior",63200,"chaarmenian",1401,"chabengali",2459,"chadeva",2331,"chagujarati",2715,"chagurmukhi",2587,"chbopomofo",12564,"cheabkhasiancyrillic",1213,"checkmark",10003,"checyrillic",1095,"chedescenderabkhasiancyrillic",1215,"chedescendercyrillic",1207,"chedieresiscyrillic",1269,"cheharmenian",1395,"chekhakassiancyrillic",1228,"cheverticalstrokecyrillic",1209,"chi",967,"chieuchacirclekorean",12919,"chieuchaparenkorean",12823,"chieuchcirclekorean",12905,"chieuchkorean",12618,"chieuchparenkorean",12809,"chochangthai",3594,"chochanthai",3592,"chochingthai",3593,"chochoethai",3596,"chook",392,"cieucacirclekorean",12918,"cieucaparenkorean",12822,"cieuccirclekorean",12904,"cieuckorean",12616,"cieucparenkorean",12808,"cieucuparenkorean",12828,"circle",9675,"circlecopyrt",169,"circlemultiply",8855,"circleot",8857,"circleplus",8853,"circlepostalmark",12342,"circlewithlefthalfblack",9680,"circlewithrighthalfblack",9681,"circumflex",710,"circumflexbelowcmb",813,"circumflexcmb",770,"clear",8999,"clickalveolar",450,"clickdental",448,"clicklateral",449,"clickretroflex",451,"club",9827,"clubsuitblack",9827,"clubsuitwhite",9831,"cmcubedsquare",13220,"cmonospace",65347,"cmsquaredsquare",13216,"coarmenian",1409,"colon",58,"colonmonetary",8353,"colonmonospace",65306,"colonsign",8353,"colonsmall",65109,"colontriangularhalfmod",721,"colontriangularmod",720,"comma",44,"commaabovecmb",787,"commaaboverightcmb",789,"commaaccent",63171,"commaarabic",1548,"commaarmenian",1373,"commainferior",63201,"commamonospace",65292,"commareversedabovecmb",788,"commareversedmod",701,"commasmall",65104,"commasuperior",63202,"commaturnedabovecmb",786,"commaturnedmod",699,"compass",9788,"congruent",8773,"contourintegral",8750,"control",8963,"controlACK",6,"controlBEL",7,"controlBS",8,"controlCAN",24,"controlCR",13,"controlDC1",17,"controlDC2",18,"controlDC3",19,"controlDC4",20,"controlDEL",127,"controlDLE",16,"controlEM",25,"controlENQ",5,"controlEOT",4,"controlESC",27,"controlETB",23,"controlETX",3,"controlFF",12,"controlFS",28,"controlGS",29,"controlHT",9,"controlLF",10,"controlNAK",21,"controlNULL",0,"controlRS",30,"controlSI",15,"controlSO",14,"controlSOT",2,"controlSTX",1,"controlSUB",26,"controlSYN",22,"controlUS",31,"controlVT",11,"copyright",169,"copyrightsans",63721,"copyrightserif",63193,"cornerbracketleft",12300,"cornerbracketlefthalfwidth",65378,"cornerbracketleftvertical",65089,"cornerbracketright",12301,"cornerbracketrighthalfwidth",65379,"cornerbracketrightvertical",65090,"corporationsquare",13183,"cosquare",13255,"coverkgsquare",13254,"cparen",9374,"cruzeiro",8354,"cstretched",663,"curlyand",8911,"curlyor",8910,"currency",164,"cyrBreve",63185,"cyrFlex",63186,"cyrbreve",63188,"cyrflex",63189,"d",100,"daarmenian",1380,"dabengali",2470,"dadarabic",1590,"dadeva",2342,"dadfinalarabic",65214,"dadinitialarabic",65215,"dadmedialarabic",65216,"dagesh",1468,"dageshhebrew",1468,"dagger",8224,"daggerdbl",8225,"dagujarati",2726,"dagurmukhi",2598,"dahiragana",12384,"dakatakana",12480,"dalarabic",1583,"dalet",1491,"daletdagesh",64307,"daletdageshhebrew",64307,"dalethebrew",1491,"dalfinalarabic",65194,"dammaarabic",1615,"dammalowarabic",1615,"dammatanaltonearabic",1612,"dammatanarabic",1612,"danda",2404,"dargahebrew",1447,"dargalefthebrew",1447,"dasiapneumatacyrilliccmb",1157,"dblGrave",63187,"dblanglebracketleft",12298,"dblanglebracketleftvertical",65085,"dblanglebracketright",12299,"dblanglebracketrightvertical",65086,"dblarchinvertedbelowcmb",811,"dblarrowleft",8660,"dblarrowright",8658,"dbldanda",2405,"dblgrave",63190,"dblgravecmb",783,"dblintegral",8748,"dbllowline",8215,"dbllowlinecmb",819,"dbloverlinecmb",831,"dblprimemod",698,"dblverticalbar",8214,"dblverticallineabovecmb",782,"dbopomofo",12553,"dbsquare",13256,"dcaron",271,"dcedilla",7697,"dcircle",9427,"dcircumflexbelow",7699,"dcroat",273,"ddabengali",2465,"ddadeva",2337,"ddagujarati",2721,"ddagurmukhi",2593,"ddalarabic",1672,"ddalfinalarabic",64393,"dddhadeva",2396,"ddhabengali",2466,"ddhadeva",2338,"ddhagujarati",2722,"ddhagurmukhi",2594,"ddotaccent",7691,"ddotbelow",7693,"decimalseparatorarabic",1643,"decimalseparatorpersian",1643,"decyrillic",1076,"degree",176,"dehihebrew",1453,"dehiragana",12391,"deicoptic",1007,"dekatakana",12487,"deleteleft",9003,"deleteright",8998,"delta",948,"deltaturned",397,"denominatorminusonenumeratorbengali",2552,"dezh",676,"dhabengali",2471,"dhadeva",2343,"dhagujarati",2727,"dhagurmukhi",2599,"dhook",599,"dialytikatonos",901,"dialytikatonoscmb",836,"diamond",9830,"diamondsuitwhite",9826,"dieresis",168,"dieresisacute",63191,"dieresisbelowcmb",804,"dieresiscmb",776,"dieresisgrave",63192,"dieresistonos",901,"dihiragana",12386,"dikatakana",12482,"dittomark",12291,"divide",247,"divides",8739,"divisionslash",8725,"djecyrillic",1106,"dkshade",9619,"dlinebelow",7695,"dlsquare",13207,"dmacron",273,"dmonospace",65348,"dnblock",9604,"dochadathai",3598,"dodekthai",3604,"dohiragana",12393,"dokatakana",12489,"dollar",36,"dollarinferior",63203,"dollarmonospace",65284,"dollaroldstyle",63268,"dollarsmall",65129,"dollarsuperior",63204,"dong",8363,"dorusquare",13094,"dotaccent",729,"dotaccentcmb",775,"dotbelowcmb",803,"dotbelowcomb",803,"dotkatakana",12539,"dotlessi",305,"dotlessj",63166,"dotlessjstrokehook",644,"dotmath",8901,"dottedcircle",9676,"doubleyodpatah",64287,"doubleyodpatahhebrew",64287,"downtackbelowcmb",798,"downtackmod",725,"dparen",9375,"dsuperior",63211,"dtail",598,"dtopbar",396,"duhiragana",12389,"dukatakana",12485,"dz",499,"dzaltone",675,"dzcaron",454,"dzcurl",677,"dzeabkhasiancyrillic",1249,"dzecyrillic",1109,"dzhecyrillic",1119,"e",101,"eacute",233,"earth",9793,"ebengali",2447,"ebopomofo",12572,"ebreve",277,"ecandradeva",2317,"ecandragujarati",2701,"ecandravowelsigndeva",2373,"ecandravowelsigngujarati",2757,"ecaron",283,"ecedillabreve",7709,"echarmenian",1381,"echyiwnarmenian",1415,"ecircle",9428,"ecircumflex",234,"ecircumflexacute",7871,"ecircumflexbelow",7705,"ecircumflexdotbelow",7879,"ecircumflexgrave",7873,"ecircumflexhookabove",7875,"ecircumflextilde",7877,"ecyrillic",1108,"edblgrave",517,"edeva",2319,"edieresis",235,"edot",279,"edotaccent",279,"edotbelow",7865,"eegurmukhi",2575,"eematragurmukhi",2631,"efcyrillic",1092,"egrave",232,"egujarati",2703,"eharmenian",1383,"ehbopomofo",12573,"ehiragana",12360,"ehookabove",7867,"eibopomofo",12575,"eight",56,"eightarabic",1640,"eightbengali",2542,"eightcircle",9319,"eightcircleinversesansserif",10129,"eightdeva",2414,"eighteencircle",9329,"eighteenparen",9349,"eighteenperiod",9369,"eightgujarati",2798,"eightgurmukhi",2670,"eighthackarabic",1640,"eighthangzhou",12328,"eighthnotebeamed",9835,"eightideographicparen",12839,"eightinferior",8328,"eightmonospace",65304,"eightoldstyle",63288,"eightparen",9339,"eightperiod",9359,"eightpersian",1784,"eightroman",8567,"eightsuperior",8312,"eightthai",3672,"einvertedbreve",519,"eiotifiedcyrillic",1125,"ekatakana",12456,"ekatakanahalfwidth",65396,"ekonkargurmukhi",2676,"ekorean",12628,"elcyrillic",1083,"element",8712,"elevencircle",9322,"elevenparen",9342,"elevenperiod",9362,"elevenroman",8570,"ellipsis",8230,"ellipsisvertical",8942,"emacron",275,"emacronacute",7703,"emacrongrave",7701,"emcyrillic",1084,"emdash",8212,"emdashvertical",65073,"emonospace",65349,"emphasismarkarmenian",1371,"emptyset",8709,"enbopomofo",12579,"encyrillic",1085,"endash",8211,"endashvertical",65074,"endescendercyrillic",1187,"eng",331,"engbopomofo",12581,"enghecyrillic",1189,"enhookcyrillic",1224,"enspace",8194,"eogonek",281,"eokorean",12627,"eopen",603,"eopenclosed",666,"eopenreversed",604,"eopenreversedclosed",606,"eopenreversedhook",605,"eparen",9376,"epsilon",949,"epsilontonos",941,"equal",61,"equalmonospace",65309,"equalsmall",65126,"equalsuperior",8316,"equivalence",8801,"erbopomofo",12582,"ercyrillic",1088,"ereversed",600,"ereversedcyrillic",1101,"escyrillic",1089,"esdescendercyrillic",1195,"esh",643,"eshcurl",646,"eshortdeva",2318,"eshortvowelsigndeva",2374,"eshreversedloop",426,"eshsquatreversed",645,"esmallhiragana",12359,"esmallkatakana",12455,"esmallkatakanahalfwidth",65386,"estimated",8494,"esuperior",63212,"eta",951,"etarmenian",1384,"etatonos",942,"eth",240,"etilde",7869,"etildebelow",7707,"etnahtafoukhhebrew",1425,"etnahtafoukhlefthebrew",1425,"etnahtahebrew",1425,"etnahtalefthebrew",1425,"eturned",477,"eukorean",12641,"euro",8364,"evowelsignbengali",2503,"evowelsigndeva",2375,"evowelsigngujarati",2759,"exclam",33,"exclamarmenian",1372,"exclamdbl",8252,"exclamdown",161,"exclamdownsmall",63393,"exclammonospace",65281,"exclamsmall",63265,"existential",8707,"ezh",658,"ezhcaron",495,"ezhcurl",659,"ezhreversed",441,"ezhtail",442,"f",102,"fadeva",2398,"fagurmukhi",2654,"fahrenheit",8457,"fathaarabic",1614,"fathalowarabic",1614,"fathatanarabic",1611,"fbopomofo",12552,"fcircle",9429,"fdotaccent",7711,"feharabic",1601,"feharmenian",1414,"fehfinalarabic",65234,"fehinitialarabic",65235,"fehmedialarabic",65236,"feicoptic",997,"female",9792,"ff",64256,"f_f",64256,"ffi",64259,"ffl",64260,"fi",64257,"fifteencircle",9326,"fifteenparen",9346,"fifteenperiod",9366,"figuredash",8210,"filledbox",9632,"filledrect",9644,"finalkaf",1498,"finalkafdagesh",64314,"finalkafdageshhebrew",64314,"finalkafhebrew",1498,"finalmem",1501,"finalmemhebrew",1501,"finalnun",1503,"finalnunhebrew",1503,"finalpe",1507,"finalpehebrew",1507,"finaltsadi",1509,"finaltsadihebrew",1509,"firsttonechinese",713,"fisheye",9673,"fitacyrillic",1139,"five",53,"fivearabic",1637,"fivebengali",2539,"fivecircle",9316,"fivecircleinversesansserif",10126,"fivedeva",2411,"fiveeighths",8541,"fivegujarati",2795,"fivegurmukhi",2667,"fivehackarabic",1637,"fivehangzhou",12325,"fiveideographicparen",12836,"fiveinferior",8325,"fivemonospace",65301,"fiveoldstyle",63285,"fiveparen",9336,"fiveperiod",9356,"fivepersian",1781,"fiveroman",8564,"fivesuperior",8309,"fivethai",3669,"fl",64258,"florin",402,"fmonospace",65350,"fmsquare",13209,"fofanthai",3615,"fofathai",3613,"fongmanthai",3663,"forall",8704,"four",52,"fourarabic",1636,"fourbengali",2538,"fourcircle",9315,"fourcircleinversesansserif",10125,"fourdeva",2410,"fourgujarati",2794,"fourgurmukhi",2666,"fourhackarabic",1636,"fourhangzhou",12324,"fourideographicparen",12835,"fourinferior",8324,"fourmonospace",65300,"fournumeratorbengali",2551,"fouroldstyle",63284,"fourparen",9335,"fourperiod",9355,"fourpersian",1780,"fourroman",8563,"foursuperior",8308,"fourteencircle",9325,"fourteenparen",9345,"fourteenperiod",9365,"fourthai",3668,"fourthtonechinese",715,"fparen",9377,"fraction",8260,"franc",8355,"g",103,"gabengali",2455,"gacute",501,"gadeva",2327,"gafarabic",1711,"gaffinalarabic",64403,"gafinitialarabic",64404,"gafmedialarabic",64405,"gagujarati",2711,"gagurmukhi",2583,"gahiragana",12364,"gakatakana",12460,"gamma",947,"gammalatinsmall",611,"gammasuperior",736,"gangiacoptic",1003,"gbopomofo",12557,"gbreve",287,"gcaron",487,"gcedilla",291,"gcircle",9430,"gcircumflex",285,"gcommaaccent",291,"gdot",289,"gdotaccent",289,"gecyrillic",1075,"gehiragana",12370,"gekatakana",12466,"geometricallyequal",8785,"gereshaccenthebrew",1436,"gereshhebrew",1523,"gereshmuqdamhebrew",1437,"germandbls",223,"gershayimaccenthebrew",1438,"gershayimhebrew",1524,"getamark",12307,"ghabengali",2456,"ghadarmenian",1394,"ghadeva",2328,"ghagujarati",2712,"ghagurmukhi",2584,"ghainarabic",1594,"ghainfinalarabic",65230,"ghaininitialarabic",65231,"ghainmedialarabic",65232,"ghemiddlehookcyrillic",1173,"ghestrokecyrillic",1171,"gheupturncyrillic",1169,"ghhadeva",2394,"ghhagurmukhi",2650,"ghook",608,"ghzsquare",13203,"gihiragana",12366,"gikatakana",12462,"gimarmenian",1379,"gimel",1490,"gimeldagesh",64306,"gimeldageshhebrew",64306,"gimelhebrew",1490,"gjecyrillic",1107,"glottalinvertedstroke",446,"glottalstop",660,"glottalstopinverted",662,"glottalstopmod",704,"glottalstopreversed",661,"glottalstopreversedmod",705,"glottalstopreversedsuperior",740,"glottalstopstroke",673,"glottalstopstrokereversed",674,"gmacron",7713,"gmonospace",65351,"gohiragana",12372,"gokatakana",12468,"gparen",9378,"gpasquare",13228,"gradient",8711,"grave",96,"gravebelowcmb",790,"gravecmb",768,"gravecomb",768,"gravedeva",2387,"gravelowmod",718,"gravemonospace",65344,"gravetonecmb",832,"greater",62,"greaterequal",8805,"greaterequalorless",8923,"greatermonospace",65310,"greaterorequivalent",8819,"greaterorless",8823,"greateroverequal",8807,"greatersmall",65125,"gscript",609,"gstroke",485,"guhiragana",12368,"guillemotleft",171,"guillemotright",187,"guilsinglleft",8249,"guilsinglright",8250,"gukatakana",12464,"guramusquare",13080,"gysquare",13257,"h",104,"haabkhasiancyrillic",1193,"haaltonearabic",1729,"habengali",2489,"hadescendercyrillic",1203,"hadeva",2361,"hagujarati",2745,"hagurmukhi",2617,"haharabic",1581,"hahfinalarabic",65186,"hahinitialarabic",65187,"hahiragana",12399,"hahmedialarabic",65188,"haitusquare",13098,"hakatakana",12495,"hakatakanahalfwidth",65418,"halantgurmukhi",2637,"hamzaarabic",1569,"hamzalowarabic",1569,"hangulfiller",12644,"hardsigncyrillic",1098,"harpoonleftbarbup",8636,"harpoonrightbarbup",8640,"hasquare",13258,"hatafpatah",1458,"hatafpatah16",1458,"hatafpatah23",1458,"hatafpatah2f",1458,"hatafpatahhebrew",1458,"hatafpatahnarrowhebrew",1458,"hatafpatahquarterhebrew",1458,"hatafpatahwidehebrew",1458,"hatafqamats",1459,"hatafqamats1b",1459,"hatafqamats28",1459,"hatafqamats34",1459,"hatafqamatshebrew",1459,"hatafqamatsnarrowhebrew",1459,"hatafqamatsquarterhebrew",1459,"hatafqamatswidehebrew",1459,"hatafsegol",1457,"hatafsegol17",1457,"hatafsegol24",1457,"hatafsegol30",1457,"hatafsegolhebrew",1457,"hatafsegolnarrowhebrew",1457,"hatafsegolquarterhebrew",1457,"hatafsegolwidehebrew",1457,"hbar",295,"hbopomofo",12559,"hbrevebelow",7723,"hcedilla",7721,"hcircle",9431,"hcircumflex",293,"hdieresis",7719,"hdotaccent",7715,"hdotbelow",7717,"he",1492,"heart",9829,"heartsuitblack",9829,"heartsuitwhite",9825,"hedagesh",64308,"hedageshhebrew",64308,"hehaltonearabic",1729,"heharabic",1607,"hehebrew",1492,"hehfinalaltonearabic",64423,"hehfinalalttwoarabic",65258,"hehfinalarabic",65258,"hehhamzaabovefinalarabic",64421,"hehhamzaaboveisolatedarabic",64420,"hehinitialaltonearabic",64424,"hehinitialarabic",65259,"hehiragana",12408,"hehmedialaltonearabic",64425,"hehmedialarabic",65260,"heiseierasquare",13179,"hekatakana",12504,"hekatakanahalfwidth",65421,"hekutaarusquare",13110,"henghook",615,"herutusquare",13113,"het",1495,"hethebrew",1495,"hhook",614,"hhooksuperior",689,"hieuhacirclekorean",12923,"hieuhaparenkorean",12827,"hieuhcirclekorean",12909,"hieuhkorean",12622,"hieuhparenkorean",12813,"hihiragana",12402,"hikatakana",12498,"hikatakanahalfwidth",65419,"hiriq",1460,"hiriq14",1460,"hiriq21",1460,"hiriq2d",1460,"hiriqhebrew",1460,"hiriqnarrowhebrew",1460,"hiriqquarterhebrew",1460,"hiriqwidehebrew",1460,"hlinebelow",7830,"hmonospace",65352,"hoarmenian",1392,"hohipthai",3627,"hohiragana",12411,"hokatakana",12507,"hokatakanahalfwidth",65422,"holam",1465,"holam19",1465,"holam26",1465,"holam32",1465,"holamhebrew",1465,"holamnarrowhebrew",1465,"holamquarterhebrew",1465,"holamwidehebrew",1465,"honokhukthai",3630,"hookabovecomb",777,"hookcmb",777,"hookpalatalizedbelowcmb",801,"hookretroflexbelowcmb",802,"hoonsquare",13122,"horicoptic",1001,"horizontalbar",8213,"horncmb",795,"hotsprings",9832,"house",8962,"hparen",9379,"hsuperior",688,"hturned",613,"huhiragana",12405,"huiitosquare",13107,"hukatakana",12501,"hukatakanahalfwidth",65420,"hungarumlaut",733,"hungarumlautcmb",779,"hv",405,"hyphen",45,"hypheninferior",63205,"hyphenmonospace",65293,"hyphensmall",65123,"hyphensuperior",63206,"hyphentwo",8208,"i",105,"iacute",237,"iacyrillic",1103,"ibengali",2439,"ibopomofo",12583,"ibreve",301,"icaron",464,"icircle",9432,"icircumflex",238,"icyrillic",1110,"idblgrave",521,"ideographearthcircle",12943,"ideographfirecircle",12939,"ideographicallianceparen",12863,"ideographiccallparen",12858,"ideographiccentrecircle",12965,"ideographicclose",12294,"ideographiccomma",12289,"ideographiccommaleft",65380,"ideographiccongratulationparen",12855,"ideographiccorrectcircle",12963,"ideographicearthparen",12847,"ideographicenterpriseparen",12861,"ideographicexcellentcircle",12957,"ideographicfestivalparen",12864,"ideographicfinancialcircle",12950,"ideographicfinancialparen",12854,"ideographicfireparen",12843,"ideographichaveparen",12850,"ideographichighcircle",12964,"ideographiciterationmark",12293,"ideographiclaborcircle",12952,"ideographiclaborparen",12856,"ideographicleftcircle",12967,"ideographiclowcircle",12966,"ideographicmedicinecircle",12969,"ideographicmetalparen",12846,"ideographicmoonparen",12842,"ideographicnameparen",12852,"ideographicperiod",12290,"ideographicprintcircle",12958,"ideographicreachparen",12867,"ideographicrepresentparen",12857,"ideographicresourceparen",12862,"ideographicrightcircle",12968,"ideographicsecretcircle",12953,"ideographicselfparen",12866,"ideographicsocietyparen",12851,"ideographicspace",12288,"ideographicspecialparen",12853,"ideographicstockparen",12849,"ideographicstudyparen",12859,"ideographicsunparen",12848,"ideographicsuperviseparen",12860,"ideographicwaterparen",12844,"ideographicwoodparen",12845,"ideographiczero",12295,"ideographmetalcircle",12942,"ideographmooncircle",12938,"ideographnamecircle",12948,"ideographsuncircle",12944,"ideographwatercircle",12940,"ideographwoodcircle",12941,"ideva",2311,"idieresis",239,"idieresisacute",7727,"idieresiscyrillic",1253,"idotbelow",7883,"iebrevecyrillic",1239,"iecyrillic",1077,"ieungacirclekorean",12917,"ieungaparenkorean",12821,"ieungcirclekorean",12903,"ieungkorean",12615,"ieungparenkorean",12807,"igrave",236,"igujarati",2695,"igurmukhi",2567,"ihiragana",12356,"ihookabove",7881,"iibengali",2440,"iicyrillic",1080,"iideva",2312,"iigujarati",2696,"iigurmukhi",2568,"iimatragurmukhi",2624,"iinvertedbreve",523,"iishortcyrillic",1081,"iivowelsignbengali",2496,"iivowelsigndeva",2368,"iivowelsigngujarati",2752,"ij",307,"ikatakana",12452,"ikatakanahalfwidth",65394,"ikorean",12643,"ilde",732,"iluyhebrew",1452,"imacron",299,"imacroncyrillic",1251,"imageorapproximatelyequal",8787,"imatragurmukhi",2623,"imonospace",65353,"increment",8710,"infinity",8734,"iniarmenian",1387,"integral",8747,"integralbottom",8993,"integralbt",8993,"integralex",63733,"integraltop",8992,"integraltp",8992,"intersection",8745,"intisquare",13061,"invbullet",9688,"invcircle",9689,"invsmileface",9787,"iocyrillic",1105,"iogonek",303,"iota",953,"iotadieresis",970,"iotadieresistonos",912,"iotalatin",617,"iotatonos",943,"iparen",9380,"irigurmukhi",2674,"ismallhiragana",12355,"ismallkatakana",12451,"ismallkatakanahalfwidth",65384,"issharbengali",2554,"istroke",616,"isuperior",63213,"iterationhiragana",12445,"iterationkatakana",12541,"itilde",297,"itildebelow",7725,"iubopomofo",12585,"iucyrillic",1102,"ivowelsignbengali",2495,"ivowelsigndeva",2367,"ivowelsigngujarati",2751,"izhitsacyrillic",1141,"izhitsadblgravecyrillic",1143,"j",106,"jaarmenian",1393,"jabengali",2460,"jadeva",2332,"jagujarati",2716,"jagurmukhi",2588,"jbopomofo",12560,"jcaron",496,"jcircle",9433,"jcircumflex",309,"jcrossedtail",669,"jdotlessstroke",607,"jecyrillic",1112,"jeemarabic",1580,"jeemfinalarabic",65182,"jeeminitialarabic",65183,"jeemmedialarabic",65184,"jeharabic",1688,"jehfinalarabic",64395,"jhabengali",2461,"jhadeva",2333,"jhagujarati",2717,"jhagurmukhi",2589,"jheharmenian",1403,"jis",12292,"jmonospace",65354,"jparen",9381,"jsuperior",690,"k",107,"kabashkircyrillic",1185,"kabengali",2453,"kacute",7729,"kacyrillic",1082,"kadescendercyrillic",1179,"kadeva",2325,"kaf",1499,"kafarabic",1603,"kafdagesh",64315,"kafdageshhebrew",64315,"kaffinalarabic",65242,"kafhebrew",1499,"kafinitialarabic",65243,"kafmedialarabic",65244,"kafrafehebrew",64333,"kagujarati",2709,"kagurmukhi",2581,"kahiragana",12363,"kahookcyrillic",1220,"kakatakana",12459,"kakatakanahalfwidth",65398,"kappa",954,"kappasymbolgreek",1008,"kapyeounmieumkorean",12657,"kapyeounphieuphkorean",12676,"kapyeounpieupkorean",12664,"kapyeounssangpieupkorean",12665,"karoriisquare",13069,"kashidaautoarabic",1600,"kashidaautonosidebearingarabic",1600,"kasmallkatakana",12533,"kasquare",13188,"kasraarabic",1616,"kasratanarabic",1613,"kastrokecyrillic",1183,"katahiraprolongmarkhalfwidth",65392,"kaverticalstrokecyrillic",1181,"kbopomofo",12558,"kcalsquare",13193,"kcaron",489,"kcedilla",311,"kcircle",9434,"kcommaaccent",311,"kdotbelow",7731,"keharmenian",1412,"kehiragana",12369,"kekatakana",12465,"kekatakanahalfwidth",65401,"kenarmenian",1391,"kesmallkatakana",12534,"kgreenlandic",312,"khabengali",2454,"khacyrillic",1093,"khadeva",2326,"khagujarati",2710,"khagurmukhi",2582,"khaharabic",1582,"khahfinalarabic",65190,"khahinitialarabic",65191,"khahmedialarabic",65192,"kheicoptic",999,"khhadeva",2393,"khhagurmukhi",2649,"khieukhacirclekorean",12920,"khieukhaparenkorean",12824,"khieukhcirclekorean",12906,"khieukhkorean",12619,"khieukhparenkorean",12810,"khokhaithai",3586,"khokhonthai",3589,"khokhuatthai",3587,"khokhwaithai",3588,"khomutthai",3675,"khook",409,"khorakhangthai",3590,"khzsquare",13201,"kihiragana",12365,"kikatakana",12461,"kikatakanahalfwidth",65399,"kiroguramusquare",13077,"kiromeetorusquare",13078,"kirosquare",13076,"kiyeokacirclekorean",12910,"kiyeokaparenkorean",12814,"kiyeokcirclekorean",12896,"kiyeokkorean",12593,"kiyeokparenkorean",12800,"kiyeoksioskorean",12595,"kjecyrillic",1116,"klinebelow",7733,"klsquare",13208,"kmcubedsquare",13222,"kmonospace",65355,"kmsquaredsquare",13218,"kohiragana",12371,"kohmsquare",13248,"kokaithai",3585,"kokatakana",12467,"kokatakanahalfwidth",65402,"kooposquare",13086,"koppacyrillic",1153,"koreanstandardsymbol",12927,"koroniscmb",835,"kparen",9382,"kpasquare",13226,"ksicyrillic",1135,"ktsquare",13263,"kturned",670,"kuhiragana",12367,"kukatakana",12463,"kukatakanahalfwidth",65400,"kvsquare",13240,"kwsquare",13246,"l",108,"labengali",2482,"lacute",314,"ladeva",2354,"lagujarati",2738,"lagurmukhi",2610,"lakkhangyaothai",3653,"lamaleffinalarabic",65276,"lamalefhamzaabovefinalarabic",65272,"lamalefhamzaaboveisolatedarabic",65271,"lamalefhamzabelowfinalarabic",65274,"lamalefhamzabelowisolatedarabic",65273,"lamalefisolatedarabic",65275,"lamalefmaddaabovefinalarabic",65270,"lamalefmaddaaboveisolatedarabic",65269,"lamarabic",1604,"lambda",955,"lambdastroke",411,"lamed",1500,"lameddagesh",64316,"lameddageshhebrew",64316,"lamedhebrew",1500,"lamfinalarabic",65246,"lamhahinitialarabic",64714,"laminitialarabic",65247,"lamjeeminitialarabic",64713,"lamkhahinitialarabic",64715,"lamlamhehisolatedarabic",65010,"lammedialarabic",65248,"lammeemhahinitialarabic",64904,"lammeeminitialarabic",64716,"largecircle",9711,"lbar",410,"lbelt",620,"lbopomofo",12556,"lcaron",318,"lcedilla",316,"lcircle",9435,"lcircumflexbelow",7741,"lcommaaccent",316,"ldot",320,"ldotaccent",320,"ldotbelow",7735,"ldotbelowmacron",7737,"leftangleabovecmb",794,"lefttackbelowcmb",792,"less",60,"lessequal",8804,"lessequalorgreater",8922,"lessmonospace",65308,"lessorequivalent",8818,"lessorgreater",8822,"lessoverequal",8806,"lesssmall",65124,"lezh",622,"lfblock",9612,"lhookretroflex",621,"lira",8356,"liwnarmenian",1388,"lj",457,"ljecyrillic",1113,"ll",63168,"lladeva",2355,"llagujarati",2739,"llinebelow",7739,"llladeva",2356,"llvocalicbengali",2529,"llvocalicdeva",2401,"llvocalicvowelsignbengali",2531,"llvocalicvowelsigndeva",2403,"lmiddletilde",619,"lmonospace",65356,"lmsquare",13264,"lochulathai",3628,"logicaland",8743,"logicalnot",172,"logicalnotreversed",8976,"logicalor",8744,"lolingthai",3621,"longs",383,"lowlinecenterline",65102,"lowlinecmb",818,"lowlinedashed",65101,"lozenge",9674,"lparen",9383,"lslash",322,"lsquare",8467,"lsuperior",63214,"ltshade",9617,"luthai",3622,"lvocalicbengali",2444,"lvocalicdeva",2316,"lvocalicvowelsignbengali",2530,"lvocalicvowelsigndeva",2402,"lxsquare",13267,"m",109,"mabengali",2478,"macron",175,"macronbelowcmb",817,"macroncmb",772,"macronlowmod",717,"macronmonospace",65507,"macute",7743,"madeva",2350,"magujarati",2734,"magurmukhi",2606,"mahapakhhebrew",1444,"mahapakhlefthebrew",1444,"mahiragana",12414,"maichattawalowleftthai",63637,"maichattawalowrightthai",63636,"maichattawathai",3659,"maichattawaupperleftthai",63635,"maieklowleftthai",63628,"maieklowrightthai",63627,"maiekthai",3656,"maiekupperleftthai",63626,"maihanakatleftthai",63620,"maihanakatthai",3633,"maitaikhuleftthai",63625,"maitaikhuthai",3655,"maitholowleftthai",63631,"maitholowrightthai",63630,"maithothai",3657,"maithoupperleftthai",63629,"maitrilowleftthai",63634,"maitrilowrightthai",63633,"maitrithai",3658,"maitriupperleftthai",63632,"maiyamokthai",3654,"makatakana",12510,"makatakanahalfwidth",65423,"male",9794,"mansyonsquare",13127,"maqafhebrew",1470,"mars",9794,"masoracirclehebrew",1455,"masquare",13187,"mbopomofo",12551,"mbsquare",13268,"mcircle",9436,"mcubedsquare",13221,"mdotaccent",7745,"mdotbelow",7747,"meemarabic",1605,"meemfinalarabic",65250,"meeminitialarabic",65251,"meemmedialarabic",65252,"meemmeeminitialarabic",64721,"meemmeemisolatedarabic",64584,"meetorusquare",13133,"mehiragana",12417,"meizierasquare",13182,"mekatakana",12513,"mekatakanahalfwidth",65426,"mem",1502,"memdagesh",64318,"memdageshhebrew",64318,"memhebrew",1502,"menarmenian",1396,"merkhahebrew",1445,"merkhakefulahebrew",1446,"merkhakefulalefthebrew",1446,"merkhalefthebrew",1445,"mhook",625,"mhzsquare",13202,"middledotkatakanahalfwidth",65381,"middot",183,"mieumacirclekorean",12914,"mieumaparenkorean",12818,"mieumcirclekorean",12900,"mieumkorean",12609,"mieumpansioskorean",12656,"mieumparenkorean",12804,"mieumpieupkorean",12654,"mieumsioskorean",12655,"mihiragana",12415,"mikatakana",12511,"mikatakanahalfwidth",65424,"minus",8722,"minusbelowcmb",800,"minuscircle",8854,"minusmod",727,"minusplus",8723,"minute",8242,"miribaarusquare",13130,"mirisquare",13129,"mlonglegturned",624,"mlsquare",13206,"mmcubedsquare",13219,"mmonospace",65357,"mmsquaredsquare",13215,"mohiragana",12418,"mohmsquare",13249,"mokatakana",12514,"mokatakanahalfwidth",65427,"molsquare",13270,"momathai",3617,"moverssquare",13223,"moverssquaredsquare",13224,"mparen",9384,"mpasquare",13227,"mssquare",13235,"msuperior",63215,"mturned",623,"mu",181,"mu1",181,"muasquare",13186,"muchgreater",8811,"muchless",8810,"mufsquare",13196,"mugreek",956,"mugsquare",13197,"muhiragana",12416,"mukatakana",12512,"mukatakanahalfwidth",65425,"mulsquare",13205,"multiply",215,"mumsquare",13211,"munahhebrew",1443,"munahlefthebrew",1443,"musicalnote",9834,"musicalnotedbl",9835,"musicflatsign",9837,"musicsharpsign",9839,"mussquare",13234,"muvsquare",13238,"muwsquare",13244,"mvmegasquare",13241,"mvsquare",13239,"mwmegasquare",13247,"mwsquare",13245,"n",110,"nabengali",2472,"nabla",8711,"nacute",324,"nadeva",2344,"nagujarati",2728,"nagurmukhi",2600,"nahiragana",12394,"nakatakana",12490,"nakatakanahalfwidth",65413,"napostrophe",329,"nasquare",13185,"nbopomofo",12555,"nbspace",160,"ncaron",328,"ncedilla",326,"ncircle",9437,"ncircumflexbelow",7755,"ncommaaccent",326,"ndotaccent",7749,"ndotbelow",7751,"nehiragana",12397,"nekatakana",12493,"nekatakanahalfwidth",65416,"newsheqelsign",8362,"nfsquare",13195,"ngabengali",2457,"ngadeva",2329,"ngagujarati",2713,"ngagurmukhi",2585,"ngonguthai",3591,"nhiragana",12435,"nhookleft",626,"nhookretroflex",627,"nieunacirclekorean",12911,"nieunaparenkorean",12815,"nieuncieuckorean",12597,"nieuncirclekorean",12897,"nieunhieuhkorean",12598,"nieunkorean",12596,"nieunpansioskorean",12648,"nieunparenkorean",12801,"nieunsioskorean",12647,"nieuntikeutkorean",12646,"nihiragana",12395,"nikatakana",12491,"nikatakanahalfwidth",65414,"nikhahitleftthai",63641,"nikhahitthai",3661,"nine",57,"ninearabic",1641,"ninebengali",2543,"ninecircle",9320,"ninecircleinversesansserif",10130,"ninedeva",2415,"ninegujarati",2799,"ninegurmukhi",2671,"ninehackarabic",1641,"ninehangzhou",12329,"nineideographicparen",12840,"nineinferior",8329,"ninemonospace",65305,"nineoldstyle",63289,"nineparen",9340,"nineperiod",9360,"ninepersian",1785,"nineroman",8568,"ninesuperior",8313,"nineteencircle",9330,"nineteenparen",9350,"nineteenperiod",9370,"ninethai",3673,"nj",460,"njecyrillic",1114,"nkatakana",12531,"nkatakanahalfwidth",65437,"nlegrightlong",414,"nlinebelow",7753,"nmonospace",65358,"nmsquare",13210,"nnabengali",2467,"nnadeva",2339,"nnagujarati",2723,"nnagurmukhi",2595,"nnnadeva",2345,"nohiragana",12398,"nokatakana",12494,"nokatakanahalfwidth",65417,"nonbreakingspace",160,"nonenthai",3603,"nonuthai",3609,"noonarabic",1606,"noonfinalarabic",65254,"noonghunnaarabic",1722,"noonghunnafinalarabic",64415,"nooninitialarabic",65255,"noonjeeminitialarabic",64722,"noonjeemisolatedarabic",64587,"noonmedialarabic",65256,"noonmeeminitialarabic",64725,"noonmeemisolatedarabic",64590,"noonnoonfinalarabic",64653,"notcontains",8716,"notelement",8713,"notelementof",8713,"notequal",8800,"notgreater",8815,"notgreaternorequal",8817,"notgreaternorless",8825,"notidentical",8802,"notless",8814,"notlessnorequal",8816,"notparallel",8742,"notprecedes",8832,"notsubset",8836,"notsucceeds",8833,"notsuperset",8837,"nowarmenian",1398,"nparen",9385,"nssquare",13233,"nsuperior",8319,"ntilde",241,"nu",957,"nuhiragana",12396,"nukatakana",12492,"nukatakanahalfwidth",65415,"nuktabengali",2492,"nuktadeva",2364,"nuktagujarati",2748,"nuktagurmukhi",2620,"numbersign",35,"numbersignmonospace",65283,"numbersignsmall",65119,"numeralsigngreek",884,"numeralsignlowergreek",885,"numero",8470,"nun",1504,"nundagesh",64320,"nundageshhebrew",64320,"nunhebrew",1504,"nvsquare",13237,"nwsquare",13243,"nyabengali",2462,"nyadeva",2334,"nyagujarati",2718,"nyagurmukhi",2590,"o",111,"oacute",243,"oangthai",3629,"obarred",629,"obarredcyrillic",1257,"obarreddieresiscyrillic",1259,"obengali",2451,"obopomofo",12571,"obreve",335,"ocandradeva",2321,"ocandragujarati",2705,"ocandravowelsigndeva",2377,"ocandravowelsigngujarati",2761,"ocaron",466,"ocircle",9438,"ocircumflex",244,"ocircumflexacute",7889,"ocircumflexdotbelow",7897,"ocircumflexgrave",7891,"ocircumflexhookabove",7893,"ocircumflextilde",7895,"ocyrillic",1086,"odblacute",337,"odblgrave",525,"odeva",2323,"odieresis",246,"odieresiscyrillic",1255,"odotbelow",7885,"oe",339,"oekorean",12634,"ogonek",731,"ogonekcmb",808,"ograve",242,"ogujarati",2707,"oharmenian",1413,"ohiragana",12362,"ohookabove",7887,"ohorn",417,"ohornacute",7899,"ohorndotbelow",7907,"ohorngrave",7901,"ohornhookabove",7903,"ohorntilde",7905,"ohungarumlaut",337,"oi",419,"oinvertedbreve",527,"okatakana",12458,"okatakanahalfwidth",65397,"okorean",12631,"olehebrew",1451,"omacron",333,"omacronacute",7763,"omacrongrave",7761,"omdeva",2384,"omega",969,"omega1",982,"omegacyrillic",1121,"omegalatinclosed",631,"omegaroundcyrillic",1147,"omegatitlocyrillic",1149,"omegatonos",974,"omgujarati",2768,"omicron",959,"omicrontonos",972,"omonospace",65359,"one",49,"onearabic",1633,"onebengali",2535,"onecircle",9312,"onecircleinversesansserif",10122,"onedeva",2407,"onedotenleader",8228,"oneeighth",8539,"onefitted",63196,"onegujarati",2791,"onegurmukhi",2663,"onehackarabic",1633,"onehalf",189,"onehangzhou",12321,"oneideographicparen",12832,"oneinferior",8321,"onemonospace",65297,"onenumeratorbengali",2548,"oneoldstyle",63281,"oneparen",9332,"oneperiod",9352,"onepersian",1777,"onequarter",188,"oneroman",8560,"onesuperior",185,"onethai",3665,"onethird",8531,"oogonek",491,"oogonekmacron",493,"oogurmukhi",2579,"oomatragurmukhi",2635,"oopen",596,"oparen",9386,"openbullet",9702,"option",8997,"ordfeminine",170,"ordmasculine",186,"orthogonal",8735,"oshortdeva",2322,"oshortvowelsigndeva",2378,"oslash",248,"oslashacute",511,"osmallhiragana",12361,"osmallkatakana",12457,"osmallkatakanahalfwidth",65387,"ostrokeacute",511,"osuperior",63216,"otcyrillic",1151,"otilde",245,"otildeacute",7757,"otildedieresis",7759,"oubopomofo",12577,"overline",8254,"overlinecenterline",65098,"overlinecmb",773,"overlinedashed",65097,"overlinedblwavy",65100,"overlinewavy",65099,"overscore",175,"ovowelsignbengali",2507,"ovowelsigndeva",2379,"ovowelsigngujarati",2763,"p",112,"paampssquare",13184,"paasentosquare",13099,"pabengali",2474,"pacute",7765,"padeva",2346,"pagedown",8671,"pageup",8670,"pagujarati",2730,"pagurmukhi",2602,"pahiragana",12401,"paiyannoithai",3631,"pakatakana",12497,"palatalizationcyrilliccmb",1156,"palochkacyrillic",1216,"pansioskorean",12671,"paragraph",182,"parallel",8741,"parenleft",40,"parenleftaltonearabic",64830,"parenleftbt",63725,"parenleftex",63724,"parenleftinferior",8333,"parenleftmonospace",65288,"parenleftsmall",65113,"parenleftsuperior",8317,"parenlefttp",63723,"parenleftvertical",65077,"parenright",41,"parenrightaltonearabic",64831,"parenrightbt",63736,"parenrightex",63735,"parenrightinferior",8334,"parenrightmonospace",65289,"parenrightsmall",65114,"parenrightsuperior",8318,"parenrighttp",63734,"parenrightvertical",65078,"partialdiff",8706,"paseqhebrew",1472,"pashtahebrew",1433,"pasquare",13225,"patah",1463,"patah11",1463,"patah1d",1463,"patah2a",1463,"patahhebrew",1463,"patahnarrowhebrew",1463,"patahquarterhebrew",1463,"patahwidehebrew",1463,"pazerhebrew",1441,"pbopomofo",12550,"pcircle",9439,"pdotaccent",7767,"pe",1508,"pecyrillic",1087,"pedagesh",64324,"pedageshhebrew",64324,"peezisquare",13115,"pefinaldageshhebrew",64323,"peharabic",1662,"peharmenian",1402,"pehebrew",1508,"pehfinalarabic",64343,"pehinitialarabic",64344,"pehiragana",12410,"pehmedialarabic",64345,"pekatakana",12506,"pemiddlehookcyrillic",1191,"perafehebrew",64334,"percent",37,"percentarabic",1642,"percentmonospace",65285,"percentsmall",65130,"period",46,"periodarmenian",1417,"periodcentered",183,"periodhalfwidth",65377,"periodinferior",63207,"periodmonospace",65294,"periodsmall",65106,"periodsuperior",63208,"perispomenigreekcmb",834,"perpendicular",8869,"perthousand",8240,"peseta",8359,"pfsquare",13194,"phabengali",2475,"phadeva",2347,"phagujarati",2731,"phagurmukhi",2603,"phi",966,"phi1",981,"phieuphacirclekorean",12922,"phieuphaparenkorean",12826,"phieuphcirclekorean",12908,"phieuphkorean",12621,"phieuphparenkorean",12812,"philatin",632,"phinthuthai",3642,"phisymbolgreek",981,"phook",421,"phophanthai",3614,"phophungthai",3612,"phosamphaothai",3616,"pi",960,"pieupacirclekorean",12915,"pieupaparenkorean",12819,"pieupcieuckorean",12662,"pieupcirclekorean",12901,"pieupkiyeokkorean",12658,"pieupkorean",12610,"pieupparenkorean",12805,"pieupsioskiyeokkorean",12660,"pieupsioskorean",12612,"pieupsiostikeutkorean",12661,"pieupthieuthkorean",12663,"pieuptikeutkorean",12659,"pihiragana",12404,"pikatakana",12500,"pisymbolgreek",982,"piwrarmenian",1411,"plus",43,"plusbelowcmb",799,"pluscircle",8853,"plusminus",177,"plusmod",726,"plusmonospace",65291,"plussmall",65122,"plussuperior",8314,"pmonospace",65360,"pmsquare",13272,"pohiragana",12413,"pointingindexdownwhite",9759,"pointingindexleftwhite",9756,"pointingindexrightwhite",9758,"pointingindexupwhite",9757,"pokatakana",12509,"poplathai",3611,"postalmark",12306,"postalmarkface",12320,"pparen",9387,"precedes",8826,"prescription",8478,"primemod",697,"primereversed",8245,"product",8719,"projective",8965,"prolongedkana",12540,"propellor",8984,"propersubset",8834,"propersuperset",8835,"proportion",8759,"proportional",8733,"psi",968,"psicyrillic",1137,"psilipneumatacyrilliccmb",1158,"pssquare",13232,"puhiragana",12407,"pukatakana",12503,"pvsquare",13236,"pwsquare",13242,"q",113,"qadeva",2392,"qadmahebrew",1448,"qafarabic",1602,"qaffinalarabic",65238,"qafinitialarabic",65239,"qafmedialarabic",65240,"qamats",1464,"qamats10",1464,"qamats1a",1464,"qamats1c",1464,"qamats27",1464,"qamats29",1464,"qamats33",1464,"qamatsde",1464,"qamatshebrew",1464,"qamatsnarrowhebrew",1464,"qamatsqatanhebrew",1464,"qamatsqatannarrowhebrew",1464,"qamatsqatanquarterhebrew",1464,"qamatsqatanwidehebrew",1464,"qamatsquarterhebrew",1464,"qamatswidehebrew",1464,"qarneyparahebrew",1439,"qbopomofo",12561,"qcircle",9440,"qhook",672,"qmonospace",65361,"qof",1511,"qofdagesh",64327,"qofdageshhebrew",64327,"qofhebrew",1511,"qparen",9388,"quarternote",9833,"qubuts",1467,"qubuts18",1467,"qubuts25",1467,"qubuts31",1467,"qubutshebrew",1467,"qubutsnarrowhebrew",1467,"qubutsquarterhebrew",1467,"qubutswidehebrew",1467,"question",63,"questionarabic",1567,"questionarmenian",1374,"questiondown",191,"questiondownsmall",63423,"questiongreek",894,"questionmonospace",65311,"questionsmall",63295,"quotedbl",34,"quotedblbase",8222,"quotedblleft",8220,"quotedblmonospace",65282,"quotedblprime",12318,"quotedblprimereversed",12317,"quotedblright",8221,"quoteleft",8216,"quoteleftreversed",8219,"quotereversed",8219,"quoteright",8217,"quoterightn",329,"quotesinglbase",8218,"quotesingle",39,"quotesinglemonospace",65287,"r",114,"raarmenian",1404,"rabengali",2480,"racute",341,"radeva",2352,"radical",8730,"radicalex",63717,"radoverssquare",13230,"radoverssquaredsquare",13231,"radsquare",13229,"rafe",1471,"rafehebrew",1471,"ragujarati",2736,"ragurmukhi",2608,"rahiragana",12425,"rakatakana",12521,"rakatakanahalfwidth",65431,"ralowerdiagonalbengali",2545,"ramiddlediagonalbengali",2544,"ramshorn",612,"ratio",8758,"rbopomofo",12566,"rcaron",345,"rcedilla",343,"rcircle",9441,"rcommaaccent",343,"rdblgrave",529,"rdotaccent",7769,"rdotbelow",7771,"rdotbelowmacron",7773,"referencemark",8251,"reflexsubset",8838,"reflexsuperset",8839,"registered",174,"registersans",63720,"registerserif",63194,"reharabic",1585,"reharmenian",1408,"rehfinalarabic",65198,"rehiragana",12428,"rekatakana",12524,"rekatakanahalfwidth",65434,"resh",1512,"reshdageshhebrew",64328,"reshhebrew",1512,"reversedtilde",8765,"reviahebrew",1431,"reviamugrashhebrew",1431,"revlogicalnot",8976,"rfishhook",638,"rfishhookreversed",639,"rhabengali",2525,"rhadeva",2397,"rho",961,"rhook",637,"rhookturned",635,"rhookturnedsuperior",693,"rhosymbolgreek",1009,"rhotichookmod",734,"rieulacirclekorean",12913,"rieulaparenkorean",12817,"rieulcirclekorean",12899,"rieulhieuhkorean",12608,"rieulkiyeokkorean",12602,"rieulkiyeoksioskorean",12649,"rieulkorean",12601,"rieulmieumkorean",12603,"rieulpansioskorean",12652,"rieulparenkorean",12803,"rieulphieuphkorean",12607,"rieulpieupkorean",12604,"rieulpieupsioskorean",12651,"rieulsioskorean",12605,"rieulthieuthkorean",12606,"rieultikeutkorean",12650,"rieulyeorinhieuhkorean",12653,"rightangle",8735,"righttackbelowcmb",793,"righttriangle",8895,"rihiragana",12426,"rikatakana",12522,"rikatakanahalfwidth",65432,"ring",730,"ringbelowcmb",805,"ringcmb",778,"ringhalfleft",703,"ringhalfleftarmenian",1369,"ringhalfleftbelowcmb",796,"ringhalfleftcentered",723,"ringhalfright",702,"ringhalfrightbelowcmb",825,"ringhalfrightcentered",722,"rinvertedbreve",531,"rittorusquare",13137,"rlinebelow",7775,"rlongleg",636,"rlonglegturned",634,"rmonospace",65362,"rohiragana",12429,"rokatakana",12525,"rokatakanahalfwidth",65435,"roruathai",3619,"rparen",9389,"rrabengali",2524,"rradeva",2353,"rragurmukhi",2652,"rreharabic",1681,"rrehfinalarabic",64397,"rrvocalicbengali",2528,"rrvocalicdeva",2400,"rrvocalicgujarati",2784,"rrvocalicvowelsignbengali",2500,"rrvocalicvowelsigndeva",2372,"rrvocalicvowelsigngujarati",2756,"rsuperior",63217,"rtblock",9616,"rturned",633,"rturnedsuperior",692,"ruhiragana",12427,"rukatakana",12523,"rukatakanahalfwidth",65433,"rupeemarkbengali",2546,"rupeesignbengali",2547,"rupiah",63197,"ruthai",3620,"rvocalicbengali",2443,"rvocalicdeva",2315,"rvocalicgujarati",2699,"rvocalicvowelsignbengali",2499,"rvocalicvowelsigndeva",2371,"rvocalicvowelsigngujarati",2755,"s",115,"sabengali",2488,"sacute",347,"sacutedotaccent",7781,"sadarabic",1589,"sadeva",2360,"sadfinalarabic",65210,"sadinitialarabic",65211,"sadmedialarabic",65212,"sagujarati",2744,"sagurmukhi",2616,"sahiragana",12373,"sakatakana",12469,"sakatakanahalfwidth",65403,"sallallahoualayhewasallamarabic",65018,"samekh",1505,"samekhdagesh",64321,"samekhdageshhebrew",64321,"samekhhebrew",1505,"saraaathai",3634,"saraaethai",3649,"saraaimaimalaithai",3652,"saraaimaimuanthai",3651,"saraamthai",3635,"saraathai",3632,"saraethai",3648,"saraiileftthai",63622,"saraiithai",3637,"saraileftthai",63621,"saraithai",3636,"saraothai",3650,"saraueeleftthai",63624,"saraueethai",3639,"saraueleftthai",63623,"sarauethai",3638,"sarauthai",3640,"sarauuthai",3641,"sbopomofo",12569,"scaron",353,"scarondotaccent",7783,"scedilla",351,"schwa",601,"schwacyrillic",1241,"schwadieresiscyrillic",1243,"schwahook",602,"scircle",9442,"scircumflex",349,"scommaaccent",537,"sdotaccent",7777,"sdotbelow",7779,"sdotbelowdotaccent",7785,"seagullbelowcmb",828,"second",8243,"secondtonechinese",714,"section",167,"seenarabic",1587,"seenfinalarabic",65202,"seeninitialarabic",65203,"seenmedialarabic",65204,"segol",1462,"segol13",1462,"segol1f",1462,"segol2c",1462,"segolhebrew",1462,"segolnarrowhebrew",1462,"segolquarterhebrew",1462,"segoltahebrew",1426,"segolwidehebrew",1462,"seharmenian",1405,"sehiragana",12379,"sekatakana",12475,"sekatakanahalfwidth",65406,"semicolon",59,"semicolonarabic",1563,"semicolonmonospace",65307,"semicolonsmall",65108,"semivoicedmarkkana",12444,"semivoicedmarkkanahalfwidth",65439,"sentisquare",13090,"sentosquare",13091,"seven",55,"sevenarabic",1639,"sevenbengali",2541,"sevencircle",9318,"sevencircleinversesansserif",10128,"sevendeva",2413,"seveneighths",8542,"sevengujarati",2797,"sevengurmukhi",2669,"sevenhackarabic",1639,"sevenhangzhou",12327,"sevenideographicparen",12838,"seveninferior",8327,"sevenmonospace",65303,"sevenoldstyle",63287,"sevenparen",9338,"sevenperiod",9358,"sevenpersian",1783,"sevenroman",8566,"sevensuperior",8311,"seventeencircle",9328,"seventeenparen",9348,"seventeenperiod",9368,"seventhai",3671,"sfthyphen",173,"shaarmenian",1399,"shabengali",2486,"shacyrillic",1096,"shaddaarabic",1617,"shaddadammaarabic",64609,"shaddadammatanarabic",64606,"shaddafathaarabic",64608,"shaddakasraarabic",64610,"shaddakasratanarabic",64607,"shade",9618,"shadedark",9619,"shadelight",9617,"shademedium",9618,"shadeva",2358,"shagujarati",2742,"shagurmukhi",2614,"shalshelethebrew",1427,"shbopomofo",12565,"shchacyrillic",1097,"sheenarabic",1588,"sheenfinalarabic",65206,"sheeninitialarabic",65207,"sheenmedialarabic",65208,"sheicoptic",995,"sheqel",8362,"sheqelhebrew",8362,"sheva",1456,"sheva115",1456,"sheva15",1456,"sheva22",1456,"sheva2e",1456,"shevahebrew",1456,"shevanarrowhebrew",1456,"shevaquarterhebrew",1456,"shevawidehebrew",1456,"shhacyrillic",1211,"shimacoptic",1005,"shin",1513,"shindagesh",64329,"shindageshhebrew",64329,"shindageshshindot",64300,"shindageshshindothebrew",64300,"shindageshsindot",64301,"shindageshsindothebrew",64301,"shindothebrew",1473,"shinhebrew",1513,"shinshindot",64298,"shinshindothebrew",64298,"shinsindot",64299,"shinsindothebrew",64299,"shook",642,"sigma",963,"sigma1",962,"sigmafinal",962,"sigmalunatesymbolgreek",1010,"sihiragana",12375,"sikatakana",12471,"sikatakanahalfwidth",65404,"siluqhebrew",1469,"siluqlefthebrew",1469,"similar",8764,"sindothebrew",1474,"siosacirclekorean",12916,"siosaparenkorean",12820,"sioscieuckorean",12670,"sioscirclekorean",12902,"sioskiyeokkorean",12666,"sioskorean",12613,"siosnieunkorean",12667,"siosparenkorean",12806,"siospieupkorean",12669,"siostikeutkorean",12668,"six",54,"sixarabic",1638,"sixbengali",2540,"sixcircle",9317,"sixcircleinversesansserif",10127,"sixdeva",2412,"sixgujarati",2796,"sixgurmukhi",2668,"sixhackarabic",1638,"sixhangzhou",12326,"sixideographicparen",12837,"sixinferior",8326,"sixmonospace",65302,"sixoldstyle",63286,"sixparen",9337,"sixperiod",9357,"sixpersian",1782,"sixroman",8565,"sixsuperior",8310,"sixteencircle",9327,"sixteencurrencydenominatorbengali",2553,"sixteenparen",9347,"sixteenperiod",9367,"sixthai",3670,"slash",47,"slashmonospace",65295,"slong",383,"slongdotaccent",7835,"smileface",9786,"smonospace",65363,"sofpasuqhebrew",1475,"softhyphen",173,"softsigncyrillic",1100,"sohiragana",12381,"sokatakana",12477,"sokatakanahalfwidth",65407,"soliduslongoverlaycmb",824,"solidusshortoverlaycmb",823,"sorusithai",3625,"sosalathai",3624,"sosothai",3595,"sosuathai",3626,"space",32,"spacehackarabic",32,"spade",9824,"spadesuitblack",9824,"spadesuitwhite",9828,"sparen",9390,"squarebelowcmb",827,"squarecc",13252,"squarecm",13213,"squarediagonalcrosshatchfill",9641,"squarehorizontalfill",9636,"squarekg",13199,"squarekm",13214,"squarekmcapital",13262,"squareln",13265,"squarelog",13266,"squaremg",13198,"squaremil",13269,"squaremm",13212,"squaremsquared",13217,"squareorthogonalcrosshatchfill",9638,"squareupperlefttolowerrightfill",9639,"squareupperrighttolowerleftfill",9640,"squareverticalfill",9637,"squarewhitewithsmallblack",9635,"srsquare",13275,"ssabengali",2487,"ssadeva",2359,"ssagujarati",2743,"ssangcieuckorean",12617,"ssanghieuhkorean",12677,"ssangieungkorean",12672,"ssangkiyeokkorean",12594,"ssangnieunkorean",12645,"ssangpieupkorean",12611,"ssangsioskorean",12614,"ssangtikeutkorean",12600,"ssuperior",63218,"sterling",163,"sterlingmonospace",65505,"strokelongoverlaycmb",822,"strokeshortoverlaycmb",821,"subset",8834,"subsetnotequal",8842,"subsetorequal",8838,"succeeds",8827,"suchthat",8715,"suhiragana",12377,"sukatakana",12473,"sukatakanahalfwidth",65405,"sukunarabic",1618,"summation",8721,"sun",9788,"superset",8835,"supersetnotequal",8843,"supersetorequal",8839,"svsquare",13276,"syouwaerasquare",13180,"t",116,"tabengali",2468,"tackdown",8868,"tackleft",8867,"tadeva",2340,"tagujarati",2724,"tagurmukhi",2596,"taharabic",1591,"tahfinalarabic",65218,"tahinitialarabic",65219,"tahiragana",12383,"tahmedialarabic",65220,"taisyouerasquare",13181,"takatakana",12479,"takatakanahalfwidth",65408,"tatweelarabic",1600,"tau",964,"tav",1514,"tavdages",64330,"tavdagesh",64330,"tavdageshhebrew",64330,"tavhebrew",1514,"tbar",359,"tbopomofo",12554,"tcaron",357,"tccurl",680,"tcedilla",355,"tcheharabic",1670,"tchehfinalarabic",64379,"tchehinitialarabic",64380,"tchehmedialarabic",64381,"tcircle",9443,"tcircumflexbelow",7793,"tcommaaccent",355,"tdieresis",7831,"tdotaccent",7787,"tdotbelow",7789,"tecyrillic",1090,"tedescendercyrillic",1197,"teharabic",1578,"tehfinalarabic",65174,"tehhahinitialarabic",64674,"tehhahisolatedarabic",64524,"tehinitialarabic",65175,"tehiragana",12390,"tehjeeminitialarabic",64673,"tehjeemisolatedarabic",64523,"tehmarbutaarabic",1577,"tehmarbutafinalarabic",65172,"tehmedialarabic",65176,"tehmeeminitialarabic",64676,"tehmeemisolatedarabic",64526,"tehnoonfinalarabic",64627,"tekatakana",12486,"tekatakanahalfwidth",65411,"telephone",8481,"telephoneblack",9742,"telishagedolahebrew",1440,"telishaqetanahebrew",1449,"tencircle",9321,"tenideographicparen",12841,"tenparen",9341,"tenperiod",9361,"tenroman",8569,"tesh",679,"tet",1496,"tetdagesh",64312,"tetdageshhebrew",64312,"tethebrew",1496,"tetsecyrillic",1205,"tevirhebrew",1435,"tevirlefthebrew",1435,"thabengali",2469,"thadeva",2341,"thagujarati",2725,"thagurmukhi",2597,"thalarabic",1584,"thalfinalarabic",65196,"thanthakhatlowleftthai",63640,"thanthakhatlowrightthai",63639,"thanthakhatthai",3660,"thanthakhatupperleftthai",63638,"theharabic",1579,"thehfinalarabic",65178,"thehinitialarabic",65179,"thehmedialarabic",65180,"thereexists",8707,"therefore",8756,"theta",952,"theta1",977,"thetasymbolgreek",977,"thieuthacirclekorean",12921,"thieuthaparenkorean",12825,"thieuthcirclekorean",12907,"thieuthkorean",12620,"thieuthparenkorean",12811,"thirteencircle",9324,"thirteenparen",9344,"thirteenperiod",9364,"thonangmonthothai",3601,"thook",429,"thophuthaothai",3602,"thorn",254,"thothahanthai",3607,"thothanthai",3600,"thothongthai",3608,"thothungthai",3606,"thousandcyrillic",1154,"thousandsseparatorarabic",1644,"thousandsseparatorpersian",1644,"three",51,"threearabic",1635,"threebengali",2537,"threecircle",9314,"threecircleinversesansserif",10124,"threedeva",2409,"threeeighths",8540,"threegujarati",2793,"threegurmukhi",2665,"threehackarabic",1635,"threehangzhou",12323,"threeideographicparen",12834,"threeinferior",8323,"threemonospace",65299,"threenumeratorbengali",2550,"threeoldstyle",63283,"threeparen",9334,"threeperiod",9354,"threepersian",1779,"threequarters",190,"threequartersemdash",63198,"threeroman",8562,"threesuperior",179,"threethai",3667,"thzsquare",13204,"tihiragana",12385,"tikatakana",12481,"tikatakanahalfwidth",65409,"tikeutacirclekorean",12912,"tikeutaparenkorean",12816,"tikeutcirclekorean",12898,"tikeutkorean",12599,"tikeutparenkorean",12802,"tilde",732,"tildebelowcmb",816,"tildecmb",771,"tildecomb",771,"tildedoublecmb",864,"tildeoperator",8764,"tildeoverlaycmb",820,"tildeverticalcmb",830,"timescircle",8855,"tipehahebrew",1430,"tipehalefthebrew",1430,"tippigurmukhi",2672,"titlocyrilliccmb",1155,"tiwnarmenian",1407,"tlinebelow",7791,"tmonospace",65364,"toarmenian",1385,"tohiragana",12392,"tokatakana",12488,"tokatakanahalfwidth",65412,"tonebarextrahighmod",741,"tonebarextralowmod",745,"tonebarhighmod",742,"tonebarlowmod",744,"tonebarmidmod",743,"tonefive",445,"tonesix",389,"tonetwo",424,"tonos",900,"tonsquare",13095,"topatakthai",3599,"tortoiseshellbracketleft",12308,"tortoiseshellbracketleftsmall",65117,"tortoiseshellbracketleftvertical",65081,"tortoiseshellbracketright",12309,"tortoiseshellbracketrightsmall",65118,"tortoiseshellbracketrightvertical",65082,"totaothai",3605,"tpalatalhook",427,"tparen",9391,"trademark",8482,"trademarksans",63722,"trademarkserif",63195,"tretroflexhook",648,"triagdn",9660,"triaglf",9668,"triagrt",9658,"triagup",9650,"ts",678,"tsadi",1510,"tsadidagesh",64326,"tsadidageshhebrew",64326,"tsadihebrew",1510,"tsecyrillic",1094,"tsere",1461,"tsere12",1461,"tsere1e",1461,"tsere2b",1461,"tserehebrew",1461,"tserenarrowhebrew",1461,"tserequarterhebrew",1461,"tserewidehebrew",1461,"tshecyrillic",1115,"tsuperior",63219,"ttabengali",2463,"ttadeva",2335,"ttagujarati",2719,"ttagurmukhi",2591,"tteharabic",1657,"ttehfinalarabic",64359,"ttehinitialarabic",64360,"ttehmedialarabic",64361,"tthabengali",2464,"tthadeva",2336,"tthagujarati",2720,"tthagurmukhi",2592,"tturned",647,"tuhiragana",12388,"tukatakana",12484,"tukatakanahalfwidth",65410,"tusmallhiragana",12387,"tusmallkatakana",12483,"tusmallkatakanahalfwidth",65391,"twelvecircle",9323,"twelveparen",9343,"twelveperiod",9363,"twelveroman",8571,"twentycircle",9331,"twentyhangzhou",21316,"twentyparen",9351,"twentyperiod",9371,"two",50,"twoarabic",1634,"twobengali",2536,"twocircle",9313,"twocircleinversesansserif",10123,"twodeva",2408,"twodotenleader",8229,"twodotleader",8229,"twodotleadervertical",65072,"twogujarati",2792,"twogurmukhi",2664,"twohackarabic",1634,"twohangzhou",12322,"twoideographicparen",12833,"twoinferior",8322,"twomonospace",65298,"twonumeratorbengali",2549,"twooldstyle",63282,"twoparen",9333,"twoperiod",9353,"twopersian",1778,"tworoman",8561,"twostroke",443,"twosuperior",178,"twothai",3666,"twothirds",8532,"u",117,"uacute",250,"ubar",649,"ubengali",2441,"ubopomofo",12584,"ubreve",365,"ucaron",468,"ucircle",9444,"ucircumflex",251,"ucircumflexbelow",7799,"ucyrillic",1091,"udattadeva",2385,"udblacute",369,"udblgrave",533,"udeva",2313,"udieresis",252,"udieresisacute",472,"udieresisbelow",7795,"udieresiscaron",474,"udieresiscyrillic",1265,"udieresisgrave",476,"udieresismacron",470,"udotbelow",7909,"ugrave",249,"ugujarati",2697,"ugurmukhi",2569,"uhiragana",12358,"uhookabove",7911,"uhorn",432,"uhornacute",7913,"uhorndotbelow",7921,"uhorngrave",7915,"uhornhookabove",7917,"uhorntilde",7919,"uhungarumlaut",369,"uhungarumlautcyrillic",1267,"uinvertedbreve",535,"ukatakana",12454,"ukatakanahalfwidth",65395,"ukcyrillic",1145,"ukorean",12636,"umacron",363,"umacroncyrillic",1263,"umacrondieresis",7803,"umatragurmukhi",2625,"umonospace",65365,"underscore",95,"underscoredbl",8215,"underscoremonospace",65343,"underscorevertical",65075,"underscorewavy",65103,"union",8746,"universal",8704,"uogonek",371,"uparen",9392,"upblock",9600,"upperdothebrew",1476,"upsilon",965,"upsilondieresis",971,"upsilondieresistonos",944,"upsilonlatin",650,"upsilontonos",973,"uptackbelowcmb",797,"uptackmod",724,"uragurmukhi",2675,"uring",367,"ushortcyrillic",1118,"usmallhiragana",12357,"usmallkatakana",12453,"usmallkatakanahalfwidth",65385,"ustraightcyrillic",1199,"ustraightstrokecyrillic",1201,"utilde",361,"utildeacute",7801,"utildebelow",7797,"uubengali",2442,"uudeva",2314,"uugujarati",2698,"uugurmukhi",2570,"uumatragurmukhi",2626,"uuvowelsignbengali",2498,"uuvowelsigndeva",2370,"uuvowelsigngujarati",2754,"uvowelsignbengali",2497,"uvowelsigndeva",2369,"uvowelsigngujarati",2753,"v",118,"vadeva",2357,"vagujarati",2741,"vagurmukhi",2613,"vakatakana",12535,"vav",1493,"vavdagesh",64309,"vavdagesh65",64309,"vavdageshhebrew",64309,"vavhebrew",1493,"vavholam",64331,"vavholamhebrew",64331,"vavvavhebrew",1520,"vavyodhebrew",1521,"vcircle",9445,"vdotbelow",7807,"vecyrillic",1074,"veharabic",1700,"vehfinalarabic",64363,"vehinitialarabic",64364,"vehmedialarabic",64365,"vekatakana",12537,"venus",9792,"verticalbar",124,"verticallineabovecmb",781,"verticallinebelowcmb",809,"verticallinelowmod",716,"verticallinemod",712,"vewarmenian",1406,"vhook",651,"vikatakana",12536,"viramabengali",2509,"viramadeva",2381,"viramagujarati",2765,"visargabengali",2435,"visargadeva",2307,"visargagujarati",2691,"vmonospace",65366,"voarmenian",1400,"voicediterationhiragana",12446,"voicediterationkatakana",12542,"voicedmarkkana",12443,"voicedmarkkanahalfwidth",65438,"vokatakana",12538,"vparen",9393,"vtilde",7805,"vturned",652,"vuhiragana",12436,"vukatakana",12532,"w",119,"wacute",7811,"waekorean",12633,"wahiragana",12431,"wakatakana",12527,"wakatakanahalfwidth",65436,"wakorean",12632,"wasmallhiragana",12430,"wasmallkatakana",12526,"wattosquare",13143,"wavedash",12316,"wavyunderscorevertical",65076,"wawarabic",1608,"wawfinalarabic",65262,"wawhamzaabovearabic",1572,"wawhamzaabovefinalarabic",65158,"wbsquare",13277,"wcircle",9446,"wcircumflex",373,"wdieresis",7813,"wdotaccent",7815,"wdotbelow",7817,"wehiragana",12433,"weierstrass",8472,"wekatakana",12529,"wekorean",12638,"weokorean",12637,"wgrave",7809,"whitebullet",9702,"whitecircle",9675,"whitecircleinverse",9689,"whitecornerbracketleft",12302,"whitecornerbracketleftvertical",65091,"whitecornerbracketright",12303,"whitecornerbracketrightvertical",65092,"whitediamond",9671,"whitediamondcontainingblacksmalldiamond",9672,"whitedownpointingsmalltriangle",9663,"whitedownpointingtriangle",9661,"whiteleftpointingsmalltriangle",9667,"whiteleftpointingtriangle",9665,"whitelenticularbracketleft",12310,"whitelenticularbracketright",12311,"whiterightpointingsmalltriangle",9657,"whiterightpointingtriangle",9655,"whitesmallsquare",9643,"whitesmilingface",9786,"whitesquare",9633,"whitestar",9734,"whitetelephone",9743,"whitetortoiseshellbracketleft",12312,"whitetortoiseshellbracketright",12313,"whiteuppointingsmalltriangle",9653,"whiteuppointingtriangle",9651,"wihiragana",12432,"wikatakana",12528,"wikorean",12639,"wmonospace",65367,"wohiragana",12434,"wokatakana",12530,"wokatakanahalfwidth",65382,"won",8361,"wonmonospace",65510,"wowaenthai",3623,"wparen",9394,"wring",7832,"wsuperior",695,"wturned",653,"wynn",447,"x",120,"xabovecmb",829,"xbopomofo",12562,"xcircle",9447,"xdieresis",7821,"xdotaccent",7819,"xeharmenian",1389,"xi",958,"xmonospace",65368,"xparen",9395,"xsuperior",739,"y",121,"yaadosquare",13134,"yabengali",2479,"yacute",253,"yadeva",2351,"yaekorean",12626,"yagujarati",2735,"yagurmukhi",2607,"yahiragana",12420,"yakatakana",12516,"yakatakanahalfwidth",65428,"yakorean",12625,"yamakkanthai",3662,"yasmallhiragana",12419,"yasmallkatakana",12515,"yasmallkatakanahalfwidth",65388,"yatcyrillic",1123,"ycircle",9448,"ycircumflex",375,"ydieresis",255,"ydotaccent",7823,"ydotbelow",7925,"yeharabic",1610,"yehbarreearabic",1746,"yehbarreefinalarabic",64431,"yehfinalarabic",65266,"yehhamzaabovearabic",1574,"yehhamzaabovefinalarabic",65162,"yehhamzaaboveinitialarabic",65163,"yehhamzaabovemedialarabic",65164,"yehinitialarabic",65267,"yehmedialarabic",65268,"yehmeeminitialarabic",64733,"yehmeemisolatedarabic",64600,"yehnoonfinalarabic",64660,"yehthreedotsbelowarabic",1745,"yekorean",12630,"yen",165,"yenmonospace",65509,"yeokorean",12629,"yeorinhieuhkorean",12678,"yerahbenyomohebrew",1450,"yerahbenyomolefthebrew",1450,"yericyrillic",1099,"yerudieresiscyrillic",1273,"yesieungkorean",12673,"yesieungpansioskorean",12675,"yesieungsioskorean",12674,"yetivhebrew",1434,"ygrave",7923,"yhook",436,"yhookabove",7927,"yiarmenian",1397,"yicyrillic",1111,"yikorean",12642,"yinyang",9775,"yiwnarmenian",1410,"ymonospace",65369,"yod",1497,"yoddagesh",64313,"yoddageshhebrew",64313,"yodhebrew",1497,"yodyodhebrew",1522,"yodyodpatahhebrew",64287,"yohiragana",12424,"yoikorean",12681,"yokatakana",12520,"yokatakanahalfwidth",65430,"yokorean",12635,"yosmallhiragana",12423,"yosmallkatakana",12519,"yosmallkatakanahalfwidth",65390,"yotgreek",1011,"yoyaekorean",12680,"yoyakorean",12679,"yoyakthai",3618,"yoyingthai",3597,"yparen",9396,"ypogegrammeni",890,"ypogegrammenigreekcmb",837,"yr",422,"yring",7833,"ysuperior",696,"ytilde",7929,"yturned",654,"yuhiragana",12422,"yuikorean",12684,"yukatakana",12518,"yukatakanahalfwidth",65429,"yukorean",12640,"yusbigcyrillic",1131,"yusbigiotifiedcyrillic",1133,"yuslittlecyrillic",1127,"yuslittleiotifiedcyrillic",1129,"yusmallhiragana",12421,"yusmallkatakana",12517,"yusmallkatakanahalfwidth",65389,"yuyekorean",12683,"yuyeokorean",12682,"yyabengali",2527,"yyadeva",2399,"z",122,"zaarmenian",1382,"zacute",378,"zadeva",2395,"zagurmukhi",2651,"zaharabic",1592,"zahfinalarabic",65222,"zahinitialarabic",65223,"zahiragana",12374,"zahmedialarabic",65224,"zainarabic",1586,"zainfinalarabic",65200,"zakatakana",12470,"zaqefgadolhebrew",1429,"zaqefqatanhebrew",1428,"zarqahebrew",1432,"zayin",1494,"zayindagesh",64310,"zayindageshhebrew",64310,"zayinhebrew",1494,"zbopomofo",12567,"zcaron",382,"zcircle",9449,"zcircumflex",7825,"zcurl",657,"zdot",380,"zdotaccent",380,"zdotbelow",7827,"zecyrillic",1079,"zedescendercyrillic",1177,"zedieresiscyrillic",1247,"zehiragana",12380,"zekatakana",12476,"zero",48,"zeroarabic",1632,"zerobengali",2534,"zerodeva",2406,"zerogujarati",2790,"zerogurmukhi",2662,"zerohackarabic",1632,"zeroinferior",8320,"zeromonospace",65296,"zerooldstyle",63280,"zeropersian",1776,"zerosuperior",8304,"zerothai",3664,"zerowidthjoiner",65279,"zerowidthnonjoiner",8204,"zerowidthspace",8203,"zeta",950,"zhbopomofo",12563,"zhearmenian",1386,"zhebrevecyrillic",1218,"zhecyrillic",1078,"zhedescendercyrillic",1175,"zhedieresiscyrillic",1245,"zihiragana",12376,"zikatakana",12472,"zinorhebrew",1454,"zlinebelow",7829,"zmonospace",65370,"zohiragana",12382,"zokatakana",12478,"zparen",9397,"zretroflexhook",656,"zstroke",438,"zuhiragana",12378,"zukatakana",12474,".notdef",0,"angbracketleftbig",9001,"angbracketleftBig",9001,"angbracketleftbigg",9001,"angbracketleftBigg",9001,"angbracketrightBig",9002,"angbracketrightbig",9002,"angbracketrightBigg",9002,"angbracketrightbigg",9002,"arrowhookleft",8618,"arrowhookright",8617,"arrowlefttophalf",8636,"arrowleftbothalf",8637,"arrownortheast",8599,"arrownorthwest",8598,"arrowrighttophalf",8640,"arrowrightbothalf",8641,"arrowsoutheast",8600,"arrowsouthwest",8601,"backslashbig",8726,"backslashBig",8726,"backslashBigg",8726,"backslashbigg",8726,"bardbl",8214,"bracehtipdownleft",65079,"bracehtipdownright",65079,"bracehtipupleft",65080,"bracehtipupright",65080,"braceleftBig",123,"braceleftbig",123,"braceleftbigg",123,"braceleftBigg",123,"bracerightBig",125,"bracerightbig",125,"bracerightbigg",125,"bracerightBigg",125,"bracketleftbig",91,"bracketleftBig",91,"bracketleftbigg",91,"bracketleftBigg",91,"bracketrightBig",93,"bracketrightbig",93,"bracketrightbigg",93,"bracketrightBigg",93,"ceilingleftbig",8968,"ceilingleftBig",8968,"ceilingleftBigg",8968,"ceilingleftbigg",8968,"ceilingrightbig",8969,"ceilingrightBig",8969,"ceilingrightbigg",8969,"ceilingrightBigg",8969,"circledotdisplay",8857,"circledottext",8857,"circlemultiplydisplay",8855,"circlemultiplytext",8855,"circleplusdisplay",8853,"circleplustext",8853,"contintegraldisplay",8750,"contintegraltext",8750,"coproductdisplay",8720,"coproducttext",8720,"floorleftBig",8970,"floorleftbig",8970,"floorleftbigg",8970,"floorleftBigg",8970,"floorrightbig",8971,"floorrightBig",8971,"floorrightBigg",8971,"floorrightbigg",8971,"hatwide",770,"hatwider",770,"hatwidest",770,"intercal",7488,"integraldisplay",8747,"integraltext",8747,"intersectiondisplay",8898,"intersectiontext",8898,"logicalanddisplay",8743,"logicalandtext",8743,"logicalordisplay",8744,"logicalortext",8744,"parenleftBig",40,"parenleftbig",40,"parenleftBigg",40,"parenleftbigg",40,"parenrightBig",41,"parenrightbig",41,"parenrightBigg",41,"parenrightbigg",41,"prime",8242,"productdisplay",8719,"producttext",8719,"radicalbig",8730,"radicalBig",8730,"radicalBigg",8730,"radicalbigg",8730,"radicalbt",8730,"radicaltp",8730,"radicalvertex",8730,"slashbig",47,"slashBig",47,"slashBigg",47,"slashbigg",47,"summationdisplay",8721,"summationtext",8721,"tildewide",732,"tildewider",732,"tildewidest",732,"uniondisplay",8899,"unionmultidisplay",8846,"unionmultitext",8846,"unionsqdisplay",8852,"unionsqtext",8852,"uniontext",8899,"vextenddouble",8741,"vextendsingle",8739]}),i=(0,n.getArrayLookupTableFactory)(function(){return["space",32,"a1",9985,"a2",9986,"a202",9987,"a3",9988,"a4",9742,"a5",9990,"a119",9991,"a118",9992,"a117",9993,"a11",9755,"a12",9758,"a13",9996,"a14",9997,"a15",9998,"a16",9999,"a105",1e4,"a17",10001,"a18",10002,"a19",10003,"a20",10004,"a21",10005,"a22",10006,"a23",10007,"a24",10008,"a25",10009,"a26",10010,"a27",10011,"a28",10012,"a6",10013,"a7",10014,"a8",10015,"a9",10016,"a10",10017,"a29",10018,"a30",10019,"a31",10020,"a32",10021,"a33",10022,"a34",10023,"a35",9733,"a36",10025,"a37",10026,"a38",10027,"a39",10028,"a40",10029,"a41",10030,"a42",10031,"a43",10032,"a44",10033,"a45",10034,"a46",10035,"a47",10036,"a48",10037,"a49",10038,"a50",10039,"a51",10040,"a52",10041,"a53",10042,"a54",10043,"a55",10044,"a56",10045,"a57",10046,"a58",10047,"a59",10048,"a60",10049,"a61",10050,"a62",10051,"a63",10052,"a64",10053,"a65",10054,"a66",10055,"a67",10056,"a68",10057,"a69",10058,"a70",10059,"a71",9679,"a72",10061,"a73",9632,"a74",10063,"a203",10064,"a75",10065,"a204",10066,"a76",9650,"a77",9660,"a78",9670,"a79",10070,"a81",9687,"a82",10072,"a83",10073,"a84",10074,"a97",10075,"a98",10076,"a99",10077,"a100",10078,"a101",10081,"a102",10082,"a103",10083,"a104",10084,"a106",10085,"a107",10086,"a108",10087,"a112",9827,"a111",9830,"a110",9829,"a109",9824,"a120",9312,"a121",9313,"a122",9314,"a123",9315,"a124",9316,"a125",9317,"a126",9318,"a127",9319,"a128",9320,"a129",9321,"a130",10102,"a131",10103,"a132",10104,"a133",10105,"a134",10106,"a135",10107,"a136",10108,"a137",10109,"a138",10110,"a139",10111,"a140",10112,"a141",10113,"a142",10114,"a143",10115,"a144",10116,"a145",10117,"a146",10118,"a147",10119,"a148",10120,"a149",10121,"a150",10122,"a151",10123,"a152",10124,"a153",10125,"a154",10126,"a155",10127,"a156",10128,"a157",10129,"a158",10130,"a159",10131,"a160",10132,"a161",8594,"a163",8596,"a164",8597,"a196",10136,"a165",10137,"a192",10138,"a166",10139,"a167",10140,"a168",10141,"a169",10142,"a170",10143,"a171",10144,"a172",10145,"a173",10146,"a162",10147,"a174",10148,"a175",10149,"a176",10150,"a177",10151,"a178",10152,"a179",10153,"a193",10154,"a180",10155,"a199",10156,"a181",10157,"a200",10158,"a182",10159,"a201",10161,"a183",10162,"a184",10163,"a197",10164,"a185",10165,"a194",10166,"a198",10167,"a186",10168,"a195",10169,"a187",10170,"a188",10171,"a189",10172,"a190",10173,"a191",10174,"a89",10088,"a90",10089,"a93",10090,"a94",10091,"a91",10092,"a92",10093,"a205",10094,"a85",10095,"a206",10096,"a86",10097,"a87",10098,"a88",10099,"a95",10100,"a96",10101,".notdef",0]})},(e,t,r)=>{"use strict";r.r(t),r.d(t,{getNormalizedUnicodes:()=>o,getUnicodeForGlyph:()=>(function(e,t){let r=t[e];if(void 0!==r)return r;if(!e)return-1;if("u"===e[0]){const t=e.length;let n;if(7===t&&"n"===e[1]&&"i"===e[2])n=e.substring(3);else{if(!(t>=5&&t<=7))return-1;n=e.substring(1)}if(n===n.toUpperCase()&&(r=parseInt(n,16))>=0)return r}return-1}),getUnicodeRangeFor:()=>(function(e){for(let t=0,r=i.length;t<r;t++){const r=i[t];if(e>=r.begin&&e<r.end)return t}return-1}),mapSpecialUnicodeValues:()=>(function(e){if(e>=65520&&e<=65535)return 0;if(e>=62976&&e<=63743)return a()[e]||e;if(173===e)return 45;return e}),reverseIfRtl:()=>(function(e){const t=e.length;if(t<=1||!function(e){let t=i[13];if(e>=t.begin&&e<t.end)return!0;if(t=i[11],e>=t.begin&&e<t.end)return!0;return!1}(e.charCodeAt(0)))return e;const r=[];for(let n=t-1;n>=0;n--)r.push(e[n]);return r.join("")})});var n=r(117);const a=(0,n.getLookupTableFactory)(function(e){e[63721]=169,e[63193]=169,e[63720]=174,e[63194]=174,e[63722]=8482,e[63195]=8482,e[63729]=9127,e[63730]=9128,e[63731]=9129,e[63740]=9131,e[63741]=9132,e[63742]=9133,e[63726]=9121,e[63727]=9122,e[63728]=9123,e[63737]=9124,e[63738]=9125,e[63739]=9126,e[63723]=9115,e[63724]=9116,e[63725]=9117,e[63734]=9118,e[63735]=9119,e[63736]=9120});const i=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}];const o=(0,n.getArrayLookupTableFactory)(function(){return["¨"," ̈","¯"," ̄","´"," ́","µ","μ","¸"," ̧","Ĳ","IJ","ĳ","ij","Ŀ","L·","ŀ","l·","ŉ","ʼn","ſ","s","Ǆ","DŽ","ǅ","Dž","ǆ","dž","Ǉ","LJ","ǈ","Lj","ǉ","lj","Ǌ","NJ","ǋ","Nj","ǌ","nj","Ǳ","DZ","ǲ","Dz","ǳ","dz","˘"," ̆","˙"," ̇","˚"," ̊","˛"," ̨","˜"," ̃","˝"," ̋","ͺ"," ͅ","΄"," ́","ϐ","β","ϑ","θ","ϒ","Υ","ϕ","φ","ϖ","π","ϰ","κ","ϱ","ρ","ϲ","ς","ϴ","Θ","ϵ","ε","Ϲ","Σ","և","եւ","ٵ","اٴ","ٶ","وٴ","ٷ","ۇٴ","ٸ","يٴ","ำ","ํา","ຳ","ໍາ","ໜ","ຫນ","ໝ","ຫມ","ཷ","ྲཱྀ","ཹ","ླཱྀ","ẚ","aʾ","᾽"," ̓","᾿"," ̓","῀"," ͂","῾"," ̔"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","‗"," ̳","․",".","‥","..","…","...","″","′′","‴","′′′","‶","‵‵","‷","‵‵‵","‼","!!","‾"," ̅","⁇","??","⁈","?!","⁉","!?","⁗","′′′′"," "," ","₨","Rs","℀","a/c","℁","a/s","℃","°C","℅","c/o","℆","c/u","ℇ","Ɛ","℉","°F","№","No","℡","TEL","ℵ","א","ℶ","ב","ℷ","ג","ℸ","ד","℻","FAX","Ⅰ","I","Ⅱ","II","Ⅲ","III","Ⅳ","IV","Ⅴ","V","Ⅵ","VI","Ⅶ","VII","Ⅷ","VIII","Ⅸ","IX","Ⅹ","X","Ⅺ","XI","Ⅻ","XII","Ⅼ","L","Ⅽ","C","Ⅾ","D","Ⅿ","M","ⅰ","i","ⅱ","ii","ⅲ","iii","ⅳ","iv","ⅴ","v","ⅵ","vi","ⅶ","vii","ⅷ","viii","ⅸ","ix","ⅹ","x","ⅺ","xi","ⅻ","xii","ⅼ","l","ⅽ","c","ⅾ","d","ⅿ","m","∬","∫∫","∭","∫∫∫","∯","∮∮","∰","∮∮∮","⑴","(1)","⑵","(2)","⑶","(3)","⑷","(4)","⑸","(5)","⑹","(6)","⑺","(7)","⑻","(8)","⑼","(9)","⑽","(10)","⑾","(11)","⑿","(12)","⒀","(13)","⒁","(14)","⒂","(15)","⒃","(16)","⒄","(17)","⒅","(18)","⒆","(19)","⒇","(20)","⒈","1.","⒉","2.","⒊","3.","⒋","4.","⒌","5.","⒍","6.","⒎","7.","⒏","8.","⒐","9.","⒑","10.","⒒","11.","⒓","12.","⒔","13.","⒕","14.","⒖","15.","⒗","16.","⒘","17.","⒙","18.","⒚","19.","⒛","20.","⒜","(a)","⒝","(b)","⒞","(c)","⒟","(d)","⒠","(e)","⒡","(f)","⒢","(g)","⒣","(h)","⒤","(i)","⒥","(j)","⒦","(k)","⒧","(l)","⒨","(m)","⒩","(n)","⒪","(o)","⒫","(p)","⒬","(q)","⒭","(r)","⒮","(s)","⒯","(t)","⒰","(u)","⒱","(v)","⒲","(w)","⒳","(x)","⒴","(y)","⒵","(z)","⨌","∫∫∫∫","⩴","::=","⩵","==","⩶","===","⺟","母","⻳","龟","⼀","一","⼁","丨","⼂","丶","⼃","丿","⼄","乙","⼅","亅","⼆","二","⼇","亠","⼈","人","⼉","儿","⼊","入","⼋","八","⼌","冂","⼍","冖","⼎","冫","⼏","几","⼐","凵","⼑","刀","⼒","力","⼓","勹","⼔","匕","⼕","匚","⼖","匸","⼗","十","⼘","卜","⼙","卩","⼚","厂","⼛","厶","⼜","又","⼝","口","⼞","囗","⼟","土","⼠","士","⼡","夂","⼢","夊","⼣","夕","⼤","大","⼥","女","⼦","子","⼧","宀","⼨","寸","⼩","小","⼪","尢","⼫","尸","⼬","屮","⼭","山","⼮","巛","⼯","工","⼰","己","⼱","巾","⼲","干","⼳","幺","⼴","广","⼵","廴","⼶","廾","⼷","弋","⼸","弓","⼹","彐","⼺","彡","⼻","彳","⼼","心","⼽","戈","⼾","戶","⼿","手","⽀","支","⽁","攴","⽂","文","⽃","斗","⽄","斤","⽅","方","⽆","无","⽇","日","⽈","曰","⽉","月","⽊","木","⽋","欠","⽌","止","⽍","歹","⽎","殳","⽏","毋","⽐","比","⽑","毛","⽒","氏","⽓","气","⽔","水","⽕","火","⽖","爪","⽗","父","⽘","爻","⽙","爿","⽚","片","⽛","牙","⽜","牛","⽝","犬","⽞","玄","⽟","玉","⽠","瓜","⽡","瓦","⽢","甘","⽣","生","⽤","用","⽥","田","⽦","疋","⽧","疒","⽨","癶","⽩","白","⽪","皮","⽫","皿","⽬","目","⽭","矛","⽮","矢","⽯","石","⽰","示","⽱","禸","⽲","禾","⽳","穴","⽴","立","⽵","竹","⽶","米","⽷","糸","⽸","缶","⽹","网","⽺","羊","⽻","羽","⽼","老","⽽","而","⽾","耒","⽿","耳","⾀","聿","⾁","肉","⾂","臣","⾃","自","⾄","至","⾅","臼","⾆","舌","⾇","舛","⾈","舟","⾉","艮","⾊","色","⾋","艸","⾌","虍","⾍","虫","⾎","血","⾏","行","⾐","衣","⾑","襾","⾒","見","⾓","角","⾔","言","⾕","谷","⾖","豆","⾗","豕","⾘","豸","⾙","貝","⾚","赤","⾛","走","⾜","足","⾝","身","⾞","車","⾟","辛","⾠","辰","⾡","辵","⾢","邑","⾣","酉","⾤","釆","⾥","里","⾦","金","⾧","長","⾨","門","⾩","阜","⾪","隶","⾫","隹","⾬","雨","⾭","靑","⾮","非","⾯","面","⾰","革","⾱","韋","⾲","韭","⾳","音","⾴","頁","⾵","風","⾶","飛","⾷","食","⾸","首","⾹","香","⾺","馬","⾻","骨","⾼","高","⾽","髟","⾾","鬥","⾿","鬯","⿀","鬲","⿁","鬼","⿂","魚","⿃","鳥","⿄","鹵","⿅","鹿","⿆","麥","⿇","麻","⿈","黃","⿉","黍","⿊","黑","⿋","黹","⿌","黽","⿍","鼎","⿎","鼓","⿏","鼠","⿐","鼻","⿑","齊","⿒","齒","⿓","龍","⿔","龜","⿕","龠","〶","〒","〸","十","〹","卄","〺","卅","゛"," ゙","゜"," ゚","ㄱ","ᄀ","ㄲ","ᄁ","ㄳ","ᆪ","ㄴ","ᄂ","ㄵ","ᆬ","ㄶ","ᆭ","ㄷ","ᄃ","ㄸ","ᄄ","ㄹ","ᄅ","ㄺ","ᆰ","ㄻ","ᆱ","ㄼ","ᆲ","ㄽ","ᆳ","ㄾ","ᆴ","ㄿ","ᆵ","ㅀ","ᄚ","ㅁ","ᄆ","ㅂ","ᄇ","ㅃ","ᄈ","ㅄ","ᄡ","ㅅ","ᄉ","ㅆ","ᄊ","ㅇ","ᄋ","ㅈ","ᄌ","ㅉ","ᄍ","ㅊ","ᄎ","ㅋ","ᄏ","ㅌ","ᄐ","ㅍ","ᄑ","ㅎ","ᄒ","ㅏ","ᅡ","ㅐ","ᅢ","ㅑ","ᅣ","ㅒ","ᅤ","ㅓ","ᅥ","ㅔ","ᅦ","ㅕ","ᅧ","ㅖ","ᅨ","ㅗ","ᅩ","ㅘ","ᅪ","ㅙ","ᅫ","ㅚ","ᅬ","ㅛ","ᅭ","ㅜ","ᅮ","ㅝ","ᅯ","ㅞ","ᅰ","ㅟ","ᅱ","ㅠ","ᅲ","ㅡ","ᅳ","ㅢ","ᅴ","ㅣ","ᅵ","ㅤ","ᅠ","ㅥ","ᄔ","ㅦ","ᄕ","ㅧ","ᇇ","ㅨ","ᇈ","ㅩ","ᇌ","ㅪ","ᇎ","ㅫ","ᇓ","ㅬ","ᇗ","ㅭ","ᇙ","ㅮ","ᄜ","ㅯ","ᇝ","ㅰ","ᇟ","ㅱ","ᄝ","ㅲ","ᄞ","ㅳ","ᄠ","ㅴ","ᄢ","ㅵ","ᄣ","ㅶ","ᄧ","ㅷ","ᄩ","ㅸ","ᄫ","ㅹ","ᄬ","ㅺ","ᄭ","ㅻ","ᄮ","ㅼ","ᄯ","ㅽ","ᄲ","ㅾ","ᄶ","ㅿ","ᅀ","ㆀ","ᅇ","ㆁ","ᅌ","ㆂ","ᇱ","ㆃ","ᇲ","ㆄ","ᅗ","ㆅ","ᅘ","ㆆ","ᅙ","ㆇ","ᆄ","ㆈ","ᆅ","ㆉ","ᆈ","ㆊ","ᆑ","ㆋ","ᆒ","ㆌ","ᆔ","ㆍ","ᆞ","ㆎ","ᆡ","㈀","(ᄀ)","㈁","(ᄂ)","㈂","(ᄃ)","㈃","(ᄅ)","㈄","(ᄆ)","㈅","(ᄇ)","㈆","(ᄉ)","㈇","(ᄋ)","㈈","(ᄌ)","㈉","(ᄎ)","㈊","(ᄏ)","㈋","(ᄐ)","㈌","(ᄑ)","㈍","(ᄒ)","㈎","(가)","㈏","(나)","㈐","(다)","㈑","(라)","㈒","(마)","㈓","(바)","㈔","(사)","㈕","(아)","㈖","(자)","㈗","(차)","㈘","(카)","㈙","(타)","㈚","(파)","㈛","(하)","㈜","(주)","㈝","(오전)","㈞","(오후)","㈠","(一)","㈡","(二)","㈢","(三)","㈣","(四)","㈤","(五)","㈥","(六)","㈦","(七)","㈧","(八)","㈨","(九)","㈩","(十)","㈪","(月)","㈫","(火)","㈬","(水)","㈭","(木)","㈮","(金)","㈯","(土)","㈰","(日)","㈱","(株)","㈲","(有)","㈳","(社)","㈴","(名)","㈵","(特)","㈶","(財)","㈷","(祝)","㈸","(労)","㈹","(代)","㈺","(呼)","㈻","(学)","㈼","(監)","㈽","(企)","㈾","(資)","㈿","(協)","㉀","(祭)","㉁","(休)","㉂","(自)","㉃","(至)","㋀","1月","㋁","2月","㋂","3月","㋃","4月","㋄","5月","㋅","6月","㋆","7月","㋇","8月","㋈","9月","㋉","10月","㋊","11月","㋋","12月","㍘","0点","㍙","1点","㍚","2点","㍛","3点","㍜","4点","㍝","5点","㍞","6点","㍟","7点","㍠","8点","㍡","9点","㍢","10点","㍣","11点","㍤","12点","㍥","13点","㍦","14点","㍧","15点","㍨","16点","㍩","17点","㍪","18点","㍫","19点","㍬","20点","㍭","21点","㍮","22点","㍯","23点","㍰","24点","㏠","1日","㏡","2日","㏢","3日","㏣","4日","㏤","5日","㏥","6日","㏦","7日","㏧","8日","㏨","9日","㏩","10日","㏪","11日","㏫","12日","㏬","13日","㏭","14日","㏮","15日","㏯","16日","㏰","17日","㏱","18日","㏲","19日","㏳","20日","㏴","21日","㏵","22日","㏶","23日","㏷","24日","㏸","25日","㏹","26日","㏺","27日","㏻","28日","㏼","29日","㏽","30日","㏾","31日","ﬀ","ff","ﬁ","fi","ﬂ","fl","ﬃ","ffi","ﬄ","ffl","ﬅ","ſt","ﬆ","st","ﬓ","մն","ﬔ","մե","ﬕ","մի","ﬖ","վն","ﬗ","մխ","ﭏ","אל","ﭐ","ٱ","ﭑ","ٱ","ﭒ","ٻ","ﭓ","ٻ","ﭔ","ٻ","ﭕ","ٻ","ﭖ","پ","ﭗ","پ","ﭘ","پ","ﭙ","پ","ﭚ","ڀ","ﭛ","ڀ","ﭜ","ڀ","ﭝ","ڀ","ﭞ","ٺ","ﭟ","ٺ","ﭠ","ٺ","ﭡ","ٺ","ﭢ","ٿ","ﭣ","ٿ","ﭤ","ٿ","ﭥ","ٿ","ﭦ","ٹ","ﭧ","ٹ","ﭨ","ٹ","ﭩ","ٹ","ﭪ","ڤ","ﭫ","ڤ","ﭬ","ڤ","ﭭ","ڤ","ﭮ","ڦ","ﭯ","ڦ","ﭰ","ڦ","ﭱ","ڦ","ﭲ","ڄ","ﭳ","ڄ","ﭴ","ڄ","ﭵ","ڄ","ﭶ","ڃ","ﭷ","ڃ","ﭸ","ڃ","ﭹ","ڃ","ﭺ","چ","ﭻ","چ","ﭼ","چ","ﭽ","چ","ﭾ","ڇ","ﭿ","ڇ","ﮀ","ڇ","ﮁ","ڇ","ﮂ","ڍ","ﮃ","ڍ","ﮄ","ڌ","ﮅ","ڌ","ﮆ","ڎ","ﮇ","ڎ","ﮈ","ڈ","ﮉ","ڈ","ﮊ","ژ","ﮋ","ژ","ﮌ","ڑ","ﮍ","ڑ","ﮎ","ک","ﮏ","ک","ﮐ","ک","ﮑ","ک","ﮒ","گ","ﮓ","گ","ﮔ","گ","ﮕ","گ","ﮖ","ڳ","ﮗ","ڳ","ﮘ","ڳ","ﮙ","ڳ","ﮚ","ڱ","ﮛ","ڱ","ﮜ","ڱ","ﮝ","ڱ","ﮞ","ں","ﮟ","ں","ﮠ","ڻ","ﮡ","ڻ","ﮢ","ڻ","ﮣ","ڻ","ﮤ","ۀ","ﮥ","ۀ","ﮦ","ہ","ﮧ","ہ","ﮨ","ہ","ﮩ","ہ","ﮪ","ھ","ﮫ","ھ","ﮬ","ھ","ﮭ","ھ","ﮮ","ے","ﮯ","ے","ﮰ","ۓ","ﮱ","ۓ","ﯓ","ڭ","ﯔ","ڭ","ﯕ","ڭ","ﯖ","ڭ","ﯗ","ۇ","ﯘ","ۇ","ﯙ","ۆ","ﯚ","ۆ","ﯛ","ۈ","ﯜ","ۈ","ﯝ","ٷ","ﯞ","ۋ","ﯟ","ۋ","ﯠ","ۅ","ﯡ","ۅ","ﯢ","ۉ","ﯣ","ۉ","ﯤ","ې","ﯥ","ې","ﯦ","ې","ﯧ","ې","ﯨ","ى","ﯩ","ى","ﯪ","ئا","ﯫ","ئا","ﯬ","ئە","ﯭ","ئە","ﯮ","ئو","ﯯ","ئو","ﯰ","ئۇ","ﯱ","ئۇ","ﯲ","ئۆ","ﯳ","ئۆ","ﯴ","ئۈ","ﯵ","ئۈ","ﯶ","ئې","ﯷ","ئې","ﯸ","ئې","ﯹ","ئى","ﯺ","ئى","ﯻ","ئى","ﯼ","ی","ﯽ","ی","ﯾ","ی","ﯿ","ی","ﰀ","ئج","ﰁ","ئح","ﰂ","ئم","ﰃ","ئى","ﰄ","ئي","ﰅ","بج","ﰆ","بح","ﰇ","بخ","ﰈ","بم","ﰉ","بى","ﰊ","بي","ﰋ","تج","ﰌ","تح","ﰍ","تخ","ﰎ","تم","ﰏ","تى","ﰐ","تي","ﰑ","ثج","ﰒ","ثم","ﰓ","ثى","ﰔ","ثي","ﰕ","جح","ﰖ","جم","ﰗ","حج","ﰘ","حم","ﰙ","خج","ﰚ","خح","ﰛ","خم","ﰜ","سج","ﰝ","سح","ﰞ","سخ","ﰟ","سم","ﰠ","صح","ﰡ","صم","ﰢ","ضج","ﰣ","ضح","ﰤ","ضخ","ﰥ","ضم","ﰦ","طح","ﰧ","طم","ﰨ","ظم","ﰩ","عج","ﰪ","عم","ﰫ","غج","ﰬ","غم","ﰭ","فج","ﰮ","فح","ﰯ","فخ","ﰰ","فم","ﰱ","فى","ﰲ","في","ﰳ","قح","ﰴ","قم","ﰵ","قى","ﰶ","قي","ﰷ","كا","ﰸ","كج","ﰹ","كح","ﰺ","كخ","ﰻ","كل","ﰼ","كم","ﰽ","كى","ﰾ","كي","ﰿ","لج","ﱀ","لح","ﱁ","لخ","ﱂ","لم","ﱃ","لى","ﱄ","لي","ﱅ","مج","ﱆ","مح","ﱇ","مخ","ﱈ","مم","ﱉ","مى","ﱊ","مي","ﱋ","نج","ﱌ","نح","ﱍ","نخ","ﱎ","نم","ﱏ","نى","ﱐ","ني","ﱑ","هج","ﱒ","هم","ﱓ","هى","ﱔ","هي","ﱕ","يج","ﱖ","يح","ﱗ","يخ","ﱘ","يم","ﱙ","يى","ﱚ","يي","ﱛ","ذٰ","ﱜ","رٰ","ﱝ","ىٰ","ﱞ"," ٌّ","ﱟ"," ٍّ","ﱠ"," َّ","ﱡ"," ُّ","ﱢ"," ِّ","ﱣ"," ّٰ","ﱤ","ئر","ﱥ","ئز","ﱦ","ئم","ﱧ","ئن","ﱨ","ئى","ﱩ","ئي","ﱪ","بر","ﱫ","بز","ﱬ","بم","ﱭ","بن","ﱮ","بى","ﱯ","بي","ﱰ","تر","ﱱ","تز","ﱲ","تم","ﱳ","تن","ﱴ","تى","ﱵ","تي","ﱶ","ثر","ﱷ","ثز","ﱸ","ثم","ﱹ","ثن","ﱺ","ثى","ﱻ","ثي","ﱼ","فى","ﱽ","في","ﱾ","قى","ﱿ","قي","ﲀ","كا","ﲁ","كل","ﲂ","كم","ﲃ","كى","ﲄ","كي","ﲅ","لم","ﲆ","لى","ﲇ","لي","ﲈ","ما","ﲉ","مم","ﲊ","نر","ﲋ","نز","ﲌ","نم","ﲍ","نن","ﲎ","نى","ﲏ","ني","ﲐ","ىٰ","ﲑ","ير","ﲒ","يز","ﲓ","يم","ﲔ","ين","ﲕ","يى","ﲖ","يي","ﲗ","ئج","ﲘ","ئح","ﲙ","ئخ","ﲚ","ئم","ﲛ","ئه","ﲜ","بج","ﲝ","بح","ﲞ","بخ","ﲟ","بم","ﲠ","به","ﲡ","تج","ﲢ","تح","ﲣ","تخ","ﲤ","تم","ﲥ","ته","ﲦ","ثم","ﲧ","جح","ﲨ","جم","ﲩ","حج","ﲪ","حم","ﲫ","خج","ﲬ","خم","ﲭ","سج","ﲮ","سح","ﲯ","سخ","ﲰ","سم","ﲱ","صح","ﲲ","صخ","ﲳ","صم","ﲴ","ضج","ﲵ","ضح","ﲶ","ضخ","ﲷ","ضم","ﲸ","طح","ﲹ","ظم","ﲺ","عج","ﲻ","عم","ﲼ","غج","ﲽ","غم","ﲾ","فج","ﲿ","فح","ﳀ","فخ","ﳁ","فم","ﳂ","قح","ﳃ","قم","ﳄ","كج","ﳅ","كح","ﳆ","كخ","ﳇ","كل","ﳈ","كم","ﳉ","لج","ﳊ","لح","ﳋ","لخ","ﳌ","لم","ﳍ","له","ﳎ","مج","ﳏ","مح","ﳐ","مخ","ﳑ","مم","ﳒ","نج","ﳓ","نح","ﳔ","نخ","ﳕ","نم","ﳖ","نه","ﳗ","هج","ﳘ","هم","ﳙ","هٰ","ﳚ","يج","ﳛ","يح","ﳜ","يخ","ﳝ","يم","ﳞ","يه","ﳟ","ئم","ﳠ","ئه","ﳡ","بم","ﳢ","به","ﳣ","تم","ﳤ","ته","ﳥ","ثم","ﳦ","ثه","ﳧ","سم","ﳨ","سه","ﳩ","شم","ﳪ","شه","ﳫ","كل","ﳬ","كم","ﳭ","لم","ﳮ","نم","ﳯ","نه","ﳰ","يم","ﳱ","يه","ﳲ","ـَّ","ﳳ","ـُّ","ﳴ","ـِّ","ﳵ","طى","ﳶ","طي","ﳷ","عى","ﳸ","عي","ﳹ","غى","ﳺ","غي","ﳻ","سى","ﳼ","سي","ﳽ","شى","ﳾ","شي","ﳿ","حى","ﴀ","حي","ﴁ","جى","ﴂ","جي","ﴃ","خى","ﴄ","خي","ﴅ","صى","ﴆ","صي","ﴇ","ضى","ﴈ","ضي","ﴉ","شج","ﴊ","شح","ﴋ","شخ","ﴌ","شم","ﴍ","شر","ﴎ","سر","ﴏ","صر","ﴐ","ضر","ﴑ","طى","ﴒ","طي","ﴓ","عى","ﴔ","عي","ﴕ","غى","ﴖ","غي","ﴗ","سى","ﴘ","سي","ﴙ","شى","ﴚ","شي","ﴛ","حى","ﴜ","حي","ﴝ","جى","ﴞ","جي","ﴟ","خى","ﴠ","خي","ﴡ","صى","ﴢ","صي","ﴣ","ضى","ﴤ","ضي","ﴥ","شج","ﴦ","شح","ﴧ","شخ","ﴨ","شم","ﴩ","شر","ﴪ","سر","ﴫ","صر","ﴬ","ضر","ﴭ","شج","ﴮ","شح","ﴯ","شخ","ﴰ","شم","ﴱ","سه","ﴲ","شه","ﴳ","طم","ﴴ","سج","ﴵ","سح","ﴶ","سخ","ﴷ","شج","ﴸ","شح","ﴹ","شخ","ﴺ","طم","ﴻ","ظم","ﴼ","اً","ﴽ","اً","ﵐ","تجم","ﵑ","تحج","ﵒ","تحج","ﵓ","تحم","ﵔ","تخم","ﵕ","تمج","ﵖ","تمح","ﵗ","تمخ","ﵘ","جمح","ﵙ","جمح","ﵚ","حمي","ﵛ","حمى","ﵜ","سحج","ﵝ","سجح","ﵞ","سجى","ﵟ","سمح","ﵠ","سمح","ﵡ","سمج","ﵢ","سمم","ﵣ","سمم","ﵤ","صحح","ﵥ","صحح","ﵦ","صمم","ﵧ","شحم","ﵨ","شحم","ﵩ","شجي","ﵪ","شمخ","ﵫ","شمخ","ﵬ","شمم","ﵭ","شمم","ﵮ","ضحى","ﵯ","ضخم","ﵰ","ضخم","ﵱ","طمح","ﵲ","طمح","ﵳ","طمم","ﵴ","طمي","ﵵ","عجم","ﵶ","عمم","ﵷ","عمم","ﵸ","عمى","ﵹ","غمم","ﵺ","غمي","ﵻ","غمى","ﵼ","فخم","ﵽ","فخم","ﵾ","قمح","ﵿ","قمم","ﶀ","لحم","ﶁ","لحي","ﶂ","لحى","ﶃ","لجج","ﶄ","لجج","ﶅ","لخم","ﶆ","لخم","ﶇ","لمح","ﶈ","لمح","ﶉ","محج","ﶊ","محم","ﶋ","محي","ﶌ","مجح","ﶍ","مجم","ﶎ","مخج","ﶏ","مخم","ﶒ","مجخ","ﶓ","همج","ﶔ","همم","ﶕ","نحم","ﶖ","نحى","ﶗ","نجم","ﶘ","نجم","ﶙ","نجى","ﶚ","نمي","ﶛ","نمى","ﶜ","يمم","ﶝ","يمم","ﶞ","بخي","ﶟ","تجي","ﶠ","تجى","ﶡ","تخي","ﶢ","تخى","ﶣ","تمي","ﶤ","تمى","ﶥ","جمي","ﶦ","جحى","ﶧ","جمى","ﶨ","سخى","ﶩ","صحي","ﶪ","شحي","ﶫ","ضحي","ﶬ","لجي","ﶭ","لمي","ﶮ","يحي","ﶯ","يجي","ﶰ","يمي","ﶱ","ممي","ﶲ","قمي","ﶳ","نحي","ﶴ","قمح","ﶵ","لحم","ﶶ","عمي","ﶷ","كمي","ﶸ","نجح","ﶹ","مخي","ﶺ","لجم","ﶻ","كمم","ﶼ","لجم","ﶽ","نجح","ﶾ","جحي","ﶿ","حجي","ﷀ","مجي","ﷁ","فمي","ﷂ","بحي","ﷃ","كمم","ﷄ","عجم","ﷅ","صمم","ﷆ","سخي","ﷇ","نجي","﹉","‾","﹊","‾","﹋","‾","﹌","‾","﹍","_","﹎","_","﹏","_","ﺀ","ء","ﺁ","آ","ﺂ","آ","ﺃ","أ","ﺄ","أ","ﺅ","ؤ","ﺆ","ؤ","ﺇ","إ","ﺈ","إ","ﺉ","ئ","ﺊ","ئ","ﺋ","ئ","ﺌ","ئ","ﺍ","ا","ﺎ","ا","ﺏ","ب","ﺐ","ب","ﺑ","ب","ﺒ","ب","ﺓ","ة","ﺔ","ة","ﺕ","ت","ﺖ","ت","ﺗ","ت","ﺘ","ت","ﺙ","ث","ﺚ","ث","ﺛ","ث","ﺜ","ث","ﺝ","ج","ﺞ","ج","ﺟ","ج","ﺠ","ج","ﺡ","ح","ﺢ","ح","ﺣ","ح","ﺤ","ح","ﺥ","خ","ﺦ","خ","ﺧ","خ","ﺨ","خ","ﺩ","د","ﺪ","د","ﺫ","ذ","ﺬ","ذ","ﺭ","ر","ﺮ","ر","ﺯ","ز","ﺰ","ز","ﺱ","س","ﺲ","س","ﺳ","س","ﺴ","س","ﺵ","ش","ﺶ","ش","ﺷ","ش","ﺸ","ش","ﺹ","ص","ﺺ","ص","ﺻ","ص","ﺼ","ص","ﺽ","ض","ﺾ","ض","ﺿ","ض","ﻀ","ض","ﻁ","ط","ﻂ","ط","ﻃ","ط","ﻄ","ط","ﻅ","ظ","ﻆ","ظ","ﻇ","ظ","ﻈ","ظ","ﻉ","ع","ﻊ","ع","ﻋ","ع","ﻌ","ع","ﻍ","غ","ﻎ","غ","ﻏ","غ","ﻐ","غ","ﻑ","ف","ﻒ","ف","ﻓ","ف","ﻔ","ف","ﻕ","ق","ﻖ","ق","ﻗ","ق","ﻘ","ق","ﻙ","ك","ﻚ","ك","ﻛ","ك","ﻜ","ك","ﻝ","ل","ﻞ","ل","ﻟ","ل","ﻠ","ل","ﻡ","م","ﻢ","م","ﻣ","م","ﻤ","م","ﻥ","ن","ﻦ","ن","ﻧ","ن","ﻨ","ن","ﻩ","ه","ﻪ","ه","ﻫ","ه","ﻬ","ه","ﻭ","و","ﻮ","و","ﻯ","ى","ﻰ","ى","ﻱ","ي","ﻲ","ي","ﻳ","ي","ﻴ","ي","ﻵ","لآ","ﻶ","لآ","ﻷ","لأ","ﻸ","لأ","ﻹ","لإ","ﻺ","لإ","ﻻ","لا","ﻼ","لا"]})},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSymbolsFonts=t.getSupplementalGlyphMapForCalibri=t.getSupplementalGlyphMapForArialBlack=t.getStdFontMap=t.getSerifFonts=t.getNonStdFontMap=t.getGlyphMapForStandardFonts=void 0;var n=r(117),a=(0,n.getLookupTableFactory)(function(e){e.ArialNarrow="Helvetica",e["ArialNarrow-Bold"]="Helvetica-Bold",e["ArialNarrow-BoldItalic"]="Helvetica-BoldOblique",e["ArialNarrow-Italic"]="Helvetica-Oblique",e.ArialBlack="Helvetica",e["ArialBlack-Bold"]="Helvetica-Bold",e["ArialBlack-BoldItalic"]="Helvetica-BoldOblique",e["ArialBlack-Italic"]="Helvetica-Oblique",e["Arial-Black"]="Helvetica",e["Arial-Black-Bold"]="Helvetica-Bold",e["Arial-Black-BoldItalic"]="Helvetica-BoldOblique",e["Arial-Black-Italic"]="Helvetica-Oblique",e.Arial="Helvetica",e["Arial-Bold"]="Helvetica-Bold",e["Arial-BoldItalic"]="Helvetica-BoldOblique",e["Arial-Italic"]="Helvetica-Oblique",e["Arial-BoldItalicMT"]="Helvetica-BoldOblique",e["Arial-BoldMT"]="Helvetica-Bold",e["Arial-ItalicMT"]="Helvetica-Oblique",e.ArialMT="Helvetica",e["Courier-Bold"]="Courier-Bold",e["Courier-BoldItalic"]="Courier-BoldOblique",e["Courier-Italic"]="Courier-Oblique",e.CourierNew="Courier",e["CourierNew-Bold"]="Courier-Bold",e["CourierNew-BoldItalic"]="Courier-BoldOblique",e["CourierNew-Italic"]="Courier-Oblique",e["CourierNewPS-BoldItalicMT"]="Courier-BoldOblique",e["CourierNewPS-BoldMT"]="Courier-Bold",e["CourierNewPS-ItalicMT"]="Courier-Oblique",e.CourierNewPSMT="Courier",e.Helvetica="Helvetica",e["Helvetica-Bold"]="Helvetica-Bold",e["Helvetica-BoldItalic"]="Helvetica-BoldOblique",e["Helvetica-BoldOblique"]="Helvetica-BoldOblique",e["Helvetica-Italic"]="Helvetica-Oblique",e["Helvetica-Oblique"]="Helvetica-Oblique",e["Symbol-Bold"]="Symbol",e["Symbol-BoldItalic"]="Symbol",e["Symbol-Italic"]="Symbol",e.TimesNewRoman="Times-Roman",e["TimesNewRoman-Bold"]="Times-Bold",e["TimesNewRoman-BoldItalic"]="Times-BoldItalic",e["TimesNewRoman-Italic"]="Times-Italic",e.TimesNewRomanPS="Times-Roman",e["TimesNewRomanPS-Bold"]="Times-Bold",e["TimesNewRomanPS-BoldItalic"]="Times-BoldItalic",e["TimesNewRomanPS-BoldItalicMT"]="Times-BoldItalic",e["TimesNewRomanPS-BoldMT"]="Times-Bold",e["TimesNewRomanPS-Italic"]="Times-Italic",e["TimesNewRomanPS-ItalicMT"]="Times-Italic",e.TimesNewRomanPSMT="Times-Roman",e["TimesNewRomanPSMT-Bold"]="Times-Bold",e["TimesNewRomanPSMT-BoldItalic"]="Times-BoldItalic",e["TimesNewRomanPSMT-Italic"]="Times-Italic"});t.getStdFontMap=a;var i=(0,n.getLookupTableFactory)(function(e){e.Calibri="Helvetica",e["Calibri-Bold"]="Helvetica-Bold",e["Calibri-BoldItalic"]="Helvetica-BoldOblique",e["Calibri-Italic"]="Helvetica-Oblique",e.CenturyGothic="Helvetica",e["CenturyGothic-Bold"]="Helvetica-Bold",e["CenturyGothic-BoldItalic"]="Helvetica-BoldOblique",e["CenturyGothic-Italic"]="Helvetica-Oblique",e.ComicSansMS="Comic Sans MS",e["ComicSansMS-Bold"]="Comic Sans MS-Bold",e["ComicSansMS-BoldItalic"]="Comic Sans MS-BoldItalic",e["ComicSansMS-Italic"]="Comic Sans MS-Italic",e.LucidaConsole="Courier",e["LucidaConsole-Bold"]="Courier-Bold",e["LucidaConsole-BoldItalic"]="Courier-BoldOblique",e["LucidaConsole-Italic"]="Courier-Oblique",e["LucidaSans-Demi"]="Helvetica-Bold",e["MS-Gothic"]="MS Gothic",e["MS-Gothic-Bold"]="MS Gothic-Bold",e["MS-Gothic-BoldItalic"]="MS Gothic-BoldItalic",e["MS-Gothic-Italic"]="MS Gothic-Italic",e["MS-Mincho"]="MS Mincho",e["MS-Mincho-Bold"]="MS Mincho-Bold",e["MS-Mincho-BoldItalic"]="MS Mincho-BoldItalic",e["MS-Mincho-Italic"]="MS Mincho-Italic",e["MS-PGothic"]="MS PGothic",e["MS-PGothic-Bold"]="MS PGothic-Bold",e["MS-PGothic-BoldItalic"]="MS PGothic-BoldItalic",e["MS-PGothic-Italic"]="MS PGothic-Italic",e["MS-PMincho"]="MS PMincho",e["MS-PMincho-Bold"]="MS PMincho-Bold",e["MS-PMincho-BoldItalic"]="MS PMincho-BoldItalic",e["MS-PMincho-Italic"]="MS PMincho-Italic",e.NuptialScript="Times-Italic",e.SegoeUISymbol="Helvetica",e.Wingdings="ZapfDingbats",e["Wingdings-Regular"]="ZapfDingbats"});t.getNonStdFontMap=i;var o=(0,n.getLookupTableFactory)(function(e){e["Adobe Jenson"]=!0,e["Adobe Text"]=!0,e.Albertus=!0,e.Aldus=!0,e.Alexandria=!0,e.Algerian=!0,e["American Typewriter"]=!0,e.Antiqua=!0,e.Apex=!0,e.Arno=!0,e.Aster=!0,e.Aurora=!0,e.Baskerville=!0,e.Bell=!0,e.Bembo=!0,e["Bembo Schoolbook"]=!0,e.Benguiat=!0,e["Berkeley Old Style"]=!0,e["Bernhard Modern"]=!0,e["Berthold City"]=!0,e.Bodoni=!0,e["Bauer Bodoni"]=!0,e["Book Antiqua"]=!0,e.Bookman=!0,e["Bordeaux Roman"]=!0,e["Californian FB"]=!0,e.Calisto=!0,e.Calvert=!0,e.Capitals=!0,e.Cambria=!0,e.Cartier=!0,e.Caslon=!0,e.Catull=!0,e.Centaur=!0,e["Century Old Style"]=!0,e["Century Schoolbook"]=!0,e.Chaparral=!0,e["Charis SIL"]=!0,e.Cheltenham=!0,e["Cholla Slab"]=!0,e.Clarendon=!0,e.Clearface=!0,e.Cochin=!0,e.Colonna=!0,e["Computer Modern"]=!0,e["Concrete Roman"]=!0,e.Constantia=!0,e["Cooper Black"]=!0,e.Corona=!0,e.Ecotype=!0,e.Egyptienne=!0,e.Elephant=!0,e.Excelsior=!0,e.Fairfield=!0,e["FF Scala"]=!0,e.Folkard=!0,e.Footlight=!0,e.FreeSerif=!0,e["Friz Quadrata"]=!0,e.Garamond=!0,e.Gentium=!0,e.Georgia=!0,e.Gloucester=!0,e["Goudy Old Style"]=!0,e["Goudy Schoolbook"]=!0,e["Goudy Pro Font"]=!0,e.Granjon=!0,e["Guardian Egyptian"]=!0,e.Heather=!0,e.Hercules=!0,e["High Tower Text"]=!0,e.Hiroshige=!0,e["Hoefler Text"]=!0,e["Humana Serif"]=!0,e.Imprint=!0,e["Ionic No. 5"]=!0,e.Janson=!0,e.Joanna=!0,e.Korinna=!0,e.Lexicon=!0,e["Liberation Serif"]=!0,e["Linux Libertine"]=!0,e.Literaturnaya=!0,e.Lucida=!0,e["Lucida Bright"]=!0,e.Melior=!0,e.Memphis=!0,e.Miller=!0,e.Minion=!0,e.Modern=!0,e["Mona Lisa"]=!0,e["Mrs Eaves"]=!0,e["MS Serif"]=!0,e["Museo Slab"]=!0,e["New York"]=!0,e["Nimbus Roman"]=!0,e["NPS Rawlinson Roadway"]=!0,e.NuptialScript=!0,e.Palatino=!0,e.Perpetua=!0,e.Plantin=!0,e["Plantin Schoolbook"]=!0,e.Playbill=!0,e["Poor Richard"]=!0,e["Rawlinson Roadway"]=!0,e.Renault=!0,e.Requiem=!0,e.Rockwell=!0,e.Roman=!0,e["Rotis Serif"]=!0,e.Sabon=!0,e.Scala=!0,e.Seagull=!0,e.Sistina=!0,e.Souvenir=!0,e.STIX=!0,e["Stone Informal"]=!0,e["Stone Serif"]=!0,e.Sylfaen=!0,e.Times=!0,e.Trajan=!0,e["Trinité"]=!0,e["Trump Mediaeval"]=!0,e.Utopia=!0,e["Vale Type"]=!0,e["Bitstream Vera"]=!0,e["Vera Serif"]=!0,e.Versailles=!0,e.Wanted=!0,e.Weiss=!0,e["Wide Latin"]=!0,e.Windsor=!0,e.XITS=!0});t.getSerifFonts=o;var s=(0,n.getLookupTableFactory)(function(e){e.Dingbats=!0,e.Symbol=!0,e.ZapfDingbats=!0});t.getSymbolsFonts=s;var c=(0,n.getLookupTableFactory)(function(e){e[2]=10,e[3]=32,e[4]=33,e[5]=34,e[6]=35,e[7]=36,e[8]=37,e[9]=38,e[10]=39,e[11]=40,e[12]=41,e[13]=42,e[14]=43,e[15]=44,e[16]=45,e[17]=46,e[18]=47,e[19]=48,e[20]=49,e[21]=50,e[22]=51,e[23]=52,e[24]=53,e[25]=54,e[26]=55,e[27]=56,e[28]=57,e[29]=58,e[30]=894,e[31]=60,e[32]=61,e[33]=62,e[34]=63,e[35]=64,e[36]=65,e[37]=66,e[38]=67,e[39]=68,e[40]=69,e[41]=70,e[42]=71,e[43]=72,e[44]=73,e[45]=74,e[46]=75,e[47]=76,e[48]=77,e[49]=78,e[50]=79,e[51]=80,e[52]=81,e[53]=82,e[54]=83,e[55]=84,e[56]=85,e[57]=86,e[58]=87,e[59]=88,e[60]=89,e[61]=90,e[62]=91,e[63]=92,e[64]=93,e[65]=94,e[66]=95,e[67]=96,e[68]=97,e[69]=98,e[70]=99,e[71]=100,e[72]=101,e[73]=102,e[74]=103,e[75]=104,e[76]=105,e[77]=106,e[78]=107,e[79]=108,e[80]=109,e[81]=110,e[82]=111,e[83]=112,e[84]=113,e[85]=114,e[86]=115,e[87]=116,e[88]=117,e[89]=118,e[90]=119,e[91]=120,e[92]=121,e[93]=122,e[94]=123,e[95]=124,e[96]=125,e[97]=126,e[98]=196,e[99]=197,e[100]=199,e[101]=201,e[102]=209,e[103]=214,e[104]=220,e[105]=225,e[106]=224,e[107]=226,e[108]=228,e[109]=227,e[110]=229,e[111]=231,e[112]=233,e[113]=232,e[114]=234,e[115]=235,e[116]=237,e[117]=236,e[118]=238,e[119]=239,e[120]=241,e[121]=243,e[122]=242,e[123]=244,e[124]=246,e[125]=245,e[126]=250,e[127]=249,e[128]=251,e[129]=252,e[130]=8224,e[131]=176,e[132]=162,e[133]=163,e[134]=167,e[135]=8226,e[136]=182,e[137]=223,e[138]=174,e[139]=169,e[140]=8482,e[141]=180,e[142]=168,e[143]=8800,e[144]=198,e[145]=216,e[146]=8734,e[147]=177,e[148]=8804,e[149]=8805,e[150]=165,e[151]=181,e[152]=8706,e[153]=8721,e[154]=8719,e[156]=8747,e[157]=170,e[158]=186,e[159]=8486,e[160]=230,e[161]=248,e[162]=191,e[163]=161,e[164]=172,e[165]=8730,e[166]=402,e[167]=8776,e[168]=8710,e[169]=171,e[170]=187,e[171]=8230,e[210]=218,e[223]=711,e[224]=321,e[225]=322,e[227]=353,e[229]=382,e[234]=253,e[252]=263,e[253]=268,e[254]=269,e[258]=258,e[260]=260,e[261]=261,e[265]=280,e[266]=281,e[268]=283,e[269]=313,e[275]=323,e[276]=324,e[278]=328,e[284]=345,e[285]=346,e[286]=347,e[292]=367,e[295]=377,e[296]=378,e[298]=380,e[305]=963,e[306]=964,e[307]=966,e[308]=8215,e[309]=8252,e[310]=8319,e[311]=8359,e[312]=8592,e[313]=8593,e[337]=9552,e[493]=1039,e[494]=1040,e[705]=1524,e[706]=8362,e[710]=64288,e[711]=64298,e[759]=1617,e[761]=1776,e[763]=1778,e[775]=1652,e[777]=1764,e[778]=1780,e[779]=1781,e[780]=1782,e[782]=771,e[783]=64726,e[786]=8363,e[788]=8532,e[790]=768,e[791]=769,e[792]=768,e[795]=803,e[797]=64336,e[798]=64337,e[799]=64342,e[800]=64343,e[801]=64344,e[802]=64345,e[803]=64362,e[804]=64363,e[805]=64364,e[2424]=7821,e[2425]=7822,e[2426]=7823,e[2427]=7824,e[2428]=7825,e[2429]=7826,e[2430]=7827,e[2433]=7682,e[2678]=8045,e[2679]=8046,e[2830]=1552,e[2838]=686,e[2840]=751,e[2842]=753,e[2843]=754,e[2844]=755,e[2846]=757,e[2856]=767,e[2857]=848,e[2858]=849,e[2862]=853,e[2863]=854,e[2864]=855,e[2865]=861,e[2866]=862,e[2906]=7460,e[2908]=7462,e[2909]=7463,e[2910]=7464,e[2912]=7466,e[2913]=7467,e[2914]=7468,e[2916]=7470,e[2917]=7471,e[2918]=7472,e[2920]=7474,e[2921]=7475,e[2922]=7476,e[2924]=7478,e[2925]=7479,e[2926]=7480,e[2928]=7482,e[2929]=7483,e[2930]=7484,e[2932]=7486,e[2933]=7487,e[2934]=7488,e[2936]=7490,e[2937]=7491,e[2938]=7492,e[2940]=7494,e[2941]=7495,e[2942]=7496,e[2944]=7498,e[2946]=7500,e[2948]=7502,e[2950]=7504,e[2951]=7505,e[2952]=7506,e[2954]=7508,e[2955]=7509,e[2956]=7510,e[2958]=7512,e[2959]=7513,e[2960]=7514,e[2962]=7516,e[2963]=7517,e[2964]=7518,e[2966]=7520,e[2967]=7521,e[2968]=7522,e[2970]=7524,e[2971]=7525,e[2972]=7526,e[2974]=7528,e[2975]=7529,e[2976]=7530,e[2978]=1537,e[2979]=1538,e[2980]=1539,e[2982]=1549,e[2983]=1551,e[2984]=1552,e[2986]=1554,e[2987]=1555,e[2988]=1556,e[2990]=1623,e[2991]=1624,e[2995]=1775,e[2999]=1791,e[3002]=64290,e[3003]=64291,e[3004]=64292,e[3006]=64294,e[3007]=64295,e[3008]=64296,e[3011]=1900,e[3014]=8223,e[3015]=8244,e[3017]=7532,e[3018]=7533,e[3019]=7534,e[3075]=7590,e[3076]=7591,e[3079]=7594,e[3080]=7595,e[3083]=7598,e[3084]=7599,e[3087]=7602,e[3088]=7603,e[3091]=7606,e[3092]=7607,e[3095]=7610,e[3096]=7611,e[3099]=7614,e[3100]=7615,e[3103]=7618,e[3104]=7619,e[3107]=8337,e[3108]=8338,e[3116]=1884,e[3119]=1885,e[3120]=1885,e[3123]=1886,e[3124]=1886,e[3127]=1887,e[3128]=1887,e[3131]=1888,e[3132]=1888,e[3135]=1889,e[3136]=1889,e[3139]=1890,e[3140]=1890,e[3143]=1891,e[3144]=1891,e[3147]=1892,e[3148]=1892,e[3153]=580,e[3154]=581,e[3157]=584,e[3158]=585,e[3161]=588,e[3162]=589,e[3165]=891,e[3166]=892,e[3169]=1274,e[3170]=1275,e[3173]=1278,e[3174]=1279,e[3181]=7622,e[3182]=7623,e[3282]=11799,e[3316]=578,e[3379]=42785,e[3393]=1159,e[3416]=8377});t.getGlyphMapForStandardFonts=c;var u=(0,n.getLookupTableFactory)(function(e){e[227]=322,e[264]=261,e[291]=346});t.getSupplementalGlyphMapForArialBlack=u;var l=(0,n.getLookupTableFactory)(function(e){e[1]=32,e[4]=65,e[17]=66,e[18]=67,e[24]=68,e[28]=69,e[38]=70,e[39]=71,e[44]=72,e[47]=73,e[58]=74,e[60]=75,e[62]=76,e[68]=77,e[69]=78,e[75]=79,e[87]=80,e[89]=81,e[90]=82,e[94]=83,e[100]=84,e[104]=85,e[115]=86,e[116]=87,e[121]=88,e[122]=89,e[127]=90,e[258]=97,e[268]=261,e[271]=98,e[272]=99,e[273]=263,e[282]=100,e[286]=101,e[295]=281,e[296]=102,e[336]=103,e[346]=104,e[349]=105,e[361]=106,e[364]=107,e[367]=108,e[371]=322,e[373]=109,e[374]=110,e[381]=111,e[383]=243,e[393]=112,e[395]=113,e[396]=114,e[400]=115,e[401]=347,e[410]=116,e[437]=117,e[448]=118,e[449]=119,e[454]=120,e[455]=121,e[460]=122,e[463]=380,e[853]=44,e[855]=58,e[856]=46,e[876]=47,e[878]=45,e[882]=45,e[894]=40,e[895]=41,e[896]=91,e[897]=93,e[923]=64,e[1004]=48,e[1005]=49,e[1006]=50,e[1007]=51,e[1008]=52,e[1009]=53,e[1010]=54,e[1011]=55,e[1012]=56,e[1013]=57,e[1081]=37,e[1085]=43,e[1086]=45});t.getSupplementalGlyphMapForCalibri=l},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToUnicodeMap=t.IdentityToUnicodeMap=void 0;var n=r(4);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}var s=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];a(this,e),this._map=t}return o(e,[{key:"length",get:function(){return this._map.length}},{key:"forEach",value:function(e){for(var t in this._map)e(t,this._map[t].charCodeAt(0))}},{key:"has",value:function(e){return void 0!==this._map[e]}},{key:"get",value:function(e){return this._map[e]}},{key:"charCodeOf",value:function(e){var t=this._map;if(t.length<=65536)return t.indexOf(e);for(var r in t)if(t[r]===e)return 0|r;return-1}},{key:"amend",value:function(e){for(var t in e)this._map[t]=e[t]}}]),e}();t.ToUnicodeMap=s;var c=function(){function e(t,r){a(this,e),this.firstChar=t,this.lastChar=r}return o(e,[{key:"length",get:function(){return this.lastChar+1-this.firstChar}},{key:"forEach",value:function(e){for(var t=this.firstChar,r=this.lastChar;t<=r;t++)e(t,t)}},{key:"has",value:function(e){return this.firstChar<=e&&e<=this.lastChar}},{key:"get",value:function(e){if(this.firstChar<=e&&e<=this.lastChar)return String.fromCharCode(e)}},{key:"charCodeOf",value:function(e){return Number.isInteger(e)&&e>=this.firstChar&&e<=this.lastChar?e:-1}},{key:"amend",value:function(e){(0,n.unreachable)("Should not call amend()")}}]),e}();t.IdentityToUnicodeMap=c},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CFFFont=void 0;var n=r(143),a=r(146),i=r(4);function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.properties=r;var o=new n.CFFParser(t,r,a.SEAC_ANALYSIS_ENABLED);this.cff=o.parse(),this.cff.duplicateFirstGlyph();var s=new n.CFFCompiler(this.cff);this.seacs=this.cff.seacs;try{this.data=s.compile()}catch(e){(0,i.warn)("Failed to compile font "+r.loadedName),this.data=t}this._createBuiltInEncoding()}var t,r,s;return t=e,(r=[{key:"numGlyphs",get:function(){return this.cff.charStrings.count}},{key:"getCharset",value:function(){return this.cff.charset.charset}},{key:"getGlyphMapping",value:function(){var e,t,r=this.cff,n=this.properties,i=r.charset.charset;if(n.composite){if(e=Object.create(null),r.isCIDFont)for(t=0;t<i.length;t++){var o=i[t];e[n.cMap.charCodeOf(o)]=t}else for(t=0;t<r.charStrings.count;t++)e[n.cMap.charCodeOf(t)]=t;return e}var s=r.encoding?r.encoding.encoding:null;return e=(0,a.type1FontGlyphMapping)(n,s,i)}},{key:"hasGlyphId",value:function(e){return this.cff.hasGlyphId(e)}},{key:"_createBuiltInEncoding",value:function(){var e=this.cff,t=e.charset,r=e.encoding;if(t&&r){var n=t.charset,a=r.encoding,i=[];for(var o in a){var s=a[o];if(s>=0){var c=n[s];c&&(i[o]=c)}}i.length>0&&(this.properties.builtInEncoding=i)}}}])&&o(t.prototype,r),s&&o(t,s),e}();t.CFFFont=s},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.FontRendererFactory=void 0;var a=r(4),i=r(143),o=r(147),s=r(145),c=r(118);function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=h(e);if(t){var i=h(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function g(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),e}function m(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function v(e,t){return e[t]<<8|e[t+1]}function y(e){var t=e.length,r=32768;return t<1240?r=107:t<33900&&(r=1131),r}function b(e,t,r){var n,i,o,s=1===v(e,t+2)?m(e,t+8):m(e,t+16),c=v(e,t+s);if(4===c){v(e,t+s+2);var u=v(e,t+s+6)>>1;for(i=t+s+14,n=[],o=0;o<u;o++,i+=2)n[o]={end:v(e,i)};for(i+=2,o=0;o<u;o++,i+=2)n[o].start=v(e,i);for(o=0;o<u;o++,i+=2)n[o].idDelta=v(e,i);for(o=0;o<u;o++,i+=2){var l=v(e,i);if(0!==l){n[o].ids=[];for(var f=0,h=n[o].end-n[o].start+1;f<h;f++)n[o].ids[f]=v(e,i+l),l+=2}}return n}if(12===c){m(e,t+s+4);var d=m(e,t+s+12);for(i=t+s+16,n=[],o=0;o<d;o++)n.push({start:m(e,i),end:m(e,i+4),idDelta:m(e,i+8)-m(e,i)}),i+=12;return n}throw new a.FormatError("unsupported cmap: ".concat(c))}function w(e,t,r,n){var a=new i.CFFParser(new c.Stream(e,t,r-t),{},n).parse();return{glyphs:a.charStrings.objects,subrs:a.topDict.privateDict&&a.topDict.privateDict.subrsIndex&&a.topDict.privateDict.subrsIndex.objects,gsubrs:a.globalSubrIndex&&a.globalSubrIndex.objects,isCFFCIDFont:a.isCIDFont,fdSelect:a.fdSelect,fdArray:a.fdArray}}function k(e,t){for(var r=t.codePointAt(0),n=0,a=0,i=e.length-1;a<i;){var o=a+i+1>>1;r<e[o].start?i=o-1:a=o}return e[a].start<=r&&r<=e[a].end&&(n=e[a].idDelta+(e[a].ids?e[a].ids[r-e[a].start]:r)&65535),{charCode:r,glyphId:n}}var S=[],x=function(){function e(t){d(this,e),this.constructor===e&&(0,a.unreachable)("Cannot initialize CompiledFont."),this.fontMatrix=t,this.compiledGlyphs=Object.create(null),this.compiledCharCodeToGlyphId=Object.create(null)}return g(e,[{key:"getPathJs",value:function(e){var t=k(this.cmap,e),r=t.charCode,n=t.glyphId,a=this.compiledGlyphs[n];if(!a)try{a=this.compileGlyph(this.glyphs[n],n),this.compiledGlyphs[n]=a}catch(e){throw this.compiledGlyphs[n]=S,void 0===this.compiledCharCodeToGlyphId[r]&&(this.compiledCharCodeToGlyphId[r]=n),e}return void 0===this.compiledCharCodeToGlyphId[r]&&(this.compiledCharCodeToGlyphId[r]=n),a}},{key:"compileGlyph",value:function(e,t){if(!e||0===e.length||14===e[0])return S;var r=this.fontMatrix;if(this.isCFFCIDFont){var n=this.fdSelect.getFDIndex(t);if(n>=0&&n<this.fdArray.length)r=this.fdArray[n].getByName("FontMatrix")||a.FONT_IDENTITY_MATRIX;else(0,a.warn)("Invalid fd index for glyph index.")}var i=[{cmd:"save"},{cmd:"transform",args:r.slice()},{cmd:"scale",args:["size","-size"]}];return this.compileGlyphImpl(e,i,t),i.push({cmd:"restore"}),i}},{key:"compileGlyphImpl",value:function(){(0,a.unreachable)("Children classes should implement this.")}},{key:"hasBuiltPath",value:function(e){var t=k(this.cmap,e),r=t.charCode,n=t.glyphId;return void 0!==this.compiledGlyphs[n]&&void 0!==this.compiledCharCodeToGlyphId[r]}}]),e}(),A=function(e){u(r,x);var t=f(r);function r(e,n,a){var i;return d(this,r),(i=t.call(this,a||[488e-6,0,0,488e-6,0,0])).glyphs=e,i.cmap=n,i}return g(r,[{key:"compileGlyphImpl",value:function(e,t){!function e(t,r,n){function a(e,t){r.push({cmd:"moveTo",args:[e,t]})}function i(e,t){r.push({cmd:"lineTo",args:[e,t]})}function o(e,t,n,a){r.push({cmd:"quadraticCurveTo",args:[e,t,n,a]})}var s,c=0,u=(t[c]<<24|t[c+1]<<16)>>16,l=0,f=0;if(c+=10,u<0)do{s=t[c]<<8|t[c+1];var h=t[c+2]<<8|t[c+3];c+=4;var d=void 0,p=void 0;1&s?(d=(t[c]<<24|t[c+1]<<16)>>16,p=(t[c+2]<<24|t[c+3]<<16)>>16,c+=4):(d=t[c++],p=t[c++]),2&s?(l=d,f=p):(l=0,f=0);var g=1,m=1,v=0,y=0;8&s?(g=m=(t[c]<<24|t[c+1]<<16)/1073741824,c+=2):64&s?(g=(t[c]<<24|t[c+1]<<16)/1073741824,m=(t[c+2]<<24|t[c+3]<<16)/1073741824,c+=4):128&s&&(g=(t[c]<<24|t[c+1]<<16)/1073741824,v=(t[c+2]<<24|t[c+3]<<16)/1073741824,y=(t[c+4]<<24|t[c+5]<<16)/1073741824,m=(t[c+6]<<24|t[c+7]<<16)/1073741824,c+=8);var b=n.glyphs[h];b&&(r.push({cmd:"save"},{cmd:"transform",args:[g,v,y,m,l,f]}),e(b,r,n),r.push({cmd:"restore"}))}while(32&s);else{var w,k,S=[];for(w=0;w<u;w++)S.push(t[c]<<8|t[c+1]),c+=2;c+=2+(t[c]<<8|t[c+1]);for(var x=S[S.length-1]+1,A=[];A.length<x;){var O=1;for(8&(s=t[c++])&&(O+=t[c++]);O-- >0;)A.push({flags:s})}for(w=0;w<x;w++){switch(18&A[w].flags){case 0:l+=(t[c]<<24|t[c+1]<<16)>>16,c+=2;break;case 2:l-=t[c++];break;case 18:l+=t[c++]}A[w].x=l}for(w=0;w<x;w++){switch(36&A[w].flags){case 0:f+=(t[c]<<24|t[c+1]<<16)>>16,c+=2;break;case 4:f-=t[c++];break;case 36:f+=t[c++]}A[w].y=f}var C=0;for(c=0;c<u;c++){var T=S[c],F=A.slice(C,T+1);if(1&F[0].flags)F.push(F[0]);else if(1&F[F.length-1].flags)F.unshift(F[F.length-1]);else{var _={flags:1,x:(F[0].x+F[F.length-1].x)/2,y:(F[0].y+F[F.length-1].y)/2};F.unshift(_),F.push(_)}for(a(F[0].x,F[0].y),w=1,k=F.length;w<k;w++)1&F[w].flags?i(F[w].x,F[w].y):1&F[w+1].flags?(o(F[w].x,F[w].y,F[w+1].x,F[w+1].y),w++):o(F[w].x,F[w].y,(F[w].x+F[w+1].x)/2,(F[w].y+F[w+1].y)/2);C=T+1}}}(e,t,this)}}]),r}(),O=function(e){u(r,x);var t=f(r);function r(e,n,a,i){var s;return d(this,r),(s=t.call(this,a||[.001,0,0,.001,0,0])).glyphs=e.glyphs,s.gsubrs=e.gsubrs||[],s.subrs=e.subrs||[],s.cmap=n,s.glyphNameMap=i||(0,o.getGlyphsUnicode)(),s.gsubrsBias=y(s.gsubrs),s.subrsBias=y(s.subrs),s.isCFFCIDFont=e.isCFFCIDFont,s.fdSelect=e.fdSelect,s.fdArray=e.fdArray,s}return g(r,[{key:"compileGlyphImpl",value:function(e,t,r){!function e(t,r,n,i){function o(e,t){r.push({cmd:"moveTo",args:[e,t]})}function c(e,t){r.push({cmd:"lineTo",args:[e,t]})}function u(e,t,n,a,i,o){r.push({cmd:"bezierCurveTo",args:[e,t,n,a,i,o]})}var l=[],f=0,h=0,d=0;!function t(p){for(var g=0;g<p.length;){var m=!1,v=p[g++],b=void 0,w=void 0,S=void 0,x=void 0,A=void 0,O=void 0,C=void 0,T=void 0;switch(v){case 1:case 3:d+=l.length>>1,m=!0;break;case 4:h+=l.pop(),o(f,h),m=!0;break;case 5:for(;l.length>0;)f+=l.shift(),h+=l.shift(),c(f,h);break;case 6:for(;l.length>0&&(c(f+=l.shift(),h),0!==l.length);)h+=l.shift(),c(f,h);break;case 7:for(;l.length>0&&(h+=l.shift(),c(f,h),0!==l.length);)c(f+=l.shift(),h);break;case 8:for(;l.length>0;)b=f+l.shift(),S=h+l.shift(),w=b+l.shift(),x=S+l.shift(),f=w+l.shift(),h=x+l.shift(),u(b,S,w,x,f,h);break;case 10:if(C=l.pop(),T=null,n.isCFFCIDFont){var F=n.fdSelect.getFDIndex(i);if(F>=0&&F<n.fdArray.length){var _=n.fdArray[F],P=void 0;_.privateDict&&_.privateDict.subrsIndex&&(P=_.privateDict.subrsIndex.objects),P&&(T=P[C+=y(P)])}else(0,a.warn)("Invalid fd index for glyph index.")}else T=n.subrs[C+n.subrsBias];T&&t(T);break;case 11:return;case 12:switch(v=p[g++]){case 34:w=(b=f+l.shift())+l.shift(),A=h+l.shift(),f=w+l.shift(),u(b,h,w,A,f,A),w=(b=f+l.shift())+l.shift(),f=w+l.shift(),u(b,A,w,h,f,h);break;case 35:b=f+l.shift(),S=h+l.shift(),w=b+l.shift(),x=S+l.shift(),f=w+l.shift(),h=x+l.shift(),u(b,S,w,x,f,h),b=f+l.shift(),S=h+l.shift(),w=b+l.shift(),x=S+l.shift(),f=w+l.shift(),h=x+l.shift(),u(b,S,w,x,f,h),l.pop();break;case 36:u(b=f+l.shift(),A=h+l.shift(),w=b+l.shift(),O=A+l.shift(),f=w+l.shift(),O),u(b=f+l.shift(),O,w=b+l.shift(),O+l.shift(),f=w+l.shift(),h);break;case 37:var I=f,E=h;b=f+l.shift(),S=h+l.shift(),w=b+l.shift(),x=S+l.shift(),f=w+l.shift(),h=x+l.shift(),u(b,S,w,x,f,h),b=f+l.shift(),S=h+l.shift(),w=b+l.shift(),x=S+l.shift(),f=w,h=x,Math.abs(f-I)>Math.abs(h-E)?f+=l.shift():h+=l.shift(),u(b,S,w,x,f,h);break;default:throw new a.FormatError("unknown operator: 12 ".concat(v))}break;case 14:if(l.length>=4){var j=l.pop(),R=l.pop();h=l.pop(),f=l.pop(),r.push({cmd:"save"},{cmd:"translate",args:[f,h]});var M=k(n.cmap,String.fromCharCode(n.glyphNameMap[s.StandardEncoding[j]]));e(n.glyphs[M.glyphId],r,n,M.glyphId),r.push({cmd:"restore"}),M=k(n.cmap,String.fromCharCode(n.glyphNameMap[s.StandardEncoding[R]])),e(n.glyphs[M.glyphId],r,n,M.glyphId)}return;case 18:d+=l.length>>1,m=!0;break;case 19:case 20:g+=(d+=l.length>>1)+7>>3,m=!0;break;case 21:h+=l.pop(),o(f+=l.pop(),h),m=!0;break;case 22:o(f+=l.pop(),h),m=!0;break;case 23:d+=l.length>>1,m=!0;break;case 24:for(;l.length>2;)b=f+l.shift(),S=h+l.shift(),w=b+l.shift(),x=S+l.shift(),f=w+l.shift(),h=x+l.shift(),u(b,S,w,x,f,h);f+=l.shift(),h+=l.shift(),c(f,h);break;case 25:for(;l.length>6;)f+=l.shift(),h+=l.shift(),c(f,h);b=f+l.shift(),S=h+l.shift(),w=b+l.shift(),x=S+l.shift(),f=w+l.shift(),h=x+l.shift(),u(b,S,w,x,f,h);break;case 26:for(l.length%2&&(f+=l.shift());l.length>0;)b=f,S=h+l.shift(),w=b+l.shift(),x=S+l.shift(),f=w,h=x+l.shift(),u(b,S,w,x,f,h);break;case 27:for(l.length%2&&(h+=l.shift());l.length>0;)u(b=f+l.shift(),S=h,w=b+l.shift(),x=S+l.shift(),f=w+l.shift(),h=x);break;case 28:l.push((p[g]<<24|p[g+1]<<16)>>16),g+=2;break;case 29:C=l.pop()+n.gsubrsBias,(T=n.gsubrs[C])&&t(T);break;case 30:for(;l.length>0&&(b=f,S=h+l.shift(),w=b+l.shift(),x=S+l.shift(),f=w+l.shift(),h=x+(1===l.length?l.shift():0),u(b,S,w,x,f,h),0!==l.length);)b=f+l.shift(),S=h,w=b+l.shift(),x=S+l.shift(),h=x+l.shift(),u(b,S,w,x,f=w+(1===l.length?l.shift():0),h);break;case 31:for(;l.length>0&&(b=f+l.shift(),S=h,w=b+l.shift(),x=S+l.shift(),h=x+l.shift(),u(b,S,w,x,f=w+(1===l.length?l.shift():0),h),0!==l.length);)b=f,S=h+l.shift(),w=b+l.shift(),x=S+l.shift(),f=w+l.shift(),h=x+(1===l.length?l.shift():0),u(b,S,w,x,f,h);break;default:if(v<32)throw new a.FormatError("unknown operator: ".concat(v));v<247?l.push(v-139):v<251?l.push(256*(v-247)+p[g++]+108):v<255?l.push(256*-(v-251)-p[g++]-108):(l.push((p[g]<<24|p[g+1]<<16|p[g+2]<<8|p[g+3])/65536),g+=4)}m&&(l.length=0)}}(t)}(e,t,this,r)}}]),r}(),C=function(){function e(){d(this,e)}return g(e,null,[{key:"create",value:function(e,t){for(var r,n,i,o,s,c,u=new Uint8Array(e.data),l=v(u,4),f=0,h=12;f<l;f++,h+=16){var d=(0,a.bytesToString)(u.subarray(h,h+4)),p=m(u,h+8),g=m(u,h+12);switch(d){case"cmap":r=b(u,p);break;case"glyf":n=u.subarray(p,p+g);break;case"loca":i=u.subarray(p,p+g);break;case"head":c=v(u,p+18),s=v(u,p+50);break;case"CFF ":o=w(u,p,p+g,t)}}if(n){var y=c?[1/c,0,0,1/c,0,0]:e.fontMatrix;return new A(function(e,t,r){var n,a;r?(n=4,a=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}):(n=2,a=function(e,t){return e[t]<<9|e[t+1]<<1});for(var i=[],o=a(t,0),s=n;s<t.length;s+=n){var c=a(t,s);i.push(e.subarray(o,c)),o=c}return i}(n,i,s),r,y)}return new O(o,r,e.fontMatrix,e.glyphNameMap)}}]),e}();t.FontRendererFactory=C},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenTypeFileBuilder=void 0;var n=r(117),a=r(4);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){e[t]=r>>8&255,e[t+1]=255&r}function s(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}function c(e,t,r){if(r instanceof Uint8Array)e.set(r,t);else if("string"==typeof r)for(var n=0,a=r.length;n<a;n++)e[t++]=255&r.charCodeAt(n);else for(var i=0,o=r.length;i<o;i++)e[t++]=255&r[i]}var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sfnt=t,this.tables=Object.create(null)}var t,r,u;return t=e,u=[{key:"getSearchParams",value:function(e,t){for(var r=1,n=0;(r^e)>r;)r<<=1,n++;var a=r*t;return{range:a,entry:n,rangeShift:t*e-a}}}],(r=[{key:"toArray",value:function(){var t=this.sfnt,r=this.tables,i=Object.keys(r);i.sort();var u,l,f,h,d,p=i.length,g=12+16*p,m=[g];for(u=0;u<p;u++){g+=((h=r[i[u]]).length+3&-4)>>>0,m.push(g)}var v=new Uint8Array(g);for(u=0;u<p;u++)h=r[i[u]],c(v,m[u],h);"true"===t&&(t=(0,a.string32)(65536)),v[0]=255&t.charCodeAt(0),v[1]=255&t.charCodeAt(1),v[2]=255&t.charCodeAt(2),v[3]=255&t.charCodeAt(3),o(v,4,p);var y=e.getSearchParams(p,16);for(o(v,6,y.range),o(v,8,y.entry),o(v,10,y.rangeShift),g=12,u=0;u<p;u++){d=i[u],v[g]=255&d.charCodeAt(0),v[g+1]=255&d.charCodeAt(1),v[g+2]=255&d.charCodeAt(2),v[g+3]=255&d.charCodeAt(3);var b=0;for(l=m[u],f=m[u+1];l<f;l+=4){b=b+(0,n.readUint32)(v,l)>>>0}s(v,g+4,b),s(v,g+8,m[u]),s(v,g+12,r[d].length),g+=16}return v}},{key:"addTable",value:function(e,t){if(e in this.tables)throw new Error("Table "+e+" already exists");this.tables[e]=t}}])&&i(t.prototype,r),u&&i(t,u),e}();t.OpenTypeFileBuilder=u},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Type1Font=void 0;var n=r(143),a=r(146),i=r(117),o=r(118),s=r(155),c=r(4);function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t,r){for(var n=e.length,a=t.length,o=n-a,s=r,c=!1;s<o;){for(var u=0;u<a&&e[s+u]===t[u];)u++;if(u>=a){for(s+=u;s<n&&(0,i.isWhiteSpace)(e[s]);)s++;c=!0;break}s++}return{found:c,length:s}}var f=function(){function e(t,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var i=n.length1,u=(n.length2,r.peekBytes(6)),f=128===u[0]&&1===u[1];f&&(r.skip(6),i=u[5]<<24|u[4]<<16|u[3]<<8|u[2]);var h=function(e,t){var r,n,a,i,s=[101,101,120,101,99],u=e.pos;try{n=(r=e.getBytes(t)).length}catch(e){}if(n===t&&(a=l(r,s,t-2*s.length)).found&&a.length===t)return{stream:new o.Stream(r),length:t};for((0,c.warn)('Invalid "Length1" property in Type1 font -- trying to recover.'),e.pos=u;0!==(a=l(e.peekBytes(2048),s,0)).length;)if(e.pos+=a.length,a.found){i=e.pos-u;break}return e.pos=u,i?{stream:new o.Stream(e.getBytes(i)),length:i}:((0,c.warn)('Unable to recover "Length1" property in Type1 font -- using as is.'),{stream:new o.Stream(e.getBytes(t)),length:t})}(r,i);new s.Type1Parser(h.stream,!1,a.SEAC_ANALYSIS_ENABLED).extractFontHeader(n),f&&((u=r.getBytes(6))[5],u[4],u[3],u[2]);var d,p=(d=r.getBytes(),{stream:new o.Stream(d),length:d.length}),g=new s.Type1Parser(p.stream,!0,a.SEAC_ANALYSIS_ENABLED).extractFontProgram(n);for(var m in g.properties)n[m]=g.properties[m];var v=g.charstrings,y=this.getType2Charstrings(v),b=this.getType2Subrs(g.subrs);this.charstrings=v,this.data=this.wrap(t,y,this.charstrings,b,n),this.seacs=this.getSeacs(g.charstrings)}var t,r,i;return t=e,(r=[{key:"numGlyphs",get:function(){return this.charstrings.length+1}},{key:"getCharset",value:function(){for(var e=[".notdef"],t=this.charstrings,r=0;r<t.length;r++)e.push(t[r].glyphName);return e}},{key:"getGlyphMapping",value:function(e){var t=this.charstrings;if(e.composite){for(var r=Object.create(null),n=0,i=t.length;n<i;n++){r[e.cMap.charCodeOf(n)]=n+1}return r}var o,s,c=[".notdef"];for(s=0;s<t.length;s++)c.push(t[s].glyphName);var u=e.builtInEncoding;if(u)for(var l in o=Object.create(null),u)(s=c.indexOf(u[l]))>=0&&(o[l]=s);return(0,a.type1FontGlyphMapping)(e,o,c)}},{key:"hasGlyphId",value:function(e){return!(e<0||e>=this.numGlyphs)&&(0===e||this.charstrings[e-1].charstring.length>0)}},{key:"getSeacs",value:function(e){for(var t=[],r=0,n=e.length;r<n;r++){var a=e[r];a.seac&&(t[r+1]=a.seac)}return t}},{key:"getType2Charstrings",value:function(e){for(var t=[],r=0,n=e.length;r<n;r++)t.push(e[r].charstring);return t}},{key:"getType2Subrs",value:function(e){var t=0,r=e.length;t=r<1133?107:r<33769?1131:32768;var n,a=[];for(n=0;n<t;n++)a.push([11]);for(n=0;n<r;n++)a.push(e[n]);return a}},{key:"wrap",value:function(e,t,r,a,i){var o=new n.CFF;o.header=new n.CFFHeader(1,0,4,4),o.names=[e];var s=new n.CFFTopDict;s.setByName("version",391),s.setByName("Notice",392),s.setByName("FullName",393),s.setByName("FamilyName",394),s.setByName("Weight",395),s.setByName("Encoding",null),s.setByName("FontMatrix",i.fontMatrix),s.setByName("FontBBox",i.bbox),s.setByName("charset",null),s.setByName("CharStrings",null),s.setByName("Private",null),o.topDict=s;var c=new n.CFFStrings;c.add("Version 0.11"),c.add("See original notice"),c.add(e),c.add(e),c.add("Medium"),o.strings=c,o.globalSubrIndex=new n.CFFIndex;var u,l,f=t.length,h=[".notdef"];for(u=0;u<f;u++){var d=r[u].glyphName;-1===n.CFFStandardStrings.indexOf(d)&&c.add(d),h.push(d)}o.charset=new n.CFFCharset(!1,0,h);var p=new n.CFFIndex;for(p.add([139,14]),u=0;u<f;u++)p.add(t[u]);o.charStrings=p;var g=new n.CFFPrivateDict;g.setByName("Subrs",null);var m=["BlueValues","OtherBlues","FamilyBlues","FamilyOtherBlues","StemSnapH","StemSnapV","BlueShift","BlueFuzz","BlueScale","LanguageGroup","ExpansionFactor","ForceBold","StdHW","StdVW"];for(u=0,l=m.length;u<l;u++){var v=m[u];if(v in i.privateData){var y=i.privateData[v];if(Array.isArray(y))for(var b=y.length-1;b>0;b--)y[b]-=y[b-1];g.setByName(v,y)}}o.topDict.privateDict=g;var w=new n.CFFIndex;for(u=0,l=a.length;u<l;u++)w.add(a[u]);return g.subrsIndex=w,new n.CFFCompiler(o).compile()}}])&&u(t.prototype,r),i&&u(t,i),e}();t.Type1Font=f},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Type1Parser=void 0;var n=r(145),a=r(117),i=r(118),o=r(4);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),e}var l=function(){var e=[4],t=[5],r=[6],n=[7],a=[8],i=[12,35],c=[14],l=[21],f=[22],h=[30],d=[31];return function(){function p(){s(this,p),this.width=0,this.lsb=0,this.flexing=!1,this.output=[],this.stack=[]}return u(p,[{key:"convert",value:function(s,u,p){for(var g,m,v,y=s.length,b=!1,w=0;w<y;w++){var k=s[w];if(k<32){switch(12===k&&(k=(k<<8)+s[++w]),k){case 1:case 3:this.stack=[];break;case 4:if(this.flexing){if(this.stack.length<1){b=!0;break}var S=this.stack.pop();this.stack.push(0,S);break}b=this.executeCommand(1,e);break;case 5:b=this.executeCommand(2,t);break;case 6:b=this.executeCommand(1,r);break;case 7:b=this.executeCommand(1,n);break;case 8:b=this.executeCommand(6,a);break;case 9:this.stack=[];break;case 10:if(this.stack.length<1){b=!0;break}if(!u[v=this.stack.pop()]){b=!0;break}b=this.convert(u[v],u,p);break;case 11:return b;case 13:if(this.stack.length<2){b=!0;break}g=this.stack.pop(),m=this.stack.pop(),this.lsb=m,this.width=g,this.stack.push(g,m),b=this.executeCommand(2,f);break;case 14:this.output.push(c[0]);break;case 21:if(this.flexing)break;b=this.executeCommand(2,l);break;case 22:if(this.flexing){this.stack.push(0);break}b=this.executeCommand(1,f);break;case 30:b=this.executeCommand(4,h);break;case 31:b=this.executeCommand(4,d);break;case 3072:case 3073:case 3074:this.stack=[];break;case 3078:if(p){var x=this.stack[this.stack.length-5];this.seac=this.stack.splice(-4,4),this.seac[0]+=this.lsb-x,b=this.executeCommand(0,c)}else b=this.executeCommand(4,c);break;case 3079:if(this.stack.length<4){b=!0;break}this.stack.pop(),g=this.stack.pop();var A=this.stack.pop();m=this.stack.pop(),this.lsb=m,this.width=g,this.stack.push(g,m,A),b=this.executeCommand(3,l);break;case 3084:if(this.stack.length<2){b=!0;break}var O=this.stack.pop(),C=this.stack.pop();this.stack.push(C/O);break;case 3088:if(this.stack.length<2){b=!0;break}v=this.stack.pop();var T=this.stack.pop();if(0===v&&3===T){var F=this.stack.splice(this.stack.length-17,17);this.stack.push(F[2]+F[0],F[3]+F[1],F[4],F[5],F[6],F[7],F[8],F[9],F[10],F[11],F[12],F[13],F[14]),b=this.executeCommand(13,i,!0),this.flexing=!1,this.stack.push(F[15],F[16])}else 1===v&&0===T&&(this.flexing=!0);break;case 3089:break;case 3105:this.stack=[];break;default:(0,o.warn)('Unknown type 1 charstring command of "'+k+'"')}if(b)break}else k<=246?k-=139:k=k<=250?256*(k-247)+s[++w]+108:k<=254?-256*(k-251)-s[++w]-108:(255&s[++w])<<24|(255&s[++w])<<16|(255&s[++w])<<8|(255&s[++w])<<0,this.stack.push(k)}return b}},{key:"executeCommand",value:function(e,t,r){var n=this.stack.length;if(e>n)return!0;for(var a=n-e,i=a;i<n;i++){var o=this.stack[i];Number.isInteger(o)?this.output.push(28,o>>8&255,255&o):(o=65536*o|0,this.output.push(255,o>>24&255,o>>16&255,o>>8&255,255&o))}return this.output.push.apply(this.output,t),r?this.stack.splice(a,e):this.stack.length=0,!1}}]),p}()}(),f=function(){var e=55665;function t(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function r(e,t,r){if(r>=e.length)return new Uint8Array(0);var n,a,i=0|t;for(n=0;n<r;n++)i=52845*(e[n]+i)+22719&65535;var o=e.length-r,s=new Uint8Array(o);for(n=r,a=0;a<o;n++,a++){var c=e[n];s[a]=c^i>>8,i=52845*(c+i)+22719&65535}return s}function o(e){return 47===e||91===e||93===e||123===e||125===e||40===e||41===e}return function(){function c(n,o,u){if(s(this,c),o){var l=n.getBytes(),f=!((t(l[0])||(0,a.isWhiteSpace)(l[0]))&&t(l[1])&&t(l[2])&&t(l[3])&&t(l[4])&&t(l[5])&&t(l[6])&&t(l[7]));n=new i.Stream(f?r(l,e,4):function(e,r,n){var a,i,o=0|r,s=e.length,c=new Uint8Array(s>>>1);for(a=0,i=0;a<s;a++){var u=e[a];if(t(u)){a++;for(var l=void 0;a<s&&!t(l=e[a]);)a++;if(a<s){var f=parseInt(String.fromCharCode(u,l),16);c[i++]=f^o>>8,o=52845*(f+o)+22719&65535}}}return c.slice(n,i)}(l,e,4))}this.seacAnalysisEnabled=!!u,this.stream=n,this.nextChar()}return u(c,[{key:"readNumberArray",value:function(){this.getToken();for(var e=[];;){var t=this.getToken();if(null===t||"]"===t||"}"===t)break;e.push(parseFloat(t||0))}return e}},{key:"readNumber",value:function(){var e=this.getToken();return parseFloat(e||0)}},{key:"readInt",value:function(){var e=this.getToken();return 0|parseInt(e||0,10)}},{key:"readBoolean",value:function(){return"true"===this.getToken()?1:0}},{key:"nextChar",value:function(){return this.currentChar=this.stream.getByte()}},{key:"getToken",value:function(){for(var e=!1,t=this.currentChar;;){if(-1===t)return null;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!(0,a.isWhiteSpace)(t))break;t=this.nextChar()}if(o(t))return this.nextChar(),String.fromCharCode(t);var r="";do{r+=String.fromCharCode(t),t=this.nextChar()}while(t>=0&&!(0,a.isWhiteSpace)(t)&&!o(t));return r}},{key:"readCharStrings",value:function(e,t){return-1===t?e:r(e,4330,t)}},{key:"extractFontProgram",value:function(e){var t=this.stream,r=[],n=[],a=Object.create(null);a.lenIV=4;for(var i,o,s,c,u,f={subrs:[],charstrings:[],properties:{privateData:a}};null!==(i=this.getToken());)if("/"===i)switch(i=this.getToken()){case"CharStrings":for(this.getToken(),this.getToken(),this.getToken(),this.getToken();null!==(i=this.getToken())&&"end"!==i;)if("/"===i){var h=this.getToken();o=this.readInt(),this.getToken(),s=o>0?t.getBytes(o):new Uint8Array(0),c=f.properties.privateData.lenIV,u=this.readCharStrings(s,c),this.nextChar(),"noaccess"===(i=this.getToken())&&this.getToken(),n.push({glyph:h,encoded:u})}break;case"Subrs":for(this.readInt(),this.getToken();"dup"===this.getToken();){var d=this.readInt();o=this.readInt(),this.getToken(),s=o>0?t.getBytes(o):new Uint8Array(0),c=f.properties.privateData.lenIV,u=this.readCharStrings(s,c),this.nextChar(),"noaccess"===(i=this.getToken())&&this.getToken(),r[d]=u}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":var p=this.readNumberArray();p.length>0&&p.length,0;break;case"StemSnapH":case"StemSnapV":f.properties.privateData[i]=this.readNumberArray();break;case"StdHW":case"StdVW":f.properties.privateData[i]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":case"ExpansionFactor":f.properties.privateData[i]=this.readNumber();break;case"ForceBold":f.properties.privateData[i]=this.readBoolean()}for(var g=0;g<n.length;g++){var m=n[g].glyph;u=n[g].encoded;var v=new l,y=v.convert(u,r,this.seacAnalysisEnabled),b=v.output;y&&(b=[14]);var w={glyphName:m,charstring:b,width:v.width,lsb:v.lsb,seac:v.seac};if(".notdef"===m?f.charstrings.unshift(w):f.charstrings.push(w),e.builtInEncoding){var k=e.builtInEncoding.indexOf(m);k>-1&&void 0===e.widths[k]&&k>=e.firstChar&&k<=e.lastChar&&(e.widths[k]=v.width)}}return f}},{key:"extractFontHeader",value:function(e){for(var t;null!==(t=this.getToken());)if("/"===t)switch(t=this.getToken()){case"FontMatrix":var r=this.readNumberArray();e.fontMatrix=r;break;case"Encoding":var a=this.getToken(),i=void 0;if(/^\d+$/.test(a)){i=[];var o=0|parseInt(a,10);this.getToken();for(var s=0;s<o;s++){for(t=this.getToken();"dup"!==t&&"def"!==t;)if(null===(t=this.getToken()))return;if("def"===t)break;var c=this.readInt();this.getToken();var u=this.getToken();i[c]=u,this.getToken()}}else i=(0,n.getEncoding)(a);e.builtInEncoding=i;break;case"FontBBox":var l=this.readNumberArray();e.ascent=Math.max(l[3],l[1]),e.descent=Math.min(l[1],l[3]),e.ascentScaled=!0}}}]),c}()}();t.Type1Parser=f},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getTilingPatternIR=function(e,t,r){var n=t.getArray("Matrix"),i=a.Util.normalizeRect(t.getArray("BBox")),o=t.get("XStep"),s=t.get("YStep"),c=t.get("PaintType"),u=t.get("TilingType");if(i[2]-i[0]==0||i[3]-i[1]==0)throw new a.FormatError("Invalid getTilingPatternIR /BBox array: [".concat(i,"]."));return["TilingPattern",r,e,n,i,o,s,c,u]},t.Pattern=void 0;var a=r(4),i=r(122),o=r(113),s=r(117);function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,n=p(e);if(t){var a=p(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return d(this,r)}}function d(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function v(e,t,r){return t&&m(e.prototype,t),r&&m(e,r),e}var y={FUNCTION_BASED:1,AXIAL:2,RADIAL:3,FREE_FORM_MESH:4,LATTICE_FORM_MESH:5,COONS_PATCH_MESH:6,TENSOR_PATCH_MESH:7},b=function(){function e(){g(this,e),(0,a.unreachable)("Cannot initialize Pattern.")}return v(e,null,[{key:"parseShading",value:function(e,t,r,n,i,c,u){var l=(0,o.isStream)(e)?e.dict:e,f=l.get("ShadingType");try{switch(f){case y.AXIAL:case y.RADIAL:return new k(l,t,r,n,c,u);case y.FREE_FORM_MESH:case y.LATTICE_FORM_MESH:case y.COONS_PATCH_MESH:case y.TENSOR_PATCH_MESH:return new A(e,t,r,n,c,u);default:throw new a.FormatError("Unsupported ShadingType: "+f)}}catch(e){if(e instanceof s.MissingDataException)throw e;return i.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.shadingPattern}),(0,a.warn)(e),new O}}}]),e}();t.Pattern=b;var w=function(){function e(){g(this,e),this.constructor===e&&(0,a.unreachable)("Cannot initialize BaseShading.")}return v(e,[{key:"getIR",value:function(){(0,a.unreachable)("Abstract method `getIR` called.")}}],[{key:"SMALL_NUMBER",get:function(){return(0,a.shadow)(this,"SMALL_NUMBER",1e-6)}}]),e}(),k=function(e){l(r,w);var t=h(r);function r(e,n,o,s,u,l){var f;g(this,r),(f=t.call(this)).matrix=n,f.coordsArr=e.getArray("Coords"),f.shadingType=e.get("ShadingType");var h=i.ColorSpace.parse({cs:e.getRaw("ColorSpace")||e.getRaw("CS"),xref:o,resources:s,pdfFunctionFactory:u,localColorSpaceCache:l}),p=e.getArray("BBox");Array.isArray(p)&&4===p.length?f.bbox=a.Util.normalizeRect(p):f.bbox=null;var m=0,v=1;if(e.has("Domain")){var b=e.getArray("Domain");m=b[0],v=b[1]}var k=!1,S=!1;if(e.has("Extend")){var x=e.getArray("Extend");k=x[0],S=x[1]}if(!(f.shadingType!==y.RADIAL||k&&S)){var A=c(f.coordsArr,6),O=A[0],C=A[1],T=A[2],F=A[3],_=A[4],P=A[5],I=Math.hypot(O-F,C-_);T<=P+I&&P<=T+I&&(0,a.warn)("Unsupported radial gradient.")}f.extendStart=k,f.extendEnd=S;var E=e.getRaw("Function"),j=u.createFromArray(E),R=(v-m)/10,M=f.colorStops=[];if(m>=v||R<=0)return(0,a.info)("Bad shading domain."),d(f);for(var N,B=new Float32Array(h.numComps),D=new Float32Array(1),L=0;L<=10;L++){D[0]=m+L*R,j(D,0,B,0),N=h.getRgb(B,0);var U=a.Util.makeHexColor(N[0],N[1],N[2]);M.push([L/10,U])}var q="transparent";return e.has("Background")&&(N=h.getRgb(e.get("Background"),0),q=a.Util.makeHexColor(N[0],N[1],N[2])),k||(M.unshift([0,q]),M[1][0]+=w.SMALL_NUMBER),S||(M[M.length-1][0]-=w.SMALL_NUMBER,M.push([1,q])),f.colorStops=M,f}return v(r,[{key:"getIR",value:function(){var e,t,r,n,i,o=this.coordsArr,s=this.shadingType;return s===y.AXIAL?(t=[o[0],o[1]],r=[o[2],o[3]],n=null,i=null,e="axial"):s===y.RADIAL?(t=[o[0],o[1]],r=[o[3],o[4]],n=o[2],i=o[5],e="radial"):(0,a.unreachable)("getPattern type unknown: ".concat(s)),["RadialAxial",e,this.bbox,this.colorStops,t,r,n,i,this.matrix]}}]),r}(),S=function(){function e(t,r){g(this,e),this.stream=t,this.context=r,this.buffer=0,this.bufferLength=0;var n=r.numComps;this.tmpCompsBuf=new Float32Array(n);var a=r.colorSpace.numComps;this.tmpCsCompsBuf=r.colorFn?new Float32Array(a):this.tmpCompsBuf}return v(e,[{key:"hasData",get:function(){if(this.stream.end)return this.stream.pos<this.stream.end;if(this.bufferLength>0)return!0;var e=this.stream.getByte();return!(e<0)&&(this.buffer=e,this.bufferLength=8,!0)}},{key:"readBits",value:function(e){var t=this.buffer,r=this.bufferLength;if(32===e){if(0===r)return(this.stream.getByte()<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte())>>>0;t=t<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte();var n=this.stream.getByte();return this.buffer=n&(1<<r)-1,(t<<8-r|(255&n)>>r)>>>0}if(8===e&&0===r)return this.stream.getByte();for(;r<e;)t=t<<8|this.stream.getByte(),r+=8;return r-=e,this.bufferLength=r,this.buffer=t&(1<<r)-1,t>>r}},{key:"align",value:function(){this.buffer=0,this.bufferLength=0}},{key:"readFlag",value:function(){return this.readBits(this.context.bitsPerFlag)}},{key:"readCoordinate",value:function(){var e=this.context.bitsPerCoordinate,t=this.readBits(e),r=this.readBits(e),n=this.context.decode,a=e<32?1/((1<<e)-1):2.3283064365386963e-10;return[t*a*(n[1]-n[0])+n[0],r*a*(n[3]-n[2])+n[2]]}},{key:"readComponents",value:function(){for(var e=this.context.numComps,t=this.context.bitsPerComponent,r=t<32?1/((1<<t)-1):2.3283064365386963e-10,n=this.context.decode,a=this.tmpCompsBuf,i=0,o=4;i<e;i++,o+=2){var s=this.readBits(t);a[i]=s*r*(n[o+1]-n[o])+n[o]}var c=this.tmpCsCompsBuf;return this.context.colorFn&&this.context.colorFn(a,0,c,0),this.context.colorSpace.getRgb(c,0)}}]),e}(),x=function(){var e=[];return function(t){return e[t]||(e[t]=function(e){for(var t=[],r=0;r<=e;r++){var n=r/e,a=1-n;t.push(new Float32Array([a*a*a,3*n*a*a,3*n*n*a,n*n*n]))}return t}(t)),e[t]}}(),A=function(e){l(r,w);var t=h(r);function r(e,n,s,c,u,l){var f;if(g(this,r),f=t.call(this),!(0,o.isStream)(e))throw new a.FormatError("Mesh data is not a stream");var h=e.dict;f.matrix=n,f.shadingType=h.get("ShadingType");var d=h.getArray("BBox");Array.isArray(d)&&4===d.length?f.bbox=a.Util.normalizeRect(d):f.bbox=null;var p=i.ColorSpace.parse({cs:h.getRaw("ColorSpace")||h.getRaw("CS"),xref:s,resources:c,pdfFunctionFactory:u,localColorSpaceCache:l});f.background=h.has("Background")?p.getRgb(h.get("Background"),0):null;var m=h.getRaw("Function"),v=m?u.createFromArray(m):null;f.coords=[],f.colors=[],f.figures=[];var b={bitsPerCoordinate:h.get("BitsPerCoordinate"),bitsPerComponent:h.get("BitsPerComponent"),bitsPerFlag:h.get("BitsPerFlag"),decode:h.getArray("Decode"),colorFn:v,colorSpace:p,numComps:v?1:p.numComps},w=new S(e,b),k=!1;switch(f.shadingType){case y.FREE_FORM_MESH:f._decodeType4Shading(w);break;case y.LATTICE_FORM_MESH:var x=0|h.get("VerticesPerRow");if(x<2)throw new a.FormatError("Invalid VerticesPerRow");f._decodeType5Shading(w,x);break;case y.COONS_PATCH_MESH:f._decodeType6Shading(w),k=!0;break;case y.TENSOR_PATCH_MESH:f._decodeType7Shading(w),k=!0;break;default:(0,a.unreachable)("Unsupported mesh type.")}if(k){f._updateBounds();for(var A=0,O=f.figures.length;A<O;A++)f._buildFigureFromPatch(A)}return f._updateBounds(),f._packData(),f}return v(r,[{key:"_decodeType4Shading",value:function(e){for(var t=this.coords,r=this.colors,n=[],i=[],o=0;e.hasData;){var s=e.readFlag(),c=e.readCoordinate(),u=e.readComponents();if(0===o){if(!(0<=s&&s<=2))throw new a.FormatError("Unknown type4 flag");switch(s){case 0:o=3;break;case 1:i.push(i[i.length-2],i[i.length-1]),o=1;break;case 2:i.push(i[i.length-3],i[i.length-1]),o=1}n.push(s)}i.push(t.length),t.push(c),r.push(u),o--,e.align()}this.figures.push({type:"triangles",coords:new Int32Array(i),colors:new Int32Array(i)})}},{key:"_decodeType5Shading",value:function(e,t){for(var r=this.coords,n=this.colors,a=[];e.hasData;){var i=e.readCoordinate(),o=e.readComponents();a.push(r.length),r.push(i),n.push(o)}this.figures.push({type:"lattice",coords:new Int32Array(a),colors:new Int32Array(a),verticesPerRow:t})}},{key:"_decodeType6Shading",value:function(e){for(var t=this.coords,r=this.colors,n=new Int32Array(16),i=new Int32Array(4);e.hasData;){var o=e.readFlag();if(!(0<=o&&o<=3))throw new a.FormatError("Unknown type6 flag");for(var s=t.length,c=0,u=0!==o?8:12;c<u;c++)t.push(e.readCoordinate());for(var l=r.length,f=0,h=0!==o?2:4;f<h;f++)r.push(e.readComponents());var d=void 0,p=void 0,g=void 0,m=void 0;switch(o){case 0:n[12]=s+3,n[13]=s+4,n[14]=s+5,n[15]=s+6,n[8]=s+2,n[11]=s+7,n[4]=s+1,n[7]=s+8,n[0]=s,n[1]=s+11,n[2]=s+10,n[3]=s+9,i[2]=l+1,i[3]=l+2,i[0]=l,i[1]=l+3;break;case 1:d=n[12],p=n[13],g=n[14],m=n[15],n[12]=m,n[13]=s+0,n[14]=s+1,n[15]=s+2,n[8]=g,n[11]=s+3,n[4]=p,n[7]=s+4,n[0]=d,n[1]=s+7,n[2]=s+6,n[3]=s+5,d=i[2],p=i[3],i[2]=p,i[3]=l,i[0]=d,i[1]=l+1;break;case 2:d=n[15],p=n[11],n[12]=n[3],n[13]=s+0,n[14]=s+1,n[15]=s+2,n[8]=n[7],n[11]=s+3,n[4]=p,n[7]=s+4,n[0]=d,n[1]=s+7,n[2]=s+6,n[3]=s+5,d=i[3],i[2]=i[1],i[3]=l,i[0]=d,i[1]=l+1;break;case 3:n[12]=n[0],n[13]=s+0,n[14]=s+1,n[15]=s+2,n[8]=n[1],n[11]=s+3,n[4]=n[2],n[7]=s+4,n[0]=n[3],n[1]=s+7,n[2]=s+6,n[3]=s+5,i[2]=i[0],i[3]=l,i[0]=i[1],i[1]=l+1}n[5]=t.length,t.push([(-4*t[n[0]][0]-t[n[15]][0]+6*(t[n[4]][0]+t[n[1]][0])-2*(t[n[12]][0]+t[n[3]][0])+3*(t[n[13]][0]+t[n[7]][0]))/9,(-4*t[n[0]][1]-t[n[15]][1]+6*(t[n[4]][1]+t[n[1]][1])-2*(t[n[12]][1]+t[n[3]][1])+3*(t[n[13]][1]+t[n[7]][1]))/9]),n[6]=t.length,t.push([(-4*t[n[3]][0]-t[n[12]][0]+6*(t[n[2]][0]+t[n[7]][0])-2*(t[n[0]][0]+t[n[15]][0])+3*(t[n[4]][0]+t[n[14]][0]))/9,(-4*t[n[3]][1]-t[n[12]][1]+6*(t[n[2]][1]+t[n[7]][1])-2*(t[n[0]][1]+t[n[15]][1])+3*(t[n[4]][1]+t[n[14]][1]))/9]),n[9]=t.length,t.push([(-4*t[n[12]][0]-t[n[3]][0]+6*(t[n[8]][0]+t[n[13]][0])-2*(t[n[0]][0]+t[n[15]][0])+3*(t[n[11]][0]+t[n[1]][0]))/9,(-4*t[n[12]][1]-t[n[3]][1]+6*(t[n[8]][1]+t[n[13]][1])-2*(t[n[0]][1]+t[n[15]][1])+3*(t[n[11]][1]+t[n[1]][1]))/9]),n[10]=t.length,t.push([(-4*t[n[15]][0]-t[n[0]][0]+6*(t[n[11]][0]+t[n[14]][0])-2*(t[n[12]][0]+t[n[3]][0])+3*(t[n[2]][0]+t[n[8]][0]))/9,(-4*t[n[15]][1]-t[n[0]][1]+6*(t[n[11]][1]+t[n[14]][1])-2*(t[n[12]][1]+t[n[3]][1])+3*(t[n[2]][1]+t[n[8]][1]))/9]),this.figures.push({type:"patch",coords:new Int32Array(n),colors:new Int32Array(i)})}}},{key:"_decodeType7Shading",value:function(e){for(var t=this.coords,r=this.colors,n=new Int32Array(16),i=new Int32Array(4);e.hasData;){var o=e.readFlag();if(!(0<=o&&o<=3))throw new a.FormatError("Unknown type7 flag");for(var s=t.length,c=0,u=0!==o?12:16;c<u;c++)t.push(e.readCoordinate());for(var l=r.length,f=0,h=0!==o?2:4;f<h;f++)r.push(e.readComponents());var d=void 0,p=void 0,g=void 0,m=void 0;switch(o){case 0:n[12]=s+3,n[13]=s+4,n[14]=s+5,n[15]=s+6,n[8]=s+2,n[9]=s+13,n[10]=s+14,n[11]=s+7,n[4]=s+1,n[5]=s+12,n[6]=s+15,n[7]=s+8,n[0]=s,n[1]=s+11,n[2]=s+10,n[3]=s+9,i[2]=l+1,i[3]=l+2,i[0]=l,i[1]=l+3;break;case 1:d=n[12],p=n[13],g=n[14],m=n[15],n[12]=m,n[13]=s+0,n[14]=s+1,n[15]=s+2,n[8]=g,n[9]=s+9,n[10]=s+10,n[11]=s+3,n[4]=p,n[5]=s+8,n[6]=s+11,n[7]=s+4,n[0]=d,n[1]=s+7,n[2]=s+6,n[3]=s+5,d=i[2],p=i[3],i[2]=p,i[3]=l,i[0]=d,i[1]=l+1;break;case 2:d=n[15],p=n[11],n[12]=n[3],n[13]=s+0,n[14]=s+1,n[15]=s+2,n[8]=n[7],n[9]=s+9,n[10]=s+10,n[11]=s+3,n[4]=p,n[5]=s+8,n[6]=s+11,n[7]=s+4,n[0]=d,n[1]=s+7,n[2]=s+6,n[3]=s+5,d=i[3],i[2]=i[1],i[3]=l,i[0]=d,i[1]=l+1;break;case 3:n[12]=n[0],n[13]=s+0,n[14]=s+1,n[15]=s+2,n[8]=n[1],n[9]=s+9,n[10]=s+10,n[11]=s+3,n[4]=n[2],n[5]=s+8,n[6]=s+11,n[7]=s+4,n[0]=n[3],n[1]=s+7,n[2]=s+6,n[3]=s+5,i[2]=i[0],i[3]=l,i[0]=i[1],i[1]=l+1}this.figures.push({type:"patch",coords:new Int32Array(n),colors:new Int32Array(i)})}}},{key:"_buildFigureFromPatch",value:function(e){var t=this.figures[e];(0,a.assert)("patch"===t.type,"Unexpected patch mesh figure");var n=this.coords,i=this.colors,o=t.coords,s=t.colors,c=Math.min(n[o[0]][0],n[o[3]][0],n[o[12]][0],n[o[15]][0]),u=Math.min(n[o[0]][1],n[o[3]][1],n[o[12]][1],n[o[15]][1]),l=Math.max(n[o[0]][0],n[o[3]][0],n[o[12]][0],n[o[15]][0]),f=Math.max(n[o[0]][1],n[o[3]][1],n[o[12]][1],n[o[15]][1]),h=Math.ceil((l-c)*r.TRIANGLE_DENSITY/(this.bounds[2]-this.bounds[0]));h=Math.max(r.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,Math.min(r.MAX_SPLIT_PATCH_CHUNKS_AMOUNT,h));var d=Math.ceil((f-u)*r.TRIANGLE_DENSITY/(this.bounds[3]-this.bounds[1]));d=Math.max(r.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,Math.min(r.MAX_SPLIT_PATCH_CHUNKS_AMOUNT,d));for(var p=h+1,g=new Int32Array((d+1)*p),m=new Int32Array((d+1)*p),v=0,y=new Uint8Array(3),b=new Uint8Array(3),w=i[s[0]],k=i[s[1]],S=i[s[2]],A=i[s[3]],O=x(d),C=x(h),T=0;T<=d;T++){y[0]=(w[0]*(d-T)+S[0]*T)/d|0,y[1]=(w[1]*(d-T)+S[1]*T)/d|0,y[2]=(w[2]*(d-T)+S[2]*T)/d|0,b[0]=(k[0]*(d-T)+A[0]*T)/d|0,b[1]=(k[1]*(d-T)+A[1]*T)/d|0,b[2]=(k[2]*(d-T)+A[2]*T)/d|0;for(var F=0;F<=h;F++,v++)if(0!==T&&T!==d||0!==F&&F!==h){for(var _=0,P=0,I=0,E=0;E<=3;E++)for(var j=0;j<=3;j++,I++){var R=O[T][E]*C[F][j];_+=n[o[I]][0]*R,P+=n[o[I]][1]*R}g[v]=n.length,n.push([_,P]),m[v]=i.length;var M=new Uint8Array(3);M[0]=(y[0]*(h-F)+b[0]*F)/h|0,M[1]=(y[1]*(h-F)+b[1]*F)/h|0,M[2]=(y[2]*(h-F)+b[2]*F)/h|0,i.push(M)}}g[0]=o[0],m[0]=s[0],g[h]=o[3],m[h]=s[1],g[p*d]=o[12],m[p*d]=s[2],g[p*d+h]=o[15],m[p*d+h]=s[3],this.figures[e]={type:"lattice",coords:g,colors:m,verticesPerRow:p}}},{key:"_updateBounds",value:function(){for(var e=this.coords[0][0],t=this.coords[0][1],r=e,n=t,a=1,i=this.coords.length;a<i;a++){var o=this.coords[a][0],s=this.coords[a][1];e=e>o?o:e,t=t>s?s:t,r=r<o?o:r,n=n<s?s:n}this.bounds=[e,t,r,n]}},{key:"_packData",value:function(){var e,t,r,n,a=this.coords,i=new Float32Array(2*a.length);for(e=0,r=0,t=a.length;e<t;e++){var o=a[e];i[r++]=o[0],i[r++]=o[1]}this.coords=i;var s=this.colors,c=new Uint8Array(3*s.length);for(e=0,r=0,t=s.length;e<t;e++){var u=s[e];c[r++]=u[0],c[r++]=u[1],c[r++]=u[2]}this.colors=c;var l=this.figures;for(e=0,t=l.length;e<t;e++){var f=l[e],h=f.coords,d=f.colors;for(r=0,n=h.length;r<n;r++)h[r]*=2,d[r]*=3}}},{key:"getIR",value:function(){return["Mesh",this.shadingType,this.coords,this.colors,this.figures,this.bounds,this.matrix,this.bbox,this.background]}}],[{key:"MIN_SPLIT_PATCH_CHUNKS_AMOUNT",get:function(){return(0,a.shadow)(this,"MIN_SPLIT_PATCH_CHUNKS_AMOUNT",3)}},{key:"MAX_SPLIT_PATCH_CHUNKS_AMOUNT",get:function(){return(0,a.shadow)(this,"MAX_SPLIT_PATCH_CHUNKS_AMOUNT",20)}},{key:"TRIANGLE_DENSITY",get:function(){return(0,a.shadow)(this,"TRIANGLE_DENSITY",20)}}]),r}(),O=function(e){l(r,w);var t=h(r);function r(){return g(this,r),t.apply(this,arguments)}return v(r,[{key:"getIR",value:function(){return["Dummy"]}}]),r}()},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPDFFunction=function(e){var t;if("object"!==f(e))return!1;if((0,n.isDict)(e))t=e;else{if(!(0,n.isStream)(e))return!1;t=e.dict}return t.has("FunctionType")},t.PostScriptEvaluator=t.PostScriptCompiler=t.PDFFunctionFactory=void 0;var n=r(113),a=r(4),i=r(158),o=r(159);function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,n=l(e);if(t){var a=l(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),e}var g=function(){function e(t){var r=t.xref,n=t.isEvalSupported,a=void 0===n||n;h(this,e),this.xref=r,this.isEvalSupported=!1!==a}return p(e,[{key:"create",value:function(e){var t=this.getCached(e);if(t)return t;var r=v.parse({xref:this.xref,isEvalSupported:this.isEvalSupported,fn:e instanceof n.Ref?this.xref.fetch(e):e});return this._cache(e,r),r}},{key:"createFromArray",value:function(e){var t=this.getCached(e);if(t)return t;var r=v.parseArray({xref:this.xref,isEvalSupported:this.isEvalSupported,fnObj:e instanceof n.Ref?this.xref.fetch(e):e});return this._cache(e,r),r}},{key:"getCached",value:function(e){var t;if(e instanceof n.Ref?t=e:e instanceof n.Dict?t=e.objId:(0,n.isStream)(e)&&(t=e.dict&&e.dict.objId),t){var r=this._localFunctionCache.getByRef(t);if(r)return r}return null}},{key:"_cache",value:function(e,t){if(!t)throw new Error('PDFFunctionFactory._cache - expected "parsedFunction" argument.');var r;e instanceof n.Ref?r=e:e instanceof n.Dict?r=e.objId:(0,n.isStream)(e)&&(r=e.dict&&e.dict.objId),r&&this._localFunctionCache.set(null,r,t)}},{key:"_localFunctionCache",get:function(){return(0,a.shadow)(this,"_localFunctionCache",new o.LocalFunctionCache)}}]),e}();function m(e){if(!Array.isArray(e))return null;for(var t=e.length,r=0;r<t;r++)if("number"!=typeof e[r]){for(var n=new Array(t),a=0;a<t;a++)n[a]=+e[a];return n}return e}t.PDFFunctionFactory=g;var v={getSampleArray:function(e,t,r,n){var a,i,o=1;for(a=0,i=e.length;a<i;a++)o*=e[a];o*=t;var s=new Array(o),c=0,u=0,l=1/(Math.pow(2,r)-1),f=n.getBytes((o*r+7)/8),h=0;for(a=0;a<o;a++){for(;c<r;)u<<=8,u|=f[h++],c+=8;c-=r,s[a]=(u>>c)*l,u&=(1<<c)-1}return s},getIR:function(e){var t=e.xref,r=e.isEvalSupported,n=e.fn,i=n.dict;i||(i=n);var o=[this.constructSampled,null,this.constructInterpolated,this.constructStiched,this.constructPostScript][i.get("FunctionType")];if(!o)throw new a.FormatError("Unknown type of function");return o.call(this,{xref:t,isEvalSupported:r,fn:n,dict:i})},fromIR:function(e){var t=e.xref,r=e.isEvalSupported,n=e.IR;switch(n[0]){case 0:return this.constructSampledFromIR({xref:t,isEvalSupported:r,IR:n});case 2:return this.constructInterpolatedFromIR({xref:t,isEvalSupported:r,IR:n});case 3:return this.constructStichedFromIR({xref:t,isEvalSupported:r,IR:n});default:return this.constructPostScriptFromIR({xref:t,isEvalSupported:r,IR:n})}},parse:function(e){var t=e.xref,r=e.isEvalSupported,n=e.fn,a=this.getIR({xref:t,isEvalSupported:r,fn:n});return this.fromIR({xref:t,isEvalSupported:r,IR:a})},parseArray:function(e){var t=e.xref,r=e.isEvalSupported,n=e.fnObj;if(!Array.isArray(n))return this.parse({xref:t,isEvalSupported:r,fn:n});for(var a=[],i=0,o=n.length;i<o;i++)a.push(this.parse({xref:t,isEvalSupported:r,fn:t.fetchIfRef(n[i])}));return function(e,t,r,n){for(var i=0,o=a.length;i<o;i++)a[i](e,t,r,n+i)}},constructSampled:function(e){e.xref,e.isEvalSupported;var t=e.fn,r=e.dict;function n(e){for(var t=e.length,r=[],n=0,a=0;a<t;a+=2)r[n]=[e[a],e[a+1]],++n;return r}var i=m(r.getArray("Domain")),o=m(r.getArray("Range"));if(!i||!o)throw new a.FormatError("No domain or range");var s=i.length/2,c=o.length/2;i=n(i),o=n(o);var u=m(r.getArray("Size")),l=r.get("BitsPerSample"),f=r.get("Order")||1;1!==f&&(0,a.info)("No support for cubic spline interpolation: "+f);var h=m(r.getArray("Encode"));if(h)h=n(h);else{h=[];for(var d=0;d<s;++d)h.push([0,u[d]-1])}var p=m(r.getArray("Decode"));return[0,s,i,h,p=p?n(p):o,this.getSampleArray(u,c,l,t),u,c,Math.pow(2,l)-1,o]},constructSampledFromIR:function(e){e.xref,e.isEvalSupported;var t=e.IR;function r(e,t,r,n,a){return n+(a-n)/(r-t)*(e-t)}return function(e,n,a,i){var o,s,c=t[1],u=t[2],l=t[3],f=t[4],h=t[5],d=t[6],p=t[7],g=t[9],m=1<<c,v=new Float64Array(m),y=new Uint32Array(m);for(s=0;s<m;s++)v[s]=1;var b=p,w=1;for(o=0;o<c;++o){var k=u[o][0],S=u[o][1],x=r(Math.min(Math.max(e[n+o],k),S),k,S,l[o][0],l[o][1]),A=d[o],O=(x=Math.min(Math.max(x,0),A-1))<A-1?Math.floor(x):x-1,C=O+1-x,T=x-O,F=O*b,_=F+b;for(s=0;s<m;s++)s&w?(v[s]*=T,y[s]+=_):(v[s]*=C,y[s]+=F);b*=A,w<<=1}for(s=0;s<p;++s){var P=0;for(o=0;o<m;o++)P+=h[y[o]+s]*v[o];P=r(P,0,1,f[s][0],f[s][1]),a[i+s]=Math.min(Math.max(P,g[s][0]),g[s][1])}}},constructInterpolated:function(e){e.xref,e.isEvalSupported,e.fn;for(var t=e.dict,r=m(t.getArray("C0"))||[0],n=m(t.getArray("C1"))||[1],a=t.get("N"),i=r.length,o=[],s=0;s<i;++s)o.push(n[s]-r[s]);return[2,r,o,a]},constructInterpolatedFromIR:function(e){e.xref,e.isEvalSupported;var t=e.IR,r=t[1],n=t[2],a=t[3],i=n.length;return function(e,t,o,s){for(var c=1===a?e[t]:Math.pow(e[t],a),u=0;u<i;++u)o[s+u]=r[u]+c*n[u]}},constructStiched:function(e){var t=e.xref,r=e.isEvalSupported,n=(e.fn,e.dict),i=m(n.getArray("Domain"));if(!i)throw new a.FormatError("No domain");if(1!=i.length/2)throw new a.FormatError("Bad domain for stiched function");for(var o=n.get("Functions"),s=[],c=0,u=o.length;c<u;++c)s.push(this.parse({xref:t,isEvalSupported:r,fn:t.fetchIfRef(o[c])}));return[3,i,m(n.getArray("Bounds")),m(n.getArray("Encode")),s]},constructStichedFromIR:function(e){e.xref,e.isEvalSupported;var t=e.IR,r=t[1],n=t[2],a=t[3],i=t[4],o=new Float32Array(1);return function(e,t,s,c){var u,l=function(e,t,r){return e>r?e=r:e<t&&(e=t),e}(e[t],r[0],r[1]),f=n.length;for(u=0;u<f&&!(l<n[u]);++u);var h=r[0];u>0&&(h=n[u-1]);var d=r[1];u<n.length&&(d=n[u]);var p=a[2*u],g=a[2*u+1];o[0]=h===d?p:p+(l-h)*(g-p)/(d-h),i[u](o,0,s,c)}},constructPostScript:function(e){e.xref,e.isEvalSupported;var t=e.fn,r=e.dict,n=m(r.getArray("Domain")),o=m(r.getArray("Range"));if(!n)throw new a.FormatError("No domain.");if(!o)throw new a.FormatError("No range.");var s=new i.PostScriptLexer(t);return[4,n,o,new i.PostScriptParser(s).parse()]},constructPostScriptFromIR:function(e){e.xref;var t=e.isEvalSupported,r=e.IR,n=r[1],i=r[2],o=r[3];if(t&&a.IsEvalSupportedCached.value){var s=(new w).compile(o,n,i);if(s)return new Function("src","srcOffset","dest","destOffset",s)}(0,a.info)("Unable to compile PS function");var c=i.length>>1,u=n.length>>1,l=new b(o),f=Object.create(null),h=8192,d=new Float32Array(u);return function(e,t,r,n){var a,o,s="",p=d;for(a=0;a<u;a++)o=e[t+a],p[a]=o,s+=o+"_";var g=f[s];if(void 0===g){var m=new Float32Array(c),v=l.execute(p),y=v.length-c;for(a=0;a<c;a++){o=v[y+a];var b=i[2*a];o<b?o=b:o>(b=i[2*a+1])&&(o=b),m[a]=o}h>0&&(h--,f[s]=m),r.set(m,n)}else r.set(g,n)}}};var y=function(){function e(t){h(this,e),this.stack=t?Array.prototype.slice.call(t,0):[]}return p(e,[{key:"push",value:function(e){if(this.stack.length>=100)throw new Error("PostScript function stack overflow.");this.stack.push(e)}},{key:"pop",value:function(){if(this.stack.length<=0)throw new Error("PostScript function stack underflow.");return this.stack.pop()}},{key:"copy",value:function(e){if(this.stack.length+e>=100)throw new Error("PostScript function stack overflow.");for(var t=this.stack,r=t.length-e,n=e-1;n>=0;n--,r++)t.push(t[r])}},{key:"index",value:function(e){this.push(this.stack[this.stack.length-e-1])}},{key:"roll",value:function(e,t){for(var r=this.stack,n=r.length-e,a=r.length-1,i=n+(t-Math.floor(t/e)*e),o=n,s=a;o<s;o++,s--){var c=r[o];r[o]=r[s],r[s]=c}for(var u=n,l=i-1;u<l;u++,l--){var f=r[u];r[u]=r[l],r[l]=f}for(var h=i,d=a;h<d;h++,d--){var p=r[h];r[h]=r[d],r[d]=p}}}]),e}(),b=function(){function e(t){h(this,e),this.operators=t}return p(e,[{key:"execute",value:function(e){for(var t,r,n,i=new y(e),o=0,s=this.operators,c=s.length;o<c;)if("number"!=typeof(t=s[o++]))switch(t){case"jz":n=i.pop(),(r=i.pop())||(o=n);break;case"j":o=r=i.pop();break;case"abs":r=i.pop(),i.push(Math.abs(r));break;case"add":n=i.pop(),r=i.pop(),i.push(r+n);break;case"and":n=i.pop(),r=i.pop(),(0,a.isBool)(r)&&(0,a.isBool)(n)?i.push(r&&n):i.push(r&n);break;case"atan":r=i.pop(),i.push(Math.atan(r));break;case"bitshift":n=i.pop(),(r=i.pop())>0?i.push(r<<n):i.push(r>>n);break;case"ceiling":r=i.pop(),i.push(Math.ceil(r));break;case"copy":r=i.pop(),i.copy(r);break;case"cos":r=i.pop(),i.push(Math.cos(r));break;case"cvi":r=0|i.pop(),i.push(r);break;case"cvr":break;case"div":n=i.pop(),r=i.pop(),i.push(r/n);break;case"dup":i.copy(1);break;case"eq":n=i.pop(),r=i.pop(),i.push(r===n);break;case"exch":i.roll(2,1);break;case"exp":n=i.pop(),r=i.pop(),i.push(Math.pow(r,n));break;case"false":i.push(!1);break;case"floor":r=i.pop(),i.push(Math.floor(r));break;case"ge":n=i.pop(),r=i.pop(),i.push(r>=n);break;case"gt":n=i.pop(),r=i.pop(),i.push(r>n);break;case"idiv":n=i.pop(),r=i.pop(),i.push(r/n|0);break;case"index":r=i.pop(),i.index(r);break;case"le":n=i.pop(),r=i.pop(),i.push(r<=n);break;case"ln":r=i.pop(),i.push(Math.log(r));break;case"log":r=i.pop(),i.push(Math.log(r)/Math.LN10);break;case"lt":n=i.pop(),r=i.pop(),i.push(r<n);break;case"mod":n=i.pop(),r=i.pop(),i.push(r%n);break;case"mul":n=i.pop(),r=i.pop(),i.push(r*n);break;case"ne":n=i.pop(),r=i.pop(),i.push(r!==n);break;case"neg":r=i.pop(),i.push(-r);break;case"not":r=i.pop(),(0,a.isBool)(r)?i.push(!r):i.push(~r);break;case"or":n=i.pop(),r=i.pop(),(0,a.isBool)(r)&&(0,a.isBool)(n)?i.push(r||n):i.push(r|n);break;case"pop":i.pop();break;case"roll":n=i.pop(),r=i.pop(),i.roll(r,n);break;case"round":r=i.pop(),i.push(Math.round(r));break;case"sin":r=i.pop(),i.push(Math.sin(r));break;case"sqrt":r=i.pop(),i.push(Math.sqrt(r));break;case"sub":n=i.pop(),r=i.pop(),i.push(r-n);break;case"true":i.push(!0);break;case"truncate":r=(r=i.pop())<0?Math.ceil(r):Math.floor(r),i.push(r);break;case"xor":n=i.pop(),r=i.pop(),(0,a.isBool)(r)&&(0,a.isBool)(n)?i.push(r!==n):i.push(r^n);break;default:throw new a.FormatError("Unknown operator ".concat(t))}else i.push(t);return i.stack}}]),e}();t.PostScriptEvaluator=b;var w=function(){var e=function(){function e(t){h(this,e),this.type=t}return p(e,[{key:"visit",value:function(e){(0,a.unreachable)("abstract method")}}]),e}(),t=function(t){s(n,e);var r=u(n);function n(e,t,a){var i;return h(this,n),(i=r.call(this,"args")).index=e,i.min=t,i.max=a,i}return p(n,[{key:"visit",value:function(e){e.visitArgument(this)}}]),n}(),r=function(t){s(n,e);var r=u(n);function n(e){var t;return h(this,n),(t=r.call(this,"literal")).number=e,t.min=e,t.max=e,t}return p(n,[{key:"visit",value:function(e){e.visitLiteral(this)}}]),n}(),n=function(t){s(n,e);var r=u(n);function n(e,t,a,i,o){var s;return h(this,n),(s=r.call(this,"binary")).op=e,s.arg1=t,s.arg2=a,s.min=i,s.max=o,s}return p(n,[{key:"visit",value:function(e){e.visitBinaryOperation(this)}}]),n}(),i=function(t){s(n,e);var r=u(n);function n(e,t){var a;return h(this,n),(a=r.call(this,"max")).arg=e,a.min=e.min,a.max=t,a}return p(n,[{key:"visit",value:function(e){e.visitMin(this)}}]),n}(),o=function(t){s(n,e);var r=u(n);function n(e,t,a){var i;return h(this,n),(i=r.call(this,"var")).index=e,i.min=t,i.max=a,i}return p(n,[{key:"visit",value:function(e){e.visitVariable(this)}}]),n}(),c=function(t){s(n,e);var r=u(n);function n(e,t){var a;return h(this,n),(a=r.call(this,"definition")).variable=e,a.arg=t,a}return p(n,[{key:"visit",value:function(e){e.visitVariableDefinition(this)}}]),n}(),l=function(){function e(){h(this,e),this.parts=[]}return p(e,[{key:"visitArgument",value:function(e){this.parts.push("Math.max(",e.min,", Math.min(",e.max,", src[srcOffset + ",e.index,"]))")}},{key:"visitVariable",value:function(e){this.parts.push("v",e.index)}},{key:"visitLiteral",value:function(e){this.parts.push(e.number)}},{key:"visitBinaryOperation",value:function(e){this.parts.push("("),e.arg1.visit(this),this.parts.push(" ",e.op," "),e.arg2.visit(this),this.parts.push(")")}},{key:"visitVariableDefinition",value:function(e){this.parts.push("var "),e.variable.visit(this),this.parts.push(" = "),e.arg.visit(this),this.parts.push(";")}},{key:"visitMin",value:function(e){this.parts.push("Math.min("),e.arg.visit(this),this.parts.push(", ",e.max,")")}},{key:"toString",value:function(){return this.parts.join("")}}]),e}();function f(e,t){return"literal"===t.type&&0===t.number?e:"literal"===e.type&&0===e.number?t:"literal"===t.type&&"literal"===e.type?new r(e.number+t.number):new n("+",e,t,e.min+t.min,e.max+t.max)}function d(e,t){if("literal"===t.type){if(0===t.number)return new r(0);if(1===t.number)return e;if("literal"===e.type)return new r(e.number*t.number)}if("literal"===e.type){if(0===e.number)return new r(0);if(1===e.number)return t}var a=Math.min(e.min*t.min,e.min*t.max,e.max*t.min,e.max*t.max),i=Math.max(e.min*t.min,e.min*t.max,e.max*t.min,e.max*t.max);return new n("*",e,t,a,i)}function g(e,t){if("literal"===t.type){if(0===t.number)return e;if("literal"===e.type)return new r(e.number-t.number)}return"binary"===t.type&&"-"===t.op&&"literal"===e.type&&1===e.number&&"literal"===t.arg1.type&&1===t.arg1.number?t.arg2:new n("-",e,t,e.min-t.max,e.max-t.min)}function m(e,t){return e.min>=t?new r(t):e.max<=t?e:new i(e,t)}return function(){function e(){h(this,e)}return p(e,[{key:"compile",value:function(e,n,a){for(var i,s,u,h,p,v,y,b,w=[],k=[],S=n.length>>1,x=a.length>>1,A=0,O=0;O<S;O++)w.push(new t(O,n[2*O],n[2*O+1]));for(var C=0,T=e.length;C<T;C++)if("number"!=typeof(b=e[C]))switch(b){case"add":if(w.length<2)return null;h=w.pop(),u=w.pop(),w.push(f(u,h));break;case"cvr":if(w.length<1)return null;break;case"mul":if(w.length<2)return null;h=w.pop(),u=w.pop(),w.push(d(u,h));break;case"sub":if(w.length<2)return null;h=w.pop(),u=w.pop(),w.push(g(u,h));break;case"exch":if(w.length<2)return null;p=w.pop(),v=w.pop(),w.push(p,v);break;case"pop":if(w.length<1)return null;w.pop();break;case"index":if(w.length<1)return null;if("literal"!==(u=w.pop()).type)return null;if((i=u.number)<0||!Number.isInteger(i)||w.length<i)return null;if("literal"===(p=w[w.length-i-1]).type||"var"===p.type){w.push(p);break}y=new o(A++,p.min,p.max),w[w.length-i-1]=y,w.push(y),k.push(new c(y,p));break;case"dup":if(w.length<1)return null;if("number"==typeof e[C+1]&&"gt"===e[C+2]&&e[C+3]===C+7&&"jz"===e[C+4]&&"pop"===e[C+5]&&e[C+6]===e[C+1]){u=w.pop(),w.push(m(u,e[C+1])),C+=6;break}if("literal"===(p=w[w.length-1]).type||"var"===p.type){w.push(p);break}y=new o(A++,p.min,p.max),w[w.length-1]=y,w.push(y),k.push(new c(y,p));break;case"roll":if(w.length<2)return null;if(h=w.pop(),u=w.pop(),"literal"!==h.type||"literal"!==u.type)return null;if(s=h.number,(i=u.number)<=0||!Number.isInteger(i)||!Number.isInteger(s)||w.length<i)return null;if(0===(s=(s%i+i)%i))break;Array.prototype.push.apply(w,w.splice(w.length-i,i-s));break;default:return null}else w.push(new r(b));if(w.length!==x)return null;for(var F=[],_=0,P=k;_<P.length;_++){var I=P[_],E=new l;I.visit(E),F.push(E.toString())}for(var j=0,R=w.length;j<R;j++){var M=w[j],N=new l;M.visit(N);var B=a[2*j],D=a[2*j+1],L=[N.toString()];B>M.min&&(L.unshift("Math.max(",B,", "),L.push(")")),D<M.max&&(L.unshift("Math.min(",D,", "),L.push(")")),L.unshift("dest[destOffset + ",j,"] = "),L.push(";"),F.push(L.join(""))}return F.join("\n")}}]),e}()}();t.PostScriptCompiler=w},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PostScriptParser=t.PostScriptLexer=void 0;var n=r(4),a=r(113),i=r(117);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),e}var u=function(){function e(t){o(this,e),this.lexer=t,this.operators=[],this.token=null,this.prev=null}return c(e,[{key:"nextToken",value:function(){this.prev=this.token,this.token=this.lexer.getToken()}},{key:"accept",value:function(e){return this.token.type===e&&(this.nextToken(),!0)}},{key:"expect",value:function(e){if(this.accept(e))return!0;throw new n.FormatError("Unexpected symbol: found ".concat(this.token.type," expected ").concat(e,"."))}},{key:"parse",value:function(){return this.nextToken(),this.expect(l.LBRACE),this.parseBlock(),this.expect(l.RBRACE),this.operators}},{key:"parseBlock",value:function(){for(;;)if(this.accept(l.NUMBER))this.operators.push(this.prev.value);else if(this.accept(l.OPERATOR))this.operators.push(this.prev.value);else{if(!this.accept(l.LBRACE))return;this.parseCondition()}}},{key:"parseCondition",value:function(){var e=this.operators.length;if(this.operators.push(null,null),this.parseBlock(),this.expect(l.RBRACE),this.accept(l.IF))this.operators[e]=this.operators.length,this.operators[e+1]="jz";else{if(!this.accept(l.LBRACE))throw new n.FormatError("PS Function: error parsing conditional.");var t=this.operators.length;this.operators.push(null,null);var r=this.operators.length;this.parseBlock(),this.expect(l.RBRACE),this.expect(l.IFELSE),this.operators[t]=this.operators.length,this.operators[t+1]="j",this.operators[e]=r,this.operators[e+1]="jz"}}}]),e}();t.PostScriptParser=u;var l={LBRACE:0,RBRACE:1,NUMBER:2,OPERATOR:3,IF:4,IFELSE:5},f=function(){var e=Object.create(null);return function(){function t(e,r){o(this,t),this.type=e,this.value=r}return c(t,null,[{key:"getOperator",value:function(r){var n=e[r];return n||(e[r]=new t(l.OPERATOR,r))}},{key:"LBRACE",get:function(){return(0,n.shadow)(this,"LBRACE",new t(l.LBRACE,"{"))}},{key:"RBRACE",get:function(){return(0,n.shadow)(this,"RBRACE",new t(l.RBRACE,"}"))}},{key:"IF",get:function(){return(0,n.shadow)(this,"IF",new t(l.IF,"IF"))}},{key:"IFELSE",get:function(){return(0,n.shadow)(this,"IFELSE",new t(l.IFELSE,"IFELSE"))}}]),t}()}(),h=function(){function e(t){o(this,e),this.stream=t,this.nextChar(),this.strBuf=[]}return c(e,[{key:"nextChar",value:function(){return this.currentChar=this.stream.getByte()}},{key:"getToken",value:function(){for(var e=!1,t=this.currentChar;;){if(t<0)return a.EOF;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!(0,i.isWhiteSpace)(t))break;t=this.nextChar()}switch(0|t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return new f(l.NUMBER,this.getNumber());case 123:return this.nextChar(),f.LBRACE;case 125:return this.nextChar(),f.RBRACE}var r=this.strBuf;for(r.length=0,r[0]=String.fromCharCode(t);(t=this.nextChar())>=0&&(t>=65&&t<=90||t>=97&&t<=122);)r.push(String.fromCharCode(t));var n=r.join("");switch(n.toLowerCase()){case"if":return f.IF;case"ifelse":return f.IFELSE;default:return f.getOperator(n)}}},{key:"getNumber",value:function(){var e=this.currentChar,t=this.strBuf;for(t.length=0,t[0]=String.fromCharCode(e);(e=this.nextChar())>=0&&(e>=48&&e<=57||45===e||46===e);)t.push(String.fromCharCode(e));var r=parseFloat(t.join(""));if(isNaN(r))throw new n.FormatError("Invalid floating point number: ".concat(r));return r}}]),e}();t.PostScriptLexer=h},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.LocalTilingPatternCache=t.LocalImageCache=t.LocalGStateCache=t.LocalFunctionCache=t.LocalColorSpaceCache=t.GlobalImageCache=void 0;var a=r(4),i=r(113);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=u(e);if(t){var i=u(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),e}var d=function(){function e(t){l(this,e),this.constructor===e&&(0,a.unreachable)("Cannot initialize BaseLocalCache."),t&&t.onlyRefs||(this._nameRefMap=new Map,this._imageMap=new Map),this._imageCache=new i.RefSetCache}return h(e,[{key:"getByName",value:function(e){var t=this._nameRefMap.get(e);return t?this.getByRef(t):this._imageMap.get(e)||null}},{key:"getByRef",value:function(e){return this._imageCache.get(e)||null}},{key:"set",value:function(e,t,r){(0,a.unreachable)("Abstract method `set` called.")}}]),e}(),p=function(e){o(r,d);var t=c(r);function r(){return l(this,r),t.apply(this,arguments)}return h(r,[{key:"set",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0;if(!e)throw new Error('LocalImageCache.set - expected "name" argument.');if(t){if(this._imageCache.has(t))return;return this._nameRefMap.set(e,t),void this._imageCache.put(t,r)}this._imageMap.has(e)||this._imageMap.set(e,r)}}]),r}();t.LocalImageCache=p;var g=function(e){o(r,d);var t=c(r);function r(){return l(this,r),t.apply(this,arguments)}return h(r,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0;if(!e&&!t)throw new Error('LocalColorSpaceCache.set - expected "name" and/or "ref" argument.');if(t){if(this._imageCache.has(t))return;return e&&this._nameRefMap.set(e,t),void this._imageCache.put(t,r)}this._imageMap.has(e)||this._imageMap.set(e,r)}}]),r}();t.LocalColorSpaceCache=g;var m=function(e){o(r,d);var t=c(r);function r(e){return l(this,r),t.call(this,{onlyRefs:!0})}return h(r,[{key:"getByName",value:function(e){(0,a.unreachable)("Should not call `getByName` method.")}},{key:"set",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0;if(!e)throw new Error('LocalFunctionCache.set - expected "ref" argument.');this._imageCache.has(e)||this._imageCache.put(e,t)}}]),r}();t.LocalFunctionCache=m;var v=function(e){o(r,d);var t=c(r);function r(){return l(this,r),t.apply(this,arguments)}return h(r,[{key:"set",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0;if(!e)throw new Error('LocalGStateCache.set - expected "name" argument.');if(t){if(this._imageCache.has(t))return;return this._nameRefMap.set(e,t),void this._imageCache.put(t,r)}this._imageMap.has(e)||this._imageMap.set(e,r)}}]),r}();t.LocalGStateCache=v;var y=function(e){o(r,d);var t=c(r);function r(){return l(this,r),t.apply(this,arguments)}return h(r,[{key:"set",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0;if(!e)throw new Error('LocalTilingPatternCache.set - expected "name" argument.');if(t){if(this._imageCache.has(t))return;return this._nameRefMap.set(e,t),void this._imageCache.put(t,r)}this._imageMap.has(e)||this._imageMap.set(e,r)}}]),r}();t.LocalTilingPatternCache=y;var b=function(){function e(){l(this,e),this._refCache=new i.RefSetCache,this._imageCache=new i.RefSetCache}return h(e,[{key:"_byteSize",get:function(){var e=0;return this._imageCache.forEach(function(t){e+=t.byteSize}),e}},{key:"_cacheLimitReached",get:function(){return!(this._imageCache.size<e.MIN_IMAGES_TO_CACHE)&&!(this._byteSize<e.MAX_BYTE_SIZE)}},{key:"shouldCache",value:function(t,r){var n=this._refCache.get(t);return!((n?n.size+(n.has(r)?0:1):1)<e.NUM_PAGES_THRESHOLD)&&!(!this._imageCache.has(t)&&this._cacheLimitReached)}},{key:"addPageIndex",value:function(e,t){var r=this._refCache.get(e);r||(r=new Set,this._refCache.put(e,r)),r.add(t)}},{key:"addByteSize",value:function(e,t){var r=this._imageCache.get(e);r&&(r.byteSize||(r.byteSize=t))}},{key:"getData",value:function(t,r){var n=this._refCache.get(t);if(!n)return null;if(n.size<e.NUM_PAGES_THRESHOLD)return null;var a=this._imageCache.get(t);return a?(n.add(r),a):null}},{key:"setData",value:function(e,t){if(!this._refCache.has(e))throw new Error('GlobalImageCache.setData - expected "addPageIndex" to have been called.');this._imageCache.has(e)||(this._cacheLimitReached?(0,a.warn)("GlobalImageCache.setData - cache limit reached."):this._imageCache.put(e,t))}},{key:"clear",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this._refCache.clear(),this._imageCache.clear()}}],[{key:"NUM_PAGES_THRESHOLD",get:function(){return(0,a.shadow)(this,"NUM_PAGES_THRESHOLD",2)}},{key:"MIN_IMAGES_TO_CACHE",get:function(){return(0,a.shadow)(this,"MIN_IMAGES_TO_CACHE",10)}},{key:"MAX_BYTE_SIZE",get:function(){return(0,a.shadow)(this,"MAX_BYTE_SIZE",4e7)}}]),e}();t.GlobalImageCache=b},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bidi=function(e,t,r){var p=!0,g=e.length;if(0===g||r)return f(e,p,r);h.length=g,d.length=g;var m,v,y=0;for(m=0;m<g;++m){h[m]=e.charAt(m);var b=e.charCodeAt(m),w="L";b<=255?w=a[b]:1424<=b&&b<=1524?w="R":1536<=b&&b<=1791?(w=i[255&b])||(0,n.warn)("Bidi: invalid Unicode character "+b.toString(16)):1792<=b&&b<=2220&&(w="AL"),"R"!==w&&"AL"!==w&&"AN"!==w||y++,d[m]=w}if(0===y)return f(e,p=!0);-1===t&&(y/g<.3?(p=!0,t=0):(p=!1,t=1));var k=[];for(m=0;m<g;++m)k[m]=t;var S,x=o(t)?"R":"L",A=x,O=A,C=A;for(m=0;m<g;++m)"NSM"===d[m]?d[m]=C:C=d[m];for(C=A,m=0;m<g;++m)"EN"===(S=d[m])?d[m]="AL"===C?"AN":"EN":"R"!==S&&"L"!==S&&"AL"!==S||(C=S);for(m=0;m<g;++m)"AL"===(S=d[m])&&(d[m]="R");for(m=1;m<g-1;++m)"ES"===d[m]&&"EN"===d[m-1]&&"EN"===d[m+1]&&(d[m]="EN"),"CS"!==d[m]||"EN"!==d[m-1]&&"AN"!==d[m-1]||d[m+1]!==d[m-1]||(d[m]=d[m-1]);for(m=0;m<g;++m)if("EN"===d[m]){for(var T=m-1;T>=0&&"ET"===d[T];--T)d[T]="EN";for(var F=m+1;F<g&&"ET"===d[F];++F)d[F]="EN"}for(m=0;m<g;++m)"WS"!==(S=d[m])&&"ES"!==S&&"ET"!==S&&"CS"!==S||(d[m]="ON");for(C=A,m=0;m<g;++m)"EN"===(S=d[m])?d[m]="L"===C?"L":"EN":"R"!==S&&"L"!==S||(C=S);for(m=0;m<g;++m)if("ON"===d[m]){var _=c(d,m+1,"ON"),P=A;m>0&&(P=d[m-1]);var I=O;_+1<g&&(I=d[_+1]),"L"!==P&&(P="R"),"L"!==I&&(I="R"),P===I&&u(d,m,_,P),m=_-1}for(m=0;m<g;++m)"ON"===d[m]&&(d[m]=x);for(m=0;m<g;++m)S=d[m],s(k[m])?"R"===S?k[m]+=1:"AN"!==S&&"EN"!==S||(k[m]+=2):"L"!==S&&"AN"!==S&&"EN"!==S||(k[m]+=1);var E,j=-1,R=99;for(m=0,v=k.length;m<v;++m)E=k[m],j<E&&(j=E),R>E&&o(E)&&(R=E);for(E=j;E>=R;--E){var M=-1;for(m=0,v=k.length;m<v;++m)k[m]<E?M>=0&&(l(h,M,m),M=-1):M<0&&(M=m);M>=0&&l(h,M,k.length)}for(m=0,v=h.length;m<v;++m){var N=h[m];"<"!==N&&">"!==N||(h[m]="")}return f(h.join(""),p)};var n=r(4),a=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],i=["AN","AN","AN","AN","AN","AN","ON","ON","AL","ET","ET","AL","CS","AL","ON","ON","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","ON","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","ON","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL"];function o(e){return 0!=(1&e)}function s(e){return 0==(1&e)}function c(e,t,r){var n,a;for(n=t,a=e.length;n<a;++n)if(e[n]!==r)return n;return n}function u(e,t,r,n){for(var a=t;a<r;++a)e[a]=n}function l(e,t,r){for(var n=t,a=r-1;n<a;++n,--a){var i=e[n];e[n]=e[a],e[a]=i}}function f(e,t){var r="ltr";return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?r="ttb":t||(r="rtl"),{str:e,dir:r}}var h=[],d=[]},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMetrics=void 0;var n=r(117),a=(0,n.getLookupTableFactory)(function(e){e.Courier=600,e["Courier-Bold"]=600,e["Courier-BoldOblique"]=600,e["Courier-Oblique"]=600,e.Helvetica=(0,n.getLookupTableFactory)(function(e){e.space=278,e.exclam=278,e.quotedbl=355,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=667,e.quoteright=222,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=278,e.semicolon=278,e.less=584,e.equal=584,e.greater=584,e.question=556,e.at=1015,e.A=667,e.B=667,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=500,e.K=667,e.L=556,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=278,e.backslash=278,e.bracketright=278,e.asciicircum=469,e.underscore=556,e.quoteleft=222,e.a=556,e.b=556,e.c=500,e.d=556,e.e=556,e.f=278,e.g=556,e.h=556,e.i=222,e.j=222,e.k=500,e.l=222,e.m=833,e.n=556,e.o=556,e.p=556,e.q=556,e.r=333,e.s=500,e.t=278,e.u=556,e.v=500,e.w=722,e.x=500,e.y=500,e.z=500,e.braceleft=334,e.bar=260,e.braceright=334,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=191,e.quotedblleft=333,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=500,e.fl=500,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=537,e.bullet=350,e.quotesinglbase=222,e.quotedblbase=333,e.quotedblright=333,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=556,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=222,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=556,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=667,e.aacute=556,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=500,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=500,e.aring=556,e.Ncommaaccent=722,e.lacute=222,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=500,e.scedilla=500,e.iacute=278,e.lozenge=471,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=556,e.acircumflex=556,e.Amacron=667,e.rcaron=333,e.ccedilla=500,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=643,e.Umacron=722,e.uring=556,e.threesuperior=333,e.Ograve=778,e.Agrave=667,e.Abreve=667,e.multiply=584,e.uacute=556,e.Tcaron=611,e.partialdiff=476,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=500,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=260,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=333,e.omacron=556,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=222,e.tcaron=317,e.eogonek=556,e.Uogonek=722,e.Aacute=667,e.Adieresis=667,e.egrave=556,e.zacute=500,e.iogonek=222,e.Oacute=778,e.oacute=556,e.amacron=556,e.sacute=500,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=556,e.twosuperior=333,e.Odieresis=778,e.mu=556,e.igrave=278,e.ohungarumlaut=556,e.Eogonek=667,e.dcroat=556,e.threequarters=834,e.Scedilla=667,e.lcaron=299,e.Kcommaaccent=667,e.Lacute=556,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=556,e.onehalf=834,e.lessequal=549,e.ocircumflex=556,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=556,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=556,e.Ccaron=722,e.ugrave=556,e.radical=453,e.Dcaron=722,e.rcommaaccent=333,e.Ntilde=722,e.otilde=556,e.Rcommaaccent=722,e.Lcommaaccent=556,e.Atilde=667,e.Aogonek=667,e.Aring=667,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=500,e.minus=584,e.Icircumflex=278,e.ncaron=556,e.tcommaaccent=278,e.logicalnot=584,e.odieresis=556,e.udieresis=556,e.notequal=549,e.gcommaaccent=556,e.eth=556,e.zcaron=500,e.ncommaaccent=556,e.onesuperior=333,e.imacron=278,e.Euro=556}),e["Helvetica-Bold"]=(0,n.getLookupTableFactory)(function(e){e.space=278,e.exclam=333,e.quotedbl=474,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=722,e.quoteright=278,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=333,e.semicolon=333,e.less=584,e.equal=584,e.greater=584,e.question=611,e.at=975,e.A=722,e.B=722,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=556,e.K=722,e.L=611,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=584,e.underscore=556,e.quoteleft=278,e.a=556,e.b=611,e.c=556,e.d=611,e.e=556,e.f=333,e.g=611,e.h=611,e.i=278,e.j=278,e.k=556,e.l=278,e.m=889,e.n=611,e.o=611,e.p=611,e.q=611,e.r=389,e.s=556,e.t=333,e.u=611,e.v=556,e.w=778,e.x=556,e.y=556,e.z=500,e.braceleft=389,e.bar=280,e.braceright=389,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=238,e.quotedblleft=500,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=611,e.fl=611,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=556,e.bullet=350,e.quotesinglbase=278,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=611,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=278,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=611,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=722,e.aacute=556,e.Ucircumflex=722,e.yacute=556,e.scommaaccent=556,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=611,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=556,e.aring=556,e.Ncommaaccent=722,e.lacute=278,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=556,e.scedilla=556,e.iacute=278,e.lozenge=494,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=611,e.acircumflex=556,e.Amacron=722,e.rcaron=389,e.ccedilla=556,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=743,e.Umacron=722,e.uring=611,e.threesuperior=333,e.Ograve=778,e.Agrave=722,e.Abreve=722,e.multiply=584,e.uacute=611,e.Tcaron=611,e.partialdiff=494,e.ydieresis=556,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=556,e.nacute=611,e.umacron=611,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=280,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=389,e.omacron=611,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=278,e.tcaron=389,e.eogonek=556,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=556,e.zacute=500,e.iogonek=278,e.Oacute=778,e.oacute=611,e.amacron=556,e.sacute=556,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=611,e.twosuperior=333,e.Odieresis=778,e.mu=611,e.igrave=278,e.ohungarumlaut=611,e.Eogonek=667,e.dcroat=611,e.threequarters=834,e.Scedilla=667,e.lcaron=400,e.Kcommaaccent=722,e.Lacute=611,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=611,e.onehalf=834,e.lessequal=549,e.ocircumflex=611,e.ntilde=611,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=611,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=611,e.Ccaron=722,e.ugrave=611,e.radical=549,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=722,e.otilde=611,e.Rcommaaccent=722,e.Lcommaaccent=611,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=556,e.minus=584,e.Icircumflex=278,e.ncaron=611,e.tcommaaccent=333,e.logicalnot=584,e.odieresis=611,e.udieresis=611,e.notequal=549,e.gcommaaccent=611,e.eth=611,e.zcaron=500,e.ncommaaccent=611,e.onesuperior=333,e.imacron=278,e.Euro=556}),e["Helvetica-BoldOblique"]=(0,n.getLookupTableFactory)(function(e){e.space=278,e.exclam=333,e.quotedbl=474,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=722,e.quoteright=278,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=333,e.semicolon=333,e.less=584,e.equal=584,e.greater=584,e.question=611,e.at=975,e.A=722,e.B=722,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=556,e.K=722,e.L=611,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=584,e.underscore=556,e.quoteleft=278,e.a=556,e.b=611,e.c=556,e.d=611,e.e=556,e.f=333,e.g=611,e.h=611,e.i=278,e.j=278,e.k=556,e.l=278,e.m=889,e.n=611,e.o=611,e.p=611,e.q=611,e.r=389,e.s=556,e.t=333,e.u=611,e.v=556,e.w=778,e.x=556,e.y=556,e.z=500,e.braceleft=389,e.bar=280,e.braceright=389,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=238,e.quotedblleft=500,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=611,e.fl=611,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=556,e.bullet=350,e.quotesinglbase=278,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=611,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=278,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=611,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=722,e.aacute=556,e.Ucircumflex=722,e.yacute=556,e.scommaaccent=556,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=611,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=556,e.aring=556,e.Ncommaaccent=722,e.lacute=278,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=556,e.scedilla=556,e.iacute=278,e.lozenge=494,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=611,e.acircumflex=556,e.Amacron=722,e.rcaron=389,e.ccedilla=556,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=743,e.Umacron=722,e.uring=611,e.threesuperior=333,e.Ograve=778,e.Agrave=722,e.Abreve=722,e.multiply=584,e.uacute=611,e.Tcaron=611,e.partialdiff=494,e.ydieresis=556,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=556,e.nacute=611,e.umacron=611,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=280,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=389,e.omacron=611,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=278,e.tcaron=389,e.eogonek=556,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=556,e.zacute=500,e.iogonek=278,e.Oacute=778,e.oacute=611,e.amacron=556,e.sacute=556,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=611,e.twosuperior=333,e.Odieresis=778,e.mu=611,e.igrave=278,e.ohungarumlaut=611,e.Eogonek=667,e.dcroat=611,e.threequarters=834,e.Scedilla=667,e.lcaron=400,e.Kcommaaccent=722,e.Lacute=611,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=611,e.onehalf=834,e.lessequal=549,e.ocircumflex=611,e.ntilde=611,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=611,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=611,e.Ccaron=722,e.ugrave=611,e.radical=549,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=722,e.otilde=611,e.Rcommaaccent=722,e.Lcommaaccent=611,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=556,e.minus=584,e.Icircumflex=278,e.ncaron=611,e.tcommaaccent=333,e.logicalnot=584,e.odieresis=611,e.udieresis=611,e.notequal=549,e.gcommaaccent=611,e.eth=611,e.zcaron=500,e.ncommaaccent=611,e.onesuperior=333,e.imacron=278,e.Euro=556}),e["Helvetica-Oblique"]=(0,n.getLookupTableFactory)(function(e){e.space=278,e.exclam=278,e.quotedbl=355,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=667,e.quoteright=222,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=278,e.semicolon=278,e.less=584,e.equal=584,e.greater=584,e.question=556,e.at=1015,e.A=667,e.B=667,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=500,e.K=667,e.L=556,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=278,e.backslash=278,e.bracketright=278,e.asciicircum=469,e.underscore=556,e.quoteleft=222,e.a=556,e.b=556,e.c=500,e.d=556,e.e=556,e.f=278,e.g=556,e.h=556,e.i=222,e.j=222,e.k=500,e.l=222,e.m=833,e.n=556,e.o=556,e.p=556,e.q=556,e.r=333,e.s=500,e.t=278,e.u=556,e.v=500,e.w=722,e.x=500,e.y=500,e.z=500,e.braceleft=334,e.bar=260,e.braceright=334,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=191,e.quotedblleft=333,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=500,e.fl=500,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=537,e.bullet=350,e.quotesinglbase=222,e.quotedblbase=333,e.quotedblright=333,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=556,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=222,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=556,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=667,e.aacute=556,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=500,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=500,e.aring=556,e.Ncommaaccent=722,e.lacute=222,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=500,e.scedilla=500,e.iacute=278,e.lozenge=471,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=556,e.acircumflex=556,e.Amacron=667,e.rcaron=333,e.ccedilla=500,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=643,e.Umacron=722,e.uring=556,e.threesuperior=333,e.Ograve=778,e.Agrave=667,e.Abreve=667,e.multiply=584,e.uacute=556,e.Tcaron=611,e.partialdiff=476,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=500,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=260,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=333,e.omacron=556,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=222,e.tcaron=317,e.eogonek=556,e.Uogonek=722,e.Aacute=667,e.Adieresis=667,e.egrave=556,e.zacute=500,e.iogonek=222,e.Oacute=778,e.oacute=556,e.amacron=556,e.sacute=500,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=556,e.twosuperior=333,e.Odieresis=778,e.mu=556,e.igrave=278,e.ohungarumlaut=556,e.Eogonek=667,e.dcroat=556,e.threequarters=834,e.Scedilla=667,e.lcaron=299,e.Kcommaaccent=667,e.Lacute=556,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=556,e.onehalf=834,e.lessequal=549,e.ocircumflex=556,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=556,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=556,e.Ccaron=722,e.ugrave=556,e.radical=453,e.Dcaron=722,e.rcommaaccent=333,e.Ntilde=722,e.otilde=556,e.Rcommaaccent=722,e.Lcommaaccent=556,e.Atilde=667,e.Aogonek=667,e.Aring=667,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=500,e.minus=584,e.Icircumflex=278,e.ncaron=556,e.tcommaaccent=278,e.logicalnot=584,e.odieresis=556,e.udieresis=556,e.notequal=549,e.gcommaaccent=556,e.eth=556,e.zcaron=500,e.ncommaaccent=556,e.onesuperior=333,e.imacron=278,e.Euro=556}),e.Symbol=(0,n.getLookupTableFactory)(function(e){e.space=250,e.exclam=333,e.universal=713,e.numbersign=500,e.existential=549,e.percent=833,e.ampersand=778,e.suchthat=439,e.parenleft=333,e.parenright=333,e.asteriskmath=500,e.plus=549,e.comma=250,e.minus=549,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=278,e.semicolon=278,e.less=549,e.equal=549,e.greater=549,e.question=444,e.congruent=549,e.Alpha=722,e.Beta=667,e.Chi=722,e.Delta=612,e.Epsilon=611,e.Phi=763,e.Gamma=603,e.Eta=722,e.Iota=333,e.theta1=631,e.Kappa=722,e.Lambda=686,e.Mu=889,e.Nu=722,e.Omicron=722,e.Pi=768,e.Theta=741,e.Rho=556,e.Sigma=592,e.Tau=611,e.Upsilon=690,e.sigma1=439,e.Omega=768,e.Xi=645,e.Psi=795,e.Zeta=611,e.bracketleft=333,e.therefore=863,e.bracketright=333,e.perpendicular=658,e.underscore=500,e.radicalex=500,e.alpha=631,e.beta=549,e.chi=549,e.delta=494,e.epsilon=439,e.phi=521,e.gamma=411,e.eta=603,e.iota=329,e.phi1=603,e.kappa=549,e.lambda=549,e.mu=576,e.nu=521,e.omicron=549,e.pi=549,e.theta=521,e.rho=549,e.sigma=603,e.tau=439,e.upsilon=576,e.omega1=713,e.omega=686,e.xi=493,e.psi=686,e.zeta=494,e.braceleft=480,e.bar=200,e.braceright=480,e.similar=549,e.Euro=750,e.Upsilon1=620,e.minute=247,e.lessequal=549,e.fraction=167,e.infinity=713,e.florin=500,e.club=753,e.diamond=753,e.heart=753,e.spade=753,e.arrowboth=1042,e.arrowleft=987,e.arrowup=603,e.arrowright=987,e.arrowdown=603,e.degree=400,e.plusminus=549,e.second=411,e.greaterequal=549,e.multiply=549,e.proportional=713,e.partialdiff=494,e.bullet=460,e.divide=549,e.notequal=549,e.equivalence=549,e.approxequal=549,e.ellipsis=1e3,e.arrowvertex=603,e.arrowhorizex=1e3,e.carriagereturn=658,e.aleph=823,e.Ifraktur=686,e.Rfraktur=795,e.weierstrass=987,e.circlemultiply=768,e.circleplus=768,e.emptyset=823,e.intersection=768,e.union=768,e.propersuperset=713,e.reflexsuperset=713,e.notsubset=713,e.propersubset=713,e.reflexsubset=713,e.element=713,e.notelement=713,e.angle=768,e.gradient=713,e.registerserif=790,e.copyrightserif=790,e.trademarkserif=890,e.product=823,e.radical=549,e.dotmath=250,e.logicalnot=713,e.logicaland=603,e.logicalor=603,e.arrowdblboth=1042,e.arrowdblleft=987,e.arrowdblup=603,e.arrowdblright=987,e.arrowdbldown=603,e.lozenge=494,e.angleleft=329,e.registersans=790,e.copyrightsans=790,e.trademarksans=786,e.summation=713,e.parenlefttp=384,e.parenleftex=384,e.parenleftbt=384,e.bracketlefttp=384,e.bracketleftex=384,e.bracketleftbt=384,e.bracelefttp=494,e.braceleftmid=494,e.braceleftbt=494,e.braceex=494,e.angleright=329,e.integral=274,e.integraltp=686,e.integralex=686,e.integralbt=686,e.parenrighttp=384,e.parenrightex=384,e.parenrightbt=384,e.bracketrighttp=384,e.bracketrightex=384,e.bracketrightbt=384,e.bracerighttp=494,e.bracerightmid=494,e.bracerightbt=494,e.apple=790}),e["Times-Roman"]=(0,n.getLookupTableFactory)(function(e){e.space=250,e.exclam=333,e.quotedbl=408,e.numbersign=500,e.dollar=500,e.percent=833,e.ampersand=778,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=564,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=278,e.semicolon=278,e.less=564,e.equal=564,e.greater=564,e.question=444,e.at=921,e.A=722,e.B=667,e.C=667,e.D=722,e.E=611,e.F=556,e.G=722,e.H=722,e.I=333,e.J=389,e.K=722,e.L=611,e.M=889,e.N=722,e.O=722,e.P=556,e.Q=722,e.R=667,e.S=556,e.T=611,e.U=722,e.V=722,e.W=944,e.X=722,e.Y=722,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=469,e.underscore=500,e.quoteleft=333,e.a=444,e.b=500,e.c=444,e.d=500,e.e=444,e.f=333,e.g=500,e.h=500,e.i=278,e.j=278,e.k=500,e.l=278,e.m=778,e.n=500,e.o=500,e.p=500,e.q=500,e.r=333,e.s=389,e.t=278,e.u=500,e.v=500,e.w=722,e.x=500,e.y=500,e.z=444,e.braceleft=480,e.bar=200,e.braceright=480,e.asciitilde=541,e.exclamdown=333,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=180,e.quotedblleft=444,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=556,e.fl=556,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=453,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=444,e.quotedblright=444,e.guillemotright=500,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=444,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=889,e.ordfeminine=276,e.Lslash=611,e.Oslash=722,e.OE=889,e.ordmasculine=310,e.ae=667,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=722,e.germandbls=500,e.Idieresis=333,e.eacute=444,e.abreve=444,e.uhungarumlaut=500,e.ecaron=444,e.Ydieresis=722,e.divide=564,e.Yacute=722,e.Acircumflex=722,e.aacute=444,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=444,e.Uacute=722,e.uogonek=500,e.Edieresis=611,e.Dcroat=722,e.commaaccent=250,e.copyright=760,e.Emacron=611,e.ccaron=444,e.aring=444,e.Ncommaaccent=722,e.lacute=278,e.agrave=444,e.Tcommaaccent=611,e.Cacute=667,e.atilde=444,e.Edotaccent=611,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=471,e.Rcaron=667,e.Gcommaaccent=722,e.ucircumflex=500,e.acircumflex=444,e.Amacron=722,e.rcaron=333,e.ccedilla=444,e.Zdotaccent=611,e.Thorn=556,e.Omacron=722,e.Racute=667,e.Sacute=556,e.dcaron=588,e.Umacron=722,e.uring=500,e.threesuperior=300,e.Ograve=722,e.Agrave=722,e.Abreve=722,e.multiply=564,e.uacute=500,e.Tcaron=611,e.partialdiff=476,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=611,e.adieresis=444,e.edieresis=444,e.cacute=444,e.nacute=500,e.umacron=500,e.Ncaron=722,e.Iacute=333,e.plusminus=564,e.brokenbar=200,e.registered=760,e.Gbreve=722,e.Idotaccent=333,e.summation=600,e.Egrave=611,e.racute=333,e.omacron=500,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=667,e.lcommaaccent=278,e.tcaron=326,e.eogonek=444,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=444,e.zacute=444,e.iogonek=278,e.Oacute=722,e.oacute=500,e.amacron=444,e.sacute=389,e.idieresis=278,e.Ocircumflex=722,e.Ugrave=722,e.Delta=612,e.thorn=500,e.twosuperior=300,e.Odieresis=722,e.mu=500,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=611,e.dcroat=500,e.threequarters=750,e.Scedilla=556,e.lcaron=344,e.Kcommaaccent=722,e.Lacute=611,e.trademark=980,e.edotaccent=444,e.Igrave=333,e.Imacron=333,e.Lcaron=611,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=500,e.Uhungarumlaut=722,e.Eacute=611,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=556,e.Scommaaccent=556,e.Ohungarumlaut=722,e.degree=400,e.ograve=500,e.Ccaron=667,e.ugrave=500,e.radical=453,e.Dcaron=722,e.rcommaaccent=333,e.Ntilde=722,e.otilde=500,e.Rcommaaccent=667,e.Lcommaaccent=611,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=722,e.zdotaccent=444,e.Ecaron=611,e.Iogonek=333,e.kcommaaccent=500,e.minus=564,e.Icircumflex=333,e.ncaron=500,e.tcommaaccent=278,e.logicalnot=564,e.odieresis=500,e.udieresis=500,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=444,e.ncommaaccent=500,e.onesuperior=300,e.imacron=278,e.Euro=500}),e["Times-Bold"]=(0,n.getLookupTableFactory)(function(e){e.space=250,e.exclam=333,e.quotedbl=555,e.numbersign=500,e.dollar=500,e.percent=1e3,e.ampersand=833,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=570,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=333,e.semicolon=333,e.less=570,e.equal=570,e.greater=570,e.question=500,e.at=930,e.A=722,e.B=667,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=778,e.I=389,e.J=500,e.K=778,e.L=667,e.M=944,e.N=722,e.O=778,e.P=611,e.Q=778,e.R=722,e.S=556,e.T=667,e.U=722,e.V=722,e.W=1e3,e.X=722,e.Y=722,e.Z=667,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=581,e.underscore=500,e.quoteleft=333,e.a=500,e.b=556,e.c=444,e.d=556,e.e=444,e.f=333,e.g=500,e.h=556,e.i=278,e.j=333,e.k=556,e.l=278,e.m=833,e.n=556,e.o=500,e.p=556,e.q=556,e.r=444,e.s=389,e.t=333,e.u=556,e.v=500,e.w=722,e.x=500,e.y=500,e.z=444,e.braceleft=394,e.bar=220,e.braceright=394,e.asciitilde=520,e.exclamdown=333,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=278,e.quotedblleft=500,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=556,e.fl=556,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=540,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=500,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=500,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=300,e.Lslash=667,e.Oslash=778,e.OE=1e3,e.ordmasculine=330,e.ae=722,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=722,e.germandbls=556,e.Idieresis=389,e.eacute=444,e.abreve=500,e.uhungarumlaut=556,e.ecaron=444,e.Ydieresis=722,e.divide=570,e.Yacute=722,e.Acircumflex=722,e.aacute=500,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=500,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=747,e.Emacron=667,e.ccaron=444,e.aring=500,e.Ncommaaccent=722,e.lacute=278,e.agrave=500,e.Tcommaaccent=667,e.Cacute=722,e.atilde=500,e.Edotaccent=667,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=494,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=556,e.acircumflex=500,e.Amacron=722,e.rcaron=444,e.ccedilla=444,e.Zdotaccent=667,e.Thorn=611,e.Omacron=778,e.Racute=722,e.Sacute=556,e.dcaron=672,e.Umacron=722,e.uring=556,e.threesuperior=300,e.Ograve=778,e.Agrave=722,e.Abreve=722,e.multiply=570,e.uacute=556,e.Tcaron=667,e.partialdiff=494,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=500,e.edieresis=444,e.cacute=444,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=389,e.plusminus=570,e.brokenbar=220,e.registered=747,e.Gbreve=778,e.Idotaccent=389,e.summation=600,e.Egrave=667,e.racute=444,e.omacron=500,e.Zacute=667,e.Zcaron=667,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=278,e.tcaron=416,e.eogonek=444,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=444,e.zacute=444,e.iogonek=278,e.Oacute=778,e.oacute=500,e.amacron=500,e.sacute=389,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=556,e.twosuperior=300,e.Odieresis=778,e.mu=556,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=667,e.dcroat=556,e.threequarters=750,e.Scedilla=556,e.lcaron=394,e.Kcommaaccent=778,e.Lacute=667,e.trademark=1e3,e.edotaccent=444,e.Igrave=389,e.Imacron=389,e.Lcaron=667,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=556,e.Scommaaccent=556,e.Ohungarumlaut=778,e.degree=400,e.ograve=500,e.Ccaron=722,e.ugrave=556,e.radical=549,e.Dcaron=722,e.rcommaaccent=444,e.Ntilde=722,e.otilde=500,e.Rcommaaccent=722,e.Lcommaaccent=667,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=778,e.zdotaccent=444,e.Ecaron=667,e.Iogonek=389,e.kcommaaccent=556,e.minus=570,e.Icircumflex=389,e.ncaron=556,e.tcommaaccent=333,e.logicalnot=570,e.odieresis=500,e.udieresis=556,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=444,e.ncommaaccent=556,e.onesuperior=300,e.imacron=278,e.Euro=500}),e["Times-BoldItalic"]=(0,n.getLookupTableFactory)(function(e){e.space=250,e.exclam=389,e.quotedbl=555,e.numbersign=500,e.dollar=500,e.percent=833,e.ampersand=778,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=570,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=333,e.semicolon=333,e.less=570,e.equal=570,e.greater=570,e.question=500,e.at=832,e.A=667,e.B=667,e.C=667,e.D=722,e.E=667,e.F=667,e.G=722,e.H=778,e.I=389,e.J=500,e.K=667,e.L=611,e.M=889,e.N=722,e.O=722,e.P=611,e.Q=722,e.R=667,e.S=556,e.T=611,e.U=722,e.V=667,e.W=889,e.X=667,e.Y=611,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=570,e.underscore=500,e.quoteleft=333,e.a=500,e.b=500,e.c=444,e.d=500,e.e=444,e.f=333,e.g=500,e.h=556,e.i=278,e.j=278,e.k=500,e.l=278,e.m=778,e.n=556,e.o=500,e.p=500,e.q=500,e.r=389,e.s=389,e.t=278,e.u=556,e.v=444,e.w=667,e.x=500,e.y=444,e.z=389,e.braceleft=348,e.bar=220,e.braceright=348,e.asciitilde=570,e.exclamdown=389,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=278,e.quotedblleft=500,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=556,e.fl=556,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=500,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=500,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=500,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=944,e.ordfeminine=266,e.Lslash=611,e.Oslash=722,e.OE=944,e.ordmasculine=300,e.ae=722,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=722,e.germandbls=500,e.Idieresis=389,e.eacute=444,e.abreve=500,e.uhungarumlaut=556,e.ecaron=444,e.Ydieresis=611,e.divide=570,e.Yacute=611,e.Acircumflex=667,e.aacute=500,e.Ucircumflex=722,e.yacute=444,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=500,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=747,e.Emacron=667,e.ccaron=444,e.aring=500,e.Ncommaaccent=722,e.lacute=278,e.agrave=500,e.Tcommaaccent=611,e.Cacute=667,e.atilde=500,e.Edotaccent=667,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=494,e.Rcaron=667,e.Gcommaaccent=722,e.ucircumflex=556,e.acircumflex=500,e.Amacron=667,e.rcaron=389,e.ccedilla=444,e.Zdotaccent=611,e.Thorn=611,e.Omacron=722,e.Racute=667,e.Sacute=556,e.dcaron=608,e.Umacron=722,e.uring=556,e.threesuperior=300,e.Ograve=722,e.Agrave=667,e.Abreve=667,e.multiply=570,e.uacute=556,e.Tcaron=611,e.partialdiff=494,e.ydieresis=444,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=500,e.edieresis=444,e.cacute=444,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=389,e.plusminus=570,e.brokenbar=220,e.registered=747,e.Gbreve=722,e.Idotaccent=389,e.summation=600,e.Egrave=667,e.racute=389,e.omacron=500,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=667,e.lcommaaccent=278,e.tcaron=366,e.eogonek=444,e.Uogonek=722,e.Aacute=667,e.Adieresis=667,e.egrave=444,e.zacute=389,e.iogonek=278,e.Oacute=722,e.oacute=500,e.amacron=500,e.sacute=389,e.idieresis=278,e.Ocircumflex=722,e.Ugrave=722,e.Delta=612,e.thorn=500,e.twosuperior=300,e.Odieresis=722,e.mu=576,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=667,e.dcroat=500,e.threequarters=750,e.Scedilla=556,e.lcaron=382,e.Kcommaaccent=667,e.Lacute=611,e.trademark=1e3,e.edotaccent=444,e.Igrave=389,e.Imacron=389,e.Lcaron=611,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=556,e.Scommaaccent=556,e.Ohungarumlaut=722,e.degree=400,e.ograve=500,e.Ccaron=667,e.ugrave=556,e.radical=549,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=722,e.otilde=500,e.Rcommaaccent=667,e.Lcommaaccent=611,e.Atilde=667,e.Aogonek=667,e.Aring=667,e.Otilde=722,e.zdotaccent=389,e.Ecaron=667,e.Iogonek=389,e.kcommaaccent=500,e.minus=606,e.Icircumflex=389,e.ncaron=556,e.tcommaaccent=278,e.logicalnot=606,e.odieresis=500,e.udieresis=556,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=389,e.ncommaaccent=556,e.onesuperior=300,e.imacron=278,e.Euro=500}),e["Times-Italic"]=(0,n.getLookupTableFactory)(function(e){e.space=250,e.exclam=333,e.quotedbl=420,e.numbersign=500,e.dollar=500,e.percent=833,e.ampersand=778,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=675,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=333,e.semicolon=333,e.less=675,e.equal=675,e.greater=675,e.question=500,e.at=920,e.A=611,e.B=611,e.C=667,e.D=722,e.E=611,e.F=611,e.G=722,e.H=722,e.I=333,e.J=444,e.K=667,e.L=556,e.M=833,e.N=667,e.O=722,e.P=611,e.Q=722,e.R=611,e.S=500,e.T=556,e.U=722,e.V=611,e.W=833,e.X=611,e.Y=556,e.Z=556,e.bracketleft=389,e.backslash=278,e.bracketright=389,e.asciicircum=422,e.underscore=500,e.quoteleft=333,e.a=500,e.b=500,e.c=444,e.d=500,e.e=444,e.f=278,e.g=500,e.h=500,e.i=278,e.j=278,e.k=444,e.l=278,e.m=722,e.n=500,e.o=500,e.p=500,e.q=500,e.r=389,e.s=389,e.t=278,e.u=500,e.v=444,e.w=667,e.x=444,e.y=444,e.z=389,e.braceleft=400,e.bar=275,e.braceright=400,e.asciitilde=541,e.exclamdown=389,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=214,e.quotedblleft=556,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=500,e.fl=500,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=523,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=556,e.quotedblright=556,e.guillemotright=500,e.ellipsis=889,e.perthousand=1e3,e.questiondown=500,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=889,e.AE=889,e.ordfeminine=276,e.Lslash=556,e.Oslash=722,e.OE=944,e.ordmasculine=310,e.ae=667,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=667,e.germandbls=500,e.Idieresis=333,e.eacute=444,e.abreve=500,e.uhungarumlaut=500,e.ecaron=444,e.Ydieresis=556,e.divide=675,e.Yacute=556,e.Acircumflex=611,e.aacute=500,e.Ucircumflex=722,e.yacute=444,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=500,e.Uacute=722,e.uogonek=500,e.Edieresis=611,e.Dcroat=722,e.commaaccent=250,e.copyright=760,e.Emacron=611,e.ccaron=444,e.aring=500,e.Ncommaaccent=667,e.lacute=278,e.agrave=500,e.Tcommaaccent=556,e.Cacute=667,e.atilde=500,e.Edotaccent=611,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=471,e.Rcaron=611,e.Gcommaaccent=722,e.ucircumflex=500,e.acircumflex=500,e.Amacron=611,e.rcaron=389,e.ccedilla=444,e.Zdotaccent=556,e.Thorn=611,e.Omacron=722,e.Racute=611,e.Sacute=500,e.dcaron=544,e.Umacron=722,e.uring=500,e.threesuperior=300,e.Ograve=722,e.Agrave=611,e.Abreve=611,e.multiply=675,e.uacute=500,e.Tcaron=556,e.partialdiff=476,e.ydieresis=444,e.Nacute=667,e.icircumflex=278,e.Ecircumflex=611,e.adieresis=500,e.edieresis=444,e.cacute=444,e.nacute=500,e.umacron=500,e.Ncaron=667,e.Iacute=333,e.plusminus=675,e.brokenbar=275,e.registered=760,e.Gbreve=722,e.Idotaccent=333,e.summation=600,e.Egrave=611,e.racute=389,e.omacron=500,e.Zacute=556,e.Zcaron=556,e.greaterequal=549,e.Eth=722,e.Ccedilla=667,e.lcommaaccent=278,e.tcaron=300,e.eogonek=444,e.Uogonek=722,e.Aacute=611,e.Adieresis=611,e.egrave=444,e.zacute=389,e.iogonek=278,e.Oacute=722,e.oacute=500,e.amacron=500,e.sacute=389,e.idieresis=278,e.Ocircumflex=722,e.Ugrave=722,e.Delta=612,e.thorn=500,e.twosuperior=300,e.Odieresis=722,e.mu=500,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=611,e.dcroat=500,e.threequarters=750,e.Scedilla=500,e.lcaron=300,e.Kcommaaccent=667,e.Lacute=556,e.trademark=980,e.edotaccent=444,e.Igrave=333,e.Imacron=333,e.Lcaron=611,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=500,e.Uhungarumlaut=722,e.Eacute=611,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=500,e.Scommaaccent=500,e.Ohungarumlaut=722,e.degree=400,e.ograve=500,e.Ccaron=667,e.ugrave=500,e.radical=453,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=667,e.otilde=500,e.Rcommaaccent=611,e.Lcommaaccent=556,e.Atilde=611,e.Aogonek=611,e.Aring=611,e.Otilde=722,e.zdotaccent=389,e.Ecaron=611,e.Iogonek=333,e.kcommaaccent=444,e.minus=675,e.Icircumflex=333,e.ncaron=500,e.tcommaaccent=278,e.logicalnot=675,e.odieresis=500,e.udieresis=500,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=389,e.ncommaaccent=500,e.onesuperior=300,e.imacron=278,e.Euro=500}),e.ZapfDingbats=(0,n.getLookupTableFactory)(function(e){e.space=278,e.a1=974,e.a2=961,e.a202=974,e.a3=980,e.a4=719,e.a5=789,e.a119=790,e.a118=791,e.a117=690,e.a11=960,e.a12=939,e.a13=549,e.a14=855,e.a15=911,e.a16=933,e.a105=911,e.a17=945,e.a18=974,e.a19=755,e.a20=846,e.a21=762,e.a22=761,e.a23=571,e.a24=677,e.a25=763,e.a26=760,e.a27=759,e.a28=754,e.a6=494,e.a7=552,e.a8=537,e.a9=577,e.a10=692,e.a29=786,e.a30=788,e.a31=788,e.a32=790,e.a33=793,e.a34=794,e.a35=816,e.a36=823,e.a37=789,e.a38=841,e.a39=823,e.a40=833,e.a41=816,e.a42=831,e.a43=923,e.a44=744,e.a45=723,e.a46=749,e.a47=790,e.a48=792,e.a49=695,e.a50=776,e.a51=768,e.a52=792,e.a53=759,e.a54=707,e.a55=708,e.a56=682,e.a57=701,e.a58=826,e.a59=815,e.a60=789,e.a61=789,e.a62=707,e.a63=687,e.a64=696,e.a65=689,e.a66=786,e.a67=787,e.a68=713,e.a69=791,e.a70=785,e.a71=791,e.a72=873,e.a73=761,e.a74=762,e.a203=762,e.a75=759,e.a204=759,e.a76=892,e.a77=892,e.a78=788,e.a79=784,e.a81=438,e.a82=138,e.a83=277,e.a84=415,e.a97=392,e.a98=392,e.a99=668,e.a100=668,e.a89=390,e.a90=390,e.a93=317,e.a94=317,e.a91=276,e.a92=276,e.a205=509,e.a85=509,e.a206=410,e.a86=410,e.a87=234,e.a88=234,e.a95=334,e.a96=334,e.a101=732,e.a102=544,e.a103=544,e.a104=910,e.a106=667,e.a107=760,e.a108=760,e.a112=776,e.a111=595,e.a110=694,e.a109=626,e.a120=788,e.a121=788,e.a122=788,e.a123=788,e.a124=788,e.a125=788,e.a126=788,e.a127=788,e.a128=788,e.a129=788,e.a130=788,e.a131=788,e.a132=788,e.a133=788,e.a134=788,e.a135=788,e.a136=788,e.a137=788,e.a138=788,e.a139=788,e.a140=788,e.a141=788,e.a142=788,e.a143=788,e.a144=788,e.a145=788,e.a146=788,e.a147=788,e.a148=788,e.a149=788,e.a150=788,e.a151=788,e.a152=788,e.a153=788,e.a154=788,e.a155=788,e.a156=788,e.a157=788,e.a158=788,e.a159=788,e.a160=894,e.a161=838,e.a163=1016,e.a164=458,e.a196=748,e.a165=924,e.a192=748,e.a166=918,e.a167=927,e.a168=928,e.a169=928,e.a170=834,e.a171=873,e.a172=828,e.a173=924,e.a162=924,e.a174=917,e.a175=930,e.a176=931,e.a177=463,e.a178=883,e.a179=836,e.a193=836,e.a180=867,e.a199=867,e.a181=696,e.a200=696,e.a182=874,e.a201=874,e.a183=760,e.a184=946,e.a197=771,e.a185=865,e.a194=771,e.a198=888,e.a186=967,e.a195=888,e.a187=831,e.a188=873,e.a189=927,e.a190=970,e.a191=918})});t.getMetrics=a},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MurmurHash3_64=void 0;var n=r(4);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var i=3285377520,o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.h1=t?4294967295&t:i,this.h2=t?4294967295&t:i}var t,r,o;return t=e,(r=[{key:"update",value:function(e){var t,r;if((0,n.isString)(e)){t=new Uint8Array(2*e.length),r=0;for(var a=0,i=e.length;a<i;a++){var o=e.charCodeAt(a);o<=255?t[r++]=o:(t[r++]=o>>>8,t[r++]=255&o)}}else{if(!(0,n.isArrayBuffer)(e))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");r=(t=e.slice()).byteLength}for(var s=r>>2,c=r-4*s,u=new Uint32Array(t.buffer,0,s),l=0,f=0,h=this.h1,d=this.h2,p=3432918353,g=461845907,m=0;m<s;m++)1&m?h=5*(h=(h^=l=(l=(l=(l=u[m])*p&4294901760|11601*l&65535)<<15|l>>>17)*g&4294901760|13715*l&65535)<<13|h>>>19)+3864292196:d=5*(d=(d^=f=(f=(f=(f=u[m])*p&4294901760|11601*f&65535)<<15|f>>>17)*g&4294901760|13715*f&65535)<<13|d>>>19)+3864292196;switch(l=0,c){case 3:l^=t[4*s+2]<<16;case 2:l^=t[4*s+1]<<8;case 1:l=(l=(l=(l^=t[4*s])*p&4294901760|11601*l&65535)<<15|l>>>17)*g&4294901760|13715*l&65535,1&s?h^=l:d^=l}this.h1=h,this.h2=d}},{key:"hexdigest",value:function(){var e=this.h1,t=this.h2;e=3981806797*(e^=t>>>1)&4294901760|36045*e&65535,e=444984403*(e^=(t=4283543511*t&4294901760|(2950163797*(t<<16|e>>>16)&4294901760)>>>16)>>>1)&4294901760|60499*e&65535;var r=((e^=(t=3301882366*t&4294901760|(3120437893*(t<<16|e>>>16)&4294901760)>>>16)>>>1)>>>0).toString(16),n=(t>>>0).toString(16);return r.padStart(8,"0")+n.padStart(8,"0")}}])&&a(t.prototype,r),o&&a(t,o),e}();t.MurmurHash3_64=o},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.OperatorList=void 0;var a=r(4);function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw i}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=u(e);if(t){var i=u(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),e}function d(e,t,r,n,a){for(var i=e,o=0,s=t.length-1;o<s;o++){var c=t[o];i=i[c]||(i[c]=[])}i[t[t.length-1]]={checkFn:r,iterateFn:n,processFn:a}}var p=[];d(p,[a.OPS.save,a.OPS.transform,a.OPS.paintInlineImageXObject,a.OPS.restore],null,function(e,t){var r=e.fnArray,n=(t-(e.iCurr-3))%4;switch(n){case 0:return r[t]===a.OPS.save;case 1:return r[t]===a.OPS.transform;case 2:return r[t]===a.OPS.paintInlineImageXObject;case 3:return r[t]===a.OPS.restore}throw new Error("iterateInlineImageGroup - invalid pos: ".concat(n))},function(e,t){var r=e.fnArray,n=e.argsArray,i=e.iCurr,o=i-3,s=i-2,c=i-1,u=Math.min(Math.floor((t-o)/4),200);if(u<10)return t-(t-o)%4;for(var l=0,f=[],h=0,d=1,p=1,g=0;g<u;g++){var m=n[s+(g<<2)],v=n[c+(g<<2)][0];d+v.width>1e3&&(l=Math.max(l,d),p+=h+2,d=0,h=0),f.push({transform:m,x:d,y:p,w:v.width,h:v.height}),d+=v.width+2,h=Math.max(h,v.height)}for(var y=Math.max(l,d)+1,b=p+h+1,w=new Uint8ClampedArray(y*b*4),k=y<<2,S=0;S<u;S++){var x=n[c+(S<<2)][0].data,A=f[S].w<<2,O=0,C=f[S].x+f[S].y*y<<2;w.set(x.subarray(0,A),C-k);for(var T=0,F=f[S].h;T<F;T++)w.set(x.subarray(O,O+A),C),O+=A,C+=k;for(w.set(x.subarray(O-A,O),C);C>=0;)x[C-4]=x[C],x[C-3]=x[C+1],x[C-2]=x[C+2],x[C-1]=x[C+3],x[C+A]=x[C+A-4],x[C+A+1]=x[C+A-3],x[C+A+2]=x[C+A-2],x[C+A+3]=x[C+A-1],C-=k}return r.splice(o,4*u,a.OPS.paintInlineImageXObjectGroup),n.splice(o,4*u,[{width:y,height:b,kind:a.ImageKind.RGBA_32BPP,data:w},f]),o+1}),d(p,[a.OPS.save,a.OPS.transform,a.OPS.paintImageMaskXObject,a.OPS.restore],null,function(e,t){var r=e.fnArray,n=(t-(e.iCurr-3))%4;switch(n){case 0:return r[t]===a.OPS.save;case 1:return r[t]===a.OPS.transform;case 2:return r[t]===a.OPS.paintImageMaskXObject;case 3:return r[t]===a.OPS.restore}throw new Error("iterateImageMaskGroup - invalid pos: ".concat(n))},function(e,t){var r=e.fnArray,n=e.argsArray,i=e.iCurr,o=i-3,s=i-2,c=i-1,u=Math.floor((t-o)/4);if((u=function(e,t,r,n){var i,o=e+2;for(i=0;i<t;i++){var s=n[o+4*i],c=1===s.length&&s[0];if(!c||1!==c.width||1!==c.height||c.data.length&&(1!==c.data.length||0!==c.data[0]))break;r[o+4*i]=a.OPS.paintSolidColorImageMask}return t-i}(o,u,r,n))<10)return t-(t-o)%4;var l,f,h=!1,d=n[c][0],p=n[s][0],g=n[s][1],m=n[s][2],v=n[s][3];if(g===m){h=!0,l=s+4;for(var y=c+4,b=1;b<u;b++,l+=4,y+=4)if(f=n[l],n[y][0]!==d||f[0]!==p||f[1]!==g||f[2]!==m||f[3]!==v){b<10?h=!1:u=b;break}}if(h){u=Math.min(u,1e3);var w=new Float32Array(2*u);l=s;for(var k=0;k<u;k++,l+=4)f=n[l],w[k<<1]=f[4],w[1+(k<<1)]=f[5];r.splice(o,4*u,a.OPS.paintImageMaskXObjectRepeat),n.splice(o,4*u,[d,p,g,m,v,w])}else{u=Math.min(u,100);for(var S=[],x=0;x<u;x++){f=n[s+(x<<2)];var A=n[c+(x<<2)][0];S.push({data:A.data,width:A.width,height:A.height,transform:f})}r.splice(o,4*u,a.OPS.paintImageMaskXObjectGroup),n.splice(o,4*u,[S])}return o+1}),d(p,[a.OPS.save,a.OPS.transform,a.OPS.paintImageXObject,a.OPS.restore],function(e){var t=e.argsArray,r=e.iCurr-2;return 0===t[r][1]&&0===t[r][2]},function(e,t){var r=e.fnArray,n=e.argsArray,i=(t-(e.iCurr-3))%4;switch(i){case 0:return r[t]===a.OPS.save;case 1:if(r[t]!==a.OPS.transform)return!1;var o=e.iCurr-2,s=n[o][0],c=n[o][3];return n[t][0]===s&&0===n[t][1]&&0===n[t][2]&&n[t][3]===c;case 2:if(r[t]!==a.OPS.paintImageXObject)return!1;var u=n[e.iCurr-1][0];return n[t][0]===u;case 3:return r[t]===a.OPS.restore}throw new Error("iterateImageGroup - invalid pos: ".concat(i))},function(e,t){var r=e.fnArray,n=e.argsArray,i=e.iCurr,o=i-3,s=i-2,c=n[i-1][0],u=n[s][0],l=n[s][3],f=Math.min(Math.floor((t-o)/4),1e3);if(f<3)return t-(t-o)%4;for(var h=new Float32Array(2*f),d=s,p=0;p<f;p++,d+=4){var g=n[d];h[p<<1]=g[4],h[1+(p<<1)]=g[5]}var m=[c,u,l,h];return r.splice(o,4*f,a.OPS.paintImageXObjectRepeat),n.splice(o,4*f,m),o+1}),d(p,[a.OPS.beginText,a.OPS.setFont,a.OPS.setTextMatrix,a.OPS.showText,a.OPS.endText],null,function(e,t){var r=e.fnArray,n=e.argsArray,i=(t-(e.iCurr-4))%5;switch(i){case 0:return r[t]===a.OPS.beginText;case 1:return r[t]===a.OPS.setFont;case 2:return r[t]===a.OPS.setTextMatrix;case 3:if(r[t]!==a.OPS.showText)return!1;var o=e.iCurr-3,s=n[o][0],c=n[o][1];return n[t][0]===s&&n[t][1]===c;case 4:return r[t]===a.OPS.endText}throw new Error("iterateShowTextGroup - invalid pos: ".concat(i))},function(e,t){var r=e.fnArray,n=e.argsArray,a=e.iCurr,i=a-4,o=a-3,s=a-2,c=a-1,u=a,l=n[o][0],f=n[o][1],h=Math.min(Math.floor((t-i)/5),1e3);if(h<3)return t-(t-i)%5;var d=i;i>=4&&r[i-4]===r[o]&&r[i-3]===r[s]&&r[i-2]===r[c]&&r[i-1]===r[u]&&n[i-4][0]===l&&n[i-4][1]===f&&(h++,d-=5);for(var p=d+4,g=1;g<h;g++)r.splice(p,3),n.splice(p,3),p+=2;return p+1});var g=function(){function e(t){l(this,e),this.queue=t}return h(e,[{key:"_optimize",value:function(){}},{key:"push",value:function(e,t){this.queue.fnArray.push(e),this.queue.argsArray.push(t),this._optimize()}},{key:"flush",value:function(){}},{key:"reset",value:function(){}}]),e}(),m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(r,g);var t=c(r);function r(e){var n;return l(this,r),(n=t.call(this,e)).state=null,n.context={iCurr:0,fnArray:e.fnArray,argsArray:e.argsArray},n.match=null,n.lastProcessed=0,n}return h(r,[{key:"_optimize",value:function(){var e=this.queue.fnArray,t=this.lastProcessed,r=e.length,n=this.state,a=this.match;if(n||a||t+1!==r||p[e[t]]){for(var i=this.context;t<r;){if(a){if((0,a.iterateFn)(i,t)){t++;continue}if(t=(0,a.processFn)(i,t+1),a=null,n=null,t>=(r=e.length))break}(n=(n||p)[e[t]])&&!Array.isArray(n)?(i.iCurr=t,t++,!n.checkFn||(0,n.checkFn)(i)?(a=n,n=null):n=null):t++}this.state=n,this.match=a,this.lastProcessed=t}else this.lastProcessed=r}},{key:"flush",value:function(){for(;this.match;){var e=this.queue.fnArray.length;this.lastProcessed=(0,this.match.processFn)(this.context,e),this.match=null,this.state=null,this._optimize()}}},{key:"reset",value:function(){this.state=null,this.match=null,this.lastProcessed=0}}]),r}(),v=function(){function e(t,r){l(this,e),this._streamSink=r,this.fnArray=[],this.argsArray=[],this.optimizer=r&&"oplist"!==t?new m(this):new g(this),this.dependencies=new Set,this._totalLength=0,this.weight=0,this._resolved=r?null:Promise.resolve()}return h(e,[{key:"length",get:function(){return this.argsArray.length}},{key:"ready",get:function(){return this._resolved||this._streamSink.ready}},{key:"totalLength",get:function(){return this._totalLength+this.length}},{key:"addOp",value:function(t,r){this.optimizer.push(t,r),this.weight++,this._streamSink&&(this.weight>=e.CHUNK_SIZE?this.flush():this.weight>=e.CHUNK_SIZE_ABOUT&&(t===a.OPS.restore||t===a.OPS.endText)&&this.flush())}},{key:"addDependency",value:function(e){this.dependencies.has(e)||(this.dependencies.add(e),this.addOp(a.OPS.dependency,[e]))}},{key:"addDependencies",value:function(e){var t,r=i(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;this.addDependency(n)}}catch(e){r.e(e)}finally{r.f()}}},{key:"addOpList",value:function(t){if(t instanceof e){var r,n=i(t.dependencies);try{for(n.s();!(r=n.n()).done;){var o=r.value;this.dependencies.add(o)}}catch(e){n.e(e)}finally{n.f()}for(var s=0,c=t.length;s<c;s++)this.addOp(t.fnArray[s],t.argsArray[s])}else(0,a.warn)('addOpList - ignoring invalid "opList" parameter.')}},{key:"getIR",value:function(){return{fnArray:this.fnArray,argsArray:this.argsArray,length:this.length}}},{key:"_transfers",get:function(){for(var e=[],t=this.fnArray,r=this.argsArray,n=this.length,i=0;i<n;i++)switch(t[i]){case a.OPS.paintInlineImageXObject:case a.OPS.paintInlineImageXObjectGroup:case a.OPS.paintImageMaskXObject:var o=r[i][0];o.cached||e.push(o.data.buffer)}return e}},{key:"flush",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.optimizer.flush();var t=this.length;this._totalLength+=t,this._streamSink.enqueue({fnArray:this.fnArray,argsArray:this.argsArray,lastChunk:e,length:t},1,this._transfers),this.dependencies.clear(),this.fnArray.length=0,this.argsArray.length=0,this.weight=0,this.optimizer.reset()}}],[{key:"CHUNK_SIZE",get:function(){return(0,a.shadow)(this,"CHUNK_SIZE",1e3)}},{key:"CHUNK_SIZE_ABOUT",get:function(){return(0,a.shadow)(this,"CHUNK_SIZE_ABOUT",e.CHUNK_SIZE-5)}}]),e}();t.OperatorList=v},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFImage=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),a=r(4),i=r(113),o=r(122),s=r(127),c=r(135),u=r(138);function l(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r,n){return(e=t+e*r)<0?e=0:e>n&&(e=n),e}function d(e,t,r,n,a,i){var o,s=a*i;o=t<=8?new Uint8Array(s):t<=16?new Uint16Array(s):new Uint32Array(s);var c,u,l,f,h=r/a,d=n/i,p=0,g=new Uint16Array(a),m=r;for(c=0;c<a;c++)g[c]=Math.floor(c*h);for(c=0;c<i;c++)for(l=Math.floor(c*d)*m,u=0;u<a;u++)f=l+g[u],o[p++]=e[f];return o}var p=function(){function e(t){var r=t.xref,n=t.res,s=t.image,c=t.isInline,l=void 0!==c&&c,f=t.smask,h=void 0===f?null:f,d=t.mask,p=void 0===d?null:d,g=t.isMask,m=void 0!==g&&g,v=t.pdfFunctionFactory,y=t.localColorSpaceCache;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.image=s;var b=s.dict,w=b.get("Filter");if((0,i.isName)(w))switch(w.name){case"JPXDecode":var k=new u.JpxImage;k.parseImageProperties(s.stream),s.stream.reset(),s.width=k.width,s.height=k.height,s.bitsPerComponent=k.bitsPerComponent,s.numComps=k.componentsCount;break;case"JBIG2Decode":s.bitsPerComponent=1,s.numComps=1}var S=b.get("Width","W"),x=b.get("Height","H");if(Number.isInteger(s.width)&&s.width>0&&Number.isInteger(s.height)&&s.height>0&&(s.width!==S||s.height!==x)&&((0,a.warn)("PDFImage - using the Width/Height of the image data, rather than the image dictionary."),S=s.width,x=s.height),S<1||x<1)throw new a.FormatError("Invalid image width: ".concat(S," or height: ").concat(x));this.width=S,this.height=x,this.interpolate=b.get("Interpolate","I")||!1,this.imageMask=b.get("ImageMask","IM")||!1,this.matte=b.get("Matte")||!1;var A=s.bitsPerComponent;if(!A&&!(A=b.get("BitsPerComponent","BPC"))){if(!this.imageMask)throw new a.FormatError("Bits per component missing in image: ".concat(this.imageMask));A=1}if(this.bpc=A,!this.imageMask){var O=b.getRaw("ColorSpace")||b.getRaw("CS");if(!O)switch((0,a.info)("JPX images (which do not require color spaces)"),s.numComps){case 1:O=i.Name.get("DeviceGray");break;case 3:O=i.Name.get("DeviceRGB");break;case 4:O=i.Name.get("DeviceCMYK");break;default:throw new Error("JPX images with ".concat(s.numComps," ")+"color components not supported.")}this.colorSpace=o.ColorSpace.parse({cs:O,xref:r,resources:l?n:null,pdfFunctionFactory:v,localColorSpaceCache:y}),this.numComps=this.colorSpace.numComps}if(this.decode=b.getArray("Decode","D"),this.needsDecode=!1,this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode,A)||m&&!o.ColorSpace.isDefaultDecode(this.decode,1))){this.needsDecode=!0;var C=(1<<A)-1;this.decodeCoefficients=[],this.decodeAddends=[];for(var T=this.colorSpace&&"Indexed"===this.colorSpace.name,F=0,_=0;F<this.decode.length;F+=2,++_){var P=this.decode[F],I=this.decode[F+1];this.decodeCoefficients[_]=T?(I-P)/C:I-P,this.decodeAddends[_]=T?P:C*P}}if(h)this.smask=new e({xref:r,res:n,image:h,isInline:l,pdfFunctionFactory:v,localColorSpaceCache:y});else if(p){if((0,i.isStream)(p))p.dict.get("ImageMask","IM")?this.mask=new e({xref:r,res:n,image:p,isInline:l,isMask:!0,pdfFunctionFactory:v,localColorSpaceCache:y}):(0,a.warn)("Ignoring /Mask in image without /ImageMask.");else this.mask=p}}var t,r,p;return t=e,r=[{key:"drawWidth",get:function(){return Math.max(this.width,this.smask&&this.smask.width||0,this.mask&&this.mask.width||0)}},{key:"drawHeight",get:function(){return Math.max(this.height,this.smask&&this.smask.height||0,this.mask&&this.mask.height||0)}},{key:"decodeBuffer",value:function(e){var t,r,n=this.bpc,a=this.numComps,i=this.decodeAddends,o=this.decodeCoefficients,s=(1<<n)-1;if(1!==n){var c=0;for(t=0,r=this.width*this.height;t<r;t++)for(var u=0;u<a;u++)e[c]=h(e[c],i[u],o[u],s),c++}else for(t=0,r=e.length;t<r;t++)e[t]=+!e[t]}},{key:"getComponents",value:function(e){var t=this.bpc;if(8===t)return e;var r,n=this.width,a=this.height,i=this.numComps,o=n*a*i,s=0;r=t<=8?new Uint8Array(o):t<=16?new Uint16Array(o):new Uint32Array(o);var c,u,l=n*i,f=(1<<t)-1,h=0;if(1===t)for(var d,p,g,m=0;m<a;m++){for(p=h+(-8&l),g=h+l;h<p;)u=e[s++],r[h]=u>>7&1,r[h+1]=u>>6&1,r[h+2]=u>>5&1,r[h+3]=u>>4&1,r[h+4]=u>>3&1,r[h+5]=u>>2&1,r[h+6]=u>>1&1,r[h+7]=1&u,h+=8;if(h<g)for(u=e[s++],d=128;h<g;)r[h++]=+!!(u&d),d>>=1}else{var v=0;for(u=0,h=0,c=o;h<c;++h){for(h%l==0&&(u=0,v=0);v<t;)u=u<<8|e[s++],v+=8;var y=v-t,b=u>>y;b<0?b=0:b>f&&(b=f),r[h]=b,u&=(1<<y)-1,v=y}}return r}},{key:"fillOpacity",value:function(t,r,n,i,o){var s,c,u,l,f,h,p=this.smask,g=this.mask;if(p)c=p.width,u=p.height,s=new Uint8ClampedArray(c*u),p.fillGrayBuffer(s),c===r&&u===n||(s=d(s,p.bpc,c,u,r,n));else if(g)if(g instanceof e){for(c=g.width,u=g.height,s=new Uint8ClampedArray(c*u),g.numComps=1,g.fillGrayBuffer(s),l=0,f=c*u;l<f;++l)s[l]=255-s[l];c===r&&u===n||(s=d(s,g.bpc,c,u,r,n))}else{if(!Array.isArray(g))throw new a.FormatError("Unknown mask format.");s=new Uint8ClampedArray(r*n);var m=this.numComps;for(l=0,f=r*n;l<f;++l){var v=0,y=l*m;for(h=0;h<m;++h){var b=o[y+h],w=2*h;if(b<g[w]||b>g[w+1]){v=255;break}}s[l]=v}}if(s)for(l=0,h=3,f=r*i;l<f;++l,h+=4)t[h]=s[l];else for(l=0,h=3,f=r*i;l<f;++l,h+=4)t[h]=255}},{key:"undoPreblend",value:function(e,t,r){var n=this.smask&&this.smask.matte;if(n)for(var a=this.colorSpace.getRgb(n,0),i=a[0],o=a[1],s=a[2],c=t*r*4,u=0;u<c;u+=4){var l=e[u+3];if(0!==l){var f=255/l;e[u]=(e[u]-i)*f+i,e[u+1]=(e[u+1]-o)*f+o,e[u+2]=(e[u+2]-s)*f+s}else e[u]=255,e[u+1]=255,e[u+2]=255}}},{key:"createImageData",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=this.drawWidth,n=this.drawHeight,i={width:r,height:n,kind:0,data:null},o=this.numComps,u=this.width,l=this.height,f=this.bpc,h=u*o*f+7>>3;if(!t){var d;if("DeviceGray"===this.colorSpace.name&&1===f?d=a.ImageKind.GRAYSCALE_1BPP:"DeviceRGB"!==this.colorSpace.name||8!==f||this.needsDecode||(d=a.ImageKind.RGB_24BPP),d&&!this.smask&&!this.mask&&r===u&&n===l){if(i.kind=d,e=this.getImageBytes(l*h),this.image instanceof s.DecodeStream)i.data=e;else{var p=new Uint8ClampedArray(e.length);p.set(e),i.data=p}if(this.needsDecode){(0,a.assert)(d===a.ImageKind.GRAYSCALE_1BPP,"PDFImage.createImageData: The image must be grayscale.");for(var g=i.data,m=0,v=g.length;m<v;m++)g[m]^=255}return i}if(this.image instanceof c.JpegStream&&!this.smask&&!this.mask){var y=l*h;switch(this.colorSpace.name){case"DeviceGray":y*=3;case"DeviceRGB":case"DeviceCMYK":return i.kind=a.ImageKind.RGB_24BPP,i.data=this.getImageBytes(y,r,n,!0),i}}}var b,w,k=0|(e=this.getImageBytes(l*h)).length/h*n/l,S=this.getComponents(e);return t||this.smask||this.mask?(i.kind=a.ImageKind.RGBA_32BPP,i.data=new Uint8ClampedArray(r*n*4),b=1,w=!0,this.fillOpacity(i.data,r,n,k,S)):(i.kind=a.ImageKind.RGB_24BPP,i.data=new Uint8ClampedArray(r*n*3),b=0,w=!1),this.needsDecode&&this.decodeBuffer(S),this.colorSpace.fillRgb(i.data,u,l,r,n,k,f,S,b),w&&this.undoPreblend(i.data,r,k),i}},{key:"fillGrayBuffer",value:function(e){var t=this.numComps;if(1!==t)throw new a.FormatError("Reading gray scale from a color image: ".concat(t));var r,n,i=this.width,o=this.height,s=this.bpc,c=i*t*s+7>>3,u=this.getImageBytes(o*c),l=this.getComponents(u);if(1!==s){this.needsDecode&&this.decodeBuffer(l),n=i*o;var f=255/((1<<s)-1);for(r=0;r<n;++r)e[r]=f*l[r]}else if(n=i*o,this.needsDecode)for(r=0;r<n;++r)e[r]=l[r]-1&255;else for(r=0;r<n;++r)e[r]=255&-l[r]}},{key:"getImageBytes",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.image.reset(),this.image.drawWidth=t||this.width,this.image.drawHeight=r||this.height,this.image.forceRGB=!!n,this.image.getBytes(e,!0)}}],p=[{key:"buildImage",value:function(){var t,r=(t=n.default.mark(function t(r){var o,s,c,u,l,f,h,d,p,g,m,v;return n.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=r.xref,s=r.res,c=r.image,u=r.isInline,l=void 0!==u&&u,f=r.pdfFunctionFactory,h=r.localColorSpaceCache,d=c,p=null,g=null,m=c.dict.get("SMask"),v=c.dict.get("Mask"),m?p=m:v&&((0,i.isStream)(v)||Array.isArray(v)?g=v:(0,a.warn)("Unsupported mask format.")),t.abrupt("return",new e({xref:o,res:s,image:d,isInline:l,smask:p,mask:g,pdfFunctionFactory:f,localColorSpaceCache:h}));case 8:case"end":return t.stop()}},t)}),function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(e){l(i,n,a,o,s,"next",e)}function s(e){l(i,n,a,o,s,"throw",e)}o(void 0)})});return function(e){return r.apply(this,arguments)}}()},{key:"createMask",value:function(e){var t,r,n=e.imgArray,a=e.width,i=e.height,o=e.imageIsFromDecodeStream,s=e.inverseDecode,c=(a+7>>3)*i,u=n.byteLength;if(!o||s&&!(c===u))if(s)for((t=new Uint8ClampedArray(c)).set(n),r=u;r<c;r++)t[r]=255;else(t=new Uint8ClampedArray(u)).set(n);else t=n;if(s)for(r=0;r<u;r++)t[r]^=255;return{data:t,width:a,height:i}}}],r&&f(t.prototype,r),p&&f(t,p),e}();t.PDFImage=p},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Catalog=void 0;var n=r(113),a=r(117),i=r(4),o=r(166),s=r(122),c=r(167),u=r(159),l=r(168),f=r(170);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||m(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=m(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function m(e,t){if(e){if("string"==typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function b(e){return e instanceof n.Dict&&(e=e.get("D")),Array.isArray(e)?e:null}var w=function(){function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pdfManager=t,this.xref=r,this._catDict=r.getCatalogObj(),!(0,n.isDict)(this._catDict))throw new i.FormatError("Catalog object is not a dictionary.");this.fontCache=new n.RefSetCache,this.builtInCMapCache=new Map,this.globalImageCache=new u.GlobalImageCache,this.pageKidsCountCache=new n.RefSetCache,this.pageIndexCache=new n.RefSetCache,this.nonBlendModesSet=new n.RefSet}var t,r,m;return t=e,m=[{key:"parseDestDictionary",value:function(e){var t=e.destDict;if((0,n.isDict)(t)){var r=e.resultObj;if("object"===h(r)){var a,o,s=e.docBaseUrl||null,c=t.get("A");if((0,n.isDict)(c)||(t.has("Dest")?c=t.get("Dest"):(c=t.get("AA"),(0,n.isDict)(c)&&(c.has("D")?c=c.get("D"):c.has("U")&&(c=c.get("U"))))),(0,n.isDict)(c)){var u=c.get("S");if(!(0,n.isName)(u))return void(0,i.warn)("parseDestDictionary: Invalid type in Action dictionary.");var l=u.name;switch(l){case"URI":a=c.get("URI"),(0,n.isName)(a)?a="/"+a.name:(0,i.isString)(a)&&(a=function(e){return e.startsWith("www.")?"http://".concat(e):e}(a));break;case"GoTo":o=c.get("D");break;case"Launch":case"GoToR":var f=c.get("F");(0,n.isDict)(f)?a=f.get("F")||null:(0,i.isString)(f)&&(a=f);var d=c.get("D");if(d&&((0,n.isName)(d)&&(d=d.name),(0,i.isString)(a))){var p=a.split("#")[0];(0,i.isString)(d)?a=p+"#"+d:Array.isArray(d)&&(a=p+"#"+JSON.stringify(d))}var g=c.get("NewWindow");(0,i.isBool)(g)&&(r.newWindow=g);break;case"Named":var m=c.get("N");(0,n.isName)(m)&&(r.action=m.name);break;case"JavaScript":var v,y=c.get("JS");if((0,n.isStream)(y)?v=y.getString():(0,i.isString)(y)&&(v=y),v){var b=new RegExp("^\\s*("+["app.launchURL","window.open"].join("|").split(".").join("\\.")+")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))","i").exec((0,i.stringToPDFString)(v));if(b&&b[2]){a=b[2],"true"===b[3]&&"app.launchURL"===b[1]&&(r.newWindow=!0);break}}default:if("JavaScript"===l||"ResetForm"===l||"SubmitForm"===l)break;(0,i.warn)('parseDestDictionary - unsupported action: "'.concat(l,'".'))}}else t.has("Dest")&&(o=t.get("Dest"));if((0,i.isString)(a)){a=function(e){try{return(0,i.stringToUTF8String)(e)}catch(t){return e}}(a);var w=(0,i.createValidAbsoluteUrl)(a,s);w&&(r.url=w.href),r.unsafeUrl=a}o&&((0,n.isName)(o)&&(o=o.name),((0,i.isString)(o)||Array.isArray(o))&&(r.dest=o))}else(0,i.warn)("parseDestDictionary: `resultObj` must be an object.")}else(0,i.warn)("parseDestDictionary: `destDict` must be a dictionary.")}}],(r=[{key:"version",get:function(){var e=this._catDict.get("Version");return(0,n.isName)(e)?(0,i.shadow)(this,"version",e.name):(0,i.shadow)(this,"version",null)}},{key:"collection",get:function(){var e=null;try{var t=this._catDict.get("Collection");(0,n.isDict)(t)&&t.size>0&&(e=t)}catch(e){if(e instanceof a.MissingDataException)throw e;(0,i.info)("Cannot fetch Collection entry; assuming no collection is present.")}return(0,i.shadow)(this,"collection",e)}},{key:"acroForm",get:function(){var e=null;try{var t=this._catDict.get("AcroForm");(0,n.isDict)(t)&&t.size>0&&(e=t)}catch(e){if(e instanceof a.MissingDataException)throw e;(0,i.info)("Cannot fetch AcroForm entry; assuming no forms are present.")}return(0,i.shadow)(this,"acroForm",e)}},{key:"metadata",get:function(){var e=this._catDict.getRaw("Metadata");if(!(0,n.isRef)(e))return(0,i.shadow)(this,"metadata",null);var t=!(this.xref.encrypt&&this.xref.encrypt.encryptMetadata),r=this.xref.fetch(e,t),o=null;if((0,n.isStream)(r)&&(0,n.isDict)(r.dict)){var s=r.dict.get("Type"),c=r.dict.get("Subtype");if((0,n.isName)(s,"Metadata")&&(0,n.isName)(c,"XML"))try{var u=(0,i.stringToUTF8String)(r.getString());u&&(o=new l.MetadataParser(u).serializable)}catch(e){if(e instanceof a.MissingDataException)throw e;(0,i.info)("Skipping invalid metadata.")}}return(0,i.shadow)(this,"metadata",o)}},{key:"markInfo",get:function(){var e=null;try{e=this._readMarkInfo()}catch(e){if(e instanceof a.MissingDataException)throw e;(0,i.warn)("Unable to read mark info.")}return(0,i.shadow)(this,"markInfo",e)}},{key:"_readMarkInfo",value:function(){var e=this._catDict.get("MarkInfo");if(!(0,n.isDict)(e))return null;var t=Object.assign(Object.create(null),{Marked:!1,UserProperties:!1,Suspects:!1});for(var r in t)if(e.has(r)){var a=e.get(r);(0,i.isBool)(a)&&(t[r]=a)}return t}},{key:"structTreeRoot",get:function(){var e=null;try{e=this._readStructTreeRoot()}catch(e){if(e instanceof a.MissingDataException)throw e;(0,i.warn)("Unable read to structTreeRoot info.")}return(0,i.shadow)(this,"structTreeRoot",e)}},{key:"_readStructTreeRoot",value:function(){var e=this._catDict.get("StructTreeRoot");if(!(0,n.isDict)(e))return null;var t=new f.StructTreeRoot(e);return t.init(),t}},{key:"toplevelPagesDict",get:function(){var e=this._catDict.get("Pages");if(!(0,n.isDict)(e))throw new i.FormatError("Invalid top-level pages dictionary.");return(0,i.shadow)(this,"toplevelPagesDict",e)}},{key:"documentOutline",get:function(){var e=null;try{e=this._readDocumentOutline()}catch(e){if(e instanceof a.MissingDataException)throw e;(0,i.warn)("Unable to read document outline.")}return(0,i.shadow)(this,"documentOutline",e)}},{key:"_readDocumentOutline",value:function(){var t=this._catDict.get("Outlines");if(!(0,n.isDict)(t))return null;if(t=t.getRaw("First"),!(0,n.isRef)(t))return null;var r={items:[]},a=[{obj:t,parent:r}],o=new n.RefSet;o.put(t);for(var c=this.xref,u=new Uint8ClampedArray(3);a.length>0;){var l=a.shift(),f=c.fetchIfRef(l.obj);if(null!==f){if(!f.has("Title"))throw new i.FormatError("Invalid outline item encountered.");var h={url:null,dest:null};e.parseDestDictionary({destDict:f,resultObj:h,docBaseUrl:this.pdfManager.docBaseUrl});var d=f.get("Title"),p=f.get("F")||0,g=f.getArray("C"),m=f.get("Count"),v=u;!Array.isArray(g)||3!==g.length||0===g[0]&&0===g[1]&&0===g[2]||(v=s.ColorSpace.singletons.rgb.getRgb(g,0));var y={dest:h.dest,url:h.url,unsafeUrl:h.unsafeUrl,newWindow:h.newWindow,title:(0,i.stringToPDFString)(d),color:v,count:Number.isInteger(m)?m:void 0,bold:!!(2&p),italic:!!(1&p),items:[]};l.parent.items.push(y),t=f.getRaw("First"),(0,n.isRef)(t)&&!o.has(t)&&(a.push({obj:t,parent:y}),o.put(t)),t=f.getRaw("Next"),(0,n.isRef)(t)&&!o.has(t)&&(a.push({obj:t,parent:l.parent}),o.put(t))}}return r.items.length>0?r.items:null}},{key:"permissions",get:function(){var e=null;try{e=this._readPermissions()}catch(e){if(e instanceof a.MissingDataException)throw e;(0,i.warn)("Unable to read permissions.")}return(0,i.shadow)(this,"permissions",e)}},{key:"_readPermissions",value:function(){var e=this.xref.trailer.get("Encrypt");if(!(0,n.isDict)(e))return null;var t=e.get("P");if(!(0,i.isNum)(t))return null;t+=Math.pow(2,32);var r=[];for(var a in i.PermissionFlag){var o=i.PermissionFlag[a];t&o&&r.push(o)}return r}},{key:"optionalContentConfig",get:function(){var e=null;try{var t=this._catDict.get("OCProperties");if(!t)return(0,i.shadow)(this,"optionalContentConfig",null);var r=t.get("D");if(!r)return(0,i.shadow)(this,"optionalContentConfig",null);var o=t.get("OCGs");if(!Array.isArray(o))return(0,i.shadow)(this,"optionalContentConfig",null);var s,c=[],u=[],l=g(o);try{for(l.s();!(s=l.n()).done;){var f=s.value;if((0,n.isRef)(f)){u.push(f);var h=this.xref.fetchIfRef(f);c.push({id:f.toString(),name:(0,i.isString)(h.get("Name"))?(0,i.stringToPDFString)(h.get("Name")):null,intent:(0,i.isString)(h.get("Intent"))?(0,i.stringToPDFString)(h.get("Intent")):null})}}}catch(e){l.e(e)}finally{l.f()}(e=this._readOptionalContentConfig(r,u)).groups=c}catch(e){if(e instanceof a.MissingDataException)throw e;(0,i.warn)("Unable to read optional content config: ".concat(e))}return(0,i.shadow)(this,"optionalContentConfig",e)}},{key:"_readOptionalContentConfig",value:function(e,t){function r(e){var r=[];if(Array.isArray(e)){var a,i=g(e);try{for(i.s();!(a=i.n()).done;){var o=a.value;(0,n.isRef)(o)&&(t.includes(o)&&r.push(o.toString()))}}catch(e){i.e(e)}finally{i.f()}}return r}function a(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!Array.isArray(e))return null;var a,i=[],s=g(e);try{for(s.s();!(a=s.n()).done;){var u=a.value;if((0,n.isRef)(u)&&t.includes(u))c.put(u),i.push(u.toString());else{var l=o(u,r);l&&i.push(l)}}}catch(e){s.e(e)}finally{s.f()}if(r>0)return i;var f,h=[],d=g(t);try{for(d.s();!(f=d.n()).done;){var p=f.value;c.has(p)||h.push(p.toString())}}catch(e){d.e(e)}finally{d.f()}return h.length&&i.push({name:null,order:h}),i}function o(e,t){if(++t>u)return(0,i.warn)("parseNestedOrder - reached MAX_NESTED_LEVELS."),null;var r=s.fetchIfRef(e);if(!Array.isArray(r))return null;var n=s.fetchIfRef(r[0]);if("string"!=typeof n)return null;var o=a(r.slice(1),t);return o&&o.length?{name:(0,i.stringToPDFString)(n),order:o}:null}var s=this.xref,c=new n.RefSet,u=10;return{name:(0,i.isString)(e.get("Name"))?(0,i.stringToPDFString)(e.get("Name")):null,creator:(0,i.isString)(e.get("Creator"))?(0,i.stringToPDFString)(e.get("Creator")):null,baseState:(0,n.isName)(e.get("BaseState"))?e.get("BaseState").name:null,on:r(e.get("ON")),off:r(e.get("OFF")),order:a(e.get("Order")),groups:null}}},{key:"numPages",get:function(){var e=this.toplevelPagesDict.get("Count");if(!Number.isInteger(e))throw new i.FormatError("Page count in top-level pages dictionary is not an integer.");return(0,i.shadow)(this,"numPages",e)}},{key:"destinations",get:function(){var e=this._readDests(),t=Object.create(null);if(e instanceof o.NameTree){var r,a=g(e.getAll());try{for(a.s();!(r=a.n()).done;){var s=p(r.value,2),c=s[0],u=b(s[1]);u&&(t[c]=u)}}catch(e){a.e(e)}finally{a.f()}}else e instanceof n.Dict&&e.forEach(function(e,r){var n=b(r);n&&(t[e]=n)});return(0,i.shadow)(this,"destinations",t)}},{key:"getDestination",value:function(e){var t=this._readDests();if(t instanceof o.NameTree){var r=b(t.get(e));if(r)return r;var a=this.destinations[e];if(a)return(0,i.warn)('Found "'.concat(e,'" at an incorrect position in the NameTree.')),a}else if(t instanceof n.Dict){var s=b(t.get(e));if(s)return s}return null}},{key:"_readDests",value:function(){var e=this._catDict.get("Names");return e&&e.has("Dests")?new o.NameTree(e.getRaw("Dests"),this.xref):this._catDict.has("Dests")?this._catDict.get("Dests"):void 0}},{key:"pageLabels",get:function(){var e=null;try{e=this._readPageLabels()}catch(e){if(e instanceof a.MissingDataException)throw e;(0,i.warn)("Unable to read page labels.")}return(0,i.shadow)(this,"pageLabels",e)}},{key:"_readPageLabels",value:function(){var e=this._catDict.getRaw("PageLabels");if(!e)return null;for(var t=new Array(this.numPages),r=null,s="",c=new o.NumberTree(e,this.xref).getAll(),u="",l=1,f=0,h=this.numPages;f<h;f++){var d=c.get(f);if(void 0!==d){if(!(0,n.isDict)(d))throw new i.FormatError("PageLabel is not a dictionary.");if(d.has("Type")&&!(0,n.isName)(d.get("Type"),"PageLabel"))throw new i.FormatError("Invalid type in PageLabel dictionary.");if(d.has("S")){var p=d.get("S");if(!(0,n.isName)(p))throw new i.FormatError("Invalid style in PageLabel dictionary.");r=p.name}else r=null;if(d.has("P")){var g=d.get("P");if(!(0,i.isString)(g))throw new i.FormatError("Invalid prefix in PageLabel dictionary.");s=(0,i.stringToPDFString)(g)}else s="";if(d.has("St")){var m=d.get("St");if(!(Number.isInteger(m)&&m>=1))throw new i.FormatError("Invalid start in PageLabel dictionary.");l=m}else l=1}switch(r){case"D":u=l;break;case"R":case"r":u=(0,a.toRomanNumerals)(l,"r"===r);break;case"A":case"a":for(var v="a"===r?97:65,y=l-1,b=String.fromCharCode(v+y%26),w=[],k=0,S=y/26|0;k<=S;k++)w.push(b);u=w.join("");break;default:if(r)throw new i.FormatError('Invalid style "'.concat(r,'" in PageLabel dictionary.'));u=""}t[f]=s+u,l++}return t}},{key:"pageLayout",get:function(){var e=this._catDict.get("PageLayout"),t="";if((0,n.isName)(e))switch(e.name){case"SinglePage":case"OneColumn":case"TwoColumnLeft":case"TwoColumnRight":case"TwoPageLeft":case"TwoPageRight":t=e.name}return(0,i.shadow)(this,"pageLayout",t)}},{key:"pageMode",get:function(){var e=this._catDict.get("PageMode"),t="UseNone";if((0,n.isName)(e))switch(e.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"FullScreen":case"UseOC":case"UseAttachments":t=e.name}return(0,i.shadow)(this,"pageMode",t)}},{key:"viewerPreferences",get:function(){var e=this,t={HideToolbar:i.isBool,HideMenubar:i.isBool,HideWindowUI:i.isBool,FitWindow:i.isBool,CenterWindow:i.isBool,DisplayDocTitle:i.isBool,NonFullScreenPageMode:n.isName,Direction:n.isName,ViewArea:n.isName,ViewClip:n.isName,PrintArea:n.isName,PrintClip:n.isName,PrintScaling:n.isName,Duplex:n.isName,PickTrayByPDFSize:i.isBool,PrintPageRange:Array.isArray,NumCopies:Number.isInteger},r=this._catDict.get("ViewerPreferences"),a=null;if((0,n.isDict)(r))for(var o in t)if(r.has(o)){var s=r.get(o);if(t[o](s)){var c=void 0;switch(o){case"NonFullScreenPageMode":switch(s.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"UseOC":c=s.name;break;default:c="UseNone"}break;case"Direction":switch(s.name){case"L2R":case"R2L":c=s.name;break;default:c="L2R"}break;case"ViewArea":case"ViewClip":case"PrintArea":case"PrintClip":switch(s.name){case"MediaBox":case"CropBox":case"BleedBox":case"TrimBox":case"ArtBox":c=s.name;break;default:c="CropBox"}break;case"PrintScaling":switch(s.name){case"None":case"AppDefault":c=s.name;break;default:c="AppDefault"}break;case"Duplex":switch(s.name){case"Simplex":case"DuplexFlipShortEdge":case"DuplexFlipLongEdge":c=s.name;break;default:c="None"}break;case"PrintPageRange":if(s.length%2!=0)break;s.every(function(t,r,n){return Number.isInteger(t)&&t>0&&(0===r||t>=n[r-1])&&t<=e.numPages})&&(c=s);break;case"NumCopies":s>0&&(c=s);break;default:if("boolean"!=typeof s)throw new i.FormatError("viewerPreferences - expected a boolean value for: ".concat(o));c=s}void 0!==c?(a||(a=Object.create(null)),a[o]=c):(0,i.info)('Bad value in ViewerPreferences for "'.concat(o,'".'))}else(0,i.info)('Bad value in ViewerPreferences for "'.concat(o,'".'))}return(0,i.shadow)(this,"viewerPreferences",a)}},{key:"openAction",get:function(){var t=this._catDict.get("OpenAction"),r=Object.create(null);if((0,n.isDict)(t)){var a=new n.Dict(this.xref);a.set("A",t);var o={url:null,dest:null,action:null};e.parseDestDictionary({destDict:a,resultObj:o}),Array.isArray(o.dest)?r.dest=o.dest:o.action&&(r.action=o.action)}else Array.isArray(t)&&(r.dest=t);return(0,i.shadow)(this,"openAction",(0,i.objectSize)(r)>0?r:null)}},{key:"attachments",get:function(){var e=this._catDict.get("Names"),t=null;if(e instanceof n.Dict&&e.has("EmbeddedFiles")){var r,a=g(new o.NameTree(e.getRaw("EmbeddedFiles"),this.xref).getAll());try{for(a.s();!(r=a.n()).done;){var s=p(r.value,2),u=s[0],l=s[1],f=new c.FileSpec(l,this.xref);t||(t=Object.create(null)),t[(0,i.stringToPDFString)(u)]=f.serializable}}catch(e){a.e(e)}finally{a.f()}}return(0,i.shadow)(this,"attachments",t)}},{key:"_collectJavaScript",value:function(){var e=this._catDict.get("Names"),t=null;function r(e,r){if(r instanceof n.Dict&&(0,n.isName)(r.get("S"),"JavaScript")){var a=r.get("JS");if((0,n.isStream)(a))a=a.getString();else if("string"!=typeof a)return;null===t&&(t=new Map),t.set(e,(0,i.stringToPDFString)(a))}}if(e instanceof n.Dict&&e.has("JavaScript")){var a,s=g(new o.NameTree(e.getRaw("JavaScript"),this.xref).getAll());try{for(s.s();!(a=s.n()).done;){var c=p(a.value,2);r(c[0],c[1])}}catch(e){s.e(e)}finally{s.f()}}var u=this._catDict.get("OpenAction");return u&&r("OpenAction",u),t}},{key:"javaScript",get:function(){var e=this._collectJavaScript();return(0,i.shadow)(this,"javaScript",e?d(e.values()):null)}},{key:"jsActions",get:function(){var e=this._collectJavaScript(),t=(0,a.collectActions)(this.xref,this._catDict,i.DocumentActionEventType);if(e){t||(t=Object.create(null));var r,n=g(e);try{for(n.s();!(r=n.n()).done;){var o=p(r.value,2),s=o[0],c=o[1];s in t?t[s].push(c):t[s]=[c]}}catch(e){n.e(e)}finally{n.f()}}return(0,i.shadow)(this,"jsActions",t)}},{key:"fontFallback",value:function(e,t){var r=[];return this.fontCache.forEach(function(e){r.push(e)}),Promise.all(r).then(function(r){var n,a=g(r);try{for(a.s();!(n=a.n()).done;){var i=n.value;if(i.loadedName===e)return void i.fallback(t)}}catch(e){a.e(e)}finally{a.f()}})}},{key:"cleanup",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(0,n.clearPrimitiveCaches)(),this.globalImageCache.clear(t),this.pageKidsCountCache.clear(),this.pageIndexCache.clear(),this.nonBlendModesSet.clear();var r=[];return this.fontCache.forEach(function(e){r.push(e)}),Promise.all(r).then(function(t){var r,n=g(t);try{for(n.s();!(r=n.n()).done;){delete r.value.dict.cacheKey}}catch(e){n.e(e)}finally{n.f()}e.fontCache.clear(),e.builtInCMapCache.clear()})}},{key:"getPageDict",value:function(e){var t,r=(0,i.createPromiseCapability)(),a=[this._catDict.getRaw("Pages")],o=new n.RefSet,s=this.xref,c=this.pageKidsCountCache,u=0;return function l(){for(var f=function(){var f=a.pop();if((0,n.isRef)(f))return(t=c.get(f))>0&&u+t<e?(u+=t,"continue"):o.has(f)?(r.reject(new i.FormatError("Pages tree contains circular reference.")),{v:void 0}):(o.put(f),s.fetchAsync(f).then(function(t){(0,n.isDict)(t,"Page")||(0,n.isDict)(t)&&!t.has("Kids")?e===u?(f&&!c.has(f)&&c.put(f,1),r.resolve([t,f])):(u++,l()):(a.push(t),l())},r.reject),{v:void 0});if(!(0,n.isDict)(f))return r.reject(new i.FormatError("Page dictionary kid reference points to wrong type of object.")),{v:void 0};if(t=f.get("Count"),Number.isInteger(t)&&t>=0){var h=f.objId;if(h&&!c.has(h)&&c.put(h,t),u+t<=e)return u+=t,"continue"}var d=f.get("Kids");if(!Array.isArray(d))return(0,n.isName)(f.get("Type"),"Page")||!f.has("Type")&&f.has("Contents")?u===e?(r.resolve([f,null]),{v:void 0}):(u++,"continue"):(r.reject(new i.FormatError("Page dictionary kids object is not an array.")),{v:void 0});for(var p=d.length-1;p>=0;p--)a.push(d[p])};a.length;){var d=f();if("continue"!==d&&"object"===h(d))return d.v}r.reject(new Error("Page index ".concat(e," not found.")))}(),r.promise}},{key:"getPageIndex",value:function(e){var t=this,r=this.pageIndexCache.get(e);if(void 0!==r)return Promise.resolve(r);var a=this.xref;var o=0;return function r(s){return function(t){var r,o=0;return a.fetchAsync(t).then(function(a){if((0,n.isRefsEqual)(t,e)&&!(0,n.isDict)(a,"Page")&&(!(0,n.isDict)(a)||a.has("Type")||!a.has("Contents")))throw new i.FormatError("The reference does not point to a /Page dictionary.");if(!a)return null;if(!(0,n.isDict)(a))throw new i.FormatError("Node must be a dictionary.");return r=a.getRaw("Parent"),a.getAsync("Parent")}).then(function(e){if(!e)return null;if(!(0,n.isDict)(e))throw new i.FormatError("Parent must be a dictionary.");return e.getAsync("Kids")}).then(function(e){if(!e)return null;for(var s=[],c=!1,u=0,l=e.length;u<l;u++){var f=e[u];if(!(0,n.isRef)(f))throw new i.FormatError("Kid must be a reference.");if((0,n.isRefsEqual)(f,t)){c=!0;break}s.push(a.fetchAsync(f).then(function(e){if(!(0,n.isDict)(e))throw new i.FormatError("Kid node must be a dictionary.");e.has("Count")?o+=e.get("Count"):o++}))}if(!c)throw new i.FormatError("Kid reference not found in parent's kids.");return Promise.all(s).then(function(){return[o,r]})})}(s).then(function(n){if(!n)return t.pageIndexCache.put(e,o),o;var a=p(n,2),i=a[0],s=a[1];return o+=i,r(s)})}(e)}}])&&y(t.prototype,r),m&&y(t,m),e}();t.Catalog=w},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.NumberTree=t.NameTree=void 0;var a=r(4),i=r(113);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=u(e);if(t){var i=u(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var h=function(){function e(t,r,n){l(this,e),this.constructor===e&&(0,a.unreachable)("Cannot initialize NameOrNumberTree."),this.root=t,this.xref=r,this._type=n}var t,r,n;return t=e,(r=[{key:"getAll",value:function(){var e=new Map;if(!this.root)return e;var t=this.xref,r=new i.RefSet;r.put(this.root);for(var n=[this.root];n.length>0;){var o=t.fetchIfRef(n.shift());if((0,i.isDict)(o))if(o.has("Kids"))for(var s=o.get("Kids"),c=0,u=s.length;c<u;c++){var l=s[c];if(r.has(l))throw new a.FormatError('Duplicate entry in "'.concat(this._type,'" tree.'));n.push(l),r.put(l)}else{var f=o.get(this._type);if(Array.isArray(f))for(var h=0,d=f.length;h<d;h+=2)e.set(t.fetchIfRef(f[h]),t.fetchIfRef(f[h+1]))}}return e}},{key:"get",value:function(e){if(!this.root)return null;for(var t=this.xref,r=t.fetchIfRef(this.root),n=0;r.has("Kids");){if(++n>10)return(0,a.warn)('Search depth limit reached for "'.concat(this._type,'" tree.')),null;var i=r.get("Kids");if(!Array.isArray(i))return null;for(var o=0,s=i.length-1;o<=s;){var c=o+s>>1,u=t.fetchIfRef(i[c]).get("Limits");if(e<t.fetchIfRef(u[0]))s=c-1;else{if(!(e>t.fetchIfRef(u[1]))){r=t.fetchIfRef(i[c]);break}o=c+1}}if(o>s)return null}var l=r.get(this._type);if(Array.isArray(l))for(var f=0,h=l.length-2;f<=h;){var d=f+h>>1,p=d+(1&d),g=t.fetchIfRef(l[p]);if(e<g)h=p-2;else{if(!(e>g))return t.fetchIfRef(l[p+1]);f=p+2}}return null}}])&&f(t.prototype,r),n&&f(t,n),e}(),d=function(e){o(r,h);var t=c(r);function r(e,n){return l(this,r),t.call(this,e,n,"Names")}return r}();t.NameTree=d;var p=function(e){o(r,h);var t=c(r);function r(e,n){return l(this,r),t.call(this,e,n,"Nums")}return r}();t.NumberTree=p},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSpec=void 0;var n=r(113),a=r(4);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e){return e.has("UF")?e.get("UF"):e.has("F")?e.get("F"):e.has("Unix")?e.get("Unix"):e.has("Mac")?e.get("Mac"):e.has("DOS")?e.get("DOS"):null}var s=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(0,n.isDict)(t)&&(this.xref=r,this.root=t,t.has("FS")&&(this.fs=t.get("FS")),this.description=t.has("Desc")?(0,a.stringToPDFString)(t.get("Desc")):"",t.has("RF")&&(0,a.warn)("Related file specifications are not supported"),this.contentAvailable=!0,t.has("EF")||(this.contentAvailable=!1,(0,a.warn)("Non-embedded file specifications are not supported")))}var t,r,s;return t=e,(r=[{key:"filename",get:function(){if(!this._filename&&this.root){var e=o(this.root)||"unnamed";this._filename=(0,a.stringToPDFString)(e).replace(/\\\\/g,"\\").replace(/\\\//g,"/").replace(/\\/g,"/")}return this._filename}},{key:"content",get:function(){if(!this.contentAvailable)return null;!this.contentRef&&this.root&&(this.contentRef=o(this.root.get("EF")));var e=null;if(this.contentRef){var t=this.xref.fetchIfRef(this.contentRef);t&&(0,n.isStream)(t)?e=t.getBytes():(0,a.warn)("Embedded file specification points to non-existing/invalid content")}else(0,a.warn)("Embedded file specification does not have a content");return e}},{key:"serializable",get:function(){return{filename:this.filename,content:this.content}}}])&&i(t.prototype,r),s&&i(t,s),e}();t.FileSpec=s},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataParser=void 0;var n=r(169);function a(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=o(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw i}}}}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||o(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this._repair(t);var r=new n.SimpleXMLParser({lowerCaseName:!0}).parseFromString(t);this._metadataMap=new Map,this._data=t,r&&this._parse(r)}var t,r,o;return t=e,(r=[{key:"_repair",value:function(e){return e.replace(/^[^<]+/,"").replace(/>\\376\\377([^<]+)/g,function(e,t){for(var r=t.replace(/\\([0-3])([0-7])([0-7])/g,function(e,t,r,n){return String.fromCharCode(64*t+8*r+1*n)}).replace(/&(amp|apos|gt|lt|quot);/g,function(e,t){switch(t){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw new Error("_repair: ".concat(t," isn't defined."))}),n=[],a=0,i=r.length;a<i;a+=2){var o=256*r.charCodeAt(a)+r.charCodeAt(a+1);o>=32&&o<127&&60!==o&&62!==o&&38!==o?n.push(String.fromCharCode(o)):n.push("&#x"+(65536+o).toString(16).substring(1)+";")}return">"+n.join("")})}},{key:"_getSequence",value:function(e){var t=e.nodeName;return"rdf:bag"!==t&&"rdf:seq"!==t&&"rdf:alt"!==t?null:e.childNodes.filter(function(e){return"rdf:li"===e.nodeName})}},{key:"_parseArray",value:function(e){if(e.hasChildNodes()){var t=i(e.childNodes,1)[0],r=this._getSequence(t)||[];this._metadataMap.set(e.nodeName,r.map(function(e){return e.textContent.trim()}))}}},{key:"_parse",value:function(e){var t=e.documentElement;if("rdf:rdf"!==t.nodeName)for(t=t.firstChild;t&&"rdf:rdf"!==t.nodeName;)t=t.nextSibling;if(t&&"rdf:rdf"===t.nodeName&&t.hasChildNodes()){var r,n=a(t.childNodes);try{for(n.s();!(r=n.n()).done;){var i=r.value;if("rdf:description"===i.nodeName){var o,s=a(i.childNodes);try{for(s.s();!(o=s.n()).done;){var c=o.value,u=c.nodeName;switch(u){case"#text":continue;case"dc:creator":case"dc:subject":this._parseArray(c);continue}this._metadataMap.set(u,c.textContent.trim())}}catch(e){s.e(e)}finally{s.f()}}}}catch(e){n.e(e)}finally{n.f()}}}},{key:"serializable",get:function(){return{parsedData:this._metadataMap,rawData:this._data}}}])&&c(t.prototype,r),o&&c(t,o),e}();t.MetadataParser=u},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.XMLParserErrorCode=t.XMLParserBase=t.SimpleXMLParser=t.SimpleDOMNode=void 0;var a=r(117);function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=s(e);if(t){var i=s(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),e}var g={NoError:0,EndOfDocument:-1,UnterminatedCdat:-2,UnterminatedXmlDeclaration:-3,UnterminatedDoctypeDeclaration:-4,UnterminatedComment:-5,MalformedElement:-6,OutOfMemory:-7,UnterminatedAttributeValue:-8,UnterminatedElement:-9,ElementNeverBegun:-10};function m(e,t){var r=e[t];return" "===r||"\n"===r||"\r"===r||"\t"===r}t.XMLParserErrorCode=g;var v=function(){function e(){h(this,e)}return p(e,[{key:"_resolveEntities",value:function(e){var t=this;return e.replace(/&([^;]+);/g,function(e,r){if("#x"===r.substring(0,2))return String.fromCodePoint(parseInt(r.substring(2),16));if("#"===r.substring(0,1))return String.fromCodePoint(parseInt(r.substring(1),10));switch(r){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"';case"apos":return"'"}return t.onResolveEntity(r)})}},{key:"_parseContent",value:function(e,t){var r=[],n=t;function a(){for(;n<e.length&&m(e,n);)++n}for(;n<e.length&&!m(e,n)&&">"!==e[n]&&"/"!==e[n];)++n;var i=e.substring(t,n);for(a();n<e.length&&">"!==e[n]&&"/"!==e[n]&&"?"!==e[n];){a();for(var o,s="";n<e.length&&!m(e,n)&&"="!==e[n];)s+=e[n],++n;if(a(),"="!==e[n])return null;++n,a();var c=e[n];if('"'!==c&&"'"!==c)return null;var u=e.indexOf(c,++n);if(u<0)return null;o=e.substring(n,u),r.push({name:s,value:this._resolveEntities(o)}),n=u+1,a()}return{name:i,attributes:r,parsed:n-t}}},{key:"_parseProcessingInstruction",value:function(e,t){var r=t;for(;r<e.length&&!m(e,r)&&">"!==e[r]&&"?"!==e[r]&&"/"!==e[r];)++r;var n=e.substring(t,r);!function(){for(;r<e.length&&m(e,r);)++r}();for(var a=r;r<e.length&&("?"!==e[r]||">"!==e[r+1]);)++r;return{name:n,value:e.substring(a,r),parsed:r-t}}},{key:"parseXml",value:function(e){for(var t=0;t<e.length;){var r=t;if("<"===e[t]){var n=void 0;switch(e[++r]){case"/":if(++r,(n=e.indexOf(">",r))<0)return void this.onError(g.UnterminatedElement);this.onEndElement(e.substring(r,n)),r=n+1;break;case"?":++r;var a=this._parseProcessingInstruction(e,r);if("?>"!==e.substring(r+a.parsed,r+a.parsed+2))return void this.onError(g.UnterminatedXmlDeclaration);this.onPi(a.name,a.value),r+=a.parsed+2;break;case"!":if("--"===e.substring(r+1,r+3)){if((n=e.indexOf("--\x3e",r+3))<0)return void this.onError(g.UnterminatedComment);this.onComment(e.substring(r+3,n)),r=n+3}else if("[CDATA["===e.substring(r+1,r+8)){if((n=e.indexOf("]]>",r+8))<0)return void this.onError(g.UnterminatedCdat);this.onCdata(e.substring(r+8,n)),r=n+3}else{if("DOCTYPE"!==e.substring(r+1,r+8))return void this.onError(g.MalformedElement);var i=e.indexOf("[",r+8),o=!1;if((n=e.indexOf(">",r+8))<0)return void this.onError(g.UnterminatedDoctypeDeclaration);if(i>0&&n>i){if((n=e.indexOf("]>",r+8))<0)return void this.onError(g.UnterminatedDoctypeDeclaration);o=!0}var s=e.substring(r+8,n+(o?1:0));this.onDoctype(s),r=n+(o?2:1)}break;default:var c=this._parseContent(e,r);if(null===c)return void this.onError(g.MalformedElement);var u=!1;if("/>"===e.substring(r+c.parsed,r+c.parsed+2))u=!0;else if(">"!==e.substring(r+c.parsed,r+c.parsed+1))return void this.onError(g.UnterminatedElement);this.onBeginElement(c.name,c.attributes,u),r+=c.parsed+(u?2:1)}}else{for(;r<e.length&&"<"!==e[r];)r++;var l=e.substring(t,r);this.onText(this._resolveEntities(l))}t=r}}},{key:"onResolveEntity",value:function(e){return"&".concat(e,";")}},{key:"onPi",value:function(e,t){}},{key:"onComment",value:function(e){}},{key:"onCdata",value:function(e){}},{key:"onDoctype",value:function(e){}},{key:"onText",value:function(e){}},{key:"onBeginElement",value:function(e,t,r){}},{key:"onEndElement",value:function(e){}},{key:"onError",value:function(e){}}]),e}();t.XMLParserBase=v;var y=function(){function e(t,r){h(this,e),this.nodeName=t,this.nodeValue=r,Object.defineProperty(this,"parentNode",{value:null,writable:!0})}return p(e,[{key:"firstChild",get:function(){return this.childNodes&&this.childNodes[0]}},{key:"nextSibling",get:function(){var e=this.parentNode.childNodes;if(e){var t=e.indexOf(this);if(-1!==t)return e[t+1]}}},{key:"textContent",get:function(){return this.childNodes?this.childNodes.map(function(e){return e.textContent}).join(""):this.nodeValue||""}},{key:"hasChildNodes",value:function(){return this.childNodes&&this.childNodes.length>0}},{key:"searchNode",value:function(e,t){if(t>=e.length)return this;for(var r=e[t],n=[],a=this;;){if(r.name===a.nodeName){if(0!==r.pos){if(0===n.length)return null;var i,o=0,s=c(u(n.pop(),1)[0].childNodes);try{for(s.s();!(i=s.n()).done;){var l=i.value;if(r.name===l.nodeName){if(o===r.pos)return l.searchNode(e,t+1);o++}}}catch(e){s.e(e)}finally{s.f()}return a.searchNode(e,t+1)}var f=a.searchNode(e,t+1);if(null!==f)return f}if(a.childNodes&&0!==a.childNodes.length)n.push([a,0]),a=a.childNodes[0];else{if(0===n.length)return null;for(;0!==n.length;){var h=u(n.pop(),2),d=h[0],p=h[1]+1;if(p<d.childNodes.length){n.push([d,p]),a=d.childNodes[p];break}}if(0===n.length)return null}}}},{key:"dump",value:function(e){if("#text"!==this.nodeName){if(e.push("<".concat(this.nodeName)),this.attributes){var t,r=c(this.attributes);try{for(r.s();!(t=r.n()).done;){var n=t.value;e.push(" ".concat(n.name,'="').concat((0,a.encodeToXmlString)(n.value),'"'))}}catch(e){r.e(e)}finally{r.f()}}if(this.hasChildNodes()){e.push(">");var i,o=c(this.childNodes);try{for(o.s();!(i=o.n()).done;){i.value.dump(e)}}catch(e){o.e(e)}finally{o.f()}e.push("</".concat(this.nodeName,">"))}else this.nodeValue?e.push(">".concat((0,a.encodeToXmlString)(this.nodeValue),"</").concat(this.nodeName,">")):e.push("/>")}else e.push((0,a.encodeToXmlString)(this.nodeValue))}}]),e}();t.SimpleDOMNode=y;var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(r,v);var t=o(r);function r(e){var n,a=e.hasAttributes,i=void 0!==a&&a,o=e.lowerCaseName,s=void 0!==o&&o;return h(this,r),(n=t.call(this))._currentFragment=null,n._stack=null,n._errorCode=g.NoError,n._hasAttributes=i,n._lowerCaseName=s,n}return p(r,[{key:"parseFromString",value:function(e){if(this._currentFragment=[],this._stack=[],this._errorCode=g.NoError,this.parseXml(e),this._errorCode===g.NoError){var t=u(this._currentFragment,1)[0];if(t)return{documentElement:t}}}},{key:"onText",value:function(e){if(!function(e){for(var t=0,r=e.length;t<r;t++)if(!m(e,t))return!1;return!0}(e)){var t=new y("#text",e);this._currentFragment.push(t)}}},{key:"onCdata",value:function(e){var t=new y("#text",e);this._currentFragment.push(t)}},{key:"onBeginElement",value:function(e,t,r){this._lowerCaseName&&(e=e.toLowerCase());var n=new y(e);n.childNodes=[],this._hasAttributes&&(n.attributes=t),this._currentFragment.push(n),r||(this._stack.push(this._currentFragment),this._currentFragment=n.childNodes)}},{key:"onEndElement",value:function(e){this._currentFragment=this._stack.pop()||[];var t=this._currentFragment[this._currentFragment.length-1];if(t)for(var r=0,n=t.childNodes.length;r<n;r++)t.childNodes[r].parentNode=t}},{key:"onError",value:function(e){this._errorCode=e}}]),r}();t.SimpleXMLParser=b},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StructTreeRoot=t.StructTreePage=void 0;var n=r(113),a=r(4),i=r(166);function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){c=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(c)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),e}var f=40,h={PAGE_CONTENT:"PAGE_CONTENT",STREAM_CONTENT:"STREAM_CONTENT",OBJECT:"OBJECT",ELEMENT:"ELEMENT"},d=function(){function e(t){c(this,e),this.dict=t,this.roleMap=new Map}return l(e,[{key:"init",value:function(){this.readRoleMap()}},{key:"readRoleMap",value:function(){var e=this,t=this.dict.get("RoleMap");(0,n.isDict)(t)&&t.forEach(function(t,r){(0,n.isName)(r)&&e.roleMap.set(t,r.name)})}}]),e}();t.StructTreeRoot=d;var p=function(){function e(t,r){c(this,e),this.tree=t,this.dict=r,this.kids=[],this.parseKids()}return l(e,[{key:"role",get:function(){var e=this.dict.get("S"),t=(0,n.isName)(e)?e.name:"",r=this.tree.root;return r.roleMap.has(t)?r.roleMap.get(t):t}},{key:"parseKids",value:function(){var e=null,t=this.dict.getRaw("Pg");(0,n.isRef)(t)&&(e=t.toString());var r=this.dict.get("K");if(Array.isArray(r)){var a,i=o(r);try{for(i.s();!(a=i.n()).done;){var s=a.value,c=this.parseKid(e,s);c&&this.kids.push(c)}}catch(e){i.e(e)}finally{i.f()}}else{var u=this.parseKid(e,r);u&&this.kids.push(u)}}},{key:"parseKid",value:function(e,t){if(Number.isInteger(t))return this.tree.pageDict.objId!==e?null:new g({type:h.PAGE_CONTENT,mcid:t,pageObjId:e});var r=null;if((0,n.isRef)(t)?r=this.dict.xref.fetch(t):(0,n.isDict)(t)&&(r=t),!r)return null;var a=r.getRaw("Pg");(0,n.isRef)(a)&&(e=a.toString());var i=(0,n.isName)(r.get("Type"))?r.get("Type").name:null;return"MCR"===i?this.tree.pageDict.objId!==e?null:new g({type:h.STREAM_CONTENT,refObjId:(0,n.isRef)(r.getRaw("Stm"))?r.getRaw("Stm").toString():null,pageObjId:e,mcid:r.get("MCID")}):"OBJR"===i?this.tree.pageDict.objId!==e?null:new g({type:h.OBJECT,refObjId:(0,n.isRef)(r.getRaw("Obj"))?r.getRaw("Obj").toString():null,pageObjId:e}):new g({type:h.ELEMENT,dict:r})}}]),e}(),g=function e(t){var r=t.type,n=t.dict,a=void 0===n?null:n,i=t.mcid,o=void 0===i?null:i,s=t.pageObjId,u=void 0===s?null:s,l=t.refObjId,f=void 0===l?null:l;c(this,e),this.type=r,this.dict=a,this.mcid=o,this.pageObjId=u,this.refObjId=f,this.parentNode=null},m=function(){function e(t,r){c(this,e),this.root=t,this.rootDict=t?t.dict:null,this.pageDict=r,this.nodes=[]}return l(e,[{key:"parse",value:function(){if(this.root&&this.rootDict){var e=this.rootDict.get("ParentTree");if(e){var t=this.pageDict.get("StructParents");if(Number.isInteger(t)){var r=new i.NumberTree(e,this.rootDict.xref).get(t);if(Array.isArray(r)){var a,s=new Map,c=o(r);try{for(c.s();!(a=c.n()).done;){var u=a.value;(0,n.isRef)(u)&&this.addNode(this.rootDict.xref.fetch(u),s)}}catch(e){c.e(e)}finally{c.f()}}}}}}},{key:"addNode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(r>f)return(0,a.warn)("StructTree MAX_DEPTH reached."),null;if(t.has(e))return t.get(e);var i=new p(this,e);t.set(e,i);var s=e.get("P");if(!s||(0,n.isName)(s.get("Type"),"StructTreeRoot"))return this.addTopLevelNode(e,i)||t.delete(e),i;var c=this.addNode(s,t,r+1);if(!c)return i;var u,l=!1,d=o(c.kids);try{for(d.s();!(u=d.n()).done;){var g=u.value;g.type===h.ELEMENT&&g.dict===e&&(g.parentNode=i,l=!0)}}catch(e){d.e(e)}finally{d.f()}return l||t.delete(e),i}},{key:"addTopLevelNode",value:function(e,t){var r=this.rootDict.get("K");if(!r)return!1;if((0,n.isDict)(r))return r.objId===e.objId&&(this.nodes[0]=t,!0);if(!Array.isArray(r))return!0;for(var a=!1,i=0;i<r.length;i++){var o=r[i];o&&o.toString()===e.objId&&(this.nodes[i]=t,a=!0)}return a}},{key:"serializable",get:function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(n>f)(0,a.warn)("StructTree too deep to be fully serialized.");else{var i=Object.create(null);i.role=t.role,i.children=[],r.children.push(i);var s=t.dict.get("Alt");(0,a.isString)(s)&&(i.alt=(0,a.stringToPDFString)(s));var c,u=o(t.kids);try{for(u.s();!(c=u.n()).done;){var l=c.value,d=l.type===h.ELEMENT?l.parentNode:null;d?e(d,i,n+1):l.type===h.PAGE_CONTENT||l.type===h.STREAM_CONTENT?i.children.push({type:"content",id:"page".concat(l.pageObjId,"_mcid").concat(l.mcid)}):l.type===h.OBJECT&&i.children.push({type:"object",id:l.refObjId})}}catch(e){u.e(e)}finally{u.f()}}}var t=Object.create(null);t.children=[],t.role="Root";var r,n=o(this.nodes);try{for(n.s();!(r=n.n()).done;){var i=r.value;i&&e(i,t)}}catch(e){n.e(e)}finally{n.f()}return t}}]),e}();t.StructTreePage=m},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectLoader=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),a=r(113),i=r(117),o=r(4);function s(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function c(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(e){s(i,n,a,o,c,"next",e)}function c(e){s(i,n,a,o,c,"throw",e)}o(void 0)})}}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){if(e instanceof a.Dict)e=e.getRawValues();else if((0,a.isStream)(e))e=e.dict.getRawValues();else if(!Array.isArray(e))return;var r,n,i=l(e);try{for(i.s();!(r=i.n()).done;){var o=r.value;((n=o)instanceof a.Ref||n instanceof a.Dict||Array.isArray(n)||(0,a.isStream)(n))&&t.push(o)}}catch(e){i.e(e)}finally{i.f()}}var d=function(){function e(t,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.dict=t,this.keys=r,this.xref=n,this.refSet=null}var t,r,s;return t=e,(r=[{key:"load",value:function(){var e=c(n.default.mark(function e(){var t,r,i,o,s,c;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.xref.stream.isDataLoaded){e.next=2;break}return e.abrupt("return",void 0);case 2:for(t=this.keys,r=this.dict,this.refSet=new a.RefSet,i=[],o=0,s=t.length;o<s;o++)void 0!==(c=r.getRaw(t[o]))&&i.push(c);return e.abrupt("return",this._walk(i));case 7:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"_walk",value:function(){var e=c(n.default.mark(function e(t){var r,s,c,u,f,d,p,g,m,v,y,b;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=[],s=[];case 2:if(!t.length){e.next=48;break}if(!((c=t.pop())instanceof a.Ref)){e.next=21;break}if(!this.refSet.has(c)){e.next=7;break}return e.abrupt("continue",2);case 7:e.prev=7,this.refSet.put(c),c=this.xref.fetch(c),e.next=21;break;case 12:if(e.prev=12,e.t0=e.catch(7),e.t0 instanceof i.MissingDataException){e.next=19;break}return(0,o.warn)('ObjectLoader._walk - requesting all data: "'.concat(e.t0,'".')),this.refSet=null,u=this.xref.stream.manager,e.abrupt("return",u.requestAllChunks());case 19:r.push(c),s.push({begin:e.t0.begin,end:e.t0.end});case 21:if(!(0,a.isStream)(c)){e.next=45;break}if(!(f=c.getBaseStreams())){e.next=45;break}d=!1,p=l(f),e.prev=26,p.s();case 28:if((g=p.n()).done){e.next=36;break}if(!(m=g.value).isDataLoaded){e.next=32;break}return e.abrupt("continue",34);case 32:d=!0,s.push({begin:m.start,end:m.end});case 34:e.next=28;break;case 36:e.next=41;break;case 38:e.prev=38,e.t1=e.catch(26),p.e(e.t1);case 41:return e.prev=41,p.f(),e.finish(41);case 44:d&&r.push(c);case 45:h(c,t),e.next=2;break;case 48:if(!s.length){e.next=54;break}return e.next=51,this.xref.stream.manager.requestRanges(s);case 51:v=l(r);try{for(v.s();!(y=v.n()).done;)(b=y.value)instanceof a.Ref&&this.refSet.remove(b)}catch(e){v.e(e)}finally{v.f()}return e.abrupt("return",this._walk(r));case 54:return this.refSet=null,e.abrupt("return",void 0);case 56:case"end":return e.stop()}},e,this,[[7,12],[26,38,41,44]])}));return function(t){return e.apply(this,arguments)}}()}])&&u(t.prototype,r),s&&u(t,s),e}();t.ObjectLoader=d},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.incrementalUpdate=function(e){var t=e.originalData,r=e.xrefInfo,l=e.newRefs,h=e.xref,g=void 0===h?null:h,m=e.datasetsRef;!function(e,t,r){if(null===e||null===r)return;var a,s=r.fetchIfRef(e).getString(),u=new o.SimpleXMLParser({hasAttributes:!0}).parseFromString(s),l=c(t);try{for(l.s();!(a=l.n()).done;){var f=a.value.xfa;if(f){var h=f.path,d=f.value;if(h){var p=u.documentElement.searchNode((0,i.parseXFAPath)(h),0);p?p.childNodes=[new o.SimpleDOMNode("#text",d)]:(0,n.warn)("Node not found for path: ".concat(h))}}}}catch(e){l.e(e)}finally{l.f()}var g=[];u.documentElement.dump(g);var m=g.join(""),v=r.encrypt;if(v){var y=v.createCipherTransform(e.num,e.gen);m=y.encryptString(m)}var b="".concat(e.num," ").concat(e.gen," obj\n")+"<< /Type /EmbeddedFile /Length ".concat(m.length,">>\nstream\n")+m+"\nendstream\nendobj\n";t.push({ref:e,data:b})}(void 0===m?null:m,l,g);var v,y,b=new a.Dict(null),w=r.newRef,k=t[t.length-1];10===k||13===k?(v=[],y=t.length):(v=["\n"],y=t.length+1);b.set("Size",w.num+1),b.set("Prev",r.startXRef),b.set("Type",a.Name.get("XRef")),null!==r.rootRef&&b.set("Root",r.rootRef);null!==r.infoRef&&b.set("Info",r.infoRef);null!==r.encryptRef&&b.set("Encrypt",r.encryptRef);l.push({ref:w,data:""}),l=l.sort(function(e,t){return e.ref.num-t.ref.num});var S,x=[[0,1,65535]],A=[0,1],O=0,C=c(l);try{for(C.s();!(S=C.n()).done;){var T=S.value,F=T.ref,_=T.data;O=Math.max(O,y),x.push([1,y,Math.min(F.gen,65535)]),y+=_.length,A.push(F.num,1),v.push(_)}}catch(e){C.e(e)}finally{C.f()}if(b.set("Index",A),Array.isArray(r.fileIds)&&r.fileIds.length>0){var P=function(e,t){for(var r=Math.floor(Date.now()/1e3),a=t.filename||"",i=[r.toString(),a,e.toString()],o=i.reduce(function(e,t){return e+t.length},0),c=0,u=Object.values(t.info);c<u.length;c++){var l=u[c];i.push(l),o+=l.length}for(var f=new Uint8Array(o),h=0,d=0,g=i;d<g.length;d++){var m=g[d];p(m,h,f),h+=m.length}return(0,n.bytesToString)((0,s.calculateMD5)(f))}(y,r);b.set("ID",[r.fileIds[0],P])}var I=[1,Math.ceil(Math.log2(O)/8),2],E=(I[0]+I[1]+I[2])*x.length;b.set("W",I),b.set("Length",E),v.push("".concat(w.num," ").concat(w.gen," obj\n")),f(b,v,null),v.push(" stream\n");var j=v.reduce(function(e,t){return e+t.length},0),R="\nendstream\nendobj\nstartxref\n".concat(y,"\n%%EOF\n"),M=new Uint8Array(t.length+j+E+R.length);M.set(t);var N,B=t.length,D=c(v);try{for(D.s();!(N=D.n()).done;){var L=N.value;p(L,B,M),B+=L.length}}catch(e){D.e(e)}finally{D.f()}for(var U=0,q=x;U<q.length;U++){var X=(G=q[U],W=3,function(e){if(Array.isArray(e))return e}(G)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(G,W)||u(G,W)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),H=X[0],$=X[1],z=X[2];B=d(H,I[0],B,M),B=d($,I[1],B,M),B=d(z,I[2],B,M)}var G,W;return p(R,B,M),M},t.writeDict=f;var n=r(4),a=r(113),i=r(117),o=r(169),s=r(173);function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function u(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t,r){t.push("<<");var n,a=c(e.getKeys());try{for(a.s();!(n=a.n()).done;){var o=n.value;t.push(" /".concat((0,i.escapePDFName)(o)," ")),h(e.getRaw(o),t,r)}}catch(e){a.e(e)}finally{a.f()}t.push(">>")}function h(e,t,r){(0,a.isName)(e)?t.push("/".concat((0,i.escapePDFName)(e.name))):(0,a.isRef)(e)?t.push("".concat(e.num," ").concat(e.gen," R")):Array.isArray(e)?function(e,t,r){t.push("[");var n,a=!0,i=c(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;a?a=!1:t.push(" "),h(o,t,r)}}catch(e){i.e(e)}finally{i.f()}t.push("]")}(e,t,r):"string"==typeof e?(null!==r&&(e=r.encryptString(e)),t.push("(".concat((0,n.escapeString)(e),")"))):"number"==typeof e?t.push(function(e){if(Number.isInteger(e))return e.toString();var t=Math.round(100*e);return t%100==0?(t/100).toString():t%10==0?e.toFixed(1):e.toFixed(2)}(e)):(0,a.isDict)(e)?f(e,t,r):(0,a.isStream)(e)&&function(e,t,r){f(e.dict,t,r),t.push(" stream\n");var n=e.getString();null!==r&&(n=r.encryptString(n)),t.push(n,"\nendstream\n")}(e,t,r)}function d(e,t,r,n){for(var a=t+r-1;a>r-1;a--)n[a]=255&e,e>>=8;return r+t}function p(e,t,r){for(var n=0,a=e.length;n<a;n++)r[t+n]=255&e.charCodeAt(n)}},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.calculateSHA384=b,t.PDF20=t.PDF17=t.CipherTransformFactory=t.calculateSHA512=t.calculateSHA256=t.calculateMD5=t.ARCFourCipher=t.AES256Cipher=t.AES128Cipher=void 0;var a=r(4),i=r(113),o=r(174);function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),e}var p=function(){function e(t){f(this,e),this.a=0,this.b=0;for(var r=new Uint8Array(256),n=t.length,a=0;a<256;++a)r[a]=a;for(var i=0,o=0;i<256;++i){var s=r[i];o=o+s+t[i%n]&255,r[i]=r[o],r[o]=s}this.s=r}return d(e,[{key:"encryptBlock",value:function(e){for(var t=this.a,r=this.b,n=this.s,a=e.length,i=new Uint8Array(a),o=0;o<a;++o){var s=n[t=t+1&255],c=n[r=r+s&255];n[t]=c,n[r]=s,i[o]=e[o]^n[s+c&255]}return this.a=t,this.b=r,i}},{key:"decryptBlock",value:function(e){return this.encryptBlock(e)}},{key:"encrypt",value:function(e){return this.encryptBlock(e)}}]),e}();t.ARCFourCipher=p;var g=function(){var e=new Uint8Array([7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21]),t=new Int32Array([-680876936,-389564586,606105819,-1044525330,-176418897,1200080426,-1473231341,-45705983,1770035416,-1958414417,-42063,-1990404162,1804603682,-40341101,-1502002290,1236535329,-165796510,-1069501632,643717713,-373897302,-701558691,38016083,-660478335,-405537848,568446438,-1019803690,-187363961,1163531501,-1444681467,-51403784,1735328473,-1926607734,-378558,-2022574463,1839030562,-35309556,-1530992060,1272893353,-155497632,-1094730640,681279174,-358537222,-722521979,76029189,-640364487,-421815835,530742520,-995338651,-198630844,1126891415,-1416354905,-57434055,1700485571,-1894986606,-1051523,-2054922799,1873313359,-30611744,-1560198380,1309151649,-145523070,-1120210379,718787259,-343485551]);return function(r,n,a){var i,o,s=1732584193,c=-271733879,u=-1732584194,l=271733878,f=a+72&-64,h=new Uint8Array(f);for(i=0;i<a;++i)h[i]=r[n++];h[i++]=128;for(var d=f-8;i<d;)h[i++]=0;h[i++]=a<<3&255,h[i++]=a>>5&255,h[i++]=a>>13&255,h[i++]=a>>21&255,h[i++]=a>>>29&255,h[i++]=0,h[i++]=0,h[i++]=0;var p=new Int32Array(16);for(i=0;i<f;){for(o=0;o<16;++o,i+=4)p[o]=h[i]|h[i+1]<<8|h[i+2]<<16|h[i+3]<<24;var g=s,m=c,v=u,y=l,b=void 0,w=void 0;for(o=0;o<64;++o){o<16?(b=m&v|~m&y,w=o):o<32?(b=y&m|~y&v,w=5*o+1&15):o<48?(b=m^v^y,w=3*o+5&15):(b=v^(m|~y),w=7*o&15);var k=y,S=g+b+t[o]+p[w]|0,x=e[o];y=v,v=m,m=m+(S<<x|S>>>32-x)|0,g=k}s=s+g|0,c=c+m|0,u=u+v|0,l=l+y|0}return new Uint8Array([255&s,s>>8&255,s>>16&255,s>>>24&255,255&c,c>>8&255,c>>16&255,c>>>24&255,255&u,u>>8&255,u>>16&255,u>>>24&255,255&l,l>>8&255,l>>16&255,l>>>24&255])}}();t.calculateMD5=g;var m=function(){function e(t,r){f(this,e),this.high=0|t,this.low=0|r}return d(e,[{key:"and",value:function(e){this.high&=e.high,this.low&=e.low}},{key:"xor",value:function(e){this.high^=e.high,this.low^=e.low}},{key:"or",value:function(e){this.high|=e.high,this.low|=e.low}},{key:"shiftRight",value:function(e){e>=32?(this.low=this.high>>>e-32|0,this.high=0):(this.low=this.low>>>e|this.high<<32-e,this.high=this.high>>>e|0)}},{key:"shiftLeft",value:function(e){e>=32?(this.high=this.low<<e-32,this.low=0):(this.high=this.high<<e|this.low>>>32-e,this.low=this.low<<e)}},{key:"rotateRight",value:function(e){var t,r;32&e?(r=this.low,t=this.high):(t=this.low,r=this.high),e&=31,this.low=t>>>e|r<<32-e,this.high=r>>>e|t<<32-e}},{key:"not",value:function(){this.high=~this.high,this.low=~this.low}},{key:"add",value:function(e){var t=(this.low>>>0)+(e.low>>>0),r=(this.high>>>0)+(e.high>>>0);t>4294967295&&(r+=1),this.low=0|t,this.high=0|r}},{key:"copyTo",value:function(e,t){e[t]=this.high>>>24&255,e[t+1]=this.high>>16&255,e[t+2]=this.high>>8&255,e[t+3]=255&this.high,e[t+4]=this.low>>>24&255,e[t+5]=this.low>>16&255,e[t+6]=this.low>>8&255,e[t+7]=255&this.low}},{key:"assign",value:function(e){this.high=e.high,this.low=e.low}}]),e}(),v=function(){function e(e,t){return e>>>t|e<<32-t}function t(e,t,r){return e&t^~e&r}function r(e,t,r){return e&t^e&r^t&r}function n(t){return e(t,2)^e(t,13)^e(t,22)}function a(t){return e(t,6)^e(t,11)^e(t,25)}function i(t){return e(t,7)^e(t,18)^t>>>3}var o=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];return function(s,c,u){var l,f,h=1779033703,d=3144134277,p=1013904242,g=2773480762,m=1359893119,v=2600822924,y=528734635,b=1541459225,w=64*Math.ceil((u+9)/64),k=new Uint8Array(w);for(l=0;l<u;++l)k[l]=s[c++];k[l++]=128;for(var S=w-8;l<S;)k[l++]=0;k[l++]=0,k[l++]=0,k[l++]=0,k[l++]=u>>>29&255,k[l++]=u>>21&255,k[l++]=u>>13&255,k[l++]=u>>5&255,k[l++]=u<<3&255;var x,A=new Uint32Array(64);for(l=0;l<w;){for(f=0;f<16;++f)A[f]=k[l]<<24|k[l+1]<<16|k[l+2]<<8|k[l+3],l+=4;for(f=16;f<64;++f)A[f]=0|(e(x=A[f-2],17)^e(x,19)^x>>>10)+A[f-7]+i(A[f-15])+A[f-16];var O=h,C=d,T=p,F=g,_=m,P=v,I=y,E=b,j=void 0,R=void 0;for(f=0;f<64;++f)j=E+a(_)+t(_,P,I)+o[f]+A[f],R=n(O)+r(O,C,T),E=I,I=P,P=_,_=F+j|0,F=T,T=C,C=O,O=j+R|0;h=h+O|0,d=d+C|0,p=p+T|0,g=g+F|0,m=m+_|0,v=v+P|0,y=y+I|0,b=b+E|0}return new Uint8Array([h>>24&255,h>>16&255,h>>8&255,255&h,d>>24&255,d>>16&255,d>>8&255,255&d,p>>24&255,p>>16&255,p>>8&255,255&p,g>>24&255,g>>16&255,g>>8&255,255&g,m>>24&255,m>>16&255,m>>8&255,255&m,v>>24&255,v>>16&255,v>>8&255,255&v,y>>24&255,y>>16&255,y>>8&255,255&y,b>>24&255,b>>16&255,b>>8&255,255&b])}}();t.calculateSHA256=v;var y=function(){function e(e,t,r,n,a){e.assign(t),e.and(r),a.assign(t),a.not(),a.and(n),e.xor(a)}function t(e,t,r,n,a){e.assign(t),e.and(r),a.assign(t),a.and(n),e.xor(a),a.assign(r),a.and(n),e.xor(a)}function r(e,t,r){e.assign(t),e.rotateRight(28),r.assign(t),r.rotateRight(34),e.xor(r),r.assign(t),r.rotateRight(39),e.xor(r)}function n(e,t,r){e.assign(t),e.rotateRight(14),r.assign(t),r.rotateRight(18),e.xor(r),r.assign(t),r.rotateRight(41),e.xor(r)}function a(e,t,r){e.assign(t),e.rotateRight(1),r.assign(t),r.rotateRight(8),e.xor(r),r.assign(t),r.shiftRight(7),e.xor(r)}function i(e,t,r){e.assign(t),e.rotateRight(19),r.assign(t),r.rotateRight(61),e.xor(r),r.assign(t),r.shiftRight(6),e.xor(r)}var o=[new m(1116352408,3609767458),new m(1899447441,602891725),new m(3049323471,3964484399),new m(3921009573,2173295548),new m(961987163,4081628472),new m(1508970993,3053834265),new m(2453635748,2937671579),new m(2870763221,3664609560),new m(3624381080,2734883394),new m(310598401,1164996542),new m(607225278,1323610764),new m(1426881987,3590304994),new m(1925078388,4068182383),new m(2162078206,991336113),new m(2614888103,633803317),new m(3248222580,3479774868),new m(3835390401,2666613458),new m(4022224774,944711139),new m(264347078,2341262773),new m(604807628,2007800933),new m(770255983,1495990901),new m(1249150122,1856431235),new m(1555081692,3175218132),new m(1996064986,2198950837),new m(2554220882,3999719339),new m(2821834349,766784016),new m(2952996808,2566594879),new m(3210313671,3203337956),new m(3336571891,1034457026),new m(3584528711,2466948901),new m(113926993,3758326383),new m(338241895,168717936),new m(666307205,1188179964),new m(773529912,1546045734),new m(1294757372,1522805485),new m(1396182291,2643833823),new m(1695183700,2343527390),new m(1986661051,1014477480),new m(2177026350,1206759142),new m(2456956037,344077627),new m(2730485921,1290863460),new m(2820302411,3158454273),new m(3259730800,3505952657),new m(3345764771,106217008),new m(3516065817,3606008344),new m(3600352804,1432725776),new m(4094571909,1467031594),new m(275423344,851169720),new m(430227734,3100823752),new m(506948616,1363258195),new m(659060556,3750685593),new m(883997877,3785050280),new m(958139571,3318307427),new m(1322822218,3812723403),new m(1537002063,2003034995),new m(1747873779,3602036899),new m(1955562222,1575990012),new m(2024104815,1125592928),new m(2227730452,2716904306),new m(2361852424,442776044),new m(2428436474,593698344),new m(2756734187,3733110249),new m(3204031479,2999351573),new m(3329325298,3815920427),new m(3391569614,3928383900),new m(3515267271,566280711),new m(3940187606,3454069534),new m(4118630271,4000239992),new m(116418474,1914138554),new m(174292421,2731055270),new m(289380356,3203993006),new m(460393269,320620315),new m(685471733,587496836),new m(852142971,1086792851),new m(1017036298,365543100),new m(1126000580,2618297676),new m(1288033470,3409855158),new m(1501505948,4234509866),new m(1607167915,987167468),new m(1816402316,1246189591)];return function(s,c,u){var l,f,h,d,p,g,v,y,b=arguments.length>3&&void 0!==arguments[3]&&arguments[3];b?(l=new m(3418070365,3238371032),f=new m(1654270250,914150663),h=new m(2438529370,812702999),d=new m(355462360,4144912697),p=new m(1731405415,4290775857),g=new m(2394180231,1750603025),v=new m(3675008525,1694076839),y=new m(1203062813,3204075428)):(l=new m(1779033703,4089235720),f=new m(3144134277,2227873595),h=new m(1013904242,4271175723),d=new m(2773480762,1595750129),p=new m(1359893119,2917565137),g=new m(2600822924,725511199),v=new m(528734635,4215389547),y=new m(1541459225,327033209));var w,k,S=128*Math.ceil((u+17)/128),x=new Uint8Array(S);for(w=0;w<u;++w)x[w]=s[c++];x[w++]=128;for(var A=S-16;w<A;)x[w++]=0;x[w++]=0,x[w++]=0,x[w++]=0,x[w++]=0,x[w++]=0,x[w++]=0,x[w++]=0,x[w++]=0,x[w++]=0,x[w++]=0,x[w++]=0,x[w++]=u>>>29&255,x[w++]=u>>21&255,x[w++]=u>>13&255,x[w++]=u>>5&255,x[w++]=u<<3&255;var O=new Array(80);for(w=0;w<80;w++)O[w]=new m(0,0);var C,T,F=new m(0,0),_=new m(0,0),P=new m(0,0),I=new m(0,0),E=new m(0,0),j=new m(0,0),R=new m(0,0),M=new m(0,0),N=new m(0,0),B=new m(0,0),D=new m(0,0),L=new m(0,0);for(w=0;w<S;){for(k=0;k<16;++k)O[k].high=x[w]<<24|x[w+1]<<16|x[w+2]<<8|x[w+3],O[k].low=x[w+4]<<24|x[w+5]<<16|x[w+6]<<8|x[w+7],w+=8;for(k=16;k<80;++k)i(C=O[k],O[k-2],L),C.add(O[k-7]),a(D,O[k-15],L),C.add(D),C.add(O[k-16]);for(F.assign(l),_.assign(f),P.assign(h),I.assign(d),E.assign(p),j.assign(g),R.assign(v),M.assign(y),k=0;k<80;++k)N.assign(M),n(D,E,L),N.add(D),e(D,E,j,R,L),N.add(D),N.add(o[k]),N.add(O[k]),r(B,F,L),t(D,F,_,P,L),B.add(D),C=M,M=R,R=j,j=E,I.add(N),E=I,I=P,P=_,_=F,C.assign(N),C.add(B),F=C;l.add(F),f.add(_),h.add(P),d.add(I),p.add(E),g.add(j),v.add(R),y.add(M)}return b?(T=new Uint8Array(48),l.copyTo(T,0),f.copyTo(T,8),h.copyTo(T,16),d.copyTo(T,24),p.copyTo(T,32),g.copyTo(T,40)):(T=new Uint8Array(64),l.copyTo(T,0),f.copyTo(T,8),h.copyTo(T,16),d.copyTo(T,24),p.copyTo(T,32),g.copyTo(T,40),v.copyTo(T,48),y.copyTo(T,56)),T}}();function b(e,t,r){return y(e,t,r,!0)}t.calculateSHA512=y;var w=function(){function e(){f(this,e)}return d(e,[{key:"decryptBlock",value:function(e){return e}},{key:"encrypt",value:function(e){return e}}]),e}(),k=function(){function e(){f(this,e),this.constructor===e&&(0,a.unreachable)("Cannot initialize AESBaseCipher."),this._s=new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22]),this._inv_s=new Uint8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]),this._mix=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]),this._mixCol=new Uint8Array(256);for(var t=0;t<256;t++)this._mixCol[t]=t<128?t<<1:t<<1^27;this.buffer=new Uint8Array(16),this.bufferPosition=0}return d(e,[{key:"_expandKey",value:function(e){(0,a.unreachable)("Cannot call `_expandKey` on the base class")}},{key:"_decrypt",value:function(e,t){var r,n,a,i=new Uint8Array(16);i.set(e);for(var o=0,s=this._keySize;o<16;++o,++s)i[o]^=t[s];for(var c=this._cyclesOfRepetition-1;c>=1;--c){r=i[13],i[13]=i[9],i[9]=i[5],i[5]=i[1],i[1]=r,r=i[14],n=i[10],i[14]=i[6],i[10]=i[2],i[6]=r,i[2]=n,r=i[15],n=i[11],a=i[7],i[15]=i[3],i[11]=r,i[7]=n,i[3]=a;for(var u=0;u<16;++u)i[u]=this._inv_s[i[u]];for(var l=0,f=16*c;l<16;++l,++f)i[l]^=t[f];for(var h=0;h<16;h+=4){var d=this._mix[i[h]],p=this._mix[i[h+1]],g=this._mix[i[h+2]],m=this._mix[i[h+3]];r=d^p>>>8^p<<24^g>>>16^g<<16^m>>>24^m<<8,i[h]=r>>>24&255,i[h+1]=r>>16&255,i[h+2]=r>>8&255,i[h+3]=255&r}}r=i[13],i[13]=i[9],i[9]=i[5],i[5]=i[1],i[1]=r,r=i[14],n=i[10],i[14]=i[6],i[10]=i[2],i[6]=r,i[2]=n,r=i[15],n=i[11],a=i[7],i[15]=i[3],i[11]=r,i[7]=n,i[3]=a;for(var v=0;v<16;++v)i[v]=this._inv_s[i[v]],i[v]^=t[v];return i}},{key:"_encrypt",value:function(e,t){var r,n,a,i=this._s,o=new Uint8Array(16);o.set(e);for(var s=0;s<16;++s)o[s]^=t[s];for(var c=1;c<this._cyclesOfRepetition;c++){for(var u=0;u<16;++u)o[u]=i[o[u]];a=o[1],o[1]=o[5],o[5]=o[9],o[9]=o[13],o[13]=a,a=o[2],n=o[6],o[2]=o[10],o[6]=o[14],o[10]=a,o[14]=n,a=o[3],n=o[7],r=o[11],o[3]=o[15],o[7]=a,o[11]=n,o[15]=r;for(var l=0;l<16;l+=4){var f=o[l+0],h=o[l+1],d=o[l+2],p=o[l+3];r=f^h^d^p,o[l+0]^=r^this._mixCol[f^h],o[l+1]^=r^this._mixCol[h^d],o[l+2]^=r^this._mixCol[d^p],o[l+3]^=r^this._mixCol[p^f]}for(var g=0,m=16*c;g<16;++g,++m)o[g]^=t[m]}for(var v=0;v<16;++v)o[v]=i[o[v]];a=o[1],o[1]=o[5],o[5]=o[9],o[9]=o[13],o[13]=a,a=o[2],n=o[6],o[2]=o[10],o[6]=o[14],o[10]=a,o[14]=n,a=o[3],n=o[7],r=o[11],o[3]=o[15],o[7]=a,o[11]=n,o[15]=r;for(var y=0,b=this._keySize;y<16;++y,++b)o[y]^=t[b];return o}},{key:"_decryptBlock2",value:function(e,t){for(var r=e.length,n=this.buffer,a=this.bufferPosition,i=[],o=this.iv,s=0;s<r;++s)if(n[a]=e[s],!(++a<16)){for(var c=this._decrypt(n,this._key),u=0;u<16;++u)c[u]^=o[u];o=n,i.push(c),n=new Uint8Array(16),a=0}if(this.buffer=n,this.bufferLength=a,this.iv=o,0===i.length)return new Uint8Array(0);var l=16*i.length;if(t){var f=i[i.length-1],h=f[15];if(h<=16){for(var d=15,p=16-h;d>=p;--d)if(f[d]!==h){h=0;break}l-=h,i[i.length-1]=f.subarray(0,16-h)}}for(var g=new Uint8Array(l),m=0,v=0,y=i.length;m<y;++m,v+=16)g.set(i[m],v);return g}},{key:"decryptBlock",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=e.length,a=this.buffer,i=this.bufferPosition;if(r)this.iv=r;else{for(var o=0;i<16&&o<n;++o,++i)a[i]=e[o];if(i<16)return this.bufferLength=i,new Uint8Array(0);this.iv=a,e=e.subarray(16)}return this.buffer=new Uint8Array(16),this.bufferLength=0,this.decryptBlock=this._decryptBlock2,this.decryptBlock(e,t)}},{key:"encrypt",value:function(e,t){var r=e.length,n=this.buffer,a=this.bufferPosition,i=[];t||(t=new Uint8Array(16));for(var o=0;o<r;++o)if(n[a]=e[o],!(++a<16)){for(var s=0;s<16;++s)n[s]^=t[s];var c=this._encrypt(n,this._key);t=c,i.push(c),n=new Uint8Array(16),a=0}if(this.buffer=n,this.bufferLength=a,this.iv=t,0===i.length)return new Uint8Array(0);for(var u=16*i.length,l=new Uint8Array(u),f=0,h=0,d=i.length;f<d;++f,h+=16)l.set(i[f],h);return l}}]),e}(),S=function(e){s(r,k);var t=u(r);function r(e){var n;return f(this,r),(n=t.call(this))._cyclesOfRepetition=10,n._keySize=160,n._rcon=new Uint8Array([141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141]),n._key=n._expandKey(e),n}return d(r,[{key:"_expandKey",value:function(e){var t=this._s,r=this._rcon,n=new Uint8Array(176);n.set(e);for(var a=16,i=1;a<176;++i){var o=n[a-3],s=n[a-2],c=n[a-1],u=n[a-4];o=t[o],s=t[s],c=t[c],u=t[u],o^=r[i];for(var l=0;l<4;++l)n[a]=o^=n[a-16],n[++a]=s^=n[a-16],n[++a]=c^=n[a-16],n[++a]=u^=n[a-16],a++}return n}}]),r}();t.AES128Cipher=S;var x=function(e){s(r,k);var t=u(r);function r(e){var n;return f(this,r),(n=t.call(this))._cyclesOfRepetition=14,n._keySize=224,n._key=n._expandKey(e),n}return d(r,[{key:"_expandKey",value:function(e){var t=this._s,r=new Uint8Array(240);r.set(e);for(var n,a,i,o,s=1,c=32,u=1;c<240;++u){c%32==16?(n=t[n],a=t[a],i=t[i],o=t[o]):c%32==0&&(n=r[c-3],a=r[c-2],i=r[c-1],o=r[c-4],n=t[n],a=t[a],i=t[i],o=t[o],n^=s,(s<<=1)>=256&&(s=255&(27^s)));for(var l=0;l<4;++l)r[c]=n^=r[c-32],r[++c]=a^=r[c-32],r[++c]=i^=r[c-32],r[++c]=o^=r[c-32],c++}return r}}]),r}();t.AES256Cipher=x;var A=function(){function e(){f(this,e)}return d(e,[{key:"checkOwnerPassword",value:function(e,t,r,n){var i=new Uint8Array(e.length+56);i.set(e,0),i.set(t,e.length),i.set(r,e.length+t.length);var o=v(i,0,i.length);return(0,a.isArrayEqual)(o,n)}},{key:"checkUserPassword",value:function(e,t,r){var n=new Uint8Array(e.length+8);n.set(e,0),n.set(t,e.length);var i=v(n,0,n.length);return(0,a.isArrayEqual)(i,r)}},{key:"getOwnerKey",value:function(e,t,r,n){var a=new Uint8Array(e.length+56);a.set(e,0),a.set(t,e.length),a.set(r,e.length+t.length);var i=v(a,0,a.length);return new x(i).decryptBlock(n,!1,new Uint8Array(16))}},{key:"getUserKey",value:function(e,t,r){var n=new Uint8Array(e.length+8);n.set(e,0),n.set(t,e.length);var a=v(n,0,n.length);return new x(a).decryptBlock(r,!1,new Uint8Array(16))}}]),e}();t.PDF17=A;var O=function(){function e(e,t,r){for(var n=v(t,0,t.length).subarray(0,32),a=[0],i=0;i<64||a[a.length-1]>i-32;){var o=e.length+n.length+r.length,s=new Uint8Array(o),c=0;s.set(e,c),c+=e.length,s.set(n,c),c+=n.length,s.set(r,c);for(var u=new Uint8Array(64*o),l=0,f=0;l<64;l++,f+=o)u.set(s,f);a=new S(n.subarray(0,16)).encrypt(u,n.subarray(16,32));for(var h=0,d=0;d<16;d++)h*=1,h%=3,h+=(a[d]>>>0)%3,h%=3;0===h?n=v(a,0,a.length):1===h?n=b(a,0,a.length):2===h&&(n=y(a,0,a.length)),i++}return n.subarray(0,32)}return function(){function t(){f(this,t)}return d(t,[{key:"hash",value:function(t,r,n){return e(t,r,n)}},{key:"checkOwnerPassword",value:function(t,r,n,i){var o=new Uint8Array(t.length+56);o.set(t,0),o.set(r,t.length),o.set(n,t.length+r.length);var s=e(t,o,n);return(0,a.isArrayEqual)(s,i)}},{key:"checkUserPassword",value:function(t,r,n){var i=new Uint8Array(t.length+8);i.set(t,0),i.set(r,t.length);var o=e(t,i,[]);return(0,a.isArrayEqual)(o,n)}},{key:"getOwnerKey",value:function(t,r,n,a){var i=new Uint8Array(t.length+56);i.set(t,0),i.set(r,t.length),i.set(n,t.length+r.length);var o=e(t,i,n);return new x(o).decryptBlock(a,!1,new Uint8Array(16))}},{key:"getUserKey",value:function(t,r,n){var a=new Uint8Array(t.length+8);a.set(t,0),a.set(r,t.length);var i=e(t,a,[]);return new x(i).decryptBlock(n,!1,new Uint8Array(16))}}]),t}()}();t.PDF20=O;var C=function(){function e(t,r){f(this,e),this.StringCipherConstructor=t,this.StreamCipherConstructor=r}return d(e,[{key:"createStream",value:function(e,t){var r=new this.StreamCipherConstructor;return new o.DecryptStream(e,t,function(e,t){return r.decryptBlock(e,t)})}},{key:"decryptString",value:function(e){var t=new this.StringCipherConstructor,r=(0,a.stringToBytes)(e);return r=t.decryptBlock(r,!0),(0,a.bytesToString)(r)}},{key:"encryptString",value:function(e){var t=new this.StringCipherConstructor;if(t instanceof k){var r=e.length,n=16-r%16;16!==n&&(e=e.padEnd(16*Math.ceil(r/16),String.fromCharCode(n)));var i=new Uint8Array(16);if("undefined"!=typeof crypto)crypto.getRandomValues(i);else for(var o=0;o<16;o++)i[o]=Math.floor(256*Math.random());var s=(0,a.stringToBytes)(e);s=t.encrypt(s,i);var c=new Uint8Array(16+s.length);return c.set(i),c.set(s,16),(0,a.bytesToString)(c)}var u=(0,a.stringToBytes)(e);return u=t.encrypt(u),(0,a.bytesToString)(u)}}]),e}(),T=function(){var e=new Uint8Array([40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122]);function t(t,r,n,a,i,o,s,c){var u,l,f=40+n.length+t.length,h=new Uint8Array(f),d=0;if(r)for(l=Math.min(32,r.length);d<l;++d)h[d]=r[d];for(u=0;d<32;)h[d++]=e[u++];for(u=0,l=n.length;u<l;++u)h[d++]=n[u];for(h[d++]=255&i,h[d++]=i>>8&255,h[d++]=i>>16&255,h[d++]=i>>>24&255,u=0,l=t.length;u<l;++u)h[d++]=t[u];o>=4&&!c&&(h[d++]=255,h[d++]=255,h[d++]=255,h[d++]=255);var m=g(h,0,d),v=s>>3;if(o>=3)for(u=0;u<50;++u)m=g(m,0,v);var y,b=m.subarray(0,v);if(o>=3){for(d=0;d<32;++d)h[d]=e[d];for(u=0,l=t.length;u<l;++u)h[d++]=t[u];y=new p(b).encryptBlock(g(h,0,d)),l=b.length;var w=new Uint8Array(l);for(u=1;u<=19;++u){for(var k=0;k<l;++k)w[k]=b[k]^u;y=new p(w).encryptBlock(y)}for(u=0,l=y.length;u<l;++u)if(a[u]!==y[u])return null}else for(u=0,l=(y=new p(b).encryptBlock(e)).length;u<l;++u)if(a[u]!==y[u])return null;return b}var r=i.Name.get("Identity");function n(e,t,r){var n,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=new Uint8Array(r.length+9),o=r.length;for(n=0;n<o;++n)i[n]=r[n];return i[n++]=255&e,i[n++]=e>>8&255,i[n++]=e>>16&255,i[n++]=255&t,i[n++]=t>>8&255,a&&(i[n++]=115,i[n++]=65,i[n++]=108,i[n++]=84),g(i,0,n).subarray(0,Math.min(r.length+5,16))}function o(e,t,r,o,s){if(!(0,i.isName)(t))throw new a.FormatError("Invalid crypt filter name.");var c,u=e.get(t.name);if(null!=u&&(c=u.get("CFM")),!c||"None"===c.name)return function(){return new w};if("V2"===c.name)return function(){return new p(n(r,o,s,!1))};if("AESV2"===c.name)return function(){return new S(n(r,o,s,!0))};if("AESV3"===c.name)return function(){return new x(s)};throw new a.FormatError("Unknown crypto method")}return function(){function s(n,o,c){f(this,s);var u=n.get("Filter");if(!(0,i.isName)(u,"Standard"))throw new a.FormatError("unknown encryption method");this.dict=n;var l=n.get("V");if(!Number.isInteger(l)||1!==l&&2!==l&&4!==l&&5!==l)throw new a.FormatError("unsupported encryption algorithm");this.algorithm=l;var h=n.get("Length");if(!h)if(l<=3)h=40;else{var d=n.get("CF"),m=n.get("StmF");if((0,i.isDict)(d)&&(0,i.isName)(m)){d.suppressEncryption=!0;var v=d.get(m.name);(h=v&&v.get("Length")||128)<40&&(h<<=3)}}if(!Number.isInteger(h)||h<40||h%8!=0)throw new a.FormatError("invalid key length");var y=(0,a.stringToBytes)(n.get("O")).subarray(0,32),b=(0,a.stringToBytes)(n.get("U")).subarray(0,32),w=n.get("P"),k=n.get("R"),S=(4===l||5===l)&&!1!==n.get("EncryptMetadata");this.encryptMetadata=S;var x,C,T=(0,a.stringToBytes)(o);if(c){if(6===k)try{c=(0,a.utf8StringToString)(c)}catch(e){(0,a.warn)("CipherTransformFactory: Unable to convert UTF8 encoded password.")}x=(0,a.stringToBytes)(c)}if(5!==l)C=t(T,x,y,b,w,k,h,S);else{var F=(0,a.stringToBytes)(n.get("O")).subarray(32,40),_=(0,a.stringToBytes)(n.get("O")).subarray(40,48),P=(0,a.stringToBytes)(n.get("U")).subarray(0,48),I=(0,a.stringToBytes)(n.get("U")).subarray(32,40),E=(0,a.stringToBytes)(n.get("U")).subarray(40,48),j=(0,a.stringToBytes)(n.get("OE")),R=(0,a.stringToBytes)(n.get("UE"));(0,a.stringToBytes)(n.get("Perms"));C=function(e,t,r,n,a,i,o,s,c,u,l,f){if(t){var h=Math.min(127,t.length);t=t.subarray(0,h)}else t=[];var d;return(d=6===e?new O:new A).checkUserPassword(t,s,o)?d.getUserKey(t,c,l):t.length&&d.checkOwnerPassword(t,n,i,r)?d.getOwnerKey(t,a,i,u):null}(k,x,y,F,_,P,b,I,E,j,R)}if(!C&&!c)throw new a.PasswordException("No password given",a.PasswordResponses.NEED_PASSWORD);if(!C&&c&&(C=t(T,function(t,r,n,a){for(var i=new Uint8Array(32),o=0,s=Math.min(32,t.length);o<s;++o)i[o]=t[o];for(var c=0;o<32;)i[o++]=e[c++];var u,l=g(i,0,o),f=a>>3;if(n>=3)for(c=0;c<50;++c)l=g(l,0,l.length);if(n>=3){u=r;var h=new Uint8Array(f);for(c=19;c>=0;c--){for(var d=0;d<f;++d)h[d]=l[d]^c;u=new p(h).encryptBlock(u)}}else u=new p(l.subarray(0,f)).encryptBlock(r);return u}(x,y,k,h),y,b,w,k,h,S)),!C)throw new a.PasswordException("Incorrect Password",a.PasswordResponses.INCORRECT_PASSWORD);if(this.encryptionKey=C,l>=4){var M=n.get("CF");(0,i.isDict)(M)&&(M.suppressEncryption=!0),this.cf=M,this.stmf=n.get("StmF")||r,this.strf=n.get("StrF")||r,this.eff=n.get("EFF")||this.stmf}}return d(s,[{key:"createCipherTransform",value:function(e,t){if(4===this.algorithm||5===this.algorithm)return new C(o(this.cf,this.stmf,e,t,this.encryptionKey),o(this.cf,this.strf,e,t,this.encryptionKey));var r=n(e,t,this.encryptionKey,!1),a=function(){return new p(r)};return new C(a,a)}}]),s}()}();t.CipherTransformFactory=T},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.DecryptStream=void 0;var a=r(127);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=c(e);if(t){var i=c(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(u,a.DecodeStream);var t,r,n,c=s(u);function u(e,t,r){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(n=c.call(this,t)).str=e,n.dict=e.dict,n.decrypt=r,n.nextChunk=null,n.initialized=!1,n}return t=u,(r=[{key:"readBlock",value:function(){var e;if(this.initialized?e=this.nextChunk:(e=this.str.getBytes(512),this.initialized=!0),e&&0!==e.length){this.nextChunk=this.str.getBytes(512);var t=this.nextChunk&&this.nextChunk.length>0;e=(0,this.decrypt)(e,!t);for(var r=this.bufferLength,n=e.length,a=this.ensureBuffer(r+n),i=0;i<n;i++)a[r++]=e[i];this.bufferLength=r}else this.eof=!0}}])&&i(t.prototype,r),n&&i(t,n),u}();t.DecryptStream=u},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XFAFactory=void 0;var n=r(176),a=r(179),i=r(184);function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);try{this.root=(new i.XFAParser).parse(e._createDocument(t)),this.form=new a.Binder(this.root).bind(),this.pages=this.form[n.$toHTML]()}catch(e){console.log(e)}}var t,r,s;return t=e,s=[{key:"_createDocument",value:function(e){return e["/xdp:xdp"]?Object.values(e).join(""):e["xdp:xdp"]}}],(r=[{key:"getPage",value:function(e){return this.pages.children[e]}},{key:"numberPages",get:function(){return this.pages.children.length}}])&&o(t.prototype,r),s&&o(t,s),e}();t.XFAFactory=s},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.XmlObject=t.XFAObjectArray=t.XFAObject=t.XFAAttribute=t.StringObject=t.OptionObject=t.Option10=t.Option01=t.IntegerObject=t.ContentObject=t.$uid=t.$toStyle=t.$toHTML=t.$text=t.$setValue=t.$setSetAttributes=t.$setId=t.$searchNode=t.$resolvePrototypes=t.$removeChild=t.$onText=t.$onChildCheck=t.$onChild=t.$nsAttributes=t.$nodeName=t.$namespaceId=t.$isTransparent=t.$isDescendent=t.$isDataValue=t.$insertAt=t.$indexOf=t.$ids=t.$hasSettableValue=t.$hasItem=t.$global=t.$getRealChildrenByNameIt=t.$getParent=t.$getNextPage=t.$getDataValue=t.$getChildrenByNameIt=t.$getChildrenByName=t.$getChildrenByClass=t.$getChildren=t.$getAvailableSpace=t.$getAttributeIt=t.$flushHTML=t.$finalize=t.$extra=t.$dump=t.$data=t.$content=t.$consumed=t.$clone=t.$cleanup=t.$clean=t.$childrenToHTML=t.$break=t.$appendChild=t.$addHTML=t.$acceptWhitespace=void 0;var a=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),i=r(177),o=r(4),s=r(178);function c(e,t,r){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(r):a.value}})(e,t,r||e)}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||v(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=p(e);if(t){var i=p(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return d(e)}(this,r)}}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||v(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=v(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function v(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function k(e,t,r){return t&&w(e.prototype,t),r&&w(e,r),e}var S=Symbol();t.$acceptWhitespace=S;var x=Symbol();t.$addHTML=x;var A=Symbol();t.$appendChild=A;var O=Symbol();t.$break=O;var C=Symbol();t.$childrenToHTML=C;var T=Symbol();t.$clean=T;var F=Symbol();t.$cleanup=F;var _=Symbol();t.$clone=_;var P=Symbol();t.$consumed=P;var I=Symbol("content");t.$content=I;var E=Symbol("data");t.$data=E;var j=Symbol();t.$dump=j;var R=Symbol("extra");t.$extra=R;var M=Symbol();t.$finalize=M;var N=Symbol();t.$flushHTML=N;var B=Symbol();t.$getAttributeIt=B;var D=Symbol();t.$getAvailableSpace=D;var L=Symbol();t.$getChildrenByClass=L;var U=Symbol();t.$getChildrenByName=U;var q=Symbol();t.$getChildrenByNameIt=q;var X=Symbol();t.$getDataValue=X;var H=Symbol();t.$getRealChildrenByNameIt=H;var $=Symbol();t.$getChildren=$;var z=Symbol();t.$getNextPage=z;var G=Symbol();t.$getParent=G;var W=Symbol();t.$global=W;var V=Symbol();t.$hasItem=V;var K=Symbol();t.$hasSettableValue=K;var Y=Symbol();t.$ids=Y;var J=Symbol();t.$indexOf=J;var Z=Symbol();t.$insertAt=Z;var Q=Symbol();t.$isDataValue=Q;var ee=Symbol();t.$isDescendent=ee;var te=Symbol();t.$isTransparent=te;var re=Symbol(),ne=Symbol("namespaceId");t.$namespaceId=ne;var ae=Symbol("nodeName");t.$nodeName=ae;var ie=Symbol();t.$nsAttributes=ie;var oe=Symbol();t.$onChild=oe;var se=Symbol();t.$onChildCheck=se;var ce=Symbol();t.$onText=ce;var ue=Symbol();t.$removeChild=ue;var le=Symbol();t.$resolvePrototypes=le;var fe=Symbol();t.$searchNode=fe;var he=Symbol();t.$setId=he;var de=Symbol();t.$setSetAttributes=de;var pe=Symbol();t.$setValue=pe;var ge=Symbol();t.$text=ge;var me=Symbol();t.$toHTML=me;var ve=Symbol();t.$toStyle=ve;var ye=Symbol("uid");t.$uid=ye;var be=Symbol(),we=Symbol(),ke=Symbol(),Se=Symbol("_children"),xe=Symbol(),Ae=Symbol(),Oe=Symbol(),Ce=Symbol(),Te=Symbol(),Fe=Symbol(),_e=Symbol(),Pe=Symbol(),Ie=Symbol(),Ee=Symbol("parent"),je=Symbol(),Re=Symbol(),Me=0,Ne=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];b(this,e),this[ne]=t,this[ae]=r,this[_e]=n,this[Ee]=null,this[Se]=[],this[ye]="".concat(r).concat(Me++)}return k(e,[{key:oe,value:function(e){if(!this[_e]||!this[se](e))return!1;var t=e[ae],r=this[t];if(!(r instanceof Be))return null!==r&&this[ue](r),this[t]=e,this[A](e),!0;if(r.push(e))return this[A](e),!0;var n="";return this.id?n=" (id: ".concat(this.id,")"):this.name&&(n=" (name: ".concat(this.name," ").concat(this.h.value,")")),(0,o.warn)('XFA - node "'.concat(this[ae],'"').concat(n,' has already enough "').concat(t,'"!')),!1}},{key:se,value:function(e){return this.hasOwnProperty(e[ae])&&e[ne]===this[ne]}},{key:S,value:function(){return!1}},{key:he,value:function(e){this.id&&this[ne]===s.NamespaceIds.template.id&&e.set(this.id,this)}},{key:A,value:function(e){e[Ee]=this,this[Se].push(e)}},{key:ue,value:function(e){var t=this[Se].indexOf(e);this[Se].splice(t,1)}},{key:K,value:function(){return this.hasOwnProperty("value")}},{key:pe,value:function(e){}},{key:ce,value:function(e){}},{key:M,value:function(){}},{key:T,value:function(e){delete this[_e],this[F]&&(e.clean(this[F]),delete this[F])}},{key:V,value:function(){return!1}},{key:J,value:function(e){return this[Se].indexOf(e)}},{key:Z,value:function(e,t){t[Ee]=this,this[Se].splice(e,0,t)}},{key:te,value:function(){return""===this.name}},{key:re,value:function(){return""}},{key:ge,value:function(){return 0===this[Se].length?this[I]:this[Se].map(function(e){return e[ge]()}).join("")}},{key:ke,get:function(){var t=Object.getPrototypeOf(this);if(!t._attributes){var r,n=t._attributes=new Set,a=m(Object.getOwnPropertyNames(this));try{for(a.s();!(r=a.n()).done;){var i=r.value;if(null===this[i]||this[i]instanceof e||this[i]instanceof Be)break;n.add(i)}}catch(e){a.e(e)}finally{a.f()}}return(0,o.shadow)(this,ke,t._attributes)}},{key:ee,value:function(e){for(var t=this;t;){if(t===e)return!0;t=t[G]()}return!1}},{key:G,value:function(){return this[Ee]}},{key:$,value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?this[e]:this[Se]}},{key:j,value:function(){var t=Object.create(null);this[I]&&(t.$content=this[I]);var r,n=m(Object.getOwnPropertyNames(this));try{for(n.s();!(r=n.n()).done;){var a=r.value,i=this[a];null!==i&&(i instanceof e?t[a]=i[j]():i instanceof Be?i.isEmpty()||(t[a]=i.dump()):t[a]=i)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:ve,value:function(){return null}},{key:me,value:function(){return i.HTMLResult.EMPTY}},{key:Ce,value:a.default.mark(function e(t,r){var n,i,o,s,c;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=m(this[$]()),e.prev=1,n.s();case 3:if((i=n.n()).done){e.next=13;break}if(o=i.value,t&&r!==t.has(o[ae])){e.next=11;break}return s=this[D](),(c=o[me](s)).success||(this[R].failingNode=o),e.next=11,c;case 11:e.next=3;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(1),n.e(e.t0);case 18:return e.prev=18,n.f(),e.finish(18);case 21:case"end":return e.stop()}},e,this,[[1,15,18,21]])})},{key:N,value:function(){return null}},{key:x,value:function(e,t){this[R].children.push(e)}},{key:D,value:function(){}},{key:C,value:function(e){var t=e.filter,r=void 0===t?null:t,n=e.include,a=void 0===n||n;if(this[R].generator){var i=this[D](),o=this[R].failingNode[me](i);if(!o.success)return!1;o.html&&this[x](o.html,o.bbox),delete this[R].failingNode}else this[R].generator=this[Ce](r,a);for(;;){var s=this[R].generator.next();if(s.done)break;var c=s.value;if(!c.success)return!1;c.html&&this[x](c.html,c.bbox)}return this[R].generator=null,!0}},{key:de,value:function(e){(e.use||e.id)&&(this[je]=new Set(Object.keys(e)))}},{key:Fe,value:function(e){var t=this[ke],r=this[je];return g(e).filter(function(e){return t.has(e)&&!r.has(e)})}},{key:le,value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set,n=m(this[Se]);try{for(n.s();!(t=n.n()).done;){var a=t.value,i=a[Te](e,r);i?a[be](i,e,r):a[le](e,r)}}catch(e){n.e(e)}finally{n.f()}}},{key:Te,value:function(e,t){var r=this.use;if(r&&r.startsWith("#")){var n=r.slice(1),a=e.get(n);if(this.use="",!a)return(0,o.warn)("XFA - Invalid prototype id: ".concat(n,".")),null;if(a[ae]!==this[ae])return(0,o.warn)("XFA - Incompatible prototype: ".concat(a[ae]," !== ").concat(this[ae],".")),null;if(t.has(a))return(0,o.warn)("XFA - Cycle detected in prototypes use."),null;t.add(a);var i=a[Te](e,t);return i?(a[be](i,e,t),t.delete(a),a):(t.delete(a),a)}return null}},{key:be,value:function(e,t,r){if(r.has(e))(0,o.warn)("XFA - Cycle detected in prototypes use.");else{!this[I]&&e[I]&&(this[I]=e[I]);var n=new Set(r);n.add(e);var a,i=m(this[Fe](e[je]));try{for(i.s();!(a=i.n()).done;){var s=a.value;this[s]=e[s],this[je]&&this[je].add(s)}}catch(e){i.e(e)}finally{i.f()}var c,u=m(Object.getOwnPropertyNames(this));try{for(u.s();!(c=u.n()).done;){var l=c.value;if(!this[ke].has(l)){var f=this[l],h=e[l];if(f instanceof Be){var d,p=m(f[Se]);try{for(p.s();!(d=p.n()).done;){d.value[le](t,r)}}catch(e){p.e(e)}finally{p.f()}for(var g=f[Se].length,v=h[Se].length;g<v;g++){var y=e[Se][g][_]();if(!f.push(y))break;y[Ee]=this,this[Se].push(y),y[le](t,n)}}else if(null===f){if(null!==h){var b=h[_]();b[Ee]=this,this[l]=b,this[Se].push(b),b[le](t,n)}}else f[le](t,r)}}}catch(e){u.e(e)}finally{u.f()}}}},{key:_,value:function(){var t,r=Object.create(Object.getPrototypeOf(this)),n=m(Object.getOwnPropertySymbols(this));try{for(n.s();!(t=n.n()).done;){var a=t.value;try{r[a]=this[a]}catch(e){(0,o.shadow)(r,a,this[a])}}}catch(e){n.e(e)}finally{n.f()}r[Se]=[];var i,s=m(Object.getOwnPropertyNames(this));try{for(s.s();!(i=s.n()).done;){var c=i.value;if(this[ke].has(c))r[c]=e[xe](this[c]);else{var u=this[c];r[c]=u instanceof Be?new Be(u[Pe]):null}}}catch(e){s.e(e)}finally{s.f()}var l,f=m(this[Se]);try{for(f.s();!(l=f.n()).done;){var h=l.value,d=h[ae],p=h[_]();r[Se].push(p),p[Ee]=r,null===r[d]?r[d]=p:r[d][Se].push(p)}}catch(e){f.e(e)}finally{f.f()}return r}},{key:$,value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?this[Se].filter(function(t){return t[ae]===e}):this[Se]}},{key:L,value:function(e){return this[e]}},{key:U,value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return Array.from(this[q](e,t,r))}},{key:q,value:a.default.mark(function e(t,r){var n,i,o,s,c=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(c.length>2&&void 0!==c[2])||c[2],"parent"!==t){e.next=5;break}return e.next=4,this[Ee];case 4:return e.abrupt("return");case 5:i=m(this[Se]),e.prev=6,i.s();case 8:if((o=i.n()).done){e.next=20;break}if((s=o.value)[ae]!==t){e.next=13;break}return e.next=13,s;case 13:if(s.name!==t){e.next=16;break}return e.next=16,s;case 16:if(!r&&!s[te]()){e.next=18;break}return e.delegateYield(s[q](t,r,!1),"t0",18);case 18:e.next=8;break;case 20:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(6),i.e(e.t1);case 25:return e.prev=25,i.f(),e.finish(25);case 28:if(!n||!this[ke].has(t)){e.next=31;break}return e.next=31,new De(this,t,this[t]);case 31:case"end":return e.stop()}},e,this,[[6,22,25,28]])})}],[{key:xe,value:function(t){return Array.isArray(t)?t.map(function(t){return e[xe](t)}):t instanceof Object?Object.assign({},t):t}}]),e}();t.XFAObject=Ne;var Be=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1/0;b(this,e),this[Pe]=t,this[Se]=[]}return k(e,[{key:"push",value:function(e){return this[Se].length<=this[Pe]?(this[Se].push(e),!0):((0,o.warn)('XFA - node "'.concat(e[ae],'" accepts no more than ').concat(this[Pe]," children")),!1)}},{key:"isEmpty",value:function(){return 0===this[Se].length}},{key:"dump",value:function(){return 1===this[Se].length?this[Se][0][j]():this[Se].map(function(e){return e[j]()})}},{key:_,value:function(){var t=new e(this[Pe]);return t[Se]=this[Se].map(function(e){return e[_]()}),t}},{key:"children",get:function(){return this[Se]}},{key:"clear",value:function(){this[Se].length=0}}]),e}();t.XFAObjectArray=Be;var De=function(){function e(t,r,n){b(this,e),this[Ee]=t,this[ae]=r,this[I]=n,this[P]=!1}return k(e,[{key:G,value:function(){return this[Ee]}},{key:Q,value:function(){return!0}},{key:ge,value:function(){return this[I]}},{key:ee,value:function(e){return this[Ee]===e||this[Ee][ee](e)}}]),e}();t.XFAAttribute=De;var Le=function(e){l(r,Ne);var t=h(r);function r(e,n){var a,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(b(this,r),(a=t.call(this,e,n))[I]="",a[Ae]=null,"#text"!==n){var o=new Map;a[we]=o;for(var s=0,c=Object.entries(i);s<c.length;s++){var l=u(c[s],2),f=l[0],h=l[1];o.set(f,new De(d(a),f,h))}if(i.hasOwnProperty(ie)){var p=i[ie].xfa.dataNode;void 0!==p&&("dataGroup"===p?a[Ae]=!1:"dataValue"===p&&(a[Ae]=!0))}}return a[P]=!1,a}return k(r,[{key:oe,value:function(e){if(this[I]){var t=new r(this[ne],"#text");this[A](t),t[I]=this[I],this[I]=""}return this[A](e),!0}},{key:ce,value:function(e){this[I]+=e}},{key:M,value:function(){if(this[I]&&this[Se].length>0){var e=new r(this[ne],"#text");this[A](e),e[I]=this[I],delete this[I]}}},{key:me,value:function(){return"#text"===this[ae]?i.HTMLResult.success({name:"#text",value:this[I]}):i.HTMLResult.EMPTY}},{key:$,value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?this[Se].filter(function(t){return t[ae]===e}):this[Se]}},{key:L,value:function(e){var t=this[we].get(e);return void 0!==t?t:this[$](e)}},{key:q,value:a.default.mark(function(e,t){var r,n,i,o;return a.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(r=this[we].get(e),!r){a.next=4;break}return a.next=4,r;case 4:n=m(this[Se]),a.prev=5,n.s();case 7:if((i=n.n()).done){a.next=16;break}if((o=i.value)[ae]!==e){a.next=12;break}return a.next=12,o;case 12:if(!t){a.next=14;break}return a.delegateYield(o[q](e,t),"t0",14);case 14:a.next=7;break;case 16:a.next=21;break;case 18:a.prev=18,a.t1=a.catch(5),n.e(a.t1);case 21:return a.prev=21,n.f(),a.finish(21);case 24:case"end":return a.stop()}},r,this,[[5,18,21,24]])})},{key:B,value:a.default.mark(function(e,t){var r,n,i,o;return a.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(r=this[we].get(e),!r||t&&r[P]){a.next=4;break}return a.next=4,r;case 4:n=m(this[Se]),a.prev=5,n.s();case 7:if((i=n.n()).done){a.next=12;break}return o=i.value,a.delegateYield(o[B](e,t),"t0",10);case 10:a.next=7;break;case 12:a.next=17;break;case 14:a.prev=14,a.t1=a.catch(5),n.e(a.t1);case 17:return a.prev=17,n.f(),a.finish(17);case 20:case"end":return a.stop()}},r,this,[[5,14,17,20]])})},{key:H,value:a.default.mark(function e(t,r,n){var i,o,s;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:i=m(this[Se]),e.prev=1,i.s();case 3:if((o=i.n()).done){e.next=12;break}if((s=o.value)[ae]!==t||n&&s[P]){e.next=8;break}return e.next=8,s;case 8:if(!r){e.next=10;break}return e.delegateYield(s[H](t,r,n),"t0",10);case 10:e.next=3;break;case 12:e.next=17;break;case 14:e.prev=14,e.t1=e.catch(1),i.e(e.t1);case 17:return e.prev=17,i.f(),e.finish(17);case 20:case"end":return e.stop()}},e,this,[[1,14,17,20]])})},{key:Q,value:function(){return null===this[Ae]?0===this[Se].length||this[Se][0][ne]===s.NamespaceIds.xhtml.id:this[Ae]}},{key:X,value:function(){return null===this[Ae]?0===this[Se].length?this[I].trim():this[Se][0][ne]===s.NamespaceIds.xhtml.id?this[Se][0][ge]().trim():null:this[I].trim()}},{key:j,value:function(){var e=Object.create(null);this[I]&&(e.$content=this[I]),e.$name=this[ae],e.children=[];var t,r=m(this[Se]);try{for(r.s();!(t=r.n()).done;){var n=t.value;e.children.push(n[j]())}}catch(e){r.e(e)}finally{r.f()}e.attributes=Object.create(null);var a,i=m(this[we]);try{for(i.s();!(a=i.n()).done;){var o=u(a.value,2),s=o[0],c=o[1];e.attributes[s]=c[I]}}catch(e){i.e(e)}finally{i.f()}return e}}]),r}();t.XmlObject=Le;var Ue=function(e){l(r,Ne);var t=h(r);function r(e,n){var a;return b(this,r),(a=t.call(this,e,n))[I]="",a}return k(r,[{key:ce,value:function(e){this[I]+=e}},{key:M,value:function(){}}]),r}();t.ContentObject=Ue;var qe=function(e){l(r,Ue);var t=h(r);function r(e,n,a){var i;return b(this,r),(i=t.call(this,e,n))[Ie]=a,i}return k(r,[{key:M,value:function(){var e=this;this[I]=(0,i.getKeyword)({data:this[I],defaultValue:this[Ie][0],validate:function(t){return e[Ie].includes(t)}})}},{key:T,value:function(e){c(p(r.prototype),T,this).call(this,e),delete this[Ie]}}]),r}();t.OptionObject=qe;var Xe=function(e){l(r,Ue);var t=h(r);function r(){return b(this,r),t.apply(this,arguments)}return k(r,[{key:M,value:function(){this[I]=this[I].trim()}}]),r}();t.StringObject=Xe;var He=function(e){l(r,Ue);var t=h(r);function r(e,n,a,i){var o;return b(this,r),(o=t.call(this,e,n))[Oe]=a,o[Re]=i,o}return k(r,[{key:M,value:function(){this[I]=(0,i.getInteger)({data:this[I],defaultValue:this[Oe],validate:this[Re]})}},{key:T,value:function(e){c(p(r.prototype),T,this).call(this,e),delete this[Oe],delete this[Re]}}]),r}();t.IntegerObject=He;var $e=function(e){l(r,He);var t=h(r);function r(e,n){return b(this,r),t.call(this,e,n,0,function(e){return 1===e})}return r}();t.Option01=$e;var ze=function(e){l(r,He);var t=h(r);function r(e,n){return b(this,r),t.call(this,e,n,1,function(e){return 0===e})}return r}();t.Option10=ze},(e,t)=>{"use strict";function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.getBBox=function(e){if(!e)return{x:-1,y:-1,width:-1,height:-1};var t=e.trim().split(/\s*,\s*/).map(function(e){return c(e,"-1")});if(t.length<4||t[2]<0||t[3]<0)return{x:-1,y:-1,width:-1,height:-1};var r=n(t,4),a=r[0],i=r[1],o=r[2],s=r[3];return{x:a,y:i,width:o,height:s}},t.getColor=function(e){var t=n(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0],3),r=t[0],a=t[1],i=t[2];if(!e)return{r:r,g:a,b:i};var o=e.trim().split(/\s*,\s*/).map(function(e){return Math.min(Math.max(0,parseInt(e.trim(),10)),255)}).map(function(e){return isNaN(e)?0:e});if(o.length<3)return{r:r,g:a,b:i};var s=n(o,3);return r=s[0],a=s[1],i=s[2],{r:r,g:a,b:i}},t.getFloat=function(e){var t=e.data,r=e.defaultValue,n=e.validate;if(!t)return r;t=t.trim();var a=parseFloat(t);if(!isNaN(a)&&n(a))return a;return r},t.getInteger=function(e){var t=e.data,r=e.defaultValue,n=e.validate;if(!t)return r;t=t.trim();var a=parseInt(t,10);if(!isNaN(a)&&n(a))return a;return r},t.getKeyword=s,t.getMeasurement=c,t.getRatio=function(e){if(!e)return{num:1,den:1};var t=e.trim().split(/\s*:\s*/).map(function(e){return parseFloat(e)}).filter(function(e){return!isNaN(e)});1===t.length&&t.push(1);if(0===t.length)return{num:1,den:1};var r=n(t,2),a=r[0],i=r[1];return{num:a,den:i}},t.getRelevant=function(e){if(!e)return[];return e.trim().split(/\s+/).map(function(e){return{excluded:"-"===e[0],viewname:e.substring(1)}})},t.getStringOption=function(e,t){return s({data:e,defaultValue:t[0],validate:function(e){return t.includes(e)}})},t.HTMLResult=void 0;var i={pt:function(e){return e},cm:function(e){return e/2.54*72},mm:function(e){return e/25.4*72},in:function(e){return 72*e},px:function(e){return e}},o=/([+-]?[0-9]+\.?[0-9]*)(.*)/;function s(e){var t=e.data,r=e.defaultValue,n=e.validate;return t&&n(t=t.trim())?t:r}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0";if(t=t||"0",!e)return c(t);var r=e.trim().match(o);if(!r)return c(t);var a=n(r,3),s=a[1],u=a[2],l=parseFloat(s);if(isNaN(l))return c(t);if(0===l)return 0;var f=i[u];return f?f(l):l}var u=function(){function e(t,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.success=t,this.html=r,this.bbox=n}var t,n,a;return t=e,a=[{key:"success",value:function(t){return new e(!0,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)}}],(n=null)&&r(t.prototype,n),a&&r(t,a),e}();t.HTMLResult=u,u.FAILURE=new u(!1,null,null),u.EMPTY=new u(!0,null,null)},(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamespaceIds=t.$buildXFAObject=void 0;var r=Symbol();t.$buildXFAObject=r;t.NamespaceIds={config:{id:0,check:function(e){return e.startsWith("http://www.xfa.org/schema/xci/")}},connectionSet:{id:1,check:function(e){return e.startsWith("http://www.xfa.org/schema/xfa-connection-set/")}},datasets:{id:2,check:function(e){return e.startsWith("http://www.xfa.org/schema/xfa-data/")}},form:{id:3,check:function(e){return e.startsWith("http://www.xfa.org/schema/xfa-form/")}},localeSet:{id:4,check:function(e){return e.startsWith("http://www.xfa.org/schema/xfa-locale-set/")}},pdf:{id:5,check:function(e){return"http://ns.adobe.com/xdp/pdf/"===e}},signature:{id:6,check:function(e){return"http://www.w3.org/2000/09/xmldsig#"===e}},sourceSet:{id:7,check:function(e){return e.startsWith("http://www.xfa.org/schema/xfa-source-set/")}},stylesheet:{id:8,check:function(e){return"http://www.w3.org/1999/XSL/Transform"===e}},template:{id:9,check:function(e){return e.startsWith("http://www.xfa.org/schema/xfa-template/")}},xdc:{id:10,check:function(e){return e.startsWith("http://www.xfa.org/schema/xdc/")}},xdp:{id:11,check:function(e){return"http://ns.adobe.com/xdp/"===e}},xfdf:{id:12,check:function(e){return"http://ns.adobe.com/xfdf/"===e}},xhtml:{id:13,check:function(e){return"http://www.w3.org/1999/xhtml"===e}},xmpmeta:{id:14,check:function(e){return"http://ns.adobe.com/xmpmeta/"===e}}}},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Binder=void 0;var n=r(176),a=r(180),i=r(183),o=r(178),s=r(4);function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function l(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e){var t=new a.Text({});return t[n.$content]=e,t}var p=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.root=t,this.datasets=t.datasets,t.datasets&&t.datasets.data?(this.emptyMerge=!1,this.data=t.datasets.data):(this.emptyMerge=!0,this.data=new n.XmlObject(o.NamespaceIds.datasets.id,"data")),this.root.form=this.form=t.template[n.$clone]()}var t,r,l;return t=e,(r=[{key:"_isConsumeData",value:function(){return!this.emptyMerge&&this._mergeMode}},{key:"_isMatchTemplate",value:function(){return!this._isConsumeData()}},{key:"bind",value:function(){return this._bindElement(this.form,this.data),this.form}},{key:"getData",value:function(){return this.data}},{key:"_bindValue",value:function(e,t,r){if(e[n.$hasSettableValue]())if(t[n.$isDataValue]()){var i=t[n.$getDataValue]();e[n.$setValue](d(i)),e[n.$data]=t}else if(e instanceof a.Field&&e.ui&&e.ui.choiceList&&"multiSelect"===e.ui.choiceList.open){var o=t[n.$getChildren]().map(function(e){return e[n.$content].trim()}).join("\n");e[n.$setValue](d(o)),e[n.$data]=t}else this._isConsumeData()&&(0,s.warn)("XFA - Nodes haven't the same type.");else!t[n.$isDataValue]()||this._isMatchTemplate()?(this._bindElement(e,t),e[n.$data]=t):(0,s.warn)("XFA - Nodes haven't the same type.")}},{key:"_findDataByNameToConsume",value:function(e,t,r,a){if(!e)return null;for(var i,s,c=0;c<3;c++){for(i=r[n.$getRealChildrenByNameIt](e,!1,!0);s=i.next().value;)if(t===s[n.$isDataValue]())return s;if(r[n.$namespaceId]===o.NamespaceIds.datasets.id&&"data"===r[n.$nodeName])break;r=r[n.$getParent]()}if(!a)return null;for(i=this.data[n.$getRealChildrenByNameIt](e,!1,!1);s=i.next().value;)if(s[n.$global])return s;return(s=(i=this.data[n.$getAttributeIt](e,!0)).next().value)&&s[n.$isDataValue]()?s:null}},{key:"_setProperties",value:function(e,t){if(e.hasOwnProperty("setProperty")){var r,o=u(e.setProperty.children);try{for(o.s();!(r=o.n()).done;){var l=r.value,f=l.ref,h=l.target;if(!l.connection&&f){var d=c((0,i.searchNode)(this.root,t,f,!1,!1),1)[0];if(d)if(d[n.$isDescendent](this.data)){var p=c((0,i.searchNode)(this.root,e,h,!1,!1),1)[0];if(p)if(p[n.$isDescendent](e)){var g=p[n.$getParent]();if(p instanceof a.SetProperty||g instanceof a.SetProperty)(0,s.warn)("XFA - Invalid target: cannot be a setProperty or one of its properties.");else if(p instanceof a.BindItems||g instanceof a.BindItems)(0,s.warn)("XFA - Invalid target: cannot be a bindItems or one of its properties.");else{var m=d[n.$text](),v=p[n.$nodeName];if(p instanceof n.XFAAttribute){var y=Object.create(null);y[v]=m;var b=Reflect.construct(Object.getPrototypeOf(g).constructor,[y]);g[v]=b[v]}else p.hasOwnProperty(n.$content)?(p[n.$data]=d,p[n.$content]=m,p[n.$finalize]()):(0,s.warn)("XFA - Invalid node to use in setProperty")}}else(0,s.warn)("XFA - Invalid target: must be a property or subproperty.");else(0,s.warn)("XFA - Invalid target: ".concat(h,"."))}else(0,s.warn)("XFA - Invalid node: must be a data node.");else(0,s.warn)("XFA - Invalid reference: ".concat(f,"."))}}}catch(e){o.e(e)}finally{o.f()}}}},{key:"_bindItems",value:function(e,t){if(e.hasOwnProperty("items")&&e.hasOwnProperty("bindItems")&&!e.bindItems.isEmpty()){var r,o=u(e.items.children);try{for(o.s();!(r=o.n()).done;){var l=r.value;e[n.$removeChild](l)}}catch(e){o.e(e)}finally{o.f()}e.items.clear();var f=new a.Items({}),h=new a.Items({});e[n.$appendChild](f),e.items.push(f),e[n.$appendChild](h),e.items.push(h);var p,g=u(e.bindItems.children);try{for(g.s();!(p=g.n()).done;){var m=p.value,v=m.ref,y=m.labelRef,b=m.valueRef;if(!m.connection&&v){var w=(0,i.searchNode)(this.root,t,v,!1,!1);if(w){var k,S=u(w);try{for(S.s();!(k=S.n()).done;){var x=k.value;if(x[n.$isDescendent](this.datasets)){var A=c((0,i.searchNode)(this.root,x,y,!0,!1),1)[0];if(A)if(A[n.$isDescendent](this.datasets)){var O=c((0,i.searchNode)(this.root,x,b,!0,!1),1)[0];if(O)if(O[n.$isDescendent](this.datasets)){var C=d(A[n.$text]()),T=d(O[n.$text]());f[n.$appendChild](C),f.text.push(C),h[n.$appendChild](T),h.text.push(T)}else(0,s.warn)("XFA - Invalid value: must be a datasets child.");else(0,s.warn)("XFA - Invalid value: ".concat(b,"."))}else(0,s.warn)("XFA - Invalid label: must be a datasets child.");else(0,s.warn)("XFA - Invalid label: ".concat(y,"."))}else(0,s.warn)("XFA - Invalid ref (".concat(v,"): must be a datasets child."))}}catch(e){S.e(e)}finally{S.f()}}else(0,s.warn)("XFA - Invalid reference: ".concat(v,"."))}}}catch(e){g.e(e)}finally{g.f()}}}},{key:"_bindOccurrences",value:function(e,t,r){var a;if(t.length>1&&(a=e[n.$clone]()),this._bindValue(e,t[0],r),this._setProperties(e,t[0]),this._bindItems(e,t[0]),1!==t.length)for(var i=e[n.$getParent](),o=e[n.$nodeName],s=i[n.$indexOf](e),c=1,u=t.length;c<u;c++){var l=t[c],f=a[n.$clone]();f.occur.min=1,f.occur.max=1,f.occur.initial=1,i[o].push(f),i[n.$insertAt](s+c,f),this._bindValue(f,l,r),this._setProperties(f,l),this._bindItems(f,l)}}},{key:"_createOccurrences",value:function(e){if(this.emptyMerge){var t=e.occur;if(t&&!(t.initial<=1))for(var r=e[n.$getParent](),a=e[n.$nodeName],i=0,o=t.initial;i<o;i++){var s=e[n.$clone]();s.occur.min=1,s.occur.max=1,s.occur.initial=1,r[a].push(s),r[n.$appendChild](s)}}}},{key:"_getOccurInfo",value:function(e){var t=e.occur,r=e.name;if(!t||!r)return[1,1];var n=-1===t.max?1/0:t.max;return[t.min,n]}},{key:"_bindElement",value:function(e,t){var r=[];this._createOccurrences(e);var a,o=u(e[n.$getChildren]());try{for(o.s();!(a=o.n()).done;){var l=a.value;if(!l[n.$data]){void 0===this._mergeMode&&"subform"===l[n.$nodeName]&&(this._mergeMode="consumeData"===l.mergeMode);var f=!1,h=null,d=null,p=null;if(l.bind){switch(l.bind.match){case"none":this._bindElement(l,t);continue;case"global":f=!0;break;case"dataRef":if(!l.bind.ref){(0,s.warn)("XFA - ref is empty in node ".concat(l[n.$nodeName],".")),this._bindElement(l,t);continue}d=l.bind.ref}l.bind.picture&&(h=l.bind.picture[n.$content])}var g=c(this._getOccurInfo(l),2),m=g[0],v=g[1];if(d)null===(p=(0,i.searchNode)(this.root,t,d,!0,!1))?(p=(0,i.createDataNode)(this.data,t,d),this._isConsumeData()&&(p[n.$consumed]=!0),p=[p]):(this._isConsumeData()&&(p=p.filter(function(e){return!e[n.$consumed]})),p.length>v?p=p.slice(0,v):0===p.length&&(p=null),p&&this._isConsumeData()&&p.forEach(function(e){e[n.$consumed]=!0}));else{if(!l.name){this._bindElement(l,t);continue}if(this._isConsumeData()){for(var y=[];y.length<v;){var b=this._findDataByNameToConsume(l.name,l[n.$hasSettableValue](),t,f);if(!b)break;b[n.$consumed]=!0,y.push(b)}p=y.length>0?y:null}else(p=t[n.$getRealChildrenByNameIt](l.name,!1,!1).next().value)||(p=new n.XmlObject(t[n.$namespaceId],l.name),t[n.$appendChild](p)),p=[p]}if(p){if(p.length<m){(0,s.warn)("XFA - Must have at least ".concat(m," occurrences: ").concat(e[n.$nodeName],"."));continue}this._bindOccurrences(l,p,h)}else m>0?(this._setProperties(l,t),this._bindItems(l,t),this._bindElement(l,t)):r.push(l)}}}catch(e){o.e(e)}finally{o.f()}r.forEach(function(e){return e[n.$getParent]()[n.$removeChild](e)})}}])&&h(t.prototype,r),l&&h(t,l),e}();t.Binder=p},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.Value=t.Text=t.TemplateNamespace=t.Template=t.SetProperty=t.Items=t.Field=t.BindItems=void 0;var a=r(176),i=r(178),o=r(181),s=r(182),c=r(177),u=r(4),l=r(183);function f(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=d(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function m(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),e}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=k(e);if(t){var i=k(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var S=i.NamespaceIds.template.id;function x(e,t){if(!e.value){var r=new Et({});e[a.$appendChild](r),e.value=r}e.value[a.$setValue](t)}function A(e){for(var t=e[a.$getParent]();!(t instanceof St);)t=t[a.$getParent]();return t}var O=0,C=1,T=2;function F(e,t){if(""!==e.w&&Math.round(e.w+e.x-t.width)>1){var r=A(e)[a.$extra].currentContentArea;return e.w+e.x>r.w?O:C}if(""!==e.h&&Math.round(e.h+e.y-t.height)>1){var n=A(e)[a.$extra].currentContentArea;return e.h+e.y>n.h?O:C}return T}var _=function(e){y(r,a.StringObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"appearanceFilter")).id=e.id||"",n.type=(0,c.getStringOption)(e.type,["optional","required"]),n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),P=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"arc",!0)).circular=(0,c.getInteger)({data:e.circular,defaultValue:0,validate:function(e){return 1===e}}),n.hand=(0,c.getStringOption)(e.hand,["even","left","right"]),n.id=e.id||"",n.startAngle=(0,c.getFloat)({data:e.startAngle,defaultValue:0,validate:function(e){return!0}}),n.sweepAngle=(0,c.getFloat)({data:e.sweepAngle,defaultValue:360,validate:function(e){return!0}}),n.use=e.use||"",n.usehref=e.usehref||"",n.edge=null,n.fill=null,n}return r}(),I=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"area",!0)).colSpan=(0,c.getInteger)({data:e.colSpan,defaultValue:1,validate:function(e){return e>=1||-1===e}}),n.id=e.id||"",n.name=e.name||"",n.relevant=(0,c.getRelevant)(e.relevant),n.use=e.use||"",n.usehref=e.usehref||"",n.x=(0,c.getMeasurement)(e.x,"0pt"),n.y=(0,c.getMeasurement)(e.y,"0pt"),n.desc=null,n.extras=null,n.area=new a.XFAObjectArray,n.draw=new a.XFAObjectArray,n.exObject=new a.XFAObjectArray,n.exclGroup=new a.XFAObjectArray,n.field=new a.XFAObjectArray,n.subform=new a.XFAObjectArray,n.subformSet=new a.XFAObjectArray,n}return m(r,[{key:a.$isTransparent,value:function(){return!0}},{key:a.$addHTML,value:function(e,t){var r=h(t,4),n=r[0],i=r[1],o=r[2],s=r[3];this[a.$extra].width=Math.max(this[a.$extra].width,n+o),this[a.$extra].height=Math.max(this[a.$extra].height,i+s),this[a.$extra].children.push(e)}},{key:a.$getAvailableSpace,value:function(){return this[a.$extra].availableSpace}},{key:a.$toHTML,value:function(e){var t=(0,o.toStyle)(this,"position"),r={style:t,id:this[a.$uid],class:"xfaArea"};this.name&&(r.xfaName=this.name);var n=[];if(this[a.$extra]={children:n,width:0,height:0,availableSpace:e},!this[a.$childrenToHTML]({filter:new Set(["area","draw","field","exclGroup","subform","subformSet"]),include:!0}))return delete this[a.$extra],c.HTMLResult.empty;t.width=(0,o.measureToString)(this[a.$extra].width),t.height=(0,o.measureToString)(this[a.$extra].height);var i={name:"div",attributes:r,children:n},s=[this.x,this.y,this[a.$extra].width,this[a.$extra].height];return delete this[a.$extra],c.HTMLResult.success(i,s)}}]),r}(),E=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"assist",!0)).id=e.id||"",n.role=e.role||"",n.use=e.use||"",n.usehref=e.usehref||"",n.speak=null,n.toolTip=null,n}return r}(),j=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"barcode",!0)).charEncoding=(0,c.getKeyword)({data:e.charEncoding?e.charEncoding.toLowerCase():"",defaultValue:"",validate:function(e){return["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(e)||e.match(/iso-8859-[0-9]{2}/)}}),n.checksum=(0,c.getStringOption)(e.checksum,["none","1mod10","1mod10_1mod11","2mod10","auto"]),n.dataColumnCount=(0,c.getInteger)({data:e.dataColumnCount,defaultValue:-1,validate:function(e){return e>=0}}),n.dataLength=(0,c.getInteger)({data:e.dataLength,defaultValue:-1,validate:function(e){return e>=0}}),n.dataPrep=(0,c.getStringOption)(e.dataPrep,["none","flateCompress"]),n.dataRowCount=(0,c.getInteger)({data:e.dataRowCount,defaultValue:-1,validate:function(e){return e>=0}}),n.endChar=e.endChar||"",n.errorCorrectionLevel=(0,c.getInteger)({data:e.errorCorrectionLevel,defaultValue:-1,validate:function(e){return e>=0&&e<=8}}),n.id=e.id||"",n.moduleHeight=(0,c.getMeasurement)(e.moduleHeight,"5mm"),n.moduleWidth=(0,c.getMeasurement)(e.moduleWidth,"0.25mm"),n.printCheckDigit=(0,c.getInteger)({data:e.printCheckDigit,defaultValue:0,validate:function(e){return 1===e}}),n.rowColumnRatio=(0,c.getRatio)(e.rowColumnRatio),n.startChar=e.startChar||"",n.textLocation=(0,c.getStringOption)(e.textLocation,["below","above","aboveEmbedded","belowEmbedded","none"]),n.truncate=(0,c.getInteger)({data:e.truncate,defaultValue:0,validate:function(e){return 1===e}}),n.type=(0,c.getStringOption)(e.type?e.type.toLowerCase():"",["aztec","codabar","code2of5industrial","code2of5interleaved","code2of5matrix","code2of5standard","code3of9","code3of9extended","code11","code49","code93","code128","code128a","code128b","code128c","code128sscc","datamatrix","ean8","ean8add2","ean8add5","ean13","ean13add2","ean13add5","ean13pwcd","fim","logmars","maxicode","msi","pdf417","pdf417macro","plessey","postauscust2","postauscust3","postausreplypaid","postausstandard","postukrm4scc","postusdpbc","postusimb","postusstandard","postus5zip","qrcode","rfid","rss14","rss14expanded","rss14limited","rss14stacked","rss14stackedomni","rss14truncated","telepen","ucc128","ucc128random","ucc128sscc","upca","upcaadd2","upcaadd5","upcapwcd","upce","upceadd2","upceadd5","upcean2","upcean5","upsmaxicode"]),n.upsMode=(0,c.getStringOption)(e.upsMode,["usCarrier","internationalCarrier","secureSymbol","standardSymbol"]),n.use=e.use||"",n.usehref=e.usehref||"",n.wideNarrowRatio=(0,c.getRatio)(e.wideNarrowRatio),n.encrypt=null,n.extras=null,n}return r}(),R=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"bind",!0)).match=(0,c.getStringOption)(e.match,["once","dataRef","global","none"]),n.ref=e.ref||"",n.picture=null,n}return r}(),M=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"bindItems")).connection=e.connection||"",n.labelRef=e.labelRef||"",n.ref=e.ref||"",n.valueRef=e.valueRef||"",n}return r}();t.BindItems=M;var N=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"bookend")).id=e.id||"",n.leader=e.leader||"",n.trailer=e.trailer||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),B=function(e){y(r,a.Option01);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"boolean")).id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return m(r,[{key:a.$toHTML,value:function(e){return c.HTMLResult.success(1===this[a.$content])}}]),r}(),D=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"border",!0)).break=(0,c.getStringOption)(e.break,["close","open"]),n.hand=(0,c.getStringOption)(e.hand,["even","left","right"]),n.id=e.id||"",n.presence=(0,c.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),n.relevant=(0,c.getRelevant)(e.relevant),n.use=e.use||"",n.usehref=e.usehref||"",n.corner=new a.XFAObjectArray(4),n.edge=new a.XFAObjectArray(4),n.extras=null,n.fill=null,n.margin=null,n}return m(r,[{key:a.$toStyle,value:function(e,t){var r=this.edge.children.slice();if(r.length<4)for(var n=r[r.length-1]||new ue({}),i=r.length;i<4;i++)r.push(n);e=e||[0,0,0,0];for(var s=0;s<4;s++)e[s]=r[s].thickness;t=t||[0,0,0,0];var c,u=r.map(function(e){var t=e[a.$toStyle]();return t.color=t.color||"#000000",t});this.margin?(c=this.margin[a.$toStyle](),t[0]=this.margin.topInset,t[1]=this.margin.rightInset,t[2]=this.margin.bottomInset,t[3]=this.margin.leftInset):c=Object.create(null);var l=!1,f=this[a.$getParent]();(f?f[a.$getParent]():null)instanceof Pt&&(l=!0),this.fill&&Object.assign(c,this.fill[a.$toStyle]());var h=!1;if(this.corner.children.some(function(e){return 0!==e.radius})){var d=this.corner.children.map(function(e){return e[a.$toStyle]()});if(2===d.length||3===d.length)for(var p=d[d.length-1],g=d.length;g<4;g++)d.push(p);c.borderRadius=d.map(function(e){return e.radius}).join(" "),h=!0}var m=u[0];if(!h&&(this.edge.children.length<=1||u.every(function(e){return e.style===m.style&&e.width===m.width&&e.color===m.color})&&t.every(function(e){return e===t[0]}))){var v;switch(this.presence){case"invisible":case"hidden":v="";break;case"inactive":v="none";break;default:v=m.style}c.outline="".concat(m.width," ").concat(m.color," ").concat(v);var y=r[0].thickness+t[0];c.outlineOffset="-".concat((0,o.measureToString)(y)),l&&(c.padding="".concat((0,o.measureToString)(y+1)))}else{switch(this.presence){case"invisible":case"hidden":c.borderStyle="";break;case"inactive":c.borderStyle="none";break;default:c.borderStyle=u.map(function(e){return e.style}).join(" ")}c.borderWidth=u.map(function(e){return e.width}).join(" "),c.borderColor=u.map(function(e){return e.color}).join(" ")}return c}}]),r}(),L=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"break",!0)).after=(0,c.getStringOption)(e.after,["auto","contentArea","pageArea","pageEven","pageOdd"]),n.afterTarget=e.afterTarget||"",n.before=(0,c.getStringOption)(e.before,["auto","contentArea","pageArea","pageEven","pageOdd"]),n.beforeTarget=e.beforeTarget||"",n.bookendLeader=e.bookendLeader||"",n.bookendTrailer=e.bookendTrailer||"",n.id=e.id||"",n.overflowLeader=e.overflowLeader||"",n.overflowTarget=e.overflowTarget||"",n.overflowTrailer=e.overflowTrailer||"",n.startNew=(0,c.getInteger)({data:e.startNew,defaultValue:0,validate:function(e){return 1===e}}),n.use=e.use||"",n.usehref=e.usehref||"",n.extras=null,n}return r}(),U=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"breakAfter",!0)).id=e.id||"",n.leader=e.leader||"",n.startNew=(0,c.getInteger)({data:e.startNew,defaultValue:0,validate:function(e){return 1===e}}),n.target=e.target||"",n.targetType=(0,c.getStringOption)(e.targetType,["auto","contentArea","pageArea","pageEven","pageOdd"]),n.trailer=e.trailer||"",n.use=e.use||"",n.usehref=e.usehref||"",n.script=null,n}return r}(),q=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"breakBefore",!0)).id=e.id||"",n.leader=e.leader||"",n.startNew=(0,c.getInteger)({data:e.startNew,defaultValue:0,validate:function(e){return 1===e}}),n.target=e.target||"",n.targetType=(0,c.getStringOption)(e.targetType,["auto","contentArea","pageArea","pageEven","pageOdd"]),n.trailer=e.trailer||"",n.use=e.use||"",n.usehref=e.usehref||"",n.script=null,n}return m(r,[{key:a.$toHTML,value:function(e){return this[a.$extra]={},c.HTMLResult.FAILURE}}]),r}(),X=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"button",!0)).highlight=(0,c.getStringOption)(e.highlight,["inverted","none","outline","push"]),n.id=e.id||"",n.use=e.use||"",n.usehref=e.usehref||"",n.extras=null,n}return m(r,[{key:a.$toHTML,value:function(e){return c.HTMLResult.success({name:"button",attributes:{class:"xfaButton",style:{}},children:[]})}}]),r}(),H=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"calculate",!0)).id=e.id||"",n.override=(0,c.getStringOption)(e.override,["disabled","error","ignore","warning"]),n.use=e.use||"",n.usehref=e.usehref||"",n.extras=null,n.message=null,n.script=null,n}return r}(),$=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"caption",!0)).id=e.id||"",n.placement=(0,c.getStringOption)(e.placement,["left","bottom","inline","right","top"]),n.presence=(0,c.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),n.reserve=(0,c.getMeasurement)(e.reserve),n.use=e.use||"",n.usehref=e.usehref||"",n.extras=null,n.font=null,n.margin=null,n.para=null,n.value=null,n}return m(r,[{key:a.$setValue,value:function(e){x(this,e)}},{key:a.$toHTML,value:function(e){if(!this.value)return c.HTMLResult.EMPTY;var t=this.value[a.$toHTML](e).html;if(!t)return c.HTMLResult.EMPTY;var r=[];"string"==typeof t?r.push({name:"#text",value:t}):r.push(t);var n=(0,o.toStyle)(this,"font","margin","para","visibility");switch(this.placement){case"left":case"right":this.reserve>0?n.width=(0,o.measureToString)(this.reserve):n.minWidth=(0,o.measureToString)(this.reserve);break;case"top":case"bottom":this.reserve>0?n.height=(0,o.measureToString)(this.reserve):n.minHeight=(0,o.measureToString)(this.reserve)}return c.HTMLResult.success({name:"div",attributes:{style:n,class:"xfaCaption"},children:r})}}]),r}(),z=function(e){y(r,a.StringObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"certificate")).id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),G=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"certificates",!0)).credentialServerPolicy=(0,c.getStringOption)(e.credentialServerPolicy,["optional","required"]),n.id=e.id||"",n.url=e.url||"",n.urlPolicy=e.urlPolicy||"",n.use=e.use||"",n.usehref=e.usehref||"",n.encryption=null,n.issuers=null,n.keyUsage=null,n.oids=null,n.signing=null,n.subjectDNs=null,n}return r}(),W=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"checkButton",!0)).id=e.id||"",n.mark=(0,c.getStringOption)(e.mark,["default","check","circle","cross","diamond","square","star"]),n.shape=(0,c.getStringOption)(e.shape,["square","round"]),n.size=(0,c.getMeasurement)(e.size,"10pt"),n.use=e.use||"",n.usehref=e.usehref||"",n.border=null,n.extras=null,n.margin=null,n}return m(r,[{key:a.$toHTML,value:function(e){var t,r,n=(0,o.toStyle)(this,"border","margin"),i=(0,o.measureToString)(this.size);if(n.width=n.height=i,"square"===this.shape?(t="▪",r="10%"):(t="●",r="50%"),n.borderRadius||(n.borderRadius=r),"default"!==this.mark)switch(this.mark){case"check":t="✓";break;case"circle":t="●";break;case"cross":t="✕";break;case"diamond":t="♦";break;case"square":t="▪";break;case"star":t="★"}"10px"!==i&&(n.fontSize=i,n.lineHeight=i,n.width=i,n.height=i);var s=this[a.$getParent]()[a.$getParent]()[a.$uid],u={name:"input",attributes:{class:"xfaCheckbox",fieldId:s,type:"radio",id:"".concat(s,"-radio")}},l=this[a.$getParent]()[a.$getParent]()[a.$getParent]();return l instanceof we&&(u.attributes.name=l[a.$uid]),c.HTMLResult.success({name:"label",attributes:{class:"xfaLabel"},children:[u,{name:"span",attributes:{class:"xfaCheckboxMark",mark:t,style:n}}]})}}]),r}(),V=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"choiceList",!0)).commitOn=(0,c.getStringOption)(e.commitOn,["select","exit"]),n.id=e.id||"",n.open=(0,c.getStringOption)(e.open,["userControl","always","multiSelect","onEntry"]),n.textEntry=(0,c.getInteger)({data:e.textEntry,defaultValue:0,validate:function(e){return 1===e}}),n.use=e.use||"",n.usehref=e.usehref||"",n.border=null,n.extras=null,n.margin=null,n}return m(r,[{key:a.$toHTML,value:function(e){var t=(0,o.toStyle)(this,"border","margin"),r=this[a.$getParent]()[a.$getParent](),n=[];if(r.items.children.length>0)for(var i=r.items.children[0][a.$toHTML]().html,s=r.items.children[1]?r.items.children[1][a.$toHTML]().html:[],u=0,l=i.length;u<l;u++)n.push({name:"option",attributes:{value:s[u]||i[u]},value:i[u]});var f={class:"xfaSelect",fieldId:this[a.$getParent]()[a.$getParent]()[a.$uid],style:t};return"multiSelect"===this.open&&(f.multiple=!0),c.HTMLResult.success({name:"label",attributes:{class:"xfaLabel"},children:[{name:"select",children:n,attributes:f}]})}}]),r}(),K=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"color",!0)).cSpace=(0,c.getStringOption)(e.cSpace,["SRGB"]),n.id=e.id||"",n.use=e.use||"",n.usehref=e.usehref||"",n.value=e.value?(0,c.getColor)(e.value):"",n.extras=null,n}return m(r,[{key:a.$hasSettableValue,value:function(){return!1}},{key:a.$toStyle,value:function(){return this.value?u.Util.makeHexColor(this.value.r,this.value.g,this.value.b):null}}]),r}(),Y=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"comb")).id=e.id||"",n.numberOfCells=(0,c.getInteger)({data:e.numberOfCells,defaultValue:0,validate:function(e){return e>=0}}),n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),J=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"connect",!0)).connection=e.connection||"",n.id=e.id||"",n.ref=e.ref||"",n.usage=(0,c.getStringOption)(e.usage,["exportAndImport","exportOnly","importOnly"]),n.use=e.use||"",n.usehref=e.usehref||"",n.picture=null,n}return r}(),Z=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"contentArea",!0)).h=(0,c.getMeasurement)(e.h),n.id=e.id||"",n.name=e.name||"",n.relevant=(0,c.getRelevant)(e.relevant),n.use=e.use||"",n.usehref=e.usehref||"",n.w=(0,c.getMeasurement)(e.w),n.x=(0,c.getMeasurement)(e.x,"0pt"),n.y=(0,c.getMeasurement)(e.y,"0pt"),n.desc=null,n.extras=null,n}return m(r,[{key:a.$toHTML,value:function(e){var t={position:"absolute",left:(0,o.measureToString)(this.x),top:(0,o.measureToString)(this.y),width:(0,o.measureToString)(this.w),height:(0,o.measureToString)(this.h)};return c.HTMLResult.success({name:"div",children:[],attributes:{style:t,class:"xfaContentarea",id:this[a.$uid]}})}}]),r}(),Q=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"corner",!0)).id=e.id||"",n.inverted=(0,c.getInteger)({data:e.inverted,defaultValue:0,validate:function(e){return 1===e}}),n.join=(0,c.getStringOption)(e.join,["square","round"]),n.presence=(0,c.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),n.radius=(0,c.getMeasurement)(e.radius),n.stroke=(0,c.getStringOption)(e.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),n.thickness=(0,c.getMeasurement)(e.thickness,"0.5pt"),n.use=e.use||"",n.usehref=e.usehref||"",n.color=null,n.extras=null,n}return m(r,[{key:a.$toStyle,value:function(){var e=(0,o.toStyle)(this,"visibility");return e.radius=(0,o.measureToString)(this.radius),e}}]),r}(),ee=function(e){y(r,a.ContentObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"date")).id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return m(r,[{key:a.$finalize,value:function(){this[a.$content]=new Date(this[a.$content].trim())}},{key:a.$toHTML,value:function(e){return c.HTMLResult.success(this[a.$content].toString())}}]),r}(),te=function(e){y(r,a.ContentObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"dateTime")).id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return m(r,[{key:a.$finalize,value:function(){this[a.$content]=new Date(this[a.$content].trim())}},{key:a.$toHTML,value:function(e){return c.HTMLResult.success(this[a.$content].toString())}}]),r}(),re=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"dateTimeEdit",!0)).hScrollPolicy=(0,c.getStringOption)(e.hScrollPolicy,["auto","off","on"]),n.id=e.id||"",n.picker=(0,c.getStringOption)(e.picker,["host","none"]),n.use=e.use||"",n.usehref=e.usehref||"",n.border=null,n.comb=null,n.extras=null,n.margin=null,n}return m(r,[{key:a.$toHTML,value:function(e){var t=(0,o.toStyle)(this,"border","font","margin"),r={name:"input",attributes:{type:"text",fieldId:this[a.$getParent]()[a.$getParent]()[a.$uid],class:"xfaTextfield",style:t}};return c.HTMLResult.success({name:"label",attributes:{class:"xfaLabel"},children:[r]})}}]),r}(),ne=function(e){y(r,a.ContentObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"decimal")).fracDigits=(0,c.getInteger)({data:e.fracDigits,defaultValue:2,validate:function(e){return!0}}),n.id=e.id||"",n.leadDigits=(0,c.getInteger)({data:e.leadDigits,defaultValue:-1,validate:function(e){return!0}}),n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return m(r,[{key:a.$finalize,value:function(){var e=parseFloat(this[a.$content].trim());this[a.$content]=isNaN(e)?null:e}},{key:a.$toHTML,value:function(e){return c.HTMLResult.success(null!==this[a.$content]?this[a.$content].toString():"")}}]),r}(),ae=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"defaultUi",!0)).id=e.id||"",n.use=e.use||"",n.usehref=e.usehref||"",n.extras=null,n}return r}(),ie=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"desc",!0)).id=e.id||"",n.use=e.use||"",n.usehref=e.usehref||"",n.boolean=new a.XFAObjectArray,n.date=new a.XFAObjectArray,n.dateTime=new a.XFAObjectArray,n.decimal=new a.XFAObjectArray,n.exData=new a.XFAObjectArray,n.float=new a.XFAObjectArray,n.image=new a.XFAObjectArray,n.integer=new a.XFAObjectArray,n.text=new a.XFAObjectArray,n.time=new a.XFAObjectArray,n}return r}(),oe=function(e){y(r,a.OptionObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"digestMethod",["","SHA1","SHA256","SHA512","RIPEMD160"])).id=e.id||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),se=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"digestMethods",!0)).id=e.id||"",n.type=(0,c.getStringOption)(e.type,["optional","required"]),n.use=e.use||"",n.usehref=e.usehref||"",n.digestMethod=new a.XFAObjectArray,n}return r}(),ce=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"draw",!0)).anchorType=(0,c.getStringOption)(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),n.colSpan=(0,c.getInteger)({data:e.colSpan,defaultValue:1,validate:function(e){return e>=1||-1===e}}),n.h=e.h?(0,c.getMeasurement)(e.h):"",n.hAlign=(0,c.getStringOption)(e.hAlign,["left","center","justify","justifyAll","radix","right"]),n.id=e.id||"",n.locale=e.locale||"",n.maxH=(0,c.getMeasurement)(e.maxH,"0pt"),n.maxW=(0,c.getMeasurement)(e.maxW,"0pt"),n.minH=(0,c.getMeasurement)(e.minH,"0pt"),n.minW=(0,c.getMeasurement)(e.minW,"0pt"),n.name=e.name||"",n.presence=(0,c.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),n.relevant=(0,c.getRelevant)(e.relevant),n.rotate=(0,c.getInteger)({data:e.rotate,defaultValue:0,validate:function(e){return e%90==0}}),n.use=e.use||"",n.usehref=e.usehref||"",n.w=e.w?(0,c.getMeasurement)(e.w):"",n.x=(0,c.getMeasurement)(e.x,"0pt"),n.y=(0,c.getMeasurement)(e.y,"0pt"),n.assist=null,n.border=null,n.caption=null,n.desc=null,n.extras=null,n.font=null,n.keep=null,n.margin=null,n.para=null,n.traversal=null,n.ui=null,n.value=null,n.setProperty=new a.XFAObjectArray,n}return m(r,[{key:a.$setValue,value:function(e){x(this,e)}},{key:a.$toHTML,value:function(e){if("hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return c.HTMLResult.EMPTY;if((0,o.fixDimensions)(this),""!==this.w&&""===this.h&&this.value){var t=this.value[a.$text]();if(t){var r=(0,o.layoutText)(t,this.font.size,{width:this.w,height:1/0}).height;this.h=r||""}}switch(F(this,e)){case O:return c.HTMLResult.EMPTY;case C:return c.HTMLResult.FAILURE}var n=(0,o.toStyle)(this,"font","hAlign","dimensions","position","presence","rotate","anchorType","borderMarginPadding"),i=["xfaDraw"];this.font&&i.push("xfaFont");var s={style:n,id:this[a.$uid],class:i.join(" ")};this.name&&(s.xfaName=this.name);var u={name:"div",attributes:s,children:[]},l=(0,o.addExtraDivForBorder)(u),f=(0,o.computeBbox)(this,u,e),d=this.value?this.value[a.$toHTML](e).html:null;if(null===d)return c.HTMLResult.success(l,f);if(u.children.push(d),"xfaRich"===d.attributes.class&&(""===this.h&&(n.height="auto"),""===this.w&&(n.width="auto"),this.para)){switch(s.style.display="flex",s.style.flexDirection="column",this.para.vAlign){case"top":s.style.justifyContent="start";break;case"bottom":s.style.justifyContent="end";break;case"middle":s.style.justifyContent="center"}var p=this.para[a.$toStyle]();if(d.attributes.style)for(var g=0,m=Object.entries(p);g<m.length;g++){var v=h(m[g],2),y=v[0],b=v[1];y in d.attributes.style||(d.attributes.style[y]=b)}else d.attributes.style=p}return c.HTMLResult.success(l,f)}}]),r}(),ue=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"edge",!0)).cap=(0,c.getStringOption)(e.cap,["square","butt","round"]),n.id=e.id||"",n.presence=(0,c.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),n.stroke=(0,c.getStringOption)(e.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),n.thickness=Math.max(1,Math.round((0,c.getMeasurement)(e.thickness,"0.5pt"))),n.use=e.use||"",n.usehref=e.usehref||"",n.color=null,n.extras=null,n}return m(r,[{key:a.$toStyle,value:function(){var e=(0,o.toStyle)(this,"visibility");if(Object.assign(e,{linecap:this.cap,width:(0,o.measureToString)(Math.max(1,Math.round(this.thickness))),color:this.color?this.color[a.$toStyle]():"#000000",style:""}),"visible"!==this.presence)e.style="none";else switch(this.stroke){case"solid":e.style="solid";break;case"dashDot":case"dashDotDot":case"dashed":e.style="dashed";break;case"dotted":e.style="dotted";break;case"embossed":e.style="ridge";break;case"etched":e.style="groove";break;case"lowered":e.style="inset";break;case"raised":e.style="outset"}return e}}]),r}(),le=function(e){y(r,a.OptionObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"encoding",["adbe.x509.rsa_sha1","adbe.pkcs7.detached","adbe.pkcs7.sha1"])).id=e.id||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),fe=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"encodings",!0)).id=e.id||"",n.type=(0,c.getStringOption)(e.type,["optional","required"]),n.use=e.use||"",n.usehref=e.usehref||"",n.encoding=new a.XFAObjectArray,n}return r}(),he=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"encrypt",!0)).id=e.id||"",n.use=e.use||"",n.usehref=e.usehref||"",n.certificate=null,n}return r}(),de=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"encryptData",!0)).id=e.id||"",n.operation=(0,c.getStringOption)(e.operation,["encrypt","decrypt"]),n.target=e.target||"",n.use=e.use||"",n.usehref=e.usehref||"",n.filter=null,n.manifest=null,n}return r}(),pe=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"encryption",!0)).id=e.id||"",n.type=(0,c.getStringOption)(e.type,["optional","required"]),n.use=e.use||"",n.usehref=e.usehref||"",n.certificate=new a.XFAObjectArray,n}return r}(),ge=function(e){y(r,a.OptionObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"encryptionMethod",["","AES256-CBC","TRIPLEDES-CBC","AES128-CBC","AES192-CBC"])).id=e.id||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),me=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"encryptionMethods",!0)).id=e.id||"",n.type=(0,c.getStringOption)(e.type,["optional","required"]),n.use=e.use||"",n.usehref=e.usehref||"",n.encryptionMethod=new a.XFAObjectArray,n}return r}(),ve=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"event",!0)).activity=(0,c.getStringOption)(e.activity,["click","change","docClose","docReady","enter","exit","full","indexChange","initialize","mouseDown","mouseEnter","mouseExit","mouseUp","postExecute","postOpen","postPrint","postSave","postSign","postSubmit","preExecute","preOpen","prePrint","preSave","preSign","preSubmit","ready","validationState"]),n.id=e.id||"",n.listen=(0,c.getStringOption)(e.listen,["refOnly","refAndDescendents"]),n.name=e.name||"",n.ref=e.ref||"",n.use=e.use||"",n.usehref=e.usehref||"",n.extras=null,n.encryptData=null,n.execute=null,n.script=null,n.signData=null,n.submit=null,n}return r}(),ye=function(e){y(r,a.ContentObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"exData")).contentType=e.contentType||"",n.href=e.href||"",n.id=e.id||"",n.maxLength=(0,c.getInteger)({data:e.maxLength,defaultValue:-1,validate:function(e){return e>=-1}}),n.name=e.name||"",n.rid=e.rid||"",n.transferEncoding=(0,c.getStringOption)(e.transferEncoding,["none","base64","package"]),n.use=e.use||"",n.usehref=e.usehref||"",n}return m(r,[{key:a.$onChild,value:function(e){return"text/html"===this.contentType&&e[a.$namespaceId]===i.NamespaceIds.xhtml.id?(this[a.$content]=e,!0):"text/xml"===this.contentType&&(this[a.$content]=e,!0)}},{key:a.$toHTML,value:function(e){return"text/html"===this.contentType&&this[a.$content]?this[a.$content][a.$toHTML](e):c.HTMLResult.EMPTY}}]),r}(),be=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"exObject",!0)).archive=e.archive||"",n.classId=e.classId||"",n.codeBase=e.codeBase||"",n.codeType=e.codeType||"",n.id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n.extras=null,n.boolean=new a.XFAObjectArray,n.date=new a.XFAObjectArray,n.dateTime=new a.XFAObjectArray,n.decimal=new a.XFAObjectArray,n.exData=new a.XFAObjectArray,n.exObject=new a.XFAObjectArray,n.float=new a.XFAObjectArray,n.image=new a.XFAObjectArray,n.integer=new a.XFAObjectArray,n.text=new a.XFAObjectArray,n.time=new a.XFAObjectArray,n}return r}(),we=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"exclGroup",!0)).access=(0,c.getStringOption)(e.access,["open","nonInteractive","protected","readOnly"]),n.accessKey=e.accessKey||"",n.anchorType=(0,c.getStringOption)(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),n.colSpan=(0,c.getInteger)({data:e.colSpan,defaultValue:1,validate:function(e){return e>=1||-1===e}}),n.h=e.h?(0,c.getMeasurement)(e.h):"",n.hAlign=(0,c.getStringOption)(e.hAlign,["left","center","justify","justifyAll","radix","right"]),n.id=e.id||"",n.layout=(0,c.getStringOption)(e.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),n.maxH=(0,c.getMeasurement)(e.maxH,"0pt"),n.maxW=(0,c.getMeasurement)(e.maxW,"0pt"),n.minH=(0,c.getMeasurement)(e.minH,"0pt"),n.minW=(0,c.getMeasurement)(e.minW,"0pt"),n.name=e.name||"",n.presence=(0,c.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),n.relevant=(0,c.getRelevant)(e.relevant),n.use=e.use||"",n.usehref=e.usehref||"",n.w=e.w?(0,c.getMeasurement)(e.w):"",n.x=(0,c.getMeasurement)(e.x,"0pt"),n.y=(0,c.getMeasurement)(e.y,"0pt"),n.assist=null,n.bind=null,n.border=null,n.calculate=null,n.caption=null,n.desc=null,n.extras=null,n.margin=null,n.para=null,n.traversal=null,n.validate=null,n.connect=new a.XFAObjectArray,n.event=new a.XFAObjectArray,n.field=new a.XFAObjectArray,n.setProperty=new a.XFAObjectArray,n}return m(r,[{key:a.$hasSettableValue,value:function(){return!0}},{key:a.$setValue,value:function(e){var t,r=f(this.field.children);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(!n.value){var i=new Et({});n[a.$appendChild](i),n.value=i}var o=new B({});o[a.$content]=0;var s,c=f(n.items.children);try{for(c.s();!(s=c.n()).done;){if(s.value[a.$hasItem](e)){o[a.$content]=1;break}}}catch(e){c.e(e)}finally{c.f()}n.value[a.$setValue](o)}}catch(e){r.e(e)}finally{r.f()}}},{key:a.$flushHTML,value:function(){return(0,s.flushHTML)(this)}},{key:a.$addHTML,value:function(e,t){(0,s.addHTML)(this,e,t)}},{key:a.$getAvailableSpace,value:function(){return(0,s.getAvailableSpace)(this)}},{key:a.$toHTML,value:function(e){if("hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return c.HTMLResult.EMPTY;(0,o.fixDimensions)(this);var t=[],r={id:this[a.$uid]};switch(this[a.$extra]||(this[a.$extra]=Object.create(null)),Object.assign(this[a.$extra],{children:t,attributes:r,attempt:0,availableSpace:e,width:0,height:0,prevHeight:0,currentWidth:0}),F(this,e)){case O:return c.HTMLResult.EMPTY;case C:return c.HTMLResult.FAILURE}e={width:""===this.w?e.width:this.w,height:""===this.h?e.height:this.h};var n=new Set(["field"]);if("row"===this.layout){var i=this[a.$getParent]().columnWidths;Array.isArray(i)&&i.length>0&&(this[a.$extra].columnWidths=i,this[a.$extra].currentColumn=0)}var s,u=(0,o.toStyle)(this,"anchorType","dimensions","position","presence","borderMarginPadding","hAlign"),l=["xfaExclgroup"],f=(0,o.layoutClass)(this);if(f&&l.push(f),r.style=u,r.class=l.join(" "),this.name&&(r.xfaName=this.name),"lr-tb"===this.layout||"rl-tb"===this.layout){for(;this[a.$extra].attempt<2&&!this[a.$childrenToHTML]({filter:n,include:!0});this[a.$extra].attempt++);s=2===this[a.$extra].attempt}else s=!this[a.$childrenToHTML]({filter:n,include:!0});if(s)return c.HTMLResult.FAILURE;var h=0,d=0;this.margin&&(h=this.margin.leftInset+this.margin.rightInset,d=this.margin.topInset+this.margin.bottomInset),""===this.w&&(u.width=(0,o.measureToString)(this[a.$extra].width+h)),""===this.h&&(u.height=(0,o.measureToString)(this[a.$extra].height+d));var p,g={name:"div",attributes:r,children:t};if(g=(0,o.addExtraDivForBorder)(g),""!==this.w&&""!==this.h)p=[this.x,this.y,this.w,this.h];else{var m=""===this.w?h+this[a.$extra].width:this.w,v=""===this.h?d+this[a.$extra].height:this.h;p=[this.x,this.y,m,v]}return delete this[a.$extra],c.HTMLResult.success(g,p)}}]),r}(),ke=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"execute")).connection=e.connection||"",n.executeType=(0,c.getStringOption)(e.executeType,["import","remerge"]),n.id=e.id||"",n.runAt=(0,c.getStringOption)(e.runAt,["client","both","server"]),n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),Se=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"extras",!0)).id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n.boolean=new a.XFAObjectArray,n.date=new a.XFAObjectArray,n.dateTime=new a.XFAObjectArray,n.decimal=new a.XFAObjectArray,n.exData=new a.XFAObjectArray,n.extras=new a.XFAObjectArray,n.float=new a.XFAObjectArray,n.image=new a.XFAObjectArray,n.integer=new a.XFAObjectArray,n.text=new a.XFAObjectArray,n.time=new a.XFAObjectArray,n}return r}(),xe=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"field",!0)).access=(0,c.getStringOption)(e.access,["open","nonInteractive","protected","readOnly"]),n.accessKey=e.accessKey||"",n.anchorType=(0,c.getStringOption)(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),n.colSpan=(0,c.getInteger)({data:e.colSpan,defaultValue:1,validate:function(e){return e>=1||-1===e}}),n.h=e.h?(0,c.getMeasurement)(e.h):"",n.hAlign=(0,c.getStringOption)(e.hAlign,["left","center","justify","justifyAll","radix","right"]),n.id=e.id||"",n.locale=e.locale||"",n.maxH=(0,c.getMeasurement)(e.maxH,"0pt"),n.maxW=(0,c.getMeasurement)(e.maxW,"0pt"),n.minH=(0,c.getMeasurement)(e.minH,"0pt"),n.minW=(0,c.getMeasurement)(e.minW,"0pt"),n.name=e.name||"",n.presence=(0,c.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),n.relevant=(0,c.getRelevant)(e.relevant),n.rotate=(0,c.getInteger)({data:e.rotate,defaultValue:0,validate:function(e){return e%90==0}}),n.use=e.use||"",n.usehref=e.usehref||"",n.w=e.w?(0,c.getMeasurement)(e.w):"",n.x=(0,c.getMeasurement)(e.x,"0pt"),n.y=(0,c.getMeasurement)(e.y,"0pt"),n.assist=null,n.bind=null,n.border=null,n.calculate=null,n.caption=null,n.desc=null,n.extras=null,n.font=null,n.format=null,n.items=new a.XFAObjectArray(2),n.keep=null,n.margin=null,n.para=null,n.traversal=null,n.ui=null,n.validate=null,n.value=null,n.bindItems=new a.XFAObjectArray,n.connect=new a.XFAObjectArray,n.event=new a.XFAObjectArray,n.setProperty=new a.XFAObjectArray,n}return m(r,[{key:a.$setValue,value:function(e){x(this,e)}},{key:a.$toHTML,value:function(e){if(!this.ui||"hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return c.HTMLResult.EMPTY;switch((0,o.fixDimensions)(this),F(this,e)){case O:return c.HTMLResult.EMPTY;case C:return c.HTMLResult.FAILURE}var t=(0,o.toStyle)(this,"font","dimensions","position","rotate","anchorType","presence","borderMarginPadding","hAlign"),r=["xfaField"];this.font&&r.push("xfaFont");var n={style:t,id:this[a.$uid],class:r.join(" ")};this.name&&(n.xfaName=this.name);var i=[],s={name:"div",attributes:n,children:i},u=(0,o.computeBbox)(this,s,e);s=(0,o.addExtraDivForBorder)(s);var l=this.ui?this.ui[a.$toHTML]().html:null;if(!l)return c.HTMLResult.success(s,u);if(l.attributes.style||(l.attributes.style=Object.create(null)),i.push(l),this.value)if(this.ui.imageEdit)l.children.push(this.value[a.$toHTML]().html);else if("button"!==l.name){var f=this.value[a.$toHTML]().html;f&&("textarea"===l.children[0].name?l.children[0].attributes.textContent=f.value:l.children[0].attributes.value=f.value)}var h=this.caption?this.caption[a.$toHTML]().html:null;if(!h)return c.HTMLResult.success(s,u);if("button"===l.name)return l.attributes.style.background=t.background,delete t.background,"div"===h.name&&(h.name="span"),l.children.push(h),c.HTMLResult.success(s,u);switch(l.children.splice(0,0,h),this.caption.placement){case"left":l.attributes.style.flexDirection="row";break;case"right":l.attributes.style.flexDirection="row-reverse";break;case"top":l.attributes.style.alignItems="start",l.attributes.style.flexDirection="column";break;case"bottom":l.attributes.style.alignItems="start",l.attributes.style.flexDirection="column-reverse";break;case"inline":delete l.attributes.class,h.attributes.style.float="left"}return c.HTMLResult.success(s,u)}}]),r}();t.Field=xe;var Ae=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"fill",!0)).id=e.id||"",n.presence=(0,c.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),n.use=e.use||"",n.usehref=e.usehref||"",n.color=null,n.extras=null,n.linear=null,n.pattern=null,n.radial=null,n.solid=null,n.stipple=null,n}return m(r,[{key:a.$toStyle,value:function(){var e="color";this[a.$getParent]()instanceof D&&(e="background");var t,r=Object.create(null),n=f(Object.getOwnPropertyNames(this));try{for(n.s();!(t=n.n()).done;){var i=t.value;if("extras"!==i&&"color"!==i){var o=this[i];if(o instanceof a.XFAObject)return r[e]=o[a.$toStyle](this.color),r}}}catch(e){n.e(e)}finally{n.f()}return this.color&&(r[e]=this.color[a.$toStyle]()),r}}]),r}(),Oe=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"filter",!0)).addRevocationInfo=(0,c.getStringOption)(e.addRevocationInfo,["","required","optional","none"]),n.id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n.version=(0,c.getInteger)({data:n.version,defaultValue:5,validate:function(e){return e>=1&&e<=5}}),n.appearanceFilter=null,n.certificates=null,n.digestMethods=null,n.encodings=null,n.encryptionMethods=null,n.handler=null,n.lockDocument=null,n.mdp=null,n.reasons=null,n.timeStamp=null,n}return r}(),Ce=function(e){y(r,a.ContentObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"float")).id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return m(r,[{key:a.$finalize,value:function(){var e=parseFloat(this[a.$content].trim());this[a.$content]=isNaN(e)?null:e}},{key:a.$toHTML,value:function(e){return c.HTMLResult.success(null!==this[a.$content]?this[a.$content].toString():"")}}]),r}(),Te=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"font",!0)).baselineShift=(0,c.getMeasurement)(e.baselineShift),n.fontHorizontalScale=(0,c.getFloat)({data:e.fontHorizontalScale,defaultValue:100,validate:function(e){return e>=0}}),n.fontVerticalScale=(0,c.getFloat)({data:e.fontVerticalScale,defaultValue:100,validate:function(e){return e>=0}}),n.id=e.id||"",n.kerningMode=(0,c.getStringOption)(e.kerningMode,["none","pair"]),n.letterSpacing=(0,c.getMeasurement)(e.letterSpacing,"0"),n.lineThrough=(0,c.getInteger)({data:e.lineThrough,defaultValue:0,validate:function(e){return 1===e||2===e}}),n.lineThroughPeriod=(0,c.getStringOption)(e.lineThroughPeriod,["all","word"]),n.overline=(0,c.getInteger)({data:e.overline,defaultValue:0,validate:function(e){return 1===e||2===e}}),n.overlinePeriod=(0,c.getStringOption)(e.overlinePeriod,["all","word"]),n.posture=(0,c.getStringOption)(e.posture,["normal","italic"]),n.size=(0,c.getMeasurement)(e.size,"10pt"),n.typeface=e.typeface||"",n.underline=(0,c.getInteger)({data:e.underline,defaultValue:0,validate:function(e){return 1===e||2===e}}),n.underlinePeriod=(0,c.getStringOption)(e.underlinePeriod,["all","word"]),n.use=e.use||"",n.usehref=e.usehref||"",n.weight=(0,c.getStringOption)(e.weight,["normal","bold"]),n.extras=null,n.fill=null,n}return m(r,[{key:a.$toStyle,value:function(){var e=(0,o.toStyle)(this,"fill"),t=e.color;t&&("#000000"===t?delete e.color:t.startsWith("#")||(e.background=t,e.backgroundClip="text",e.color="transparent")),this.baselineShift&&(e.verticalAlign=(0,o.measureToString)(this.baselineShift)),"none"!==this.kerningMode&&(e.fontKerning="normal"),this.letterSpacing&&(e.letterSpacing=(0,o.measureToString)(this.letterSpacing)),0!==this.lineThrough&&(e.textDecoration="line-through",2===this.lineThrough&&(e.textDecorationStyle="double")),0!==this.overline&&(e.textDecoration="overline",2===this.overline&&(e.textDecorationStyle="double")),"normal"!==this.posture&&(e.fontStyle=this.posture);var r=(0,o.measureToString)(.99*this.size);return"10px"!==r&&(e.fontSize=r),e.fontFamily=(0,o.getFonts)(this.typeface),0!==this.underline&&(e.textDecoration="underline",2===this.underline&&(e.textDecorationStyle="double")),"normal"!==this.weight&&(e.fontWeight=this.weight),e}}]),r}(),Fe=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"format",!0)).id=e.id||"",n.use=e.use||"",n.usehref=e.usehref||"",n.extras=null,n.picture=null,n}return r}(),_e=function(e){y(r,a.StringObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"handler")).id=e.id||"",n.type=(0,c.getStringOption)(e.type,["optional","required"]),n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),Pe=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"hyphenation")).excludeAllCaps=(0,c.getInteger)({data:e.excludeAllCaps,defaultValue:0,validate:function(e){return 1===e}}),n.excludeInitialCap=(0,c.getInteger)({data:e.excludeInitialCap,defaultValue:0,validate:function(e){return 1===e}}),n.hyphenate=(0,c.getInteger)({data:e.hyphenate,defaultValue:0,validate:function(e){return 1===e}}),n.id=e.id||"",n.pushCharacterCount=(0,c.getInteger)({data:e.pushCharacterCount,defaultValue:3,validate:function(e){return e>=0}}),n.remainCharacterCount=(0,c.getInteger)({data:e.remainCharacterCount,defaultValue:3,validate:function(e){return e>=0}}),n.use=e.use||"",n.usehref=e.usehref||"",n.wordCharacterCount=(0,c.getInteger)({data:e.wordCharacterCount,defaultValue:7,validate:function(e){return e>=0}}),n}return r}(),Ie=function(e){y(r,a.StringObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"image")).aspect=(0,c.getStringOption)(e.aspect,["fit","actual","height","none","width"]),n.contentType=e.contentType||"",n.href=e.href||"",n.id=e.id||"",n.name=e.name||"",n.transferEncoding=(0,c.getStringOption)(e.transferEncoding,["base64","none","package"]),n.use=e.use||"",n.usehref=e.usehref||"",n}return m(r,[{key:a.$toHTML,value:function(){if(this.href||!this[a.$content])return c.HTMLResult.EMPTY;if("base64"===this.transferEncoding){var e=(0,u.stringToBytes)(atob(this[a.$content])),t=new Blob([e],{type:this.contentType});return c.HTMLResult.success({name:"img",attributes:{class:"xfaImage",style:{},src:URL.createObjectURL(t)}})}return c.HTMLResult.EMPTY}}]),r}(),Ee=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"imageEdit",!0)).data=(0,c.getStringOption)(e.data,["link","embed"]),n.id=e.id||"",n.use=e.use||"",n.usehref=e.usehref||"",n.border=null,n.extras=null,n.margin=null,n}return m(r,[{key:a.$toHTML,value:function(e){return"embed"===this.data?c.HTMLResult.success({name:"div",children:[],attributes:{}}):c.HTMLResult.EMPTY}}]),r}(),je=function(e){y(r,a.ContentObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"integer")).id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return m(r,[{key:a.$finalize,value:function(){var e=parseInt(this[a.$content].trim(),10);this[a.$content]=isNaN(e)?null:e}},{key:a.$toHTML,value:function(e){return c.HTMLResult.success(null!==this[a.$content]?this[a.$content].toString():"")}}]),r}(),Re=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"issuers",!0)).id=e.id||"",n.type=(0,c.getStringOption)(e.type,["optional","required"]),n.use=e.use||"",n.usehref=e.usehref||"",n.certificate=new a.XFAObjectArray,n}return r}(),Me=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"items",!0)).id=e.id||"",n.name=e.name||"",n.presence=(0,c.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),n.ref=e.ref||"",n.save=(0,c.getInteger)({data:e.save,defaultValue:0,validate:function(e){return 1===e}}),n.use=e.use||"",n.usehref=e.usehref||"",n.boolean=new a.XFAObjectArray,n.date=new a.XFAObjectArray,n.dateTime=new a.XFAObjectArray,n.decimal=new a.XFAObjectArray,n.exData=new a.XFAObjectArray,n.float=new a.XFAObjectArray,n.image=new a.XFAObjectArray,n.integer=new a.XFAObjectArray,n.text=new a.XFAObjectArray,n.time=new a.XFAObjectArray,n}return m(r,[{key:a.$hasItem,value:function(e){return this.hasOwnProperty(e[a.$nodeName])&&this[e[a.$nodeName]].children.some(function(t){return t[a.$content]===e[a.$content]})}},{key:a.$toHTML,value:function(){var e,t=[],r=f(this[a.$getChildren]());try{for(r.s();!(e=r.n()).done;){var n=e.value;t.push(n[a.$text]())}}catch(e){r.e(e)}finally{r.f()}return c.HTMLResult.success(t)}}]),r}();t.Items=Me;var Ne=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;v(this,r),(n=t.call(this,S,"keep",!0)).id=e.id||"";var a=["none","contentArea","pageArea"];return n.intact=(0,c.getStringOption)(e.intact,a),n.next=(0,c.getStringOption)(e.next,a),n.previous=(0,c.getStringOption)(e.previous,a),n.use=e.use||"",n.usehref=e.usehref||"",n.extras=null,n}return r}(),Be=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;v(this,r);var a=["","yes","no"];return(n=t.call(this,S,"keyUsage")).crlSign=(0,c.getStringOption)(e.crlSign,a),n.dataEncipherment=(0,c.getStringOption)(e.dataEncipherment,a),n.decipherOnly=(0,c.getStringOption)(e.decipherOnly,a),n.digitalSignature=(0,c.getStringOption)(e.digitalSignature,a),n.encipherOnly=(0,c.getStringOption)(e.encipherOnly,a),n.id=e.id||"",n.keyAgreement=(0,c.getStringOption)(e.keyAgreement,a),n.keyCertSign=(0,c.getStringOption)(e.keyCertSign,a),n.keyEncipherment=(0,c.getStringOption)(e.keyEncipherment,a),n.nonRepudiation=(0,c.getStringOption)(e.nonRepudiation,a),n.type=(0,c.getStringOption)(e.type,["optional","required"]),n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),De=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"line",!0)).hand=(0,c.getStringOption)(e.hand,["even","left","right"]),n.id=e.id||"",n.slope=(0,c.getStringOption)(e.slope,["\\","/"]),n.use=e.use||"",n.usehref=e.usehref||"",n.edge=null,n}return r}(),Le=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"linear",!0)).id=e.id||"",n.type=(0,c.getStringOption)(e.type,["toRight","toBottom","toLeft","toTop"]),n.use=e.use||"",n.usehref=e.usehref||"",n.color=null,n.extras=null,n}return m(r,[{key:a.$toStyle,value:function(e){e=e?e[a.$toStyle]():"#FFFFFF";var t=this.type.replace(/([RBLT])/," $1").toLowerCase(),r=this.color?this.color[a.$toStyle]():"#000000";return"linear-gradient(".concat(t,", ").concat(e,", ").concat(r,")")}}]),r}(),Ue=function(e){y(r,a.ContentObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"lockDocument")).id=e.id||"",n.type=(0,c.getStringOption)(e.type,["optional","required"]),n.use=e.use||"",n.usehref=e.usehref||"",n}return m(r,[{key:a.$finalize,value:function(){this[a.$content]=(0,c.getStringOption)(this[a.$content],["auto","0","1"])}}]),r}(),qe=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"manifest",!0)).action=(0,c.getStringOption)(e.action,["include","all","exclude"]),n.id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n.extras=null,n.ref=new a.XFAObjectArray,n}return r}(),Xe=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"margin",!0)).bottomInset=(0,c.getMeasurement)(e.bottomInset,"0"),n.id=e.id||"",n.leftInset=(0,c.getMeasurement)(e.leftInset,"0"),n.rightInset=(0,c.getMeasurement)(e.rightInset,"0"),n.topInset=(0,c.getMeasurement)(e.topInset,"0"),n.use=e.use||"",n.usehref=e.usehref||"",n.extras=null,n}return m(r,[{key:a.$toStyle,value:function(){return{margin:(0,o.measureToString)(this.topInset)+" "+(0,o.measureToString)(this.rightInset)+" "+(0,o.measureToString)(this.bottomInset)+" "+(0,o.measureToString)(this.leftInset)}}}]),r}(),He=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"mdp")).id=e.id||"",n.permissions=(0,c.getInteger)({data:e.permissions,defaultValue:2,validate:function(e){return 1===e||3===e}}),n.signatureType=(0,c.getStringOption)(e.signatureType,["filler","author"]),n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),$e=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"medium")).id=e.id||"",n.imagingBBox=(0,c.getBBox)(e.imagingBBox),n.long=(0,c.getMeasurement)(e.long),n.orientation=(0,c.getStringOption)(e.orientation,["portrait","landscape"]),n.short=(0,c.getMeasurement)(e.short),n.stock=e.stock||"",n.trayIn=(0,c.getStringOption)(e.trayIn,["auto","delegate","pageFront"]),n.trayOut=(0,c.getStringOption)(e.trayOut,["auto","delegate"]),n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),ze=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"message",!0)).id=e.id||"",n.use=e.use||"",n.usehref=e.usehref||"",n.text=new a.XFAObjectArray,n}return r}(),Ge=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"numericEdit",!0)).hScrollPolicy=(0,c.getStringOption)(e.hScrollPolicy,["auto","off","on"]),n.id=e.id||"",n.use=e.use||"",n.usehref=e.usehref||"",n.border=null,n.comb=null,n.extras=null,n.margin=null,n}return m(r,[{key:a.$toHTML,value:function(e){var t=(0,o.toStyle)(this,"border","font","margin"),r={name:"input",attributes:{type:"text",fieldId:this[a.$getParent]()[a.$getParent]()[a.$uid],class:"xfaTextfield",style:t}};return c.HTMLResult.success({name:"label",attributes:{class:"xfaLabel"},children:[r]})}}]),r}(),We=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"occur",!0)).id=e.id||"",n.initial=(0,c.getInteger)({data:e.initial,defaultValue:1,validate:function(e){return!0}}),n.max=(0,c.getInteger)({data:e.max,defaultValue:1,validate:function(e){return!0}}),n.min=(0,c.getInteger)({data:e.min,defaultValue:1,validate:function(e){return!0}}),n.use=e.use||"",n.usehref=e.usehref||"",n.extras=null,n}return r}(),Ve=function(e){y(r,a.StringObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"oid")).id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),Ke=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"oids",!0)).id=e.id||"",n.type=(0,c.getStringOption)(e.type,["optional","required"]),n.use=e.use||"",n.usehref=e.usehref||"",n.oid=new a.XFAObjectArray,n}return r}(),Ye=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"overflow")).id=e.id||"",n.leader=e.leader||"",n.target=e.target||"",n.trailer=e.trailer||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),Je=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"pageArea",!0)).blankOrNotBlank=(0,c.getStringOption)(e.blankOrNotBlank,["any","blank","notBlank"]),n.id=e.id||"",n.initialNumber=(0,c.getInteger)({data:e.initialNumber,defaultValue:1,validate:function(e){return!0}}),n.name=e.name||"",n.numbered=(0,c.getInteger)({data:e.numbered,defaultValue:1,validate:function(e){return!0}}),n.oddOrEven=(0,c.getStringOption)(e.oddOrEven,["any","even","odd"]),n.pagePosition=(0,c.getStringOption)(e.pagePosition,["any","first","last","only","rest"]),n.relevant=(0,c.getRelevant)(e.relevant),n.use=e.use||"",n.usehref=e.usehref||"",n.desc=null,n.extras=null,n.medium=null,n.occur=null,n.area=new a.XFAObjectArray,n.contentArea=new a.XFAObjectArray,n.draw=new a.XFAObjectArray,n.exclGroup=new a.XFAObjectArray,n.field=new a.XFAObjectArray,n.subform=new a.XFAObjectArray,n}return m(r,[{key:a.$getNextPage,value:function(){this[a.$extra]||(this[a.$extra]={numberOfUse:1});var e=this[a.$getParent]();return"orderedOccurrence"===e.relation&&this.occur&&(-1===this.occur.max||this[a.$extra].numberOfUse<this.occur.max)?(this[a.$extra].numberOfUse+=1,this):(delete this[a.$extra],e[a.$getNextPage]())}},{key:a.$getAvailableSpace,value:function(){return{width:1/0,height:1/0}}},{key:a.$toHTML,value:function(){this[a.$extra]||(this[a.$extra]={numberOfUse:1});var e=[];this[a.$extra].children=e;var t=Object.create(null);if(this.medium&&this.medium.short&&this.medium.long){if(t.width=(0,o.measureToString)(this.medium.short),t.height=(0,o.measureToString)(this.medium.long),"landscape"===this.medium.orientation){var r=t.width;t.width=t.height,t.height=r}}else(0,u.warn)("XFA - No medium specified in pageArea: please file a bug.");return this[a.$childrenToHTML]({filter:new Set(["area","draw","field","subform","contentArea"]),include:!0}),c.HTMLResult.success({name:"div",children:e,attributes:{id:this[a.$uid],style:t}})}}]),r}(),Ze=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"pageSet",!0)).duplexImposition=(0,c.getStringOption)(e.duplexImposition,["longEdge","shortEdge"]),n.id=e.id||"",n.name=e.name||"",n.relation=(0,c.getStringOption)(e.relation,["orderedOccurrence","duplexPaginated","simplexPaginated"]),n.relevant=(0,c.getRelevant)(e.relevant),n.use=e.use||"",n.usehref=e.usehref||"",n.extras=null,n.occur=null,n.pageArea=new a.XFAObjectArray,n.pageSet=new a.XFAObjectArray,n}return m(r,[{key:a.$getNextPage,value:function(){if(this[a.$extra]||(this[a.$extra]={numberOfUse:1,currentIndex:-1}),"orderedOccurrence"===this.relation){if(this[a.$extra].currentIndex+1<this.pageArea.children.length)return this[a.$extra].currentIndex+=1,this.pageArea.children[this[a.$extra].currentIndex];if(this[a.$extra].currentIndex+1<this.pageSet.children.length)return this[a.$extra].currentIndex+=1,this.pageSet.children[this[a.$extra].currentIndex];if(this.occur&&(-1===this.occur.max||this[a.$extra].numberOfUse<this.occur.max))return this[a.$extra].numberOfUse+=1,this[a.$extra].currentIndex=0,this.pageArea.children.length>0?this.pageArea.children[0]:this.pageSet.children[0][a.$getNextPage]();delete this[a.$extra];var e=this[a.$getParent]();return e instanceof r?e[a.$getNextPage]():this[a.$getNextPage]()}var t=A(this)[a.$extra].pageNumber,n=t%2==0?"even":"odd",i=0===t?"first":"rest",o=this.pageArea.children.find(function(e){return e.oddOrEven===n&&e.pagePosition===i});return o||((o=this.pageArea.children.find(function(e){return"any"===e.oddOrEven&&e.pagePosition===i}))?o:(o=this.pageArea.children.find(function(e){return"any"===e.oddOrEven&&"any"===e.pagePosition}))||this.pageArea.children[0])}}]),r}(),Qe=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"para",!0)).hAlign=(0,c.getStringOption)(e.hAlign,["left","center","justify","justifyAll","radix","right"]),n.id=e.id||"",n.lineHeight=e.lineHeight?(0,c.getMeasurement)(e.lineHeight,"0pt"):"",n.marginLeft=e.marginLeft?(0,c.getMeasurement)(e.marginLeft,"0pt"):"",n.marginRight=e.marginRight?(0,c.getMeasurement)(e.marginRight,"0pt"):"",n.orphans=(0,c.getInteger)({data:e.orphans,defaultValue:0,validate:function(e){return e>=0}}),n.preserve=e.preserve||"",n.radixOffset=e.radixOffset?(0,c.getMeasurement)(e.radixOffset,"0pt"):"",n.spaceAbove=e.spaceAbove?(0,c.getMeasurement)(e.spaceAbove,"0pt"):"",n.spaceBelow=e.spaceBelow?(0,c.getMeasurement)(e.spaceBelow,"0pt"):"",n.tabDefault=e.tabDefault?(0,c.getMeasurement)(n.tabDefault):"",n.tabStops=(e.tabStops||"").trim().split(/\s+/).map(function(e,t){return t%2==1?(0,c.getMeasurement)(e):e}),n.textIndent=e.textIndent?(0,c.getMeasurement)(e.textIndent,"0pt"):"",n.use=e.use||"",n.usehref=e.usehref||"",n.vAlign=(0,c.getStringOption)(e.vAlign,["top","bottom","middle"]),n.widows=(0,c.getInteger)({data:e.widows,defaultValue:0,validate:function(e){return e>=0}}),n.hyphenation=null,n}return m(r,[{key:a.$toStyle,value:function(){var e=(0,o.toStyle)(this,"hAlign");return""!==this.marginLeft&&(e.marginLeft=(0,o.measureToString)(this.marginLeft)),""!==this.marginRight&&(e.marginRight=(0,o.measureToString)(this.marginRight)),""!==this.spaceAbove&&(e.marginTop=(0,o.measureToString)(this.spaceAbove)),""!==this.spaceBelow&&(e.marginBottom=(0,o.measureToString)(this.spaceBelow)),""!==this.textIndent&&(e.textIndent=(0,o.measureToString)(this.textIndent),(0,o.fixTextIndent)(e)),this.lineHeight>0&&(e.lineHeight=(0,o.measureToString)(this.lineHeight)),""!==this.tabDefault&&(e.tabSize=(0,o.measureToString)(this.tabDefault)),this.tabStops.length,this.hyphenatation&&Object.assign(e,this.hyphenatation[a.$toStyle]()),e}}]),r}(),et=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"passwordEdit",!0)).hScrollPolicy=(0,c.getStringOption)(e.hScrollPolicy,["auto","off","on"]),n.id=e.id||"",n.passwordChar=e.passwordChar||"*",n.use=e.use||"",n.usehref=e.usehref||"",n.border=null,n.extras=null,n.margin=null,n}return r}(),tt=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"pattern",!0)).id=e.id||"",n.type=(0,c.getStringOption)(e.type,["crossHatch","crossDiagonal","diagonalLeft","diagonalRight","horizontal","vertical"]),n.use=e.use||"",n.usehref=e.usehref||"",n.color=null,n.extras=null,n}return m(r,[{key:a.$toStyle,value:function(e){e=e?e[a.$toStyle]():"#FFFFFF";var t=this.color?this.color[a.$toStyle]():"#000000",r="repeating-linear-gradient",n="".concat(e,",").concat(e," ").concat(5,"px,").concat(t," ").concat(5,"px,").concat(t," ").concat(10,"px");switch(this.type){case"crossHatch":return"".concat(r,"(to top,").concat(n,") ").concat(r,"(to right,").concat(n,")");case"crossDiagonal":return"".concat(r,"(45deg,").concat(n,") ").concat(r,"(-45deg,").concat(n,")");case"diagonalLeft":return"".concat(r,"(45deg,").concat(n,")");case"diagonalRight":return"".concat(r,"(-45deg,").concat(n,")");case"horizontal":return"".concat(r,"(to top,").concat(n,")");case"vertical":return"".concat(r,"(to right,").concat(n,")")}return""}}]),r}(),rt=function(e){y(r,a.StringObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"picture")).id=e.id||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),nt=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"proto",!0)).appearanceFilter=new a.XFAObjectArray,n.arc=new a.XFAObjectArray,n.area=new a.XFAObjectArray,n.assist=new a.XFAObjectArray,n.barcode=new a.XFAObjectArray,n.bindItems=new a.XFAObjectArray,n.bookend=new a.XFAObjectArray,n.boolean=new a.XFAObjectArray,n.border=new a.XFAObjectArray,n.break=new a.XFAObjectArray,n.breakAfter=new a.XFAObjectArray,n.breakBefore=new a.XFAObjectArray,n.button=new a.XFAObjectArray,n.calculate=new a.XFAObjectArray,n.caption=new a.XFAObjectArray,n.certificate=new a.XFAObjectArray,n.certificates=new a.XFAObjectArray,n.checkButton=new a.XFAObjectArray,n.choiceList=new a.XFAObjectArray,n.color=new a.XFAObjectArray,n.comb=new a.XFAObjectArray,n.connect=new a.XFAObjectArray,n.contentArea=new a.XFAObjectArray,n.corner=new a.XFAObjectArray,n.date=new a.XFAObjectArray,n.dateTime=new a.XFAObjectArray,n.dateTimeEdit=new a.XFAObjectArray,n.decimal=new a.XFAObjectArray,n.defaultUi=new a.XFAObjectArray,n.desc=new a.XFAObjectArray,n.digestMethod=new a.XFAObjectArray,n.digestMethods=new a.XFAObjectArray,n.draw=new a.XFAObjectArray,n.edge=new a.XFAObjectArray,n.encoding=new a.XFAObjectArray,n.encodings=new a.XFAObjectArray,n.encrypt=new a.XFAObjectArray,n.encryptData=new a.XFAObjectArray,n.encryption=new a.XFAObjectArray,n.encryptionMethod=new a.XFAObjectArray,n.encryptionMethods=new a.XFAObjectArray,n.event=new a.XFAObjectArray,n.exData=new a.XFAObjectArray,n.exObject=new a.XFAObjectArray,n.exclGroup=new a.XFAObjectArray,n.execute=new a.XFAObjectArray,n.extras=new a.XFAObjectArray,n.field=new a.XFAObjectArray,n.fill=new a.XFAObjectArray,n.filter=new a.XFAObjectArray,n.float=new a.XFAObjectArray,n.font=new a.XFAObjectArray,n.format=new a.XFAObjectArray,n.handler=new a.XFAObjectArray,n.hyphenation=new a.XFAObjectArray,n.image=new a.XFAObjectArray,n.imageEdit=new a.XFAObjectArray,n.integer=new a.XFAObjectArray,n.issuers=new a.XFAObjectArray,n.items=new a.XFAObjectArray,n.keep=new a.XFAObjectArray,n.keyUsage=new a.XFAObjectArray,n.line=new a.XFAObjectArray,n.linear=new a.XFAObjectArray,n.lockDocument=new a.XFAObjectArray,n.manifest=new a.XFAObjectArray,n.margin=new a.XFAObjectArray,n.mdp=new a.XFAObjectArray,n.medium=new a.XFAObjectArray,n.message=new a.XFAObjectArray,n.numericEdit=new a.XFAObjectArray,n.occur=new a.XFAObjectArray,n.oid=new a.XFAObjectArray,n.oids=new a.XFAObjectArray,n.overflow=new a.XFAObjectArray,n.pageArea=new a.XFAObjectArray,n.pageSet=new a.XFAObjectArray,n.para=new a.XFAObjectArray,n.passwordEdit=new a.XFAObjectArray,n.pattern=new a.XFAObjectArray,n.picture=new a.XFAObjectArray,n.radial=new a.XFAObjectArray,n.reason=new a.XFAObjectArray,n.reasons=new a.XFAObjectArray,n.rectangle=new a.XFAObjectArray,n.ref=new a.XFAObjectArray,n.script=new a.XFAObjectArray,n.setProperty=new a.XFAObjectArray,n.signData=new a.XFAObjectArray,n.signature=new a.XFAObjectArray,n.signing=new a.XFAObjectArray,n.solid=new a.XFAObjectArray,n.speak=new a.XFAObjectArray,n.stipple=new a.XFAObjectArray,n.subform=new a.XFAObjectArray,n.subformSet=new a.XFAObjectArray,n.subjectDN=new a.XFAObjectArray,n.subjectDNs=new a.XFAObjectArray,n.submit=new a.XFAObjectArray,n.text=new a.XFAObjectArray,n.textEdit=new a.XFAObjectArray,n.time=new a.XFAObjectArray,n.timeStamp=new a.XFAObjectArray,n.toolTip=new a.XFAObjectArray,n.traversal=new a.XFAObjectArray,n.traverse=new a.XFAObjectArray,n.ui=new a.XFAObjectArray,n.validate=new a.XFAObjectArray,n.value=new a.XFAObjectArray,n.variables=new a.XFAObjectArray,n}return r}(),at=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"radial",!0)).id=e.id||"",n.type=(0,c.getStringOption)(e.type,["toEdge","toCenter"]),n.use=e.use||"",n.usehref=e.usehref||"",n.color=null,n.extras=null,n}return m(r,[{key:a.$toStyle,value:function(e){e=e?e[a.$toStyle]():"#FFFFFF";var t=this.color?this.color[a.$toStyle]():"#000000",r="toEdge"===this.type?"".concat(e,",").concat(t):"".concat(t,",").concat(e);return"radial-gradient(circle to center, ".concat(r,")")}}]),r}(),it=function(e){y(r,a.StringObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"reason")).id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),ot=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"reasons",!0)).id=e.id||"",n.type=(0,c.getStringOption)(e.type,["optional","required"]),n.use=e.use||"",n.usehref=e.usehref||"",n.reason=new a.XFAObjectArray,n}return r}(),st=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"rectangle",!0)).hand=(0,c.getStringOption)(e.hand,["even","left","right"]),n.id=e.id||"",n.use=e.use||"",n.usehref=e.usehref||"",n.corner=new a.XFAObjectArray(4),n.edge=new a.XFAObjectArray(4),n.fill=null,n}return r}(),ct=function(e){y(r,a.StringObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"ref")).id=e.id||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),ut=function(e){y(r,a.StringObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"script")).binding=e.binding||"",n.contentType=e.contentType||"",n.id=e.id||"",n.name=e.name||"",n.runAt=(0,c.getStringOption)(e.runAt,["client","both","server"]),n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),lt=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"setProperty")).connection=e.connection||"",n.ref=e.ref||"",n.target=e.target||"",n}return r}();t.SetProperty=lt;var ft=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"signData",!0)).id=e.id||"",n.operation=(0,c.getStringOption)(e.operation,["sign","clear","verify"]),n.ref=e.ref||"",n.target=e.target||"",n.use=e.use||"",n.usehref=e.usehref||"",n.filter=null,n.manifest=null,n}return r}(),ht=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"signature",!0)).id=e.id||"",n.type=(0,c.getStringOption)(e.type,["PDF1.3","PDF1.6"]),n.use=e.use||"",n.usehref=e.usehref||"",n.border=null,n.extras=null,n.filter=null,n.manifest=null,n.margin=null,n}return r}(),dt=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"signing",!0)).id=e.id||"",n.type=(0,c.getStringOption)(e.type,["optional","required"]),n.use=e.use||"",n.usehref=e.usehref||"",n.certificate=new a.XFAObjectArray,n}return r}(),pt=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"solid",!0)).id=e.id||"",n.use=e.use||"",n.usehref=e.usehref||"",n.extras=null,n}return m(r,[{key:a.$toStyle,value:function(e){return e?e[a.$toStyle]():"#FFFFFF"}}]),r}(),gt=function(e){y(r,a.StringObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"speak")).disable=(0,c.getInteger)({data:e.disable,defaultValue:0,validate:function(e){return 1===e}}),n.id=e.id||"",n.priority=(0,c.getStringOption)(e.priority,["custom","caption","name","toolTip"]),n.rid=e.rid||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),mt=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"stipple",!0)).id=e.id||"",n.rate=(0,c.getInteger)({data:e.rate,defaultValue:50,validate:function(e){return e>=0&&e<=100}}),n.use=e.use||"",n.usehref=e.usehref||"",n.color=null,n.extras=null,n}return m(r,[{key:a.$toStyle,value:function(e){var t=this.rate/100;return u.Util.makeHexColor(Math.round(e.value.r*(1-t)+this.value.r*t),Math.round(e.value.g*(1-t)+this.value.g*t),Math.round(e.value.b*(1-t)+this.value.b*t))}}]),r}(),vt=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"subform",!0)).access=(0,c.getStringOption)(e.access,["open","nonInteractive","protected","readOnly"]),n.allowMacro=(0,c.getInteger)({data:e.allowMacro,defaultValue:0,validate:function(e){return 1===e}}),n.anchorType=(0,c.getStringOption)(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),n.colSpan=(0,c.getInteger)({data:e.colSpan,defaultValue:1,validate:function(e){return e>=1||-1===e}}),n.columnWidths=(e.columnWidths||"").trim().split(/\s+/).map(function(e){return"-1"===e?-1:(0,c.getMeasurement)(e)}),n.h=e.h?(0,c.getMeasurement)(e.h):"",n.hAlign=(0,c.getStringOption)(e.hAlign,["left","center","justify","justifyAll","radix","right"]),n.id=e.id||"",n.layout=(0,c.getStringOption)(e.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),n.locale=e.locale||"",n.maxH=(0,c.getMeasurement)(e.maxH,"0pt"),n.maxW=(0,c.getMeasurement)(e.maxW,"0pt"),n.mergeMode=(0,c.getStringOption)(e.mergeMode,["consumeData","matchTemplate"]),n.minH=(0,c.getMeasurement)(e.minH,"0pt"),n.minW=(0,c.getMeasurement)(e.minW,"0pt"),n.name=e.name||"",n.presence=(0,c.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),n.relevant=(0,c.getRelevant)(e.relevant),n.restoreState=(0,c.getStringOption)(e.restoreState,["manual","auto"]),n.scope=(0,c.getStringOption)(e.scope,["name","none"]),n.use=e.use||"",n.usehref=e.usehref||"",n.w=e.w?(0,c.getMeasurement)(e.w):"",n.x=(0,c.getMeasurement)(e.x,"0pt"),n.y=(0,c.getMeasurement)(e.y,"0pt"),n.assist=null,n.bind=null,n.bookend=null,n.border=null,n.break=null,n.calculate=null,n.desc=null,n.extras=null,n.keep=null,n.margin=null,n.occur=null,n.overflow=null,n.pageSet=null,n.para=null,n.traversal=null,n.validate=null,n.variables=null,n.area=new a.XFAObjectArray,n.breakAfter=new a.XFAObjectArray,n.breakBefore=new a.XFAObjectArray,n.connect=new a.XFAObjectArray,n.draw=new a.XFAObjectArray,n.event=new a.XFAObjectArray,n.exObject=new a.XFAObjectArray,n.exclGroup=new a.XFAObjectArray,n.field=new a.XFAObjectArray,n.proto=new a.XFAObjectArray,n.setProperty=new a.XFAObjectArray,n.subform=new a.XFAObjectArray,n.subformSet=new a.XFAObjectArray,n}return m(r,[{key:a.$flushHTML,value:function(){return(0,s.flushHTML)(this)}},{key:a.$addHTML,value:function(e,t){(0,s.addHTML)(this,e,t)}},{key:a.$getAvailableSpace,value:function(){return(0,s.getAvailableSpace)(this)}},{key:a.$toHTML,value:function(e){if("helpText"===this.name)return c.HTMLResult.EMPTY;if(this[a.$extra]&&this[a.$extra].afterBreakAfter){var t=this[a.$extra].afterBreakAfter;return delete this[a.$extra],t}if("hidden"===this.presence||"inactive"===this.presence)return c.HTMLResult.EMPTY;(this.breakBefore.children.length>1||this.breakAfter.children.length>1)&&(0,u.warn)("XFA - Several breakBefore or breakAfter in subforms: please file a bug."),(0,o.fixDimensions)(this);var r=[],n={id:this[a.$uid]};if(this[a.$extra]||(this[a.$extra]=Object.create(null)),Object.assign(this[a.$extra],{children:r,attributes:n,attempt:0,availableSpace:e,width:0,height:0,prevHeight:0,currentWidth:0}),this.breakBefore.children.length>=1){var i=this.breakBefore.children[0];if(!i[a.$extra])return i[a.$extra]=!0,A(this)[a.$break](i),c.HTMLResult.FAILURE}switch(F(this,e)){case O:return c.HTMLResult.EMPTY;case C:return c.HTMLResult.FAILURE}var s=new Set(["area","draw","exclGroup","field","subform","subformSet"]);if(this.layout.includes("row")){var l=this[a.$getParent]().columnWidths;Array.isArray(l)&&l.length>0&&(this[a.$extra].columnWidths=l,this[a.$extra].currentColumn=0)}var f,h=(0,o.toStyle)(this,"anchorType","dimensions","position","presence","borderMarginPadding","hAlign"),d=["xfaSubform"],p=(0,o.layoutClass)(this);if(p&&d.push(p),n.style=h,n.class=d.join(" "),this.name&&(n.xfaName=this.name),"lr-tb"===this.layout||"rl-tb"===this.layout){for(;this[a.$extra].attempt<2&&!this[a.$childrenToHTML]({filter:s,include:!0});this[a.$extra].attempt++);f=2===this[a.$extra].attempt}else f=!this[a.$childrenToHTML]({filter:s,include:!0});if(f)return c.HTMLResult.FAILURE;var g=0,m=0;this.margin&&(g=this.margin.leftInset+this.margin.rightInset,m=this.margin.topInset+this.margin.bottomInset),""===this.w&&(h.width=(0,o.measureToString)(this[a.$extra].width+g)),""===this.h&&(h.height=(0,o.measureToString)(this[a.$extra].height+m));var v,y={name:"div",attributes:n,children:r};if(y=(0,o.addExtraDivForBorder)(y),""!==this.w&&""!==this.h)v=[this.x,this.y,this.w,this.h];else{var b=""===this.w?g+this[a.$extra].width:this.w,w=""===this.h?m+this[a.$extra].height:this.h;v=[this.x,this.y,b,w]}if(this.breakAfter.children.length>=1){var k=this.breakAfter.children[0];return A(this)[a.$break](k),this[a.$extra].afterBreakAfter=c.HTMLResult.success(y,v),c.HTMLResult.FAILURE}return delete this[a.$extra],c.HTMLResult.success(y,v)}}]),r}(),yt=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"subformSet",!0)).id=e.id||"",n.name=e.name||"",n.relation=(0,c.getStringOption)(e.relation,["ordered","choice","unordered"]),n.relevant=(0,c.getRelevant)(e.relevant),n.use=e.use||"",n.usehref=e.usehref||"",n.bookend=null,n.break=null,n.desc=null,n.extras=null,n.occur=null,n.overflow=null,n.breakAfter=new a.XFAObjectArray,n.breakBefore=new a.XFAObjectArray,n.subform=new a.XFAObjectArray,n.subformSet=new a.XFAObjectArray,n}return m(r,[{key:a.$toHTML,value:function(){var e=[];return this[a.$extra]||(this[a.$extra]=Object.create(null)),this[a.$extra].children=e,this[a.$childrenToHTML]({filter:new Set(["subform","subformSet"]),include:!0}),c.HTMLResult.success({name:"div",children:e,attributes:{id:this[a.$uid]}})}}]),r}(),bt=function(e){y(r,a.ContentObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"subjectDN")).delimiter=e.delimiter||",",n.id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return m(r,[{key:a.$finalize,value:function(){this[a.$content]=new Map(this[a.$content].split(this.delimiter).map(function(e){return(e=e.split("=",2))[0]=e[0].trim(),e}))}}]),r}(),wt=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"subjectDNs",!0)).id=e.id||"",n.type=(0,c.getStringOption)(e.type,["optional","required"]),n.use=e.use||"",n.usehref=e.usehref||"",n.subjectDN=new a.XFAObjectArray,n}return r}(),kt=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"submit",!0)).embedPDF=(0,c.getInteger)({data:e.embedPDF,defaultValue:0,validate:function(e){return 1===e}}),n.format=(0,c.getStringOption)(e.format,["xdp","formdata","pdf","urlencoded","xfd","xml"]),n.id=e.id||"",n.target=e.target||"",n.textEncoding=(0,c.getKeyword)({data:e.textEncoding?e.textEncoding.toLowerCase():"",defaultValue:"",validate:function(e){return["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(e)||e.match(/iso-8859-[0-9]{2}/)}}),n.use=e.use||"",n.usehref=e.usehref||"",n.xdpContent=e.xdpContent||"",n.encrypt=null,n.encryptData=new a.XFAObjectArray,n.signData=new a.XFAObjectArray,n}return r}(),St=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"template",!0)).baseProfile=(0,c.getStringOption)(e.baseProfile,["full","interactiveForms"]),n.extras=null,n.subform=new a.XFAObjectArray,n}return m(r,[{key:a.$finalize,value:function(){0===this.subform.children.length&&(0,u.warn)("XFA - No subforms in template node."),this.subform.children.length>=2&&(0,u.warn)("XFA - Several subforms in template node: please file a bug.")}},{key:a.$break,value:function(e){this[a.$extra].breakingNode=e}},{key:a.$searchNode,value:function(e,t){return e.startsWith("#")?[this[a.$ids].get(e.slice(1))]:(0,l.searchNode)(this,t,e,!0,!0)}},{key:a.$toHTML,value:function(){if(!this.subform.children.length)return c.HTMLResult.success({name:"div",children:[]});this[a.$extra]={breakingNode:null,pageNumber:1,pagePosition:"first",oddOrEven:"odd",blankOrNotBlank:"nonBlank"};var e=this.subform.children[0],t=e.pageSet.pageArea.children,r={name:"div",children:[]},n=null,i=null,o=null;if(e.breakBefore.children.length>=1?o=(i=e.breakBefore.children[0]).target:e.subform.children.length>=1&&e.subform.children[0].breakBefore.children.length>=1?o=(i=e.subform.children[0].breakBefore.children[0]).target:e.break&&e.break.beforeTarget?o=(i=e.break).beforeTarget:e.subform.children.length>=1&&e.subform.children[0].break&&e.subform.children[0].break.beforeTarget&&(o=(i=e.subform.children[0].break).beforeTarget),i){var s=this[a.$searchNode](o,i[a.$getParent]());s instanceof Je&&(n=s,i[a.$extra]={})}n||(n=t[0]);var u,l=n[a.$getParent]();l[a.$extra]={numberOfUse:1,currentIndex:l.pageArea.children.indexOf(n)};for(var f=null,h=null;;){u=null;var d=n[a.$toHTML]().html;r.children.push(d),f&&(d.children.push(f[a.$toHTML](d[a.$extra].space).html),f=null),h&&(d.children.push(h[a.$toHTML](d[a.$extra].space).html),h=null);for(var p=n.contentArea.children,g=d.children.filter(function(e){return"xfaContentarea"===e.attributes.class}),m=0,v=p.length;m<v;m++){var y=this[a.$extra].currentContentArea=p[m],b={width:y.w,height:y.h};f&&(g[m].children.push(f[a.$toHTML](b).html),f=null),h&&(g[m].children.push(h[a.$toHTML](b).html),h=null);var w=e[a.$toHTML](b);if(w.success)return w.html&&g[m].children.push(w.html),r;var k=!1;if(this[a.$extra].breakingNode){var S=this[a.$extra].breakingNode;if(this[a.$extra].breakingNode=null,"auto"===S.targetType){m--;continue}var x=1===S.startNew;S.leader&&(f=(f=this[a.$searchNode](S.leader,S[a.$getParent]()))?f[0]:null),S.trailer&&(h=(h=this[a.$searchNode](S.trailer,S[a.$getParent]()))?h[0]:null);var A=null;if(S.target&&(A=(A=this[a.$searchNode](S.target,S[a.$getParent]()))?A[0]:A),"pageArea"===S.targetType)if(x)k=!0;else{if(!(A!==n&&A instanceof Je)){m--;continue}u=A,k=!0}else if("contentArea"===A||!(A instanceof Z)){m--;continue}}if((w=e[a.$flushHTML]())&&g[m].children.push(w),k)break}this[a.$extra].pageNumber+=1,n=u||n[a.$getNextPage]()}}}]),r}();t.Template=St;var xt=function(e){y(r,a.ContentObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"text")).id=e.id||"",n.maxChars=(0,c.getInteger)({data:e.maxChars,defaultValue:0,validate:function(e){return e>=0}}),n.name=e.name||"",n.rid=e.rid||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return m(r,[{key:a.$onChild,value:function(e){return e[a.$namespaceId]===i.NamespaceIds.xhtml.id?(this[a.$content]=e,!0):((0,u.warn)("XFA - Invalid content in Text: ".concat(e[a.$nodeName],".")),!1)}},{key:a.$toHTML,value:function(e){if("string"==typeof this[a.$content]){var t={name:"span",attributes:{class:"xfaRich",style:{}},value:this[a.$content]};return this[a.$content].includes("\u2029")?(t.name="div",t.children=[],this[a.$content].split("\u2029").map(function(e){return e.split(/[\u2028\n]/).reduce(function(e,t){return e.push({name:"span",value:t},{name:"br"}),e},[])}).forEach(function(e){t.children.push({name:"p",children:e})})):/[\u2028\n]/.test(this[a.$content])&&(t.name="div",t.children=[],this[a.$content].split(/[\u2028\n]/).forEach(function(e){t.children.push({name:"span",value:e},{name:"br"})})),c.HTMLResult.success(t)}return this[a.$content][a.$toHTML](e)}}]),r}();t.Text=xt;var At=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"textEdit",!0)).allowRichText=(0,c.getInteger)({data:e.allowRichText,defaultValue:0,validate:function(e){return 1===e}}),n.hScrollPolicy=(0,c.getStringOption)(e.hScrollPolicy,["auto","off","on"]),n.id=e.id||"",n.multiLine=(0,c.getInteger)({data:e.multiLine,defaultValue:1,validate:function(e){return 0===e}}),n.use=e.use||"",n.usehref=e.usehref||"",n.vScrollPolicy=(0,c.getStringOption)(e.vScrollPolicy,["auto","off","on"]),n.border=null,n.comb=null,n.extras=null,n.margin=null,n}return m(r,[{key:a.$toHTML,value:function(e){var t,r=(0,o.toStyle)(this,"border","font","margin");return t=1===this.multiLine?{name:"textarea",attributes:{fieldId:this[a.$getParent]()[a.$getParent]()[a.$uid],class:"xfaTextfield",style:r}}:{name:"input",attributes:{type:"text",fieldId:this[a.$getParent]()[a.$getParent]()[a.$uid],class:"xfaTextfield",style:r}},c.HTMLResult.success({name:"label",attributes:{class:"xfaLabel"},children:[t]})}}]),r}(),Ot=function(e){y(r,a.StringObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"time")).id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return m(r,[{key:a.$finalize,value:function(){this[a.$content]=new Date(this[a.$content])}},{key:a.$toHTML,value:function(e){return c.HTMLResult.success(this[a.$content].toString())}}]),r}(),Ct=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"timeStamp")).id=e.id||"",n.server=e.server||"",n.type=(0,c.getStringOption)(e.type,["optional","required"]),n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),Tt=function(e){y(r,a.StringObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"toolTip")).id=e.id||"",n.rid=e.rid||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),Ft=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"traversal",!0)).id=e.id||"",n.use=e.use||"",n.usehref=e.usehref||"",n.extras=null,n.traverse=new a.XFAObjectArray,n}return r}(),_t=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"traverse",!0)).id=e.id||"",n.operation=(0,c.getStringOption)(e.operation,["next","back","down","first","left","right","up"]),n.ref=e.ref||"",n.use=e.use||"",n.usehref=e.usehref||"",n.extras=null,n.script=null,n}return m(r,[{key:"name",get:function(){return this.operation}},{key:a.$isTransparent,value:function(){return!1}}]),r}(),Pt=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"ui",!0)).id=e.id||"",n.use=e.use||"",n.usehref=e.usehref||"",n.extras=null,n.picture=null,n.barcode=null,n.button=null,n.checkButton=null,n.choiceList=null,n.dateTimeEdit=null,n.defaultUi=null,n.imageEdit=null,n.numericEdit=null,n.passwordEdit=null,n.signature=null,n.textEdit=null,n}return m(r,[{key:a.$toHTML,value:function(e){var t,r=f(Object.getOwnPropertyNames(this));try{for(r.s();!(t=r.n()).done;){var n=t.value;if("extras"!==n&&"picture"!==n){var i=this[n];if(i instanceof a.XFAObject)return i[a.$toHTML](e)}}}catch(e){r.e(e)}finally{r.f()}return c.HTMLResult.EMPTY}}]),r}(),It=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"validate",!0)).formatTest=(0,c.getStringOption)(e.formatTest,["warning","disabled","error"]),n.id=e.id||"",n.nullTest=(0,c.getStringOption)(e.nullTest,["disabled","error","warning"]),n.scriptTest=(0,c.getStringOption)(e.scriptTest,["error","disabled","warning"]),n.use=e.use||"",n.usehref=e.usehref||"",n.extras=null,n.message=null,n.picture=null,n.script=null,n}return r}(),Et=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"value",!0)).id=e.id||"",n.override=(0,c.getInteger)({data:e.override,defaultValue:0,validate:function(e){return 1===e}}),n.relevant=(0,c.getRelevant)(e.relevant),n.use=e.use||"",n.usehref=e.usehref||"",n.arc=null,n.boolean=null,n.date=null,n.dateTime=null,n.decimal=null,n.exData=null,n.float=null,n.image=null,n.integer=null,n.line=null,n.rectangle=null,n.text=null,n.time=null,n}return m(r,[{key:a.$setValue,value:function(e){var t=this[a.$getParent]();if(t instanceof xe&&t.ui&&t.ui.imageEdit)return this.image||(this.image=new Ie({})),void(this.image[a.$content]=e[a.$content]);var r=e[a.$nodeName];if(null===this[r]){var n,i=f(Object.getOwnPropertyNames(this));try{for(i.s();!(n=i.n()).done;){var o=n.value,s=this[o];s instanceof a.XFAObject&&(this[o]=null,this[a.$removeChild](s))}}catch(e){i.e(e)}finally{i.f()}this[e[a.$nodeName]]=e,this[a.$appendChild](e)}else this[r][a.$content]=e[a.$content]}},{key:a.$text,value:function(){if(this.exData)return this.exData[a.$content][a.$text]().trim();var e,t=f(Object.getOwnPropertyNames(this));try{for(t.s();!(e=t.n()).done;){var r=e.value;if("image"!==r){var n=this[r];if(n instanceof a.XFAObject)return(n[a.$content]||"").toString().trim()}}}catch(e){t.e(e)}finally{t.f()}return null}},{key:a.$toHTML,value:function(e){var t,r=f(Object.getOwnPropertyNames(this));try{for(r.s();!(t=r.n()).done;){var n=this[t.value];if(n instanceof a.XFAObject)return n[a.$toHTML](e)}}catch(e){r.e(e)}finally{r.f()}return c.HTMLResult.EMPTY}}]),r}();t.Value=Et;var jt=function(e){y(r,a.XFAObject);var t=w(r);function r(e){var n;return v(this,r),(n=t.call(this,S,"variables",!0)).id=e.id||"",n.use=e.use||"",n.usehref=e.usehref||"",n.boolean=new a.XFAObjectArray,n.date=new a.XFAObjectArray,n.dateTime=new a.XFAObjectArray,n.decimal=new a.XFAObjectArray,n.exData=new a.XFAObjectArray,n.float=new a.XFAObjectArray,n.image=new a.XFAObjectArray,n.integer=new a.XFAObjectArray,n.manifest=new a.XFAObjectArray,n.script=new a.XFAObjectArray,n.text=new a.XFAObjectArray,n.time=new a.XFAObjectArray,n}return m(r,[{key:a.$isTransparent,value:function(){return!0}}]),r}(),Rt=function(){function e(){v(this,e)}return m(e,null,[{key:i.$buildXFAObject,value:function(t,r){if(e.hasOwnProperty(t)){var n=e[t](r);return n[a.$setSetAttributes](r),n}}},{key:"appearanceFilter",value:function(e){return new _(e)}},{key:"arc",value:function(e){return new P(e)}},{key:"area",value:function(e){return new I(e)}},{key:"assist",value:function(e){return new E(e)}},{key:"barcode",value:function(e){return new j(e)}},{key:"bind",value:function(e){return new R(e)}},{key:"bindItems",value:function(e){return new M(e)}},{key:"bookend",value:function(e){return new N(e)}},{key:"boolean",value:function(e){return new B(e)}},{key:"border",value:function(e){return new D(e)}},{key:"break",value:function(e){return new L(e)}},{key:"breakAfter",value:function(e){return new U(e)}},{key:"breakBefore",value:function(e){return new q(e)}},{key:"button",value:function(e){return new X(e)}},{key:"calculate",value:function(e){return new H(e)}},{key:"caption",value:function(e){return new $(e)}},{key:"certificate",value:function(e){return new z(e)}},{key:"certificates",value:function(e){return new G(e)}},{key:"checkButton",value:function(e){return new W(e)}},{key:"choiceList",value:function(e){return new V(e)}},{key:"color",value:function(e){return new K(e)}},{key:"comb",value:function(e){return new Y(e)}},{key:"connect",value:function(e){return new J(e)}},{key:"contentArea",value:function(e){return new Z(e)}},{key:"corner",value:function(e){return new Q(e)}},{key:"date",value:function(e){return new ee(e)}},{key:"dateTime",value:function(e){return new te(e)}},{key:"dateTimeEdit",value:function(e){return new re(e)}},{key:"decimal",value:function(e){return new ne(e)}},{key:"defaultUi",value:function(e){return new ae(e)}},{key:"desc",value:function(e){return new ie(e)}},{key:"digestMethod",value:function(e){return new oe(e)}},{key:"digestMethods",value:function(e){return new se(e)}},{key:"draw",value:function(e){return new ce(e)}},{key:"edge",value:function(e){return new ue(e)}},{key:"encoding",value:function(e){return new le(e)}},{key:"encodings",value:function(e){return new fe(e)}},{key:"encrypt",value:function(e){return new he(e)}},{key:"encryptData",value:function(e){return new de(e)}},{key:"encryption",value:function(e){return new pe(e)}},{key:"encryptionMethod",value:function(e){return new ge(e)}},{key:"encryptionMethods",value:function(e){return new me(e)}},{key:"event",value:function(e){return new ve(e)}},{key:"exData",value:function(e){return new ye(e)}},{key:"exObject",value:function(e){return new be(e)}},{key:"exclGroup",value:function(e){return new we(e)}},{key:"execute",value:function(e){return new ke(e)}},{key:"extras",value:function(e){return new Se(e)}},{key:"field",value:function(e){return new xe(e)}},{key:"fill",value:function(e){return new Ae(e)}},{key:"filter",value:function(e){return new Oe(e)}},{key:"float",value:function(e){return new Ce(e)}},{key:"font",value:function(e){return new Te(e)}},{key:"format",value:function(e){return new Fe(e)}},{key:"handler",value:function(e){return new _e(e)}},{key:"hyphenation",value:function(e){return new Pe(e)}},{key:"image",value:function(e){return new Ie(e)}},{key:"imageEdit",value:function(e){return new Ee(e)}},{key:"integer",value:function(e){return new je(e)}},{key:"issuers",value:function(e){return new Re(e)}},{key:"items",value:function(e){return new Me(e)}},{key:"keep",value:function(e){return new Ne(e)}},{key:"keyUsage",value:function(e){return new Be(e)}},{key:"line",value:function(e){return new De(e)}},{key:"linear",value:function(e){return new Le(e)}},{key:"lockDocument",value:function(e){return new Ue(e)}},{key:"manifest",value:function(e){return new qe(e)}},{key:"margin",value:function(e){return new Xe(e)}},{key:"mdp",value:function(e){return new He(e)}},{key:"medium",value:function(e){return new $e(e)}},{key:"message",value:function(e){return new ze(e)}},{key:"numericEdit",value:function(e){return new Ge(e)}},{key:"occur",value:function(e){return new We(e)}},{key:"oid",value:function(e){return new Ve(e)}},{key:"oids",value:function(e){return new Ke(e)}},{key:"overflow",value:function(e){return new Ye(e)}},{key:"pageArea",value:function(e){return new Je(e)}},{key:"pageSet",value:function(e){return new Ze(e)}},{key:"para",value:function(e){return new Qe(e)}},{key:"passwordEdit",value:function(e){return new et(e)}},{key:"pattern",value:function(e){return new tt(e)}},{key:"picture",value:function(e){return new rt(e)}},{key:"proto",value:function(e){return new nt(e)}},{key:"radial",value:function(e){return new at(e)}},{key:"reason",value:function(e){return new it(e)}},{key:"reasons",value:function(e){return new ot(e)}},{key:"rectangle",value:function(e){return new st(e)}},{key:"ref",value:function(e){return new ct(e)}},{key:"script",value:function(e){return new ut(e)}},{key:"setProperty",value:function(e){return new lt(e)}},{key:"signData",value:function(e){return new ft(e)}},{key:"signature",value:function(e){return new ht(e)}},{key:"signing",value:function(e){return new dt(e)}},{key:"solid",value:function(e){return new pt(e)}},{key:"speak",value:function(e){return new gt(e)}},{key:"stipple",value:function(e){return new mt(e)}},{key:"subform",value:function(e){return new vt(e)}},{key:"subformSet",value:function(e){return new yt(e)}},{key:"subjectDN",value:function(e){return new bt(e)}},{key:"subjectDNs",value:function(e){return new wt(e)}},{key:"submit",value:function(e){return new kt(e)}},{key:"template",value:function(e){return new St(e)}},{key:"text",value:function(e){return new xt(e)}},{key:"textEdit",value:function(e){return new At(e)}},{key:"time",value:function(e){return new Ot(e)}},{key:"timeStamp",value:function(e){return new Ct(e)}},{key:"toolTip",value:function(e){return new Tt(e)}},{key:"traversal",value:function(e){return new Ft(e)}},{key:"traverse",value:function(e){return new _t(e)}},{key:"ui",value:function(e){return new Pt(e)}},{key:"validate",value:function(e){return new It(e)}},{key:"value",value:function(e){return new Et(e)}},{key:"variables",value:function(e){return new jt(e)}}]),e}();t.TemplateNamespace=Rt},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addExtraDivForBorder=function(e){for(var t=e.attributes.style,r=t.borderData,n=[],a={class:"xfaWrapper",style:Object.create(null)},i=0,s=["top","left"];i<s.length;i++){var c=s[i];void 0!==t[c]&&(a.style[c]=t[c])}delete t.top,delete t.left,"absolute"===t.position?a.style.position="absolute":a.style.position="relative";delete t.position,t.justifyContent&&(a.style.justifyContent=t.justifyContent,delete t.justifyContent);if(r){var u;delete t.borderData,r.margin?(u=r.margin.split(" "),delete r.margin):u=["0px","0px","0px","0px"];var l="100%",f=l;"0px"===u[1]&&"0px"===u[3]||(l="calc(100% - ".concat(parseInt(u[1])+parseInt(u[3]),"px")),"0px"===u[0]&&"0px"===u[2]||(f="calc(100% - ".concat(parseInt(u[0])+parseInt(u[2]),"px"));for(var h={top:u[0],left:u[3],width:l,height:f},d=0,p=Object.entries(r);d<p.length;d++){var g=(b=p[d],w=2,function(e){if(Array.isArray(e))return e}(b)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(b,w)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(b,w)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=g[0],v=g[1];h[m]=v}t.transform&&(h.transform=t.transform);var y={name:"div",attributes:{class:"xfaBorderDiv",style:h}};n.push(y)}var b,w;return n.push(e),{name:"div",attributes:a,children:n}},t.computeBbox=function(e,t,r){var a;if(""!==e.w&&""!==e.h)a=[e.x,e.y,e.w,e.h];else{if(!r)return null;var i=e.w;if(""===i){if(0===e.maxW){var o=e[n.$getParent]();i="position"===o.layout&&""!==o.w?0:e.minW}else i=Math.min(e.maxW,r.width);t.attributes.style.width=u(i)}var s=e.h;if(""===s){if(0===e.maxH){var c=e[n.$getParent]();s="position"===c.layout&&""!==c.h?0:e.minH}else s=Math.min(e.maxH,r.height);t.attributes.style.height=u(s)}a=[e.x,e.y,i,s]}return a},t.fixDimensions=function(e){var t=e[n.$getParent]();if(t.layout&&t.layout.includes("row")){var r,a=t[n.$extra],i=e.colSpan;r=-1===i?a.columnWidths.slice(a.currentColumn).reduce(function(e,t){return e+t},0):a.columnWidths.slice(a.currentColumn,a.currentColumn+i).reduce(function(e,t){return e+t},0),isNaN(r)||(e.w=r)}t.w&&e.w&&(e.w=Math.min(t.w,e.w));t.h&&e.h&&(e.h=Math.min(t.h,e.h));t.layout&&"position"!==t.layout&&(e.x=e.y=0,"tb"===t.layout&&""!==t.w&&(""===e.w||0===e.w||e.w>t.w)&&(e.w=t.w));"position"===e.layout?(e.minW=e.minH=0,e.maxW=e.maxH=1/0):"table"===e.layout&&""===e.w&&Array.isArray(e.columnWidths)&&(e.w=e.columnWidths.reduce(function(e,t){return e+t},0))},t.fixTextIndent=function(e){var t=(0,a.getMeasurement)(e.textIndent,"0px");if(t>=0)return;var r=e.textAlign||"left";if("left"===r||"right"===r){var n="margin"+("left"===r?"Left":"Right"),i=(0,a.getMeasurement)(e[n],"0px");e[n]="".concat(i-t,"pt")}},t.getFonts=function(e){e.startsWith("'")?e='"'.concat(e.slice(1,e.length-1),'"'):e.includes(" ")&&!e.startsWith('"')&&(e='"'.concat(e,'"'));var t=[e];switch(e){case'"Myriad Pro"':t.push('"Roboto Condensed"','"Ubuntu Condensed"','"Microsoft Sans Serif"','"Apple Symbols"',"Helvetica",'"sans serif"');break;case"Arial":t.push("Helvetica",'"Liberation Sans"',"Arimo",'"sans serif"')}return t.join(",")},t.layoutClass=function(e){switch(e.layout){case"position":return"xfaPosition";case"lr-tb":return"xfaLrTb";case"rl-row":return"xfaRlRow";case"rl-tb":return"xfaRlTb";case"row":return"xfaRow";case"table":return"xfaTable";case"tb":return"xfaTb";default:return"xfaPosition"}},t.layoutText=function(e,t,r){var n=0,a=0,i=0,o=1.5*t,u=.4*t,l=Math.floor(r.width/u),f=e.match(s),h=0,d=0,p=f[0];for(;p;){var g=p.length*u;if(n+g<=r.width)n+=g,h+=p.length,p=f[d++];else if(!c.test(p)||p.length>l){var m=Math.floor((r.width-n)/u);if(p=p.slice(m),h+=m,a+o>r.height)return{width:0,height:0,splitPos:h};i=Math.max(n,i),n=0,a+=o}else{if(a+o>r.height)return{width:0,height:0,splitPos:h};i=Math.max(n,i),n=g,a+=o,p=f[d++]}}0===i&&(i=n);0!==i&&(a+=o);return{width:i,height:a,splitPos:-1}},t.measureToString=u,t.toStyle=function(e){for(var t=Object.create(null),r=arguments.length,a=new Array(r>1?r-1:0),o=1;o<r;o++)a[o-1]=arguments[o];for(var s=0,c=a;s<c.length;s++){var u=c[s],f=e[u];if(null!==f)if(f instanceof n.XFAObject){var h=f[n.$toStyle]();h?Object.assign(t,h):(0,i.warn)("(DEBUG) - XFA - style for ".concat(u," not implemented yet"))}else l.hasOwnProperty(u)&&l[u](e,t)}return t};var n=r(176),a=r(177),i=r(4);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var s=new RegExp("([\\p{N}\\p{L}\\p{M}]+)|([^\\p{N}\\p{L}\\p{M}]+)","gu"),c=new RegExp("^[\\p{N}\\p{L}\\p{M}]","u");function u(e){return"string"==typeof e?"0px":Number.isInteger(e)?"".concat(e,"px"):"".concat(e.toFixed(2),"px")}var l={anchorType:function(e,t){var r=e[n.$getParent]();if(r&&(!r.layout||"position"===r.layout))switch("transform"in t||(t.transform=""),e.anchorType){case"bottomCenter":t.transform+="translate(-50%, -100%)";break;case"bottomLeft":t.transform+="translate(0,-100%)";break;case"bottomRight":t.transform+="translate(-100%,-100%)";break;case"middleCenter":t.transform+="translate(-50%,-50%)";break;case"middleLeft":t.transform+="translate(0,-50%)";break;case"middleRight":t.transform+="translate(-100%,-50%)";break;case"topCenter":t.transform+="translate(-50%,0)";break;case"topRight":t.transform+="translate(-100%,0)"}},dimensions:function(e,t){var r=e[n.$getParent](),a=e.w,i=e.h;if(r.layout&&r.layout.includes("row")){var o,s=r[n.$extra],c=e.colSpan;-1===c?(o=s.columnWidths.slice(s.currentColumn).reduce(function(e,t){return e+t},0),s.currentColumn=0):(o=s.columnWidths.slice(s.currentColumn,s.currentColumn+c).reduce(function(e,t){return e+t},0),s.currentColumn=(s.currentColumn+e.colSpan)%s.columnWidths.length),isNaN(o)||(a=e.w=o)}""!==a?t.width=u(a):(t.width="auto",e.maxW>0&&(t.maxWidth=u(e.maxW)),"position"===r.layout&&(t.minWidth=u(e.minW))),""!==i?t.height=u(i):(t.height="auto",e.maxH>0&&(t.maxHeight=u(e.maxH)),"position"===r.layout&&(t.minHeight=u(e.minH)))},position:function(e,t){var r=e[n.$getParent]();r&&r.layout&&"position"!==r.layout||(t.position="absolute",t.left=u(e.x),t.top=u(e.y))},rotate:function(e,t){e.rotate&&("transform"in t||(t.transform=""),t.transform+="rotate(-".concat(e.rotate,"deg)"),t.transformOrigin="top left")},presence:function(e,t){switch(e.presence){case"invisible":t.visibility="hidden";break;case"hidden":case"inactive":t.display="none"}},hAlign:function(e,t){if("para"===e[n.$nodeName])switch(e.hAlign){case"justifyAll":t.textAlign="justify-all";break;case"radix":t.textAlign="left";break;default:t.textAlign=e.hAlign}else switch(e.hAlign){case"right":case"center":t.justifyContent=e.hAlign}},borderMarginPadding:function(e,t){var r,a=[0,0,0,0],i=e.margin?[e.margin.topInset,e.margin.rightInset,e.margin.bottomInset,e.margin.leftInset]:[0,0,0,0];if(e.border&&(Object.assign(t,e.border[n.$toStyle](a,[0,0,0,0])),r=t.margin,delete t.margin),a.every(function(e){return 0===e})){if(i.every(function(e){return 0===e}))return;return Object.assign(t,e.margin[n.$toStyle]()),t.padding=t.margin,delete t.margin,delete t.outline,void delete t.outlineOffset}e.margin&&(Object.assign(t,e.margin[n.$toStyle]()),t.padding=t.margin,delete t.margin),t.borderWidth&&(t.borderData={borderWidth:t.borderWidth,borderColor:t.borderColor,borderStyle:t.borderStyle,margin:r},delete t.borderWidth,delete t.borderColor,delete t.borderStyle)}}},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addHTML=function(e,t,r){var s=e[n.$extra],c=s.availableSpace;switch(e.layout){case"position":var u=i(r,4),l=u[0],f=u[1],h=u[2],d=u[3];s.width=Math.max(s.width,l+h),s.height=Math.max(s.height,f+d),s.children.push(t);break;case"lr-tb":case"rl-tb":if(s.line&&1!==s.attempt||(s.line={name:"div",attributes:{class:"lr-tb"===e.layout?"xfaLr":"xfaRl"},children:[]},s.children.push(s.line)),s.line.children.push(t),0===s.attempt){var p=i(r,4),g=p[2],m=p[3];s.currentWidth+=g,s.height=Math.max(s.height,s.prevHeight+m)}else{var v=i(r,4),y=v[2],b=v[3];s.width=Math.max(s.width,s.currentWidth),s.currentWidth=y,s.prevHeight=s.height,s.height+=b,s.attempt=0}break;case"rl-row":case"row":s.children.push(t);var w=i(r,4),k=w[2],S=w[3];s.width+=k,s.height=Math.max(s.height,S);var x,A=(0,a.measureToString)(s.height),O=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=o(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw i}}}}(s.children);try{for(O.s();!(x=O.n()).done;){var C=x.value;"xfaWrapper"===C.attributes.class?C.children[C.children.length-1].attributes.style.height=A:C.attributes.style.height=A}}catch(e){O.e(e)}finally{O.f()}break;case"table":var T=i(r,4),F=T[2],_=T[3];s.width=Math.min(c.width,Math.max(s.width,F)),s.height+=_,s.children.push(t);break;case"tb":var P=i(r,4),I=P[3];s.width=c.width,s.height+=I,s.children.push(t)}},t.flushHTML=function(e){var t={name:"div",attributes:e[n.$extra].attributes,children:e[n.$extra].children};if(e[n.$extra].failingNode){var r=e[n.$extra].failingNode[n.$flushHTML]();r&&t.children.push(r)}if(0===t.children.length)return null;return e[n.$extra].children=[],delete e[n.$extra].line,t},t.getAvailableSpace=function(e){var t=e[n.$extra].availableSpace;switch(e.layout){case"lr-tb":case"rl-tb":switch(e[n.$extra].attempt){case 0:return{width:t.width-e[n.$extra].currentWidth,height:t.height-e[n.$extra].prevHeight};case 1:return{width:t.width,height:t.height-e[n.$extra].height};default:return{width:1/0,height:t.height-e[n.$extra].prevHeight}}case"rl-row":case"row":var r=e[n.$extra].columnWidths.slice(e[n.$extra].currentColumn).reduce(function(e,t){return e+t});return{width:r,height:t.height};case"table":case"tb":return{width:t.width,height:t.height-e[n.$extra].height};case"position":default:return t}};var n=r(176),a=r(181);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||o(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDataNode=function(e,t,r){var i=g(r);if(!i)return null;if(i.some(function(e){return e.operator===h.dotDot}))return null;var o=d.get(i[0].name),s=0;o?(e=o(e,t),s=1):e=t||e;for(var c=i.length;s<c;s++){var u=i[s],l=u.name,f=u.operator,p=u.index;if(!isFinite(p))return i[s].index=0,m(e,i.slice(s));var v=void 0;switch(f){case h.dot:v=e[n.$getChildrenByName](l,!1);break;case h.dotDot:v=e[n.$getChildrenByName](l,!0);break;case h.dotHash:v=(v=e[n.$getChildrenByClass](l))instanceof n.XFAObjectArray?v.children:[v]}if(0===v.length)return m(e,i.slice(s));if(!(p<v.length))return i[s].index=v.length-p,m(e,i.slice(s));var y=v[p];if(!(y instanceof n.XFAObject))return(0,a.warn)("XFA - Cannot create a node."),null;e=y}return null},t.searchNode=function(e,t,r){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],c=g(r,a);if(!c)return null;var u,l=d.get(c[0].name),f=0;l?(u=!0,e=[l(e,t)],f=1):(u=null===t,e=[t||e]);for(var m=function(r){var a,o=c[f],l=o.name,d=o.cacheName,g=o.operator,m=o.index,v=[],y=i(e);try{for(y.s();!(a=y.n()).done;){var b=a.value;if(b instanceof n.XFAObject){var w=void 0,k=void 0;if(s&&((k=p.get(b))||(k=new Map,p.set(b,k)),w=k.get(d)),!w){switch(g){case h.dot:w=b[n.$getChildrenByName](l,!1);break;case h.dotDot:w=b[n.$getChildrenByName](l,!0);break;case h.dotHash:w=(w=b[n.$getChildrenByClass](l))instanceof n.XFAObjectArray?w.children:[w]}s&&k.set(d,w)}w.length>0&&v.push(w)}}}catch(e){y.e(e)}finally{y.f()}if(0===v.length&&!u&&0===f){var S=t[n.$getParent]();return(t=S)?(f=-1,e=[t],"continue"):{v:null}}e=isFinite(m)?v.filter(function(e){return m<e.length}).map(function(e){return e[m]}):v.reduce(function(e,t){return e.concat(t)},[])},v=c.length;f<v;f++){var y=m(v);if("continue"!==y&&"object"===o(y))return y.v}if(0===e.length)return null;return e};var n=r(176),a=r(4);function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var l=/^[^.[]+/,f=/^[^\]]+/,h={dot:0,dotDot:1,dotHash:2,dotBracket:3,dotParen:4},d=new Map([["$data",function(e,t){return e.datasets.data}],["$template",function(e,t){return e.template}],["$connectionSet",function(e,t){return e.connectionSet}],["$form",function(e,t){return e.form}],["$layout",function(e,t){return e.layout}],["$host",function(e,t){return e.host}],["$dataWindow",function(e,t){return e.dataWindow}],["$event",function(e,t){return e.event}],["!",function(e,t){return e.datasets}],["$xfa",function(e,t){return e}],["xfa",function(e,t){return e}],["$",function(e,t){return t}]]),p=new WeakMap;function g(e,t){var r=e.match(l);if(!r)return null;for(var n,i=s(r,1)[0],o=[{name:i,cacheName:"."+i,index:0,js:null,formCalc:null,operator:h.dot}],c=i.length;c<e.length;){var u=c;if("["!==e.charAt(c++)){var d=void 0;switch(e.charAt(c)){case".":if(!t)return null;c++,d=h.dotDot;break;case"#":c++,d=h.dotHash;break;case"[":d=h.dotBracket;break;case"(":d=h.dotParen;break;default:d=h.dot}if(!(r=e.slice(c).match(l)))break;c+=(i=s(r,1)[0]).length,o.push({name:i,cacheName:e.slice(u,c),operator:d,index:0,js:null,formCalc:null})}else{if(!(r=e.slice(c).match(f)))return(0,a.warn)("XFA - Invalid index in SOM expression"),null;o[o.length-1].index="*"===(n=(n=r[0]).trim())?1/0:parseInt(n,10)||0,c+=r[0].length+1}}return o}function m(e,t){var r,a=null,o=i(t);try{for(o.s();!(r=o.n()).done;){for(var s=r.value,c=s.name,u=s.index,l=0;l<=u;l++)a=new n.XmlObject(e[n.$namespaceId],c),e[n.$appendChild](a);e=a}}catch(e){o.e(e)}finally{o.f()}return a}},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.XFAParser=void 0;var a=r(176),i=r(169),o=r(185),s=r(4);function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=p(e);if(t){var i=p(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(p,i.XMLParserBase);var t,r,n,l=d(p);function p(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),(e=l.call(this))._builder=new o.Builder,e._stack=[],e._ids=new Map,e._current=e._builder.buildRoot(e._ids),e._errorCode=i.XMLParserErrorCode.NoError,e._whiteRegex=/^\s+$/,e._nbsps=/\xa0+/g,e}return t=p,(r=[{key:"parse",value:function(e){if(this.parseXml(e),this._errorCode===i.XMLParserErrorCode.NoError)return this._current[a.$finalize](),this._current.element}},{key:"onText",value:function(e){e=e.replace(this._nbsps,function(e){return e.slice(1)+" "}),this._current[a.$acceptWhitespace]()?this._current[a.$onText](e):this._whiteRegex.test(e)||this._current[a.$onText](e.trim())}},{key:"onCdata",value:function(e){this._current[a.$onText](e)}},{key:"_mkAttributes",value:function(e,t){var r,n=null,i=null,o=Object.create({}),c=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}(e);try{for(c.s();!(r=c.n()).done;){var l=r.value,f=l.name,h=l.value;if("xmlns"===f)n?(0,s.warn)("XFA - multiple namespace definition in <".concat(t,">")):n=h;else if(f.startsWith("xmlns:")){var d=f.substring("xmlns:".length);i||(i=[]),i.push({prefix:d,value:h})}else{var p=f.indexOf(":");if(-1===p)o[f]=h;else{var g=o[a.$nsAttributes];g||(g=o[a.$nsAttributes]=Object.create(null));var m=[f.slice(0,p),f.slice(p+1)],v=m[0],y=m[1],b=g[v];b||(b=g[v]=Object.create(null)),b[y]=h}}}}catch(e){c.e(e)}finally{c.f()}return[n,i,o]}},{key:"_getNameAndPrefix",value:function(e){var t=e.indexOf(":");return-1===t?[e,null]:[e.substring(t+1),e.substring(0,t)]}},{key:"onBeginElement",value:function(e,t,r){var n=c(this._mkAttributes(t,e),3),i=n[0],o=n[1],s=n[2],u=c(this._getNameAndPrefix(e),2),l=u[0],f=u[1],h=this._builder.build({nsPrefix:f,name:l,attributes:s,namespace:i,prefixes:o});if(r)return h[a.$finalize](),this._current[a.$onChild](h)&&h[a.$setId](this._ids),void h[a.$clean](this._builder);this._stack.push(this._current),this._current=h}},{key:"onEndElement",value:function(e){var t=this._current;t[a.$finalize](),this._current=this._stack.pop(),this._current[a.$onChild](t)&&t[a.$setId](this._ids),t[a.$clean](this._builder)}},{key:"onError",value:function(e){this._errorCode=e}}])&&f(t.prototype,r),n&&f(t,n),p}();t.XFAParser=g},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.Builder=void 0;var a=r(178),i=r(176),o=r(186),s=r(180),c=r(195),u=r(4);function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function m(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),e}function v(e,t,r){return(v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=k(e)););return e}(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(r):a.value}})(e,t,r||e)}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=k(e);if(t){var i=k(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var S=function(e){y(r,i.XFAObject);var t=w(r);function r(e){var n;return p(this,r),(n=t.call(this,-1,"root",Object.create(null))).element=null,n[i.$ids]=e,n}return m(r,[{key:i.$onChild,value:function(e){return this.element=e,!0}},{key:i.$finalize,value:function(){v(k(r.prototype),i.$finalize,this).call(this),this.element.template instanceof s.Template&&(this.element.template[i.$resolvePrototypes](this[i.$ids]),this.element.template[i.$ids]=this[i.$ids])}}]),r}(),x=function(e){y(r,i.XFAObject);var t=w(r);function r(){return p(this,r),t.call(this,-1,"",Object.create(null))}return m(r,[{key:i.$onChild,value:function(e){return!1}}]),r}(),A=function(){function e(){p(this,e),this._namespaceStack=[],this._namespacePrefixes=new Map,this._namespaces=new Map,this._nextNsId=Math.max.apply(Math,f(Object.values(a.NamespaceIds).map(function(e){return e.id}))),this._currentNamespace=new c.UnknownNamespace(++this._nextNsId)}return m(e,[{key:"buildRoot",value:function(e){return new S(e)}},{key:"build",value:function(e){var t=e.nsPrefix,r=e.name,n=e.attributes,s=e.namespace,c=e.prefixes,u=null!==s;if(u&&(this._namespaceStack.push(this._currentNamespace),this._currentNamespace=this._searchNamespace(s)),c&&this._addNamespacePrefix(c),n.hasOwnProperty(i.$nsAttributes)){for(var f=o.NamespaceSetUp.datasets,h=n[i.$nsAttributes],d=null,p=0,g=Object.entries(h);p<g.length;p++){var m=l(g[p],2),v=m[0],y=m[1];if(this._getNamespaceToUse(v)===f){d={xfa:y};break}}d?n[i.$nsAttributes]=d:delete n[i.$nsAttributes]}var b=this._getNamespaceToUse(t),w=b&&b[a.$buildXFAObject](r,n)||new x;return(u||c)&&(w[i.$cleanup]={hasNamespace:u,prefixes:c}),w}},{key:"_searchNamespace",value:function(e){var t=this._namespaces.get(e);if(t)return t;for(var r=0,n=Object.entries(a.NamespaceIds);r<n.length;r++){var i=l(n[r],2),s=i[0];if((0,i[1].check)(e)){if(t=o.NamespaceSetUp[s])return this._namespaces.set(e,t),t;break}}return t=new c.UnknownNamespace(++this._nextNsId),this._namespaces.set(e,t),t}},{key:"_addNamespacePrefix",value:function(e){var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=h(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}(e);try{for(r.s();!(t=r.n()).done;){var n=t.value,a=n.prefix,i=n.value,o=this._searchNamespace(i),s=this._namespacePrefixes.get(a);s||(s=[],this._namespacePrefixes.set(a,s)),s.push(o)}}catch(e){r.e(e)}finally{r.f()}}},{key:"_getNamespaceToUse",value:function(e){if(!e)return this._currentNamespace;var t=this._namespacePrefixes.get(e);return t&&t.length>0?t[t.length-1]:((0,u.warn)("Unknown namespace prefix: ".concat(e,".")),null)}},{key:"clean",value:function(e){var t=this,r=e.hasNamespace,n=e.prefixes;r&&(this._currentNamespace=this._namespaceStack.pop()),n&&n.forEach(function(e){var r=e.prefix;t._namespacePrefixes.get(r).pop()})}}]),e}();t.Builder=A},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamespaceSetUp=void 0;var n=r(187),a=r(188),i=r(189),o=r(190),s=r(191),c=r(192),u=r(180),l=r(193),f=r(194),h={config:n.ConfigNamespace,connection:a.ConnectionSetNamespace,datasets:i.DatasetsNamespace,localeSet:o.LocaleSetNamespace,signature:s.SignatureNamespace,stylesheet:c.StylesheetNamespace,template:u.TemplateNamespace,xdp:l.XdpNamespace,xhtml:f.XhtmlNamespace};t.NamespaceSetUp=h},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigNamespace=void 0;var a=r(178),i=r(176),o=r(177),s=r(4);function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=m(e);if(t){var i=m(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=a.NamespaceIds.config.id,y=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"acrobat",!0)).acrobat7=null,n.autoSave=null,n.common=null,n.validate=null,n.validateApprovalSignatures=null,n.submitUrl=new i.XFAObjectArray,n}return r}(),b=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"acrobat7",!0)).dynamicRender=null,n}return r}(),w=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"ADBE_JSConsole",["delegate","Enable","Disable"])}return r}(),k=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"ADBE_JSDebugger",["delegate","Enable","Disable"])}return r}(),S=function(e){d(r,i.Option01);var t=g(r);function r(e){return h(this,r),t.call(this,v,"addSilentPrint")}return r}(),x=function(e){d(r,i.Option01);var t=g(r);function r(e){return h(this,r),t.call(this,v,"addViewerPreferences")}return r}(),A=function(e){d(r,i.Option10);var t=g(r);function r(e){return h(this,r),t.call(this,v,"adjustData")}return r}(),O=function(e){d(r,i.IntegerObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"adobeExtensionLevel",0,function(e){return e>=1&&e<=8})}return r}(),C=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"agent",!0)).name=e.name?e.name.trim():"",n.common=new i.XFAObjectArray,n}return r}(),T=function(e){d(r,i.ContentObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"alwaysEmbed")}return r}(),F=function(e){d(r,i.StringObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"amd")}return r}(),_=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"area")).level=(0,o.getInteger)({data:e.level,defaultValue:0,validate:function(e){return e>=1&&e<=3}}),n.name=(0,o.getStringOption)(e.name,["","barcode","coreinit","deviceDriver","font","general","layout","merge","script","signature","sourceSet","templateCache"]),n}return r}(),P=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"attributes",["preserve","delegate","ignore"])}return r}(),I=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"autoSave",["disabled","enabled"])}return r}(),E=function(e){d(r,i.StringObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"base")}return r}(),j=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"batchOutput")).format=(0,o.getStringOption)(e.format,["none","concat","zip","zipCompress"]),n}return r}(),R=function(e){d(r,i.ContentObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"behaviorOverride")}return f(r,[{key:i.$finalize,value:function(){this[i.$content]=new Map(this[i.$content].trim().split(/\s+/).filter(function(e){return!!e&&e.include(":")}).map(function(e){return e.split(":",2)}))}}]),r}(),M=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"cache",!0)).templateCache=null,n}return r}(),N=function(e){d(r,i.Option01);var t=g(r);function r(e){return h(this,r),t.call(this,v,"change")}return r}(),B=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"common",!0)).data=null,n.locale=null,n.localeSet=null,n.messaging=null,n.suppressBanner=null,n.template=null,n.validationMessaging=null,n.versionControl=null,n.log=new i.XFAObjectArray,n}return r}(),D=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"compress")).scope=(0,o.getStringOption)(e.scope,["imageOnly","document"]),n}return r}(),L=function(e){d(r,i.Option01);var t=g(r);function r(e){return h(this,r),t.call(this,v,"compressLogicalStructure")}return r}(),U=function(e){d(r,i.Option10);var t=g(r);function r(e){return h(this,r),t.call(this,v,"compressObjectStream")}return r}(),q=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"compression",!0)).compressLogicalStructure=null,n.compressObjectStream=null,n.level=null,n.type=null,n}return r}(),X=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"config",!0)).acrobat=null,n.present=null,n.trace=null,n.agent=new i.XFAObjectArray,n}return r}(),H=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"conformance",["A","B"])}return r}(),$=function(e){d(r,i.Option01);var t=g(r);function r(e){return h(this,r),t.call(this,v,"contentCopy")}return r}(),z=function(e){d(r,i.IntegerObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"copies",1,function(e){return e>=1})}return r}(),G=function(e){d(r,i.StringObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"creator")}return r}(),W=function(e){d(r,i.IntegerObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"currentPage",0,function(e){return e>=0})}return r}(),V=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"data",!0)).adjustData=null,n.attributes=null,n.incrementalLoad=null,n.outputXSL=null,n.range=null,n.record=null,n.startNode=null,n.uri=null,n.window=null,n.xsl=null,n.excludeNS=new i.XFAObjectArray,n.transform=new i.XFAObjectArray,n}return r}(),K=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"debug",!0)).uri=null,n}return r}(),Y=function(e){d(r,i.ContentObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"defaultTypeface")).writingScript=(0,o.getStringOption)(e.writingScript,["*","Arabic","Cyrillic","EastEuropeanRoman","Greek","Hebrew","Japanese","Korean","Roman","SimplifiedChinese","Thai","TraditionalChinese","Vietnamese"]),n}return r}(),J=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"destination",["pdf","pcl","ps","webClient","zpl"])}return r}(),Z=function(e){d(r,i.Option01);var t=g(r);function r(e){return h(this,r),t.call(this,v,"documentAssembly")}return r}(),Q=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"driver",!0)).name=e.name?e.name.trim():"",n.fontInfo=null,n.xdc=null,n}return r}(),ee=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"duplexOption",["simplex","duplexFlipLongEdge","duplexFlipShortEdge"])}return r}(),te=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"dynamicRender",["forbidden","required"])}return r}(),re=function(e){d(r,i.Option01);var t=g(r);function r(e){return h(this,r),t.call(this,v,"embed")}return r}(),ne=function(e){d(r,i.Option01);var t=g(r);function r(e){return h(this,r),t.call(this,v,"encrypt")}return r}(),ae=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"encryption",!0)).encrypt=null,n.encryptionLevel=null,n.permissions=null,n}return r}(),ie=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"encryptionLevel",["40bit","128bit"])}return r}(),oe=function(e){d(r,i.StringObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"enforce")}return r}(),se=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"equate")).force=(0,o.getInteger)({data:e.force,defaultValue:1,validate:function(e){return 0===e}}),n.from=e.from||"",n.to=e.to||"",n}return r}(),ce=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"equateRange")).from=e.from||"",n.to=e.to||"",n._unicodeRange=e.unicodeRange||"",n}return f(r,[{key:"unicodeRange",get:function(){var e,t=[],r=/U\+([0-9a-fA-F]+)/,n=c(this._unicodeRange.split(",").map(function(e){return e.trim()}).filter(function(e){return!!e}));try{for(n.s();!(e=n.n()).done;){var a=e.value;1===(a=a.split("-",2).map(function(e){var t=e.match(r);return t?parseInt(t[1],16):0})).length&&a.push(a[0]),t.push(a)}}catch(e){n.e(e)}finally{n.f()}return(0,s.shadow)(this,"unicodeRange",t)}}]),r}(),ue=function(e){d(r,i.ContentObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"exclude")}return f(r,[{key:i.$finalize,value:function(){this[i.$content]=this[i.$content].trim().split(/\s+/).filter(function(e){return e&&["calculate","close","enter","exit","initialize","ready","validate"].includes(e)})}}]),r}(),le=function(e){d(r,i.StringObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"excludeNS")}return r}(),fe=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"flipLabel",["usePrinterSetting","on","off"])}return r}(),he=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"fontInfo",!0)).embed=null,n.map=null,n.subsetBelow=null,n.alwaysEmbed=new i.XFAObjectArray,n.defaultTypeface=new i.XFAObjectArray,n.neverEmbed=new i.XFAObjectArray,n}return r}(),de=function(e){d(r,i.Option01);var t=g(r);function r(e){return h(this,r),t.call(this,v,"formFieldFilling")}return r}(),pe=function(e){d(r,i.StringObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"groupParent")}return r}(),ge=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"ifEmpty",["dataValue","dataGroup","ignore","remove"])}return r}(),me=function(e){d(r,i.StringObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"includeXDPContent")}return r}(),ve=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"incrementalLoad",["none","forwardOnly"])}return r}(),ye=function(e){d(r,i.Option01);var t=g(r);function r(e){return h(this,r),t.call(this,v,"incrementalMerge")}return r}(),be=function(e){d(r,i.Option01);var t=g(r);function r(e){return h(this,r),t.call(this,v,"interactive")}return r}(),we=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"jog",["usePrinterSetting","none","pageSet"])}return r}(),ke=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"labelPrinter",!0)).name=(0,o.getStringOption)(e.name,["zpl","dpl","ipl","tcpl"]),n.batchOutput=null,n.flipLabel=null,n.fontInfo=null,n.xdc=null,n}return r}(),Se=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"layout",["paginate","panel"])}return r}(),xe=function(e){d(r,i.IntegerObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"level",0,function(e){return e>0})}return r}(),Ae=function(e){d(r,i.Option01);var t=g(r);function r(e){return h(this,r),t.call(this,v,"linearized")}return r}(),Oe=function(e){d(r,i.StringObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"locale")}return r}(),Ce=function(e){d(r,i.StringObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"localeSet")}return r}(),Te=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"log",!0)).mode=null,n.threshold=null,n.to=null,n.uri=null,n}return r}(),Fe=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"map",!0)).equate=new i.XFAObjectArray,n.equateRange=new i.XFAObjectArray,n}return r}(),_e=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"mediumInfo",!0)).map=null,n}return r}(),Pe=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"message",!0)).msgId=null,n.severity=null,n}return r}(),Ie=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"messaging",!0)).message=new i.XFAObjectArray,n}return r}(),Ee=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"mode",["append","overwrite"])}return r}(),je=function(e){d(r,i.Option01);var t=g(r);function r(e){return h(this,r),t.call(this,v,"modifyAnnots")}return r}(),Re=function(e){d(r,i.IntegerObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"msgId",1,function(e){return e>=1})}return r}(),Me=function(e){d(r,i.StringObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"nameAttr")}return r}(),Ne=function(e){d(r,i.ContentObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"neverEmbed")}return r}(),Be=function(e){d(r,i.IntegerObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"numberOfCopies",null,function(e){return e>=2&&e<=5})}return r}(),De=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"openAction",!0)).destination=null,n}return r}(),Le=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"output",!0)).to=null,n.type=null,n.uri=null,n}return r}(),Ue=function(e){d(r,i.StringObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"outputBin")}return r}(),qe=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"outputXSL",!0)).uri=null,n}return r}(),Xe=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"overprint",["none","both","draw","field"])}return r}(),He=function(e){d(r,i.StringObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"packets")}return f(r,[{key:i.$finalize,value:function(){"*"!==this[i.$content]&&(this[i.$content]=this[i.$content].trim().split(/\s+/).filter(function(e){return["config","datasets","template","xfdf","xslt"].includes(e)}))}}]),r}(),$e=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"pageOffset")).x=(0,o.getInteger)({data:e.x,defaultValue:"useXDCSetting",validate:function(e){return!0}}),n.y=(0,o.getInteger)({data:e.y,defaultValue:"useXDCSetting",validate:function(e){return!0}}),n}return r}(),ze=function(e){d(r,i.StringObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"pageRange")}return f(r,[{key:i.$finalize,value:function(){for(var e=this[i.$content].trim().split(/\s+/).map(function(e){return parseInt(e,10)}),t=[],r=0,n=e.length;r<n;r+=2)t.push(e.slice(r,r+2));this[i.$content]=t}}]),r}(),Ge=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"pagination",["simplex","duplexShortEdge","duplexLongEdge"])}return r}(),We=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"paginationOverride",["none","forceDuplex","forceDuplexLongEdge","forceDuplexShortEdge","forceSimplex"])}return r}(),Ve=function(e){d(r,i.IntegerObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"part",1,function(e){return!1})}return r}(),Ke=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"pcl",!0)).name=e.name||"",n.batchOutput=null,n.fontInfo=null,n.jog=null,n.mediumInfo=null,n.outputBin=null,n.pageOffset=null,n.staple=null,n.xdc=null,n}return r}(),Ye=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"pdf",!0)).name=e.name||"",n.adobeExtensionLevel=null,n.batchOutput=null,n.compression=null,n.creator=null,n.encryption=null,n.fontInfo=null,n.interactive=null,n.linearized=null,n.openAction=null,n.pdfa=null,n.producer=null,n.renderPolicy=null,n.scriptModel=null,n.silentPrint=null,n.submitFormat=null,n.tagged=null,n.version=null,n.viewerPreferences=null,n.xdc=null,n}return r}(),Je=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"pdfa",!0)).amd=null,n.conformance=null,n.includeXDPContent=null,n.part=null,n}return r}(),Ze=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"permissions",!0)).accessibleContent=null,n.change=null,n.contentCopy=null,n.documentAssembly=null,n.formFieldFilling=null,n.modifyAnnots=null,n.plaintextMetadata=null,n.print=null,n.printHighQuality=null,n}return r}(),Qe=function(e){d(r,i.Option01);var t=g(r);function r(e){return h(this,r),t.call(this,v,"pickTrayByPDFSize")}return r}(),et=function(e){d(r,i.StringObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"picture")}return r}(),tt=function(e){d(r,i.Option01);var t=g(r);function r(e){return h(this,r),t.call(this,v,"plaintextMetadata")}return r}(),rt=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"presence",["preserve","dissolve","dissolveStructure","ignore","remove"])}return r}(),nt=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"present",!0)).behaviorOverride=null,n.cache=null,n.common=null,n.copies=null,n.destination=null,n.incrementalMerge=null,n.layout=null,n.output=null,n.overprint=null,n.pagination=null,n.paginationOverride=null,n.script=null,n.validate=null,n.xdp=null,n.driver=new i.XFAObjectArray,n.labelPrinter=new i.XFAObjectArray,n.pcl=new i.XFAObjectArray,n.pdf=new i.XFAObjectArray,n.ps=new i.XFAObjectArray,n.submitUrl=new i.XFAObjectArray,n.webClient=new i.XFAObjectArray,n.zpl=new i.XFAObjectArray,n}return r}(),at=function(e){d(r,i.Option01);var t=g(r);function r(e){return h(this,r),t.call(this,v,"print")}return r}(),it=function(e){d(r,i.Option01);var t=g(r);function r(e){return h(this,r),t.call(this,v,"printHighQuality")}return r}(),ot=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"printScaling",["appdefault","noScaling"])}return r}(),st=function(e){d(r,i.StringObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"printerName")}return r}(),ct=function(e){d(r,i.StringObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"producer")}return r}(),ut=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"ps",!0)).name=e.name||"",n.batchOutput=null,n.fontInfo=null,n.jog=null,n.mediumInfo=null,n.outputBin=null,n.staple=null,n.xdc=null,n}return r}(),lt=function(e){d(r,i.ContentObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"range")}return f(r,[{key:i.$finalize,value:function(){this[i.$content]=this[i.$content].trim().split(/\s*,\s*/,2).map(function(e){return e.split("-").map(function(e){return parseInt(e.trim(),10)})}).filter(function(e){return e.every(function(e){return!isNaN(e)})}).map(function(e){return 1===e.length&&e.push(e[0]),e})}}]),r}(),ft=function(e){d(r,i.ContentObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"record")}return f(r,[{key:i.$finalize,value:function(){this[i.$content]=this[i.$content].trim();var e=parseInt(this[i.$content],10);!isNaN(e)&&e>=0&&(this[i.$content]=e)}}]),r}(),ht=function(e){d(r,i.ContentObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"relevant")}return f(r,[{key:i.$finalize,value:function(){this[i.$content]=this[i.$content].trim().split(/\s+/)}}]),r}(),dt=function(e){d(r,i.ContentObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"rename")}return f(r,[{key:i.$finalize,value:function(){this[i.$content]=this[i.$content].trim(),(this[i.$content].toLowerCase().startsWith("xml")||this[i.$content].match(new RegExp("[\\p{L}_][\\p{L}\\d._\\p{M}-]*","u")))&&(0,s.warn)("XFA - Rename: invalid XFA name")}}]),r}(),pt=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"renderPolicy",["server","client"])}return r}(),gt=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"runScripts",["both","client","none","server"])}return r}(),mt=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"script",!0)).currentPage=null,n.exclude=null,n.runScripts=null,n}return r}(),vt=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"scriptModel",["XFA","none"])}return r}(),yt=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"severity",["ignore","error","information","trace","warning"])}return r}(),bt=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"silentPrint",!0)).addSilentPrint=null,n.printerName=null,n}return r}(),wt=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"staple")).mode=(0,o.getStringOption)(e.mode,["usePrinterSetting","on","off"]),n}return r}(),kt=function(e){d(r,i.StringObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"startNode")}return r}(),St=function(e){d(r,i.IntegerObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"startPage",0,function(e){return!0})}return r}(),xt=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"submitFormat",["html","delegate","fdf","xml","pdf"])}return r}(),At=function(e){d(r,i.StringObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"submitUrl")}return r}(),Ot=function(e){d(r,i.IntegerObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"subsetBelow",100,function(e){return e>=0&&e<=100})}return r}(),Ct=function(e){d(r,i.Option01);var t=g(r);function r(e){return h(this,r),t.call(this,v,"suppressBanner")}return r}(),Tt=function(e){d(r,i.Option01);var t=g(r);function r(e){return h(this,r),t.call(this,v,"tagged")}return r}(),Ft=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"template",!0)).base=null,n.relevant=null,n.startPage=null,n.uri=null,n.xsl=null,n}return r}(),_t=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"threshold",["trace","error","information","warning"])}return r}(),Pt=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"to",["null","memory","stderr","stdout","system","uri"])}return r}(),It=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"templateCache")).maxEntries=(0,o.getInteger)({data:e.maxEntries,defaultValue:5,validate:function(e){return e>=0}}),n}return r}(),Et=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"trace",!0)).area=new i.XFAObjectArray,n}return r}(),jt=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"transform",!0)).groupParent=null,n.ifEmpty=null,n.nameAttr=null,n.picture=null,n.presence=null,n.rename=null,n.whitespace=null,n}return r}(),Rt=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"type",["none","ascii85","asciiHex","ccittfax","flate","lzw","runLength","native","xdp","mergedXDP"])}return r}(),Mt=function(e){d(r,i.StringObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"uri")}return r}(),Nt=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"validate",["preSubmit","prePrint","preExecute","preSave"])}return r}(),Bt=function(e){d(r,i.ContentObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"validateApprovalSignatures")}return f(r,[{key:i.$finalize,value:function(){this[i.$content]=this[i.$content].trim().split(/\s+/).filter(function(e){return["docReady","postSign"].includes(e)})}}]),r}(),Dt=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"validationMessaging",["allMessagesIndividually","allMessagesTogether","firstMessageOnly","noMessages"])}return r}(),Lt=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"version",["1.7","1.6","1.5","1.4","1.3","1.2"])}return r}(),Ut=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"VersionControl")).outputBelow=(0,o.getStringOption)(e.outputBelow,["warn","error","update"]),n.sourceAbove=(0,o.getStringOption)(e.sourceAbove,["warn","error"]),n.sourceBelow=(0,o.getStringOption)(e.sourceBelow,["update","maintain"]),n}return r}(),qt=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"viewerPreferences",!0)).ADBE_JSConsole=null,n.ADBE_JSDebugger=null,n.addViewerPreferences=null,n.duplexOption=null,n.enforce=null,n.numberOfCopies=null,n.pageRange=null,n.pickTrayByPDFSize=null,n.printScaling=null,n}return r}(),Xt=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"webClient",!0)).name=e.name?e.name.trim():"",n.fontInfo=null,n.xdc=null,n}return r}(),Ht=function(e){d(r,i.OptionObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"whitespace",["preserve","ltrim","normalize","rtrim","trim"])}return r}(),$t=function(e){d(r,i.ContentObject);var t=g(r);function r(e){return h(this,r),t.call(this,v,"window")}return f(r,[{key:i.$finalize,value:function(){var e=this[i.$content].trim().split(/\s*,\s*/,2).map(function(e){return parseInt(e,10)});e.some(function(e){return isNaN(e)})?this[i.$content]=[0,0]:(1===e.length&&e.push(e[0]),this[i.$content]=e)}}]),r}(),zt=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"xdc",!0)).uri=new i.XFAObjectArray,n.xsl=new i.XFAObjectArray,n}return r}(),Gt=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"xdp",!0)).packets=null,n}return r}(),Wt=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"xsl",!0)).debug=null,n.uri=null,n}return r}(),Vt=function(e){d(r,i.XFAObject);var t=g(r);function r(e){var n;return h(this,r),(n=t.call(this,v,"zpl",!0)).name=e.name?e.name.trim():"",n.batchOutput=null,n.flipLabel=null,n.fontInfo=null,n.xdc=null,n}return r}(),Kt=function(){function e(){h(this,e)}return f(e,null,[{key:a.$buildXFAObject,value:function(t,r){if(e.hasOwnProperty(t))return e[t](r)}},{key:"acrobat",value:function(e){return new y(e)}},{key:"acrobat7",value:function(e){return new b(e)}},{key:"ADBE_JSConsole",value:function(e){return new w(e)}},{key:"ADBE_JSDebugger",value:function(e){return new k(e)}},{key:"addSilentPrint",value:function(e){return new S(e)}},{key:"addViewerPreferences",value:function(e){return new x(e)}},{key:"adjustData",value:function(e){return new A(e)}},{key:"adobeExtensionLevel",value:function(e){return new O(e)}},{key:"agent",value:function(e){return new C(e)}},{key:"alwaysEmbed",value:function(e){return new T(e)}},{key:"amd",value:function(e){return new F(e)}},{key:"area",value:function(e){return new _(e)}},{key:"attributes",value:function(e){return new P(e)}},{key:"autoSave",value:function(e){return new I(e)}},{key:"base",value:function(e){return new E(e)}},{key:"batchOutput",value:function(e){return new j(e)}},{key:"behaviorOverride",value:function(e){return new R(e)}},{key:"cache",value:function(e){return new M(e)}},{key:"change",value:function(e){return new N(e)}},{key:"common",value:function(e){return new B(e)}},{key:"compress",value:function(e){return new D(e)}},{key:"compressLogicalStructure",value:function(e){return new L(e)}},{key:"compressObjectStream",value:function(e){return new U(e)}},{key:"compression",value:function(e){return new q(e)}},{key:"config",value:function(e){return new X(e)}},{key:"conformance",value:function(e){return new H(e)}},{key:"contentCopy",value:function(e){return new $(e)}},{key:"copies",value:function(e){return new z(e)}},{key:"creator",value:function(e){return new G(e)}},{key:"currentPage",value:function(e){return new W(e)}},{key:"data",value:function(e){return new V(e)}},{key:"debug",value:function(e){return new K(e)}},{key:"defaultTypeface",value:function(e){return new Y(e)}},{key:"destination",value:function(e){return new J(e)}},{key:"documentAssembly",value:function(e){return new Z(e)}},{key:"driver",value:function(e){return new Q(e)}},{key:"duplexOption",value:function(e){return new ee(e)}},{key:"dynamicRender",value:function(e){return new te(e)}},{key:"embed",value:function(e){return new re(e)}},{key:"encrypt",value:function(e){return new ne(e)}},{key:"encryption",value:function(e){return new ae(e)}},{key:"encryptionLevel",value:function(e){return new ie(e)}},{key:"enforce",value:function(e){return new oe(e)}},{key:"equate",value:function(e){return new se(e)}},{key:"equateRange",value:function(e){return new ce(e)}},{key:"exclude",value:function(e){return new ue(e)}},{key:"excludeNS",value:function(e){return new le(e)}},{key:"flipLabel",value:function(e){return new fe(e)}},{key:"fontInfo",value:function(e){return new he(e)}},{key:"formFieldFilling",value:function(e){return new de(e)}},{key:"groupParent",value:function(e){return new pe(e)}},{key:"ifEmpty",value:function(e){return new ge(e)}},{key:"includeXDPContent",value:function(e){return new me(e)}},{key:"incrementalLoad",value:function(e){return new ve(e)}},{key:"incrementalMerge",value:function(e){return new ye(e)}},{key:"interactive",value:function(e){return new be(e)}},{key:"jog",value:function(e){return new we(e)}},{key:"labelPrinter",value:function(e){return new ke(e)}},{key:"layout",value:function(e){return new Se(e)}},{key:"level",value:function(e){return new xe(e)}},{key:"linearized",value:function(e){return new Ae(e)}},{key:"locale",value:function(e){return new Oe(e)}},{key:"localeSet",value:function(e){return new Ce(e)}},{key:"log",value:function(e){return new Te(e)}},{key:"map",value:function(e){return new Fe(e)}},{key:"mediumInfo",value:function(e){return new _e(e)}},{key:"message",value:function(e){return new Pe(e)}},{key:"messaging",value:function(e){return new Ie(e)}},{key:"mode",value:function(e){return new Ee(e)}},{key:"modifyAnnots",value:function(e){return new je(e)}},{key:"msgId",value:function(e){return new Re(e)}},{key:"nameAttr",value:function(e){return new Me(e)}},{key:"neverEmbed",value:function(e){return new Ne(e)}},{key:"numberOfCopies",value:function(e){return new Be(e)}},{key:"openAction",value:function(e){return new De(e)}},{key:"output",value:function(e){return new Le(e)}},{key:"outputBin",value:function(e){return new Ue(e)}},{key:"outputXSL",value:function(e){return new qe(e)}},{key:"overprint",value:function(e){return new Xe(e)}},{key:"packets",value:function(e){return new He(e)}},{key:"pageOffset",value:function(e){return new $e(e)}},{key:"pageRange",value:function(e){return new ze(e)}},{key:"pagination",value:function(e){return new Ge(e)}},{key:"paginationOverride",value:function(e){return new We(e)}},{key:"part",value:function(e){return new Ve(e)}},{key:"pcl",value:function(e){return new Ke(e)}},{key:"pdf",value:function(e){return new Ye(e)}},{key:"pdfa",value:function(e){return new Je(e)}},{key:"permissions",value:function(e){return new Ze(e)}},{key:"pickTrayByPDFSize",value:function(e){return new Qe(e)}},{key:"picture",value:function(e){return new et(e)}},{key:"plaintextMetadata",value:function(e){return new tt(e)}},{key:"presence",value:function(e){return new rt(e)}},{key:"present",value:function(e){return new nt(e)}},{key:"print",value:function(e){return new at(e)}},{key:"printHighQuality",value:function(e){return new it(e)}},{key:"printScaling",value:function(e){return new ot(e)}},{key:"printerName",value:function(e){return new st(e)}},{key:"producer",value:function(e){return new ct(e)}},{key:"ps",value:function(e){return new ut(e)}},{key:"range",value:function(e){return new lt(e)}},{key:"record",value:function(e){return new ft(e)}},{key:"relevant",value:function(e){return new ht(e)}},{key:"rename",value:function(e){return new dt(e)}},{key:"renderPolicy",value:function(e){return new pt(e)}},{key:"runScripts",value:function(e){return new gt(e)}},{key:"script",value:function(e){return new mt(e)}},{key:"scriptModel",value:function(e){return new vt(e)}},{key:"severity",value:function(e){return new yt(e)}},{key:"silentPrint",value:function(e){return new bt(e)}},{key:"staple",value:function(e){return new wt(e)}},{key:"startNode",value:function(e){return new kt(e)}},{key:"startPage",value:function(e){return new St(e)}},{key:"submitFormat",value:function(e){return new xt(e)}},{key:"submitUrl",value:function(e){return new At(e)}},{key:"subsetBelow",value:function(e){return new Ot(e)}},{key:"suppressBanner",value:function(e){return new Ct(e)}},{key:"tagged",value:function(e){return new Tt(e)}},{key:"template",value:function(e){return new Ft(e)}},{key:"templateCache",value:function(e){return new It(e)}},{key:"threshold",value:function(e){return new _t(e)}},{key:"to",value:function(e){return new Pt(e)}},{key:"trace",value:function(e){return new Et(e)}},{key:"transform",value:function(e){return new jt(e)}},{key:"type",value:function(e){return new Rt(e)}},{key:"uri",value:function(e){return new Mt(e)}},{key:"validate",value:function(e){return new Nt(e)}},{key:"validateApprovalSignatures",value:function(e){return new Bt(e)}},{key:"validationMessaging",value:function(e){return new Dt(e)}},{key:"version",value:function(e){return new Lt(e)}},{key:"versionControl",value:function(e){return new Ut(e)}},{key:"viewerPreferences",value:function(e){return new qt(e)}},{key:"webClient",value:function(e){return new Xt(e)}},{key:"whitespace",value:function(e){return new Ht(e)}},{key:"window",value:function(e){return new $t(e)}},{key:"xdc",value:function(e){return new zt(e)}},{key:"xdp",value:function(e){return new Gt(e)}},{key:"xsl",value:function(e){return new Wt(e)}},{key:"zpl",value:function(e){return new Vt(e)}}]),e}();t.ConfigNamespace=Kt},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionSetNamespace=void 0;var a=r(178),i=r(176);function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=f(e);if(t){var i=f(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=a.NamespaceIds.connectionSet.id,d=function(e){c(r,i.XFAObject);var t=l(r);function r(e){var n;return s(this,r),(n=t.call(this,h,"connectionSet",!0)).wsdlConnection=new i.XFAObjectArray,n.xmlConnection=new i.XFAObjectArray,n.xsdConnection=new i.XFAObjectArray,n}return r}(),p=function(e){c(r,i.XFAObject);var t=l(r);function r(e){var n;return s(this,r),(n=t.call(this,h,"effectiveInputPolicy")).id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),g=function(e){c(r,i.XFAObject);var t=l(r);function r(e){var n;return s(this,r),(n=t.call(this,h,"effectiveOutputPolicy")).id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),m=function(e){c(r,i.StringObject);var t=l(r);function r(e){var n;return s(this,r),(n=t.call(this,h,"operation")).id=e.id||"",n.input=e.input||"",n.name=e.name||"",n.output=e.output||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),v=function(e){c(r,i.StringObject);var t=l(r);function r(e){var n;return s(this,r),(n=t.call(this,h,"rootElement")).id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),y=function(e){c(r,i.StringObject);var t=l(r);function r(e){var n;return s(this,r),(n=t.call(this,h,"soapAction")).id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),b=function(e){c(r,i.StringObject);var t=l(r);function r(e){var n;return s(this,r),(n=t.call(this,h,"soapAddress")).id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),w=function(e){c(r,i.StringObject);var t=l(r);function r(e){var n;return s(this,r),(n=t.call(this,h,"uri")).id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),k=function(e){c(r,i.StringObject);var t=l(r);function r(e){var n;return s(this,r),(n=t.call(this,h,"wsdlAddress")).id=e.id||"",n.name=e.name||"",n.use=e.use||"",n.usehref=e.usehref||"",n}return r}(),S=function(e){c(r,i.XFAObject);var t=l(r);function r(e){var n;return s(this,r),(n=t.call(this,h,"wsdlConnection",!0)).dataDescription=e.dataDescription||"",n.name=e.name||"",n.effectiveInputPolicy=null,n.effectiveOutputPolicy=null,n.operation=null,n.soapAction=null,n.soapAddress=null,n.wsdlAddress=null,n}return r}(),x=function(e){c(r,i.XFAObject);var t=l(r);function r(e){var n;return s(this,r),(n=t.call(this,h,"xmlConnection",!0)).dataDescription=e.dataDescription||"",n.name=e.name||"",n.uri=null,n}return r}(),A=function(e){c(r,i.XFAObject);var t=l(r);function r(e){var n;return s(this,r),(n=t.call(this,h,"xsdConnection",!0)).dataDescription=e.dataDescription||"",n.name=e.name||"",n.rootElement=null,n.uri=null,n}return r}(),O=function(){function e(){s(this,e)}var t,r,n;return t=e,r=null,n=[{key:a.$buildXFAObject,value:function(t,r){if(e.hasOwnProperty(t))return e[t](r)}},{key:"connectionSet",value:function(e){return new d(e)}},{key:"effectiveInputPolicy",value:function(e){return new p(e)}},{key:"effectiveOutputPolicy",value:function(e){return new g(e)}},{key:"operation",value:function(e){return new m(e)}},{key:"rootElement",value:function(e){return new v(e)}},{key:"soapAction",value:function(e){return new y(e)}},{key:"soapAddress",value:function(e){return new b(e)}},{key:"uri",value:function(e){return new w(e)}},{key:"wsdlAddress",value:function(e){return new k(e)}},{key:"wsdlConnection",value:function(e){return new S(e)}},{key:"xmlConnection",value:function(e){return new x(e)}},{key:"xsdConnection",value:function(e){return new A(e)}}],r&&o(t.prototype,r),n&&o(t,n),e}();t.ConnectionSetNamespace=O},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.DatasetsNamespace=void 0;var a=r(176),i=r(178);function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=h(e);if(t){var i=h(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=i.NamespaceIds.datasets.id,p=function(e){u(r,a.XmlObject);var t=f(r);function r(e){return c(this,r),t.call(this,d,"data",e)}return r}(),g=function(e){u(r,a.XFAObject);var t=f(r);function r(e){var n;return c(this,r),(n=t.call(this,d,"datasets",!0)).data=null,n.Signature=null,n}return s(r,[{key:a.$onChild,value:function(e){var t=e[a.$nodeName];"data"===t&&e[a.$namespaceId]===d||"Signature"===t&&e[a.$namespaceId]===i.NamespaceIds.signature.id?this[t]=e:e[a.$global]=!0,this[a.$appendChild](e)}}]),r}(),m=function(){function e(){c(this,e)}return s(e,null,[{key:i.$buildXFAObject,value:function(t,r){if(e.hasOwnProperty(t))return e[t](r)}},{key:"datasets",value:function(e){return new g(e)}},{key:"data",value:function(e){return new p(e)}}]),e}();t.DatasetsNamespace=m},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.LocaleSetNamespace=void 0;var a=r(178),i=r(176),o=r(177);function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=h(e);if(t){var i=h(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=a.NamespaceIds.localeSet.id,p=function(e){u(r,i.XFAObject);var t=f(r);function r(e){var n;return c(this,r),(n=t.call(this,d,"calendarSymbols",!0)).name="gregorian",n.dayNames=new i.XFAObjectArray(2),n.eraNames=null,n.meridiemNames=null,n.monthNames=new i.XFAObjectArray(2),n}return r}(),g=function(e){u(r,i.StringObject);var t=f(r);function r(e){var n;return c(this,r),(n=t.call(this,d,"currencySymbol")).name=(0,o.getStringOption)(e.name,["symbol","isoname","decimal"]),n}return r}(),m=function(e){u(r,i.XFAObject);var t=f(r);function r(e){var n;return c(this,r),(n=t.call(this,d,"currencySymbols",!0)).currencySymbol=new i.XFAObjectArray(3),n}return r}(),v=function(e){u(r,i.StringObject);var t=f(r);function r(e){var n;return c(this,r),(n=t.call(this,d,"datePattern")).name=(0,o.getStringOption)(e.name,["full","long","med","short"]),n}return r}(),y=function(e){u(r,i.XFAObject);var t=f(r);function r(e){var n;return c(this,r),(n=t.call(this,d,"datePatterns",!0)).datePattern=new i.XFAObjectArray(4),n}return r}(),b=function(e){u(r,i.ContentObject);var t=f(r);function r(e){return c(this,r),t.call(this,d,"dateTimeSymbols")}return r}(),w=function(e){u(r,i.StringObject);var t=f(r);function r(e){return c(this,r),t.call(this,d,"day")}return r}(),k=function(e){u(r,i.XFAObject);var t=f(r);function r(e){var n;return c(this,r),(n=t.call(this,d,"dayNames",!0)).abbr=(0,o.getInteger)({data:e.abbr,defaultValue:0,validate:function(e){return 1===e}}),n.day=new i.XFAObjectArray(7),n}return r}(),S=function(e){u(r,i.StringObject);var t=f(r);function r(e){return c(this,r),t.call(this,d,"era")}return r}(),x=function(e){u(r,i.XFAObject);var t=f(r);function r(e){var n;return c(this,r),(n=t.call(this,d,"eraNames",!0)).era=new i.XFAObjectArray(2),n}return r}(),A=function(e){u(r,i.XFAObject);var t=f(r);function r(e){var n;return c(this,r),(n=t.call(this,d,"locale",!0)).desc=e.desc||"",n.name="isoname",n.calendarSymbols=null,n.currencySymbols=null,n.datePatterns=null,n.dateTimeSymbols=null,n.numberPatterns=null,n.numberSymbols=null,n.timePatterns=null,n.typeFaces=null,n}return r}(),O=function(e){u(r,i.XFAObject);var t=f(r);function r(e){var n;return c(this,r),(n=t.call(this,d,"localeSet",!0)).locale=new i.XFAObjectArray,n}return r}(),C=function(e){u(r,i.StringObject);var t=f(r);function r(e){return c(this,r),t.call(this,d,"meridiem")}return r}(),T=function(e){u(r,i.XFAObject);var t=f(r);function r(e){var n;return c(this,r),(n=t.call(this,d,"meridiemNames",!0)).meridiem=new i.XFAObjectArray(2),n}return r}(),F=function(e){u(r,i.StringObject);var t=f(r);function r(e){return c(this,r),t.call(this,d,"month")}return r}(),_=function(e){u(r,i.XFAObject);var t=f(r);function r(e){var n;return c(this,r),(n=t.call(this,d,"monthNames",!0)).abbr=(0,o.getInteger)({data:e.abbr,defaultValue:0,validate:function(e){return 1===e}}),n.month=new i.XFAObjectArray(12),n}return r}(),P=function(e){u(r,i.StringObject);var t=f(r);function r(e){var n;return c(this,r),(n=t.call(this,d,"numberPattern")).name=(0,o.getStringOption)(e.name,["full","long","med","short"]),n}return r}(),I=function(e){u(r,i.XFAObject);var t=f(r);function r(e){var n;return c(this,r),(n=t.call(this,d,"numberPatterns",!0)).numberPattern=new i.XFAObjectArray(4),n}return r}(),E=function(e){u(r,i.StringObject);var t=f(r);function r(e){var n;return c(this,r),(n=t.call(this,d,"numberSymbol")).name=(0,o.getStringOption)(e.name,["decimal","grouping","percent","minus","zero"]),n}return r}(),j=function(e){u(r,i.XFAObject);var t=f(r);function r(e){var n;return c(this,r),(n=t.call(this,d,"numberSymbols",!0)).numberSymbol=new i.XFAObjectArray(5),n}return r}(),R=function(e){u(r,i.StringObject);var t=f(r);function r(e){var n;return c(this,r),(n=t.call(this,d,"timePattern")).name=(0,o.getStringOption)(e.name,["full","long","med","short"]),n}return r}(),M=function(e){u(r,i.XFAObject);var t=f(r);function r(e){var n;return c(this,r),(n=t.call(this,d,"timePatterns",!0)).timePattern=new i.XFAObjectArray(4),n}return r}(),N=function(e){u(r,i.XFAObject);var t=f(r);function r(e){var n;return c(this,r),(n=t.call(this,d,"typeFace",!0)).name=""|e.name,n}return r}(),B=function(e){u(r,i.XFAObject);var t=f(r);function r(e){var n;return c(this,r),(n=t.call(this,d,"typeFaces",!0)).typeFace=new i.XFAObjectArray,n}return r}(),D=function(){function e(){c(this,e)}var t,r,n;return t=e,r=null,n=[{key:a.$buildXFAObject,value:function(t,r){if(e.hasOwnProperty(t))return e[t](r)}},{key:"calendarSymbols",value:function(e){return new p(e)}},{key:"currencySymbol",value:function(e){return new g(e)}},{key:"currencySymbols",value:function(e){return new m(e)}},{key:"datePattern",value:function(e){return new v(e)}},{key:"datePatterns",value:function(e){return new y(e)}},{key:"dateTimeSymbols",value:function(e){return new b(e)}},{key:"day",value:function(e){return new w(e)}},{key:"dayNames",value:function(e){return new k(e)}},{key:"era",value:function(e){return new S(e)}},{key:"eraNames",value:function(e){return new x(e)}},{key:"locale",value:function(e){return new A(e)}},{key:"localeSet",value:function(e){return new O(e)}},{key:"meridiem",value:function(e){return new C(e)}},{key:"meridiemNames",value:function(e){return new T(e)}},{key:"month",value:function(e){return new F(e)}},{key:"monthNames",value:function(e){return new _(e)}},{key:"numberPattern",value:function(e){return new P(e)}},{key:"numberPatterns",value:function(e){return new I(e)}},{key:"numberSymbol",value:function(e){return new E(e)}},{key:"numberSymbols",value:function(e){return new j(e)}},{key:"timePattern",value:function(e){return new R(e)}},{key:"timePatterns",value:function(e){return new M(e)}},{key:"typeFace",value:function(e){return new N(e)}},{key:"typeFaces",value:function(e){return new B(e)}}],r&&s(t.prototype,r),n&&s(t,n),e}();t.LocaleSetNamespace=D},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureNamespace=void 0;var a=r(178),i=r(176);function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=a.NamespaceIds.signature.id,h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(r,i.XFAObject);var t=u(r);function r(e){return s(this,r),t.call(this,f,"signature",!0)}return r}(),d=function(){function e(){s(this,e)}var t,r,n;return t=e,r=null,n=[{key:a.$buildXFAObject,value:function(t,r){if(e.hasOwnProperty(t))return e[t](r)}},{key:"signature",value:function(e){return new h(e)}}],r&&o(t.prototype,r),n&&o(t,n),e}();t.SignatureNamespace=d},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.StylesheetNamespace=void 0;var a=r(178),i=r(176);function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=a.NamespaceIds.stylesheet.id,h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(r,i.XFAObject);var t=u(r);function r(e){return s(this,r),t.call(this,f,"stylesheet",!0)}return r}(),d=function(){function e(){s(this,e)}var t,r,n;return t=e,r=null,n=[{key:a.$buildXFAObject,value:function(t,r){if(e.hasOwnProperty(t))return e[t](r)}},{key:"stylesheet",value:function(e){return new h(e)}}],r&&o(t.prototype,r),n&&o(t,n),e}();t.StylesheetNamespace=d},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.XdpNamespace=void 0;var a=r(178),i=r(176);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),e}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=f(e);if(t){var i=f(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=a.NamespaceIds.xdp.id,d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(r,i.XFAObject);var t=l(r);function r(e){var n;return o(this,r),(n=t.call(this,h,"xdp",!0)).uuid=e.uuid||"",n.timeStamp=e.timeStamp||"",n.config=null,n.connectionSet=null,n.datasets=null,n.localeSet=null,n.stylesheet=new i.XFAObjectArray,n.template=null,n}return c(r,[{key:i.$onChildCheck,value:function(e){var t=a.NamespaceIds[e[i.$nodeName]];return t&&e[i.$namespaceId]===t.id}}]),r}(),p=function(){function e(){o(this,e)}return c(e,null,[{key:a.$buildXFAObject,value:function(t,r){if(e.hasOwnProperty(t))return e[t](r)}},{key:"xdp",value:function(e){return new d(e)}}]),e}();t.XdpNamespace=p},(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.XhtmlNamespace=void 0;var a=r(176),i=r(178),o=r(181),s=r(177);function c(e,t,r){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(r):a.value}})(e,t,r||e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,a=g(e);if(t){var i=g(this).constructor;r=Reflect.construct(a,arguments,i)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,t)||v(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b=i.NamespaceIds.xhtml.id,w=new Set(["color","font","font-family","font-size","font-stretch","font-style","font-weight","margin","margin-bottom","margin-left","margin-right","margin-top","letter-spacing","line-height","orphans","page-break-after","page-break-before","page-break-inside","tab-interval","tab-stop","text-align","text-decoration","text-indent","vertical-align","widows","kerning-mode","xfa-font-horizontal-scale","xfa-font-vertical-scale","xfa-spacerun","xfa-tab-stops"]),k=new Map([["page-break-after","breakAfter"],["page-break-before","breakBefore"],["page-break-inside","breakInside"],["kerning-mode",function(e){return"none"===e?"none":"normal"}],["xfa-font-horizontal-scale",function(e){return"scaleX(".concat(Math.max(0,Math.min(parseInt(e)/100)).toFixed(2),")")}],["xfa-font-vertical-scale",function(e){return"scaleY(".concat(Math.max(0,Math.min(parseInt(e)/100)).toFixed(2),")")}],["xfa-spacerun",""],["xfa-tab-stops",""],["font-size",function(e){return(0,o.measureToString)(1*(0,s.getMeasurement)(e))}],["letter-spacing",function(e){return(0,o.measureToString)((0,s.getMeasurement)(e))}],["line-height",function(e){return(0,o.measureToString)(.99*(0,s.getMeasurement)(e))}],["margin",function(e){return(0,o.measureToString)((0,s.getMeasurement)(e))}],["margin-bottom",function(e){return(0,o.measureToString)((0,s.getMeasurement)(e))}],["margin-left",function(e){return(0,o.measureToString)((0,s.getMeasurement)(e))}],["margin-right",function(e){return(0,o.measureToString)((0,s.getMeasurement)(e))}],["margin-top",function(e){return(0,o.measureToString)((0,s.getMeasurement)(e))}],["text-indent",function(e){return(0,o.measureToString)((0,s.getMeasurement)(e))}],["font-family",function(e){return(0,o.getFonts)(e)}]]),S=/\s+/g,x=/[\r\n]+/g;function A(e){var t=Object.create(null);if(!e)return t;var r,n=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=v(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}(e.split(";").map(function(e){return e.split(":",2)}));try{for(n.s();!(r=n.n()).done;){var a=m(r.value,2),i=a[0],s=a[1],c=k.get(i);if(""!==c){var u=s;c&&(u="string"==typeof c?c:c(s)),i.endsWith("scale")?t.transform?t.transform="".concat(t[i]," ").concat(u):t.transform=u:t[i.replaceAll(/-([a-zA-Z])/g,function(e,t){return t.toUpperCase()})]=u}}}catch(e){n.e(e)}finally{n.f()}return(0,o.fixTextIndent)(t),t}var O=new Set(["body","html"]),C=function(e){h(r,a.XmlObject);var t=p(r);function r(e,n){var a,i;return u(this,r),(a=t.call(this,b,n)).style=(i=e.style)?i.trim().split(/\s*;\s*/).filter(function(e){return!!e}).map(function(e){return e.split(/\s*:\s*/,2)}).filter(function(e){var t=m(e,1)[0];return w.has(t)}).map(function(e){return e.join(":")}).join(";"):"",a}return f(r,[{key:a.$acceptWhitespace,value:function(){return!O.has(this[a.$nodeName])}},{key:a.$onText,value:function(e){e=e.replace(x,""),this.style.includes("xfa-spacerun:yes")||(e=e.replace(S," ")),e&&(this[a.$content]+=e)}},{key:a.$toHTML,value:function(e){var t=[];return this[a.$extra]={children:t},this[a.$childrenToHTML]({}),0!==t.length||this[a.$content]?s.HTMLResult.success({name:this[a.$nodeName],attributes:{href:this.href,style:A(this.style)},children:t,value:this[a.$content]||""}):s.HTMLResult.EMPTY}}]),r}(),T=function(e){h(r,C);var t=p(r);function r(e){var n;return u(this,r),(n=t.call(this,e,"a")).href=e.href||"",n}return r}(),F=function(e){h(r,C);var t=p(r);function r(e){return u(this,r),t.call(this,e,"b")}return r}(),_=function(e){h(r,C);var t=p(r);function r(e){return u(this,r),t.call(this,e,"body")}return f(r,[{key:a.$toHTML,value:function(e){var t=c(g(r.prototype),a.$toHTML,this).call(this,e),n=t.html;return n?(n.name="div",n.attributes.class="xfaRich",t):s.HTMLResult.EMPTY}}]),r}(),P=function(e){h(r,C);var t=p(r);function r(e){return u(this,r),t.call(this,e,"br")}return f(r,[{key:a.$text,value:function(){return"\n"}},{key:a.$toHTML,value:function(e){return s.HTMLResult.success({name:"br"})}}]),r}(),I=function(e){h(r,C);var t=p(r);function r(e){return u(this,r),t.call(this,e,"html")}return f(r,[{key:a.$toHTML,value:function(e){var t=[];if(this[a.$extra]={children:t},this[a.$childrenToHTML]({}),0===t.length)return s.HTMLResult.success({name:"div",attributes:{class:"xfaRich",style:{}},value:this[a.$content]||""});if(1===t.length){var r=t[0];if(r.attributes&&"xfaRich"===r.attributes.class)return s.HTMLResult.success(r)}return s.HTMLResult.success({name:"div",attributes:{class:"xfaRich",style:{}},children:t})}}]),r}(),E=function(e){h(r,C);var t=p(r);function r(e){return u(this,r),t.call(this,e,"i")}return r}(),j=function(e){h(r,C);var t=p(r);function r(e){return u(this,r),t.call(this,e,"li")}return r}(),R=function(e){h(r,C);var t=p(r);function r(e){return u(this,r),t.call(this,e,"ol")}return r}(),M=function(e){h(r,C);var t=p(r);function r(e){return u(this,r),t.call(this,e,"p")}return f(r,[{key:a.$text,value:function(){return c(g(r.prototype),a.$text,this).call(this)+"\n"}}]),r}(),N=function(e){h(r,C);var t=p(r);function r(e){return u(this,r),t.call(this,e,"span")}return r}(),B=function(e){h(r,C);var t=p(r);function r(e){return u(this,r),t.call(this,e,"sub")}return r}(),D=function(e){h(r,C);var t=p(r);function r(e){return u(this,r),t.call(this,e,"sup")}return r}(),L=function(e){h(r,C);var t=p(r);function r(e){return u(this,r),t.call(this,e,"ul")}return r}(),U=function(){function e(){u(this,e)}return f(e,null,[{key:i.$buildXFAObject,value:function(t,r){if(e.hasOwnProperty(t))return e[t](r)}},{key:"a",value:function(e){return new T(e)}},{key:"b",value:function(e){return new F(e)}},{key:"body",value:function(e){return new _(e)}},{key:"br",value:function(e){return new P(e)}},{key:"html",value:function(e){return new I(e)}},{key:"i",value:function(e){return new E(e)}},{key:"li",value:function(e){return new j(e)}},{key:"ol",value:function(e){return new R(e)}},{key:"p",value:function(e){return new M(e)}},{key:"span",value:function(e){return new N(e)}},{key:"sub",value:function(e){return new B(e)}},{key:"sup",value:function(e){return new D(e)}},{key:"ul",value:function(e){return new L(e)}}]),e}();t.XhtmlNamespace=U},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownNamespace=void 0;var n=r(178),a=r(176);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.namespaceId=t}var t,r,o;return t=e,(r=[{key:n.$buildXFAObject,value:function(e,t){return new a.XmlObject(this.namespaceId,e,t)}}])&&i(t.prototype,r),o&&i(t,o),e}();t.UnknownNamespace=o},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XRef=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),a=r(4),i=r(113),o=r(125),s=r(117),c=r(173);function u(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function l(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(e){u(i,n,a,o,s,"next",e)}function s(e){u(i,n,a,o,s,"throw",e)}o(void 0)})}}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var h=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.stream=t,this.pdfManager=r,this.entries=[],this.xrefstms=Object.create(null),this._cacheMap=new Map,this.stats={streamTypes:Object.create(null),fontTypes:Object.create(null)},this._newRefNum=null}var t,r,u;return t=e,(r=[{key:"getNewRef",value:function(){return null===this._newRefNum&&(this._newRefNum=this.entries.length),i.Ref.get(this._newRefNum++,0)}},{key:"resetNewRef",value:function(){this._newRefNum=null}},{key:"setStartXRef",value:function(e){this.startXRefQueue=[e]}},{key:"parse",value:function(){var e,t,r,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];n?((0,a.warn)("Indexing all PDF objects"),e=this.indexObjects()):e=this.readXRef(),e.assignXref(this),this.trailer=e;try{t=e.get("Encrypt")}catch(e){if(e instanceof s.MissingDataException)throw e;(0,a.warn)('XRef.parse - Invalid "Encrypt" reference: "'.concat(e,'".'))}if((0,i.isDict)(t)){var o=e.get("ID"),u=o&&o.length?o[0]:"";t.suppressEncryption=!0,this.encrypt=new c.CipherTransformFactory(t,u,this.pdfManager.password)}try{r=e.get("Root")}catch(e){if(e instanceof s.MissingDataException)throw e;(0,a.warn)('XRef.parse - Invalid "Root" reference: "'.concat(e,'".'))}if(!(0,i.isDict)(r)||!r.has("Pages")){if(!n)throw new s.XRefParseException;throw new a.FormatError("Invalid root reference")}this.root=r}},{key:"processXRefTable",value:function(e){"tableState"in this||(this.tableState={entryNum:0,streamPos:e.lexer.stream.pos,parserBuf1:e.buf1,parserBuf2:e.buf2});var t=this.readXRefTable(e);if(!(0,i.isCmd)(t,"trailer"))throw new a.FormatError("Invalid XRef table: could not find trailer dictionary");var r=e.getObj();if(!(0,i.isDict)(r)&&r.dict&&(r=r.dict),!(0,i.isDict)(r))throw new a.FormatError("Invalid XRef table: could not parse trailer dictionary");return delete this.tableState,r}},{key:"readXRefTable",value:function(e){var t,r=e.lexer.stream,n=this.tableState;for(r.pos=n.streamPos,e.buf1=n.parserBuf1,e.buf2=n.parserBuf2;;){if(!("firstEntryNum"in n&&"entryCount"in n)){if((0,i.isCmd)(t=e.getObj(),"trailer"))break;n.firstEntryNum=t,n.entryCount=e.getObj()}var o=n.firstEntryNum,s=n.entryCount;if(!Number.isInteger(o)||!Number.isInteger(s))throw new a.FormatError("Invalid XRef table: wrong types in subsection header");for(var c=n.entryNum;c<s;c++){n.streamPos=r.pos,n.entryNum=c,n.parserBuf1=e.buf1,n.parserBuf2=e.buf2;var u={};u.offset=e.getObj(),u.gen=e.getObj();var l=e.getObj();if(l instanceof i.Cmd)switch(l.cmd){case"f":u.free=!0;break;case"n":u.uncompressed=!0}if(!Number.isInteger(u.offset)||!Number.isInteger(u.gen)||!u.free&&!u.uncompressed)throw new a.FormatError("Invalid entry in XRef subsection: ".concat(o,", ").concat(s));0===c&&u.free&&1===o&&(o=0),this.entries[c+o]||(this.entries[c+o]=u)}n.entryNum=0,n.streamPos=r.pos,n.parserBuf1=e.buf1,n.parserBuf2=e.buf2,delete n.firstEntryNum,delete n.entryCount}if(this.entries[0]&&!this.entries[0].free)throw new a.FormatError("Invalid XRef table: unexpected first object");return t}},{key:"processXRefStream",value:function(e){if(!("streamState"in this)){var t=e.dict,r=t.get("W"),n=t.get("Index");n||(n=[0,t.get("Size")]),this.streamState={entryRanges:n,byteWidths:r,entryNum:0,streamPos:e.pos}}return this.readXRefStream(e),delete this.streamState,e.dict}},{key:"readXRefStream",value:function(e){var t,r,n=this.streamState;e.pos=n.streamPos;for(var i=n.byteWidths,o=i[0],s=i[1],c=i[2],u=n.entryRanges;u.length>0;){var l=u[0],f=u[1];if(!Number.isInteger(l)||!Number.isInteger(f))throw new a.FormatError("Invalid XRef range fields: ".concat(l,", ").concat(f));if(!Number.isInteger(o)||!Number.isInteger(s)||!Number.isInteger(c))throw new a.FormatError("Invalid XRef entry fields length: ".concat(l,", ").concat(f));for(t=n.entryNum;t<f;++t){n.entryNum=t,n.streamPos=e.pos;var h=0,d=0,p=0;for(r=0;r<o;++r)h=h<<8|e.getByte();for(0===o&&(h=1),r=0;r<s;++r)d=d<<8|e.getByte();for(r=0;r<c;++r)p=p<<8|e.getByte();var g={};switch(g.offset=d,g.gen=p,h){case 0:g.free=!0;break;case 1:g.uncompressed=!0;break;case 2:break;default:throw new a.FormatError("Invalid XRef entry type: ".concat(h))}this.entries[l+t]||(this.entries[l+t]=g)}n.entryNum=0,n.streamPos=e.pos,u.splice(0,2)}}},{key:"indexObjects",value:function(){var e=10,t=13,r=60;function n(n,a){for(var i="",o=n[a];o!==e&&o!==t&&o!==r&&!(++a>=n.length);)i+=String.fromCharCode(o),o=n[a];return i}function s(e,t,r){for(var n=r.length,a=e.length,i=0;t<a;){for(var o=0;o<n&&e[t+o]===r[o];)++o;if(o>=n)break;t++,i++}return i}var c=/^(\d+)\s+(\d+)\s+obj\b/,u=/\bendobj[\b\s]$/,l=/\s+(\d+\s+\d+\s+obj[\b\s<])$/,f=new Uint8Array([116,114,97,105,108,101,114]),h=new Uint8Array([115,116,97,114,116,120,114,101,102]),d=new Uint8Array([111,98,106]),p=new Uint8Array([47,88,82,101,102]);this.entries.length=0;var g=this.stream;g.pos=0;for(var m,v=g.getBytes(),y=v.length,b=g.start,w=[],k=[];b<y;){var S=v[b];if(9!==S&&S!==e&&S!==t&&32!==S)if(37!==S){var x=n(v,b),A=void 0;if(x.startsWith("xref")&&(4===x.length||/\s/.test(x[4])))b+=s(v,b,f),w.push(b),b+=s(v,b,h);else if(A=c.exec(x)){var O=0|A[1],C=0|A[2];this.entries[O]&&this.entries[O].gen!==C||(this.entries[O]={offset:b-g.start,gen:C,uncompressed:!0});for(var T=void 0,F=b+x.length;F<v.length;){var _=F+s(v,F,d)+4;T=_-b;var P=Math.max(_-25,F),I=(0,a.bytesToString)(v.subarray(P,_));if(u.test(I))break;var E=l.exec(I);if(E&&E[1]){(0,a.warn)('indexObjects: Found new "obj" inside of another "obj", caused by missing "endobj" -- trying to recover.'),T-=E[1].length;break}F=_}var j=v.subarray(b,b+T),R=s(j,0,p);R<T&&j[R+5]<64&&(k.push(b-g.start),this.xrefstms[b-g.start]=1),b+=T}else x.startsWith("trailer")&&(7===x.length||/\s/.test(x[7]))?(w.push(b),b+=s(v,b,h)):b+=x.length+1}else do{if(++b>=y)break;S=v[b]}while(S!==e&&S!==t);else++b}for(var M=0,N=k.length;M<N;++M)this.startXRefQueue.push(k[M]),this.readXRef(!0);for(var B=0,D=w.length;B<D;++B){g.pos=w[B];var L=new o.Parser({lexer:new o.Lexer(g),xref:this,allowStreams:!0,recoveryMode:!0}),U=L.getObj();if((0,i.isCmd)(U,"trailer")){var q=L.getObj();if((0,i.isDict)(q)){try{var X=q.get("Root");if(!(X instanceof i.Dict))continue;var H=X.get("Pages");if(!(H instanceof i.Dict))continue;var $=H.get("Count");if(!Number.isInteger($))continue}catch(e){continue}if(q.has("ID"))return q;m=q}}}if(m)return m;throw new a.InvalidPDFException("Invalid PDF structure.")}},{key:"readXRef",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.stream,r=new Set;try{for(;this.startXRefQueue.length;){var n=this.startXRefQueue[0];if(r.has(n))(0,a.warn)("readXRef - skipping XRef table since it was already parsed."),this.startXRefQueue.shift();else{r.add(n),t.pos=n+t.start;var c=new o.Parser({lexer:new o.Lexer(t),xref:this,allowStreams:!0}),u=c.getObj(),l=void 0;if((0,i.isCmd)(u,"xref")){if(l=this.processXRefTable(c),this.topDict||(this.topDict=l),u=l.get("XRefStm"),Number.isInteger(u)){var f=u;f in this.xrefstms||(this.xrefstms[f]=1,this.startXRefQueue.push(f))}}else{if(!Number.isInteger(u))throw new a.FormatError("Invalid XRef stream header");if(!Number.isInteger(c.getObj())||!(0,i.isCmd)(c.getObj(),"obj")||!(0,i.isStream)(u=c.getObj()))throw new a.FormatError("Invalid XRef stream");if(l=this.processXRefStream(u),this.topDict||(this.topDict=l),!l)throw new a.FormatError("Failed to read XRef stream")}u=l.get("Prev"),Number.isInteger(u)?this.startXRefQueue.push(u):(0,i.isRef)(u)&&this.startXRefQueue.push(u.num),this.startXRefQueue.shift()}}return this.topDict}catch(e){if(e instanceof s.MissingDataException)throw e;(0,a.info)("(while reading XRef): "+e)}if(!e)throw new s.XRefParseException}},{key:"getEntry",value:function(e){var t=this.entries[e];return t&&!t.free&&t.offset?t:null}},{key:"fetchIfRef",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e instanceof i.Ref?this.fetch(e,t):e}},{key:"fetch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(e instanceof i.Ref))throw new Error("ref object is not a reference");var r=e.num,n=this._cacheMap.get(r);if(void 0!==n)return n instanceof i.Dict&&!n.objId&&(n.objId=e.toString()),n;var a=this.getEntry(r);return null===a?(this._cacheMap.set(r,a),a):(a=a.uncompressed?this.fetchUncompressed(e,a,t):this.fetchCompressed(e,a,t),(0,i.isDict)(a)?a.objId=e.toString():(0,i.isStream)(a)&&(a.dict.objId=e.toString()),a)}},{key:"fetchUncompressed",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e.gen,a=e.num;if(t.gen!==n)throw new s.XRefEntryException("Inconsistent generation in XRef: ".concat(e));var c=this.stream.makeSubStream(t.offset+this.stream.start),u=new o.Parser({lexer:new o.Lexer(c),xref:this,allowStreams:!0}),l=u.getObj(),f=u.getObj(),h=u.getObj();if(l!==a||f!==n||!(h instanceof i.Cmd))throw new s.XRefEntryException("Bad (uncompressed) XRef entry: ".concat(e));if("obj"!==h.cmd){if(h.cmd.startsWith("obj")&&(a=parseInt(h.cmd.substring(3),10),!Number.isNaN(a)))return a;throw new s.XRefEntryException("Bad (uncompressed) XRef entry: ".concat(e))}return t=this.encrypt&&!r?u.getObj(this.encrypt.createCipherTransform(a,n)):u.getObj(),(0,i.isStream)(t)||this._cacheMap.set(a,t),t}},{key:"fetchCompressed",value:function(e,t){arguments.length>2&&void 0!==arguments[2]&&arguments[2];var r=t.offset,n=this.fetch(i.Ref.get(r,0));if(!(0,i.isStream)(n))throw new a.FormatError("bad ObjStm stream");var c=n.dict.get("First"),u=n.dict.get("N");if(!Number.isInteger(c)||!Number.isInteger(u))throw new a.FormatError("invalid first and n parameters for ObjStm stream");for(var l=new o.Parser({lexer:new o.Lexer(n),xref:this,allowStreams:!0}),f=new Array(u),h=new Array(u),d=0;d<u;++d){var p=l.getObj();if(!Number.isInteger(p))throw new a.FormatError("invalid object number in the ObjStm stream: ".concat(p));var g=l.getObj();if(!Number.isInteger(g))throw new a.FormatError("invalid object offset in the ObjStm stream: ".concat(g));f[d]=p,h[d]=g}for(var m=(n.start||0)+c,v=new Array(u),y=0;y<u;++y){var b=y<u-1?h[y+1]-h[y]:void 0;if(b<0)throw new a.FormatError("Invalid offset in the ObjStm stream.");var w=(l=new o.Parser({lexer:new o.Lexer(n.makeSubStream(m+h[y],b,n.dict)),xref:this,allowStreams:!0})).getObj();if(v[y]=w,!(0,i.isStream)(w)){var k=f[y],S=this.entries[k];S&&S.offset===r&&S.gen===y&&this._cacheMap.set(k,w)}}if(void 0===(t=v[t.gen]))throw new s.XRefEntryException("Bad (compressed) XRef entry: ".concat(e));return t}},{key:"fetchIfRefAsync",value:function(){var e=l(n.default.mark(function e(t,r){return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t instanceof i.Ref)){e.next=2;break}return e.abrupt("return",this.fetchAsync(t,r));case 2:return e.abrupt("return",t);case 3:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"fetchAsync",value:function(){var e=l(n.default.mark(function e(t,r){return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.abrupt("return",this.fetch(t,r));case 4:if(e.prev=4,e.t0=e.catch(0),e.t0 instanceof s.MissingDataException){e.next=8;break}throw e.t0;case 8:return e.next=10,this.pdfManager.requestRange(e.t0.begin,e.t0.end);case 10:return e.abrupt("return",this.fetchAsync(t,r));case 11:case"end":return e.stop()}},e,this,[[0,4]])}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getCatalogObj",value:function(){return this.root}}])&&f(t.prototype,r),u&&f(t,u),e}();t.XRef=h},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),a=r(4);function i(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var c={UNKNOWN:0,DATA:1,ERROR:2},u=1,l=2,f=3,h=4,d=5,p=6,g=7,m=8;function v(e){if("object"!==s(e)||null===e)return e;switch(e.name){case"AbortException":return new a.AbortException(e.message);case"MissingPDFException":return new a.MissingPDFException(e.message);case"UnexpectedResponseException":return new a.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new a.UnknownErrorException(e.message,e.details);default:return new a.UnknownErrorException(e.message,e.toString())}}var y=function(){function e(t,r,n){var a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourceName=t,this.targetName=r,this.comObj=n,this.callbackId=1,this.streamId=1,this.postMessageTransfers=!0,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=function(e){var t=e.data;if(t.targetName===a.sourceName)if(t.stream)a._processStreamMessage(t);else if(t.callback){var r=t.callbackId,i=a.callbackCapabilities[r];if(!i)throw new Error("Cannot resolve callback ".concat(r));if(delete a.callbackCapabilities[r],t.callback===c.DATA)i.resolve(t.data);else{if(t.callback!==c.ERROR)throw new Error("Unexpected callback case");i.reject(v(t.reason))}}else{var o=a.actionHandler[t.action];if(!o)throw new Error("Unknown action from worker: ".concat(t.action));if(t.callbackId){var s=a.sourceName,u=t.sourceName;new Promise(function(e){e(o(t.data))}).then(function(e){n.postMessage({sourceName:s,targetName:u,callback:c.DATA,callbackId:t.callbackId,data:e})},function(e){n.postMessage({sourceName:s,targetName:u,callback:c.ERROR,callbackId:t.callbackId,reason:v(e)})})}else t.streamId?a._createStreamSink(t):o(t.data)}},n.addEventListener("message",this._onComObjOnMessage)}var t,r,s;return t=e,(r=[{key:"on",value:function(e,t){var r=this.actionHandler;if(r[e])throw new Error('There is already an actionName called "'.concat(e,'"'));r[e]=t}},{key:"send",value:function(e,t,r){this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},r)}},{key:"sendWithPromise",value:function(e,t,r){var n=this.callbackId++,i=(0,a.createPromiseCapability)();this.callbackCapabilities[n]=i;try{this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:n,data:t},r)}catch(e){i.reject(e)}return i.promise}},{key:"sendWithStream",value:function(e,t,r,n){var i=this,o=this.streamId++,s=this.sourceName,c=this.targetName,l=this.comObj;return new ReadableStream({start:function(r){var u=(0,a.createPromiseCapability)();return i.streamControllers[o]={controller:r,startCall:u,pullCall:null,cancelCall:null,isClosed:!1},i._postMessage({sourceName:s,targetName:c,action:e,streamId:o,data:t,desiredSize:r.desiredSize},n),u.promise},pull:function(e){var t=(0,a.createPromiseCapability)();return i.streamControllers[o].pullCall=t,l.postMessage({sourceName:s,targetName:c,stream:p,streamId:o,desiredSize:e.desiredSize}),t.promise},cancel:function(e){(0,a.assert)(e instanceof Error,"cancel must have a valid reason");var t=(0,a.createPromiseCapability)();return i.streamControllers[o].cancelCall=t,i.streamControllers[o].isClosed=!0,l.postMessage({sourceName:s,targetName:c,stream:u,streamId:o,reason:v(e)}),t.promise}},r)}},{key:"_createStreamSink",value:function(e){var t=this,r=this.actionHandler[e.action],n=e.streamId,i=this.sourceName,o=e.sourceName,s=this.comObj,c={enqueue:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,s=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var c=this.desiredSize;this.desiredSize-=r,c>0&&this.desiredSize<=0&&(this.sinkCapability=(0,a.createPromiseCapability)(),this.ready=this.sinkCapability.promise),t._postMessage({sourceName:i,targetName:o,stream:h,streamId:n,chunk:e},s)}},close:function(){this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:i,targetName:o,stream:f,streamId:n}),delete t.streamSinks[n])},error:function(e){(0,a.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:i,targetName:o,stream:d,streamId:n,reason:v(e)}))},sinkCapability:(0,a.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};c.sinkCapability.resolve(),c.ready=c.sinkCapability.promise,this.streamSinks[n]=c,new Promise(function(t){t(r(e.data,c))}).then(function(){s.postMessage({sourceName:i,targetName:o,stream:m,streamId:n,success:!0})},function(e){s.postMessage({sourceName:i,targetName:o,stream:m,streamId:n,reason:v(e)})})}},{key:"_processStreamMessage",value:function(e){var t=e.streamId,r=this.sourceName,n=e.sourceName,i=this.comObj;switch(e.stream){case m:e.success?this.streamControllers[t].startCall.resolve():this.streamControllers[t].startCall.reject(v(e.reason));break;case g:e.success?this.streamControllers[t].pullCall.resolve():this.streamControllers[t].pullCall.reject(v(e.reason));break;case p:if(!this.streamSinks[t]){i.postMessage({sourceName:r,targetName:n,stream:g,streamId:t,success:!0});break}this.streamSinks[t].desiredSize<=0&&e.desiredSize>0&&this.streamSinks[t].sinkCapability.resolve(),this.streamSinks[t].desiredSize=e.desiredSize;var o=this.streamSinks[e.streamId].onPull;new Promise(function(e){e(o&&o())}).then(function(){i.postMessage({sourceName:r,targetName:n,stream:g,streamId:t,success:!0})},function(e){i.postMessage({sourceName:r,targetName:n,stream:g,streamId:t,reason:v(e)})});break;case h:if((0,a.assert)(this.streamControllers[t],"enqueue should have stream controller"),this.streamControllers[t].isClosed)break;this.streamControllers[t].controller.enqueue(e.chunk);break;case f:if((0,a.assert)(this.streamControllers[t],"close should have stream controller"),this.streamControllers[t].isClosed)break;this.streamControllers[t].isClosed=!0,this.streamControllers[t].controller.close(),this._deleteStreamController(t);break;case d:(0,a.assert)(this.streamControllers[t],"error should have stream controller"),this.streamControllers[t].controller.error(v(e.reason)),this._deleteStreamController(t);break;case l:e.success?this.streamControllers[t].cancelCall.resolve():this.streamControllers[t].cancelCall.reject(v(e.reason)),this._deleteStreamController(t);break;case u:if(!this.streamSinks[t])break;var s=this.streamSinks[e.streamId].onCancel;new Promise(function(t){t(s&&s(v(e.reason)))}).then(function(){i.postMessage({sourceName:r,targetName:n,stream:l,streamId:t,success:!0})},function(e){i.postMessage({sourceName:r,targetName:n,stream:l,streamId:t,reason:v(e)})}),this.streamSinks[t].sinkCapability.reject(v(e.reason)),this.streamSinks[t].isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}},{key:"_deleteStreamController",value:function(){var e,t=(e=n.default.mark(function e(t){return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.allSettled([this.streamControllers[t].startCall,this.streamControllers[t].pullCall,this.streamControllers[t].cancelCall].map(function(e){return e&&e.promise}));case 2:delete this.streamControllers[t];case 3:case"end":return e.stop()}},e,this)}),function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,c,"next",e)}function c(e){i(o,n,a,s,c,"throw",e)}s(void 0)})});return function(e){return t.apply(this,arguments)}}()},{key:"_postMessage",value:function(e,t){t&&this.postMessageTransfers?this.comObj.postMessage(e,t):this.comObj.postMessage(e)}},{key:"destroy",value:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}])&&o(t.prototype,r),s&&o(t,s),e}();t.MessageHandler=y},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFWorkerStream=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),a=r(4);function i(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function o(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,c,"next",e)}function c(e){i(o,n,a,s,c,"throw",e)}s(void 0)})}}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}var h=function(){function e(t){u(this,e),this._msgHandler=t,this._contentLength=null,this._fullRequestReader=null,this._rangeRequestReaders=[]}return f(e,[{key:"getFullReader",value:function(){return(0,a.assert)(!this._fullRequestReader,"PDFWorkerStream.getFullReader can only be called once."),this._fullRequestReader=new d(this._msgHandler),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){var r=new p(e,t,this._msgHandler);return this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t,r=s(this._rangeRequestReaders.slice(0));try{for(r.s();!(t=r.n()).done;){t.value.cancel(e)}}catch(e){r.e(e)}finally{r.f()}}}]),e}();t.PDFWorkerStream=h;var d=function(){function e(t){var r=this;u(this,e),this._msgHandler=t,this.onProgress=null,this._contentLength=null,this._isRangeSupported=!1,this._isStreamingSupported=!1;var n=this._msgHandler.sendWithStream("GetReader");this._reader=n.getReader(),this._headersReady=this._msgHandler.sendWithPromise("ReaderHeadersReady").then(function(e){r._isStreamingSupported=e.isStreamingSupported,r._isRangeSupported=e.isRangeSupported,r._contentLength=e.contentLength})}return f(e,[{key:"headersReady",get:function(){return this._headersReady}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"read",value:function(){var e=o(n.default.mark(function e(){var t,r;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._reader.read();case 2:if(t=e.sent,r=t.value,!t.done){e.next=7;break}return e.abrupt("return",{value:void 0,done:!0});case 7:return e.abrupt("return",{value:r.buffer,done:!1});case 8:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._reader.cancel(e)}}]),e}(),p=function(){function e(t,r,n){u(this,e),this._msgHandler=n,this.onProgress=null;var a=this._msgHandler.sendWithStream("GetRangeReader",{begin:t,end:r});this._reader=a.getReader()}return f(e,[{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:function(){var e=o(n.default.mark(function e(){var t,r;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._reader.read();case 2:if(t=e.sent,r=t.value,!t.done){e.next=7;break}return e.abrupt("return",{value:void 0,done:!0});case 7:return e.abrupt("return",{value:r.buffer,done:!1});case 8:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._reader.cancel(e)}}]),e}()}],t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.d=((e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}),r.o=((e,t)=>Object.prototype.hasOwnProperty.call(e,t)),r.r=(e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}),r.nmd=(e=>(e.paths=[],e.children||(e.children=[]),e));var n={};return(()=>{"use strict";var e=n;Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"WorkerMessageHandler",{enumerable:!0,get:function(){return t.WorkerMessageHandler}});var t=r(1)})(),n})()});
// iScroll v5.2.0-snapshot ~ (c) 2008-2017 Matteo Spinelli ~ http://cubiq.org/license

!function(n,r,d){var m=n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame||n.oRequestAnimationFrame||n.msRequestAnimationFrame||function(t){n.setTimeout(t,1e3/60)},f=function(){var e={},o=r.createElement("div").style,i=function(){for(var t=["t","webkitT","MozT","msT","OT"],i=0,s=t.length;i<s;i++)if(t[i]+"ransform"in o)return t[i].substr(0,t[i].length-1);return!1}();function t(t){return!1!==i&&(""===i?t:i+t.charAt(0).toUpperCase()+t.substr(1))}e.getTime=Date.now||function(){return(new Date).getTime()},e.extend=function(t,i){for(var s in i)t[s]=i[s]},e.addEvent=function(t,i,s,e){t.addEventListener(i,s,!!e)},e.removeEvent=function(t,i,s,e){t.removeEventListener(i,s,!!e)},e.prefixPointerEvent=function(t){return n.MSPointerEvent?"MSPointer"+t.charAt(7).toUpperCase()+t.substr(8):t},e.momentum=function(t,i,s,e,o,n){var r,h,a=t-i,l=d.abs(a)/s;return h=l/(n=void 0===n?6e-4:n),(r=t+l*l/(2*n)*(a<0?-1:1))<e?(r=o?e-o/2.5*(l/8):e,h=(a=d.abs(r-t))/l):0<r&&(r=o?o/2.5*(l/8):0,h=(a=d.abs(t)+r)/l),{destination:d.round(r),duration:h}};var s=t("transform");return e.extend(e,{hasTransform:!1!==s,hasPerspective:t("perspective")in o,hasTouch:"ontouchstart"in n,hasPointer:!(!n.PointerEvent&&!n.MSPointerEvent),hasTransition:t("transition")in o}),e.isBadAndroid=function(){var t=n.navigator.appVersion;if(/Android/.test(t)&&!/Chrome\/\d/.test(t)){var i=t.match(/Safari\/(\d+.\d)/);return!(i&&"object"==typeof i&&2<=i.length)||parseFloat(i[1])<535.19}return!1}(),e.extend(e.style={},{transform:s,transitionTimingFunction:t("transitionTimingFunction"),transitionDuration:t("transitionDuration"),transitionDelay:t("transitionDelay"),transformOrigin:t("transformOrigin"),touchAction:t("touchAction")}),e.hasClass=function(t,i){return new RegExp("(^|\\s)"+i+"(\\s|$)").test(t.className)},e.addClass=function(t,i){if(!e.hasClass(t,i)){var s=t.className.split(" ");s.push(i),t.className=s.join(" ")}},e.removeClass=function(t,i){if(e.hasClass(t,i)){var s=new RegExp("(^|\\s)"+i+"(\\s|$)","g");t.className=t.className.replace(s," ")}},e.offset=function(t){for(t.offsetLeft,t.offsetTop;t=t.offsetParent;)t.offsetLeft,t.offsetTop;return{left:0,top:0}},e.preventDefaultException=function(t,i){for(var s in i)if(i[s].test(t[s]))return!0;return!1},e.extend(e.eventType={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,MSPointerDown:3,MSPointerMove:3,MSPointerUp:3}),e.extend(e.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(t){return t*(2-t)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(t){return d.sqrt(1- --t*t)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(t){return(t-=1)*t*(5*t+4)+1}},bounce:{style:"",fn:function(t){return(t/=1)<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},elastic:{style:"",fn:function(t){return 0===t?0:1==t?1:.4*d.pow(2,-10*t)*d.sin((t-.055)*(2*d.PI)/.22)+1}}}),e.tap=function(t,i){var s=r.createEvent("Event");s.initEvent(i,!0,!0),s.pageX=t.pageX,s.pageY=t.pageY,t.target.dispatchEvent(s)},e.click=function(t){var i,s=t.target;/(SELECT|INPUT|TEXTAREA)/i.test(s.tagName)||((i=r.createEvent(n.MouseEvent?"MouseEvents":"Event")).initEvent("click",!0,!0),i.view=t.view||n,i.detail=1,i.screenX=s.screenX||0,i.screenY=s.screenY||0,i.clientX=s.clientX||0,i.clientY=s.clientY||0,i.ctrlKey=!!t.ctrlKey,i.altKey=!!t.altKey,i.shiftKey=!!t.shiftKey,i.metaKey=!!t.metaKey,i.button=0,i.relatedTarget=null,i._constructed=!0,s.dispatchEvent(i))},e.getTouchAction=function(t,i){var s="none";return"vertical"===t?s="pan-y":"horizontal"===t&&(s="pan-x"),i&&"none"!=s&&(s+=" pinch-zoom"),s},e.getRect=function(t){if(t instanceof SVGElement){var i=t.getBoundingClientRect();return{top:i.top,left:i.left,width:i.width,height:i.height}}return{top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}},e}();function t(t,i){for(var s in this.wrapper="string"==typeof t?r.querySelector(t):t,this.scroller=this.wrapper.children[0],this.scrollerStyle=this.scroller.style,this.options={zoomMin:1,zoomMax:4,startZoom:1,resizeScrollbars:!0,mouseWheelSpeed:20,snapThreshold:.334,disablePointer:!f.hasPointer,disableTouch:f.hasPointer||!f.hasTouch,disableMouse:f.hasPointer||f.hasTouch,startX:0,startY:0,scrollY:!0,directionLockThreshold:5,momentum:!0,bounce:!0,bounceTime:600,bounceEasing:"",preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:void 0===n.onmousedown},i)this.options[s]=i[s];this.translateZ=this.options.HWCompositing&&f.hasPerspective?" translateZ(0)":"",this.options.useTransition=f.hasTransition&&this.options.useTransition,this.options.useTransform=f.hasTransform&&this.options.useTransform,this.options.eventPassthrough=!0===this.options.eventPassthrough?"vertical":this.options.eventPassthrough,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollY="vertical"!=this.options.eventPassthrough&&this.options.scrollY,this.options.scrollX="horizontal"!=this.options.eventPassthrough&&this.options.scrollX,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,this.options.bounceEasing="string"==typeof this.options.bounceEasing?f.ease[this.options.bounceEasing]||f.ease.circular:this.options.bounceEasing,this.options.resizePolling=void 0===this.options.resizePolling?60:this.options.resizePolling,!0===this.options.tap&&(this.options.tap="tap"),this.options.useTransition||this.options.useTransform||/relative|absolute/i.test(this.scrollerStyle.position)||(this.scrollerStyle.position="relative"),"scale"==this.options.shrinkScrollbars&&(this.options.useTransition=!1),this.options.invertWheelDirection=this.options.invertWheelDirection?-1:1,this.x=0,this.y=0,this.directionX=0,this.directionY=0,this._events={},this.scale=d.min(d.max(this.options.startZoom,this.options.zoomMin),this.options.zoomMax),this._init(),this.refresh(),this.scrollTo(this.options.startX,this.options.startY),this.enable()}function h(t,i,s){var e=r.createElement("div"),o=r.createElement("div");return!0===s&&(e.style.cssText="position:absolute;z-index:9999",o.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px"),o.className="iScrollIndicator","h"==t?(!0===s&&(e.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",o.style.height="100%"),e.className="iScrollHorizontalScrollbar"):(!0===s&&(e.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",o.style.width="100%"),e.className="iScrollVerticalScrollbar"),e.style.cssText+=";overflow:hidden",i||(e.style.pointerEvents="none"),e.appendChild(o),e}function a(t,i){for(var s in this.wrapper="string"==typeof i.el?r.querySelector(i.el):i.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=t,this.options={listenX:!0,listenY:!0,interactive:!1,resize:!0,defaultScrollbars:!1,shrink:!1,fade:!1,speedRatioX:0,speedRatioY:0},i)this.options[s]=i[s];if(this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.options.interactive&&(this.options.disableTouch||(f.addEvent(this.indicator,"touchstart",this),f.addEvent(n,"touchend",this)),this.options.disablePointer||(f.addEvent(this.indicator,f.prefixPointerEvent("pointerdown"),this),f.addEvent(n,f.prefixPointerEvent("pointerup"),this)),this.options.disableMouse||(f.addEvent(this.indicator,"mousedown",this),f.addEvent(n,"mouseup",this))),this.options.fade){this.wrapperStyle[f.style.transform]=this.scroller.translateZ;var e=f.style.transitionDuration;if(!e)return;this.wrapperStyle[e]=f.isBadAndroid?"0.0001ms":"0ms";var o=this;f.isBadAndroid&&m(function(){"0.0001ms"===o.wrapperStyle[e]&&(o.wrapperStyle[e]="0s")}),this.wrapperStyle.opacity="0"}}t.prototype={version:"5.2.0-snapshot",_init:function(){this._initEvents(),this.options.zoom&&this._initZoom(),(this.options.scrollbars||this.options.indicators)&&this._initIndicators(),this.options.mouseWheel&&this._initWheel(),this.options.snap&&this._initSnap(),this.options.keyBindings&&this._initKeys()},destroy:function(){this._initEvents(!0),clearTimeout(this.resizeTimeout),this.resizeTimeout=null,this._execEvent("destroy")},_transitionEnd:function(t){t.target==this.scroller&&this.isInTransition&&(this._transitionTime(),this.resetPosition(this.options.bounceTime)||(this.isInTransition=!1,this._execEvent("scrollEnd")))},_start:function(t){if("pointerdown"!=t.type||t.isPrimary){if(1!=f.eventType[t.type])if(0!==(t.which?t.button:t.button<2?0:4==t.button?1:2))return;if(this.enabled&&(!this.initiated||f.eventType[t.type]===this.initiated)){!this.options.preventDefault||f.isBadAndroid||f.preventDefaultException(t.target,this.options.preventDefaultException)||t.preventDefault();var i,s=t.touches?t.touches[0]:t;this.initiated=f.eventType[t.type],this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.directionLocked=0,this.startTime=f.getTime(),this.options.useTransition&&this.isInTransition?(this._transitionTime(),this.isInTransition=!1,i=this.getComputedPosition(),this._translate(d.round(i.x),d.round(i.y)),this._execEvent("scrollEnd")):!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this._execEvent("scrollEnd")),this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=s.pageX,this.pointY=s.pageY,this._execEvent("beforeScrollStart")}}},_move:function(t){if(this.enabled&&f.eventType[t.type]===this.initiated&&("pointermove"!=t.type||t.isPrimary)){this.options.preventDefault&&t.preventDefault();var i,s,e,o,n=t.touches?t.touches[0]:t,r=n.pageX-this.pointX,h=n.pageY-this.pointY,a=f.getTime();if(this.pointX=n.pageX,this.pointY=n.pageY,this.distX+=r,this.distY+=h,e=d.abs(this.distX),o=d.abs(this.distY),!(300<a-this.endTime&&e<10&&o<10)){if(this.directionLocked||this.options.freeScroll||(e>o+this.options.directionLockThreshold?this.directionLocked="h":o>=e+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),"h"==this.directionLocked){if("vertical"==this.options.eventPassthrough)t.preventDefault();else if("horizontal"==this.options.eventPassthrough)return void(this.initiated=!1);h=0}else if("v"==this.directionLocked){if("horizontal"==this.options.eventPassthrough)t.preventDefault();else if("vertical"==this.options.eventPassthrough)return void(this.initiated=!1);r=0}r=this.hasHorizontalScroll?r:0,h=this.hasVerticalScroll?h:0,i=this.x+r,s=this.y+h,(0<i||i<this.maxScrollX)&&(i=this.options.bounce?this.x+r/3:0<i?0:this.maxScrollX),(0<s||s<this.maxScrollY)&&(s=this.options.bounce?this.y+h/3:0<s?0:this.maxScrollY),this.directionX=0<r?-1:r<0?1:0,this.directionY=0<h?-1:h<0?1:0,this.moved||this._execEvent("scrollStart"),this.moved=!0,this._translate(i,s),300<a-this.startTime&&(this.startTime=a,this.startX=this.x,this.startY=this.y)}}},_end:function(t){if(this.enabled&&f.eventType[t.type]===this.initiated&&("pointerup"!=t.type||t.isPrimary)){this.options.preventDefault&&!f.preventDefaultException(t.target,this.options.preventDefaultException)&&t.preventDefault();t.changedTouches&&t.changedTouches[0];var i,s,e=f.getTime()-this.startTime,o=d.round(this.x),n=d.round(this.y),r=d.abs(o-this.startX),h=d.abs(n-this.startY),a=0,l="";if(this.isInTransition=0,this.initiated=0,this.endTime=f.getTime(),!this.resetPosition(this.options.bounceTime)){if(this.scrollTo(o,n),!this.moved)return this.options.tap&&f.tap(t,this.options.tap),this.options.click&&f.click(t),void this._execEvent("scrollCancel");if(this._events.flick&&e<200&&r<100&&h<100)this._execEvent("flick");else{if(this.options.momentum&&e<300&&(i=this.hasHorizontalScroll?f.momentum(this.x,this.startX,e,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options.deceleration):{destination:o,duration:0},s=this.hasVerticalScroll?f.momentum(this.y,this.startY,e,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:n,duration:0},o=i.destination,n=s.destination,a=d.max(i.duration,s.duration),this.isInTransition=1),this.options.snap){var c=this._nearestSnap(o,n);this.currentPage=c,a=this.options.snapSpeed||d.max(d.max(d.min(d.abs(o-c.x),1e3),d.min(d.abs(n-c.y),1e3)),300),o=c.x,n=c.y,this.directionX=0,this.directionY=0,l=this.options.bounceEasing}if(o!=this.x||n!=this.y)return(0<o||o<this.maxScrollX||0<n||n<this.maxScrollY)&&(l=f.ease.quadratic),this.scrollTo(o,n,a,l),void this._execEvent("scrollToPage");this._execEvent("scrollEnd")}}}},_resize:function(){var t=this;clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){t.refresh()},this.options.resizePolling)},resetPosition:function(t){var i=this.x,s=this.y;return t=t||0,!this.hasHorizontalScroll||0<this.x?i=0:this.x<this.maxScrollX&&(i=this.maxScrollX),!this.hasVerticalScroll||0<this.y?s=0:this.y<this.maxScrollY&&(s=this.maxScrollY),(i!=this.x||s!=this.y)&&(this.scrollTo(i,s,t,this.options.bounceEasing),!0)},disable:function(){this.enabled=!1},enable:function(){this.enabled=!0},setScrollerSize:function(t,i){this.scrollerW=t,this.scrollerH=i},setWrapperOffset:function(t,i){this.wrapperOffsetLeft=t,this.wrapperOffsetTop=i},refresh:function(){f.getRect(this.wrapper),this.wrapperWidth=this.wrapper.clientWidth,this.wrapperHeight=this.wrapper.clientHeight;var t=f.getRect(this.scroller);this.scrollerW&&(t.width=this.scrollerW),this.scrollerH&&(t.height=this.scrollerH),this.scrollerWidth=d.round(t.width*this.scale),this.scrollerHeight=d.round(t.height*this.scale),this.maxScrollX=this.wrapperWidth-this.scrollerWidth,this.maxScrollY=this.wrapperHeight-this.scrollerHeight,this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<0,this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<0,this.hasHorizontalScroll||(this.maxScrollX=0,this.scrollerWidth=this.wrapperWidth),this.hasVerticalScroll||(this.maxScrollY=0,this.scrollerHeight=this.wrapperHeight),this.endTime=0,this.directionX=0,this.directionY=0,f.hasPointer&&!this.options.disablePointer&&(this.wrapper.style[f.style.touchAction]=f.getTouchAction(this.options.eventPassthrough,!0),this.wrapper.style[f.style.touchAction]||(this.wrapper.style[f.style.touchAction]=f.getTouchAction(this.options.eventPassthrough,!1))),this.wrapperOffset=f.offset(this.wrapper),this.wrapperOffsetLeft&&(this.wrapperOffset.left=this.wrapperOffsetLeft),this.wrapperOffsetTop&&(this.wrapperOffset.top=this.wrapperOffsetTop),this._execEvent("refresh"),this.resetPosition()},on:function(t,i){this._events[t]||(this._events[t]=[]),this._events[t].push(i)},off:function(t,i){if(this._events[t]){var s=this._events[t].indexOf(i);-1<s&&this._events[t].splice(s,1)}},_execEvent:function(t){if(this._events[t]){var i=0,s=this._events[t].length;if(s)for(;i<s;i++)this._events[t][i].apply(this,[].slice.call(arguments,1))}},scrollBy:function(t,i,s,e){t=this.x+t,i=this.y+i,s=s||0,this.scrollTo(t,i,s,e)},getScrollerWidth:function(){return void 0!==this.scrollerW?this.scrollerW:this.scroller.offsetWidth},getScrollerHeight:function(){return void 0!==this.scrollerH?this.scrollerH:this.scroller.offsetHeight},scrollTo:function(t,i,s,e){if(s){if(this.prevDisabled&&0==t)return void this.goToPage(1,0,0);if(this.nextDisabled&&t==-(this.scrollerWidth-this.wrapperWidth))return void this.goToPage(1,0,0)}this.options.keepInCenterH&&this.getScrollerWidth()*this.scale<this.wrapperWidth&&(t=this.wrapperWidth/2-this.getScrollerWidth()*this.scale/2),this.options.keepInCenterV&&this.getScrollerHeight()*this.scale<this.wrapperHeight&&(i=this.wrapperHeight/2-this.getScrollerHeight()*this.scale/2),e=e||f.ease.circular,this.isInTransition=this.options.useTransition&&0<s;var o=this.options.useTransition&&e.style;!s||o?(o&&(this._transitionTimingFunction(e.style),this._transitionTime(s)),this._translate(t,i)):this._animate(t,i,s,e.fn)},scrollToElement:function(t,i,s,e,o){if(t=t.nodeType?t:this.scroller.querySelector(t)){var n=f.offset(t);n.left-=this.wrapperOffset.left,n.top-=this.wrapperOffset.top;var r=f.getRect(t),h=f.getRect(this.wrapper);!0===s&&(s=d.round(r.width/2-h.width/2)),!0===e&&(e=d.round(r.height/2-h.height/2)),n.left-=s||0,n.top-=e||0,n.left=0<n.left?0:n.left<this.maxScrollX?this.maxScrollX:n.left,n.top=0<n.top?0:n.top<this.maxScrollY?this.maxScrollY:n.top,i=null==i||"auto"===i?d.max(d.abs(this.x-n.left),d.abs(this.y-n.top)):i,this.scrollTo(n.left,n.top,i,o)}},_transitionTime:function(t){if(this.options.useTransition){t=t||0;var i=f.style.transitionDuration;if(i){if(this.scrollerStyle[i]=t+"ms",!t&&f.isBadAndroid){this.scrollerStyle[i]="0.0001ms";var s=this;m(function(){"0.0001ms"===s.scrollerStyle[i]&&(s.scrollerStyle[i]="0s")})}if(this.indicators)for(var e=this.indicators.length;e--;)this.indicators[e].transitionTime(t)}}},_transitionTimingFunction:function(t){if(this.scrollerStyle[f.style.transitionTimingFunction]=t,this.indicators)for(var i=this.indicators.length;i--;)this.indicators[i].transitionTimingFunction(t)},_translate:function(t,i){if(this.options.useTransform?this.scrollerStyle[f.style.transform]="translate("+t+"px,"+i+"px) scale("+this.scale+") "+this.translateZ:(t=d.round(t),i=d.round(i),this.scrollerStyle.left=t+"px",this.scrollerStyle.top=i+"px"),this.x=t,this.y=i,this.indicators)for(var s=this.indicators.length;s--;)this.indicators[s].updatePosition()},_initEvents:function(t){var i=t?f.removeEvent:f.addEvent,s=this.options.bindToWrapper?this.wrapper:n;i(n,"orientationchange",this),i(n,"resize",this),this.options.click&&i(this.wrapper,"click",this,!0),this.options.disableMouse||(i(this.wrapper,"mousedown",this),i(s,"mousemove",this),i(s,"mousecancel",this),i(s,"mouseup",this)),f.hasPointer&&!this.options.disablePointer&&(i(this.wrapper,f.prefixPointerEvent("pointerdown"),this),i(s,f.prefixPointerEvent("pointermove"),this),i(s,f.prefixPointerEvent("pointercancel"),this),i(s,f.prefixPointerEvent("pointerup"),this)),f.hasTouch&&!this.options.disableTouch&&(i(this.wrapper,"touchstart",this),i(s,"touchmove",this),i(s,"touchcancel",this),i(s,"touchend",this)),i(this.scroller,"transitionend",this),i(this.scroller,"webkitTransitionEnd",this),i(this.scroller,"oTransitionEnd",this),i(this.scroller,"MSTransitionEnd",this)},getComputedPosition:function(){var t,i,s=n.getComputedStyle(this.scroller,null);return this.options.useTransform?(t=+((s=s[f.style.transform].split(")")[0].split(", "))[12]||s[4]),i=+(s[13]||s[5])):(t=+s.left.replace(/[^-\d.]/g,""),i=+s.top.replace(/[^-\d.]/g,"")),{x:t,y:i}},_initIndicators:function(){var t,i=this.options.interactiveScrollbars,s="string"!=typeof this.options.scrollbars,e=[],o=this;this.indicators=[],this.options.scrollbars&&(this.options.scrollY&&(t={el:h("v",i,this.options.scrollbars),interactive:i,defaultScrollbars:!0,customStyle:s,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenX:!1},this.wrapper.appendChild(t.el),e.push(t)),this.options.scrollX&&(t={el:h("h",i,this.options.scrollbars),interactive:i,defaultScrollbars:!0,customStyle:s,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenY:!1},this.wrapper.appendChild(t.el),e.push(t))),this.options.indicators&&(e=e.concat(this.options.indicators));for(var n=e.length;n--;)this.indicators.push(new a(this,e[n]));function r(t){if(o.indicators)for(var i=o.indicators.length;i--;)t.call(o.indicators[i])}this.options.fadeScrollbars&&(this.on("scrollEnd",function(){r(function(){this.fade()})}),this.on("scrollCancel",function(){r(function(){this.fade()})}),this.on("scrollStart",function(){r(function(){this.fade(1)})}),this.on("beforeScrollStart",function(){r(function(){this.fade(1,!0)})})),this.on("refresh",function(){r(function(){this.refresh()})}),this.on("destroy",function(){r(function(){this.destroy()}),delete this.indicators})},_initZoom:function(){this.scrollerStyle[f.style.transformOrigin]="0 0"},_zoomStart:function(t){var i=d.abs(t.touches[0].pageX-t.touches[1].pageX),s=d.abs(t.touches[0].pageY-t.touches[1].pageY);this.touchesDistanceStart=d.sqrt(i*i+s*s),this.startScale=this.scale,this.originX=d.abs(t.touches[0].pageX+t.touches[1].pageX)/2+this.wrapperOffset.left-this.x,this.originY=d.abs(t.touches[0].pageY+t.touches[1].pageY)/2+this.wrapperOffset.top-this.y,this._execEvent("zoomStart")},_zoom:function(t){if(this.enabled&&f.eventType[t.type]===this.initiated){this.options.preventDefault&&t.preventDefault();var i,s,e,o=d.abs(t.touches[0].pageX-t.touches[1].pageX),n=d.abs(t.touches[0].pageY-t.touches[1].pageY),r=d.sqrt(o*o+n*n),h=1/this.touchesDistanceStart*r*this.startScale;this.scaled=!0,h<this.options.zoomMin?h=.5*this.options.zoomMin*d.pow(2,h/this.options.zoomMin):h>this.options.zoomMax&&(h=2*this.options.zoomMax*d.pow(.5,this.options.zoomMax/h)),i=h/this.startScale,s=this.originX-this.originX*i+this.startX,e=this.originY-this.originY*i+this.startY,this.scale=h,this.scrollTo(s,e,0)}},_zoomEnd:function(t){var i,s,e;this.enabled&&f.eventType[t.type]===this.initiated&&(this.options.preventDefault&&t.preventDefault(),this.isInTransition=0,this.initiated=0,this.scale>this.options.zoomMax?this.scale=this.options.zoomMax:this.scale<this.options.zoomMin&&(this.scale=this.options.zoomMin),this.refresh(),e=this.scale/this.startScale,i=this.originX-this.originX*e+this.startX,s=this.originY-this.originY*e+this.startY,0<i?i=0:i<this.maxScrollX&&(i=this.maxScrollX),0<s?s=0:s<this.maxScrollY&&(s=this.maxScrollY),this.x==i&&this.y==s||this.scrollTo(i,s,this.options.bounceTime),this.scaled=!1,this._execEvent("zoomEnd"))},zoom:function(t,i,s,e){if(t<this.options.zoomMin?t=this.options.zoomMin:t>this.options.zoomMax&&(t=this.options.zoomMax),t!=this.scale){var o=t/this.scale,n=this;1!=o&&(clearTimeout(this.zoomStartTimeout),this.zoomStartTimeout=setTimeout(function(){n._execEvent("zoomStart")},0),clearTimeout(this.wheelTimeout),this.wheelTimeout=setTimeout(function(){n._execEvent("zoomEnd")},Number(e+100))),i=void 0===i?this.wrapperWidth/2:i,s=void 0===s?this.wrapperHeight/2:s,e=void 0===e?300:e,i=i+this.wrapperOffset.left-this.x,s=s+this.wrapperOffset.top-this.y,i=i-i*o+this.x,s=s-s*o+this.y,this.scale=t,this.refresh(),0<i?i=0:i<this.maxScrollX&&(i=this.maxScrollX),0<s?s=0:s<this.maxScrollY&&(s=this.maxScrollY),this.scrollTo(i,s,e)}},_wheelZoom:function(t){var i,s;if("deltaX"in t)i=-t.deltaY/d.abs(t.deltaY);else if("wheelDeltaX"in t)i=t.wheelDeltaY/d.abs(t.wheelDeltaY);else if("wheelDelta"in t)i=t.wheelDelta/d.abs(t.wheelDelta);else{if(!("detail"in t))return;i=-t.detail/d.abs(t.wheelDelta)}s=this.scale+i/5,this.zoom(s,t.pageX,t.pageY,0)},_initWheel:function(){f.addEvent(this.wrapper,"wheel",this),f.addEvent(this.wrapper,"mousewheel",this),f.addEvent(this.wrapper,"DOMMouseScroll",this),this.on("destroy",function(){clearTimeout(this.wheelTimeout),this.wheelTimeout=null,f.removeEvent(this.wrapper,"wheel",this),f.removeEvent(this.wrapper,"mousewheel",this),f.removeEvent(this.wrapper,"DOMMouseScroll",this)})},_wheel:function(t){if(this.enabled){t.preventDefault();var i,s,e,o,n=this;if(void 0===this.wheelTimeout&&n._execEvent("scrollStart"),clearTimeout(this.wheelTimeout),this.wheelTimeout=setTimeout(function(){n.options.snap||n._execEvent("scrollEnd"),n.wheelTimeout=void 0},400),"deltaX"in t)1===t.deltaMode?(i=-t.deltaX*this.options.mouseWheelSpeed,s=-t.deltaY*this.options.mouseWheelSpeed):(i=-t.deltaX,s=-t.deltaY);else if("wheelDeltaX"in t)i=t.wheelDeltaX/120*this.options.mouseWheelSpeed,s=t.wheelDeltaY/120*this.options.mouseWheelSpeed;else if("wheelDelta"in t)i=s=t.wheelDelta/120*this.options.mouseWheelSpeed;else{if(!("detail"in t))return;i=s=-t.detail/3*this.options.mouseWheelSpeed}if(i*=this.options.invertWheelDirection,s*=this.options.invertWheelDirection,this.hasVerticalScroll||(i=s,s=0),this.options.snap)return e=this.currentPage.pageX,o=this.currentPage.pageY,0<i?e--:i<0&&e++,0<s?o--:s<0&&o++,void this.goToPage(e,o);e=this.x+d.round(this.hasHorizontalScroll?i:0),o=this.y+d.round(this.hasVerticalScroll?s:0),this.directionX=0<i?-1:i<0?1:0,this.directionY=0<s?-1:s<0?1:0,0<e?e=0:e<this.maxScrollX&&(e=this.maxScrollX),0<o?o=0:o<this.maxScrollY&&(o=this.maxScrollY),this.scrollTo(e,o,0)}},_initSnap:function(){this.currentPage={},"string"==typeof this.options.snap&&(this.options.snap=this.scroller.querySelectorAll(this.options.snap)),this.on("refresh",function(){var t,i,s,e,o,n,r,h=0,a=0,l=0,c=this.options.snapStepX||this.wrapperWidth,p=this.options.snapStepY||this.wrapperHeight;if(this.pages=[],this.wrapperWidth&&this.wrapperHeight&&this.scrollerWidth&&this.scrollerHeight){if(!0===this.options.snap)for(s=d.round(c/2),e=d.round(p/2);l>-this.scrollerWidth;){for(this.pages[h]=[],o=t=0;o>-this.scrollerHeight;)this.pages[h][t]={x:d.max(l,this.maxScrollX),y:d.max(o,this.maxScrollY),width:c,height:p,cx:l-s,cy:o-e},o-=p,t++;l-=c,h++}else for(t=(n=this.options.snap).length,i=-1;h<t;h++)r=f.getRect(n[h]),(0===h||r.left<=f.getRect(n[h-1]).left)&&(a=0,i++),this.pages[a]||(this.pages[a]=[]),l=d.max(-r.left,this.maxScrollX),o=d.max(-r.top,this.maxScrollY),s=l-d.round(r.width/2),e=o-d.round(r.height/2),this.pages[a][i]={x:l,y:o,width:r.width,height:r.height,cx:s,cy:e},l>this.maxScrollX&&a++;this.goToPage(this.currentPage.pageX||0,this.currentPage.pageY||0,0),this.options.snapThreshold%1==0?(this.snapThresholdX=this.options.snapThreshold,this.snapThresholdY=this.options.snapThreshold):(this.snapThresholdX=d.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold),this.snapThresholdY=d.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold))}}),this.on("flick",function(){var t=this.options.snapSpeed||d.max(d.max(d.min(d.abs(this.x-this.startX),1e3),d.min(d.abs(this.y-this.startY),1e3)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,t)})},_nearestSnap:function(t,i){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var s=0,e=this.pages.length,o=0;if(d.abs(t-this.absStartX)<this.snapThresholdX&&d.abs(i-this.absStartY)<this.snapThresholdY)return this.currentPage;for(0<t?t=0:t<this.maxScrollX&&(t=this.maxScrollX),0<i?i=0:i<this.maxScrollY&&(i=this.maxScrollY);s<e;s++)if(t>=this.pages[s][0].cx){t=this.pages[s][0].x;break}for(e=this.pages[s].length;o<e;o++)if(i>=this.pages[0][o].cy){i=this.pages[0][o].y;break}return s==this.currentPage.pageX&&((s+=this.directionX)<0?s=0:s>=this.pages.length&&(s=this.pages.length-1),t=this.pages[s][0].x),o==this.currentPage.pageY&&((o+=this.directionY)<0?o=0:o>=this.pages[0].length&&(o=this.pages[0].length-1),i=this.pages[0][o].y),{x:t,y:i,pageX:s,pageY:o}},goToPage:function(t,i,s,e){e=e||this.options.bounceEasing,t>=this.pages.length?t=this.pages.length-1:t<0&&(t=0),i>=this.pages[t].length?i=this.pages[t].length-1:i<0&&(i=0);var o=this.pages[t][i].x,n=this.pages[t][i].y;s=void 0===s?this.options.snapSpeed||d.max(d.max(d.min(d.abs(o-this.x),1e3),d.min(d.abs(n-this.y),1e3)),300):s,this.currentPage={x:o,y:n,pageX:t,pageY:i},this.scrollTo(o,n,s,e)},next:function(t,i){var s=this.currentPage.pageX,e=this.currentPage.pageY;++s>=this.pages.length&&this.hasVerticalScroll&&(s=0,e++),this.goToPage(s,e,t,i)},prev:function(t,i){var s=this.currentPage.pageX,e=this.currentPage.pageY;--s<0&&this.hasVerticalScroll&&(s=0,e--),this.goToPage(s,e,t,i)},_initKeys:function(t){var i,s={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40};if("object"==typeof this.options.keyBindings)for(i in this.options.keyBindings)"string"==typeof this.options.keyBindings[i]&&(this.options.keyBindings[i]=this.options.keyBindings[i].toUpperCase().charCodeAt(0));else this.options.keyBindings={};for(i in s)this.options.keyBindings[i]=this.options.keyBindings[i]||s[i];f.addEvent(n,"keydown",this),this.on("destroy",function(){f.removeEvent(n,"keydown",this)})},_key:function(t){if(this.enabled){var i,s=this.options.snap,e=s?this.currentPage.pageX:this.x,o=s?this.currentPage.pageY:this.y,n=f.getTime(),r=this.keyTime||0;switch(this.options.useTransition&&this.isInTransition&&(i=this.getComputedPosition(),this._translate(d.round(i.x),d.round(i.y)),this.isInTransition=!1),this.keyAcceleration=n-r<200?d.min(this.keyAcceleration+.25,50):0,t.keyCode){case this.options.keyBindings.pageUp:this.hasHorizontalScroll&&!this.hasVerticalScroll?e+=s?1:this.wrapperWidth:o+=s?1:this.wrapperHeight;break;case this.options.keyBindings.pageDown:this.hasHorizontalScroll&&!this.hasVerticalScroll?e-=s?1:this.wrapperWidth:o-=s?1:this.wrapperHeight;break;case this.options.keyBindings.end:e=s?this.pages.length-1:this.maxScrollX,o=s?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:o=e=0;break;case this.options.keyBindings.left:e+=s?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.up:o+=s?1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.right:e-=s?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.down:o-=s?1:5+this.keyAcceleration>>0;break;default:return}s?this.goToPage(e,o):(0<e?(e=0,this.keyAcceleration=0):e<this.maxScrollX&&(e=this.maxScrollX,this.keyAcceleration=0),0<o?(o=0,this.keyAcceleration=0):o<this.maxScrollY&&(o=this.maxScrollY,this.keyAcceleration=0),this.scrollTo(e,o,0),this.keyTime=n)}},_animate:function(n,r,h,a){var l=this,c=this.x,p=this.y,d=f.getTime(),u=d+h;this.isAnimating=!0,function t(){var i,s,e,o=f.getTime();if(u<=o)return l.isAnimating=!1,l._translate(n,r),void(l.resetPosition(l.options.bounceTime)||l._execEvent("scrollEnd"));e=a(o=(o-d)/h),i=(n-c)*e+c,s=(r-p)*e+p,l._translate(i,s),l.isAnimating&&m(t)}()},handleEvent:function(t){switch(t.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(t),this.options.zoom&&t.touches&&1<t.touches.length&&this._zoomStart(t);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":if(this.options.zoom&&t.touches&&t.touches[1])return void this._zoom(t);this._move(t);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":if(this.scaled)return void this._zoomEnd(t);this._end(t);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(t);break;case"wheel":case"DOMMouseScroll":case"mousewheel":if("zoom"==this.options.wheelAction)return void this._wheelZoom(t);this._wheel(t);break;case"keydown":this._key(t)}}},a.prototype={handleEvent:function(t){switch(t.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(t);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(t);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(t)}},destroy:function(){this.options.fadeScrollbars&&(clearTimeout(this.fadeTimeout),this.fadeTimeout=null),this.options.interactive&&(f.removeEvent(this.indicator,"touchstart",this),f.removeEvent(this.indicator,f.prefixPointerEvent("pointerdown"),this),f.removeEvent(this.indicator,"mousedown",this),f.removeEvent(n,"touchmove",this),f.removeEvent(n,f.prefixPointerEvent("pointermove"),this),f.removeEvent(n,"mousemove",this),f.removeEvent(n,"touchend",this),f.removeEvent(n,f.prefixPointerEvent("pointerup"),this),f.removeEvent(n,"mouseup",this)),this.options.defaultScrollbars&&this.wrapper.parentNode&&this.wrapper.parentNode.removeChild(this.wrapper)},_start:function(t){var i=t.touches?t.touches[0]:t;t.preventDefault(),t.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=i.pageX,this.lastPointY=i.pageY,this.startTime=f.getTime(),this.options.disableTouch||f.addEvent(n,"touchmove",this),this.options.disablePointer||f.addEvent(n,f.prefixPointerEvent("pointermove"),this),this.options.disableMouse||f.addEvent(n,"mousemove",this),this.scroller._execEvent("beforeScrollStart")},_move:function(t){var i,s,e,o,n=t.touches?t.touches[0]:t;f.getTime();this.moved||this.scroller._execEvent("scrollStart"),this.moved=!0,i=n.pageX-this.lastPointX,this.lastPointX=n.pageX,s=n.pageY-this.lastPointY,this.lastPointY=n.pageY,e=this.x+i,o=this.y+s,this._pos(e,o),t.preventDefault(),t.stopPropagation()},_end:function(t){if(this.initiated){if(this.initiated=!1,t.preventDefault(),t.stopPropagation(),f.removeEvent(n,"touchmove",this),f.removeEvent(n,f.prefixPointerEvent("pointermove"),this),f.removeEvent(n,"mousemove",this),this.scroller.options.snap){var i=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),s=this.options.snapSpeed||d.max(d.max(d.min(d.abs(this.scroller.x-i.x),1e3),d.min(d.abs(this.scroller.y-i.y),1e3)),300);this.scroller.x==i.x&&this.scroller.y==i.y||(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=i,this.scroller.scrollTo(i.x,i.y,s,this.scroller.options.bounceEasing))}this.moved&&this.scroller._execEvent("scrollEnd")}},transitionTime:function(t){t=t||0;var i=f.style.transitionDuration;if(i&&(this.indicatorStyle[i]=t+"ms",!t&&f.isBadAndroid)){this.indicatorStyle[i]="0.0001ms";var s=this;m(function(){"0.0001ms"===s.indicatorStyle[i]&&(s.indicatorStyle[i]="0s")})}},transitionTimingFunction:function(t){this.indicatorStyle[f.style.transitionTimingFunction]=t},refresh:function(){this.transitionTime(),this.options.listenX&&!this.options.listenY?this.indicatorStyle.display=this.scroller.hasHorizontalScroll?"block":"none":this.options.listenY&&!this.options.listenX?this.indicatorStyle.display=this.scroller.hasVerticalScroll?"block":"none":this.indicatorStyle.display=this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none",this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll?(f.addClass(this.wrapper,"iScrollBothScrollbars"),f.removeClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(f.removeClass(this.wrapper,"iScrollBothScrollbars"),f.addClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="2px":this.wrapper.style.bottom="2px")),f.getRect(this.wrapper),this.options.listenX&&(this.wrapperWidth=this.wrapper.clientWidth,this.options.resize?(this.indicatorWidth=d.max(d.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px"):this.indicatorWidth=this.indicator.clientWidth,this.maxPosX=this.wrapperWidth-this.indicatorWidth,"clip"==this.options.shrink?(this.minBoundaryX=8-this.indicatorWidth,this.maxBoundaryX=this.wrapperWidth-8):(this.minBoundaryX=0,this.maxBoundaryX=this.maxPosX),this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX),this.options.listenY&&(this.wrapperHeight=this.wrapper.clientHeight,this.options.resize?(this.indicatorHeight=d.max(d.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px"):this.indicatorHeight=this.indicator.clientHeight,this.maxPosY=this.wrapperHeight-this.indicatorHeight,"clip"==this.options.shrink?(this.minBoundaryY=8-this.indicatorHeight,this.maxBoundaryY=this.wrapperHeight-8):(this.minBoundaryY=0,this.maxBoundaryY=this.maxPosY),this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.sizeRatioY=this.options.speedRatioY||this.scroller.maxScrollY&&this.maxPosY/this.scroller.maxScrollY),this.updatePosition()},updatePosition:function(){var t=this.options.listenX&&d.round(this.sizeRatioX*this.scroller.x)||0,i=this.options.listenY&&d.round(this.sizeRatioY*this.scroller.y)||0;this.options.ignoreBoundaries||(t<this.minBoundaryX?("scale"==this.options.shrink&&(this.width=d.max(this.indicatorWidth+t,8),this.indicatorStyle.width=this.width+"px"),t=this.minBoundaryX):t>this.maxBoundaryX?"scale"==this.options.shrink?(this.width=d.max(this.indicatorWidth-(t-this.maxPosX),8),this.indicatorStyle.width=this.width+"px",t=this.maxPosX+this.indicatorWidth-this.width):t=this.maxBoundaryX:"scale"==this.options.shrink&&this.width!=this.indicatorWidth&&(this.width=this.indicatorWidth,this.indicatorStyle.width=this.width+"px"),i<this.minBoundaryY?("scale"==this.options.shrink&&(this.height=d.max(this.indicatorHeight+3*i,8),this.indicatorStyle.height=this.height+"px"),i=this.minBoundaryY):i>this.maxBoundaryY?"scale"==this.options.shrink?(this.height=d.max(this.indicatorHeight-3*(i-this.maxPosY),8),this.indicatorStyle.height=this.height+"px",i=this.maxPosY+this.indicatorHeight-this.height):i=this.maxBoundaryY:"scale"==this.options.shrink&&this.height!=this.indicatorHeight&&(this.height=this.indicatorHeight,this.indicatorStyle.height=this.height+"px")),this.x=t,this.y=i,this.scroller.options.useTransform?this.indicatorStyle[f.style.transform]="translate("+t+"px,"+i+"px)"+this.scroller.translateZ:(this.indicatorStyle.left=t+"px",this.indicatorStyle.top=i+"px")},_pos:function(t,i){t<0?t=0:t>this.maxPosX&&(t=this.maxPosX),i<0?i=0:i>this.maxPosY&&(i=this.maxPosY),t=this.options.listenX?d.round(t/this.sizeRatioX):this.scroller.x,i=this.options.listenY?d.round(i/this.sizeRatioY):this.scroller.y,this.scroller.scrollTo(t,i)},fade:function(t,i){if(!i||this.visible){clearTimeout(this.fadeTimeout),this.fadeTimeout=null;var s=t?250:500,e=t?0:300;t=t?"1":"0",this.wrapperStyle[f.style.transitionDuration]=s+"ms",this.fadeTimeout=setTimeout(function(t){this.wrapperStyle.opacity=t,this.visible=+t}.bind(this,t),e)}}},t.utils=f,"undefined"!=typeof module&&module.exports?module.exports=t:"function"==typeof define&&define.amd?define(function(){return t}):n.IScroll=t,n.FLIPBOOK=n.FLIPBOOK||{},n.FLIPBOOK.IScroll=t,n.PointerEvent=void 0}(window,document,Math);
/*
Real3D FlipBook
version 3.32
author http://codecanyon.net/user/creativeinteractivemedia/portfolio?ref=creativeinteractivemedia
*/
var FLIPBOOK=FLIPBOOK||{};FLIPBOOK.PageWebGL=function(t,e,i,o,s,n){THREE.Object3D.call(this),this.book=t,this.index=e,this.pW=o.pageWidth,this.pH=o.pageHeight,this.nfacesw=o.pageSegmentsW,this.nfacesh=o.pageSegmentsH,this.mats=[],this.pageHardness=i,this.pageThickness=i,this.duration=o.pageFlipDuration,this.angle=0,this.force=10,this.offset=0,this.to=null,this.mod=null,this.bend=null,this.pivot=null,this.isFlippedLeft=!1,this.isFlippedRight=!0,this.flippingLeft=!1,this.flippingRight=!1,this.options=o;var r=o.rightToLeft?o.pages.length/2-this.index-1:this.index;this.indexF=o.rightToLeft?2*r+1:2*r,this.indexB=o.rightToLeft?2*r:2*r+1,this.showing=!1,this.preloaderMatF=s,this.preloaderMatB=n;var h=this;0==e&&this.options.cornerCurl&&(this.nfacesw=20,this.nfacesh=20,this.cornerCurlTween=new FLIPBOOK.TWEEN.Tween(0).to(1,1e3).easing(FLIPBOOK.TWEEN.Easing.Sinusoidal.Out).onUpdate(function(t){h.cornerCurl&&(h.b2.force=-1.8*t,h.modF.apply())}).repeat(11e3).start()),this.gF=new THREE.BoxGeometry(this.pW,this.pH,.01,this.nfacesw,this.nfacesh,0);var a=new THREE.MeshBasicMaterial({color:15592941}),p=[a,a,a,a,s,n],c=[a,a,a,a,a,a];if(this.options.pagePreloader)c=[a,a,a,a,s,n];this.cube=new THREE.Mesh(this.gF,p),this.cube.position.x=.5*this.pW,this.options.shadows&&(this.cube.castShadow=!0,this.cube.receiveShadow=!0),this.gF.faceVertexUvs[1]=this.gF.faceVertexUvs[0],this.showMat(),this.cubeEmpty=new THREE.Mesh(new THREE.BoxGeometry(this.pW,this.pH,.01,1,1,0),c),this.cubeEmpty.position.x=.5*this.pW,this.pageFlippedAngle=Math.PI*this.options.pageFlippedAngle/180,this.bendF=new MOD3.Bend(0,0,0),this.bendF.constraint=MOD3.ModConstant.LEFT,this.pH>this.pW&&(this.bendF.switchAxes=!0),this.b2=new MOD3.Bend(0,0,0),this.b2.constraint=MOD3.ModConstant.LEFT,this.pH>this.pW&&(this.b2.switchAxes=!0),this.b2.offset=.98,this.b2.setAngle(1),this.modF=new MOD3.ModifierStack(new MOD3.LibraryThree,this.cube),this.modF.addModifier(this.bendF),0==e&&this.options.cornerCurl&&this.modF.addModifier(this.b2),this.modF.apply()},FLIPBOOK.PageWebGL.prototype=new THREE.Object3D,FLIPBOOK.PageWebGL.prototype.constructor=FLIPBOOK.PageWebGL,FLIPBOOK.PageWebGL.prototype.startCornerCurl=function(){this.cornerCurl=!0},FLIPBOOK.PageWebGL.prototype.stopCornerCurl=function(){this.cornerCurl=!1,this.b2.force=0,this.modF.apply()},FLIPBOOK.PageWebGL.prototype.onPageCanvasLoaded=function(t,e,i){if("front"==e&&this.sizeFront!=t.size){this.sizeFront=t.size;var o=t.canvas,s=new THREE.CanvasTexture(o);s.minFilter=THREE.LinearFilter,s.needsUpdate=!0,s.repeat.x=o.scaleX,s.repeat.y=o.scaleY,s.offset.y=1-o.scaleY,o.double&&(s.offset.x=.5),this.frontMaterial=this.createMaterial(s,"front"),this.frontMaterial.needsUpdate=!0,this.setFrontMat(this.frontMaterial)}else if("back"==e&&this.sizeBack!=t.size){this.sizeBack=t.size;o=t.canvas;var n=new THREE.CanvasTexture(o);n.minFilter=THREE.LinearFilter,n.needsUpdate=!0,n.repeat.x=o.scaleX,n.repeat.y=o.scaleY,n.offset.y=1-o.scaleY,this.backMaterial=this.createMaterial(n,"back"),this.backMaterial.needsUpdate=!0,this.setBackMat(this.backMaterial)}i.call(this)},FLIPBOOK.PageWebGL.prototype.loadHTML=function(t,e){var i="front"==t?this.indexF:this.indexB,o=this;this.htmlLoaded?e.call(this):this.options.main.loadPageHTML(i,function(t){e.call(o)})},FLIPBOOK.PageWebGL.prototype.load=function(t,e,i){var o=this.book.model;if(o.wrapperH&&o.zoom){for(var s=this.book.pages,n=this,r=this.book.options,h=0;h<s.length;h++){var a=s[h];if(a.flippingLeft||a.flippingRight)return}this.disposed=!1;var p=r,c=o.wrapperH*o.zoom<.8*p.pageTextureSizeSmall?p.pageTextureSizeSmall:p.pageTextureSize;if("front"==t){if(!this.options.cover&&0==this.index)return;this.sizeFront>=c?e&&e.call(this):this.options.main.loadPage(this.indexF,c,function(t){if(t){if(t.canvas)n.onPageCanvasLoaded(t,"front",e);else if(t.image){if(n.sizeFront==c)return void e.call(n);n.sizeFront=c;var i=new THREE.Texture;i.image=t.image,i.minFilter=THREE.LinearFilter,i.needsUpdate=!0;var o=2*n.index;n.options.cover||o--,"left"==n.options.pages[o].side?i.repeat.x=.5:"right"==n.options.pages[o].side&&(i.repeat.x=.5,i.offset.x=.5),n.frontMaterial=n.createMaterial(i),n.setFrontMat(n.frontMaterial),e.call(n)}}else e&&e.call(n)})}else if("back"==t){if(!this.options.cover&&this.index==this.book.pages.length-1)return;this.sizeBack>=c?e&&e.call(this):this.options.main.loadPage(this.indexB,c,function(t){if(t){if(t.canvas)n.onPageCanvasLoaded(t,"back",e);else if(t.image){if(n.sizeBack==c)return void e.call(n);n.sizeBack=c,n.loadedBack=!0;var i=new THREE.Texture;i.image=t.image,i.minFilter=THREE.LinearFilter,i.needsUpdate=!0;var o=2*n.index+1;n.options.cover||o--,"left"==n.options.pages[o].side?i.repeat.x=.5:"right"==n.options.pages[o].side&&(i.repeat.x=.5,i.offset.x=.5),n.backMaterial=n.createMaterial(i,"back"),n.setBackMat(n.backMaterial),e.call(n)}}else e&&e.call(n)})}}},FLIPBOOK.PageWebGL.prototype.unload=function(t){if("front"==t&&this.sizeFront){var e=(i=this.cube.material[4]).map;i.dispose(),e&&e.dispose(),this.sizeFront=0,this.setFrontMat(this.preloaderMatF)}else if("back"==t&&this.sizeBack){var i;e=(i=this.cube.material[5]).map;i.dispose(),e&&e.dispose(),this.sizeBack=0,this.setBackMat(this.preloaderMatB)}},FLIPBOOK.PageWebGL.prototype.disposeMat=function(){if(this.loaded){var t=this.cube.material[4],e=this.cube.material[5],i=t.map,o=e.map;t.dispose(),e.dispose(),i&&i.dispose(),o&&o.dispose(),this.disposed=!0,this.loaded=!1}},FLIPBOOK.PageWebGL.prototype.createMaterial=function(t,e){var i;if(this.options.lights){var o="back"==e?this.book.specularB:this.book.specularF,s=this.options;i=new THREE.MeshStandardMaterial({map:t,roughness:s.pageRoughness,metalness:s.pageMetalness,emissive:0,color:16777215,lightMap:o})}else i=new THREE.MeshBasicMaterial({map:t});return i},FLIPBOOK.PageWebGL.prototype._setAngle=function(t,e){if(t<=180&&t>=-180){if(t=t/180*Math.PI,this.singlePage&&(t>=90&&(t=90),t<0&&(t-=90),t<-180&&(t=-180),this.index==this.book.pages.length-1))return;t<0&&(t+=Math.PI),this.angle=t,this.dragging=!0,this.rotation.y=-t,this.isFlippedLeft?this.bendF.force=1.35*Math.pow(-Math.abs(Math.cos(-t/2)),1)/Math.pow(this.pageHardness,1.5):this.bendF.force=1.35*Math.pow(Math.abs(Math.sin(-t/2)),1)/Math.pow(this.pageHardness,1.5),this.updateBend(),this.book.htmlLayerVisible&&(this.book.$pageL.hide(),this.book.$pageR.hide(),this.book.$pageC.hide(),this.book.htmlLayerVisible=!1,this.isFlippedLeft?this.book.loadPrevSpread():this.book.loadNextSpread()),this.book.needsUpdate=!0,this.book.correctZOrder()}},FLIPBOOK.PageWebGL.prototype.updateBend=function(){this.stopCornerCurl(),this.modF.apply(),this.gF.computeFaceNormals(),this.gF.computeVertexNormals(!0),this.book.correctZOrder(),this.book.needsUpdate=!0},FLIPBOOK.PageWebGL.prototype.flipLeft=function(t){if(this.onComplete=t,this.dragging=!1,!this.isFlippedLeft&&!this.flippingLeft&&!this.flippingRight&&this.index==this.book.flippedleft)if(this.duration>0){this.flippingLeft=!0,this.flipping=!0,this.force=0;var e=(1+.5*Math.random())/this.pageHardness,i=.1+.2*Math.random();this.to={angle:this.rotation.y,t:-1,xx:0,thiss:this,force:this.force,offset:this.offset},this.bendIn(-Math.PI,e,i)}else this.rotation.y=-Math.PI,this.flippingLeft=!1,this.isFlippedLeft=!0,this.flippingRight=!1,this.isFlippedRight=!1},FLIPBOOK.PageWebGL.prototype.flipLeftInstant=function(t){this.onComplete=t,this.dragging=!1,this.isFlippedLeft||this.flippingLeft||this.flippingRight||this.index!=this.book.flippedleft||(this.thiss=this,this.xx=0,this.angle=-Math.PI,this.flippingLeft=!0,this.isFlippedLeft=!1,this.renderFlip(),this.flippingLeft=!1,this.isFlippedLeft=!0,this.flippingRight=!1,this.isFlippedRight=!1,this.flipFinished())},FLIPBOOK.PageWebGL.prototype.hideMat=function(){this.showing&&(this.remove(this.cube),this.add(this.cubeEmpty),this.showing=!1)},FLIPBOOK.PageWebGL.prototype.showMat=function(){this.showing||(this.add(this.cube),this.remove(this.cubeEmpty),this.showing=!0,this.book.needsUpdate=!0)},FLIPBOOK.PageWebGL.prototype.setFrontMat=function(t){this.cube.material[4]!==t&&(this.cube.material[4]=t,this.book.needsUpdate=!0)},FLIPBOOK.PageWebGL.prototype.setBackMat=function(t){this.cube.material[5]!==t&&(this.cube.material[5]=t,this.book.needsUpdate=!0)},FLIPBOOK.PageWebGL.prototype.flipRightInstant=function(t){this.onComplete=t,this.dragging=!1,this.isFlippedRight||this.flippingRight||this.flippingLeft||this.index!=this.book.getNumPages()-this.book.flippedright-1||(this.thiss=this,this.xx=0,this.angle=0,this.flippingRight=!0,this.isFlippedRight=!1,this.renderFlip(),this.flippingLeft=!1,this.isFlippedLeft=!1,this.flippingRight=!1,this.isFlippedRight=!0,this.flipFinished())},FLIPBOOK.PageWebGL.prototype.flipRight=function(t){if(this.onComplete=t,this.dragging=!1,!this.isFlippedRight&&!this.flippingRight&&!this.flippingLeft&&this.index==this.book.getNumPages()-this.book.flippedright-1)if(this.duration>0){this.flippingRight=!0,this.flipping=!0,this.force=0,this.to={angle:this.rotation.y,t:-1,xx:0,thiss:this,force:this.force,offset:this.offset};var e=(-1-.5*Math.random())/this.pageHardness,i=.1+.2*Math.random();this.bendIn(0,e,i)}else this.rotation.y=0,this.flippingLeft=!1,this.isFlippedLeft=!1,this.flippingRight=!1,this.isFlippedRight=!0},FLIPBOOK.PageWebGL.prototype.bendIn=function(t,e,i){this.bendF.force=0,this.bendF.offset=0,this.updateBend();var o=2*this.duration*240*Math.pow(Math.abs(this.rotation.y-t)/Math.PI,.5)*Math.pow(this.pageHardness,.25);new FLIPBOOK.TWEEN.Tween(this.to).to({angle:t,xx:1,t:1},o).easing(FLIPBOOK.TWEEN.Easing.Sinusoidal.In).onUpdate(this.renderFlip).onComplete(this.bendOut).start(),this.options.main.playFlipSound()},FLIPBOOK.PageWebGL.prototype.bendOut=function(){var t=this.thiss,e=t.duration*Math.pow(Math.abs(t.bendF.force),.5)*1e3;new FLIPBOOK.TWEEN.Tween(t.bendF).to({force:0,offset:1},e).easing(FLIPBOOK.TWEEN.Easing.Sinusoidal.Out).onUpdate(function(){t.updateBend()}).onComplete(function(){t.flipFinished(t)}).start(),t.book.correctZOrder()},FLIPBOOK.PageWebGL.prototype.modApply=function(){this.thiss.bendF.force=this.thiss.bendB.force=this.force,this.thiss.bendF.offset=this.thiss.bendB.offset=this.offset,this.thiss.updateBend()},FLIPBOOK.PageWebGL.prototype.renderFlip=function(){this.thiss._setAngle(180*-this.angle/Math.PI)},FLIPBOOK.PageWebGL.prototype.flipFinished=function(){this.flippingLeft?(this.flippingLeft=!1,this.isFlippedLeft=!0,this.flippingRight=!1,this.isFlippedRight=!1):this.flippingRight&&(this.flippingLeft=!1,this.isFlippedRight=!0,this.flippingRight=!1,this.isFlippedLeft=!1),this.bendF.force=0,this.bendF.offset=0,this.updateBend(),this.flipping=!1,this.dragging=!1,void 0!==this.onComplete&&this.onComplete(this),this.book.flipFinnished()},FLIPBOOK.PageWebGL.prototype.isFlippedLeft=function(){return this.thiss.isFlippedLeft},FLIPBOOK.PageWebGL.prototype.isFlippedRight=function(){return this.thiss.isFlippedRight},FLIPBOOK.BookWebGL=function(t,e,i){this.wrapper=t,this.options=i,this.model=e,this.options.cameraDistance=2800,this.pageW=i.pageWidth,this.pageH=i.pageHeight,this.pageW=1e3*i.pageWidth/i.pageHeight,this.pageH=1e3,i.pageWidth=this.pageW,i.pageHeight=this.pageH,this.scroll=i.scroll,this.pagesArr=i.pages,this.pages=[],this.animating=!1,this.sc=1;var o=this.wrapper.style;o.width="100%",o.height="100%",o.position="absolute",o.overflow="hidden",this.options.cameraDistance=this.options.cameraDistance/1.5},FLIPBOOK.BookWebGL.prototype=Object.create(FLIPBOOK.Book.prototype),FLIPBOOK.BookWebGL.prototype.constructor=FLIPBOOK.BookWebGL,FLIPBOOK.BookWebGL.prototype.init3d=function(){var t=this,e=jQuery(t.wrapper).width()/jQuery(t.wrapper).height(),i=this.options;this.Scene=new THREE.Scene,this.centerContainer=new THREE.Object3D,this.Scene.add(this.centerContainer),this.Camera=new THREE.PerspectiveCamera(30,e,1,1e4),this.Scene.add(this.Camera),this.zoom=i.zoomMin,this.pan=i.pan,this.tilt=i.tilt,this.updateCameraPosition();var o=this.wrapper,s=(document.createElement("canvas").getContext("webgl"),new THREE.WebGLRenderer({antialias:this.options.antialias,alpha:!0}));window.renderer=s,s.gammaInput=!0,s.gammaOutput=!0,this.options.shadows&&(s.shadowMap.enabled=!0,s.shadowMap.type=THREE.PCFShadowMap),window.webglrenderer=this.renderer=s,this.renderer.setSize(o.clientWidth,o.clientHeight);var n=window.devicePixelRatio<i.minPixelRatio?i.minPixelRatio:window.devicePixelRatio;this.renderer.setPixelRatio(n),o.appendChild(this.renderer.domElement);for(var r=!1,h=this.options.pages,a=0;a<h.length;a++)h[a].htmlContent&&(r=!0);if(this.options.hasHtmlContent=r||i.pdfMode,this.options.hasHtmlContent&&this.initHtmlContent(),this.canvas=this.renderer.domElement,this._bind("mousedown",this.canvas.parentNode.parentNode),this._bind("mousemove",this.canvas.parentNode.parentNode),this._bind("mouseout",this.canvas.parentNode.parentNode),this._bind("mouseup",this.canvas.parentNode.parentNode),this._bind("touchstart",this.canvas.parentNode.parentNode),this._bind("touchmove",this.canvas.parentNode.parentNode),this._bind("touchend",this.canvas.parentNode.parentNode),this._bind("touchcancel",this.canvas.parentNode.parentNode),this.options.lights){var p=i.lightColor,c=new THREE.SpotLight(p);if(c.intensity=i.lightIntensity,c.position.set(i.lightPositionX,i.lightPositionY,i.lightPositionZ),c.distance=4e3,this.options.shadows){c.castShadow=!0,c.shadow.bias=-2e-6,c.shadow.mapSize.x=this.options.shadowMapSize,c.shadow.mapSize.y=this.options.shadowMapSize;var l=new THREE.ShadowMaterial;l.opacity=this.options.shadowOpacity;var d=new THREE.Mesh(new THREE.BoxGeometry(1e4,1e4,1,1,1,1),l);d.position.set(0,0,-i.shadowDistance),this.Scene.add(d),d.receiveShadow=!0}this.Scene.add(c);var u=i.ambientLightColor||3355443;new THREE.AmbientLight(u)}this.centerContainer.position.set(0,0,0),this.onResize(),this.centerContainer.position.x=.5*-this.pageW*this.centerContainer.scale.x,this.updateHtmlLayerPosition(),this.flippedleft=0,this.flippedright=0,this.cameraZMin=300,this.cameraZMax=5e3,function e(){if(FLIPBOOK.TWEEN.update(),t.rendering){if(!t.enabled)return;t.needsUpdate&&(t.renderer.render(t.Scene,t.Camera),t.needsUpdate=!1,t.htmlLayer&&t.cssRenderer.render(t.Scene,t.Camera))}requestAnimationFrame(e)}()},FLIPBOOK.BookWebGL.prototype.onPageUnloaded=function(t,e){var i,o=Math.floor(t/2);this.options.rightToLeft?(o=this.pages.length-o-1,i=t%2==0?"back":"front"):i=t%2==0?"front":"back",this.pages[o].unload(i)},FLIPBOOK.BookWebGL.prototype.correctZOrder=function(){for(var t=[],e=[],i=0;i<this.pages.length;i++){var o=this.pages[i];o.angle>Math.PI/2?t.unshift(o):e.push(o)}var s=FLIPBOOK.th();for(i=0;i<t.length;i++)t[i].position.z=-Math.pow(i*s,.85);for(i=0;i<e.length;i++)e[i].position.z=-Math.pow(i*s,.85)},FLIPBOOK.BookWebGL.prototype.initHtmlContent=function(){var t=document.createElement("div");t.className="htmlLayer "+Math.random();var e=jQuery(t);this.$htmlLayer=e,this.$pageR=jQuery(document.createElement("div")).addClass("R").css({width:1e3*this.options.pageWidth/this.options.pageHeight+"px",height:"1000px",position:"absolute",top:"-500px","pointer-events":"none"}).appendTo(e),this.$pageRInner=jQuery("<div>").css("pointer-events","all").appendTo(this.$pageR),this.$pageL=jQuery(document.createElement("div")).addClass("L").css({width:1e3*this.options.pageWidth/this.options.pageHeight+"px",height:"1000px",position:"absolute",top:"-500px",left:-1e3*this.options.pageWidth/this.options.pageHeight+"px","pointer-events":"none"}).appendTo(e),this.$pageLInner=jQuery(document.createElement("div")).css("pointer-events","all").appendTo(this.$pageL),this.$pageC=jQuery(document.createElement("div")).addClass("C").css({width:2e3*this.options.pageWidth/this.options.pageHeight+"px",height:"1000px",position:"absolute",top:"-500px",left:-1e3*this.options.pageWidth/this.options.pageHeight+"px","pointer-events":"none"}).appendTo(e),this.$pageCInner=jQuery(document.createElement("div")).css("pointer-events","all").appendTo(this.$pageC),this.htmlLayer=new FLIPBOOK.CSS3DObject(t),this.Scene.add(this.htmlLayer),this.cssRenderer=new FLIPBOOK.CSS3DRenderer;this.wrapper;this.wrapper.appendChild(this.cssRenderer.domElement),this.cssRenderer.domElement.style.position="absolute",this.cssRenderer.domElement.style.top="0",this.cssRenderer.domElement.style.left="0",this.cssRenderer.domElement.style.pointerEvents="none",this.cssRenderer.domElement.className="cssRenderer "+Math.random();var i=this;this.model.on("toolSelect",function(){i.updateTool()}),this.model.on("toolMove",function(){i.updateTool()})},FLIPBOOK.BookWebGL.prototype.enablePrev=function(t){this.prevEnabled=t},FLIPBOOK.BookWebGL.prototype.enableNext=function(t){this.nextEnabled=t},FLIPBOOK.BookWebGL.prototype.isZoomed=function(){return this.options.zoom>this.options.zoomMin&&this.options.zoom>1},FLIPBOOK.BookWebGL.prototype.getRightPage=function(){return this.pages[this.flippedleft]},FLIPBOOK.BookWebGL.prototype.getNextPage=function(){return this.pages[this.flippedleft+1]},FLIPBOOK.BookWebGL.prototype.getLeftPage=function(){return this.pages[this.flippedleft-1]},FLIPBOOK.BookWebGL.prototype.getPrevPage=function(){return this.pages[this.flippedleft-2]},FLIPBOOK.BookWebGL.prototype.onSwipe=function(t,e,i,o,s,n,r){if(!this.isZoomed()){"right"==i&&(o*=-1);var h=this.getLeftPage(),a=this.getRightPage(),p=this.getNextPage(),c=this.getPrevPage();if(!this.options.rotateCameraOnMouseDrag||a&&a.dragging||h&&h.dragging||"rotate"!=this.onMouseMove&&"scroll"!=this.onMouseMove){if(("cancel"==e||"end"==e)&&n<=1){if(1==this.view&&this.draggingBook&&"left"==i)return this.nextPage(),void(this.draggingBook=!1);if(1==this.view&&this.draggingBook&&"right"==i)return this.prevPage(),void(this.draggingBook=!1);!(o<0)||a&&a.dragging?!(o>0)||h&&h.dragging?0==o&&this.clickedPage&&(this.clickedPage.isFlippedLeft?this.prevPage():this.nextPage()):this.nextPage():this.prevPage(),a&&(a.dragging=!1),h&&(h.dragging=!1)}if("move"==e&&n<=1){if(this.draggingBook)return this.centerContainer.position.x=this.draggingBookStartX-o,void this.updateHtmlLayerPosition();if(1==this.view&&this.isFocusedLeft()&&"left"==i&&this.canFlipNext())return this.draggingBookStartX=this.centerContainer.position.x,void(this.draggingBook=!0);if(1==this.view&&this.isFocusedRight()&&"right"==i)return this.draggingBookStartX=this.centerContainer.position.x,void(this.draggingBook=!0);if(o=180*o/this.wrapperW,h&&h.flipping||a&&a.flipping)return;a&&a.dragging||h&&h.dragging?h&&!a||h&&!a.dragging?o<=0&&h._setAngle(o,i):(a&&!h||a&&!h.dragging)&&o>=0&&a._setAngle(o,i):0!=o&&("right"!=i||!h||a&&a.dragging||!this.prevEnabled?"left"==i&&a&&this.nextEnabled&&(a._setAngle(o,i),p&&p.showMat()):(h._setAngle(o,i),c&&c.showMat()))}}}},FLIPBOOK.BookWebGL.prototype.onResize=function(){var t=this.model,e=t.wrapperW,i=t.wrapperH,o=this.options,s=e/i,n=o.pageWidth/o.pageHeight;if(i<1e3&&1==window.devicePixelRatio)this.renderer.setPixelRatio(2);else{var r=window.devicePixelRatio<o.minPixelRatio?o.minPixelRatio:window.devicePixelRatio;this.renderer.setPixelRatio(r)}var h=Math.min(this.zoom,1),a=Number(o.zoomMin);o.responsiveView&&e<=o.responsiveViewTreshold&&s<2*n&&s<o.responsiveViewRatio?(this.view=1,this.sc=n>s?a*s/(n*h):1,0==this.rightIndex||this.isFocusedRight()?this.focusRight():this.focusLeft()):(this.view=2,this.sc=s<2*n?a*s/(2*n*h):1,0==this.flippedleft?this.focusRight():0==this.flippedright?this.focusLeft():this.focusBoth()),this.renderer.setSize(e,i),this.htmlLayer&&(this.cssRenderer.setSize(e,i),this.htmlLayer.scale.set(this.sc,this.sc,this.sc)),this.Camera.aspect=e/i,this.Camera.updateProjectionMatrix(),this.updateCameraPosition(),this.updateBookPosition(),this.options.main.turnPageComplete(),this.wrapperW=e,this.wrapperH=i},FLIPBOOK.BookWebGL.prototype.updateCameraPosition=function(){var t,e=Math.PI*this.tilt/180,i=this.options.cameraDistance*Math.sin(e)/this.zoom,o=this.options.cameraDistance*Math.cos(e)/this.zoom;this.centerContainer.scale.set(this.sc,this.sc,this.sc),e=Math.PI*this.pan/180,t=Math.sin(e)*o,o=Math.cos(e)*o,this.cameraZ=o,this.Camera.position.set(Math.round(t),Math.round(i),Math.round(o)),this.Camera.lookAt(this.Scene.position),this.needsUpdate=!0},FLIPBOOK.BookWebGL.prototype.createPages=function(){var t,e,i,o=this.options,s=o.pageMiddleShadowSize,n=document.createElement("canvas");n.width=64,n.height=64;var r=n.getContext("2d"),h=r.createLinearGradient(64-s,0,64,0);h.addColorStop(0,"#AAAAAA"),h.addColorStop(1,o.pageMiddleShadowColorL),r.fillStyle=h,r.fillRect(0,0,64,64);var a=new THREE.CanvasTexture(n);a.needsUpdate=!0,this.specularB=a;var p=document.createElement("canvas");p.width=64,p.height=64;var c=p.getContext("2d"),l=c.createLinearGradient(0,0,s,0);l.addColorStop(0,o.pageMiddleShadowColorR),l.addColorStop(1,"#AAAAAA"),c.fillStyle=l,c.fillRect(0,0,64,64);var d,u,f=new THREE.CanvasTexture(p);if(f.needsUpdate=!0,this.specularF=f,this.options.pagePreloader){var g=(new THREE.TextureLoader).load(this.options.pagePreloader,function(){});this.options.lights?(d=new THREE.MeshStandardMaterial({map:g,roughness:this.options.pageRoughness,metalness:this.options.pageMetalness,emissive:0,color:15592941,lightMap:this.specularF}),u=new THREE.MeshStandardMaterial({map:g,roughness:this.options.pageRoughness,metalness:this.options.pageMetalness,emissive:0,color:15592941,lightMap:this.specularB})):d=u=new THREE.MeshBasicMaterial({map:g,color:15592941})}else this.options.lights?(d=new THREE.MeshStandardMaterial({roughness:this.options.pageRoughness,metalness:this.options.pageMetalness,emissive:0,color:15592941,lightMap:this.specularF}),u=new THREE.MeshStandardMaterial({roughness:this.options.pageRoughness,metalness:this.options.pageMetalness,emissive:0,color:15592941,lightMap:this.specularB})):d=u=new THREE.MeshBasicMaterial({color:15592941});FLIPBOOK.th=function(){return 2};var m=FLIPBOOK.th(),y=this.options.pages.length/2;for(this.options.cover||(y+=1),i=0;i<y;i++)t=0==i||i==y-1?this.options.coverHardness:this.options.pageHardness,e=new FLIPBOOK.PageWebGL(this,i,t,this.options,d,u),this.pages.push(e),this.centerContainer.add(e),this.flippedright++;this.correctZOrder(),this.bg&&(this.bg.position.z=-y*m-5),this.initialized=!0},FLIPBOOK.BookWebGL.prototype.getNumPages=function(){return this.pages.length},FLIPBOOK.BookWebGL.prototype.centerContainer=function(){return this.centerContainer},FLIPBOOK.BookWebGL.prototype.goToPage=function(t,e,i){if(this.initialized){if(e)for(var o=0;o<this.pages.length;o++)if(this.pages[o].flippingLeft||this.pages[o].flippingRight)return;if(t<0&&(t=0),t>this.options.pages.length&&(t=this.options.pages.length),1==this.view&&!i){var s=e?0:300;t%2==0?this.focusLeft(s):this.focusRight(s)}if(t%2!=0&&t--,t==this.rightIndex)return this.loadPages(),void this.turnPageComplete();this.goingToPage=!0;r=this;var n=1e3*this.options.pageFlipDuration/6;if(void 0!==e&&e){if(t>r.rightIndex)for(;r.rightIndex<t;)this.nextPageInstant();else for(;r.rightIndex>t;)this.prevPageInstant();return this.updateBookPosition(),this.loadPages(),void this.turnPageComplete()}this.rightIndex>t?(n=1/(this.rightIndex-t)*this.options.pageFlipDuration*1e3/6,this.rightIndex-t>10&&(n=0),this.rightIndex-2>t?(this.prevPage(!1),n>0?setTimeout(function(){r.goToPage(t,e,1)},n):r.goToPage(t,e,1)):(this.prevPage(),setTimeout(function(){if(void 0!==e&&e)for(var t=0;t<r.pages.length;t++)r.pages[t].duration=r.options.pageFlipDuration;r.loadPages()},n))):this.rightIndex<t&&(n=-1/(this.rightIndex-t)*this.options.pageFlipDuration*1e3/6,this.rightIndex-t<-10&&(n=0),this.rightIndex+2<t?(this.nextPage(!1),n>0?setTimeout(function(){r.goToPage(t,e,1)},n):r.goToPage(t,e,1)):(this.nextPage(),setTimeout(function(){if(void 0!==e&&e)for(var t=0;t<r.pages.length;t++)r.pages[t].duration=r.options.pageFlipDuration;r.loadPages()},n)))}else{var r=this;setTimeout(function(){r.goToPage(t,e)},100)}},FLIPBOOK.BookWebGL.prototype.nextPageInstant=function(t){if(0!=this.flippedright){var e;for(e=0;e<this.pages.length;e++)if(this.pages[e].flippingRight)return;if(1==this.view){if(this.isFocusedLeft()){if(!this.goingToPage)return this.focusRight(0),void this.turnPageComplete();this.focusLeft(0,0)}}else 1==this.flippedright?this.focusLeft(0):this.focusBoth(0);this.pages[this.pages.length-this.flippedright].flipLeftInstant(),this.flippedleft++,this.flippedright--,this.setRightIndex(this.rightIndex+2),this.updateBookPosition()}},FLIPBOOK.BookWebGL.prototype.setRightIndex=function(t){this.rightIndex=t},FLIPBOOK.BookWebGL.prototype.prevPageInstant=function(t){if(0!=this.flippedleft){var e;for(e=0;e<this.pages.length;e++)if(this.pages[e].flippingLeft)return;if(1==this.view){if(!this.goingToPage){if(this.isFocusedRight())return this.focusLeft(0),void this.turnPageComplete();this.focusRight(0,0)}}else 1==this.flippedleft?this.focusRight(0):this.focusBoth(0);this.pages[this.flippedleft-1].flipRightInstant(),this.flippedleft--,this.flippedright++,this.setRightIndex(this.rightIndex-2),this.updateBookPosition()}},FLIPBOOK.BookWebGL.prototype.nextPage=function(t){if(this.nextEnabled){var e;this.clickedPage=null;var i=0;for(e=0;e<this.pages.length;e++){if(this.pages[e].flippingRight)return;this.pages[e].flipping&&i++}if(1!=this.view||this.goingToPage||!this.isFocusedLeft()){var o=this.pages[this.pages.length-this.flippedright];if(o){this.pages[o.index-2],this.pages[o.index-3];var s=this.pages[o.index+1];if(s||this.options.backCover||this.options.rightToLeft){if(s&&i<5&&s.showMat(),1==this.view?this.goingToPage||this.focusLeft(600,200):1==this.flippedright&&this.options.cover?this.focusLeft(500):this.focusBoth(500),!o.flipping){var n,r=this;(void 0===t||t)&&(n=function(t){r.loadPages(),r.turnPageComplete()}),this.loadNextSpread(),o.flipLeft(n)}this.flippedleft++,this.flippedright--,this.setRightIndex(this.rightIndex+2)}}}else this.focusRight(300,0,this.turnPageComplete)}},FLIPBOOK.BookWebGL.prototype.updateBookPosition=function(){1==this.view?0==this.flippedright?this.focusLeft():0==this.flippedleft?this.focusRight():this.isFocusedLeft()?this.focusLeft():this.focusRight():0==this.rightIndex?this.focusRight():this.rightIndex>=this.options.numPages&&this.options.cover?this.focusLeft():this.focusBoth(),this.updateHtmlLayerPosition(),this.needsUpdate=!0},FLIPBOOK.BookWebGL.prototype.updateHtmlLayerPosition=function(){this.htmlLayer&&(this.htmlLayer.position.x=this.centerContainer.position.x,this.htmlLayer.position.y=this.centerContainer.position.y),this.needsUpdate=!0},FLIPBOOK.BookWebGL.prototype.turnPageComplete=function(){this.goingToPage=!1,this.options.main.turnPageComplete()},FLIPBOOK.BookWebGL.prototype.loadPages=function(){for(var t=this,e=this.pages,i=this.options.main,o=0;o<e.length;o++){if((a=e[o]).flippingLeft||a.flippingRight)return}this.options.cornerCurl&&this.pages[0]&&(0==this.flippedleft?this.pages[0].startCornerCurl():this.pages[0].stopCornerCurl());var s=this.pages[this.flippedleft],n=this.pages[this.flippedleft-1],r=(this.pages[this.flippedleft-2],this.pages[this.flippedleft+1],this.pages[this.flippedleft-3],this.pages[this.flippedleft+2],this.updateHtmlLayer),h=this.loadMorePages;for(o=0;o<e.length;o++){var a;(a=e[o])!==s&&a!==n||a.showMat(),n&&a.index<n.index-2&&(a.hideMat(),this.options.pdfMode||a.disposeMat()),s&&a.index>s.index+2&&(a.hideMat(),this.options.pdfMode||a.disposeMat())}i.setLoadingProgress(.1),n?n.load("back",function(e){s?s.load("front",function(e){n.loadHTML("back",function(){s.loadHTML("front",function(){r.call(t)})}),i.setLoadingProgress(1),h.call(t)}):(n.loadHTML("back",function(){r.call(t)}),i.setLoadingProgress(1),h.call(t))}):s.load("front",function(e){s.loadHTML("front",function(){r.call(t)}),i.setLoadingProgress(1),h.call(t)})},FLIPBOOK.BookWebGL.prototype.focusLeft=function(t,e,i){this.options.pageHeight;var o=this.options.pageWidth,s=(this.wrapperW,this.wrapperH,this.zoom,.5*o*this.centerContainer.scale.x);this.moveToPos({x:s,y:0},t,e,i)},FLIPBOOK.BookWebGL.prototype.focusRight=function(t,e,i){this.options.pageHeight;var o=this.options.pageWidth,s=(this.wrapperW,this.wrapperH,this.zoom,.5*-o*this.centerContainer.scale.x);this.moveToPos({x:s,y:0},t,e,i)},FLIPBOOK.BookWebGL.prototype.focusBoth=function(t,e,i){this.options.pageHeight,this.options.pageWidth,this.wrapperW,this.wrapperH,this.zoom;this.moveToPos({x:0,y:0},t,e,i)},FLIPBOOK.BookWebGL.prototype.moveToPos=function(t,e,i,o){if(e&&this.movingTo!=t&&this.centerContainer.position.x!=t.x){var s=this;this.movingTo=t,this.bookMoveTween&&this.bookMoveTween.stop(),this.bookMoveTween=new FLIPBOOK.TWEEN.Tween(this.centerContainer.position).to({x:t.x,y:t.y},e).easing(FLIPBOOK.TWEEN.Easing.Sinusoidal.Out).onUpdate(function(){s.updateHtmlLayerPosition()}).onComplete(function(){s.movingTo=null,s.updateHtmlLayerPosition(),o&&o.call(s)}).delay(i||0).start()}else this.centerContainer.position.x=t.x,this.centerContainer.position.y=t.y,o&&o.call(this)},FLIPBOOK.BookWebGL.prototype.isFocusedLeft=function(){return this.centerContainer.position.x>0},FLIPBOOK.BookWebGL.prototype.isFocusedRight=function(){return this.centerContainer.position.x<0},FLIPBOOK.BookWebGL.prototype.prevPage=function(t){if(this.prevEnabled){var e;this.clickedPage=null;var i=0;for(e=0;e<this.pages.length;e++){if(this.pages[e].flippingLeft)return;this.pages[e].flipping&&i++}if(1!=this.view||this.goingToPage||!this.isFocusedRight()){var o=this.pages[this.flippedleft-1];if(o&&(1!=this.flippedleft||this.options.cover)){var s=this.pages[o.index-1];if(s||!this.options.rightToLeft||this.options.backCover){this.pages[o.index+2],this.pages[o.index+3];if(s&&i<5&&s.showMat(),1==this.view?this.goingToPage||this.focusRight(600,200):1==this.flippedleft?this.focusRight(500):this.focusBoth(500),!o.flipping){var n,r=this;(void 0===t||t)&&(n=function(t){r.loadPages(),r.turnPageComplete()}),this.loadPrevSpread(),o.flipRight(n)}this.flippedleft--,this.flippedright++,this.setRightIndex(this.rightIndex-2)}}}else this.focusLeft(300,0,this.turnPageComplete)}},FLIPBOOK.BookWebGL.prototype.firstPage=function(){},FLIPBOOK.BookWebGL.prototype.flipFinnished=function(){this.correctZOrder(),this.needsUpdate=!0},FLIPBOOK.BookWebGL.prototype.lastPage=function(){},FLIPBOOK.BookWebGL.prototype.updateVisiblePages=function(){},FLIPBOOK.BookWebGL.prototype.loadPrevSpread=function(){var t=this.pages[this.flippedleft-2];t&&t.load("back",function(){});var e=this.pages[this.flippedleft-1];e&&e.load("front",function(){})},FLIPBOOK.BookWebGL.prototype.loadNextSpread=function(){var t=this.pages[this.flippedleft];t&&t.load("back",function(){});var e=this.pages[this.flippedleft+1];e&&e.load("front",function(){})},FLIPBOOK.BookWebGL.prototype.loadMorePages=function(){var t=this.options.loadPagesF,e=this.options.loadPagesB;this.pages[this.flippedleft],this.pages[this.flippedleft-1];if(t)for(var i=0;i<t;i++){(o=this.pages[this.flippedleft+i])&&o.load("back",function(){},!0),(s=this.pages[this.flippedleft+i+1])&&s.load("front",function(){},!0)}if(e)for(i=0;i<t;i++){var o,s;(o=this.pages[this.flippedleft-2-i])&&o.load("back",function(){},!0),(s=this.pages[this.flippedleft-1-i])&&s.load("front",function(){},!0)}},FLIPBOOK.BookWebGL.prototype.updateHtmlLayer=function(){if(this.htmlLayer){for(var t=0;t<this.pages.length;t++)if(this.pages[t].flipping)return;if(this.htmlContentRightIndex!=this.rightIndex){this.htmlContentRightIndex=this.rightIndex,this.htmlLayerVisible=!1;var e,i=this.options.rightToLeft?this.options.pages.length-this.rightIndex-1:this.rightIndex,o=this.options.rightToLeft?i+1:i-1;this.options.cover||(i--,o--),this.$pageL.hide(),this.$pageC.hide(),this.$pageR.hide(),this.$pageRInner.empty(),this.$pageLInner.empty(),this.$pageCInner.empty(),this.options.doublePage?0==this.rightIndex?(e=this.options.pages[i].htmlContent)?(jQuery(e).appendTo(this.$pageRInner),this.$pageR.show(),this.htmlLayerVisible=!0):this.$pageR.hide():this.rightIndex==2*this.pages.length?(e=this.options.pages[o].htmlContent)&&(jQuery(e).appendTo(this.$pageLInner),this.$pageL.show(),this.htmlLayerVisible=!0):(e=this.options.pages[o].htmlContent||this.options.pages[i].htmlContent)&&(jQuery(e).appendTo(this.$pageCInner),this.$pageC.show(),this.htmlLayerVisible=!0):(0!=this.rightIndex&&(e=this.options.pages[o].htmlContent)&&(jQuery(this.options.pages[o].htmlContent).appendTo(this.$pageLInner),this.$pageL.show(),this.htmlLayerVisible=!0),this.rightIndex==2*this.pages.length||(e=this.options.pages[i].htmlContent)&&(jQuery(this.options.pages[i].htmlContent).appendTo(this.$pageRInner),this.$pageR.show(),this.htmlLayerVisible=!0)),this.htmlLayer&&this.htmlLayer.element.querySelectorAll(".flipbook-page-item").forEach(function(t){"VIDEO"!=t.nodeName&&"AUDIO"!=t.nodeName||!t.autoplay||(t.readyState<4?t.oncanplay=function(){this.play()}:t.play())}),this.updateTool()}}},FLIPBOOK.BookWebGL.prototype.updateTool=function(){"toolSelect"==this.options.main.tool?jQuery(".flipbook-textLayer").css("pointer-events","auto").removeClass(".flipbook-noselect"):jQuery(".flipbook-textLayer").css("pointer-events","none").addClass(".flipbook-noselect")},FLIPBOOK.BookWebGL.prototype.onZoom=function(){},FLIPBOOK.BookWebGL.prototype.render=function(t){this.rendering=t},FLIPBOOK.BookWebGL.prototype.zoomTo=function(t,e,i,o){if(!this.zooming&&this.pages.length){void 0===e&&(e=0);var s=this.centerContainer.position;if(void 0!==i&&void 0!==o){var n=this.zoom*this.wrapper.clientHeight/1e3,r=t*this.wrapper.clientHeight/1e3,h=(this.zoom,this.centerContainer.position),a={x:(i-this.wrapper.clientWidth/2)/n-h.x,y:(-o+this.wrapper.clientHeight/2)/n-h.y},p={x:(i-this.wrapper.clientWidth/2)/r-h.x,y:(-o+this.wrapper.clientHeight/2)/r-h.y};(s=h).x=h.x-(a.x-p.x),s.y=h.y-(a.y-p.y)}var c=this;this.options;if(newZoom=t>this.options.zoomMax?this.options.zoomMax:t,newZoom=t<this.options.zoomMin?this.options.zoomMin:t,newZoom==this.options.zoom){this.options;var l=this.isFocusedLeft();1==this.view?l?this.focusLeft():this.focusRight():this.centerContainer.position.set(0,0,0),this.updateBookPosition()}(e=0)>0?this.zooming||(this.zooming=!0,new FLIPBOOK.TWEEN.Tween(this).to({zoom:newZoom},e).easing(FLIPBOOK.TWEEN.Easing.Sinusoidal.In).onUpdate(this.updateCameraPosition).onComplete(function(){c.zooming=!1}).start(),new FLIPBOOK.TWEEN.Tween(this.centerContainer.position).to({x:s.x,y:s.y},e).easing(FLIPBOOK.TWEEN.Easing.Sinusoidal.In).onUpdate(function(){}).onComplete(function(){}).start(),this.htmlLayer&&new FLIPBOOK.TWEEN.Tween(this.htmlLayer.position).to({x:s.x,y:s.y},e).easing(FLIPBOOK.TWEEN.Easing.Sinusoidal.In).start()):(this.zoom=newZoom,this.centerContainer.position.set(s.x,s.y,0),c.updateHtmlLayerPosition(),this.updateCameraPosition(),this.zooming=!1),t<=1&&t<=this.zoom&&this.updateBookPosition(),this.options.main.onZoom(newZoom),this.loadPages()}},FLIPBOOK.BookWebGL.prototype.tiltTo=function(t){var e=this.tilt+.3*t;e=(e=e>this.options.tiltMax?this.options.tiltMax:e)<this.options.tiltMin?this.options.tiltMin:e,this.tilt=e,this.updateCameraPosition()},FLIPBOOK.BookWebGL.prototype.panTo=function(t){var e=this.pan-.2*t;e=(e=e>this.options.panMax?this.options.panMax:e)<this.options.panMin?this.options.panMin:e,this.pan=e,this.updateCameraPosition()},FLIPBOOK.BookWebGL.prototype._bind=function(t,e,i){(e||this.wrapper).addEventListener(t,this,!!i)},FLIPBOOK.BookWebGL.prototype.handleEvent=function(t){switch(t.type){case"mousedown":this._start(t);break;case"touchstart":this._touchstart(t);break;case"touchmove":this._touchmove(t);break;case"mousemove":this._move(t);break;case"mouseout":jQuery(this.wrapper).trigger("mouseup"),this.mouseDown=!1;break;case"mouseup":case"touchend":this._end(t)}},FLIPBOOK.BookWebGL.prototype.resetCameraPosition=function(){this.centerContainer.position.set(0,0,0)},FLIPBOOK.BookWebGL.prototype._start=function(t){this.mouseDown=!0,this.onMouseMove="",this.pointX=t.pageX,this.pointY=t.pageY,this.startPoint=t;var e=this._getVector(t);e.unproject(this.Camera);var i=new THREE.Raycaster(this.Camera.position,e.sub(this.Camera.position).normalize()).intersectObjects(this.pages,!0);this.pageMouseDown=i.length>0,"canvas"==t.target.nodeName.toLowerCase()&&!this.pageMouseDown&&this.options.lightBox&&this.options.lightboxCloseOnClick&&this.options.main.lightbox.closeLightbox()},FLIPBOOK.BookWebGL.prototype._touchstart=function(t){if(t.touches.length>1){this.touches=[],this.touches[0]={pageX:t.touches[0].pageX,pageY:t.touches[0].pageY},this.touches[1]={pageX:t.touches[1].pageX,pageY:t.touches[1].pageY};var e=Math.abs(this.touches[0].pageX-this.touches[1].pageX),i=Math.abs(this.touches[0].pageY-this.touches[1].pageY);this.touchesDistStart=Math.sqrt(e*e+i*i)}else t=t.touches[0],this._start(t)},FLIPBOOK.BookWebGL.prototype._getVector=function(t){var e=jQuery(this.canvas).width(),i=jQuery(this.canvas).height(),o=t.pageX-jQuery(this.canvas).offset().left,s=t.pageY-jQuery(this.canvas).offset().top;jQuery(this.canvas).offset().x,jQuery(this.canvas).offset().y;return new THREE.Vector3(o/e*2-1,-s/i*2+1,.5)},FLIPBOOK.BookWebGL.prototype._touchmove=function(t){t.touches.length>1||(t=t.touches[0],this._move(t))},FLIPBOOK.BookWebGL.prototype.move=function(t){if(!(this.zoom<=1)){var e=0,i=0;switch(t){case"left":e=20;break;case"right":e=-20;break;case"up":i=20;break;case"down":i=-20}this.centerContainer.position.x+=1e4*e/(this.cameraZ*this.zoom*this.zoom),this.centerContainer.position.y-=1e4*i/(this.cameraZ*this.zoom*this.zoom),this.updateHtmlLayerPosition()}},FLIPBOOK.BookWebGL.prototype._move=function(t){var e=this._getVector(t);e.unproject(this.Camera);var i=new THREE.Raycaster(this.Camera.position,e.sub(this.Camera.position).normalize()).intersectObjects(this.pages,!0),o=t,s=.5*(o.pageX-this.pointX),n=.5*(o.pageY-this.pointY);if(this.pointX=o.pageX,this.pointY=o.pageY,!this.mouseDown)return this.onMouseMove="",void(this.options.rotateCameraOnMouseMove&&(this.tilt=this.options.tiltMin2+(this.options.tiltMax2-this.options.tiltMin2)*(1-this.pointY/jQuery(this.canvas).height()),this.pan=this.options.panMin2+(this.options.panMax2-this.options.panMin2)*this.pointX/jQuery(this.canvas).width(),this.updateCameraPosition()));if(i.length>0?""==this.onMouseMove&&this.zoom>1&&(this.onMouseMove="scroll"):""==this.onMouseMove&&(this.onMouseMove="rotate"),"scroll"==this.onMouseMove){if("toolSelect"==this.options.main.tool)return;0==s&&0==n||(this.moved=!0,this.centerContainer.position.x+=1e4*s/(this.cameraZ*this.zoom*this.zoom),this.centerContainer.position.y-=1e4*n/(this.cameraZ*this.zoom*this.zoom)),this.updateHtmlLayerPosition()}else if("rotate"==this.onMouseMove){var r=this.getRightPage(),h=this.getLeftPage();this.options.rotateCameraOnMouseMove||!this.options.rotateCameraOnMouseDrag||h&&h.dragging||r&&r.dragging||this.tiltTo(n)}},FLIPBOOK.BookWebGL.prototype._end=function(t){this.mouseDown=!1,void 0!==t.changedTouches&&(t=t.changedTouches[0]),this.pointX=t.pageX,this.pointY=t.pageY,this.endPoint=t;var e=this._getVector(this.endPoint);e.unproject(this.Camera);var i=new THREE.Raycaster(this.Camera.position,e.sub(this.Camera.position).normalize()).intersectObjects(this.pages,!0);if(i.length>0&&this.pageMouseDown&&!this.moved){var o=i[0];this.clickedPage=o.object.parent}this.pageMouseDown=!1,this.moved=!1},FLIPBOOK.BookWebGL.prototype.moveCamera=function(t,e){},FLIPBOOK.BookWebGL.prototype.enable=function(){this.enabled?this.onResize():(this.enabled=!0,this.initialized||(this.init3d(),this.createPages(),this.rendering=!1,this.onResize()),this.render(!0),this.onResize())},FLIPBOOK.BookWebGL.prototype.disable=function(){this.enabled=!1,this.render(!1)};var MOD3=MOD3||{};!function(t){t.Constants={PI:Math.PI,invPI:1/Math.PI,halfPI:.5*Math.PI,doublePI:2*Math.PI,toRad:1/180*Math.PI,toDeg:1/180*Math.PI},t.ModConstant={LEFT:-1,RIGHT:1,NONE:0,X:1,Y:2,Z:4}}(MOD3),function(t){var e=t.Constants;t.XMath={},t.XMath.normalize=function(e,i,o){return i-e==0?1:t.XMath.trim(0,1,(o-e)/i)},t.XMath.toRange=function(t,e,i){return e-t==0?0:t+(e-t)*i},t.XMath.inRange=function(t,e,i,o){return void 0===o&&(o=!1),o?i>=t&&i<=e:i>t&&i<e},t.XMath.sign=function(t,e){return void 0===e&&(e=0),0==t?e:t>0?1:-1},t.XMath.trim=function(t,e,i){return Math.min(e,Math.max(t,i))},t.XMath.wrap=function(t,e,i){return i<t?i+(e-t):i>=e?i-(e-t):i},t.XMath.degToRad=function(t){return t*e.toRad},t.XMath.radToDeg=function(t){return t*e.toDeg},t.XMath.presicion=function(t,e){var i=Math.pow(10,e);return Math.round(t*i)/i},t.XMath.uceil=function(t){return t<0?Math.floor(t):Math.ceil(t)}}(MOD3),function(t){t.Range=function(t,e){this.start=0,this.end=1,void 0!==t&&(this.start=t),void 0!==e&&(this.end=e)},t.Range.prototype.getSize=function(){return this.end-this.start},t.Range.prototype.move=function(t){this.start+=t,this.end+=t},t.Range.prototype.isIn=function(t){return t>=this.start&&t<=this.end},t.Range.prototype.normalize=function(e){return t.XMath.normalize(this.start,this.end,e)},t.Range.prototype.toRange=function(e){return t.XMath.toRange(this.start,this.end,e)},t.Range.prototype.trim=function(e){return t.XMath.trim(this.start,this.end,e)},t.Range.prototype.interpolate=function(t,e){return this.toRange(e.normalize(t))},t.Range.prototype.toString=function(){return"["+this.start+" - "+this.end+"]"}}(MOD3),function(t){t.Phase=function(t){this.value=0,void 0!==t&&(this.value=t)},t.Phase.prototype.getPhasedValue=function(){return Math.sin(this.value)},t.Phase.prototype.getAbsPhasedValue=function(){return Math.abs(this.getPhasedValue())},t.Phase.prototype.getNormValue=function(){return.5*(this.getPhasedValue()+1)}}(MOD3),function(t){t.Point=function(t,e){this.y=this.x=0,void 0!==t&&(this.x=t),void 0!==e&&(this.y=e)},t.Point.prototype.clone=function(){return new t.Point(this.x,this.y)}}(MOD3),function(t){t.Matrix=function(t,e,i,o){this.m11=1,this.m21=this.m12=0,this.m22=1,void 0!==t&&(this.m11=t),void 0!==e&&(this.m12=e),void 0!==i&&(this.m21=i),void 0!==o&&(this.m22=o)},t.Matrix.prototype.rotate=function(t){var e=Math.cos(t);t=Math.sin(t);return this.m11=e,this.m12=-t,this.m21=t,this.m22=e,this},t.Matrix.prototype.scale=function(t,e){return this.m21=this.m12=0,void 0!==t&&(this.m22=this.m11=t),void 0!==e&&(this.m22=e),this},t.Matrix.prototype.multiply=function(t){var e=this.m11,i=this.m12,o=this.m21,s=this.m22,n=t.m11,r=t.m12,h=t.m21;t=t.m22;return this.m11=e*n+i*h,this.m12=e*r+i*t,this.m21=o*n+s*h,this.m22=o*r+s*t,this},t.Matrix.prototype.transformPoint=function(e){return new t.Point(this.m11*e.x+this.m12*e.y,this.m21*e.x+this.m22*e.y)}}(MOD3),function(t){t.Vector3=function(t,e,i){this.z=this.y=this.x=null,this.x=t,this.y=e,this.z=i},t.Vector3.ZERO=function(){return new t.Vector3(0,0,0)},t.Vector3.dot=function(t,e){return t.x*e.x+t.y*e.y+t.z*e.z},t.Vector3.prototype.clone=function(){return new t.Vector3(this.x,this.y,this.z)},t.Vector3.prototype.equals=function(t){return this.x==t.x&&this.y==t.y&&this.z==t.z},t.Vector3.prototype.zero=function(){this.x=this.y=this.z=0},t.Vector3.prototype.negate=function(){return new t.Vector3(-this.x,-this.y,-this.z)},t.Vector3.prototype.add=function(e){return new t.Vector3(this.x+e.x,this.y+e.y,this.z+e.z)},t.Vector3.prototype.subtract=function(e){return new t.Vector3(this.x-e.x,this.y-e.y,this.z-e.z)},t.Vector3.prototype.multiplyScalar=function(e){return new t.Vector3(this.x*e,this.y*e,this.z*e)},t.Vector3.prototype.multiply=function(e){return new t.Vector3(this.x*e.x,this.y*e.y,this.z*e.z)},t.Vector3.prototype.divide=function(e){return e=1/e,new t.Vector3(this.x*e,this.y*e,this.z*e)},t.Vector3.prototype.normalize=function(){var t=this.x,e=this.y,i=this.z;(t=t*t+e*e+i*i)>0&&(t=1/Math.sqrt(t),this.x*=t,this.y*=t,this.z*=t)},t.Vector3.prototype.getMagnitude=function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},t.Vector3.prototype.setMagnitude=function(t){this.normalize(),this.x*=t,this.y*=t,this.z*=t},t.Vector3.prototype.toString=function(){return"["+this.x+" , "+this.y+" , "+this.z+"]"},t.Vector3.prototype.sum=function(t,e){return t.add(e)},t.Vector3.prototype.dot=function(t,e){return t.x*e.x+t.y*e.y+t.z*e.z},t.Vector3.prototype.cross=function(e,i){var o=e.x,s=e.y,n=e.z,r=i.x,h=i.y,a=i.z;return new t.Vector3(s*a-n*h,n*r-o*a,o*h-s*r)},t.Vector3.prototype.distance=function(t,e){var i=t.x-e.x,o=t.y-e.y,s=t.z-e.z;return Math.sqrt(i*i+o*o+s*s)}}(MOD3),function(t){t.Matrix4=function(t,e,i,o,s,n,r,h,a,p,c,l,d,u,f,g){this.n11=1,this.n21=this.n14=this.n13=this.n12=0,this.n22=1,this.n32=this.n31=this.n24=this.n23=0,this.n33=1,this.n43=this.n42=this.n41=this.n34=0,this.n44=1,void 0!==t&&(this.n11=t),void 0!==e&&(this.n12=e),void 0!==i&&(this.n13=i),void 0!==o&&(this.n14=o),void 0!==s&&(this.n21=s),void 0!==n&&(this.n22=n),void 0!==r&&(this.n23=r),void 0!==h&&(this.n24=h),void 0!==a&&(this.n31=a),void 0!==p&&(this.n32=p),void 0!==c&&(this.n33=c),void 0!==l&&(this.n34=l),void 0!==d&&(this.n41=d),void 0!==u&&(this.n42=u),void 0!==f&&(this.n43=f),void 0!==g&&(this.n44=g)},t.Matrix4.prototype.translationMatrix=function(t,e,i){return this.n14=t,this.n24=e,this.n34=i,this},t.Matrix4.prototype.scaleMatrix=function(t,e,i){return this.n11=t,this.n22=e,this.n33=i,this},t.Matrix4.prototype.rotationMatrix=function(t,e,i,o){var s=Math.cos(o),n=Math.sin(o),r=t*e*(o=1-s),h=e*i*o,a=t*i*o,p=n*i,c=n*e;return n*=t,this.n11=s+t*t*o,this.n12=-p+r,this.n13=c+a,this.n14=0,this.n21=p+r,this.n22=s+e*e*o,this.n23=-n+h,this.n24=0,this.n31=-c+a,this.n32=n+h,this.n33=s+i*i*o,this.n34=0,this},t.Matrix4.prototype.calculateMultiply=function(t,e){var i=t.n11,o=e.n11,s=t.n21,n=e.n21,r=t.n31,h=e.n31,a=t.n12,p=e.n12,c=t.n22,l=e.n22,d=t.n32,u=e.n32,f=t.n13,g=e.n13,m=t.n23,y=e.n23,x=t.n33,M=e.n33,v=t.n14,P=e.n14,L=t.n24,O=e.n24,b=t.n34,w=e.n34;this.n11=i*o+a*n+f*h,this.n12=i*p+a*l+f*u,this.n13=i*g+a*y+f*M,this.n14=i*P+a*O+f*w+v,this.n21=s*o+c*n+m*h,this.n22=s*p+c*l+m*u,this.n23=s*g+c*y+m*M,this.n24=s*P+c*O+m*w+L,this.n31=r*o+d*n+x*h,this.n32=r*p+d*l+x*u,this.n33=r*g+d*y+x*M,this.n34=r*P+d*O+x*w+b},t.Matrix4.prototype.multiply=function(t,e){return this.calculateMultiply(t,e),this},t.Matrix4.prototype.multiplyVector=function(t,e){var i=e.x,o=e.y,s=e.z;e.x=i*t.n11+o*t.n12+s*t.n13+t.n14,e.y=i*t.n21+o*t.n22+s*t.n23+t.n24,e.z=i*t.n31+o*t.n32+s*t.n33+t.n34}}(MOD3),function(t){t.VertexProxy=function(t){this.originalZ=this.originalY=this.originalX=this.ratioZ=this.ratioY=this.ratioX=null,void 0!==t&&(this.vertex=t)},t.VertexProxy.prototype.setVertex=function(){},t.VertexProxy.prototype.setRatios=function(t,e,i){this.ratioX=t,this.ratioY=e,this.ratioZ=i},t.VertexProxy.prototype.setOriginalPosition=function(t,e,i){this.originalX=t,this.originalY=e,this.originalZ=i},t.VertexProxy.prototype.getX=function(){},t.VertexProxy.prototype.getY=function(){},t.VertexProxy.prototype.getZ=function(){},t.VertexProxy.prototype.setX=function(){},t.VertexProxy.prototype.setY=function(){},t.VertexProxy.prototype.setZ=function(){},t.VertexProxy.prototype.getValue=function(e){switch(e){case t.ModConstant.X:return this.getX();case t.ModConstant.Y:return this.getY();case t.ModConstant.Z:return this.getZ()}return 0},t.VertexProxy.prototype.setValue=function(e,i){switch(e){case t.ModConstant.X:this.setX(i);break;case t.ModConstant.Y:this.setY(i);break;case t.ModConstant.Z:this.setZ(i)}},t.VertexProxy.prototype.getRatio=function(e){switch(e){case t.ModConstant.X:return this.ratioX;case t.ModConstant.Y:return this.ratioY;case t.ModConstant.Z:return this.ratioZ}return-1},t.VertexProxy.prototype.getOriginalValue=function(e){switch(e){case t.ModConstant.X:return this.originalX;case t.ModConstant.Y:return this.originalY;case t.ModConstant.Z:return this.originalZ}return 0},t.VertexProxy.prototype.reset=function(){this.setX(this.originalX),this.setY(this.originalY),this.setZ(this.originalZ)},t.VertexProxy.prototype.collapse=function(){this.originalX=this.getX(),this.originalY=this.getY(),this.originalZ=this.getZ()},t.VertexProxy.prototype.getVector=function(){return new t.Vector3(this.getX(),this.getY(),this.getZ())},t.VertexProxy.prototype.setVector=function(t){this.setX(t.x),this.setY(t.y),this.setZ(t.z)},t.VertexProxy.prototype.getRatioVector=function(){return new t.Vector3(this.ratioX,this.ratioY,this.ratioZ)}}(MOD3),function(t){t.FaceProxy=function(){this.vertices=[]},t.FaceProxy.prototype.addVertex=function(t){this.vertices.push(t)},t.FaceProxy.prototype.getVertices=function(){return this.vertices}}(MOD3),function(t){t.MeshProxy=function(){this.depth=this.height=this.width=this.minAxis=this.midAxis=this.maxAxis=this.minZ=this.minY=this.minX=this.maxZ=this.maxY=this.maxX=null,this.vertices=[],this.faces=[],this.mesh=null},t.MeshProxy.prototype.getVertices=function(){return this.vertices},t.MeshProxy.prototype.getFaces=function(){return this.faces},t.MeshProxy.prototype.analyzeGeometry=function(){for(var e,i,o,s,n,r,h,a,p,c,l=this.getVertices(),d=l.length,u=d,f=!0,g=Math.min,m=Math.max;--u>=0;)i=(e=l[u]).getX(),o=e.getY(),s=e.getZ(),f?(n=r=i,h=a=o,p=c=s,f=!1):(n=g(n,i),h=g(h,o),p=g(p,s),r=m(r,i),a=m(a,o),c=m(c,s)),e.setOriginalPosition(i,o,s);for(i=r-n,o=a-h,depth=c-p,this.width=i,this.height=o,this.depth=depth,this.minX=n,this.maxX=r,this.minY=h,this.maxY=a,this.minZ=p,this.maxZ=c,u=m(i,m(o,depth)),g=g(i,g(o,depth)),u==i&&g==o?(this.minAxis=t.ModConstant.Y,this.midAxis=t.ModConstant.Z,this.maxAxis=t.ModConstant.X):u==i&&g==depth?(this.minAxis=t.ModConstant.Z,this.midAxis=t.ModConstant.Y,this.maxAxis=t.ModConstant.X):u==o&&g==i?(this.minAxis=t.ModConstant.X,this.midAxis=t.ModConstant.Z,this.maxAxis=t.ModConstant.Y):u==o&&g==depth?(this.minAxis=t.ModConstant.Z,this.midAxis=t.ModConstant.X,this.maxAxis=t.ModConstant.Y):u==depth&&g==i?(this.minAxis=t.ModConstant.X,this.midAxis=t.ModConstant.Y,this.maxAxis=t.ModConstant.Z):u==depth&&g==o&&(this.minAxis=t.ModConstant.Y,this.midAxis=t.ModConstant.X,this.maxAxis=t.ModConstant.Z),u=d;--u>=0;)(e=l[u]).setRatios((e.getX()-n)/i,(e.getY()-h)/o,(e.getZ()-p)/depth)},t.MeshProxy.prototype.resetGeometry=function(){for(var t=this.getVertices(),e=t.length;--e>=0;)t[e].reset()},t.MeshProxy.prototype.collapseGeometry=function(){for(var t=this.getVertices(),e=t.length;--e>=0;)t[e].collapse();this.analyzeGeometry()},t.MeshProxy.prototype.getMin=function(e){switch(e){case t.ModConstant.X:return this.minX;case t.ModConstant.Y:return this.minY;case t.ModConstant.Z:return this.minZ}return-1},t.MeshProxy.prototype.getMax=function(e){switch(e){case t.ModConstant.X:return this.maxX;case t.ModConstant.Y:return this.maxY;case t.ModConstant.Z:return this.maxZ}return-1},t.MeshProxy.prototype.getSize=function(e){switch(e){case t.ModConstant.X:return this.width;case t.ModConstant.Y:return this.height;case t.ModConstant.Z:return this.depth}return-1},t.MeshProxy.prototype.setMesh=function(t){this.mesh=t,this.vertices=[],this.faces=[]},t.MeshProxy.prototype.postApply=function(){},t.MeshProxy.prototype.updateMeshPosition=function(){}}(MOD3),function(t){t.Modifier=function(){this.mod=null},t.Modifier.prototype.setModifiable=function(t){this.mod=t},t.Modifier.prototype.getVertices=function(){return this.mod.getVertices()},t.Modifier.prototype.apply=function(){}}(MOD3),MOD3.Library3d=function(){this.id="",this.vertexClass=this.meshClass=null},function(t){t.PluginFactory={},t.PluginFactory.getMeshProxy=function(t){return new t.meshClass}}(MOD3),function(t){t.ModifierStack=function(e,i){this.lib3d=e,this.stack=this.baseMesh=null,this.baseMesh=t.PluginFactory.getMeshProxy(e),this.baseMesh.setMesh(i),this.baseMesh.analyzeGeometry(),this.stack=[]},t.ModifierStack.prototype.addModifier=function(t){t.setModifiable(this.baseMesh),this.stack.push(t)},t.ModifierStack.prototype.apply=function(){this.baseMesh.resetGeometry();for(var t=this.stack,e=t.length,i=0;i<e;)t[i++].apply();this.baseMesh.postApply()},t.ModifierStack.prototype.collapse=function(){this.apply(),this.baseMesh.collapseGeometry(),this.stack=[]},t.ModifierStack.prototype.clear=function(){this.stack=[]},t.ModifierStack.prototype.getMeshInfo=function(){return this.baseMesh}}(MOD3),function(t){t.Pivot=function(e,i,o){this.pivot=new t.Vector3(e,i,o)},t.Pivot.prototype=new t.Modifier,t.Pivot.prototype.constructor=t.Pivot,t.Pivot.prototype.setMeshCenter=function(){var e=this.mod;this.pivot=new t.Vector3(-(e.minX+.5*e.width),-(e.minY+.5*e.height),-(e.minZ+.5*e.depth))},t.Pivot.prototype.apply=function(){for(var t,e,i=this.mod.getVertices(),o=i.length,s=this.pivot;--o>=0;)e=(t=i[o]).getVector().clone(),t.setVector(e.add(s));this.mod.updateMeshPosition(s.clone().negate())}}(MOD3),function(t){t.Bend=function(e,i,o){this.diagAngle=this.angle=this.offset=this.force=null,this.constraint=t.ModConstant.NONE,this.m2=this.m1=this.origin=this.height=this.width=this.mid=this.min=this.max=null,this.switchAxes=!1,this.force=e,this.offset=i,this.setAngle(o)},t.Bend.prototype=new t.Modifier,t.Bend.prototype.constructor=t.Bend,t.Bend.prototype.setAngle=function(e){this.angle=e,this.m1=new t.Matrix,this.m1.rotate(e),this.m2=new t.Matrix,this.m2.rotate(-e)},t.Bend.prototype.setModifiable=function(e){t.Modifier.prototype.setModifiable.call(this,e),this.max=this.switchAxes?this.mod.midAxis:this.mod.maxAxis,this.min=this.mod.minAxis,this.mid=this.switchAxes?this.mod.maxAxis:this.mod.midAxis,this.width=this.mod.getSize(this.max),this.height=this.mod.getSize(this.mid),this.origin=this.mod.getMin(this.max),this.diagAngle=Math.atan(this.width/this.height)},t.Bend.prototype.apply=function(){if(0!=this.force)for(var e,i,o,s,n=this.mod.getVertices(),r=n.length,h=this.width,a=this.offset,p=this.origin,c=this.max,l=this.min,d=this.mid,u=this.m1,f=this.m2,g=p+h*a,m=h/Math.PI/this.force,y=t.Constants.doublePI*(h/(m*t.Constants.doublePI)),x=1/h,M=t.Constants.halfPI,v=Math.sin,P=Math.cos;--r>=0;)e=(h=n[r]).getValue(c),i=h.getValue(d),o=h.getValue(l),e=(i=u.transformPoint(new t.Point(e,i))).x,i=i.y,s=(e-p)*x,this.constraint==t.ModConstant.LEFT&&s<=a||this.constraint==t.ModConstant.RIGHT&&s>=a||(e=v(s=M-y*a+y*s)*(m+o),s=P(s)*(m+o),o=e-m,e=g-s),e=(i=f.transformPoint(new t.Point(e,i))).x,i=i.y,h.setValue(c,e),h.setValue(d,i),h.setValue(l,o)}}(MOD3),function(t){t.Bloat=function(){this.center=t.Vector3.ZERO(),this.radius=0,this.a=.01,this.u=t.Vector3.ZERO()},t.Bloat.prototype=new t.Modifier,t.Bloat.prototype.constructor=t.Bloat,t.Bloat.prototype.setRadius=function(t){this.radius=Math.max(0,t)},t.Bloat.prototype.setA=function(t){this.a=Math.max(0,t)},t.Bloat.prototype.apply=function(){for(var t,e,i=this.mod.getVertices(),o=i.length,s=this.center,n=this.radius,r=this.a;--o>=0;)t=i[o],this.u.x=t.getX()-s.x,this.u.y=t.getY()-s.y,this.u.z=t.getZ()-s.z,e=this.u.getMagnitude(),this.u.setMagnitude(e+n*Math.exp(-e*r)),t.setX(this.u.x+s.x),t.setY(this.u.y+s.y),t.setZ(this.u.z+s.z)}}(MOD3),function(t){t.Twist=function(e){this.vector=new t.Vector3(0,1,0),this.angle=e,this.center=t.Vector3.ZERO()},t.Twist.prototype=new t.Modifier,t.Twist.prototype.constructor=t.Twist,t.Twist.prototype.apply=function(){this.vector.normalize();var e,i=(h=this.mod).getVertices(),o=i.length,s=this.vector,n=this.angle,r=this.center,h=1/new t.Vector3(.5*h.maxX,.5*h.maxY,.5*h.maxZ).getMagnitude()*n;for(r=-t.Vector3.dot(s,r);--o>=0;)e=(n=i[o]).getX()*s.x+n.getY()*s.y+n.getZ()*s.z+r,this.twistPoint(n,e*h)},t.Twist.prototype.twistPoint=function(e,i){var o=(new t.Matrix4).translationMatrix(e.getX(),e.getY(),e.getZ());o=(new t.Matrix4).multiply((new t.Matrix4).rotationMatrix(this.vector.x,this.vector.y,this.vector.z,i),o);e.setX(o.n14),e.setY(o.n24),e.setZ(o.n34)}}(MOD3),function(t){t.Skew=function(e){this.force=0,this.skewAxis=null,void 0!==e&&(this.force=e),this.offset=.5,this.constraint=t.ModConstant.NONE,this.falloff=this.power=1,this.swapAxes=this.oneSide=this.inverseFalloff=!1},t.Skew.prototype=new t.Modifier,t.Skew.prototype.constructor=t.Skew,t.Skew.prototype.setModifiable=function(e){t.Modifier.prototype.setModifiable.call(this,e),this.skewAxis=this.skewAxis||this.mod.maxAxis},t.Skew.prototype.apply=function(){for(var e,i,o,s=this.mod.getVertices(),n=s.length,r=this.constraint,h=this.skewAxis,a=this.offset,p=this.oneSide,c=this.inverseFalloff,l=this.falloff,d=1-l,u=this.power,f=this.force,g=this.getDisplaceAxis();--n>=0;)e=s[n],!(r==t.ModConstant.LEFT&&e.getRatio(h)<=a)&&!(r==t.ModConstant.RIGHT&&e.getRatio(h)>a)&&(i=e.getRatio(h)-a,p&&(i=Math.abs(i)),o=e.getRatio(g),c&&(o=1-o),o=l+o*d,i=Math.pow(Math.abs(i),u)*t.XMath.sign(i,1),i=e.getValue(g)+f*i*o,e.setValue(g,i))},t.Skew.prototype.getDisplaceAxis=function(){switch(this.skewAxis){case t.ModConstant.X:return this.swapAxes?t.ModConstant.Z:t.ModConstant.Y;case t.ModConstant.Y:return this.swapAxes?t.ModConstant.Z:t.ModConstant.X;case t.ModConstant.Z:return this.swapAxes?t.ModConstant.Y:t.ModConstant.X;default:return 0}}}(MOD3),function(t){t.Taper=function(e){this.power=this.force=null,this.start=0,this.end=1,this.vector=new t.Vector3(1,0,1),this.vector2=new t.Vector3(0,1,0),void 0!==e&&(this.force=e),this.power=1},t.Taper.prototype=new t.Modifier,t.Taper.prototype.constructor=t.Taper,t.Taper.prototype.setFalloff=function(t,e){this.start=0,this.end=1,void 0!==t&&(this.start=t),void 0!==e&&(this.end=e)},t.Taper.prototype.apply=function(){for(var e,i,o,s=this.mod.getVertices(),n=s.length,r=this.vector,h=this.vector2,a=this.force,p=this.power;--n>=0;)i=(e=s[n]).getRatioVector().multiply(h),i=a*Math.pow(i.getMagnitude(),p),i=(new t.Matrix4).scaleMatrix(1+i*r.x,1+i*r.y,1+i*r.z),o=e.getVector(),(new t.Matrix4).multiplyVector(i,o),e.setVector(o)}}(MOD3),function(t){t.Wheel=function(){this.radius=this.roll=this.turn=this.speed=null,this.steerVector=new t.Vector3(0,1,0),this.rollVector=new t.Vector3(0,0,1),this.roll=this.turn=this.speed=0},t.Wheel.prototype=new t.Modifier,t.Wheel.prototype.constructor=t.Wheel,t.Wheel.prototype.setModifiable=function(e){t.Modifier.prototype.setModifiable.call(this,e),this.radius=.5*this.mod.width},t.Wheel.prototype.apply=function(){this.roll+=this.speed;var e,i=this.mod.getVertices(),o=i.length,s=this.steerVector,n=this.turn,r=this.rollVector,h=this.roll;for(0!=n?(e=(new t.Matrix4).rotationMatrix(s.x,s.y,s.z,n),s=r.clone(),(new t.Matrix4).multiplyVector(e,s),h=(new t.Matrix4).rotationMatrix(s.x,s.y,s.z,h)):h=(new t.Matrix4).rotationMatrix(r.x,r.y,r.z,h);--o>=0;)r=(s=i[o]).getVector().clone(),0!=n&&(new t.Matrix4).multiplyVector(e,r),(new t.Matrix4).multiplyVector(h,r),s.setX(r.x),s.setY(r.y),s.setZ(r.z)},t.Wheel.prototype.getStep=function(){return this.radius*this.speed*t.Constants.invPI},t.Wheel.prototype.getPerimeter=function(){return this.radius*t.Constants.doublePI}}(MOD3),function(t){t.Break=function(e,i){this.bv=new t.Vector3(0,1,0),this.angle=this.offset=0,void 0!==e&&(this.offset=e),void 0!==i&&(this.angle=i),this.range=new t.Range(0,1)},t.Break.prototype=new t.Modifier,t.Break.prototype.constructor=t.Break,t.Break.prototype.apply=function(){var e,i,o,s=(o=this.mod).getVertices(),n=s.length,r=this.range,h=this.angle,a=this.bv;for(e=(o=new t.Vector3(0,0,-(o.minZ+o.depth*this.offset))).negate(),i=(new t.Matrix4).rotationMatrix(a.x,a.y,a.z,h);--n>=0;)(a=(a=(h=s[n]).getVector()).add(o)).z>=0&&r.isIn(h.ratioY)&&(new t.Matrix4).multiplyVector(i,a),a=a.add(e),h.setX(a.x),h.setY(a.y),h.setZ(a.z)}}(MOD3),function(t){t.Noise=function(e){this.force=0,this.axc=t.ModConstant.NONE,this.end=this.start=0,void 0!==e&&(this.force=e)},t.Noise.prototype=new t.Modifier,t.Noise.prototype.constructor=t.Noise,t.Noise.prototype.constraintAxes=function(t){this.axc=t},t.Noise.prototype.setFalloff=function(t,e){this.start=0,this.end=1,void 0!==t&&(this.start=t),void 0!==e&&(this.end=e)},t.Noise.prototype.apply=function(){for(var t,e,i,o=this.mod,s=this.axc,n=this.start,r=this.end,h=o.getVertices(),a=h.length,p=this.force,c=.5*p,l=Math.random;--a>=0;)t=h[a],e=l()*p-c,i=t.getRatio(o.maxAxis),n<r?(i<n&&(i=0),i>r&&(i=1)):n>r?((i=1-i)>n&&(i=0),i<r&&(i=1)):i=1,1&s||t.setX(t.getX()+e*i),s>>1&1||t.setY(t.getY()+e*i),s>>2&1||t.setZ(t.getZ()+e*i)}}(MOD3),function(t){t.LibraryThree=function(){this.id="Three.js",this.meshClass=t.MeshThree,this.vertexClass=t.VertexThree},t.LibraryThree.prototype=new t.Library3d,t.LibraryThree.prototype.constructor=t.LibraryThree}(MOD3),function(t){t.VertexThree=function(t){this.mesh=t},t.VertexThree.prototype=new t.VertexProxy,t.VertexThree.prototype.setVertex=function(t){this.vertex=t,this.originalX=t.x,this.originalY=t.y,this.originalZ=t.z},t.VertexThree.prototype.getX=function(){return this.vertex.x},t.VertexThree.prototype.getY=function(){return this.vertex.y},t.VertexThree.prototype.getZ=function(){return this.vertex.z},t.VertexThree.prototype.setX=function(t){this.vertex.x=t,(t=this.mesh).geometry.verticesNeedUpdate=!0,t.geometry.normalsNeedUpdate=!0,t.geometry.buffersNeedUpdate=!0,t.geometry.dynamic=!0},t.VertexThree.prototype.setY=function(t){this.vertex.y=t,(t=this.mesh).geometry.verticesNeedUpdate=!0,t.geometry.normalsNeedUpdate=!0,t.geometry.buffersNeedUpdate=!0,t.geometry.dynamic=!0},t.VertexThree.prototype.setZ=function(t){this.vertex.z=t,(t=this.mesh).geometry.verticesNeedUpdate=!0,t.geometry.normalsNeedUpdate=!0,t.geometry.buffersNeedUpdate=!0,t.geometry.dynamic=!0}}(MOD3),function(t){t.MeshThree=function(){},t.MeshThree.prototype=new t.MeshProxy,t.MeshThree.prototype.setMesh=function(e){t.MeshProxy.prototype.setMesh.call(this,e);e=[];var i,o=0,s=this.mesh.geometry.vertices,n=s.length,r=this.mesh.geometry.faces,h=r.length;for(o=0;o<n;)(i=new t.VertexThree(this.mesh)).setVertex(s[o]),this.vertices.push(i),e[s[o]]=i,o++;for(o=0;o<h;)n=new t.FaceProxy,r[o]instanceof THREE.Face3?(n.addVertex(e[s[r[o].a]]),n.addVertex(e[s[r[o].b]]),n.addVertex(e[s[r[o].c]])):r[o]instanceof THREE.Face4&&(n.addVertex(e[s[r[o].a]]),n.addVertex(e[s[r[o].b]]),n.addVertex(e[s[r[o].c]]),n.addVertex(e[s[r[o].d]])),this.faces.push(n),o++;delete lookup},t.MeshThree.prototype.updateMeshPosition=function(t){var e=this.mesh;e.position.x+=t.x,e.position.y+=t.y,e.position.z+=t.z}}(MOD3),function(t){t.LibraryPre3D=function(){this.id="pre3d.js",this.meshClass=t.MeshPre3D,this.vertexClass=t.VertexPre3D},t.LibraryThree.prototype=new t.Library3d,t.LibraryThree.prototype.constructor=t.LibraryPre3D}(MOD3),function(t){t.VertexPre3D=function(){},t.VertexPre3D.prototype=new t.VertexProxy,t.VertexPre3D.prototype.setVertex=function(t){this.vertex=t,this.originalX=t.x,this.originalY=t.y,this.originalZ=t.z},t.VertexPre3D.prototype.getX=function(){return this.vertex.x},t.VertexPre3D.prototype.getY=function(){return this.vertex.y},t.VertexPre3D.prototype.getZ=function(){return this.vertex.z},t.VertexPre3D.prototype.setX=function(t){this.vertex.x=t},t.VertexPre3D.prototype.setY=function(t){this.vertex.y=t},t.VertexPre3D.prototype.setZ=function(t){this.vertex.z=t}}(MOD3),function(t){t.MeshPre3D=function(){},t.MeshPre3D.prototype=new t.MeshProxy,t.MeshPre3D.prototype.setMesh=function(e){t.MeshProxy.prototype.setMesh.call(this,e);e=[];for(var i=this.mesh.vertices,o=this.mesh.quads,s=i.length,n=o.length,r=0;r<s;r++){var h=new t.VertexPre3D;h.setVertex(i[r]),this.vertices.push(h),e[i[r]]=h}for(r=0;r<n;r++)s=new t.FaceProxy,o[r]instanceof Pre3d.QuadFace&&(s.addVertex(e[i[o[r].i0]]),s.addVertex(e[i[o[r].i1]]),s.addVertex(e[i[o[r].i2]]),null!=o[r].i3&&s.addVertex(e[i[o[r].i3]])),this.faces.push(s);delete lookup},t.MeshPre3D.prototype.updateMeshPosition=function(){}}(MOD3),function(t){t.LibraryJ3D=function(){this.id="J3D",this.meshClass=t.MeshJ3D,this.vertexClass=t.VertexJ3D},t.LibraryJ3D.prototype=new t.Library3d,t.LibraryJ3D.prototype.constructor=t.LibraryJ3D}(MOD3),function(t){t.VertexJ3D=function(t){this.geometry=t},t.VertexJ3D.prototype=new t.VertexProxy,t.VertexJ3D.prototype.setVertex=function(t){this.vertex=t;var e=this.geometry;this.originalX=e.vertexPositionBuffer.data[t],this.originalY=e.vertexPositionBuffer.data[t+1],this.originalZ=e.vertexPositionBuffer.data[t+2]},t.VertexJ3D.prototype.getX=function(){return this.geometry.vertexPositionBuffer.data[this.vertex]},t.VertexJ3D.prototype.getY=function(){return this.geometry.vertexPositionBuffer.data[this.vertex+1]},t.VertexJ3D.prototype.getZ=function(){return this.geometry.vertexPositionBuffer.data[this.vertex+2]},t.VertexJ3D.prototype.setX=function(t){var e=this.geometry;e.vertexPositionBuffer.data[this.vertex]=t,e.replaceArray(e.vertexPositionBuffer,e.vertexPositionBuffer.data)},t.VertexJ3D.prototype.setY=function(t){var e=this.geometry;e.vertexPositionBuffer.data[this.vertex+1]=t,e.replaceArray(e.vertexPositionBuffer,e.vertexPositionBuffer.data)},t.VertexJ3D.prototype.setZ=function(t){var e=this.geometry;e.vertexPositionBuffer.data[this.vertex+2]=t,e.replaceArray(e.vertexPositionBuffer,e.vertexPositionBuffer.data)}}(MOD3),function(t){t.MeshJ3D=function(){},t.MeshJ3D.prototype=new t.MeshProxy,t.MeshJ3D.prototype.setMesh=function(e){t.MeshProxy.prototype.setMesh.call(this,e);var i,o=0,s=e.geometry.vertexPositionBuffer.data.length,n=e.geometry.vertexPositionBuffer.itemSize;for(o=0;o<s;)(i=new t.VertexJ3D(e.geometry)).setVertex(o),this.vertices.push(i),o+=n;this.faces=null},t.MeshJ3D.prototype.updateMeshPosition=function(t){var e=this.mesh;e.position.x+=t.x,e.position.y+=t.y,e.position.z+=t.z}}(MOD3),function(t){t.LibraryCopperlicht=function(){this.id="Copperlicht",this.meshClass=t.MeshCopperlicht,this.vertexClass=t.VertexCopperlicht},t.LibraryCopperlicht.prototype=new t.Library3d,t.LibraryCopperlicht.prototype.constructor=t.LibraryCopperlicht}(MOD3),function(t){t.VertexCopperlicht=function(t,e){this.node=t,this.buffer=e},t.VertexCopperlicht.prototype=new t.VertexProxy,t.VertexCopperlicht.prototype.setVertex=function(t){this.vertex=t,this.originalX=this.vertex.Pos.X,this.originalY=this.vertex.Pos.Y,this.originalZ=this.vertex.Pos.Z},t.VertexCopperlicht.prototype.getX=function(){return this.vertex.Pos.X},t.VertexCopperlicht.prototype.getY=function(){return this.vertex.Pos.Y},t.VertexCopperlicht.prototype.getZ=function(){return this.vertex.Pos.Z},t.VertexCopperlicht.prototype.setX=function(t){this.vertex.Pos.X=t,this.buffer.update(!0)},t.VertexCopperlicht.prototype.setY=function(t){this.vertex.Pos.Y=t,this.buffer.update(!0)},t.VertexCopperlicht.prototype.setZ=function(t){this.vertex.Pos.Z=t,this.buffer.update(!0)}}(MOD3),function(t){t.MeshCopperlicht=function(){},t.MeshCopperlicht.prototype=new t.MeshProxy,t.MeshCopperlicht.prototype.setMesh=function(e){t.MeshProxy.prototype.setMesh.call(this,e);e=this.mesh.getMesh().GetMeshBuffers();for(var i=[],o=0;o<e.length;o++)for(var s=(i=e[o].Vertices).length,n=0;n<s;n++){var r=new t.VertexCopperlicht(this.mesh,e[o]);r.setVertex(i[n]),this.vertices.push(r)}this.faces=null,delete lookup},t.MeshCopperlicht.prototype.updateMeshPosition=function(t){this.mesh.Pos.X+=t.x,this.mesh.Pos.Y+=t.y,this.mesh.Pos.Z+=t.z}}(MOD3),function(t){if("performance"in t==!1&&(t.performance={}),Date.now=Date.now||function(){return(new Date).getTime()},"now"in t.performance==!1){var e=t.performance.timing&&t.performance.timing.navigationStart?performance.timing.navigationStart:Date.now();t.performance.now=function(){return Date.now()-e}}}(this),FLIPBOOK.TWEEN=FLIPBOOK.TWEEN||function(){var t=[];return{REVISION:"14",getAll:function(){return t},removeAll:function(){t=[]},add:function(e){t.push(e)},remove:function(e){var i=t.indexOf(e);-1!==i&&t.splice(i,1)},update:function(e){if(0===t.length)return!1;var i=0;for(e=void 0!==e?e:window.performance.now();i<t.length;)t[i].update(e)?i++:t.splice(i,1);return!0}}}(),FLIPBOOK.TWEEN.Tween=function(t){var e=t,i={},o={},s={},n=1e3,r=0,h=!1,a=!1,p=!1,c=0,l=null,d=FLIPBOOK.TWEEN.Easing.Linear.None,u=FLIPBOOK.TWEEN.Interpolation.Linear,f=[],g=null,m=!1,y=null,x=null,M=null;for(var v in t)i[v]=parseFloat(t[v],10);this.to=function(t,e){return void 0!==e&&(n=e),o=t,this},this.start=function(t){for(var n in FLIPBOOK.TWEEN.add(this),a=!0,m=!1,l=void 0!==t?t:window.performance.now(),l+=c,o){if(o[n]instanceof Array){if(0===o[n].length)continue;o[n]=[e[n]].concat(o[n])}i[n]=e[n],i[n]instanceof Array==!1&&(i[n]*=1),s[n]=i[n]||0}return this},this.stop=function(){return a?(FLIPBOOK.TWEEN.remove(this),a=!1,null!==M&&M.call(e),this.stopChainedTweens(),this):this},this.stopChainedTweens=function(){for(var t=0,e=f.length;t<e;t++)f[t].stop()},this.delay=function(t){return c=t,this},this.repeat=function(t){return r=t,this},this.yoyo=function(t){return h=t,this},this.easing=function(t){return d=t,this},this.interpolation=function(t){return u=t,this},this.chain=function(){return f=arguments,this},this.onStart=function(t){return g=t,this},this.onUpdate=function(t){return y=t,this},this.onComplete=function(t){return x=t,this},this.onStop=function(t){return M=t,this},this.update=function(t){var a;if(t<l)return!0;!1===m&&(null!==g&&g.call(e),m=!0);var M=(t-l)/n,v=d(M=M>1?1:M);for(a in o){var P=i[a]||0,L=o[a];L instanceof Array?e[a]=u(L,v):("string"==typeof L&&(L=P+parseFloat(L,10)),"number"==typeof L&&(e[a]=P+(L-P)*v))}if(null!==y&&y.call(e,v),1==M){if(r>0){for(a in isFinite(r)&&r--,s){if("string"==typeof o[a]&&(s[a]=s[a]+parseFloat(o[a],10)),h){var O=s[a];s[a]=o[a],o[a]=O}i[a]=s[a]}return h&&(p=!p),l=t+c,!0}null!==x&&x.call(e);for(var b=0,w=f.length;b<w;b++)f[b].start(t);return!1}return!0}},FLIPBOOK.TWEEN.Easing={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},Out:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},InOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)}},Back:{In:function(t){var e=1.70158;return t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-FLIPBOOK.TWEEN.Easing.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*FLIPBOOK.TWEEN.Easing.Bounce.In(2*t):.5*FLIPBOOK.TWEEN.Easing.Bounce.Out(2*t-1)+.5}}},FLIPBOOK.TWEEN.Interpolation={Linear:function(t,e){var i=t.length-1,o=i*e,s=Math.floor(o),n=FLIPBOOK.TWEEN.Interpolation.Utils.Linear;return e<0?n(t[0],t[1],o):e>1?n(t[i],t[i-1],i-o):n(t[s],t[s+1>i?i:s+1],o-s)},Bezier:function(t,e){var i,o=0,s=t.length-1,n=Math.pow,r=FLIPBOOK.TWEEN.Interpolation.Utils.Bernstein;for(i=0;i<=s;i++)o+=n(1-e,s-i)*n(e,i)*t[i]*r(s,i);return o},CatmullRom:function(t,e){var i=t.length-1,o=i*e,s=Math.floor(o),n=FLIPBOOK.TWEEN.Interpolation.Utils.CatmullRom;return t[0]===t[i]?(e<0&&(s=Math.floor(o=i*(1+e))),n(t[(s-1+i)%i],t[s],t[(s+1)%i],t[(s+2)%i],o-s)):e<0?t[0]-(n(t[0],t[0],t[1],t[1],-o)-t[0]):e>1?t[i]-(n(t[i],t[i],t[i-1],t[i-1],o-i)-t[i]):n(t[s?s-1:0],t[s],t[i<s+1?i:s+1],t[i<s+2?i:s+2],o-s)},Utils:{Linear:function(t,e,i){return(e-t)*i+t},Bernstein:function(t,e){var i=FLIPBOOK.TWEEN.Interpolation.Utils.Factorial;return i(t)/i(e)/i(t-e)},Factorial:function(){var t=[1];return function(e){var i,o=1;if(t[e])return t[e];for(i=e;i>1;i--)o*=i;return t[e]=o}}(),CatmullRom:function(t,e,i,o,s){var n=.5*(i-t),r=.5*(o-e),h=s*s;return(2*e-2*i+n+r)*(s*h)+(-3*e+3*i-2*n-r)*h+n*s+e}}},FLIPBOOK.CSS3DObject=function(t){THREE.Object3D.call(this),this.element=t,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.addEventListener("removed",function(){this.traverse(function(t){t.element instanceof Element&&null!==t.element.parentNode&&t.element.parentNode.removeChild(t.element)})})},FLIPBOOK.CSS3DObject.prototype=Object.create(THREE.Object3D.prototype),FLIPBOOK.CSS3DObject.prototype.constructor=FLIPBOOK.CSS3DObject,FLIPBOOK.CSS3DSprite=function(t){FLIPBOOK.CSS3DObject.call(this,t)},FLIPBOOK.CSS3DSprite.prototype=Object.create(FLIPBOOK.CSS3DObject.prototype),FLIPBOOK.CSS3DSprite.prototype.constructor=FLIPBOOK.CSS3DSprite,FLIPBOOK.CSS3DRenderer=function(){var t,e,i,o,s=this,n=new THREE.Matrix4,r={camera:{fov:0,style:""},objects:new WeakMap},h=document.createElement("div");h.style.overflow="hidden",this.domElement=h;var a=document.createElement("div");a.style.WebkitTransformStyle="preserve-3d",a.style.transformStyle="preserve-3d",a.style.pointerEvents="none",h.appendChild(a);var p=/Trident/i.test(navigator.userAgent);function c(t){return Math.abs(t)<1e-10?0:t}function l(t){var e=t.elements;return"matrix3d("+c(e[0])+","+c(-e[1])+","+c(e[2])+","+c(e[3])+","+c(e[4])+","+c(-e[5])+","+c(e[6])+","+c(e[7])+","+c(e[8])+","+c(-e[9])+","+c(e[10])+","+c(e[11])+","+c(e[12])+","+c(-e[13])+","+c(e[14])+","+c(e[15])+")"}function d(t,e){var s=t.elements,n="matrix3d("+c(s[0])+","+c(s[1])+","+c(s[2])+","+c(s[3])+","+c(-s[4])+","+c(-s[5])+","+c(-s[6])+","+c(-s[7])+","+c(s[8])+","+c(s[9])+","+c(s[10])+","+c(s[11])+","+c(s[12])+","+c(s[13])+","+c(s[14])+","+c(s[15])+")";return p?"translate(-50%,-50%)translate("+i+"px,"+o+"px)"+e+n:"translate(-50%,-50%)"+n}this.getSize=function(){return{width:t,height:e}},this.setSize=function(s,n){i=(t=s)/2,o=(e=n)/2,h.style.width=s+"px",h.style.height=n+"px",a.style.width=s+"px",a.style.height=n+"px"};var u,f,g=(u=new THREE.Vector3,f=new THREE.Vector3,function(t,e){return u.setFromMatrixPosition(t.matrixWorld),f.setFromMatrixPosition(e.matrixWorld),u.distanceToSquared(f)});function m(t){for(var e=function(t){var e=[];return t.traverse(function(t){t instanceof THREE.CSS3DObject&&e.push(t)}),e}(t).sort(function(t,e){return r.objects.get(t).distanceToCameraSquared-r.objects.get(e).distanceToCameraSquared}),i=e.length,o=0,s=e.length;o<s;o++)e[o].element.style.zIndex=i-o}this.render=function(t,e){var u=e.projectionMatrix.elements[5]*o;if(r.camera.fov!==u&&(e.isPerspectiveCamera?(h.style.WebkitPerspective=u+"px",h.style.perspective=u+"px"):(h.style.WebkitPerspective="",h.style.perspective=""),r.camera.fov=u),!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),e.isOrthographicCamera)var f=-(e.right+e.left)/2,y=(e.top+e.bottom)/2;var x=e.isOrthographicCamera?"scale("+u+")translate("+c(f)+"px,"+c(y)+"px)"+l(e.matrixWorldInverse):"translateZ("+u+"px)"+l(e.matrixWorldInverse),M=x+"translate("+i+"px,"+o+"px)";r.camera.style===M||p||(a.style.WebkitTransform=M,a.style.transform=M,r.camera.style=M),function t(e,i,o,h){if(e instanceof FLIPBOOK.CSS3DObject){var c;e.onBeforeRender(s,i,o),e instanceof FLIPBOOK.CSS3DSprite?(n.copy(o.matrixWorldInverse),n.transpose(),n.copyPosition(e.matrixWorld),n.scale(e.scale),n.elements[3]=0,n.elements[7]=0,n.elements[11]=0,n.elements[15]=1,c=d(n,h)):c=d(e.matrixWorld,h);var l=e.element,u=r.objects.get(e);if(void 0===u||u.style!==c){l.style.WebkitTransform=c,l.style.transform=c;var f={style:c};p&&(f.distanceToCameraSquared=g(o,e)),r.objects.set(e,f)}l.parentNode!==a&&a.appendChild(l),e.onAfterRender(s,i,o)}for(var m=0,y=e.children.length;m<y;m++)t(e.children[m],i,o,h)}(t,t,e,x),p&&m(t)}};
/*
Real3D FlipBook
version 3.32
author http://codecanyon.net/user/creativeinteractivemedia/portfolio?ref=creativeinteractivemedia
*/
var FLIPBOOK=FLIPBOOK||{};FLIPBOOK.BookSwipe=function(i,e,t,s){this.options=s,this.model=t,this.singlePage=s.singlePageMode,this.singlePage&&(this.view=1),this.pageWidth=this.options.pageWidth,this.pageHeight=this.options.pageHeight,this.slides=[],this.pagesArr=[],this.leftPage=0,this.rightPage=0,this.rotation=0,this.prevPageEnabled=!1,this.setRightIndex(s.rightToLeft?s.pages.length:0),this.currentSlide=0,this.flipping=!1,this.wrapper=e,this.$wrapper=jQuery(e),this.scroller=i,this.$scroller=jQuery(this.scroller).removeClass("book").addClass("flipbook-carousel-scroller"),this.iscroll=new IScroll(this.wrapper,{snap:!0,snapSpeed:200*this.options.pageFlipDuration,freeScroll:!0,scrollX:!0,scrollY:!1,preventDefault:!1,eventPassthrough:"vertical"});for(var o=0;o<3;o++){var h=jQuery('<div class="flipbook-carousel-slide"><div class="slide-inner"/></div>"').appendTo(this.$scroller);this.slides.push(h)}this.slides[0].iscroll=new IScroll(this.slides[0][0],{zoom:!0,scrollX:!0,scrollY:!0,freeScroll:!0,keepInCenterV:!0,keepInCenterH:!0,preventDefault:!1}),this.slides[2].iscroll=new IScroll(this.slides[2][0],{zoom:!0,scrollX:!0,scrollY:!0,freeScroll:!0,keepInCenterV:!0,keepInCenterH:!0,preventDefault:!1}),this.slides[1].iscroll=new IScroll(this.slides[1][0],{zoom:!0,scrollX:!0,scrollY:!0,freeScroll:!0,keepInCenterV:!0,keepInCenterH:!0,preventDefault:!1});for(o=0;o<3;o++)this.slides[o].iscroll.on("zoomEnd",function(){var i=s.main.zoom;this.options.eventPassthrough=i>1?"":"vertical",this.options.freeScroll=i>1,this.refresh()});var n;this.resizeInnerSlides();for(s.rightToLeft,s.numPages,s.pdfMode,o=0;o<s.numPages;o++)n=new FLIPBOOK.PageSwipe(t,s,o,s.pages[o].src,s.pages[o].htmlContent),this.pagesArr.push(n),s.loadAllPages&&n.load();s.cover||(n=new FLIPBOOK.PageSwipe(t,s,s.numPages),this.pagesArr.push(n));var r=this;this.iscroll.on("scrollStart",function(i,e,t){this.distX<0?r.loadNextSpread():r.loadPrevSpread()}),this.iscroll.on("scrollEnd",function(){var i=this.currentPage.pageX;r.currentSlide!=i&&(r.singlePage?i>r.currentSlide?r.setRightIndex(r.rightIndex+1):i<r.currentSlide&&r.setRightIndex(r.rightIndex-1):i>r.currentSlide?r.setRightIndex(r.rightIndex+2):i<r.currentSlide&&r.setRightIndex(r.rightIndex-2),r.currentSlide=i,r.updateVisiblePages(),r.flipping=!1)}),this.flipEnabled=!0,this.nextEnabled=!0,this.prevEnabled=!0,t.on("toolMove",function(){r.updateTool()}),t.on("toolSelect",function(){r.updateTool()}),t.on("pageLoaded",function(i){})},FLIPBOOK.BookSwipe.prototype=Object.create(FLIPBOOK.Book.prototype),FLIPBOOK.BookSwipe.prototype.constructor=FLIPBOOK.BookSwipe,FLIPBOOK.BookSwipe.prototype.goToPage=function(i,e){if(this.enabled&&this.flipEnabled){if(i>this.options.pages.length&&(i=this.options.pages.length),(this.singlePage||i%2!=0)&&i--,(isNaN(i)||i<0)&&(i=0),this.resetZoom(),e)return this.setRightIndex(i),void this.updateVisiblePages();this.singlePage?(this.options.rightToLeft&&!this.options.backCover&&i<1&&(i=1),i>this.rightIndex?(this.setSlidePages(this.currentSlide+1,[i]),this.setRightIndex(i-1),this.nextPage(e)):i<this.rightIndex&&(this.setSlidePages(this.currentSlide-1,[i]),this.setRightIndex(i+1),this.prevPage(e))):(this.options.rightToLeft&&!this.options.backCover&&i<2&&(i=2),i>this.rightIndex?i>=this.pagesArr.length?(this.setSlidePages(2,[i-1,i]),this.setRightIndex(i-2),this.goToSlide(2,e)):(this.setSlidePages(this.currentSlide+1,[i-1,i]),this.setRightIndex(i-2),this.nextPage(e)):i<this.rightIndex&&(0==i?(this.setRightIndex(i+2),this.setSlidePages(0,[i]),this.goToSlide(0,e)):(this.setRightIndex(i+2),this.setSlidePages(this.currentSlide-1,[i-1,i]),this.prevPage(e))))}},FLIPBOOK.BookSwipe.prototype.setRightIndex=function(i){this.rightIndex=i},FLIPBOOK.BookSwipe.prototype.nextPage=function(i){2!=this.currentSlide&&(this.flipping=!0,this.goToSlide(this.currentSlide+1,i),this.loadNextSpread())},FLIPBOOK.BookSwipe.prototype.prevPage=function(i){0!=this.currentSlide&&(this.flipping=!0,this.goToSlide(this.currentSlide-1,i),this.loadPrevSpread())},FLIPBOOK.BookSwipe.prototype.enablePrev=function(i){this.prevEnabled=i},FLIPBOOK.BookSwipe.prototype.enableNext=function(i){this.nextEnabled=i},FLIPBOOK.BookSwipe.prototype.resetZoom=function(){},FLIPBOOK.BookSwipe.prototype.setSlidePages=function(i,e){for(var t=[],s=0;s<e.length;s++)e[s]&&t.push(e[s].index);if(!this.slides[i].pages||t.join("")!==this.slides[i].pages.join("")){this.clearSlidePages(i);var o=this.slides[i].find(".slide-inner");for(s=0;s<e.length;s++){var h=e[s].index;this.pagesArr[h]&&(o.append(this.pagesArr[h].$wrapper),this.slides[i].pages.push(h))}this.resizeInnerSlides(),this.slides[i].iscroll&&this.slides[i].iscroll.refresh()}},FLIPBOOK.BookSwipe.prototype.updateTool=function(){switch(this.options.main.tool){case"toolSelect":this.disableFlip(),this.disablePan(),jQuery(".flipbook-textLayer").css("pointer-events","auto").removeClass(".flipbook-noselect");break;case"toolMove":this.onZoom(this.options.main.zoom),jQuery(".flipbook-textLayer").css("pointer-events","none").addClass(".flipbook-noselect")}},FLIPBOOK.BookSwipe.prototype.clearSlidePages=function(i){this.slides[i].find(".slide-inner").empty(),this.slides[i].pages=[]},FLIPBOOK.BookSwipe.prototype.setZoomPages=function(i){if(!this.$zoomScroller.pages||this.$zoomScroller.pages.join("")!=i.join("")){this.$zoomScroller.empty(),this.$zoomScroller.pages=[];for(var e=0;e<i.length;e++){var t=i[e];this.pagesArr[t]&&(this.$zoomScroller.append(this.pagesArr[t].$wrapper),this.$zoomScroller.pages.push(t))}}},FLIPBOOK.BookSwipe.prototype.resizeZoomPages=function(i,e){var t=this.$wrapper.height()*e,s=500*parseInt(t/500)+500;s<500&&(s=500),s>2e3&&(s=2e3);for(var o=0;o<i.length;o++){var h=i[o];this.pagesArr[h]&&this.pagesArr[h].load()}},FLIPBOOK.BookSwipe.prototype.getCurrentSlidePages=function(){return this.singlePage?[this.rightIndex]:[this.rightIndex-1,this.rightIndex]},FLIPBOOK.BookSwipe.prototype.clearSlide=function(i){this.slides[i].empty()},FLIPBOOK.BookSwipe.prototype.hasPage=function(i,e){},FLIPBOOK.BookSwipe.prototype.loadNextSpread=function(){this.options.main;var i=this.rightIndex;this.options.rightToLeft&&!this.options.backCover&&i--;var e=this.pagesArr[i+1];if(e&&e.load(),!this.singlePage){var t=this.pagesArr[i+2];t&&t.load()}},FLIPBOOK.BookSwipe.prototype.loadPrevSpread=function(){this.options.main;var i=this.rightIndex;if(this.options.rightToLeft&&!this.options.backCover&&i--,this.singlePage){(e=this.pagesArr[i-1])&&e.load()}else{var e;(e=this.pagesArr[i-2])&&e.load();var t=this.pagesArr[i-3];t&&t.load()}},FLIPBOOK.BookSwipe.prototype.loadVisiblePages=function(){var i=this.options.main,e=this.rightIndex;this.options.rightToLeft&&!this.options.backCover&&e--;var t=this.pagesArr[e],s=this.pagesArr[e-1],o=this.pagesArr[e+1],h=this.pagesArr[e+2],n=this.pagesArr[e-2],r=this.pagesArr[e-3];this.singlePage?t?t.load(function(){i.setLoadingProgress(1),s&&s.load(null,!0),o&&o.load(null,!0)}):s&&s.load():s?s.load(function(){t?t.load(function(){i.setLoadingProgress(1),n&&n.load(null,!0),r&&r.load(null,!0),o&&o.load(null,!0),h&&h.load(null,!0)}):(i.setLoadingProgress(1),n&&n.load(null,!0),r&&r.load(null,!0))}):t&&t.load(function(){i.setLoadingProgress(1),o&&o.load(null,!0),h&&h.load(null,!0)})},FLIPBOOK.BookSwipe.prototype.updateVisiblePages=function(){if(this.visiblePagesRightIndex!==this.rightIndex){this.visiblePagesRightIndex=this.rightIndex;this.options.main;var i=this.rightIndex;this.options.rightToLeft&&!this.options.backCover&&i--;var e=this.pagesArr[i],t=this.pagesArr[i-1],s=this.pagesArr[i+1],o=this.pagesArr[i+2],h=this.pagesArr[i-2],n=this.pagesArr[i-3];s&&s.hideHTML(),o&&o.hideHTML(),h&&h.hideHTML(),n&&n.hideHTML(),this.singlePage?(e.startHTML(),t?s?(this.setSlidePages(1,[e]),t&&this.setSlidePages(0,[t]),this.setSlidePages(2,[s]),this.goToSlide(1,!0)):(e&&this.setSlidePages(2,[e]),t&&this.setSlidePages(1,[t]),this.goToSlide(2,!0),this.clearSlidePages(0)):(this.setSlidePages(0,[e]),s?this.setSlidePages(1,[s]):this.clearSlidePages(1),this.goToSlide(0,!0),this.clearSlidePages(2)),t&&t.hideHTML()):t?(t.startHTML(),e?(e.startHTML(),s?h&&(2!=this.rightIndex||this.options.cover)?(this.setSlidePages(1,[t,e]),n?this.setSlidePages(0,[n,h]):this.setSlidePages(0,[h]),o?this.setSlidePages(2,[s,o]):this.setSlidePages(2,[s]),this.goToSlide(1,!0)):(this.setSlidePages(0,[t,e]),o?this.setSlidePages(1,[s,o]):this.setSlidePages(1,[s]),this.clearSlidePages(2)):(this.setSlidePages(2,[t,e]),n?this.setSlidePages(1,[n,h]):this.setSlidePages(1,[h]),this.goToSlide(2,!0),this.clearSlidePages(0))):(this.setSlidePages(2,[t]),n?this.setSlidePages(1,[n,h]):this.setSlidePages(1,[h]),this.goToSlide(2,!0),this.clearSlidePages(0))):(e.startHTML(),this.setSlidePages(0,[e]),o?this.setSlidePages(1,[s,o]):this.setSlidePages(1,[s]),this.goToSlide(0,!0),this.clearSlidePages(2)),this.loadVisiblePages(),this.flippedleft=(this.rightIndex+this.rightIndex%2)/2,this.flippedright=this.options.pages.length/2-this.flippedleft,this.options.main.turnPageComplete()}},FLIPBOOK.BookSwipe.prototype.loadPage=function(i){this.pagesArr[i]&&this.pagesArr[i].load()},FLIPBOOK.BookSwipe.prototype.hidePage=function(i){},FLIPBOOK.BookSwipe.prototype.showPage=function(i){},FLIPBOOK.BookSwipe.prototype.disable=function(){this.enabled=!1},FLIPBOOK.BookSwipe.prototype.enable=function(){this.enabled=!0,this.onResize()},FLIPBOOK.BookSwipe.prototype.resize=function(){},FLIPBOOK.BookSwipe.prototype.onResize=function(){var i=this.$wrapper.width(),e=this.$wrapper.height();if(0!=i&&0!=e&&(this.w!==i||this.h!==e)){this.w=i,this.h=e;var t,s=this.pageWidth,o=this.pageHeight,h=2*this.options.zoomMin*s/o>i/e,n=!this.options.singlePageMode&&(!this.options.responsiveView||i>this.options.responsiveViewTreshold||!h||i/e>=this.options.responsiveViewRatio),r=n?2*s:s,l=o;this.bw=r,this.bh=l,t=e/i>l/r?l/r*i/this.options.pageHeight:e/this.options.pageHeight;for(var a=0;a<this.slides.length;a++)this.slides[a].width(i+0).height(e),this.slides[a].css("left",Number(a*i+0*a)+"px").height(e),this.slides[a].iscroll&&(this.slides[a].iscroll.options.zoomMin=this.options.zoomMin*t,this.slides[a].iscroll.options.zoomMax=this.options.zoomMax*t,this.slides[a].iscroll.refresh());this.$scroller.width(this.$scroller.children().length*(i+0)),this.iscroll.refresh(),n&&!this.options.singlePageMode||this.singlePage?n&&!this.options.singlePageMode&&this.singlePage&&(this.rightIndex%2!=0&&this.setRightIndex(this.rightIndex+1),this.singlePage=!1,this.view=2,this.resizeInnerSlides()):(this.rightIndex%2==0&&this.rightIndex>0&&this.setRightIndex(this.rightIndex-1),this.singlePage=!0,this.view=1,this.resizeInnerSlides()),this.updateVisiblePages()}},FLIPBOOK.BookSwipe.prototype.isFocusedRight=function(){return this.rightIndex%2==0},FLIPBOOK.BookSwipe.prototype.isFocusedLeft=function(){return this.rightIndex%2==1},FLIPBOOK.BookSwipe.prototype.resizeInnerSlides=function(){var i=this.options.pageHeight*this.pageWidth/this.pageHeight;90!=this.rotation&&270!=this.rotation||(i=this.options.pageHeight*this.pageHeight/this.pageWidth);for(var e=this.singlePage?i:2*i,t=0;t<3;t++)e=this.slides[t].pages&&1==this.slides[t].pages.length?i:2*i,this.slides[t].find(".slide-inner").width(e)},FLIPBOOK.BookSwipe.prototype.resizeInnerSlide=function(i){var e=this.options.pageHeight*this.pageWidth/this.pageHeight;this.slides[i].pages.length,this.slides[i].find(".slide-inner").width(e)},FLIPBOOK.BookSwipe.prototype.goToSlide=function(i,e){if(this.iscroll.currentPage.pageX!=i){this.onResize();var t=e?0:300*this.options.pageFlipDuration,s=this.slides[i];s.pages&&s.pages[0]&&this.pagesArr[s.pages[0]].updateHtmlContent(),this.iscroll.pages.length>0&&this.iscroll.goToPage(i,0,t),e&&(this.currentSlide=i),this.zoomTo(this.options.zoomMin)}},FLIPBOOK.BookSwipe.prototype.getCurrentSlide=function(){return this.currentSlide},FLIPBOOK.BookSwipe.prototype.zoomIn=function(i,e,t){t&&"mousewheel"===t.type||this.zoomTo(i)},FLIPBOOK.BookSwipe.prototype.zoomTo=function(i,e,t,s){if(this.enabled){t=t||0,s=s||0;if(i>1&&this.disableFlip(),0!=h&&0!=n){var o=this.model,h=o.wrapperW,n=o.wrapperH,r=o.bookW,l=o.bookH,a=o.pageW,p=o.pageH,d=h/n,g=a/p,c=this;Math.min(this.zoom,1),Number(this.options.zoomMin);!this.options.singlePageMode&&this.options.responsiveView&&h<=this.options.responsiveViewTreshold&&d<2*g&&d<this.options.responsiveViewRatio?(this.view=1,h/n>a/p?u():P()):(this.view=2,h/n>=r/l?u():P()),this.zoom=i,this.onZoom(i)}}function u(){c.ratio=n/l,S()}function P(){c.ratio=1==c.view?h/a:h/r,S()}function S(){for(var e=0;e<3;e++)c.slides[e].iscroll&&(c.slides[e].iscroll.options.zoomMin=c.ratio*c.options.zoomMin,c.slides[e].iscroll.options.zoomMax=c.ratio*c.options.zoomMax,c.slides[e].iscroll.zoom(c.ratio*i,t,s,0))}},FLIPBOOK.BookSwipe.prototype.zoomOut=function(i){this.zoomTo(i)},FLIPBOOK.BookSwipe.prototype.move=function(i){if(!(this.zoom<=1))for(var e=0;e<3;e++){var t=this.slides[e].iscroll;if(t){var s=t.x,o=t.y,h=20*this.zoom;switch(i){case"left":s+=h;break;case"right":s-=h;break;case"up":o+=h;break;case"down":o-=h}s>0&&(s=0),s<t.maxScrollX&&(s=t.maxScrollX-0),o>0&&(o=0),o<t.maxScrollY&&(o=t.maxScrollY-0),t.scrollTo(s,o,0)}}},FLIPBOOK.BookSwipe.prototype.onZoom=function(i){"toolSelect"==this.options.main.tool?(this.disableFlip(),this.disablePan()):i>1?(this.disableFlip(),this.enablePan()):this.enableFlip(),this.options.main.onZoom(i)},FLIPBOOK.BookSwipe.prototype.rotateLeft=function(){this.rotation=(this.rotation+360-90)%360;for(var i=0;i<this.pagesArr.length;i++){this.pagesArr[i].setRotation(this.rotation)}this.resizeInnerSlides(),this.onResize()},FLIPBOOK.BookSwipe.prototype.rotateRight=function(){this.rotation=(this.rotation+360+90)%360;for(var i=0;i<this.pagesArr.length;i++){this.pagesArr[i].setRotation(this.rotation)}this.resizeInnerSlides(),this.onResize()},FLIPBOOK.BookSwipe.prototype.enableAutoplay=function(i){},FLIPBOOK.BookSwipe.prototype.updateCurrentPage=function(i){},FLIPBOOK.BookSwipe.prototype.enable=function(){this.enabled=!0},FLIPBOOK.BookSwipe.prototype.disable=function(){this.enabled=!1},FLIPBOOK.BookSwipe.prototype.onSwipe=function(i,e,t,s,o,h,n){},FLIPBOOK.BookSwipe.prototype.onPageUnloaded=function(i,e){var t=this.options.rightToLeft?this.options.numPages-i-1:i;this.pagesArr[t].unload()},FLIPBOOK.BookSwipe.prototype.disableFlip=function(){this.flipEnabled=!1,this.iscroll.disable()},FLIPBOOK.BookSwipe.prototype.enableFlip=function(){1!=this.options.numPages?(this.flipEnabled=!0,this.iscroll.enable()):this.disableFlip()},FLIPBOOK.BookSwipe.prototype.enablePan=function(){this.slides[0].iscroll&&this.slides[0].iscroll.enable(),this.slides[1].iscroll&&this.slides[1].iscroll.enable(),this.slides[2].iscroll&&this.slides[2].iscroll.enable()},FLIPBOOK.BookSwipe.prototype.disablePan=function(){this.slides[0].iscroll&&this.slides[0].iscroll.disable(),this.slides[1].iscroll&&this.slides[1].iscroll.disable(),this.slides[2].iscroll&&this.slides[2].iscroll.disable()},FLIPBOOK.PageSwipe=function(i,e,t,s,o){this.rotation=0,this.index=t,this.options=e,this.texture=s,this.html=o,this.index=t,this.$wrapper=jQuery("<div>").addClass("flipbook-carousel-page"),this.wrapper=this.$wrapper[0],this.model=i,this.$inner=jQuery("<div>").appendTo(this.$wrapper).addClass("flipbook-carousel-page-inner"),this.$bg=jQuery("<div>").appendTo(this.$inner).addClass("flipbook-carousel-page-bg"),this.$html=jQuery("<div>").appendTo(this.$inner).addClass("flipbook-page3-html"),this.$html[0].style.width=1e3*this.options.pageWidth/this.options.pageHeight+"px",this.$html[0].style.transform="scale("+this.options.pageHeight/1e3+") translateZ(0)",this.options.doublePage&&(this.index%2==0&&this.index>0?this.$html[0].style.left="-100%":this.$html[0].style.left="0"),e.pagePreloader?this.$preloader=jQuery('<img src="'+e.pagePreloader+'" class="flipbook-page-preloader-image">').appendTo(this.$inner):this.$preloader=jQuery('<img src="'+e.assets.spinner+'" class="flipbook-page-preloader">').appendTo(this.$inner),this.setSize(this.pw,this.ph)},FLIPBOOK.PageSwipe.prototype={load:function(i,e){var t=this.options.pageTextureSize;if(this.size>=t)return e||this.loadHTML(),void(i&&i.call(this));this.size=t;var s=this,o=this.options.rightToLeft?this.options.numPages-this.index-1:this.index;this.options.main.loadPage(o,t,function(t){if((t=t||{})&&t.image){var o=t.image;s.$img=jQuery(o).addClass("page-carousel-img");t.image.naturalHeight;var h=t.image.naturalHeight;s.options.pageWidth,s.options.pageHeight;s.$img.appendTo(s.$bg),s.options.doublePage&&s.index>0&&s.index%2==0&&s.$img.css("left","-100%"),s.options.doublePage?0==s.index||s.index==s.options.pages.length-1&&s.options.backCover?s.$img.css("width","100%"):s.$img.css("width","200%"):s.$img.css("width","100%"),s.$preloader.remove()}t&&t.canvas&&s.pageSize!=t.size&&(s.pageSize=t.size,s.$bg.empty(),s.options.doublePage&&s.index%2==0&&0!=s.index?jQuery(t.rCanvas).appendTo(s.$bg):s.options.doublePage&&s.index%2==1&&s.index!=s.options.pages.length-1?jQuery(t.lCanvas).appendTo(s.$bg):jQuery(t.canvas).appendTo(s.$bg),s.$preloader.remove()),s.setRotation(),e||s.loadHTML(),i&&i.call(s)})},loadHTML:function(){var i=this,e=this.options.rightToLeft?this.options.numPages-this.index-1:this.index;this.htmlContent?this.updateHtmlContent():this.options.main.loadPageHTML(e,function(e){i.htmlContent=e,i.updateHtmlContent()})},hideHTML:function(){this.htmlContentVisible&&(this.$html.empty(),this.wrapper.querySelectorAll(".flipbook-page-item").forEach(function(i){}),this.htmlContentVisible=!1)},startHTML:function(){this.wrapper.querySelectorAll(".flipbook-page-item").forEach(function(i){"VIDEO"!=i.nodeName&&"AUDIO"!=i.nodeName||!i.autoplay||(i.readyState<4?i.oncanplay=function(){this.play()}:i.play())})},unload:function(){this.pageSize=0,this.size=0,this.$preloader.appendTo(this.$inner)},dispose:function(){this.pageSize&&(this.pageSize=null,this.$bg.empty())},setSize:function(){var i=this.options.pageWidth,e=this.options.pageHeight;0==this.rotation||180==this.rotation?(this.$wrapper.width(i).height(e),this.pw=i,this.ph=e):(this.$wrapper.width(e).height(i),this.pw=e,this.ph=i),this.updateHtmlContent()},setRotation:function(i){this.setSize(),this.options.doublePage||(void 0!==i&&(this.rotation=i),this.$img&&(this.$img.css("transform","rotate("+this.rotation+"deg) translateZ(0)"),90==this.rotation||270==this.rotation?this.$img.width(this.$wrapper.height()).height(this.$wrapper.width()):this.$img.width(this.$wrapper.width()).height(this.$wrapper.height())))},updateHtmlContent:function(){this.ph;this.htmlContent&&!this.htmlContentVisible&&(this.htmlContentVisible=!0,this.$htmlContent||(this.$htmlContent=jQuery(this.htmlContent)),this.$html.empty().append(this.$htmlContent))}};
/*
Real3D FlipBook
version 3.32
author http://codecanyon.net/user/creativeinteractivemedia/portfolio?ref=creativeinteractivemedia
*/
var FLIPBOOK=FLIPBOOK||{};FLIPBOOK.PdfService=function(e,t,n){var i=this;this.pdfDocument=e,this.pdfInfo=e._pdfInfo,this.numPages=this.pdfInfo.numPages,this.webgl="webgl"==n.viewMode&&this.numPages>1,this.options=n,this.main=n.main,this.model=t,this.pages=[],this.thumbs=[],this.canvasBuffer=[],this.viewports=[],this.textContents=[],this.pdfPages=[],this.pdfAnnotations=[],this.eventBus=new EventBus,this.linkService=new PDFLinkService({eventBus:this.eventBus}),this.linkService.setViewer(this.main),this.linkService.setDocument(e),this.linkService.externalLinkTarget=2,window._dbg=0,this.getCanvas=function(e){var t,n;for(t=0;t<this.canvasBuffer.length;t++){if((n=this.canvasBuffer[t]).available){n.available=!1,n.double=!1;break}n=null}return n||((n=document.createElement("canvas")).available=!1,n.index=this.canvasBuffer.length,this.canvasBuffer.push(n)),n.rendering=!0,n},this.isRendering=function(e,t){var n=!1;return this.canvasBuffer.forEach(function(i){i.size==t&&i.pdfPageIndex==e&&i.rendering&&(n=!0)}),n},this.isRendered=function(e,t){var n=!1;return this.canvasBuffer.forEach(function(i){i.size==t&&i.pdfPageIndex==e&&i.rendered&&(n=!0)}),n},this.setRightIndex=function(e){var t=this,n=[],i=this.options.isMobile?6:50;this.canvasBuffer.forEach(function(a){(!a.rendering&&e-a.pageIndex>1+i||e-a.pageIndex<-i)&&a.pageIndex>-1&&(a.pdfPageIndex>-1&&(delete t.pages[a.pdfPageIndex].canvas[a.size],t.pages[a.pdfPageIndex].cleanup()),n.push({index:a.pageIndex,size:a.size}),a.double&&n.push({index:a.pageIndex-1,size:a.size}),a.getContext("2d").clearRect(0,0,a.width,a.height),a.width=a.height=0,a.pageIndex=-100,a.available=!0,a.rendered=!1)}),n.length>0&&this.model.trigger("pageUnloaded",{unloadedPages:n})},this.loadThumbs=function(e,t){var n=this;this.thumbLoading=this.thumbLoading||0,this.thumbLoading>=this.pdfInfo.numPages?t.call(n):this.loadThumb(this.thumbLoading,function(i){n.options.thumbLoaded(i),n.thumbLoading++,n.loadThumbs(e,t)})},this.loadThumb=function(e,t){var n=this;this.getViewport(e,function(){var i=n.pages[e],a=100/i.getViewport({scale:1}).height,s=i.getViewport({scale:a}),r=document.createElement("canvas");r.index=e;var o=r.getContext("2d");r.height=s.height,r.width=s.width;var d={canvasContext:o,viewport:s};i.cleanupAfterRender=!0,i.render(d).then(function(){i.cleanup(),t&&t.call(n,r)})})},this.init=function(e){i.getViewport(0,function(t){i.r1=t.width/t.height,1==i.pdfInfo.numPages?(i.double=!1,i.model.trigger("pdfinit")):i.getViewport(1,function(t){i.r2=t.width/t.height,i.double=i.r2/i.r1>1.5,i.backCover=e||!0,i.model.trigger("pdfinit")})})},this.loadOutline=function(e){var t=this;this.pdfDocument.getOutline().then(function(n){t.outline=n,t.outlineLoaded=!0,e.call(t,n)})},this.startLoadingText=function(){this.loadingText=!0},this.stopLoadingText=function(){this.loadingText=!1},this.getViewport=function(t,n){t>=i.pdfInfo.numPages||(i.pages[t]?(i.viewports[t]=i.pages[t].getViewport({scale:1}),n.call(i,i.viewports[t])):e.getPage(t+1).then(function(e){i.pages[e._pageIndex]=e,i.getViewport(e._pageIndex,n)}))},this.getAllViewports=function(e){},this.getText=function(e,t){var n=this;this.getViewport(e,function(i){var a=n.pages[e];n.getTextContent(a,function(){t.call(n,a)})})},this.getTextAllPages=function(e){var t=this;this.loadingTextFromPage=this.loadingTextFromPage||0,this.getText(this.loadingTextFromPage,function(){t.loadingTextFromPage==t.numPages-1?e&&e.call(t):(t.loadingTextFromPage++,t.getTextAllPages(e))})},this.findInPage=function(e,t,n){var i=this;this.findInPageCallbacks=this.findInPageCallbacks||[],this.findInPageCallbacks[t]=n,this.searchingString=e,this.pages[t]&&this.pages[t].textContent?i.findInPageTextContentAvailable(this.pages[t],t):this.getText(t,function(e){i.findInPageTextContentAvailable(e,t)})},this.findInPageTextContentAvailable=function(e,t){var n=e.textContent.items;if(void 0===e.textContentString){e.textContentString="";for(var i=0;i<n.length;i++)e.textContentString+=n[i].str}var a=e.textContentString.toUpperCase().search(this.searchingString.toUpperCase()),s=this.findInPageCallbacks[t];s&&s.call(this,a,e.htmlContent,e._pageIndex),this.findInPageCallbacks[t]=null},this.getThumb=function(e,t,n){this.getViewport(e,function(a){var s=i.pages[e];if(s.thumb)n.call(i,s.thumb);else{var r=t/i.viewports[e].height,o=(a=s.getViewport({scale:r}),document.createElement("canvas"));s.thumb=o;var d=o.getContext("2d");o.height=a.height,o.width=a.width;var l={canvasContext:d,viewport:a};s.cleanupAfterRender=!0,s.render(l).then(function(){s.cleanup(),n.call(i,s.thumb)})}})},this.getPage=function(t,n){var i=this;(i.double?Math.round(t/2)+1:t+1)>this.pdfInfo.numPages||e.getPage(t).then(function(e){i.renderPage(e,n)})},this.renderPage=function(e,t,n){var i=this;if(e.canvas=e.canvas||{},e.canvas[t]&&e.canvas[t].rendered)return n&&n.call(i,e),void(n=null);if(e.rendering)setTimeout(function(){i.renderPage(e,t,n)},300);else if(e.canvas[t]&&e.canvas[t].rendering)setTimeout(function(){i.renderPage(e,t,n)},300);else{e.rendering=!0;var a=i.getCanvas(t);a.size=t,a.pdfPageIndex=e._pageIndex;var s=e.getViewport({scale:1}),r=s.width<=s.height,o=r||!i.webgl?t/s.height:t/s.width,d=e.getViewport({scale:o});a.width=d.width,a.height=d.height,i.webgl&&(r?(a.height=t,a.width=d.width>t?d.width:t,a.scaleX=d.width/t,a.scaleY=1):(a.width=t,a.height=d.height>t?d.height:t,a.scaleY=d.height/t,a.scaleX=1));var l=a.getContext("2d");l.fillStyle="#FFFFFF",l.fillStyle="#000000";var h={canvasContext:l,viewport:d};e.scale=o,e.canvas[t]=a,e.canvas[t].ratio=d.width/d.height,e.cleanupAfterRender=!0,e.render(h).promise.then(function(){h=null,n&&n.call(i,e),e.rendering=!1,n=null})}},this.renderBookPage=function(e,t,n){var i=this.options.doublePage?Math.round(e/2):e;this.renderPageFromPdf(i,t,n)},this.loadPageTextLayer=function(e,t,n){var i=this,a=this.pages[e];if(e>=this.pdfInfo.numPages&&n.call(i),this.pages[e])return!i.options.pdfTextLayer||a.textContentLoaded||a.textContentLoading?!i.options.annotationLayer||a.annotationsLoaded||a.annotationsLoading?void(i.options.annotationLayer&&!a.annotationsLoaded||i.options.pdfTextLayer&&!a.textContentLoaded?setTimeout(function(){i.loadPageTextLayer(e,t,n)},100):n.call(this,a,t)):(a.annotationsLoading=!0,void a.getAnnotations({intent:"display"}).then(function(s){a.annotationsLoaded=!0,a.annotationsLoading=!1,a.annotations=s,i.loadPageTextLayer(e,t,n)})):(a.textContentLoading=!0,void a.getTextContent().then(function(s){a.textContentLoaded=!0,a.textContentLoading=!1,a.textContent=s,i.loadPageTextLayer(e,t,n)}));this.getViewport(e,function(a){i.loadPageTextLayer(e,t,n)})},this.loadTextLayer=function(e,t){var i=this.options.doublePage?Math.round(e/2):e,a=this;this.loadPageTextLayer(i,e,function(e,s){var r=n.pages[s]||{};if(r.index=s,!r.htmlContentInitialized){r.htmlContentInitialized=!0,r.textRendering=!0;var o=document.createElement("div");o.classList.add("flipbook-page-htmlContent");var d=document.createElement("div");d.className="flipbook-textLayer",o.appendChild(d);var l=1e3/e.getViewport({scale:1}).height;d.style.width=String(1e3*e.getViewport({scale:1}).width/e.getViewport({scale:1}).height)+"px",d.style.height="1000px";var h=new TextLayerBuilder({eventBus:a.eventBus,textLayerDiv:d,pageIndex:i,viewport:e.getViewport({scale:l})});if(h.setTextContent(e.textContent),h.render(),e.annotations.length>0){var c=document.createElement("div");c.className="annotationLayer",o.appendChild(c);var g={viewport:e.getViewport({scale:1e3/e.getViewport({scale:1}).height}).clone({dontFlip:!0}),div:c,annotations:e.annotations,page:e,linkService:a.linkService};pdfjsLib.AnnotationLayer.render(g)}return o.style.transformOrigin="0 0",a.eventBus.on("textlayerrendered",function(e){e.source.pageIdx==i&&(r.textRendering=!1,t.call(a))}),r.htmlContent&&jQuery(o).append(jQuery(r.htmlContent)),void(r.htmlContent=o)}r.textRendering||t.call(a)})},this.renderPageFromPdf=function(e,t,n){var i=this;if(e>=this.pdfInfo.numPages&&n.call(i),this.pages[e]){var a=e,s=this.pages[e],r=s.getViewport({scale:1});Math.max(r.width,r.height),r.height;this.isRendering(a,t)?setTimeout(function(){i.renderPageFromPdf(e,t,n)},300):this.isRendered(a,t)?this.onPdfPageRendered(i.pages[a],t,n):this.renderPage(s,t,function(e){i.onPdfPageRendered(e,t,n)})}else this.getViewport(e,function(a){i.renderPageFromPdf(e,t,n)})},this.onBookPageRendered=function(e,t,n,i){n=n,i=i;this.model.trigger("pageLoaded",{index:n,size:i,canvas:t})},this.getBookPage=function(e,t){var n=null;return this.canvasBuffer.forEach(function(i){i.pageIndex==e&&i.size==t&&(n=i)}),n},this.onPdfPageRendered=function(e,t,i){if(e.canvas&&e.canvas[t]){var a=e.canvas[t],s=e._pageIndex;if(a.pdfPageIndex=s,n.doublePage)if(0==s)a.pageIndex=0,a.rendering=!1,a.rendered=!0,this.onBookPageRendered(e,a,0,t);else if(s==n.pages.length/2)a.pageIndex=n.numPages-1,a.rendering=!1,a.rendered=!0,this.onBookPageRendered(e,a,n.numPages-1,t);else if(this.webgl)a.double=!0,a.scaleX=a.width/2/t,a.scaleY=a.scaleY,a.pageIndex=2*s,a.rendering=!1,a.rendered=!0,this.onBookPageRendered(e,a,2*s,t),this.onBookPageRendered(e,a,2*s-1,t);else{var r=this.options.rightToLeft?2*s-1:2*s,o=this.options.rightToLeft?2*s:2*s-1,d=this.getBookPage(o,t);if(!d){(d=this.getCanvas(t)).size=t;var l=d.getContext("2d");d.width=a.width/2,d.height=a.height,l.fillStyle="#FFFFFF",d.pageIndex=o,d.pdfPageIndex=s,l.drawImage(a,0,0),d.rendering=!1,d.rendered=!0}this.onBookPageRendered(e,d,o,t);var h=this.getBookPage(r,t);if(!h){(h=this.getCanvas(t)).size=t;var c=h.getContext("2d");h.width=a.width/2,h.height=a.height,c.fillStyle="#FFFFFF",h.pageIndex=r,h.pdfPageIndex=s,c.drawImage(a,a.width/2,0,a.width/2,a.height,0,0,a.width/2,a.height),h.rendering=!1,h.rendered=!0}this.onBookPageRendered(e,h,r,t),a.size=200,a.pageIndex=o,a.rendering=!1,a.rendered=!0}else a.pageIndex=s,a.size=t,a.rendering=!1,a.rendered=!0,this.onBookPageRendered(e,a,s,t);i&&i.call(this,{canvas:a,lCanvas:d,rCanvas:h,size:t,pdfPageIndex:s,htmlContent:e.htmlContent}),i=null}},this.getTextContent=function(e,t){if(e.getTextCallback=t,e.textContent)e.getTextCallback(e);else{if(e.textContentLoading){var n=this;return void setTimeout(function(){n.getTextContent(e,t)},100)}e.getTextContent().then(function(t){e.textContent=t,e.textContentLoading=!1,e.textContentLoaded=!0,e.getTextCallback(e)}),e.textContentLoading=!0}},this.getCanvasByHeight=function(e,t,n){}},FLIPBOOK.PdfService.prototype={};var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var EventBus=function(){function e(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).dispatchToDOM,n=void 0!==t&&t;_classCallCheck(this,e),this._listeners=Object.create(null),this._dispatchToDOM=!0===n}return _createClass(e,[{key:"on",value:function(e,t){var n=this._listeners[e];n||(n=[],this._listeners[e]=n),n.push(t)}},{key:"off",value:function(e,t){var n=this._listeners[e],i=void 0;!n||(i=n.indexOf(t))<0||n.splice(i,1)}},{key:"dispatch",value:function(e){var t=this._listeners[e];if(t&&0!==t.length){var n=Array.prototype.slice.call(arguments,1);t.slice(0).forEach(function(e){e.apply(null,n)}),this._dispatchToDOM&&this._dispatchDOMEvent(e,n)}else if(this._dispatchToDOM){var i=Array.prototype.slice.call(arguments,1);this._dispatchDOMEvent(e,i)}}},{key:"_dispatchDOMEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this._dispatchToDOM){var n=Object.create(null);if(t&&t.length>0){var i=t[0];for(var a in i){var s=i[a];if("source"!==a)n[a]=s;else if(s===window||s===document)return}}var r=document.createEvent("CustomEvent");r.initCustomEvent(e,!0,!0,n),document.dispatchEvent(r)}}}]),e}(),EXPAND_DIVS_TIMEOUT=300,MATCH_SCROLL_OFFSET_TOP=-50,MATCH_SCROLL_OFFSET_LEFT=-400,TextLayerBuilder=function(){function e(t){var n=t.textLayerDiv,i=t.eventBus,a=t.pageIndex,s=t.viewport,r=t.findController,o=void 0===r?null:r,d=t.enhanceTextSelection,l=void 0!==d&&d;_classCallCheck(this,e),this.textLayerDiv=n,this.eventBus=i||(0,_dom_events.getGlobalEventBus)(),this.textContent=null,this.textContentItemsStr=[],this.textContentStream=null,this.renderingDone=!1,this.pageIdx=a,this.pageNumber=this.pageIdx+1,this.matches=[],this.viewport=s,this.textDivs=[],this.findController=o,this.textLayerRenderTask=null,this.enhanceTextSelection=l,this._boundEvents=Object.create(null),this._bindEvents(),this._bindMouse()}return _createClass(e,[{key:"_finishRendering",value:function(){if(this.renderingDone=!0,!this.enhanceTextSelection){var e=document.createElement("div");e.className="endOfContent",this.textLayerDiv.appendChild(e)}this.eventBus.dispatch("textlayerrendered",{source:this,pageNumber:this.pageNumber,numTextDivs:this.textDivs.length})}},{key:"render",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if((this.textContent||this.textContentStream)&&!this.renderingDone){this.cancel(),this.textDivs=[];var n=document.createDocumentFragment();this.textLayerRenderTask=(0,pdfjsLib.renderTextLayer)({textContent:this.textContent,textContentStream:this.textContentStream,container:n,viewport:this.viewport,textDivs:this.textDivs,textContentItemsStr:this.textContentItemsStr,timeout:t,enhanceTextSelection:this.enhanceTextSelection}),this.textLayerRenderTask.promise.then(function(){e.textLayerDiv.appendChild(n),e._finishRendering(),e.updateMatches()},function(e){})}}},{key:"cancel",value:function(){this.textLayerRenderTask&&(this.textLayerRenderTask.cancel(),this.textLayerRenderTask=null)}},{key:"setTextContentStream",value:function(e){this.cancel(),this.textContentStream=e}},{key:"setTextContent",value:function(e){this.cancel(),this.textContent=e}},{key:"convertMatches",value:function(e,t){var n=0,i=0,a=this.textContentItemsStr,s=a.length-1,r=null===this.findController?0:this.findController.state.query.length,o=[];if(!e)return o;for(var d=0,l=e.length;d<l;d++){for(var h=e[d];n!==s&&h>=i+a[n].length;)i+=a[n].length,n++;n===a.length&&console.error("Could not find a matching mapping");var c={begin:{divIdx:n,offset:h-i}};for(h+=t?t[d]:r;n!==s&&h>i+a[n].length;)i+=a[n].length,n++;c.end={divIdx:n,offset:h-i},o.push(c)}return o}},{key:"renderMatches",value:function(e){if(0!==e.length){var t=this.textContentItemsStr,n=this.textDivs,i=null,a=this.pageIdx,s=null!==this.findController&&a===this.findController.selected.pageIdx,r=null===this.findController?-1:this.findController.selected.matchIdx,o={divIdx:-1,offset:void 0},d=r,l=d+1;if(null!==this.findController&&this.findController.state.highlightAll)d=0,l=e.length;else if(!s)return;for(var h=d;h<l;h++){var c=e[h],g=c.begin,u=c.end,f=s&&h===r?" selected":"";if(this.findController&&this.findController.selected.matchIdx===h&&this.findController.selected.pageIdx===a){var v={top:MATCH_SCROLL_OFFSET_TOP,left:MATCH_SCROLL_OFFSET_LEFT};(0,_ui_utils.scrollIntoView)(n[g.divIdx],v,!0)}if(i&&g.divIdx===i.divIdx?C(i.divIdx,i.offset,g.offset):(null!==i&&C(i.divIdx,i.offset,o.offset),m(g)),g.divIdx===u.divIdx)C(g.divIdx,g.offset,u.offset,"highlight"+f);else{C(g.divIdx,g.offset,o.offset,"highlight begin"+f);for(var p=g.divIdx+1,x=u.divIdx;p<x;p++)n[p].className="highlight middle"+f;m(u,"highlight end"+f)}i=u}i&&C(i.divIdx,i.offset,o.offset)}function m(e,t){var i=e.divIdx;n[i].textContent="",C(i,0,e.offset,t)}function C(e,i,a,s){var r=n[e],o=t[e].substring(i,a),d=document.createTextNode(o);if(s){var l=document.createElement("span");return l.className=s,l.appendChild(d),void r.appendChild(l)}r.appendChild(d)}}},{key:"updateMatches",value:function(){if(this.renderingDone){for(var e=this.matches,t=this.textDivs,n=this.textContentItemsStr,i=-1,a=0,s=e.length;a<s;a++){for(var r=e[a],o=Math.max(i,r.begin.divIdx),d=r.end.divIdx;o<=d;o++){var l=t[o];l.textContent=n[o],l.className=""}i=r.end.divIdx+1}if(this.findController&&this.findController.highlightMatches){var h=void 0,c=void 0;null!==this.findController&&(h=this.findController.pageMatches[this.pageIdx]||null,c=this.findController.pageMatchesLength&&this.findController.pageMatchesLength[this.pageIdx]||null),this.matches=this.convertMatches(h,c),this.renderMatches(this.matches)}}}},{key:"_bindEvents",value:function(){var e=this,t=this.eventBus,n=this._boundEvents;n.pageCancelled=function(i){if(i.pageNumber===e.pageNumber)if(e.textLayerRenderTask)console.error("TextLayerBuilder._bindEvents: `this.cancel()` should have been called when the page was reset, or rendering cancelled.");else for(var a in n)t.off(a.toLowerCase(),n[a]),delete n[a]},n.updateTextLayerMatches=function(t){t.pageIndex!==e.pageIdx&&-1!==t.pageIndex||e.updateMatches()},t.on("pagecancelled",n.pageCancelled),t.on("updatetextlayermatches",n.updateTextLayerMatches)}},{key:"_bindMouse",value:function(){var e=this,t=this.textLayerDiv,n=null;t.addEventListener("mousedown",function(i){if(e.enhanceTextSelection&&e.textLayerRenderTask)return e.textLayerRenderTask.expandTextDivs(!0),void(n&&(clearTimeout(n),n=null));var a=t.querySelector(".endOfContent");if(a){var s=i.target!==t;if(s=s&&"none"!==window.getComputedStyle(a).getPropertyValue("-moz-user-select")){var r=t.getBoundingClientRect(),o=Math.max(0,(i.pageY-r.top)/r.height);a.style.top=(100*o).toFixed(2)+"%"}a.classList.add("active")}}),t.addEventListener("mouseup",function(){if(e.enhanceTextSelection&&e.textLayerRenderTask)n=setTimeout(function(){e.textLayerRenderTask&&e.textLayerRenderTask.expandTextDivs(!1),n=null},EXPAND_DIVS_TIMEOUT);else{var i=t.querySelector(".endOfContent");i&&(i.style.top="",i.classList.remove("active"))}})}}]),e}(),DefaultTextLayerFactory=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"createTextLayerBuilder",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return new TextLayerBuilder({textLayerDiv:e,pageIndex:t,viewport:n,enhanceTextSelection:i})}}]),e}(),PDFLinkService=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.eventBus,i=t.externalLinkTarget,a=void 0===i?null:i,s=t.externalLinkRel,r=void 0===s?null:s;_classCallCheck(this,e),this.eventBus=n||(0,_dom_events.getGlobalEventBus)(),this.externalLinkTarget=a,this.externalLinkRel=r,this.baseUrl=null,this.pdfDocument=null,this.pdfViewer=null,this.pdfHistory=null,this._pagesRefCache=null}return _createClass(e,[{key:"setDocument",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.baseUrl=t,this.pdfDocument=e,this._pagesRefCache=Object.create(null)}},{key:"setViewer",value:function(e){this.pdfViewer=e}},{key:"setHistory",value:function(e){this.pdfHistory=e}},{key:"goToDestination",value:function(e){var t=this;new Promise(function(n,i){"string"!=typeof e?n({namedDest:"",explicitDest:e}):t.pdfDocument.getDestination(e).then(function(t){n({namedDest:e,explicitDest:t})})}).then(function(n){Array.isArray(n.explicitDest)?function n(i){var a=i.namedDest,s=i.explicitDest,r=s[0],o=void 0;if(r instanceof Object||"object"==typeof r){if(null===(o=t._cachedPageNumber(r)))return void t.pdfDocument.getPageIndex(r).then(function(e){t.cachePageRef(e+1,r),n({namedDest:a,explicitDest:s})}).catch(function(){console.error('PDFLinkService.navigateTo: "'+r+'" is not a valid page reference, for dest="'+e+'".')})}else{if(!Number.isInteger(r))return void console.error('PDFLinkService.navigateTo: "'+r+'" is not a valid destination reference, for dest="'+e+'".');o=r+1}!o||o<1||o>t.pagesCount?console.error('PDFLinkService.navigateTo: "'+o+'" is not a valid page number, for dest="'+e+'".'):(t.pdfHistory&&(t.pdfHistory.pushCurrentPosition(),t.pdfHistory.push({namedDest:a,explicitDest:s,pageNumber:o})),t.pdfViewer.scrollPageIntoView({pageNumber:o,destArray:s}))}(n):console.error('PDFLinkService.navigateTo: "'+n.explicitDest+'" is not a valid destination array, for dest="'+e+'".')})}},{key:"navigateTo",value:function(e){var t=this;new Promise(function(n,i){"string"!=typeof e?n({namedDest:"",explicitDest:e}):t.pdfDocument.getDestination(e).then(function(t){n({namedDest:e,explicitDest:t})})}).then(function(n){Array.isArray(n.explicitDest)?function n(i){var a=i.namedDest,s=i.explicitDest,r=s[0],o=void 0;if(r instanceof Object||"object"==typeof r){if(null===(o=t._cachedPageNumber(r)))return void t.pdfDocument.getPageIndex(r).then(function(e){t.cachePageRef(e+1,r),n({namedDest:a,explicitDest:s})}).catch(function(){console.error('PDFLinkService.navigateTo: "'+r+'" is not a valid page reference, for dest="'+e+'".')})}else{if(!Number.isInteger(r))return void console.error('PDFLinkService.navigateTo: "'+r+'" is not a valid destination reference, for dest="'+e+'".');o=r+1}!o||o<1||o>t.pagesCount?console.error('PDFLinkService.navigateTo: "'+o+'" is not a valid page number, for dest="'+e+'".'):(t.pdfHistory&&(t.pdfHistory.pushCurrentPosition(),t.pdfHistory.push({namedDest:a,explicitDest:s,pageNumber:o})),t.pdfViewer.scrollPageIntoView({pageNumber:o,destArray:s}))}(n):console.error('PDFLinkService.navigateTo: "'+n.explicitDest+'" is not a valid destination array, for dest="'+e+'".')})}},{key:"getDestinationHash",value:function(e){if("string"==typeof e)return this.getAnchorUrl("#"+escape(e));if(Array.isArray(e)){var t=JSON.stringify(e);return this.getAnchorUrl("#"+escape(t))}return this.getAnchorUrl("")}},{key:"getAnchorUrl",value:function(e){return(this.baseUrl||"")+e}},{key:"setHash",value:function(e){var t=void 0,n=void 0;if(e.includes("=")){var i=(0,_ui_utils.parseQueryString)(e);if("search"in i&&this.eventBus.dispatch("findfromurlhash",{source:this,query:i.search.replace(/"/g,""),phraseSearch:"true"===i.phrase}),"nameddest"in i)return void this.navigateTo(i.nameddest);if("page"in i&&(t=0|i.page||1),"zoom"in i){var a=i.zoom.split(","),s=a[0],r=parseFloat(s);s.includes("Fit")?"Fit"===s||"FitB"===s?n=[null,{name:s}]:"FitH"===s||"FitBH"===s||"FitV"===s||"FitBV"===s?n=[null,{name:s},a.length>1?0|a[1]:null]:"FitR"===s?5!==a.length?console.error('PDFLinkService.setHash: Not enough parameters for "FitR".'):n=[null,{name:s},0|a[1],0|a[2],0|a[3],0|a[4]]:console.error('PDFLinkService.setHash: "'+s+'" is not a valid zoom value.'):n=[null,{name:"XYZ"},a.length>1?0|a[1]:null,a.length>2?0|a[2]:null,r?r/100:s]}n?this.pdfViewer.scrollPageIntoView({pageNumber:t||this.page,destArray:n,allowNegativeOffset:!0}):t&&(this.page=t),"pagemode"in i&&this.eventBus.dispatch("pagemode",{source:this,mode:i.pagemode})}else{n=unescape(e);try{n=JSON.parse(n),Array.isArray(n)||(n=n.toString())}catch(e){}if("string"==typeof n||isValidExplicitDestination(n))return void this.navigateTo(n);console.error('PDFLinkService.setHash: "'+unescape(e)+'" is not a valid destination.')}}},{key:"executeNamedAction",value:function(e){switch(e){case"GoBack":this.pdfHistory&&this.pdfHistory.back();break;case"GoForward":this.pdfHistory&&this.pdfHistory.forward();break;case"NextPage":this.page<this.pagesCount&&this.page++;break;case"PrevPage":this.page>1&&this.page--;break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1}this.eventBus.dispatch("namedaction",{source:this,action:e})}},{key:"cachePageRef",value:function(e,t){if(t){var n=t.num+" "+t.gen+" R";this._pagesRefCache[n]=e}}},{key:"_cachedPageNumber",value:function(e){var t=e.num+" "+e.gen+" R";return this._pagesRefCache&&this._pagesRefCache[t]||null}},{key:"pagesCount",get:function(){return this.pdfDocument?this.pdfDocument.numPages:0}},{key:"page",get:function(){return this.pdfViewer.currentPageNumber},set:function(e){this.pdfViewer.currentPageNumber=e}},{key:"rotation",get:function(){return this.pdfViewer.pagesRotation},set:function(e){this.pdfViewer.pagesRotation=e}}]),e}();function isValidExplicitDestination(e){if(!Array.isArray(e))return!1;var t=e.length,n=!0;if(t<2)return!1;var i=e[0];if(!("object"===(void 0===i?"undefined":_typeof(i))&&Number.isInteger(i.num)&&Number.isInteger(i.gen)||Number.isInteger(i)&&i>=0))return!1;var a=e[1];if("object"!==(void 0===a?"undefined":_typeof(a))||"string"!=typeof a.name)return!1;switch(a.name){case"XYZ":if(5!==t)return!1;break;case"Fit":case"FitB":return 2===t;case"FitH":case"FitBH":case"FitV":case"FitBV":if(3!==t)return!1;break;case"FitR":if(6!==t)return!1;n=!1;break;default:return!1}for(var s=2;s<t;s++){var r=e[s];if(!("number"==typeof r||n&&null===r))return!1}return!0}var TEXT_LAYER_RENDER_DELAY=200,MAX_TEXT_DIVS_TO_RENDER=1e5,NonWhitespaceRegexp=/\S/;
/*
Real3D FlipBook
version 3.32
author http://codecanyon.net/user/creativeinteractivemedia/portfolio?ref=creativeinteractivemedia
*/
var FLIPBOOK=FLIPBOOK||{};FLIPBOOK.Book3=function(t,i,e){this.options=e,this.model=i,this.singlePage=e.singlePageMode,this.pageWidth=this.options.pageWidth,this.pageHeight=this.options.pageHeight,this.wrapper=t,this.$wrapper=jQuery(this.wrapper).addClass("flipbook-book3"),this.$bookLayer=this.$wrapper.parent(),this.bookLayer=this.$bookLayer[0],this.flipEasing="easeInOutCubic",this.flipEasing="easeOutSine",this.flipEasing="easeOutQuad",this.scroll=new FLIPBOOK.IScroll(this.bookLayer,{zoom:!0,scrollX:!0,scrollY:!0,scrollbars:!0,keepInCenterV:!0,keepInCenterH:!0,freeScroll:!0,preventDefault:!1});var o=this;i.on("toolMove",function(){o.updateTool()}),i.on("toolSelect",function(){o.updateTool()}),this.scroll.on("zoomEnd",function(){if(isNaN(o.scroll.scale))o.zoomTo(e.zoomMin);else{e.main.onZoom(o.scroll.scale/o.ratio);var t=e.main.zoom;o.scroll.options.eventPassthrough=t>1?"":"vertical",o.scroll.options.freeScroll=t>1,o.scroll.refresh()}}),this.scroll.on("zoomStart",function(){});var s=this.wrapper.style;s.width=String(2*this.pageWidth)+"px",s.height=String(this.pageHeight)+"px";var n,a=3*this.pageHeight+"px";this.$centerContainer=jQuery("<div>").appendTo(this.$wrapper).addClass("flipbook-center-container3"),this.$centerContainer.css({"-webkit-perspective":a,perspective:a}),this.centerContainerStyle=this.$centerContainer[0].style,this.centerContainerStyle.width=2*this.pageWidth+"px",this.centerContainerStyle.height=this.pageHeight+"px",this.pagesArr=[],this.animating=!1,this.setRightIndex(e.rightToLeft?e.pages.length:0),o.updateFlipped(),this.numPages=e.pages.length;for(var h=0;h<e.numPages;h++)(n=new FLIPBOOK.Page3(this,h,e.pages[h].src,e.pages[h].htmlContent)).hideHtml(),this.pagesArr.push(n),this.$centerContainer.append(n.$wrapper),this.flippedright++;this.pagesArr[0].show(),this.options.cover||((n=new FLIPBOOK.Page3(this,e.numPages,"","")).hideHtml(),this.pagesArr.push(n),this.$centerContainer.append(n.$wrapper),this.flippedright++),this.nextEnabled=!0,this.prevEnabled=!0},FLIPBOOK.Book3.prototype=Object.create(FLIPBOOK.Book.prototype),FLIPBOOK.Book3.prototype.constructor=FLIPBOOK.Book3,FLIPBOOK.Book3.prototype.enableMouseWheelZoom=function(){this.scroll.options.eventPassthrough="vertical",this.scroll.refresh()},FLIPBOOK.Book3.prototype.disableMouseWheelZoom=function(){this.scroll.options.eventPassthrough="",this.scroll.refresh()},FLIPBOOK.Book3.prototype.enablePrev=function(t){this.prevEnabled=t},FLIPBOOK.Book3.prototype.enablePan=function(){this.scroll.enable()},FLIPBOOK.Book3.prototype.disablePan=function(){this.scroll.disable()},FLIPBOOK.Book3.prototype.setRightIndex=function(t){this.rightIndex=t},FLIPBOOK.Book3.prototype.updateTool=function(){switch(this.options.main.tool){case"toolSelect":this.disablePan(),jQuery(".flipbook-textLayer").css("pointer-events","auto").removeClass(".flipbook-noselect");break;case"toolMove":this.enablePan(),jQuery(".flipbook-textLayer").css("pointer-events","none").addClass(".flipbook-noselect")}},FLIPBOOK.Book3.prototype.enableNext=function(t){this.nextEnabled=t},FLIPBOOK.Book3.prototype.isZoomed=function(){return this.options.main.zoom>this.options.zoomMin&&this.options.main.zoom>1},FLIPBOOK.Book3.prototype.onZoom=function(){},FLIPBOOK.Book3.prototype.getNumPages=function(){},FLIPBOOK.Book3.prototype.move=function(t){if(!(this.zoom<=1)){var i=this.scroll;if(i){var e=i.x,o=i.y,s=20*this.zoom;switch(t){case"left":e+=s;break;case"right":e-=s;break;case"up":o+=s;break;case"down":o-=s}e>0&&(e=0),e<i.maxScrollX&&(e=i.maxScrollX-0),o>0&&(o=0),o<i.maxScrollY&&(o=i.maxScrollY-0),i.scrollTo(e,o,0)}}},FLIPBOOK.Book3.prototype.zoomTo=function(t,i,e,o){if(this.enabled){e=e||0,o=o||0,i=i||0;this.zoom=t,i=0;var s=this.scroll;s&&s.zoom(t*this.ratio,e,o,i)}},FLIPBOOK.Book3.prototype.setWrapperW=function(t){this.$wrapperW!=t&&(this.$wrapper.width(t),this.$wrapperW=t)},FLIPBOOK.Book3.prototype.updateBookPosition=function(){if(this.options.singlePageMode)return this.setWrapperW(this.pageWidth),this.$wrapper.width(this.pageWidth),this.scroll&&this.scroll.refresh(),this.view=1,void this.focusRight();1==this.view?this.setWrapperW(this.pageWidth):this.setWrapperW(2*this.pageWidth),this.scroll&&this.scroll.refresh(),2==this.view?this.isCover()?this.focusRight():this.isBackCover()&&this.options.cover?this.focusLeft():this.focusBoth():1==this.view&&(this.isCover()?this.focusRight():this.isBackCover()&&this.focusLeft())},FLIPBOOK.Book3.prototype.focusLeft=function(t,i){var e=1==this.view||this.options.singlePageMode?0:this.pageWidth/2;this.setBookPosition(e,t,i)},FLIPBOOK.Book3.prototype.focusRight=function(t,i){var e=1==this.view||this.options.singlePageMode?-this.pageWidth:-this.pageWidth/2;this.setBookPosition(e,t,i)},FLIPBOOK.Book3.prototype.focusBoth=function(t,i){var e=1==this.view?-this.pageWidth/2:0;this.setBookPosition(e,t,i)},FLIPBOOK.Book3.prototype.setBookPosition=function(t,i,e){if(this.centerContainerPosition!=t){var o=this.centerContainerPosition;if(i){var s=this;e=e||0,jQuery({someValue:o}).delay(e).animate({someValue:t},{duration:i,easing:this.flipEasing,step:function(t){s._setStyle(s.centerContainerStyle,FLIPBOOK.IScroll.utils.style.transform,"translateX("+t+"px) translateZ(0)")},complete:function(){s.centerContainerPosition=t,s.updateFlipped(),s.options.main.turnPageComplete()}})}else{var n="translateX("+t+"px)";this.centerContainerPosition=t,this._setStyle(this.centerContainerStyle,FLIPBOOK.IScroll.utils.style.transform,n),this.updateFlipped(),this.options.main.turnPageComplete()}}},FLIPBOOK.Book3.prototype.updateVisiblePages=function(t){void 0===t&&(t=!0);var i=this,e=FLIPBOOK.IScroll.utils.style.transform,o=this.rightIndex;!this.options.backCover&&this.options.rightToLeft&&o--;for(var s=0;s<this.pagesArr.length;s++)s==o||s==o-1&&!this.options.singlePageMode?this.pagesArr[s].show():this.pagesArr[s].hide(),this.pagesArr[s]._setZIndex(0),this.pagesArr[s]._setStyle(this.pagesArr[s].wrapper.style,e,"");this.updateBookPosition();var n=this.pagesArr[o],a=this.pagesArr[o-1],h=this.pagesArr[o+1],r=this.pagesArr[o+2],p=this.pagesArr[o-2],l=this.pagesArr[o-3];a?(i.options.main.setLoadingProgress(.1),a.load(function(){i.options.main.setLoadingProgress(1),a.startHTML(),n?n.load(function(){i.options.main.setLoadingProgress(1),p&&p.load(null,!0),l&&l.load(null,!0),h&&h.load(null,!0),r&&r.load(null,!0),i.options.doublePage&&2==i.view||n.startHTML()}):(p&&p.load(null,!0),l&&l.load(null,!0))})):(i.options.main.setLoadingProgress(.1),n.load(function(){i.options.main.setLoadingProgress(1),h&&h.load(null,!0),r&&r.load(null,!0),n.startHTML()}));var g=this.options.rightToLeft?-this.model.bookW:0;this.scroll.scrollTo(g,0,300)},FLIPBOOK.Book3.prototype.enable=function(){this.onResize(),this.enabled=!0},FLIPBOOK.Book3.prototype.disable=function(){this.onResize(),this.enabled=!1},FLIPBOOK.Book3.prototype.getLeftPage=function(){return this.pagesArr[this.flippedleft-1]},FLIPBOOK.Book3.prototype.getRightPage=function(){return this.pagesArr[this.flippedleft]},FLIPBOOK.Book3.prototype.getLeftBackPage=function(){return this.pagesArr[this.flippedleft-2]},FLIPBOOK.Book3.prototype.getRightBackPage=function(){return this.pagesArr[this.flippedleft+1]},FLIPBOOK.Book3.prototype.getNextPage=function(){return this.pagesArr[this.flippedleft+2]},FLIPBOOK.Book3.prototype.getPrevPage=function(){return this.pagesArr[this.flippedleft-3]},FLIPBOOK.Book3.prototype.nextPage=function(){if(this.nextEnabled)if(1!=this.view||!this.isFocusedLeft()||this.options.singlePageMode)this.goToPage(this.rightIndex+2);else{var t=700*this.options.pageFlipDuration/2;this.focusRight(t)}},FLIPBOOK.Book3.prototype.prevPage=function(){if(this.prevEnabled)if(1!=this.view||!this.isFocusedRight()||this.options.singlePageMode){var t=this.options.singlePageMode?this.rightIndex:this.rightIndex-2;this.goToPage(t)}else{var i=700*this.options.pageFlipDuration/2;this.focusLeft(i)}},FLIPBOOK.Book3.prototype.goToPage=function(t,i){if(this.enabled&&!this.flipping&&((this.options.singlePageMode||t%2!=0)&&t--,t<0&&(t=0),t>this.options.pages.length&&(t=this.options.pages.length),t!=this.rightIndex)){if(i||this.options.instantFlip)return this.setRightIndex(t),this.updateFlipped(),this.updateVisiblePages(),void this.options.main.turnPageComplete();this.flipping=!0;var e=this.flipEasing;void 0===jQuery.easing[e]&&this.options.main.initEasing();var o=700*this.options.pageFlipDuration;this.options.singlePageMode||(1==this.view?t<this.rightIndex?this.focusRight(o):this.focusLeft(o):0==t?this.focusRight(o):t==this.pagesArr.length?this.focusLeft(o):this.focusBoth(o));var s=this;this.goingToPage=t,t>this.rightIndex?(end=180,(s.angle<=0||s.angle>=180||!s.angle)&&(s.angle=1)):t<this.rightIndex&&(end=-180,(s.angle>=0||s.angle<=-180||!s.angle)&&(s.angle=-1)),this.options.singlePageMode&&(o/=2),jQuery({someValue:s.angle}).animate({someValue:end},{duration:o,easing:e,step:function(t){s._setPageAngle(t)},complete:function(){s.setRightIndex(s.goingToPage),s.angle=0,s.flipping=!1,s.updateFlipped(),s.updateVisiblePages(),s.options.main.turnPageComplete()}}),s.options.main.playFlipSound()}},FLIPBOOK.Book3.prototype.updateFlipped=function(){this.flippedleft=(this.rightIndex+this.rightIndex%2)/2,this.flippedright=this.options.pages.length/2-this.flippedleft},FLIPBOOK.Book3.prototype.onSwipe=function(t,i,e,o,s,n,a){if(!this.isZoomed()&&"flipbook-page-link"!=t.target.className&&"start"!=i&&"up"!=e&&"down"!=e&&!this.flipping){"right"==e&&(o*=-1);var h=180*o/this.model.wrapperW;if("cancel"==i&&n<=1&&(h>0?this.nextPage():h<0&&this.prevPage()),"end"==i&&n<=1&&(h>0?this.nextPage():h<0&&this.prevPage()),"move"==i&&n<=1){if(h>0){if(!this.nextEnabled)return;if(this.options.singlePageMode&&this.rightIndex==this.pagesArr.length-1)return;this.goingToPage=this.options.singlePageMode?this.rightIndex+1:this.rightIndex+2}else if(h<0){if(!this.prevEnabled)return;this.goingToPage=this.options.singlePageMode?this.rightIndex-1:this.rightIndex-2}this.goingToPage!=this.rightIndex&&this.goingToPage>=0&&this.goingToPage<=this.pagesArr.length&&(this.options.instantFlip||this._setPageAngle(h))}}},FLIPBOOK.Book3.prototype.hideHtml=function(t,e,o){for(i=0;i<this.pagesArr.length;i++)this.pagesArr[i].hideHtml()},FLIPBOOK.Book3.prototype._setStyle=function(t,i,e){t&&(t[i]=e)},FLIPBOOK.Book3.prototype._setPageAngle=function(t){var i,e,o,s;if(this.angle=t,this.hideHtml(),this.options.singlePageMode)t>0?((o=this.pagesArr[this.rightIndex])._setAngle(t/2),(e=this.pagesArr[this.goingToPage])&&(e.show(),e.load())):((s=this.pagesArr[this.goingToPage]).show(),s.load(),s._setAngle(t/2+90),o=this.pagesArr[this.rightIndex]);else{var n=this.rightIndex,a=this.goingToPage;if(this.options.rightToLeft&&!this.options.backCover&&(n--,a--),t>0){if(1==this.view&&this.isFocusedLeft())return;o=this.pagesArr[n],s=this.pagesArr[a-1],this.applyAngles(o,s,t,90,0),e=this.pagesArr[a],o.setShadowOpacity((t-10)/600),s.setShadowOpacity((180-t-10)/600),s.load(),e&&(e.show(),e.load())}else{if(1==this.view&&this.isFocusedRight())return;s=this.pagesArr[n-1],(o=this.pagesArr[a]).load(),this.applyAngles(o,s,t,-90,180),o.setShadowOpacity((180+t-10)/600),s.setShadowOpacity((-t-10)/600),(i=this.pagesArr[a-1])&&(i.show(),i.load())}}},FLIPBOOK.Book3.prototype.isCover=function(){return 0==this.rightIndex},FLIPBOOK.Book3.prototype.isBackCover=function(){return this.rightIndex==this.options.pages.length},FLIPBOOK.Book3.prototype.applyAngles=function(t,i,e,o,s){e<o?(t&&(t.show(),t._setAngle(e+s)),i&&(i.hide(),i._setAngle(45))):(i&&(i.show(),i._setAngle(e+s)),t&&(t.hide(),t._setAngle(45)))},FLIPBOOK.Book3.prototype.onPageUnloaded=function(t,i){var e=t;this.options.rightToLeft&&(e=this.options.pages.length-t-1),this.pagesArr[e]&&this.pagesArr[e].unload()},FLIPBOOK.Book3.prototype.onResize=function(){var t=this.model,i=t.wrapperW,e=t.wrapperH,o=t.bookW,s=t.bookH,n=t.pageW,a=t.pageH,h=i/e,r=n/a,p=(this.options.main,this.options),l=this;function g(){l.ratio=e/s,c()}function d(){l.ratio=1==l.view?i/n:i/o,c()}function c(){l.scroll&&(l.scroll.options.zoomMin=l.ratio*p.zoomMin),l.scroll&&(l.scroll.options.zoomMax=l.ratio*p.zoomMax),l.updateBookPosition(),l.scroll&&l.scroll.zoom(l.ratio*p.main.zoom,i/2,e/2,0)}Math.min(this.zoom,1),Number(this.options.zoomMin);!this.options.singlePageMode&&this.options.responsiveView&&i<=this.options.responsiveViewTreshold&&h<2*r&&h<this.options.responsiveViewRatio?(this.view=1,i/e>n/a?g():d()):(this.view=2,i/e>=o/s?g():d()),this.updateBookPosition(),this.updateFlipped(),this.options.main.turnPageComplete()},FLIPBOOK.Book3.prototype.isFocusedRight=function(){var t=1==this.view?-this.pageWidth/2:0;return this.options.singlePageMode?this.rightIndex%2==0:this.centerContainerPosition<t},FLIPBOOK.Book3.prototype.isFocusedLeft=function(){var t=1==this.view?-this.pageWidth/2:0;return this.options.singlePageMode?this.rightIndex%2==1:this.centerContainerPosition>t},FLIPBOOK.Page3=function(t,i,e,o){this.book=t,this.options=t.options,this.texture=e,this.html=o,this.index=i,this.$wrapper=jQuery("<div>").addClass("flipbook-page3").width(t.options.pageWidth).height(t.options.pageHeight),this.wrapper=this.$wrapper[0];var s=t.options;this.$inner=jQuery("<div>").appendTo(this.$wrapper).addClass("flipbook-page3-inner"),this.$bg=jQuery("<div>").appendTo(this.$inner).addClass("flipbook-page3-bg"),this.$html=jQuery("<div>").appendTo(this.$inner).addClass("flipbook-page3-html").addClass("page_"+i),this.$html[0].style.width=1e3*s.pageWidth/s.pageHeight+"px",this.$html[0].style.transform="scale("+this.options.pageHeight/1e3+") translateZ(0)",this.options.doublePage&&(this.index%2==0&&this.index>0?this.$html[0].style.left="-100%":this.$html[0].style.left="0"),this.$shadow=jQuery("<div>").appendTo(this.$wrapper).addClass("flipbook-page3-shadow"),s.pagePreloader?this.$preloader=jQuery('<img src="'+s.pagePreloader+'" class="flipbook-page-preloader-image">').appendTo(this.$wrapper):this.$preloader=jQuery('<img src="'+s.assets.spinner+'" class="flipbook-page-preloader">').appendTo(this.$wrapper),this.shadow=this.$shadow[0],this.hidden=!1,this.hide(),this.zIndex=0,this.options.rightToLeft&&!this.options.backCover&&i++,this.options.singlePageMode?(this.$wrapper.css("left",String(this.book.options.pageWidth-1)+"px").addClass("flipbook-page3-front"),this.type="front"):i%2==0?(this.$wrapper.css("left",String(this.book.options.pageWidth-1)+"px").addClass("flipbook-page3-front"),this.type="front"):(this.$wrapper.addClass("flipbook-page3-back"),this.type="back")},FLIPBOOK.Page3.prototype={load:function(t,i){var e=this.options.pageTextureSize;if(this.size>=e)return i||this.loadHTML(),void(t&&t.call(this));this.size=e;var o=this,s=o.options.rightToLeft?this.book.pagesArr.length-this.index-1:this.index;this.options.main.loadPage(s,e,function(e){if(e&&e.image){var s=e.image,n=(e.image.naturalHeight,e.image.naturalHeight);o.options.pageWidth,o.options.pageHeight;"left"!=o.options.pages[e.index].side&&"right"!=o.options.pages[e.index].side||o.index%2==0&&jQuery(s).css(FLIPBOOK.IScroll.utils.style.transform,"translateX(-50%) translateZ(0)"),o.$bg.empty().append(jQuery(s)),o.$preloader.hide()}e&&e.canvas&&o.pageSize!=e.size&&(o.pageSize=e.size,o.$bg.empty(),o.options.doublePage&&o.index%2==0&&0!=o.index?jQuery(e.rCanvas).appendTo(o.$bg):o.options.doublePage&&o.index%2==1&&o.index!=o.options.pages.length-1?jQuery(e.lCanvas).appendTo(o.$bg):jQuery(e.canvas).appendTo(o.$bg),o.$preloader.hide()),i||o.loadHTML(),t&&t.call(o)})},loadHTML:function(){var t=this,i=this.options.rightToLeft?this.options.numPages-this.index-1:this.index;this.htmlContent?this.updateHtmlContent():this.options.main.loadPageHTML(i,function(i){t.htmlContent=i,t.updateHtmlContent()})},startHTML:function(){this.wrapper.querySelectorAll(".flipbook-page-item").forEach(function(t){"VIDEO"!=t.nodeName&&"AUDIO"!=t.nodeName||!t.autoplay||(t.readyState<4?t.oncanplay=function(){this.play()}:t.play())})},unload:function(){this.size=null,this.mat=!1,this.pageSize=null},setMat:function(t,i,e){},hideHtml:function(){this.htmlContentVisible&&(this.$html.empty(),this.htmlContentVisible=!1)},updateHtmlContent:function(){this.htmlContent&&!this.htmlContentVisible&&(this.htmlContentVisible=!0,this.$htmlContent||(this.$htmlContent=jQuery(this.htmlContent)),this.$html.empty().append(this.$htmlContent))},setDataUrl:function(t,i){var e=this;this.$img.attr("src",t),this.$img[0].onload=function(){e.$wrapper.css({background:"none"})},e.html&&jQuery(e.html).appendTo(e.$inner)},show:function(){this.hidden&&(this.$wrapper[0].style.display="block",this.setShadowOpacity(0)),this.hidden=!1},setShadowOpacity:function(t){this.shadow.style.opacity=t},hide:function(){this.hidden||(this.$wrapper[0].style.display="none",this.setShadowOpacity(0)),this.hidden=!0},_setScale:function(t){if(this.scale!=t){var i=FLIPBOOK.IScroll.utils.style.transform,e="scaleX("+String(t)+") translateZ(0)";this.scale=t,this._setStyle(i,e)}},_setAngle:function(t){if(this.angle!=t){this.angle=t;var i,e,o=FLIPBOOK.IScroll.utils.style.transform,s="translateZ(0)";"3d"==this.book.options.viewMode?i="front"==this.type?"rotateY("+String(-t)+"deg) "+s:"rotateY("+String(180-t)+"deg) "+s:"2d"==this.book.options.viewMode&&("front"==this.type?(t>90&&(t=90),i="scaleX("+String((180-2*t)/180)+") "+s):(t<90&&(t=90),i="scaleX("+String(2*t/180-1)+") "+s)),this._setStyle(this.wrapper.style,o,i);var n=0;for(e=0;e<this.book.pagesArr.length;e++)e!=this.index&&this.book.pagesArr[e].zIndex>n&&(n=this.book.pagesArr[e].zIndex);this._setZIndex(n+1)}},_setZIndex:function(t){this.zIndex!=t&&(this.wrapper.style["z-index"]=t),this.zIndex=t},_setStyle:function(t,i,e){t&&(t[i]=e)}};