diff --git a/public/index.html b/public/index.html index f9f9edf..bd36501 100644 --- a/public/index.html +++ b/public/index.html @@ -20,8 +20,8 @@ <%= htmlWebpackPlugin.options.title %> - - + + @@ -31,26 +31,33 @@ + + + + - + + + + + +
+ + + \ No newline at end of file diff --git a/public/textPdf/mammoth.browser.min.js b/public/textPdf/mammoth.browser.min.js new file mode 100644 index 0000000..a8286fd --- /dev/null +++ b/public/textPdf/mammoth.browser.min.js @@ -0,0 +1,18 @@ +!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{var g;g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,g.mammoth=f()}}(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o h1\" instead of mammoth.styleMapping(\"p[style-name='Title'] => h1\")")}},{"./document-to-html":3,"./docx/docx-reader":9,"./docx/style-map":14,"./images":20,"./options-reader":22,"./results":24,"./style-reader":25,"./transforms":29,"./underline":30,"./unzip":2,underscore:156}],22:[function(require,module,exports){function readOptions(options){return options=options||{},_.extend({},standardOptions,options,{customStyleMap:readStyleMap(options.styleMap),readStyleMap:function(){var styleMap=this.customStyleMap;return this.includeEmbeddedStyleMap&&(styleMap=styleMap.concat(readStyleMap(this.embeddedStyleMap))),this.includeDefaultStyleMap&&(styleMap=styleMap.concat(defaultStyleMap)),styleMap}})}function readStyleMap(styleMap){return styleMap?_.isString(styleMap)?styleMap.split("\n").map(function(line){return line.trim()}).filter(function(line){return""!==line&&"#"!==line.charAt(0)}):styleMap:[]}function identity(value){return value}exports.readOptions=readOptions;var _=require("underscore"),defaultStyleMap=exports._defaultStyleMap=["p.Heading1 => h1:fresh","p.Heading2 => h2:fresh","p.Heading3 => h3:fresh","p.Heading4 => h4:fresh","p.Heading5 => h5:fresh","p.Heading6 => h6:fresh","p[style-name='Heading 1'] => h1:fresh","p[style-name='Heading 2'] => h2:fresh","p[style-name='Heading 3'] => h3:fresh","p[style-name='Heading 4'] => h4:fresh","p[style-name='Heading 5'] => h5:fresh","p[style-name='Heading 6'] => h6:fresh","p[style-name='heading 1'] => h1:fresh","p[style-name='heading 2'] => h2:fresh","p[style-name='heading 3'] => h3:fresh","p[style-name='heading 4'] => h4:fresh","p[style-name='heading 5'] => h5:fresh","p[style-name='heading 6'] => h6:fresh","r[style-name='Strong'] => strong","p[style-name='footnote text'] => p","r[style-name='footnote reference'] =>","p[style-name='endnote text'] => p","r[style-name='endnote reference'] =>","p[style-name='annotation text'] => p","r[style-name='annotation reference'] =>","p[style-name='Footnote'] => p","r[style-name='Footnote anchor'] =>","p[style-name='Endnote'] => p","r[style-name='Endnote anchor'] =>","p:unordered-list(1) => ul > li:fresh","p:unordered-list(2) => ul|ol > li > ul > li:fresh","p:unordered-list(3) => ul|ol > li > ul|ol > li > ul > li:fresh","p:unordered-list(4) => ul|ol > li > ul|ol > li > ul|ol > li > ul > li:fresh","p:unordered-list(5) => ul|ol > li > ul|ol > li > ul|ol > li > ul|ol > li > ul > li:fresh","p:ordered-list(1) => ol > li:fresh","p:ordered-list(2) => ul|ol > li > ol > li:fresh","p:ordered-list(3) => ul|ol > li > ul|ol > li > ol > li:fresh","p:ordered-list(4) => ul|ol > li > ul|ol > li > ul|ol > li > ol > li:fresh","p:ordered-list(5) => ul|ol > li > ul|ol > li > ul|ol > li > ul|ol > li > ol > li:fresh","r[style-name='Hyperlink'] =>","p[style-name='Normal'] => p:fresh"],standardOptions=exports._standardOptions={transformDocument:identity,includeDefaultStyleMap:!0,includeEmbeddedStyleMap:!0}},{underscore:156}],23:[function(require,module,exports){function defer(){var resolve,reject,promise=new bluebird.Promise(function(resolveArg,rejectArg){resolve=resolveArg,reject=rejectArg});return{resolve:resolve,reject:reject,promise:promise}}var _=require("underscore"),bluebird=require("bluebird/js/release/promise")();exports.defer=defer,exports.when=bluebird.resolve,exports.resolve=bluebird.resolve,exports.all=bluebird.all,exports.props=bluebird.props,exports.reject=bluebird.reject,exports.promisify=bluebird.promisify,exports.mapSeries=bluebird.mapSeries,exports.attempt=bluebird.attempt,exports.nfcall=function(func){var args=Array.prototype.slice.call(arguments,1),promisedFunc=bluebird.promisify(func);return promisedFunc.apply(null,args)},bluebird.prototype.fail=bluebird.prototype.caught,bluebird.prototype.also=function(func){return this.then(function(value){var returnValue=_.extend({},value,func(value));return bluebird.props(returnValue)})}},{"bluebird/js/release/promise":59,underscore:156}],24:[function(require,module,exports){function Result(value,messages){this.value=value,this.messages=messages||[]}function success(value){return new Result(value,[])}function warning(message){return{type:"warning",message:message}}function error(exception){return{type:"error",message:exception.message,error:exception}}function combineMessages(results){var messages=[];return _.flatten(_.pluck(results,"messages"),!0).forEach(function(message){containsMessage(messages,message)||messages.push(message)}),messages}function containsMessage(messages,message){return void 0!==_.find(messages,isSameMessage.bind(null,message))}function isSameMessage(first,second){return first.type===second.type&&first.message===second.message}var _=require("underscore");exports.Result=Result,exports.success=success,exports.warning=warning,exports.error=error,Result.prototype.map=function(func){return new Result(func(this.value),this.messages)},Result.prototype.flatMap=function(func){var funcResult=func(this.value);return new Result(funcResult.value,combineMessages([this,funcResult]))},Result.prototype.flatMapThen=function(func){var that=this;return func(this.value).then(function(otherResult){return new Result(otherResult.value,combineMessages([that,otherResult]))})},Result.combine=function(results){var values=_.flatten(_.pluck(results,"value")),messages=combineMessages(results);return new Result(values,messages)}},{underscore:156}],25:[function(require,module,exports){function readStyle(string){return parseString(styleRule,string)}function createStyleRule(){return lop.rules.sequence(lop.rules.sequence.capture(documentMatcherRule()),lop.rules.tokenOfType("whitespace"),lop.rules.tokenOfType("arrow"),lop.rules.sequence.capture(lop.rules.optional(lop.rules.sequence(lop.rules.tokenOfType("whitespace"),lop.rules.sequence.capture(htmlPathRule())).head())),lop.rules.tokenOfType("end")).map(function(documentMatcher,htmlPath){return{from:documentMatcher,to:htmlPath.valueOrElse(htmlPaths.empty)}})}function readDocumentMatcher(string){return parseString(documentMatcherRule(),string)}function documentMatcherRule(){var sequence=lop.rules.sequence,identifierToConstant=function(identifier,constant){return lop.rules.then(lop.rules.token("identifier",identifier),function(){return constant})},paragraphRule=identifierToConstant("p",documentMatchers.paragraph),runRule=identifierToConstant("r",documentMatchers.run),elementTypeRule=lop.rules.firstOf("p or r",paragraphRule,runRule),styleIdRule=lop.rules.then(classRule,function(styleId){return{styleId:styleId}}),styleNameMatcherRule=lop.rules.firstOf("style name matcher",lop.rules.then(lop.rules.sequence(lop.rules.tokenOfType("equals"),lop.rules.sequence.cut(),lop.rules.sequence.capture(stringRule)).head(),function(styleName){return{styleName:documentMatchers.equalTo(styleName)}}),lop.rules.then(lop.rules.sequence(lop.rules.tokenOfType("startsWith"),lop.rules.sequence.cut(),lop.rules.sequence.capture(stringRule)).head(),function(styleName){return{styleName:documentMatchers.startsWith(styleName)}})),styleNameRule=lop.rules.sequence(lop.rules.tokenOfType("open-square-bracket"),lop.rules.sequence.cut(),lop.rules.token("identifier","style-name"),lop.rules.sequence.capture(styleNameMatcherRule),lop.rules.tokenOfType("close-square-bracket")).head(),listTypeRule=lop.rules.firstOf("list type",identifierToConstant("ordered-list",{isOrdered:!0}),identifierToConstant("unordered-list",{isOrdered:!1})),listRule=sequence(lop.rules.tokenOfType("colon"),sequence.capture(listTypeRule),sequence.cut(),lop.rules.tokenOfType("open-paren"),sequence.capture(integerRule),lop.rules.tokenOfType("close-paren")).map(function(listType,levelNumber){return{list:{isOrdered:listType.isOrdered,levelIndex:levelNumber-1}}}),matcherSuffix=lop.rules.firstOf("matcher suffix",styleIdRule,styleNameRule,listRule),matcherSuffixes=lop.rules.zeroOrMore(matcherSuffix),paragraphOrRun=sequence(sequence.capture(elementTypeRule),sequence.capture(matcherSuffixes)).map(function(createMatcher,suffixes){var matcherOptions={};return suffixes.forEach(function(suffix){_.extend(matcherOptions,suffix)}),createMatcher(matcherOptions)}),bold=identifierToConstant("b",documentMatchers.bold),italic=identifierToConstant("i",documentMatchers.italic),underline=identifierToConstant("u",documentMatchers.underline),strikethrough=identifierToConstant("strike",documentMatchers.strikethrough),commentReference=identifierToConstant("comment-reference",documentMatchers.commentReference),breakMatcher=sequence(lop.rules.token("identifier","br"),sequence.cut(),lop.rules.tokenOfType("open-square-bracket"),lop.rules.token("identifier","type"),lop.rules.tokenOfType("equals"),sequence.capture(stringRule),lop.rules.tokenOfType("close-square-bracket")).map(function(breakType){switch(breakType){case"line":return documentMatchers.lineBreak;case"page":return documentMatchers.pageBreak;case"column":return documentMatchers.columnBreak}});return lop.rules.firstOf("element type",paragraphOrRun,bold,italic,underline,strikethrough,commentReference,breakMatcher)}function readHtmlPath(string){return parseString(htmlPathRule(),string)}function htmlPathRule(){var capture=lop.rules.sequence.capture,whitespaceRule=lop.rules.tokenOfType("whitespace"),freshRule=lop.rules.then(lop.rules.optional(lop.rules.sequence(lop.rules.tokenOfType("colon"),lop.rules.token("identifier","fresh"))),function(option){return option.map(function(){return!0}).valueOrElse(!1)}),separatorRule=lop.rules.then(lop.rules.optional(lop.rules.sequence(lop.rules.tokenOfType("colon"),lop.rules.token("identifier","separator"),lop.rules.tokenOfType("open-paren"),capture(stringRule),lop.rules.tokenOfType("close-paren")).head()),function(option){return option.valueOrElse("")}),tagNamesRule=lop.rules.oneOrMoreWithSeparator(identifierRule,lop.rules.tokenOfType("choice")),styleElementRule=lop.rules.sequence(capture(tagNamesRule),capture(lop.rules.zeroOrMore(classRule)),capture(freshRule),capture(separatorRule)).map(function(tagName,classNames,fresh,separator){var attributes={},options={};return classNames.length>0&&(attributes["class"]=classNames.join(" ")),fresh&&(options.fresh=!0),separator&&(options.separator=separator),htmlPaths.element(tagName,attributes,options)});return lop.rules.firstOf("html path",lop.rules.then(lop.rules.tokenOfType("bang"),function(){return htmlPaths.ignore}),lop.rules.then(lop.rules.zeroOrMoreWithSeparator(styleElementRule,lop.rules.sequence(whitespaceRule,lop.rules.tokenOfType("gt"),whitespaceRule)),htmlPaths.elements))}function decodeEscapeSequences(value){return value.replace(/\\(.)/g,function(match,code){return escapeSequences[code]||code})}function parseString(rule,string){var tokens=tokenise(string),parser=lop.Parser(),parseResult=parser.parseTokens(rule,tokens);return parseResult.isSuccess()?results.success(parseResult.value()):new results.Result(null,[results.warning(describeFailure(string,parseResult))])}function describeFailure(input,parseResult){return"Did not understand this style mapping, so ignored it: "+input+"\n"+parseResult.errors().map(describeError).join("\n")}function describeError(error){return"Error was at character number "+error.characterNumber()+": Expected "+error.expected+" but got "+error.actual}var _=require("underscore"),lop=require("lop"),documentMatchers=require("./styles/document-matchers"),htmlPaths=require("./styles/html-paths"),tokenise=require("./styles/parser/tokeniser").tokenise,results=require("./results");exports.readHtmlPath=readHtmlPath,exports.readDocumentMatcher=readDocumentMatcher,exports.readStyle=readStyle;var identifierRule=lop.rules.then(lop.rules.tokenOfType("identifier"),decodeEscapeSequences),integerRule=lop.rules.tokenOfType("integer"),stringRule=lop.rules.then(lop.rules.tokenOfType("string"),decodeEscapeSequences),escapeSequences={n:"\n",r:"\r",t:" "},classRule=lop.rules.sequence(lop.rules.tokenOfType("dot"),lop.rules.sequence.cut(),lop.rules.sequence.capture(identifierRule)).head(),styleRule=createStyleRule()},{"./results":24,"./styles/document-matchers":26,"./styles/html-paths":27,"./styles/parser/tokeniser":28,lop:142,underscore:156}],26:[function(require,module,exports){function paragraph(options){return new Matcher("paragraph",options)}function run(options){return new Matcher("run",options)}function Matcher(elementType,options){options=options||{},this._elementType=elementType,this._styleId=options.styleId,this._styleName=options.styleName,options.list&&(this._listIndex=options.list.levelIndex,this._listIsOrdered=options.list.isOrdered)}function isList(element,levelIndex,isOrdered){return element.numbering&&element.numbering.level==levelIndex&&element.numbering.isOrdered==isOrdered}function equalTo(value){return{operator:operatorEqualTo,operand:value}}function startsWith(value){return{operator:operatorStartsWith,operand:value}}function operatorEqualTo(first,second){return first.toUpperCase()===second.toUpperCase()}function operatorStartsWith(first,second){return 0===second.toUpperCase().indexOf(first.toUpperCase())}exports.paragraph=paragraph,exports.run=run,exports.bold=new Matcher("bold"),exports.italic=new Matcher("italic"),exports.underline=new Matcher("underline"),exports.strikethrough=new Matcher("strikethrough"),exports.commentReference=new Matcher("commentReference"),exports.lineBreak=new Matcher("break",{breakType:"line"}),exports.pageBreak=new Matcher("break",{breakType:"page"}),exports.columnBreak=new Matcher("break",{breakType:"column"}),exports.equalTo=equalTo,exports.startsWith=startsWith,Matcher.prototype.matches=function(element){return element.type===this._elementType&&(void 0===this._styleId||element.styleId===this._styleId)&&(void 0===this._styleName||element.styleName&&this._styleName.operator(this._styleName.operand,element.styleName))&&(void 0===this._listIndex||isList(element,this._listIndex,this._listIsOrdered))&&(void 0===this._breakType||this._breakType===element.breakType)}},{}],27:[function(require,module,exports){function topLevelElement(tagName,attributes){return elements([element(tagName,attributes,{fresh:!0})])}function elements(elementStyles){return new HtmlPath(elementStyles.map(function(elementStyle){return _.isString(elementStyle)?element(elementStyle):elementStyle}))}function HtmlPath(elements){this._elements=elements}function element(tagName,attributes,options){return options=options||{},new Element(tagName,attributes,options)}function Element(tagName,attributes,options){var tagNames={};_.isArray(tagName)?(tagName.forEach(function(tagName){tagNames[tagName]=!0}),tagName=tagName[0]):tagNames[tagName]=!0,this.tagName=tagName,this.tagNames=tagNames,this.attributes=attributes||{},this.fresh=options.fresh,this.separator=options.separator}var _=require("underscore"),html=require("../html");exports.topLevelElement=topLevelElement,exports.elements=elements,exports.element=element,HtmlPath.prototype.wrap=function(children){for(var result=children(),index=this._elements.length-1;index>=0;index--)result=this._elements[index].wrapNodes(result);return result},Element.prototype.matchesElement=function(element){return this.tagNames[element.tagName]&&_.isEqual(this.attributes||{},element.attributes||{})},Element.prototype.wrap=function(generateNodes){return this.wrapNodes(generateNodes())},Element.prototype.wrapNodes=function(nodes){return[html.elementWithTag(this,nodes)]},exports.empty=elements([]),exports.ignore={wrap:function(){return[]}}},{"../html":18,underscore:156}],28:[function(require,module,exports){function tokenise(string){var identifierCharacter="(?:[a-zA-Z\\-_]|\\\\.)",tokeniser=new RegexTokeniser([{name:"identifier",regex:new RegExp("("+identifierCharacter+"(?:"+identifierCharacter+"|[0-9])*)")},{name:"dot",regex:/\./},{name:"colon",regex:/:/},{name:"gt",regex:/>/},{name:"whitespace",regex:/\s+/},{name:"arrow",regex:/=>/},{name:"equals",regex:/=/},{name:"startsWith",regex:/\^=/},{name:"open-paren", +regex:/\(/},{name:"close-paren",regex:/\)/},{name:"open-square-bracket",regex:/\[/},{name:"close-square-bracket",regex:/\]/},{name:"string",regex:new RegExp(stringPrefix+"'")},{name:"unterminated-string",regex:new RegExp(stringPrefix)},{name:"integer",regex:/([0-9]+)/},{name:"choice",regex:/\|/},{name:"bang",regex:/(!)/}]);return tokeniser.tokenise(string)}var lop=require("lop"),RegexTokeniser=lop.RegexTokeniser;exports.tokenise=tokenise;var stringPrefix="'((?:\\\\.|[^'])*)"},{lop:142}],29:[function(require,module,exports){function paragraph(transform){return elementsOfType("paragraph",transform)}function run(transform){return elementsOfType("run",transform)}function elementsOfType(elementType,transform){return elements(function(element){return element.type===elementType?transform(element):element})}function elements(transform){return function transformElement(element){if(element.children){var children=_.map(element.children,transformElement);element=_.extend(element,{children:children})}return transform(element)}}function getDescendantsOfType(element,type){return getDescendants(element).filter(function(descendant){return descendant.type===type})}function getDescendants(element){var descendants=[];return visitDescendants(element,function(descendant){descendants.push(descendant)}),descendants}function visitDescendants(element,visit){element.children&&element.children.forEach(function(child){visitDescendants(child,visit),visit(child)})}var _=require("underscore");exports.paragraph=paragraph,exports.run=run,exports._elements=elements,exports.getDescendantsOfType=getDescendantsOfType,exports.getDescendants=getDescendants},{underscore:156}],30:[function(require,module,exports){function element(name){return function(html){return Html.elementWithTag(htmlPaths.element(name),[html])}}var htmlPaths=require("./styles/html-paths"),Html=require("./html");exports.element=element},{"./html":18,"./styles/html-paths":27}],31:[function(require,module,exports){function writer(options){return options=options||{},options.prettyPrint?prettyWriter():simpleWriter()}function prettyWriter(){function open(tagName,attributes){indentedElements[tagName]&&indent(),stack.push(tagName),writer.open(tagName,attributes),indentedElements[tagName]&&indentationLevel++,start=!1}function close(tagName){indentedElements[tagName]&&(indentationLevel--,indent()),stack.pop(),writer.close(tagName)}function text(value){startText(),writer.text(value.replace("\n","\n"+indentation))}function selfClosing(tagName,attributes){indent(),writer.selfClosing(tagName,attributes)}function append(html){startText(),writer.append(html.replace("\n","\n"+indentation))}function insideIndentedElement(){return 0===stack.length||indentedElements[stack[stack.length-1]]}function startText(){inText||(indent(),inText=!0)}function indent(){if(inText=!1,!start&&insideIndentedElement()){writer.append("\n");for(var i=0;indentationLevel>i;i++)writer.append(indentation)}}var indentationLevel=0,indentation=" ",stack=[],start=!0,inText=!1,writer=simpleWriter();return{asString:writer.asString,open:open,close:close,text:text,selfClosing:selfClosing,append:append}}function simpleWriter(){function open(tagName,attributes){var attributeString=generateAttributeString(attributes);fragments.push(util.format("<%s%s>",tagName,attributeString))}function close(tagName){fragments.push(util.format("",tagName))}function selfClosing(tagName,attributes){var attributeString=generateAttributeString(attributes);fragments.push(util.format("<%s%s />",tagName,attributeString))}function generateAttributeString(attributes){return _.map(attributes,function(value,key){return util.format(' %s="%s"',key,escapeHtmlAttribute(value))}).join("")}function text(value){fragments.push(escapeHtmlText(value))}function append(html){fragments.push(html)}function asString(){return fragments.join("")}var fragments=[];return{asString:asString,open:open,close:close,text:text,selfClosing:selfClosing,append:append}}function escapeHtmlText(value){return value.replace(/&/g,"&").replace(//g,">")}function escapeHtmlAttribute(value){return value.replace(/&/g,"&").replace(/"/g,""").replace(//g,">")}var util=require("util"),_=require("underscore");exports.writer=writer;var indentedElements={div:!0,p:!0,ul:!0,li:!0}},{underscore:156,util:102}],32:[function(require,module,exports){function writer(options){return options=options||{},"markdown"===options.outputFormat?markdownWriter.writer():htmlWriter.writer(options)}var htmlWriter=require("./html-writer"),markdownWriter=require("./markdown-writer");exports.writer=writer},{"./html-writer":31,"./markdown-writer":33}],33:[function(require,module,exports){function symmetricMarkdownElement(end){return markdownElement(end,end)}function markdownElement(start,end){return function(){return{start:start,end:end}}}function markdownLink(attributes){var href=attributes.href||"";return href?{start:"[",end:"]("+href+")",anchorPosition:"before"}:{}}function markdownImage(attributes){var src=attributes.src||"",altText=attributes.alt||"";return src||altText?{start:"!["+altText+"]("+src+")"}:{}}function markdownList(options){return function(attributes,list){return{start:list?"\n":"",end:list?"":"\n",list:{isOrdered:options.isOrdered,indent:list?list.indent+1:0,count:0}}}}function markdownListItem(attributes,list,listItem){list=list||{indent:0,isOrdered:!1,count:0},list.count++,listItem.hasClosed=!1;var bullet=list.isOrdered?list.count+".":"-",start=repeatString(" ",list.indent)+bullet+" ";return{start:start,end:function(){return listItem.hasClosed?void 0:(listItem.hasClosed=!0,"\n")}}}function repeatString(value,count){return new Array(count+1).join(value)}function markdownWriter(){function open(tagName,attributes){attributes=attributes||{};var createElement=htmlToMarkdown[tagName]||function(){return{}},element=createElement(attributes,list,listItem);elementStack.push({end:element.end,list:list}),element.list&&(list=element.list);var anchorBeforeStart="before"===element.anchorPosition;anchorBeforeStart&&writeAnchor(attributes),fragments.push(element.start||""),anchorBeforeStart||writeAnchor(attributes)}function writeAnchor(attributes){attributes.id&&fragments.push('')}function close(tagName){var element=elementStack.pop();list=element.list;var end=_.isFunction(element.end)?element.end():element.end;fragments.push(end||"")}function selfClosing(tagName,attributes){open(tagName,attributes),close(tagName)}function text(value){fragments.push(escapeMarkdown(value))}function append(html){fragments.push(html)}function asString(){return fragments.join("")}var fragments=[],elementStack=[],list=null,listItem={};return{asString:asString,open:open,close:close,text:text,selfClosing:selfClosing,append:append}}function escapeMarkdown(value){return value.replace(/\\/g,"\\\\").replace(/([\`\*_\{\}\[\]\(\)\#\+\-\.\!])/g,"\\$1")}var _=require("underscore"),htmlToMarkdown={p:markdownElement("","\n\n"),br:markdownElement(""," \n"),ul:markdownList({isOrdered:!1}),ol:markdownList({isOrdered:!0}),li:markdownListItem,strong:symmetricMarkdownElement("__"),em:symmetricMarkdownElement("*"),a:markdownLink,img:markdownImage};!function(){for(var i=1;6>=i;i++)htmlToMarkdown["h"+i]=markdownElement(repeatString("#",i)+" ","\n\n")}(),exports.writer=markdownWriter},{underscore:156}],34:[function(require,module,exports){var nodes=require("./nodes");exports.Element=nodes.Element,exports.element=nodes.element,exports.text=nodes.text,exports.readString=require("./reader").readString,exports.writeString=require("./writer").writeString},{"./nodes":35,"./reader":36,"./writer":37}],35:[function(require,module,exports){function Element(name,attributes,children){this.type="element",this.name=name,this.attributes=attributes||{},this.children=children||[]}function toElementList(array){return _.extend(array,elementListPrototype)}var _=require("underscore");exports.Element=Element,exports.element=function(name,attributes,children){return new Element(name,attributes,children)},exports.text=function(value){return{type:"text",value:value}};var emptyElement={first:function(){return null},firstOrEmpty:function(){return emptyElement},attributes:{}};Element.prototype.first=function(name){return _.find(this.children,function(child){return child.name===name})},Element.prototype.firstOrEmpty=function(name){return this.first(name)||emptyElement},Element.prototype.getElementsByTagName=function(name){var elements=_.filter(this.children,function(child){return child.name===name});return toElementList(elements)},Element.prototype.text=function(){if(0===this.children.length)return"";if(1!==this.children.length||"text"!==this.children[0].type)throw new Error("Not implemented");return this.children[0].value};var elementListPrototype={getElementsByTagName:function(name){return toElementList(_.flatten(this.map(function(element){return element.getElementsByTagName(name)},!0)))}}},{underscore:156}],36:[function(require,module,exports){function readString(xmlString,namespaceMap){function mapName(node){if(node.uri){var prefix,mappedPrefix=namespaceMap[node.uri];return prefix=mappedPrefix?mappedPrefix+":":"{"+node.uri+"}",prefix+node.local}return node.local}namespaceMap=namespaceMap||{};var finished=!1,parser=sax.parser(!0,{xmlns:!0,position:!1}),rootElement={children:[]},currentElement=rootElement,stack=[],deferred=promises.defer();return parser.onopentag=function(node){var attributes=mapObject(node.attributes,function(attribute){return attribute.value},mapName),element=new Element(mapName(node),attributes);currentElement.children.push(element),stack.push(currentElement),currentElement=element},parser.onclosetag=function(node){currentElement=stack.pop()},parser.ontext=function(text){currentElement!==rootElement&¤tElement.children.push(nodes.text(text))},parser.onend=function(){finished||(finished=!0,deferred.resolve(rootElement.children[0]))},parser.onerror=function(error){finished||(finished=!0,deferred.reject(error))},parser.write(xmlString).close(),deferred.promise}function mapObject(input,valueFunc,keyFunc){return _.reduce(input,function(result,value,key){var mappedKey=keyFunc(value,key,input);return result[mappedKey]=valueFunc(value,key,input),result},{})}var promises=require("../promises"),sax=require("sax"),_=require("underscore"),nodes=require("./nodes"),Element=nodes.Element;exports.readString=readString},{"../promises":23,"./nodes":35,sax:155,underscore:156}],37:[function(require,module,exports){function writeString(root,namespaces){function writeNode(builder,node){return nodeWriters[node.type](builder,node)}function writeElement(builder,element){var elementBuilder=builder.element(mapElementName(element.name),element.attributes);element.children.forEach(function(child){writeNode(elementBuilder,child)})}function mapElementName(name){var longFormMatch=/^\{(.*)\}(.*)$/.exec(name);if(longFormMatch){var prefix=uriToPrefix[longFormMatch[1]];return prefix+(""===prefix?"":":")+longFormMatch[2]}return name}function writeDocument(root){var builder=xmlbuilder.create(mapElementName(root.name),{version:"1.0",encoding:"UTF-8",standalone:!0});return _.forEach(namespaces,function(uri,prefix){var key="xmlns"+(""===prefix?"":":"+prefix);builder.attribute(key,uri)}),root.children.forEach(function(child){writeNode(builder,child)}),builder.end()}var uriToPrefix=_.invert(namespaces),nodeWriters={element:writeElement,text:writeTextNode};return writeDocument(root)}function writeTextNode(builder,node){builder.text(node.value)}var _=require("underscore"),xmlbuilder=require("xmlbuilder");exports.writeString=writeString},{underscore:156,xmlbuilder:173}],38:[function(require,module,exports){(function(Buffer){function openArrayBuffer(arrayBuffer){function exists(name){return null!==zipFile.file(name)}function read(name,encoding){var array=zipFile.file(name).asUint8Array(),buffer=new Buffer(array);return encoding?promises.when(buffer.toString(encoding)):promises.when(buffer)}function write(name,contents){zipFile.file(name,contents)}function toBuffer(){return zipFile.generate({type:"nodebuffer"})}var zipFile=new JSZip(arrayBuffer);return{exists:exists,read:read,write:write,toBuffer:toBuffer}}var JSZip=require("jszip"),promises=require("./promises");exports.openArrayBuffer=openArrayBuffer}).call(this,require("buffer").Buffer)},{"./promises":23,buffer:75,jszip:111}],39:[function(require,module,exports){"use strict";module.exports=function(Promise){function any(promises){var ret=new SomePromiseArray(promises),promise=ret.promise();return ret.setHowMany(1),ret.setUnwrap(),ret.init(),promise}var SomePromiseArray=Promise._SomePromiseArray;Promise.any=function(promises){return any(promises)},Promise.prototype.any=function(){return any(this)}}},{}],40:[function(require,module,exports){(function(process){"use strict";function Async(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new Queue(16),this._normalQueue=new Queue(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var self=this;this.drainQueues=function(){self._drainQueues()},this._schedule=schedule}function AsyncInvokeLater(fn,receiver,arg){this._lateQueue.push(fn,receiver,arg),this._queueTick()}function AsyncInvoke(fn,receiver,arg){this._normalQueue.push(fn,receiver,arg),this._queueTick()}function AsyncSettlePromises(promise){this._normalQueue._pushOne(promise),this._queueTick()}var firstLineError;try{throw new Error}catch(e){firstLineError=e}var schedule=require("./schedule"),Queue=require("./queue"),util=require("./util");Async.prototype.setScheduler=function(fn){var prev=this._schedule;return this._schedule=fn,this._customScheduler=!0,prev},Async.prototype.hasCustomScheduler=function(){return this._customScheduler},Async.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},Async.prototype.disableTrampolineIfNecessary=function(){util.hasDevTools&&(this._trampolineEnabled=!1)},Async.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},Async.prototype.fatalError=function(e,isNode){isNode?(process.stderr.write("Fatal "+(e instanceof Error?e.stack:e)+"\n"),process.exit(2)):this.throwLater(e)},Async.prototype.throwLater=function(fn,arg){if(1===arguments.length&&(arg=fn,fn=function(){throw arg}),"undefined"!=typeof setTimeout)setTimeout(function(){fn(arg)},0);else try{this._schedule(function(){fn(arg)})}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},util.hasDevTools?(Async.prototype.invokeLater=function(fn,receiver,arg){this._trampolineEnabled?AsyncInvokeLater.call(this,fn,receiver,arg):this._schedule(function(){setTimeout(function(){fn.call(receiver,arg)},100)})},Async.prototype.invoke=function(fn,receiver,arg){this._trampolineEnabled?AsyncInvoke.call(this,fn,receiver,arg):this._schedule(function(){fn.call(receiver,arg)})},Async.prototype.settlePromises=function(promise){this._trampolineEnabled?AsyncSettlePromises.call(this,promise):this._schedule(function(){promise._settlePromises()})}):(Async.prototype.invokeLater=AsyncInvokeLater,Async.prototype.invoke=AsyncInvoke,Async.prototype.settlePromises=AsyncSettlePromises),Async.prototype._drainQueue=function(queue){for(;queue.length()>0;){var fn=queue.shift();if("function"==typeof fn){var receiver=queue.shift(),arg=queue.shift();fn.call(receiver,arg)}else fn._settlePromises()}},Async.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},Async.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},Async.prototype._reset=function(){this._isTickUsed=!1},module.exports=Async,module.exports.firstLineError=firstLineError}).call(this,require("_process"))},{"./queue":63,"./schedule":66,"./util":73,_process:83}],41:[function(require,module,exports){"use strict";module.exports=function(Promise,INTERNAL,tryConvertToPromise,debug){var calledBind=!1,rejectThis=function(_,e){this._reject(e)},targetRejected=function(e,context){context.promiseRejectionQueued=!0,context.bindingPromise._then(rejectThis,rejectThis,null,this,e)},bindingResolved=function(thisArg,context){0===(50397184&this._bitField)&&this._resolveCallback(context.target)},bindingRejected=function(e,context){context.promiseRejectionQueued||this._reject(e)};Promise.prototype.bind=function(thisArg){calledBind||(calledBind=!0,Promise.prototype._propagateFrom=debug.propagateFromFunction(),Promise.prototype._boundValue=debug.boundValueFunction());var maybePromise=tryConvertToPromise(thisArg),ret=new Promise(INTERNAL);ret._propagateFrom(this,1);var target=this._target();if(ret._setBoundTo(maybePromise),maybePromise instanceof Promise){var context={promiseRejectionQueued:!1,promise:ret,target:target,bindingPromise:maybePromise};target._then(INTERNAL,targetRejected,void 0,ret,context),maybePromise._then(bindingResolved,bindingRejected,void 0,ret,context),ret._setOnCancel(maybePromise)}else ret._resolveCallback(target);return ret},Promise.prototype._setBoundTo=function(obj){void 0!==obj?(this._bitField=2097152|this._bitField,this._boundTo=obj):this._bitField=-2097153&this._bitField},Promise.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},Promise.bind=function(thisArg,value){return Promise.resolve(value).bind(thisArg)}}},{}],42:[function(require,module,exports){"use strict";var cr=Object.create;if(cr){var callerCache=cr(null),getterCache=cr(null);callerCache[" size"]=getterCache[" size"]=0}module.exports=function(Promise){function ensureMethod(obj,methodName){var fn;if(null!=obj&&(fn=obj[methodName]),"function"!=typeof fn){var message="Object "+util.classString(obj)+" has no method '"+util.toString(methodName)+"'";throw new Promise.TypeError(message)}return fn}function caller(obj){var methodName=this.pop(),fn=ensureMethod(obj,methodName);return fn.apply(obj,this)}function namedGetter(obj){return obj[this]}function indexedGetter(obj){var index=+this;return 0>index&&(index=Math.max(0,index+obj.length)),obj[index]}var getMethodCaller,getGetter,util=require("./util"),canEvaluate=util.canEvaluate,isIdentifier=util.isIdentifier,makeMethodCaller=function(methodName){return new Function("ensureMethod"," \n return function(obj) { \n 'use strict' \n var len = this.length; \n ensureMethod(obj, 'methodName'); \n switch(len) { \n case 1: return obj.methodName(this[0]); \n case 2: return obj.methodName(this[0], this[1]); \n case 3: return obj.methodName(this[0], this[1], this[2]); \n case 0: return obj.methodName(); \n default: \n return obj.methodName.apply(obj, this); \n } \n }; \n ".replace(/methodName/g,methodName))(ensureMethod)},makeGetter=function(propertyName){return new Function("obj"," \n 'use strict'; \n return obj.propertyName; \n ".replace("propertyName",propertyName))},getCompiled=function(name,compiler,cache){var ret=cache[name];if("function"!=typeof ret){if(!isIdentifier(name))return null;if(ret=compiler(name),cache[name]=ret,cache[" size"]++,cache[" size"]>512){for(var keys=Object.keys(cache),i=0;256>i;++i)delete cache[keys[i]];cache[" size"]=keys.length-256}}return ret};getMethodCaller=function(name){return getCompiled(name,makeMethodCaller,callerCache)},getGetter=function(name){return getCompiled(name,makeGetter,getterCache)},Promise.prototype.call=function(methodName){for(var $_len=arguments.length,args=new Array(Math.max($_len-1,0)),$_i=1;$_len>$_i;++$_i)args[$_i-1]=arguments[$_i];if(canEvaluate){var maybeCaller=getMethodCaller(methodName);if(null!==maybeCaller)return this._then(maybeCaller,void 0,void 0,args,void 0)}return args.push(methodName),this._then(caller,void 0,void 0,args,void 0)},Promise.prototype.get=function(propertyName){var getter,isIndex="number"==typeof propertyName;if(isIndex)getter=indexedGetter;else if(canEvaluate){var maybeGetter=getGetter(propertyName);getter=null!==maybeGetter?maybeGetter:namedGetter}else getter=namedGetter;return this._then(getter,void 0,void 0,propertyName,void 0)}}},{"./util":73}],43:[function(require,module,exports){"use strict";module.exports=function(Promise,PromiseArray,apiRejection,debug){var util=require("./util"),tryCatch=util.tryCatch,errorObj=util.errorObj,async=Promise._async;Promise.prototype["break"]=Promise.prototype.cancel=function(){if(!debug.cancellation())return this._warn("cancellation is disabled");for(var promise=this,child=promise;promise._isCancellable();){if(!promise._cancelBy(child)){child._isFollowing()?child._followee().cancel():child._cancelBranched();break}var parent=promise._cancellationParent;if(null==parent||!parent._isCancellable()){promise._isFollowing()?promise._followee().cancel():promise._cancelBranched();break}promise._isFollowing()&&promise._followee().cancel(),promise._setWillBeCancelled(),child=promise,promise=parent}},Promise.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},Promise.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},Promise.prototype._cancelBy=function(canceller){return canceller===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},Promise.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},Promise.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),async.invoke(this._cancelPromises,this,void 0))},Promise.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},Promise.prototype._unsetOnCancel=function(){this._onCancelField=void 0},Promise.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},Promise.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},Promise.prototype._doInvokeOnCancel=function(onCancelCallback,internalOnly){if(util.isArray(onCancelCallback))for(var i=0;i=0?contextStack[lastIndex]:void 0}var longStackTraces=!1,contextStack=[];return Promise.prototype._promiseCreated=function(){},Promise.prototype._pushContext=function(){},Promise.prototype._popContext=function(){return null},Promise._peekContext=Promise.prototype._peekContext=function(){},Context.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,contextStack.push(this._trace))},Context.prototype._popContext=function(){if(void 0!==this._trace){var trace=contextStack.pop(),ret=trace._promiseCreated;return trace._promiseCreated=null,ret}return null},Context.CapturedTrace=null,Context.create=createContext,Context.deactivateLongStackTraces=function(){},Context.activateLongStackTraces=function(){var Promise_pushContext=Promise.prototype._pushContext,Promise_popContext=Promise.prototype._popContext,Promise_PeekContext=Promise._peekContext,Promise_peekContext=Promise.prototype._peekContext,Promise_promiseCreated=Promise.prototype._promiseCreated;Context.deactivateLongStackTraces=function(){Promise.prototype._pushContext=Promise_pushContext,Promise.prototype._popContext=Promise_popContext,Promise._peekContext=Promise_PeekContext,Promise.prototype._peekContext=Promise_peekContext,Promise.prototype._promiseCreated=Promise_promiseCreated,longStackTraces=!1},longStackTraces=!0,Promise.prototype._pushContext=Context.prototype._pushContext,Promise.prototype._popContext=Context.prototype._popContext,Promise._peekContext=Promise.prototype._peekContext=peekContext,Promise.prototype._promiseCreated=function(){var ctx=this._peekContext();ctx&&null==ctx._promiseCreated&&(ctx._promiseCreated=this)}},Context}},{}],46:[function(require,module,exports){(function(process){"use strict";module.exports=function(Promise,Context){function generatePromiseLifecycleEventObject(name,promise){return{promise:promise}}function defaultFireEvent(){return!1}function cancellationExecute(executor,resolve,reject){var promise=this;try{executor(resolve,reject,function(onCancel){if("function"!=typeof onCancel)throw new TypeError("onCancel must be a function, got: "+util.toString(onCancel));promise._attachCancellationCallback(onCancel)})}catch(e){return e}}function cancellationAttachCancellationCallback(onCancel){if(!this._isCancellable())return this;var previousOnCancel=this._onCancel();void 0!==previousOnCancel?util.isArray(previousOnCancel)?previousOnCancel.push(onCancel):this._setOnCancel([previousOnCancel,onCancel]):this._setOnCancel(onCancel)}function cancellationOnCancel(){return this._onCancelField}function cancellationSetOnCancel(onCancel){this._onCancelField=onCancel}function cancellationClearCancellationData(){this._cancellationParent=void 0,this._onCancelField=void 0}function cancellationPropagateFrom(parent,flags){if(0!==(1&flags)){this._cancellationParent=parent;var branchesRemainingToCancel=parent._branchesRemainingToCancel;void 0===branchesRemainingToCancel&&(branchesRemainingToCancel=0),parent._branchesRemainingToCancel=branchesRemainingToCancel+1}0!==(2&flags)&&parent._isBound()&&this._setBoundTo(parent._boundTo)}function bindingPropagateFrom(parent,flags){0!==(2&flags)&&parent._isBound()&&this._setBoundTo(parent._boundTo)}function boundValueFunction(){var ret=this._boundTo;return void 0!==ret&&ret instanceof Promise?ret.isFulfilled()?ret.value():void 0:ret}function longStackTracesCaptureStackTrace(){this._trace=new CapturedTrace(this._peekContext())}function longStackTracesAttachExtraTrace(error,ignoreSelf){if(canAttachTrace(error)){var trace=this._trace;if(void 0!==trace&&ignoreSelf&&(trace=trace._parent),void 0!==trace)trace.attachExtraTrace(error);else if(!error.__stackCleaned__){var parsed=parseStackAndMessage(error);util.notEnumerableProp(error,"stack",parsed.message+"\n"+parsed.stack.join("\n")),util.notEnumerableProp(error,"__stackCleaned__",!0)}}}function checkForgottenReturns(returnValue,promiseCreated,name,promise,parent){if(void 0===returnValue&&null!==promiseCreated&&wForgottenReturn){if(void 0!==parent&&parent._returnedNonUndefined())return;if(0===(65535&promise._bitField))return;name&&(name+=" ");var handlerLine="",creatorLine="";if(promiseCreated._trace){for(var traceLines=promiseCreated._trace.stack.split("\n"),stack=cleanStack(traceLines),i=stack.length-1;i>=0;--i){var line=stack[i];if(!nodeFramePattern.test(line)){var lineMatches=line.match(parseLinePattern);lineMatches&&(handlerLine="at "+lineMatches[1]+":"+lineMatches[2]+":"+lineMatches[3]+" ");break}}if(stack.length>0)for(var firstUserLine=stack[0],i=0;i0&&(creatorLine="\n"+traceLines[i-1]);break}}var msg="a promise was created in a "+name+"handler "+handlerLine+"but was not returned from it, see http://goo.gl/rRqMUw"+creatorLine;promise._warn(msg,!0,promiseCreated)}}function deprecated(name,replacement){var message=name+" is deprecated and will be removed in a future version.";return replacement&&(message+=" Use "+replacement+" instead."),warn(message)}function warn(message,shouldUseOwnTrace,promise){if(config.warnings){var ctx,warning=new Warning(message);if(shouldUseOwnTrace)promise._attachExtraTrace(warning);else if(config.longStackTraces&&(ctx=Promise._peekContext()))ctx.attachExtraTrace(warning);else{var parsed=parseStackAndMessage(warning);warning.stack=parsed.message+"\n"+parsed.stack.join("\n")}activeFireEvent("warning",warning)||formatAndLogError(warning,"",!0)}}function reconstructStack(message,stacks){for(var i=0;i=0;--j)if(prev[j]===currentLastLine){commonRootMeetPoint=j;break}for(var j=commonRootMeetPoint;j>=0;--j){var line=prev[j];if(current[currentLastIndex]!==line)break;current.pop(),currentLastIndex--}current=prev}}function cleanStack(stack){for(var ret=[],i=0;i0&&"SyntaxError"!=error.name&&(stack=stack.slice(i)),stack}function parseStackAndMessage(error){var stack=error.stack,message=error.toString();return stack="string"==typeof stack&&stack.length>0?stackFramesAsArray(error):[" (No stack trace)"],{message:message,stack:"SyntaxError"==error.name?stack:cleanStack(stack)}}function formatAndLogError(error,title,isSoft){if("undefined"!=typeof console){var message;if(util.isObject(error)){ +var stack=error.stack;message=title+formatStack(stack,error)}else message=title+String(error);"function"==typeof printWarning?printWarning(message,isSoft):("function"==typeof console.log||"object"==typeof console.log)&&console.log(message)}}function fireRejectionEvent(name,localHandler,reason,promise){var localEventFired=!1;try{"function"==typeof localHandler&&(localEventFired=!0,"rejectionHandled"===name?localHandler(promise):localHandler(reason,promise))}catch(e){async.throwLater(e)}"unhandledRejection"===name?activeFireEvent(name,reason,promise)||localEventFired||formatAndLogError(reason,"Unhandled rejection "):activeFireEvent(name,promise)}function formatNonError(obj){var str;if("function"==typeof obj)str="[function "+(obj.name||"anonymous")+"]";else{str=obj&&"function"==typeof obj.toString?obj.toString():util.toString(obj);var ruselessToString=/\[object [a-zA-Z0-9$_]+\]/;if(ruselessToString.test(str))try{var newStr=JSON.stringify(obj);str=newStr}catch(e){}0===str.length&&(str="(empty array)")}return"(<"+snip(str)+">, no stack trace)"}function snip(str){var maxChars=41;return str.lengthfirstIndex||0>lastIndex||!firstFileName||!lastFileName||firstFileName!==lastFileName||firstIndex>=lastIndex||(shouldIgnore=function(line){if(bluebirdFramePattern.test(line))return!0;var info=parseLineInfo(line);return info&&info.fileName===firstFileName&&firstIndex<=info.line&&info.line<=lastIndex?!0:!1})}}function CapturedTrace(parent){this._parent=parent,this._promisesCreated=0;var length=this._length=1+(void 0===parent?0:parent._length);captureStackTrace(this,CapturedTrace),length>32&&this.uncycle()}var unhandledRejectionHandled,possiblyUnhandledRejection,printWarning,getDomain=Promise._getDomain,async=Promise._async,Warning=require("./errors").Warning,util=require("./util"),canAttachTrace=util.canAttachTrace,bluebirdFramePattern=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,nodeFramePattern=/\((?:timers\.js):\d+:\d+\)/,parseLinePattern=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,stackFramePattern=null,formatStack=null,indentStackFrames=!1,debugging=!(0==util.env("BLUEBIRD_DEBUG")||!util.env("BLUEBIRD_DEBUG")&&"development"!==util.env("NODE_ENV")),warnings=!(0==util.env("BLUEBIRD_WARNINGS")||!debugging&&!util.env("BLUEBIRD_WARNINGS")),longStackTraces=!(0==util.env("BLUEBIRD_LONG_STACK_TRACES")||!debugging&&!util.env("BLUEBIRD_LONG_STACK_TRACES")),wForgottenReturn=0!=util.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(warnings||!!util.env("BLUEBIRD_W_FORGOTTEN_RETURN"));Promise.prototype.suppressUnhandledRejections=function(){var target=this._target();target._bitField=-1048577&target._bitField|524288},Promise.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),async.invokeLater(this._notifyUnhandledRejection,this,void 0))},Promise.prototype._notifyUnhandledRejectionIsHandled=function(){fireRejectionEvent("rejectionHandled",unhandledRejectionHandled,void 0,this)},Promise.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},Promise.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},Promise.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var reason=this._settledValue();this._setUnhandledRejectionIsNotified(),fireRejectionEvent("unhandledRejection",possiblyUnhandledRejection,reason,this)}},Promise.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},Promise.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},Promise.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},Promise.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},Promise.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},Promise.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},Promise.prototype._warn=function(message,shouldUseOwnTrace,promise){return warn(message,shouldUseOwnTrace,promise||this)},Promise.onPossiblyUnhandledRejection=function(fn){var domain=getDomain();possiblyUnhandledRejection="function"==typeof fn?null===domain?fn:util.domainBind(domain,fn):void 0},Promise.onUnhandledRejectionHandled=function(fn){var domain=getDomain();unhandledRejectionHandled="function"==typeof fn?null===domain?fn:util.domainBind(domain,fn):void 0};var disableLongStackTraces=function(){};Promise.longStackTraces=function(){if(async.haveItemsQueued()&&!config.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!config.longStackTraces&&longStackTracesIsSupported()){var Promise_captureStackTrace=Promise.prototype._captureStackTrace,Promise_attachExtraTrace=Promise.prototype._attachExtraTrace;config.longStackTraces=!0,disableLongStackTraces=function(){if(async.haveItemsQueued()&&!config.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");Promise.prototype._captureStackTrace=Promise_captureStackTrace,Promise.prototype._attachExtraTrace=Promise_attachExtraTrace,Context.deactivateLongStackTraces(),async.enableTrampoline(),config.longStackTraces=!1},Promise.prototype._captureStackTrace=longStackTracesCaptureStackTrace,Promise.prototype._attachExtraTrace=longStackTracesAttachExtraTrace,Context.activateLongStackTraces(),async.disableTrampolineIfNecessary()}},Promise.hasLongStackTraces=function(){return config.longStackTraces&&longStackTracesIsSupported()};var fireDomEvent=function(){try{if("function"==typeof CustomEvent){var event=new CustomEvent("CustomEvent");return util.global.dispatchEvent(event),function(name,event){var domEvent=new CustomEvent(name.toLowerCase(),{detail:event,cancelable:!0});return!util.global.dispatchEvent(domEvent)}}if("function"==typeof Event){var event=new Event("CustomEvent");return util.global.dispatchEvent(event),function(name,event){var domEvent=new Event(name.toLowerCase(),{cancelable:!0});return domEvent.detail=event,!util.global.dispatchEvent(domEvent)}}var event=document.createEvent("CustomEvent");return event.initCustomEvent("testingtheevent",!1,!0,{}),util.global.dispatchEvent(event),function(name,event){var domEvent=document.createEvent("CustomEvent");return domEvent.initCustomEvent(name.toLowerCase(),!1,!0,event),!util.global.dispatchEvent(domEvent)}}catch(e){}return function(){return!1}}(),fireGlobalEvent=function(){return util.isNode?function(){return process.emit.apply(process,arguments)}:util.global?function(name){var methodName="on"+name.toLowerCase(),method=util.global[methodName];return method?(method.apply(util.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),eventToObjectGenerator={promiseCreated:generatePromiseLifecycleEventObject,promiseFulfilled:generatePromiseLifecycleEventObject,promiseRejected:generatePromiseLifecycleEventObject,promiseResolved:generatePromiseLifecycleEventObject,promiseCancelled:generatePromiseLifecycleEventObject,promiseChained:function(name,promise,child){return{promise:promise,child:child}},warning:function(name,warning){return{warning:warning}},unhandledRejection:function(name,reason,promise){return{reason:reason,promise:promise}},rejectionHandled:generatePromiseLifecycleEventObject},activeFireEvent=function(name){var globalEventFired=!1;try{globalEventFired=fireGlobalEvent.apply(null,arguments)}catch(e){async.throwLater(e),globalEventFired=!0}var domEventFired=!1;try{domEventFired=fireDomEvent(name,eventToObjectGenerator[name].apply(null,arguments))}catch(e){async.throwLater(e),domEventFired=!0}return domEventFired||globalEventFired};Promise.config=function(opts){if(opts=Object(opts),"longStackTraces"in opts&&(opts.longStackTraces?Promise.longStackTraces():!opts.longStackTraces&&Promise.hasLongStackTraces()&&disableLongStackTraces()),"warnings"in opts){var warningsOption=opts.warnings;config.warnings=!!warningsOption,wForgottenReturn=config.warnings,util.isObject(warningsOption)&&"wForgottenReturn"in warningsOption&&(wForgottenReturn=!!warningsOption.wForgottenReturn)}if("cancellation"in opts&&opts.cancellation&&!config.cancellation){if(async.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");Promise.prototype._clearCancellationData=cancellationClearCancellationData,Promise.prototype._propagateFrom=cancellationPropagateFrom,Promise.prototype._onCancel=cancellationOnCancel,Promise.prototype._setOnCancel=cancellationSetOnCancel,Promise.prototype._attachCancellationCallback=cancellationAttachCancellationCallback,Promise.prototype._execute=cancellationExecute,propagateFromFunction=cancellationPropagateFrom,config.cancellation=!0}return"monitoring"in opts&&(opts.monitoring&&!config.monitoring?(config.monitoring=!0,Promise.prototype._fireEvent=activeFireEvent):!opts.monitoring&&config.monitoring&&(config.monitoring=!1,Promise.prototype._fireEvent=defaultFireEvent)),Promise},Promise.prototype._fireEvent=defaultFireEvent,Promise.prototype._execute=function(executor,resolve,reject){try{executor(resolve,reject)}catch(e){return e}},Promise.prototype._onCancel=function(){},Promise.prototype._setOnCancel=function(handler){},Promise.prototype._attachCancellationCallback=function(onCancel){},Promise.prototype._captureStackTrace=function(){},Promise.prototype._attachExtraTrace=function(){},Promise.prototype._clearCancellationData=function(){},Promise.prototype._propagateFrom=function(parent,flags){};var propagateFromFunction=bindingPropagateFrom,shouldIgnore=function(){return!1},parseLineInfoRegex=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;util.inherits(CapturedTrace,Error),Context.CapturedTrace=CapturedTrace,CapturedTrace.prototype.uncycle=function(){var length=this._length;if(!(2>length)){for(var nodes=[],stackToIndex={},i=0,node=this;void 0!==node;++i)nodes.push(node),node=node._parent;length=this._length=i;for(var i=length-1;i>=0;--i){var stack=nodes[i].stack;void 0===stackToIndex[stack]&&(stackToIndex[stack]=i)}for(var i=0;length>i;++i){var currentStack=nodes[i].stack,index=stackToIndex[currentStack];if(void 0!==index&&index!==i){index>0&&(nodes[index-1]._parent=void 0,nodes[index-1]._length=1),nodes[i]._parent=void 0,nodes[i]._length=1;var cycleEdgeNode=i>0?nodes[i-1]:this;length-1>index?(cycleEdgeNode._parent=nodes[index+1],cycleEdgeNode._parent.uncycle(),cycleEdgeNode._length=cycleEdgeNode._parent._length+1):(cycleEdgeNode._parent=void 0,cycleEdgeNode._length=1);for(var currentChildLength=cycleEdgeNode._length+1,j=i-2;j>=0;--j)nodes[j]._length=currentChildLength,currentChildLength++;return}}}},CapturedTrace.prototype.attachExtraTrace=function(error){if(!error.__stackCleaned__){this.uncycle();for(var parsed=parseStackAndMessage(error),message=parsed.message,stacks=[parsed.stack],trace=this;void 0!==trace;)stacks.push(cleanStack(trace.stack.split("\n"))),trace=trace._parent;removeCommonRoots(stacks),removeDuplicateOrEmptyJumps(stacks),util.notEnumerableProp(error,"stack",reconstructStack(message,stacks)),util.notEnumerableProp(error,"__stackCleaned__",!0)}};var captureStackTrace=function(){var v8stackFramePattern=/^\s*at\s*/,v8stackFormatter=function(stack,error){return"string"==typeof stack?stack:void 0!==error.name&&void 0!==error.message?error.toString():formatNonError(error)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,stackFramePattern=v8stackFramePattern,formatStack=v8stackFormatter;var captureStackTrace=Error.captureStackTrace;return shouldIgnore=function(line){return bluebirdFramePattern.test(line)},function(receiver,ignoreUntil){Error.stackTraceLimit+=6,captureStackTrace(receiver,ignoreUntil),Error.stackTraceLimit-=6}}var err=new Error;if("string"==typeof err.stack&&err.stack.split("\n")[0].indexOf("stackDetection@")>=0)return stackFramePattern=/@/,formatStack=v8stackFormatter,indentStackFrames=!0,function(o){o.stack=(new Error).stack};var hasStackAfterThrow;try{throw new Error}catch(e){hasStackAfterThrow="stack"in e}return"stack"in err||!hasStackAfterThrow||"number"!=typeof Error.stackTraceLimit?(formatStack=function(stack,error){return"string"==typeof stack?stack:"object"!=typeof error&&"function"!=typeof error||void 0===error.name||void 0===error.message?formatNonError(error):error.toString()},null):(stackFramePattern=v8stackFramePattern,formatStack=v8stackFormatter,function(o){Error.stackTraceLimit+=6;try{throw new Error}catch(e){o.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(printWarning=function(message){console.warn(message)},util.isNode&&process.stderr.isTTY?printWarning=function(message,isSoft){var color=isSoft?"":"";console.warn(color+message+"\n")}:util.isNode||"string"!=typeof(new Error).stack||(printWarning=function(message,isSoft){console.warn("%c"+message,isSoft?"color: darkorange":"color: red")}));var config={warnings:warnings,longStackTraces:!1,cancellation:!1,monitoring:!1};return longStackTraces&&Promise.longStackTraces(),{longStackTraces:function(){return config.longStackTraces},warnings:function(){return config.warnings},cancellation:function(){return config.cancellation},monitoring:function(){return config.monitoring},propagateFromFunction:function(){return propagateFromFunction},boundValueFunction:function(){return boundValueFunction},checkForgottenReturns:checkForgottenReturns,setBounds:setBounds,warn:warn,deprecated:deprecated,CapturedTrace:CapturedTrace,fireDomEvent:fireDomEvent,fireGlobalEvent:fireGlobalEvent}}}).call(this,require("_process"))},{"./errors":49,"./util":73,_process:83}],47:[function(require,module,exports){"use strict";module.exports=function(Promise){function returner(){return this.value}function thrower(){throw this.reason}Promise.prototype["return"]=Promise.prototype.thenReturn=function(value){return value instanceof Promise&&value.suppressUnhandledRejections(),this._then(returner,void 0,void 0,{value:value},void 0)},Promise.prototype["throw"]=Promise.prototype.thenThrow=function(reason){return this._then(thrower,void 0,void 0,{reason:reason},void 0)},Promise.prototype.catchThrow=function(reason){if(arguments.length<=1)return this._then(void 0,thrower,void 0,{reason:reason},void 0);var _reason=arguments[1],handler=function(){throw _reason};return this.caught(reason,handler)},Promise.prototype.catchReturn=function(value){if(arguments.length<=1)return value instanceof Promise&&value.suppressUnhandledRejections(),this._then(void 0,returner,void 0,{value:value},void 0);var _value=arguments[1];_value instanceof Promise&&_value.suppressUnhandledRejections();var handler=function(){return _value};return this.caught(value,handler)}}},{}],48:[function(require,module,exports){"use strict";module.exports=function(Promise,INTERNAL){function promiseAllThis(){return PromiseAll(this)}function PromiseMapSeries(promises,fn){return PromiseReduce(promises,fn,INTERNAL,INTERNAL)}var PromiseReduce=Promise.reduce,PromiseAll=Promise.all;Promise.prototype.each=function(fn){return PromiseReduce(this,fn,INTERNAL,0)._then(promiseAllThis,void 0,void 0,this,void 0)},Promise.prototype.mapSeries=function(fn){return PromiseReduce(this,fn,INTERNAL,INTERNAL)},Promise.each=function(promises,fn){return PromiseReduce(promises,fn,INTERNAL,0)._then(promiseAllThis,void 0,void 0,promises,void 0)},Promise.mapSeries=PromiseMapSeries}},{}],49:[function(require,module,exports){"use strict";function subError(nameProperty,defaultMessage){function SubError(message){return this instanceof SubError?(notEnumerableProp(this,"message","string"==typeof message?message:defaultMessage),notEnumerableProp(this,"name",nameProperty),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new SubError(message)}return inherits(SubError,Error),SubError}function OperationalError(message){return this instanceof OperationalError?(notEnumerableProp(this,"name","OperationalError"),notEnumerableProp(this,"message",message),this.cause=message,this.isOperational=!0,void(message instanceof Error?(notEnumerableProp(this,"message",message.message),notEnumerableProp(this,"stack",message.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new OperationalError(message)}var _TypeError,_RangeError,es5=require("./es5"),Objectfreeze=es5.freeze,util=require("./util"),inherits=util.inherits,notEnumerableProp=util.notEnumerableProp,Warning=subError("Warning","warning"),CancellationError=subError("CancellationError","cancellation error"),TimeoutError=subError("TimeoutError","timeout error"),AggregateError=subError("AggregateError","aggregate error");try{_TypeError=TypeError,_RangeError=RangeError}catch(e){_TypeError=subError("TypeError","type error"),_RangeError=subError("RangeError","range error")}for(var methods="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),i=0;i1?ctx.cancelPromise._reject(reason):ctx.cancelPromise._cancel(),ctx.cancelPromise=null,!0):!1}function succeed(){return finallyHandler.call(this,this.promise._target()._settledValue())}function fail(reason){return checkCancel(this,reason)?void 0:(errorObj.e=reason,errorObj)}function finallyHandler(reasonOrValue){var promise=this.promise,handler=this.handler;if(!this.called){this.called=!0;var ret=this.isFinallyHandler()?handler.call(promise._boundValue()):handler.call(promise._boundValue(),reasonOrValue);if(void 0!==ret){promise._setReturnedNonUndefined();var maybePromise=tryConvertToPromise(ret,promise);if(maybePromise instanceof Promise){if(null!=this.cancelPromise){if(maybePromise._isCancelled()){var reason=new CancellationError("late cancellation observer");return promise._attachExtraTrace(reason),errorObj.e=reason,errorObj}maybePromise.isPending()&&maybePromise._attachCancellationCallback(new FinallyHandlerCancelReaction(this))}return maybePromise._then(succeed,fail,void 0,this,void 0)}}}return promise.isRejected()?(checkCancel(this),errorObj.e=reasonOrValue,errorObj):(checkCancel(this),reasonOrValue)}var util=require("./util"),CancellationError=Promise.CancellationError,errorObj=util.errorObj;return PassThroughHandlerContext.prototype.isFinallyHandler=function(){return 0===this.type},FinallyHandlerCancelReaction.prototype._resultCancelled=function(){checkCancel(this.finallyHandler)},Promise.prototype._passThrough=function(handler,type,success,fail){return"function"!=typeof handler?this.then():this._then(success,fail,void 0,new PassThroughHandlerContext(this,type,handler),void 0)},Promise.prototype.lastly=Promise.prototype["finally"]=function(handler){return this._passThrough(handler,0,finallyHandler,finallyHandler)},Promise.prototype.tap=function(handler){return this._passThrough(handler,1,finallyHandler)},PassThroughHandlerContext}},{"./util":73}],53:[function(require,module,exports){"use strict";module.exports=function(Promise,apiRejection,INTERNAL,tryConvertToPromise,Proxyable,debug){function promiseFromYieldHandler(value,yieldHandlers,traceParent){for(var i=0;ii;++i)holderClasses.push(generateHolderClass(i+1)),thenCallbacks.push(thenCallback(i+1)),promiseSetters.push(promiseSetter(i+1));reject=function(reason){this._reject(reason)}}Promise.join=function(){var fn,last=arguments.length-1;if(last>0&&"function"==typeof arguments[last]&&(fn=arguments[last],8>=last&&canEvaluate)){var ret=new Promise(INTERNAL);ret._captureStackTrace();for(var HolderClass=holderClasses[last-1],holder=new HolderClass(fn),callbacks=thenCallbacks,i=0;last>i;++i){var maybePromise=tryConvertToPromise(arguments[i],ret);if(maybePromise instanceof Promise){maybePromise=maybePromise._target();var bitField=maybePromise._bitField;0===(50397184&bitField)?(maybePromise._then(callbacks[i],reject,void 0,ret,holder),promiseSetters[i](maybePromise,holder),holder.asyncNeeded=!1):0!==(33554432&bitField)?callbacks[i].call(ret,maybePromise._value(),holder):0!==(16777216&bitField)?ret._reject(maybePromise._reason()):ret._cancel()}else callbacks[i].call(ret,maybePromise,holder)}if(!ret._isFateSealed()){if(holder.asyncNeeded){var domain=getDomain();null!==domain&&(holder.fn=util.domainBind(domain,holder.fn))}ret._setAsyncGuaranteed(),ret._setOnCancel(holder)}return ret}for(var $_len=arguments.length,args=new Array($_len),$_i=0;$_len>$_i;++$_i)args[$_i]=arguments[$_i];fn&&args.pop();var ret=new PromiseArray(args).promise();return void 0!==fn?ret.spread(fn):ret}}},{"./util":73}],55:[function(require,module,exports){"use strict";module.exports=function(Promise,PromiseArray,apiRejection,tryConvertToPromise,INTERNAL,debug){function MappingPromiseArray(promises,fn,limit,_filter){this.constructor$(promises),this._promise._captureStackTrace();var domain=getDomain();this._callback=null===domain?fn:util.domainBind(domain,fn),this._preservedValues=_filter===INTERNAL?new Array(this.length()):null,this._limit=limit,this._inFlight=0,this._queue=[],async.invoke(this._asyncInit,this,void 0)}function map(promises,fn,options,_filter){if("function"!=typeof fn)return apiRejection("expecting a function but got "+util.classString(fn));var limit=0;if(void 0!==options){if("object"!=typeof options||null===options)return Promise.reject(new TypeError("options argument must be an object but it is "+util.classString(options)));if("number"!=typeof options.concurrency)return Promise.reject(new TypeError("'concurrency' must be a number but it is "+util.classString(options.concurrency)));limit=options.concurrency}return limit="number"==typeof limit&&isFinite(limit)&&limit>=1?limit:0,new MappingPromiseArray(promises,fn,limit,_filter).promise()}var getDomain=Promise._getDomain,util=require("./util"),tryCatch=util.tryCatch,errorObj=util.errorObj,async=Promise._async;util.inherits(MappingPromiseArray,PromiseArray),MappingPromiseArray.prototype._asyncInit=function(){this._init$(void 0,-2)},MappingPromiseArray.prototype._init=function(){},MappingPromiseArray.prototype._promiseFulfilled=function(value,index){var values=this._values,length=this.length(),preservedValues=this._preservedValues,limit=this._limit;if(0>index){if(index=-1*index-1,values[index]=value,limit>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(limit>=1&&this._inFlight>=limit)return values[index]=value,this._queue.push(index),!1;null!==preservedValues&&(preservedValues[index]=value);var promise=this._promise,callback=this._callback,receiver=promise._boundValue();promise._pushContext();var ret=tryCatch(callback).call(receiver,value,index,length),promiseCreated=promise._popContext();if(debug.checkForgottenReturns(ret,promiseCreated,null!==preservedValues?"Promise.filter":"Promise.map",promise),ret===errorObj)return this._reject(ret.e),!0;var maybePromise=tryConvertToPromise(ret,this._promise);if(maybePromise instanceof Promise){maybePromise=maybePromise._target();var bitField=maybePromise._bitField;if(0===(50397184&bitField))return limit>=1&&this._inFlight++,values[index]=maybePromise,maybePromise._proxy(this,-1*(index+1)),!1;if(0===(33554432&bitField))return 0!==(16777216&bitField)?(this._reject(maybePromise._reason()),!0):(this._cancel(),!0);ret=maybePromise._value()}values[index]=ret}var totalResolved=++this._totalResolved;return totalResolved>=length?(null!==preservedValues?this._filter(values,preservedValues):this._resolve(values),!0):!1},MappingPromiseArray.prototype._drainQueue=function(){for(var queue=this._queue,limit=this._limit,values=this._values;queue.length>0&&this._inFlighti;++i)booleans[i]&&(ret[j++]=values[i]);ret.length=j,this._resolve(ret)},MappingPromiseArray.prototype.preservedValues=function(){return this._preservedValues},Promise.prototype.map=function(fn,options){return map(this,fn,options,null)},Promise.map=function(promises,fn,options,_filter){return map(promises,fn,options,_filter)}}},{"./util":73}],56:[function(require,module,exports){"use strict";module.exports=function(Promise,INTERNAL,tryConvertToPromise,apiRejection,debug){var util=require("./util"),tryCatch=util.tryCatch;Promise.method=function(fn){if("function"!=typeof fn)throw new Promise.TypeError("expecting a function but got "+util.classString(fn));return function(){var ret=new Promise(INTERNAL);ret._captureStackTrace(),ret._pushContext();var value=tryCatch(fn).apply(this,arguments),promiseCreated=ret._popContext();return debug.checkForgottenReturns(value,promiseCreated,"Promise.method",ret),ret._resolveFromSyncValue(value),ret}},Promise.attempt=Promise["try"]=function(fn){if("function"!=typeof fn)return apiRejection("expecting a function but got "+util.classString(fn));var ret=new Promise(INTERNAL);ret._captureStackTrace(),ret._pushContext();var value;if(arguments.length>1){debug.deprecated("calling Promise.try with more than 1 argument");var arg=arguments[1],ctx=arguments[2];value=util.isArray(arg)?tryCatch(fn).apply(ctx,arg):tryCatch(fn).call(ctx,arg)}else value=tryCatch(fn)();var promiseCreated=ret._popContext();return debug.checkForgottenReturns(value,promiseCreated,"Promise.try",ret),ret._resolveFromSyncValue(value),ret},Promise.prototype._resolveFromSyncValue=function(value){value===util.errorObj?this._rejectCallback(value.e,!1):this._resolveCallback(value,!0)}}},{"./util":73}],57:[function(require,module,exports){"use strict";function isUntypedError(obj){return obj instanceof Error&&es5.getPrototypeOf(obj)===Error.prototype}function wrapAsOperationalError(obj){var ret;if(isUntypedError(obj)){ret=new OperationalError(obj),ret.name=obj.name,ret.message=obj.message,ret.stack=obj.stack;for(var keys=es5.keys(obj),i=0;i$_i;++$_i)args[$_i-1]=arguments[$_i];promise._fulfill(args)}else promise._fulfill(value);promise=null}}}var util=require("./util"),maybeWrapAsError=util.maybeWrapAsError,errors=require("./errors"),OperationalError=errors.OperationalError,es5=require("./es5"),rErrorKey=/^(?:name|message|stack|cause)$/;module.exports=nodebackForPromise},{"./errors":49,"./es5":50,"./util":73}],58:[function(require,module,exports){"use strict";module.exports=function(Promise){function spreadAdapter(val,nodeback){var promise=this;if(!util.isArray(val))return successAdapter.call(promise,val,nodeback);var ret=tryCatch(nodeback).apply(promise._boundValue(),[null].concat(val));ret===errorObj&&async.throwLater(ret.e)}function successAdapter(val,nodeback){var promise=this,receiver=promise._boundValue(),ret=void 0===val?tryCatch(nodeback).call(receiver,null):tryCatch(nodeback).call(receiver,null,val);ret===errorObj&&async.throwLater(ret.e)}function errorAdapter(reason,nodeback){var promise=this;if(!reason){var newReason=new Error(reason+"");newReason.cause=reason,reason=newReason}var ret=tryCatch(nodeback).call(promise._boundValue(),reason);ret===errorObj&&async.throwLater(ret.e)}var util=require("./util"),async=Promise._async,tryCatch=util.tryCatch,errorObj=util.errorObj;Promise.prototype.asCallback=Promise.prototype.nodeify=function(nodeback,options){if("function"==typeof nodeback){var adapter=successAdapter;void 0!==options&&Object(options).spread&&(adapter=spreadAdapter),this._then(adapter,errorAdapter,void 0,this,nodeback)}return this}}},{"./util":73}],59:[function(require,module,exports){(function(process){"use strict";module.exports=function(){function Proxyable(){}function check(self,executor){if("function"!=typeof executor)throw new TypeError("expecting a function but got "+util.classString(executor));if(self.constructor!==Promise)throw new TypeError("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n")}function Promise(executor){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,executor!==INTERNAL&&(check(this,executor),this._resolveFromExecutor(executor)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function deferResolve(v){this.promise._resolveCallback(v)}function deferReject(v){this.promise._rejectCallback(v,!1)}function fillTypes(value){var p=new Promise(INTERNAL);p._fulfillmentHandler0=value,p._rejectionHandler0=value,p._promise0=value,p._receiver0=value}var getDomain,makeSelfResolutionError=function(){return new TypeError("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},reflectHandler=function(){return new Promise.PromiseInspection(this._target())},apiRejection=function(msg){return Promise.reject(new TypeError(msg))},UNDEFINED_BINDING={},util=require("./util");getDomain=util.isNode?function(){var ret=process.domain;return void 0===ret&&(ret=null),ret}:function(){return null},util.notEnumerableProp(Promise,"_getDomain",getDomain);var es5=require("./es5"),Async=require("./async"),async=new Async;es5.defineProperty(Promise,"_async",{value:async});var errors=require("./errors"),TypeError=Promise.TypeError=errors.TypeError;Promise.RangeError=errors.RangeError;var CancellationError=Promise.CancellationError=errors.CancellationError;Promise.TimeoutError=errors.TimeoutError,Promise.OperationalError=errors.OperationalError,Promise.RejectionError=errors.OperationalError,Promise.AggregateError=errors.AggregateError;var INTERNAL=function(){},APPLY={},NEXT_FILTER={},tryConvertToPromise=require("./thenables")(Promise,INTERNAL),PromiseArray=require("./promise_array")(Promise,INTERNAL,tryConvertToPromise,apiRejection,Proxyable),Context=require("./context")(Promise),createContext=Context.create,debug=require("./debuggability")(Promise,Context),PassThroughHandlerContext=(debug.CapturedTrace,require("./finally")(Promise,tryConvertToPromise)),catchFilter=require("./catch_filter")(NEXT_FILTER),nodebackForPromise=require("./nodeback"),errorObj=util.errorObj,tryCatch=util.tryCatch;return Promise.prototype.toString=function(){return"[object Promise]"},Promise.prototype.caught=Promise.prototype["catch"]=function(fn){var len=arguments.length;if(len>1){var i,catchInstances=new Array(len-1),j=0;for(i=0;len-1>i;++i){var item=arguments[i];if(!util.isObject(item))return apiRejection("expecting an object but got A catch statement predicate "+util.classString(item));catchInstances[j++]=item}return catchInstances.length=j,fn=arguments[i],this.then(void 0,catchFilter(catchInstances,fn,this))}return this.then(void 0,fn)},Promise.prototype.reflect=function(){return this._then(reflectHandler,reflectHandler,void 0,this,void 0)},Promise.prototype.then=function(didFulfill,didReject){if(debug.warnings()&&arguments.length>0&&"function"!=typeof didFulfill&&"function"!=typeof didReject){var msg=".then() only accepts functions but was passed: "+util.classString(didFulfill);arguments.length>1&&(msg+=", "+util.classString(didReject)),this._warn(msg)}return this._then(didFulfill,didReject,void 0,void 0,void 0)},Promise.prototype.done=function(didFulfill,didReject){var promise=this._then(didFulfill,didReject,void 0,void 0,void 0);promise._setIsFinal()},Promise.prototype.spread=function(fn){return"function"!=typeof fn?apiRejection("expecting a function but got "+util.classString(fn)):this.all()._then(fn,void 0,void 0,APPLY,void 0)},Promise.prototype.toJSON=function(){var ret={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(ret.fulfillmentValue=this.value(),ret.isFulfilled=!0):this.isRejected()&&(ret.rejectionReason=this.reason(),ret.isRejected=!0),ret},Promise.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new PromiseArray(this).promise()},Promise.prototype.error=function(fn){return this.caught(util.originatesFromRejection,fn)},Promise.getNewLibraryCopy=module.exports,Promise.is=function(val){return val instanceof Promise},Promise.fromNode=Promise.fromCallback=function(fn){var ret=new Promise(INTERNAL);ret._captureStackTrace();var multiArgs=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,result=tryCatch(fn)(nodebackForPromise(ret,multiArgs));return result===errorObj&&ret._rejectCallback(result.e,!0),ret._isFateSealed()||ret._setAsyncGuaranteed(),ret},Promise.all=function(promises){return new PromiseArray(promises).promise()},Promise.cast=function(obj){var ret=tryConvertToPromise(obj);return ret instanceof Promise||(ret=new Promise(INTERNAL),ret._captureStackTrace(),ret._setFulfilled(),ret._rejectionHandler0=obj),ret},Promise.resolve=Promise.fulfilled=Promise.cast,Promise.reject=Promise.rejected=function(reason){var ret=new Promise(INTERNAL);return ret._captureStackTrace(),ret._rejectCallback(reason,!0),ret},Promise.setScheduler=function(fn){if("function"!=typeof fn)throw new TypeError("expecting a function but got "+util.classString(fn));return async.setScheduler(fn)},Promise.prototype._then=function(didFulfill,didReject,_,receiver,internalData){var haveInternalData=void 0!==internalData,promise=haveInternalData?internalData:new Promise(INTERNAL),target=this._target(),bitField=target._bitField;haveInternalData||(promise._propagateFrom(this,3),promise._captureStackTrace(),void 0===receiver&&0!==(2097152&this._bitField)&&(receiver=0!==(50397184&bitField)?this._boundValue():target===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,promise));var domain=getDomain();if(0!==(50397184&bitField)){var handler,value,settler=target._settlePromiseCtx;0!==(33554432&bitField)?(value=target._rejectionHandler0,handler=didFulfill):0!==(16777216&bitField)?(value=target._fulfillmentHandler0,handler=didReject,target._unsetRejectionIsUnhandled()):(settler=target._settlePromiseLateCancellationObserver,value=new CancellationError("late cancellation observer"),target._attachExtraTrace(value),handler=didReject),async.invoke(settler,target,{handler:null===domain?handler:"function"==typeof handler&&util.domainBind(domain,handler),promise:promise,receiver:receiver,value:value})}else target._addCallbacks(didFulfill,didReject,promise,receiver,domain);return promise},Promise.prototype._length=function(){return 65535&this._bitField},Promise.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},Promise.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},Promise.prototype._setLength=function(len){this._bitField=-65536&this._bitField|65535&len},Promise.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},Promise.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},Promise.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},Promise.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},Promise.prototype._isFinal=function(){return(4194304&this._bitField)>0},Promise.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},Promise.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},Promise.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},Promise.prototype._setAsyncGuaranteed=function(){async.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},Promise.prototype._receiverAt=function(index){var ret=0===index?this._receiver0:this[4*index-4+3];return ret===UNDEFINED_BINDING?void 0:void 0===ret&&this._isBound()?this._boundValue():ret},Promise.prototype._promiseAt=function(index){return this[4*index-4+2]},Promise.prototype._fulfillmentHandlerAt=function(index){return this[4*index-4+0]},Promise.prototype._rejectionHandlerAt=function(index){return this[4*index-4+1]},Promise.prototype._boundValue=function(){},Promise.prototype._migrateCallback0=function(follower){var fulfill=(follower._bitField,follower._fulfillmentHandler0),reject=follower._rejectionHandler0,promise=follower._promise0,receiver=follower._receiverAt(0);void 0===receiver&&(receiver=UNDEFINED_BINDING),this._addCallbacks(fulfill,reject,promise,receiver,null)},Promise.prototype._migrateCallbackAt=function(follower,index){var fulfill=follower._fulfillmentHandlerAt(index),reject=follower._rejectionHandlerAt(index),promise=follower._promiseAt(index),receiver=follower._receiverAt(index);void 0===receiver&&(receiver=UNDEFINED_BINDING),this._addCallbacks(fulfill,reject,promise,receiver,null)},Promise.prototype._addCallbacks=function(fulfill,reject,promise,receiver,domain){var index=this._length();if(index>=65531&&(index=0,this._setLength(0)),0===index)this._promise0=promise,this._receiver0=receiver,"function"==typeof fulfill&&(this._fulfillmentHandler0=null===domain?fulfill:util.domainBind(domain,fulfill)),"function"==typeof reject&&(this._rejectionHandler0=null===domain?reject:util.domainBind(domain,reject));else{var base=4*index-4;this[base+2]=promise,this[base+3]=receiver,"function"==typeof fulfill&&(this[base+0]=null===domain?fulfill:util.domainBind(domain,fulfill)),"function"==typeof reject&&(this[base+1]=null===domain?reject:util.domainBind(domain,reject))}return this._setLength(index+1),index},Promise.prototype._proxy=function(proxyable,arg){this._addCallbacks(void 0,void 0,arg,proxyable,null)},Promise.prototype._resolveCallback=function(value,shouldBind){if(0===(117506048&this._bitField)){if(value===this)return this._rejectCallback(makeSelfResolutionError(),!1);var maybePromise=tryConvertToPromise(value,this);if(!(maybePromise instanceof Promise))return this._fulfill(value);shouldBind&&this._propagateFrom(maybePromise,2);var promise=maybePromise._target();if(promise===this)return void this._reject(makeSelfResolutionError());var bitField=promise._bitField;if(0===(50397184&bitField)){var len=this._length();len>0&&promise._migrateCallback0(this);for(var i=1;len>i;++i)promise._migrateCallbackAt(this,i);this._setFollowing(),this._setLength(0),this._setFollowee(promise)}else if(0!==(33554432&bitField))this._fulfill(promise._value());else if(0!==(16777216&bitField))this._reject(promise._reason());else{var reason=new CancellationError("late cancellation observer");promise._attachExtraTrace(reason),this._reject(reason)}}},Promise.prototype._rejectCallback=function(reason,synchronous,ignoreNonErrorWarnings){var trace=util.ensureErrorObject(reason),hasStack=trace===reason;if(!hasStack&&!ignoreNonErrorWarnings&&debug.warnings()){var message="a promise was rejected with a non-error: "+util.classString(reason);this._warn(message,!0)}this._attachExtraTrace(trace,synchronous?hasStack:!1),this._reject(reason)},Promise.prototype._resolveFromExecutor=function(executor){var promise=this;this._captureStackTrace(),this._pushContext();var synchronous=!0,r=this._execute(executor,function(value){promise._resolveCallback(value)},function(reason){promise._rejectCallback(reason,synchronous)});synchronous=!1,this._popContext(),void 0!==r&&promise._rejectCallback(r,!0)},Promise.prototype._settlePromiseFromHandler=function(handler,receiver,value,promise){var bitField=promise._bitField;if(0===(65536&bitField)){promise._pushContext();var x;receiver===APPLY?value&&"number"==typeof value.length?x=tryCatch(handler).apply(this._boundValue(),value):(x=errorObj,x.e=new TypeError("cannot .spread() a non-array: "+util.classString(value))):x=tryCatch(handler).call(receiver,value);var promiseCreated=promise._popContext();bitField=promise._bitField,0===(65536&bitField)&&(x===NEXT_FILTER?promise._reject(value):x===errorObj?promise._rejectCallback(x.e,!1):(debug.checkForgottenReturns(x,promiseCreated,"",promise,this),promise._resolveCallback(x)))}},Promise.prototype._target=function(){for(var ret=this;ret._isFollowing();)ret=ret._followee();return ret},Promise.prototype._followee=function(){return this._rejectionHandler0},Promise.prototype._setFollowee=function(promise){this._rejectionHandler0=promise},Promise.prototype._settlePromise=function(promise,handler,receiver,value){var isPromise=promise instanceof Promise,bitField=this._bitField,asyncGuaranteed=0!==(134217728&bitField);0!==(65536&bitField)?(isPromise&&promise._invokeInternalOnCancel(),receiver instanceof PassThroughHandlerContext&&receiver.isFinallyHandler()?(receiver.cancelPromise=promise,tryCatch(handler).call(receiver,value)===errorObj&&promise._reject(errorObj.e)):handler===reflectHandler?promise._fulfill(reflectHandler.call(receiver)):receiver instanceof Proxyable?receiver._promiseCancelled(promise):isPromise||promise instanceof PromiseArray?promise._cancel():receiver.cancel()):"function"==typeof handler?isPromise?(asyncGuaranteed&&promise._setAsyncGuaranteed(),this._settlePromiseFromHandler(handler,receiver,value,promise)):handler.call(receiver,value,promise):receiver instanceof Proxyable?receiver._isResolved()||(0!==(33554432&bitField)?receiver._promiseFulfilled(value,promise):receiver._promiseRejected(value,promise)):isPromise&&(asyncGuaranteed&&promise._setAsyncGuaranteed(),0!==(33554432&bitField)?promise._fulfill(value):promise._reject(value))},Promise.prototype._settlePromiseLateCancellationObserver=function(ctx){var handler=ctx.handler,promise=ctx.promise,receiver=ctx.receiver,value=ctx.value;"function"==typeof handler?promise instanceof Promise?this._settlePromiseFromHandler(handler,receiver,value,promise):handler.call(receiver,value,promise):promise instanceof Promise&&promise._reject(value)},Promise.prototype._settlePromiseCtx=function(ctx){this._settlePromise(ctx.promise,ctx.handler,ctx.receiver,ctx.value)},Promise.prototype._settlePromise0=function(handler,value,bitField){var promise=this._promise0,receiver=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(promise,handler,receiver,value)},Promise.prototype._clearCallbackDataAtIndex=function(index){var base=4*index-4;this[base+2]=this[base+3]=this[base+0]=this[base+1]=void 0},Promise.prototype._fulfill=function(value){var bitField=this._bitField;if(!((117506048&bitField)>>>16)){if(value===this){var err=makeSelfResolutionError();return this._attachExtraTrace(err),this._reject(err)}this._setFulfilled(),this._rejectionHandler0=value,(65535&bitField)>0&&(0!==(134217728&bitField)?this._settlePromises():async.settlePromises(this))}},Promise.prototype._reject=function(reason){var bitField=this._bitField;if(!((117506048&bitField)>>>16))return this._setRejected(),this._fulfillmentHandler0=reason,this._isFinal()?async.fatalError(reason,util.isNode):void((65535&bitField)>0?async.settlePromises(this):this._ensurePossibleRejectionHandled())},Promise.prototype._fulfillPromises=function(len,value){for(var i=1;len>i;i++){var handler=this._fulfillmentHandlerAt(i),promise=this._promiseAt(i),receiver=this._receiverAt(i);this._clearCallbackDataAtIndex(i),this._settlePromise(promise,handler,receiver,value)}},Promise.prototype._rejectPromises=function(len,reason){for(var i=1;len>i;i++){var handler=this._rejectionHandlerAt(i),promise=this._promiseAt(i),receiver=this._receiverAt(i);this._clearCallbackDataAtIndex(i),this._settlePromise(promise,handler,receiver,reason)}},Promise.prototype._settlePromises=function(){var bitField=this._bitField,len=65535&bitField;if(len>0){if(0!==(16842752&bitField)){var reason=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,reason,bitField),this._rejectPromises(len,reason)}else{var value=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,value,bitField),this._fulfillPromises(len,value)}this._setLength(0)}this._clearCancellationData()},Promise.prototype._settledValue=function(){var bitField=this._bitField;return 0!==(33554432&bitField)?this._rejectionHandler0:0!==(16777216&bitField)?this._fulfillmentHandler0:void 0},Promise.defer=Promise.pending=function(){debug.deprecated("Promise.defer","new Promise");var promise=new Promise(INTERNAL);return{promise:promise,resolve:deferResolve,reject:deferReject}},util.notEnumerableProp(Promise,"_makeSelfResolutionError",makeSelfResolutionError),require("./method")(Promise,INTERNAL,tryConvertToPromise,apiRejection,debug),require("./bind")(Promise,INTERNAL,tryConvertToPromise,debug),require("./cancel")(Promise,PromiseArray,apiRejection,debug),require("./direct_resolve")(Promise),require("./synchronous_inspection")(Promise),require("./join")(Promise,PromiseArray,tryConvertToPromise,INTERNAL,async,getDomain),Promise.Promise=Promise,Promise.version="3.4.7",require("./map.js")(Promise,PromiseArray,apiRejection,tryConvertToPromise,INTERNAL,debug),require("./call_get.js")(Promise),require("./using.js")(Promise,apiRejection,tryConvertToPromise,createContext,INTERNAL,debug),require("./timers.js")(Promise,INTERNAL,debug),require("./generators.js")(Promise,apiRejection,INTERNAL,tryConvertToPromise,Proxyable,debug),require("./nodeify.js")(Promise),require("./promisify.js")(Promise,INTERNAL),require("./props.js")(Promise,PromiseArray,tryConvertToPromise,apiRejection),require("./race.js")(Promise,INTERNAL,tryConvertToPromise,apiRejection),require("./reduce.js")(Promise,PromiseArray,apiRejection,tryConvertToPromise,INTERNAL,debug),require("./settle.js")(Promise,PromiseArray,debug),require("./some.js")(Promise,PromiseArray,apiRejection),require("./filter.js")(Promise,INTERNAL),require("./each.js")(Promise,INTERNAL),require("./any.js")(Promise),util.toFastProperties(Promise),util.toFastProperties(Promise.prototype),fillTypes({a:1}),fillTypes({b:2}),fillTypes({c:3}),fillTypes(1),fillTypes(function(){}),fillTypes(void 0),fillTypes(!1),fillTypes(new Promise(INTERNAL)),debug.setBounds(Async.firstLineError,util.lastLineError),Promise}}).call(this,require("_process"))},{"./any.js":39,"./async":40,"./bind":41,"./call_get.js":42,"./cancel":43,"./catch_filter":44,"./context":45,"./debuggability":46,"./direct_resolve":47,"./each.js":48,"./errors":49,"./es5":50,"./filter.js":51,"./finally":52,"./generators.js":53,"./join":54,"./map.js":55,"./method":56,"./nodeback":57,"./nodeify.js":58,"./promise_array":60,"./promisify.js":61,"./props.js":62,"./race.js":64,"./reduce.js":65,"./settle.js":67,"./some.js":68,"./synchronous_inspection":69,"./thenables":70,"./timers.js":71,"./using.js":72,"./util":73,_process:83}],60:[function(require,module,exports){"use strict";module.exports=function(Promise,INTERNAL,tryConvertToPromise,apiRejection,Proxyable){function toResolutionValue(val){switch(val){case-2:return[];case-3:return{}}}function PromiseArray(values){var promise=this._promise=new Promise(INTERNAL);values instanceof Promise&&promise._propagateFrom(values,3),promise._setOnCancel(this),this._values=values,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var util=require("./util");util.isArray;return util.inherits(PromiseArray,Proxyable),PromiseArray.prototype.length=function(){return this._length},PromiseArray.prototype.promise=function(){return this._promise},PromiseArray.prototype._init=function init(_,resolveValueIfEmpty){var values=tryConvertToPromise(this._values,this._promise);if(values instanceof Promise){values=values._target();var bitField=values._bitField;if(this._values=values,0===(50397184&bitField))return this._promise._setAsyncGuaranteed(),values._then(init,this._reject,void 0,this,resolveValueIfEmpty);if(0===(33554432&bitField))return 0!==(16777216&bitField)?this._reject(values._reason()):this._cancel();values=values._value()}if(values=util.asArray(values),null===values){var err=apiRejection("expecting an array or an iterable object but got "+util.classString(values)).reason();return void this._promise._rejectCallback(err,!1)}return 0===values.length?void(-5===resolveValueIfEmpty?this._resolveEmptyArray():this._resolve(toResolutionValue(resolveValueIfEmpty))):void this._iterate(values)},PromiseArray.prototype._iterate=function(values){var len=this.getActualLength(values.length);this._length=len,this._values=this.shouldCopyValues()?new Array(len):this._values;for(var result=this._promise,isResolved=!1,bitField=null,i=0;len>i;++i){var maybePromise=tryConvertToPromise(values[i],result);maybePromise instanceof Promise?(maybePromise=maybePromise._target(),bitField=maybePromise._bitField):bitField=null,isResolved?null!==bitField&&maybePromise.suppressUnhandledRejections():null!==bitField?0===(50397184&bitField)?(maybePromise._proxy(this,i),this._values[i]=maybePromise):isResolved=0!==(33554432&bitField)?this._promiseFulfilled(maybePromise._value(),i):0!==(16777216&bitField)?this._promiseRejected(maybePromise._reason(),i):this._promiseCancelled(i):isResolved=this._promiseFulfilled(maybePromise,i)}isResolved||result._setAsyncGuaranteed()},PromiseArray.prototype._isResolved=function(){return null===this._values},PromiseArray.prototype._resolve=function(value){this._values=null,this._promise._fulfill(value)},PromiseArray.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},PromiseArray.prototype._reject=function(reason){this._values=null,this._promise._rejectCallback(reason,!1)},PromiseArray.prototype._promiseFulfilled=function(value,index){this._values[index]=value;var totalResolved=++this._totalResolved;return totalResolved>=this._length?(this._resolve(this._values),!0):!1},PromiseArray.prototype._promiseCancelled=function(){return this._cancel(),!0},PromiseArray.prototype._promiseRejected=function(reason){return this._totalResolved++,this._reject(reason),!0},PromiseArray.prototype._resultCancelled=function(){if(!this._isResolved()){var values=this._values;if(this._cancel(),values instanceof Promise)values.cancel();else for(var i=0;ii;i+=2){var key=methods[i],fn=methods[i+1],promisifiedKey=key+suffix;if(promisifier===makeNodePromisified)obj[promisifiedKey]=makeNodePromisified(key,THIS,key,fn,suffix,multiArgs);else{var promisified=promisifier(fn,function(){return makeNodePromisified(key,THIS,key,fn,suffix,multiArgs)});util.notEnumerableProp(promisified,"__isPromisified__",!0),obj[promisifiedKey]=promisified}}return util.toFastProperties(obj),obj}function promisify(callback,receiver,multiArgs){return makeNodePromisified(callback,receiver,void 0,callback,null,multiArgs)}var makeNodePromisifiedEval,THIS={},util=require("./util"),nodebackForPromise=require("./nodeback"),withAppended=util.withAppended,maybeWrapAsError=util.maybeWrapAsError,canEvaluate=util.canEvaluate,TypeError=require("./errors").TypeError,defaultSuffix="Async",defaultPromisified={__isPromisified__:!0},noCopyProps=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],noCopyPropsPattern=new RegExp("^(?:"+noCopyProps.join("|")+")$"),defaultFilter=function(name){return util.isIdentifier(name)&&"_"!==name.charAt(0)&&"constructor"!==name},escapeIdentRegex=function(str){return str.replace(/([$])/,"\\$")},switchCaseArgumentOrder=function(likelyArgumentCount){for(var ret=[likelyArgumentCount],min=Math.max(0,likelyArgumentCount-1-3),i=likelyArgumentCount-1;i>=min;--i)ret.push(i);for(var i=likelyArgumentCount+1;3>=i;++i)ret.push(i);return ret},argumentSequence=function(argumentCount){return util.filledRange(argumentCount,"_arg","")},parameterDeclaration=function(parameterCount){return util.filledRange(Math.max(parameterCount,3),"_arg","")},parameterCount=function(fn){return"number"==typeof fn.length?Math.max(Math.min(fn.length,1024),0):0};makeNodePromisifiedEval=function(callback,receiver,originalName,fn,_,multiArgs){function generateCallForArgumentCount(count){var ret,args=argumentSequence(count).join(", "),comma=count>0?", ":"";return ret=shouldProxyThis?"ret = callback.call(this, {{args}}, nodeback); break;\n":void 0===receiver?"ret = callback({{args}}, nodeback); break;\n":"ret = callback.call(receiver, {{args}}, nodeback); break;\n",ret.replace("{{args}}",args).replace(", ",comma)}function generateArgumentSwitchCase(){for(var ret="",i=0;ii;++i){var key=keys[i];entries[i]=obj[key],entries[i+len]=key}}this.constructor$(entries),this._isMap=isMap,this._init$(void 0,-3)}function props(promises){var ret,castValue=tryConvertToPromise(promises);return isObject(castValue)?(ret=castValue instanceof Promise?castValue._then(Promise.props,void 0,void 0,void 0,void 0):new PropertiesPromiseArray(castValue).promise(),castValue instanceof Promise&&ret._propagateFrom(castValue,2),ret):apiRejection("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var Es6Map,util=require("./util"),isObject=util.isObject,es5=require("./es5");"function"==typeof Map&&(Es6Map=Map);var mapToEntries=function(){function extractEntry(value,key){this[index]=value,this[index+size]=key,index++}var index=0,size=0;return function(map){size=map.size,index=0;var ret=new Array(2*map.size);return map.forEach(extractEntry,ret),ret}}(),entriesToMap=function(entries){for(var ret=new Es6Map,length=entries.length/2|0,i=0;length>i;++i){var key=entries[length+i],value=entries[i];ret.set(key,value)}return ret};util.inherits(PropertiesPromiseArray,PromiseArray),PropertiesPromiseArray.prototype._init=function(){},PropertiesPromiseArray.prototype._promiseFulfilled=function(value,index){this._values[index]=value;var totalResolved=++this._totalResolved;if(totalResolved>=this._length){var val;if(this._isMap)val=entriesToMap(this._values);else{val={};for(var keyOffset=this.length(),i=0,len=this.length();len>i;++i)val[this._values[i+keyOffset]]=this._values[i]}return this._resolve(val),!0}return!1},PropertiesPromiseArray.prototype.shouldCopyValues=function(){return!1},PropertiesPromiseArray.prototype.getActualLength=function(len){return len>>1},Promise.prototype.props=function(){return props(this)},Promise.props=function(promises){return props(promises)}}},{"./es5":50,"./util":73}],63:[function(require,module,exports){"use strict";function arrayMove(src,srcIndex,dst,dstIndex,len){for(var j=0;len>j;++j)dst[j+dstIndex]=src[j+srcIndex],src[j+srcIndex]=void 0}function Queue(capacity){this._capacity=capacity,this._length=0,this._front=0}Queue.prototype._willBeOverCapacity=function(size){return this._capacityi;++i){var val=promises[i];(void 0!==val||i in promises)&&Promise.cast(val)._then(fulfill,reject,void 0,ret,null)}return ret}var util=require("./util"),raceLater=function(promise){return promise.then(function(array){return race(array,promise)})};Promise.race=function(promises){return race(promises,void 0)},Promise.prototype.race=function(){return race(this,void 0)}}},{"./util":73}],65:[function(require,module,exports){"use strict";module.exports=function(Promise,PromiseArray,apiRejection,tryConvertToPromise,INTERNAL,debug){function ReductionPromiseArray(promises,fn,initialValue,_each){this.constructor$(promises);var domain=getDomain();this._fn=null===domain?fn:util.domainBind(domain,fn),void 0!==initialValue&&(initialValue=Promise.resolve(initialValue),initialValue._attachCancellationCallback(this)),this._initialValue=initialValue,this._currentCancellable=null,_each===INTERNAL?this._eachValues=Array(this._length):0===_each?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function completed(valueOrReason,array){this.isFulfilled()?array._resolve(valueOrReason):array._reject(valueOrReason)}function reduce(promises,fn,initialValue,_each){if("function"!=typeof fn)return apiRejection("expecting a function but got "+util.classString(fn));var array=new ReductionPromiseArray(promises,fn,initialValue,_each);return array.promise()}function gotAccum(accum){this.accum=accum,this.array._gotAccum(accum);var value=tryConvertToPromise(this.value,this.array._promise);return value instanceof Promise?(this.array._currentCancellable=value,value._then(gotValue,void 0,void 0,this,void 0)):gotValue.call(this,value)}function gotValue(value){var array=this.array,promise=array._promise,fn=tryCatch(array._fn);promise._pushContext();var ret;ret=void 0!==array._eachValues?fn.call(promise._boundValue(),value,this.index,this.length):fn.call(promise._boundValue(),this.accum,value,this.index,this.length),ret instanceof Promise&&(array._currentCancellable=ret);var promiseCreated=promise._popContext();return debug.checkForgottenReturns(ret,promiseCreated,void 0!==array._eachValues?"Promise.each":"Promise.reduce",promise),ret}var getDomain=Promise._getDomain,util=require("./util"),tryCatch=util.tryCatch;util.inherits(ReductionPromiseArray,PromiseArray),ReductionPromiseArray.prototype._gotAccum=function(accum){void 0!==this._eachValues&&null!==this._eachValues&&accum!==INTERNAL&&this._eachValues.push(accum)},ReductionPromiseArray.prototype._eachComplete=function(value){return null!==this._eachValues&&this._eachValues.push(value),this._eachValues},ReductionPromiseArray.prototype._init=function(){},ReductionPromiseArray.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},ReductionPromiseArray.prototype.shouldCopyValues=function(){return!1},ReductionPromiseArray.prototype._resolve=function(value){this._promise._resolveCallback(value),this._values=null},ReductionPromiseArray.prototype._resultCancelled=function(sender){return sender===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof Promise&&this._currentCancellable.cancel(),this._initialValue instanceof Promise&&this._initialValue.cancel()))},ReductionPromiseArray.prototype._iterate=function(values){this._values=values;var value,i,length=values.length;if(void 0!==this._initialValue?(value=this._initialValue,i=0):(value=Promise.resolve(values[0]),i=1),this._currentCancellable=value,!value.isRejected())for(;length>i;++i){var ctx={accum:null,value:values[i],index:i,length:length,array:this};value=value._then(gotAccum,void 0,void 0,ctx,void 0)}void 0!==this._eachValues&&(value=value._then(this._eachComplete,void 0,void 0,this,void 0)),value._then(completed,completed,void 0,value,this)},Promise.prototype.reduce=function(fn,initialValue){return reduce(this,fn,initialValue,null)},Promise.reduce=function(promises,fn,initialValue,_each){return reduce(promises,fn,initialValue,_each)}}},{"./util":73}],66:[function(require,module,exports){(function(process,global){"use strict";var schedule,util=require("./util"),noAsyncScheduler=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},NativePromise=util.getNativePromise();if(util.isNode&&"undefined"==typeof MutationObserver){var GlobalSetImmediate=global.setImmediate,ProcessNextTick=process.nextTick;schedule=util.isRecentNode?function(fn){GlobalSetImmediate.call(global,fn)}:function(fn){ProcessNextTick.call(process,fn)}}else if("function"==typeof NativePromise&&"function"==typeof NativePromise.resolve){var nativePromise=NativePromise.resolve();schedule=function(fn){nativePromise.then(fn)}}else schedule="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof setImmediate?function(fn){setImmediate(fn)}:"undefined"!=typeof setTimeout?function(fn){setTimeout(fn,0)}:noAsyncScheduler:function(){var div=document.createElement("div"),opts={attributes:!0},toggleScheduled=!1,div2=document.createElement("div"),o2=new MutationObserver(function(){div.classList.toggle("foo"),toggleScheduled=!1});o2.observe(div2,opts);var scheduleToggle=function(){toggleScheduled||(toggleScheduled=!0,div2.classList.toggle("foo"))};return function(fn){var o=new MutationObserver(function(){o.disconnect(),fn()});o.observe(div,opts),scheduleToggle()}}();module.exports=schedule}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./util":73,_process:83}],67:[function(require,module,exports){"use strict";module.exports=function(Promise,PromiseArray,debug){function SettledPromiseArray(values){this.constructor$(values)}var PromiseInspection=Promise.PromiseInspection,util=require("./util");util.inherits(SettledPromiseArray,PromiseArray),SettledPromiseArray.prototype._promiseResolved=function(index,inspection){this._values[index]=inspection;var totalResolved=++this._totalResolved;return totalResolved>=this._length?(this._resolve(this._values),!0):!1},SettledPromiseArray.prototype._promiseFulfilled=function(value,index){var ret=new PromiseInspection;return ret._bitField=33554432,ret._settledValueField=value,this._promiseResolved(index,ret)},SettledPromiseArray.prototype._promiseRejected=function(reason,index){var ret=new PromiseInspection;return ret._bitField=16777216,ret._settledValueField=reason,this._promiseResolved(index,ret)},Promise.settle=function(promises){return debug.deprecated(".settle()",".reflect()"),new SettledPromiseArray(promises).promise()},Promise.prototype.settle=function(){return Promise.settle(this)}}},{"./util":73}],68:[function(require,module,exports){"use strict";module.exports=function(Promise,PromiseArray,apiRejection){function SomePromiseArray(values){this.constructor$(values),this._howMany=0,this._unwrap=!1,this._initialized=!1}function some(promises,howMany){if((0|howMany)!==howMany||0>howMany)return apiRejection("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var ret=new SomePromiseArray(promises),promise=ret.promise();return ret.setHowMany(howMany),ret.init(),promise}var util=require("./util"),RangeError=require("./errors").RangeError,AggregateError=require("./errors").AggregateError,isArray=util.isArray,CANCELLATION={};util.inherits(SomePromiseArray,PromiseArray),SomePromiseArray.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var isArrayResolved=isArray(this._values);!this._isResolved()&&isArrayResolved&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},SomePromiseArray.prototype.init=function(){this._initialized=!0,this._init()},SomePromiseArray.prototype.setUnwrap=function(){this._unwrap=!0},SomePromiseArray.prototype.howMany=function(){return this._howMany},SomePromiseArray.prototype.setHowMany=function(count){this._howMany=count},SomePromiseArray.prototype._promiseFulfilled=function(value){return this._addFulfilled(value),this._fulfilled()===this.howMany()?(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0):!1},SomePromiseArray.prototype._promiseRejected=function(reason){return this._addRejected(reason),this._checkOutcome()},SomePromiseArray.prototype._promiseCancelled=function(){return this._values instanceof Promise||null==this._values?this._cancel():(this._addRejected(CANCELLATION),this._checkOutcome())},SomePromiseArray.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new AggregateError,i=this.length();i0?this._reject(e):this._cancel(),!0}return!1},SomePromiseArray.prototype._fulfilled=function(){return this._totalResolved},SomePromiseArray.prototype._rejected=function(){return this._values.length-this.length()},SomePromiseArray.prototype._addRejected=function(reason){this._values.push(reason)},SomePromiseArray.prototype._addFulfilled=function(value){this._values[this._totalResolved++]=value},SomePromiseArray.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},SomePromiseArray.prototype._getRangeError=function(count){var message="Input array must contain at least "+this._howMany+" items but contains only "+count+" items";return new RangeError(message)},SomePromiseArray.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},Promise.some=function(promises,howMany){return some(promises,howMany)},Promise.prototype.some=function(howMany){return some(this,howMany)},Promise._SomePromiseArray=SomePromiseArray}},{"./errors":49,"./util":73}],69:[function(require,module,exports){"use strict";module.exports=function(Promise){function PromiseInspection(promise){void 0!==promise?(promise=promise._target(),this._bitField=promise._bitField,this._settledValueField=promise._isFateSealed()?promise._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}PromiseInspection.prototype._settledValue=function(){return this._settledValueField};var value=PromiseInspection.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},reason=PromiseInspection.prototype.error=PromiseInspection.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},isFulfilled=PromiseInspection.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},isRejected=PromiseInspection.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},isPending=PromiseInspection.prototype.isPending=function(){return 0===(50397184&this._bitField)},isResolved=PromiseInspection.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};PromiseInspection.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},Promise.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},Promise.prototype._isCancelled=function(){return this._target().__isCancelled()},Promise.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},Promise.prototype.isPending=function(){return isPending.call(this._target())},Promise.prototype.isRejected=function(){return isRejected.call(this._target())},Promise.prototype.isFulfilled=function(){return isFulfilled.call(this._target())},Promise.prototype.isResolved=function(){return isResolved.call(this._target())},Promise.prototype.value=function(){return value.call(this._target())},Promise.prototype.reason=function(){var target=this._target();return target._unsetRejectionIsUnhandled(),reason.call(target)},Promise.prototype._value=function(){return this._settledValue()},Promise.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},Promise.PromiseInspection=PromiseInspection}},{}],70:[function(require,module,exports){"use strict";module.exports=function(Promise,INTERNAL){function tryConvertToPromise(obj,context){if(isObject(obj)){if(obj instanceof Promise)return obj;var then=getThen(obj);if(then===errorObj){context&&context._pushContext();var ret=Promise.reject(then.e);return context&&context._popContext(),ret}if("function"==typeof then){if(isAnyBluebirdPromise(obj)){var ret=new Promise(INTERNAL);return obj._then(ret._fulfill,ret._reject,void 0,ret,null),ret}return doThenable(obj,then,context)}}return obj}function doGetThen(obj){return obj.then}function getThen(obj){try{return doGetThen(obj)}catch(e){return errorObj.e=e,errorObj}}function isAnyBluebirdPromise(obj){try{return hasProp.call(obj,"_promise0")}catch(e){return!1}}function doThenable(x,then,context){function resolve(value){promise&&(promise._resolveCallback(value),promise=null)}function reject(reason){promise&&(promise._rejectCallback(reason,synchronous,!0),promise=null)}var promise=new Promise(INTERNAL),ret=promise;context&&context._pushContext(),promise._captureStackTrace(),context&&context._popContext();var synchronous=!0,result=util.tryCatch(then).call(x,resolve,reject);return synchronous=!1,promise&&result===errorObj&&(promise._rejectCallback(result.e,!0,!0),promise=null),ret}var util=require("./util"),errorObj=util.errorObj,isObject=util.isObject,hasProp={}.hasOwnProperty;return tryConvertToPromise}},{"./util":73}],71:[function(require,module,exports){"use strict";module.exports=function(Promise,INTERNAL,debug){function HandleWrapper(handle){this.handle=handle}function successClear(value){return clearTimeout(this.handle),value}function failureClear(reason){throw clearTimeout(this.handle),reason}var util=require("./util"),TimeoutError=Promise.TimeoutError;HandleWrapper.prototype._resultCancelled=function(){clearTimeout(this.handle)};var afterValue=function(value){return delay(+this).thenReturn(value)},delay=Promise.delay=function(ms,value){var ret,handle;return void 0!==value?(ret=Promise.resolve(value)._then(afterValue,null,null,ms,void 0),debug.cancellation()&&value instanceof Promise&&ret._setOnCancel(value)):(ret=new Promise(INTERNAL),handle=setTimeout(function(){ret._fulfill()},+ms),debug.cancellation()&&ret._setOnCancel(new HandleWrapper(handle)),ret._captureStackTrace()),ret._setAsyncGuaranteed(),ret};Promise.prototype.delay=function(ms){return delay(ms,this)};var afterTimeout=function(promise,message,parent){var err;err="string"!=typeof message?message instanceof Error?message:new TimeoutError("operation timed out"):new TimeoutError(message),util.markAsOriginatingFromRejection(err),promise._attachExtraTrace(err),promise._reject(err),null!=parent&&parent.cancel()};Promise.prototype.timeout=function(ms,message){ms=+ms;var ret,parent,handleWrapper=new HandleWrapper(setTimeout(function(){ret.isPending()&&afterTimeout(ret,message,parent)},ms));return debug.cancellation()?(parent=this.then(),ret=parent._then(successClear,failureClear,void 0,handleWrapper,void 0),ret._setOnCancel(handleWrapper)):ret=this._then(successClear,failureClear,void 0,handleWrapper,void 0),ret}}},{"./util":73}],72:[function(require,module,exports){"use strict";module.exports=function(Promise,apiRejection,tryConvertToPromise,createContext,INTERNAL,debug){function thrower(e){setTimeout(function(){throw e},0)}function castPreservingDisposable(thenable){var maybePromise=tryConvertToPromise(thenable);return maybePromise!==thenable&&"function"==typeof thenable._isDisposable&&"function"==typeof thenable._getDisposer&&thenable._isDisposable()&&maybePromise._setDisposable(thenable._getDisposer()),maybePromise}function dispose(resources,inspection){function iterator(){if(i>=len)return ret._fulfill();var maybePromise=castPreservingDisposable(resources[i++]);if(maybePromise instanceof Promise&&maybePromise._isDisposable()){try{maybePromise=tryConvertToPromise(maybePromise._getDisposer().tryDispose(inspection),resources.promise)}catch(e){return thrower(e)}if(maybePromise instanceof Promise)return maybePromise._then(iterator,thrower,null,null,null)}iterator()}var i=0,len=resources.length,ret=new Promise(INTERNAL);return iterator(),ret}function Disposer(data,promise,context){this._data=data,this._promise=promise,this._context=context}function FunctionDisposer(fn,promise,context){this.constructor$(fn,promise,context)}function maybeUnwrapDisposer(value){return Disposer.isDisposer(value)?(this.resources[this.index]._setDisposable(value),value.promise()):value}function ResourceList(length){this.length=length,this.promise=null,this[length-1]=null}var util=require("./util"),TypeError=require("./errors").TypeError,inherits=require("./util").inherits,errorObj=util.errorObj,tryCatch=util.tryCatch,NULL={};Disposer.prototype.data=function(){return this._data},Disposer.prototype.promise=function(){return this._promise},Disposer.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():NULL},Disposer.prototype.tryDispose=function(inspection){var resource=this.resource(),context=this._context;void 0!==context&&context._pushContext();var ret=resource!==NULL?this.doDispose(resource,inspection):null;return void 0!==context&&context._popContext(),this._promise._unsetDisposable(),this._data=null,ret},Disposer.isDisposer=function(d){return null!=d&&"function"==typeof d.resource&&"function"==typeof d.tryDispose},inherits(FunctionDisposer,Disposer),FunctionDisposer.prototype.doDispose=function(resource,inspection){var fn=this.data();return fn.call(resource,resource,inspection)},ResourceList.prototype._resultCancelled=function(){for(var len=this.length,i=0;len>i;++i){var item=this[i];item instanceof Promise&&item.cancel()}},Promise.using=function(){var len=arguments.length;if(2>len)return apiRejection("you must pass at least 2 arguments to Promise.using");var fn=arguments[len-1];if("function"!=typeof fn)return apiRejection("expecting a function but got "+util.classString(fn));var input,spreadArgs=!0;2===len&&Array.isArray(arguments[0])?(input=arguments[0],len=input.length,spreadArgs=!1):(input=arguments,len--);for(var resources=new ResourceList(len),i=0;len>i;++i){var resource=input[i];if(Disposer.isDisposer(resource)){var disposer=resource;resource=resource.promise(),resource._setDisposable(disposer)}else{var maybePromise=tryConvertToPromise(resource);maybePromise instanceof Promise&&(resource=maybePromise._then(maybeUnwrapDisposer,null,null,{resources:resources,index:i},void 0))}resources[i]=resource}for(var reflectedResources=new Array(resources.length),i=0;i0},Promise.prototype._getDisposer=function(){return this._disposer},Promise.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},Promise.prototype.disposer=function(fn){if("function"==typeof fn)return new FunctionDisposer(fn,this,createContext());throw new TypeError}}},{"./errors":49,"./util":73}],73:[function(require,module,exports){(function(process,global){"use strict";function tryCatcher(){try{var target=tryCatchTarget;return tryCatchTarget=null,target.apply(this,arguments)}catch(e){return errorObj.e=e,errorObj}}function tryCatch(fn){return tryCatchTarget=fn,tryCatcher}function isPrimitive(val){return null==val||val===!0||val===!1||"string"==typeof val||"number"==typeof val}function isObject(value){return"function"==typeof value||"object"==typeof value&&null!==value}function maybeWrapAsError(maybeError){return isPrimitive(maybeError)?new Error(safeToString(maybeError)):maybeError}function withAppended(target,appendee){var i,len=target.length,ret=new Array(len+1);for(i=0;len>i;++i)ret[i]=target[i];return ret[i]=appendee,ret}function getDataPropertyOrDefault(obj,key,defaultValue){if(!es5.isES5)return{}.hasOwnProperty.call(obj,key)?obj[key]:void 0;var desc=Object.getOwnPropertyDescriptor(obj,key);return null!=desc?null==desc.get&&null==desc.set?desc.value:defaultValue:void 0}function notEnumerableProp(obj,name,value){if(isPrimitive(obj))return obj;var descriptor={value:value,configurable:!0,enumerable:!1,writable:!0};return es5.defineProperty(obj,name,descriptor),obj}function thrower(r){throw r}function isClass(fn){try{if("function"==typeof fn){var keys=es5.names(fn.prototype),hasMethods=es5.isES5&&keys.length>1,hasMethodsOtherThanConstructor=keys.length>0&&!(1===keys.length&&"constructor"===keys[0]),hasThisAssignmentAndStaticMethods=thisAssignmentPattern.test(fn+"")&&es5.names(fn).length>0;if(hasMethods||hasMethodsOtherThanConstructor||hasThisAssignmentAndStaticMethods)return!0}return!1}catch(e){return!1}}function toFastProperties(obj){function FakeConstructor(){}FakeConstructor.prototype=obj;for(var l=8;l--;)new FakeConstructor;return obj}function isIdentifier(str){return rident.test(str)}function filledRange(count,prefix,suffix){for(var ret=new Array(count),i=0;count>i;++i)ret[i]=prefix+i+suffix;return ret}function safeToString(obj){try{return obj+""}catch(e){return"[no string representation]"}}function isError(obj){return null!==obj&&"object"==typeof obj&&"string"==typeof obj.message&&"string"==typeof obj.name}function markAsOriginatingFromRejection(e){try{notEnumerableProp(e,"isOperational",!0)}catch(ignore){}}function originatesFromRejection(e){return null==e?!1:e instanceof Error.__BluebirdErrorTypes__.OperationalError||e.isOperational===!0}function canAttachTrace(obj){return isError(obj)&&es5.propertyIsWritable(obj,"stack")}function classString(obj){return{}.toString.call(obj)}function copyDescriptors(from,to,filter){for(var keys=es5.names(from),i=0;i10||version[0]>0}(),ret.isNode&&ret.toFastProperties(process);try{throw new Error}catch(e){ret.lastLineError=e}module.exports=ret}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./es5":50,_process:83}],74:[function(require,module,exports){},{}],75:[function(require,module,exports){(function(global){"use strict";function typedArraySupport(){try{var arr=new Uint8Array(1);return arr.foo=function(){return 42},42===arr.foo()&&"function"==typeof arr.subarray&&0===arr.subarray(1,1).byteLength}catch(e){return!1}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(that,length){if(kMaxLength()=size?createBuffer(that,size):void 0!==fill?"string"==typeof encoding?createBuffer(that,size).fill(fill,encoding):createBuffer(that,size).fill(fill):createBuffer(that,size)}function allocUnsafe(that,size){if(assertSize(size),that=createBuffer(that,0>size?0:0|checked(size)),!Buffer.TYPED_ARRAY_SUPPORT)for(var i=0;size>i;i++)that[i]=0;return that}function fromString(that,string,encoding){if(("string"!=typeof encoding||""===encoding)&&(encoding="utf8"),!Buffer.isEncoding(encoding))throw new TypeError('"encoding" must be a valid string encoding');var length=0|byteLength(string,encoding);return that=createBuffer(that,length),that.write(string,encoding),that}function fromArrayLike(that,array){var length=0|checked(array.length);that=createBuffer(that,length);for(var i=0;length>i;i+=1)that[i]=255&array[i];return that}function fromArrayBuffer(that,array,byteOffset,length){if(array.byteLength,0>byteOffset||array.byteLength=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|length}function SlowBuffer(length){return+length!=length&&(length=0),Buffer.alloc(+length)}function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(string)||string instanceof ArrayBuffer))return string.byteLength;"string"!=typeof string&&(string=""+string);var len=string.length;if(0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"binary":case"raw":case"raws":return len;case"utf8":case"utf-8":case void 0:return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}function slowToString(encoding,start,end){var loweredCase=!1;if((void 0===start||0>start)&&(start=0),start>this.length)return"";if((void 0===end||end>this.length)&&(end=this.length),0>=end)return"";if(end>>>=0,start>>>=0,start>=end)return"";for(encoding||(encoding="utf8");;)switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"binary":return binarySlice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}function swap(b,n,m){var i=b[n];b[n]=b[m],b[m]=i}function arrayIndexOf(arr,val,byteOffset,encoding){function read(buf,i){return 1===indexSize?buf[i]:buf.readUInt16BE(i*indexSize)}var indexSize=1,arrLength=arr.length,valLength=val.length;if(void 0!==encoding&&(encoding=String(encoding).toLowerCase(),"ucs2"===encoding||"ucs-2"===encoding||"utf16le"===encoding||"utf-16le"===encoding)){if(arr.length<2||val.length<2)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}for(var foundIndex=-1,i=0;arrLength>byteOffset+i;i++)if(read(arr,byteOffset+i)===read(val,-1===foundIndex?0:i-foundIndex)){if(-1===foundIndex&&(foundIndex=i),i-foundIndex+1===valLength)return(byteOffset+foundIndex)*indexSize}else-1!==foundIndex&&(i-=i-foundIndex),foundIndex=-1;return-1}function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;length?(length=Number(length),length>remaining&&(length=remaining)):length=remaining;var strLen=string.length;if(strLen%2!==0)throw new Error("Invalid hex string");length>strLen/2&&(length=strLen/2);for(var i=0;length>i;i++){var parsed=parseInt(string.substr(2*i,2),16);if(isNaN(parsed))return i;buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(asciiToBytes(string),buf,offset,length)}function binaryWrite(buf,string,offset,length){return asciiWrite(buf,string,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(utf16leToBytes(string,buf.length-offset),buf,offset,length)}function base64Slice(buf,start,end){return 0===start&&end===buf.length?base64.fromByteArray(buf):base64.fromByteArray(buf.slice(start,end))}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);for(var res=[],i=start;end>i;){var firstByte=buf[i],codePoint=null,bytesPerSequence=firstByte>239?4:firstByte>223?3:firstByte>191?2:1;if(end>=i+bytesPerSequence){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:128>firstByte&&(codePoint=firstByte);break;case 2:secondByte=buf[i+1],128===(192&secondByte)&&(tempCodePoint=(31&firstByte)<<6|63&secondByte,tempCodePoint>127&&(codePoint=tempCodePoint));break;case 3:secondByte=buf[i+1],thirdByte=buf[i+2],128===(192&secondByte)&&128===(192&thirdByte)&&(tempCodePoint=(15&firstByte)<<12|(63&secondByte)<<6|63&thirdByte,tempCodePoint>2047&&(55296>tempCodePoint||tempCodePoint>57343)&&(codePoint=tempCodePoint));break;case 4:secondByte=buf[i+1],thirdByte=buf[i+2],fourthByte=buf[i+3],128===(192&secondByte)&&128===(192&thirdByte)&&128===(192&fourthByte)&&(tempCodePoint=(15&firstByte)<<18|(63&secondByte)<<12|(63&thirdByte)<<6|63&fourthByte,tempCodePoint>65535&&1114112>tempCodePoint&&(codePoint=tempCodePoint))}}null===codePoint?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|1023&codePoint),res.push(codePoint),i+=bytesPerSequence}return decodeCodePointsArray(res)}function decodeCodePointsArray(codePoints){var len=codePoints.length;if(MAX_ARGUMENTS_LENGTH>=len)return String.fromCharCode.apply(String,codePoints);for(var res="",i=0;len>i;)res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=MAX_ARGUMENTS_LENGTH));return res}function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;end>i;i++)ret+=String.fromCharCode(127&buf[i]);return ret}function binarySlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;end>i;i++)ret+=String.fromCharCode(buf[i]);return ret}function hexSlice(buf,start,end){var len=buf.length;(!start||0>start)&&(start=0),(!end||0>end||end>len)&&(end=len);for(var out="",i=start;end>i;i++)out+=toHex(buf[i]);return out}function utf16leSlice(buf,start,end){for(var bytes=buf.slice(start,end),res="",i=0;ioffset)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length")}function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||min>value)throw new RangeError('"value" argument is out of bounds');if(offset+ext>buf.length)throw new RangeError("Index out of range")}function objectWriteUInt16(buf,value,offset,littleEndian){0>value&&(value=65535+value+1);for(var i=0,j=Math.min(buf.length-offset,2);j>i;i++)buf[offset+i]=(value&255<<8*(littleEndian?i:1-i))>>>8*(littleEndian?i:1-i)}function objectWriteUInt32(buf,value,offset,littleEndian){0>value&&(value=4294967295+value+1);for(var i=0,j=Math.min(buf.length-offset,4);j>i;i++)buf[offset+i]=value>>>8*(littleEndian?i:3-i)&255}function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(0>offset)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}function base64clean(str){if(str=stringtrim(str).replace(INVALID_BASE64_RE,""),str.length<2)return"";for(;str.length%4!==0;)str+="=";return str}function stringtrim(str){return str.trim?str.trim():str.replace(/^\s+|\s+$/g,"")}function toHex(n){return 16>n?"0"+n.toString(16):n.toString(16)}function utf8ToBytes(string,units){units=units||1/0;for(var codePoint,length=string.length,leadSurrogate=null,bytes=[],i=0;length>i;i++){if(codePoint=string.charCodeAt(i),codePoint>55295&&57344>codePoint){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes.push(239,191,189);continue}if(i+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(56320>codePoint){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else leadSurrogate&&(units-=3)>-1&&bytes.push(239,191,189);if(leadSurrogate=null,128>codePoint){if((units-=1)<0)break;bytes.push(codePoint)}else if(2048>codePoint){if((units-=2)<0)break;bytes.push(codePoint>>6|192,63&codePoint|128)}else if(65536>codePoint){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,63&codePoint|128)}else{if(!(1114112>codePoint))throw new Error("Invalid code point");if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,63&codePoint|128)}}return bytes}function asciiToBytes(str){for(var byteArray=[],i=0;i>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;length>i&&!(i+offset>=dst.length||i>=src.length);i++)dst[i+offset]=src[i];return i}function isnan(val){return val!==val}var base64=require("base64-js"),ieee754=require("ieee754"),isArray=require("isarray");exports.Buffer=Buffer,exports.SlowBuffer=SlowBuffer,exports.INSPECT_MAX_BYTES=50,Buffer.TYPED_ARRAY_SUPPORT=void 0!==global.TYPED_ARRAY_SUPPORT?global.TYPED_ARRAY_SUPPORT:typedArraySupport(),exports.kMaxLength=kMaxLength(),Buffer.poolSize=8192,Buffer._augment=function(arr){return arr.__proto__=Buffer.prototype,arr},Buffer.from=function(value,encodingOrOffset,length){return from(null,value,encodingOrOffset,length)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0})),Buffer.alloc=function(size,fill,encoding){return alloc(null,size,fill,encoding)},Buffer.allocUnsafe=function(size){return allocUnsafe(null,size)},Buffer.allocUnsafeSlow=function(size){return allocUnsafe(null,size)},Buffer.isBuffer=function(b){return!(null==b||!b._isBuffer)},Buffer.compare=function(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);len>i;++i)if(a[i]!==b[i]){x=a[i],y=b[i];break}return y>x?-1:x>y?1:0},Buffer.isEncoding=function(encoding){switch(String(encoding).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function(list,length){if(!isArray(list))throw new TypeError('"list" argument must be an Array of Buffers');if(0===list.length)return Buffer.alloc(0);var i;if(void 0===length)for(length=0,i=0;ii;i+=2)swap(this,i,i+1);return this},Buffer.prototype.swap32=function(){var len=this.length;if(len%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;len>i;i+=4)swap(this,i,i+3),swap(this,i+1,i+2);return this},Buffer.prototype.toString=function(){var length=0|this.length;return 0===length?"":0===arguments.length?utf8Slice(this,0,length):slowToString.apply(this,arguments)},Buffer.prototype.equals=function(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b?!0:0===Buffer.compare(this,b)},Buffer.prototype.inspect=function(){var str="",max=exports.INSPECT_MAX_BYTES;return this.length>0&&(str=this.toString("hex",0,max).match(/.{2}/g).join(" "),this.length>max&&(str+=" ... ")),""},Buffer.prototype.compare=function(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target))throw new TypeError("Argument must be a Buffer");if(void 0===start&&(start=0),void 0===end&&(end=target?target.length:0),void 0===thisStart&&(thisStart=0),void 0===thisEnd&&(thisEnd=this.length),0>start||end>target.length||0>thisStart||thisEnd>this.length)throw new RangeError("out of range index");if(thisStart>=thisEnd&&start>=end)return 0;if(thisStart>=thisEnd)return-1;if(start>=end)return 1;if(start>>>=0,end>>>=0,thisStart>>>=0,thisEnd>>>=0,this===target)return 0;for(var x=thisEnd-thisStart,y=end-start,len=Math.min(x,y),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start,end),i=0;len>i;++i)if(thisCopy[i]!==targetCopy[i]){x=thisCopy[i],y=targetCopy[i];break}return y>x?-1:x>y?1:0},Buffer.prototype.indexOf=function(val,byteOffset,encoding){if("string"==typeof byteOffset?(encoding=byteOffset,byteOffset=0):byteOffset>2147483647?byteOffset=2147483647:-2147483648>byteOffset&&(byteOffset=-2147483648),byteOffset>>=0,0===this.length)return-1;if(byteOffset>=this.length)return-1;if(0>byteOffset&&(byteOffset=Math.max(this.length+byteOffset,0)),"string"==typeof val&&(val=Buffer.from(val,encoding)),Buffer.isBuffer(val))return 0===val.length?-1:arrayIndexOf(this,val,byteOffset,encoding);if("number"==typeof val)return Buffer.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,val,byteOffset):arrayIndexOf(this,[val],byteOffset,encoding);throw new TypeError("val must be string, number or Buffer")},Buffer.prototype.includes=function(val,byteOffset,encoding){return-1!==this.indexOf(val,byteOffset,encoding)},Buffer.prototype.write=function(string,offset,length,encoding){if(void 0===offset)encoding="utf8",length=this.length,offset=0;else if(void 0===length&&"string"==typeof offset)encoding=offset,length=this.length,offset=0;else{if(!isFinite(offset))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");offset=0|offset,isFinite(length)?(length=0|length,void 0===encoding&&(encoding="utf8")):(encoding=length,length=void 0)}var remaining=this.length-offset;if((void 0===length||length>remaining)&&(length=remaining),string.length>0&&(0>length||0>offset)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"binary":return binaryWrite(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;Buffer.prototype.slice=function(start,end){var len=this.length;start=~~start,end=void 0===end?len:~~end,0>start?(start+=len,0>start&&(start=0)):start>len&&(start=len),0>end?(end+=len,0>end&&(end=0)):end>len&&(end=len),start>end&&(end=start);var newBuf;if(Buffer.TYPED_ARRAY_SUPPORT)newBuf=this.subarray(start,end),newBuf.__proto__=Buffer.prototype;else{var sliceLen=end-start;newBuf=new Buffer(sliceLen,void 0);for(var i=0;sliceLen>i;i++)newBuf[i]=this[i+start]}return newBuf},Buffer.prototype.readUIntLE=function(offset,byteLength,noAssert){offset=0|offset,byteLength=0|byteLength,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i0&&(mul*=256);)val+=this[offset+--byteLength]*mul;return val},Buffer.prototype.readUInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUInt16BE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+16777216*this[offset+3]},Buffer.prototype.readUInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),16777216*this[offset]+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])},Buffer.prototype.readIntLE=function(offset,byteLength,noAssert){offset=0|offset,byteLength=0|byteLength,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset=0|offset,byteLength=0|byteLength,noAssert||checkOffset(offset,byteLength,this.length);for(var i=byteLength,mul=1,val=this[offset+--i];i>0&&(mul*=256);)val+=this[offset+--i]*mul;return mul*=128,val>=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),128&this[offset]?-1*(255-this[offset]+1):this[offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readFloatLE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset=0|offset,byteLength=0|byteLength,!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1,i=0;for(this[offset]=255&value;++i=0&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUInt8=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),this[offset]=255&value,offset+1},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,4294967295,0), +Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset=0|offset,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0,mul=1,sub=0;for(this[offset]=255&value;++ivalue&&0===sub&&0!==this[offset+i-1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset=0|offset,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1,mul=1,sub=0;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)0>value&&0===sub&&0!==this[offset+i+1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeInt8=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),0>value&&(value=255+value+1),this[offset]=255&value,offset+1},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),0>value&&(value=4294967295+value+1),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function(target,targetStart,start,end){if(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&start>end&&(end=start),end===start)return 0;if(0===target.length||0===this.length)return 0;if(0>targetStart)throw new RangeError("targetStart out of bounds");if(0>start||start>=this.length)throw new RangeError("sourceStart out of bounds");if(0>end)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStartstart&&end>targetStart)for(i=len-1;i>=0;i--)target[i+targetStart]=this[i+start];else if(1e3>len||!Buffer.TYPED_ARRAY_SUPPORT)for(i=0;len>i;i++)target[i+targetStart]=this[i+start];else Uint8Array.prototype.set.call(target,this.subarray(start,start+len),targetStart);return len},Buffer.prototype.fill=function(val,start,end,encoding){if("string"==typeof val){if("string"==typeof start?(encoding=start,start=0,end=this.length):"string"==typeof end&&(encoding=end,end=this.length),1===val.length){var code=val.charCodeAt(0);256>code&&(val=code)}if(void 0!==encoding&&"string"!=typeof encoding)throw new TypeError("encoding must be a string");if("string"==typeof encoding&&!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding)}else"number"==typeof val&&(val=255&val);if(0>start||this.length=end)return this;start>>>=0,end=void 0===end?this.length:end>>>0,val||(val=0);var i;if("number"==typeof val)for(i=start;end>i;i++)this[i]=val;else{var bytes=Buffer.isBuffer(val)?val:utf8ToBytes(new Buffer(val,encoding).toString()),len=bytes.length;for(i=0;end-start>i;i++)this[i+start]=bytes[i%len]}return this};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":76,ieee754:77,isarray:78}],76:[function(require,module,exports){"use strict";function init(){for(var code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;len>i;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63}function toByteArray(b64){var i,j,l,tmp,placeHolders,arr,len=b64.length;if(len%4>0)throw new Error("Invalid string. Length must be a multiple of 4");placeHolders="="===b64[len-2]?2:"="===b64[len-1]?1:0,arr=new Arr(3*len/4-placeHolders),l=placeHolders>0?len-4:len;var L=0;for(i=0,j=0;l>i;i+=4,j+=3)tmp=revLookup[b64.charCodeAt(i)]<<18|revLookup[b64.charCodeAt(i+1)]<<12|revLookup[b64.charCodeAt(i+2)]<<6|revLookup[b64.charCodeAt(i+3)],arr[L++]=tmp>>16&255,arr[L++]=tmp>>8&255,arr[L++]=255&tmp;return 2===placeHolders?(tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4,arr[L++]=255&tmp):1===placeHolders&&(tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2,arr[L++]=tmp>>8&255,arr[L++]=255&tmp),arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[63&num]}function encodeChunk(uint8,start,end){for(var tmp,output=[],i=start;end>i;i+=3)tmp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2],output.push(tripletToBase64(tmp));return output.join("")}function fromByteArray(uint8){for(var tmp,len=uint8.length,extraBytes=len%3,output="",parts=[],maxChunkLength=16383,i=0,len2=len-extraBytes;len2>i;i+=maxChunkLength)parts.push(encodeChunk(uint8,i,i+maxChunkLength>len2?len2:i+maxChunkLength));return 1===extraBytes?(tmp=uint8[len-1],output+=lookup[tmp>>2],output+=lookup[tmp<<4&63],output+="=="):2===extraBytes&&(tmp=(uint8[len-2]<<8)+uint8[len-1],output+=lookup[tmp>>10],output+=lookup[tmp>>4&63],output+=lookup[tmp<<2&63],output+="="),parts.push(output),parts.join("")}exports.toByteArray=toByteArray,exports.fromByteArray=fromByteArray;var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array;init()},{}],77:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1<>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?NaN:(s?-1:1)*(1/0);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)},exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1<>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=0>value||0===value&&0>1/value?1:0;for(value=Math.abs(value),isNaN(value)||value===1/0?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),value*(c=Math.pow(2,-e))<1&&(e--,c*=2),value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias),value*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},{}],78:[function(require,module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return"[object Array]"==toString.call(arr)}},{}],79:[function(require,module,exports){function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction(arg){return"function"==typeof arg}function isNumber(arg){return"number"==typeof arg}function isObject(arg){return"object"==typeof arg&&null!==arg}function isUndefined(arg){return void 0===arg}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||0>n||isNaN(n))throw TypeError("n must be a positive number");return this._maxListeners=n,this},EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(this._events||(this._events={}),"error"===type&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if(er=arguments[1],er instanceof Error)throw er;throw TypeError('Uncaught, unspecified "error" event.')}if(handler=this._events[type],isUndefined(handler))return!1;if(isFunction(handler))switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1),handler.apply(this,args)}else if(isObject(handler))for(args=Array.prototype.slice.call(arguments,1),listeners=handler.slice(),len=listeners.length,i=0;len>i;i++)listeners[i].apply(this,args);return!0},EventEmitter.prototype.addListener=function(type,listener){var m;if(!isFunction(listener))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",type,isFunction(listener.listener)?listener.listener:listener),this._events[type]?isObject(this._events[type])?this._events[type].push(listener):this._events[type]=[this._events[type],listener]:this._events[type]=listener,isObject(this._events[type])&&!this._events[type].warned&&(m=isUndefined(this._maxListeners)?EventEmitter.defaultMaxListeners:this._maxListeners,m&&m>0&&this._events[type].length>m&&(this._events[type].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[type].length),"function"==typeof console.trace&&console.trace())),this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(type,listener){function g(){this.removeListener(type,g),fired||(fired=!0,listener.apply(this,arguments))}if(!isFunction(listener))throw TypeError("listener must be a function");var fired=!1;return g.listener=listener,this.on(type,g),this},EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;if(list=this._events[type],length=list.length,position=-1,list===listener||isFunction(list.listener)&&list.listener===listener)delete this._events[type],this._events.removeListener&&this.emit("removeListener",type,listener);else if(isObject(list)){for(i=length;i-->0;)if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}if(0>position)return this;1===list.length?(list.length=0,delete this._events[type]):list.splice(position,1),this._events.removeListener&&this.emit("removeListener",type,listener)}return this},EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[type]&&delete this._events[type],this;if(0===arguments.length){for(key in this._events)"removeListener"!==key&&this.removeAllListeners(key);return this.removeAllListeners("removeListener"),this._events={},this}if(listeners=this._events[type],isFunction(listeners))this.removeListener(type,listeners);else if(listeners)for(;listeners.length;)this.removeListener(type,listeners[listeners.length-1]);return delete this._events[type],this},EventEmitter.prototype.listeners=function(type){var ret;return ret=this._events&&this._events[type]?isFunction(this._events[type])?[this._events[type]]:this._events[type].slice():[]},EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))return 1;if(evlistener)return evlistener.length}return 0},EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)}},{}],80:[function(require,module,exports){"function"==typeof Object.create?module.exports=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}},{}],81:[function(require,module,exports){module.exports=function(obj){return!(null==obj||!(obj._isBuffer||obj.constructor&&"function"==typeof obj.constructor.isBuffer&&obj.constructor.isBuffer(obj)))}},{}],82:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){for(var up=0,i=parts.length-1;i>=0;i--){var last=parts[i];"."===last?parts.splice(i,1):".."===last?(parts.splice(i,1),up++):up&&(parts.splice(i,1),up--)}if(allowAboveRoot)for(;up--;up)parts.unshift("..");return parts}function filter(xs,f){if(xs.filter)return xs.filter(f);for(var res=[],i=0;i=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if("string"!=typeof path)throw new TypeError("Arguments to path.resolve must be strings");path&&(resolvedPath=path+"/"+resolvedPath,resolvedAbsolute="/"===path.charAt(0))}return resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/"),(resolvedAbsolute?"/":"")+resolvedPath||"."},exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash="/"===substr(path,-1);return path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/"),path||isAbsolute||(path="."),path&&trailingSlash&&(path+="/"),(isAbsolute?"/":"")+path},exports.isAbsolute=function(path){return"/"===path.charAt(0)},exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if("string"!=typeof p)throw new TypeError("Arguments to path.join must be strings");return p}).join("/"))},exports.relative=function(from,to){function trim(arr){for(var start=0;start=0&&""===arr[end];end--);return start>end?[]:arr.slice(start,end-start+1)}from=exports.resolve(from).substr(1),to=exports.resolve(to).substr(1);for(var fromParts=trim(from.split("/")),toParts=trim(to.split("/")),length=Math.min(fromParts.length,toParts.length),samePartsLength=length,i=0;length>i;i++)if(fromParts[i]!==toParts[i]){samePartsLength=i;break}for(var outputParts=[],i=samePartsLength;istart&&(start=str.length+start),str.substr(start,len)}}).call(this,require("_process"))},{_process:83}],83:[function(require,module,exports){function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var timeout=cachedSetTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex1)for(var i=1;i0)if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var _e=new Error("stream.unshift() after end event");stream.emit("error",_e)}else{var skipAdd;!state.decoder||addToFront||encoding||(chunk=state.decoder.write(chunk),skipAdd=!state.objectMode&&0===chunk.length),addToFront||(state.reading=!1),skipAdd||(state.flowing&&0===state.length&&!state.sync?(stream.emit("data",chunk),stream.read(0)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream))),maybeReadMore(stream,state)}else addToFront||(state.reading=!1);return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length=MAX_HWM?n=MAX_HWM:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function howMuchToRead(n,state){return 0===state.length&&state.ended?0:state.objectMode?0===n?0:1:null===n||isNaN(n)?state.flowing&&state.buffer.length?state.buffer[0].length:state.length:0>=n?0:(n>state.highWaterMark&&(state.highWaterMark=computeNewHighWaterMark(n)),n>state.length?state.ended?state.length:(state.needReadable=!0,0):n)}function chunkInvalid(state,chunk){var er=null;return Buffer.isBuffer(chunk)||"string"==typeof chunk||null===chunk||void 0===chunk||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er}function onEofChunk(stream,state){if(!state.ended){if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length)}state.ended=!0,emitReadable(stream)}}function emitReadable(stream){var state=stream._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?processNextTick(emitReadable_,stream):emitReadable_(stream))}function emitReadable_(stream){debug("emit readable"),stream.emit("readable"),flow(stream)}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,processNextTick(maybeReadMore_,stream,state))}function maybeReadMore_(stream,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length=length)ret=stringMode?list.join(""):1===list.length?list[0]:Buffer.concat(list,length),list.length=0;else if(ni&&n>c;i++){var _buf=list[0],cpy=Math.min(n-c,_buf.length);stringMode?ret+=_buf.slice(0,cpy):_buf.copy(ret,c,0,cpy),cpy<_buf.length?list[0]=_buf.slice(cpy):list.shift(),c+=cpy}}return ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');state.endEmitted||(state.ended=!0,processNextTick(endReadableNT,state,stream))}function endReadableNT(state,stream){state.endEmitted||0!==state.length||(state.endEmitted=!0,stream.readable=!1,stream.emit("end"))}function forEach(xs,f){for(var i=0,l=xs.length;l>i;i++)f(xs[i],i)}function indexOf(xs,x){for(var i=0,l=xs.length;l>i;i++)if(xs[i]===x)return i;return-1}module.exports=Readable;var processNextTick=require("process-nextick-args"),isArray=require("isarray");Readable.ReadableState=ReadableState;var Stream,EE=require("events").EventEmitter,EElistenerCount=function(emitter,type){return emitter.listeners(type).length};!function(){try{Stream=require("stream")}catch(_){}finally{Stream||(Stream=require("events").EventEmitter)}}();var Buffer=require("buffer").Buffer,bufferShim=require("buffer-shims"),util=require("core-util-is");util.inherits=require("inherits");var debugUtil=require("util"),debug=void 0;debug=debugUtil&&debugUtil.debuglog?debugUtil.debuglog("stream"):function(){};var StringDecoder;util.inherits(Readable,Stream);var Duplex,Duplex,hasPrependListener="function"==typeof EE.prototype.prependListener;Readable.prototype.push=function(chunk,encoding){var state=this._readableState;return state.objectMode||"string"!=typeof chunk||(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=bufferShim.from(chunk,encoding),encoding="")),readableAddChunk(this,state,chunk,encoding,!1)},Readable.prototype.unshift=function(chunk){var state=this._readableState;return readableAddChunk(this,state,chunk,"",!0)},Readable.prototype.isPaused=function(){return this._readableState.flowing===!1},Readable.prototype.setEncoding=function(enc){return StringDecoder||(StringDecoder=require("string_decoder/").StringDecoder),this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc,this};var MAX_HWM=8388608;Readable.prototype.read=function(n){debug("read",n);var state=this._readableState,nOrig=n;if(("number"!=typeof n||n>0)&&(state.emittedReadable=!1),0===n&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended),0===state.length&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),0===n&&state.ended)return 0===state.length&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(0===state.length||state.length-n0?fromList(n,state):null,null===ret&&(state.needReadable=!0,n=0),state.length-=n,0!==state.length||state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&0===state.length&&endReadable(this),null!==ret&&this.emit("data",ret),ret},Readable.prototype._read=function(n){this.emit("error",new Error("not implemented"))},Readable.prototype.pipe=function(dest,pipeOpts){function onunpipe(readable){debug("onunpipe"),readable===src&&cleanup()}function onend(){debug("onend"),dest.end()}function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",cleanup),src.removeListener("data",ondata),cleanedUp=!0,!state.awaitDrain||dest._writableState&&!dest._writableState.needDrain||ondrain()}function ondata(chunk){debug("ondata");var ret=dest.write(chunk);!1===ret&&((1===state.pipesCount&&state.pipes===dest||state.pipesCount>1&&-1!==indexOf(state.pipes,dest))&&!cleanedUp&&(debug("false write response, pause",src._readableState.awaitDrain),src._readableState.awaitDrain++),src.pause())}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),0===EElistenerCount(dest,"error")&&dest.emit("error",er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}function unpipe(){debug("unpipe"),src.unpipe(dest)}var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest)}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:cleanup;state.endEmitted?processNextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=!1;return src.on("data",ondata),prependListener(dest,"error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState;if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var _i=0;len>_i;_i++)dests[_i].emit("unpipe",this);return this}var i=indexOf(state.pipes,dest);return-1===i?this:(state.pipes.splice(i,1),state.pipesCount-=1,1===state.pipesCount&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this),this)},Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if("data"===ev&&!1!==this._readableState.flowing&&this.resume(),"readable"===ev&&!this._readableState.endEmitted){ +var state=this._readableState;state.readableListening||(state.readableListening=!0,state.emittedReadable=!1,state.needReadable=!0,state.reading?state.length&&emitReadable(this,state):processNextTick(nReadingNextTick,this))}return res},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!0,resume(this,state)),this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Readable.prototype.wrap=function(stream){var state=this._readableState,paused=!1,self=this;stream.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&self.push(chunk)}self.push(null)}),stream.on("data",function(chunk){if(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),(!state.objectMode||null!==chunk&&void 0!==chunk)&&(state.objectMode||chunk&&chunk.length)){var ret=self.push(chunk);ret||(paused=!0,stream.pause())}});for(var i in stream)void 0===this[i]&&"function"==typeof stream[i]&&(this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i));var events=["error","close","destroy","pause","resume"];return forEach(events,function(ev){stream.on(ev,self.emit.bind(self,ev))}),self._read=function(n){debug("wrapped _read",n),paused&&(paused=!1,stream.resume())},self},Readable._fromList=fromList}).call(this,require("_process"))},{"./_stream_duplex":85,_process:83,buffer:75,"buffer-shims":90,"core-util-is":91,events:79,inherits:80,isarray:92,"process-nextick-args":93,"string_decoder/":100,util:74}],88:[function(require,module,exports){"use strict";function TransformState(stream){this.afterTransform=function(er,data){return afterTransform(stream,er,data)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function afterTransform(stream,er,data){var ts=stream._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return stream.emit("error",new Error("no writecb in Transform class"));ts.writechunk=null,ts.writecb=null,null!==data&&void 0!==data&&stream.push(data),cb(er);var rs=stream._readableState;rs.reading=!1,(rs.needReadable||rs.length-1?setImmediate:processNextTick;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var Stream,internalUtil={deprecate:require("util-deprecate")};!function(){try{Stream=require("stream")}catch(_){}finally{Stream||(Stream=require("events").EventEmitter)}}();var Buffer=require("buffer").Buffer,bufferShim=require("buffer-shims");util.inherits(Writable,Stream);var Duplex;WritableState.prototype.getBuffer=function(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(_){}}();var Duplex;Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1;return"function"==typeof encoding&&(cb=encoding,encoding=null),Buffer.isBuffer(chunk)?encoding="buffer":encoding||(encoding=state.defaultEncoding),"function"!=typeof cb&&(cb=nop),state.ended?writeAfterEnd(this,cb):validChunk(this,state,chunk,cb)&&(state.pendingcb++,ret=writeOrBuffer(this,state,chunk,encoding,cb)),ret},Writable.prototype.cork=function(){var state=this._writableState;state.corked++},Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,state.writing||state.corked||state.finished||state.bufferProcessing||!state.bufferedRequest||clearBuffer(this,state))},Writable.prototype.setDefaultEncoding=function(encoding){if("string"==typeof encoding&&(encoding=encoding.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);return this._writableState.defaultEncoding=encoding,this},Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;"function"==typeof chunk?(cb=chunk,chunk=null,encoding=null):"function"==typeof encoding&&(cb=encoding,encoding=null),null!==chunk&&void 0!==chunk&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||state.finished||endWritable(this,state,cb)}}).call(this,require("_process"))},{"./_stream_duplex":85,_process:83,buffer:75,"buffer-shims":90,"core-util-is":91,events:79,inherits:80,"process-nextick-args":93,"util-deprecate":94}],90:[function(require,module,exports){(function(global){"use strict";var buffer=require("buffer"),Buffer=buffer.Buffer,SlowBuffer=buffer.SlowBuffer,MAX_LEN=buffer.kMaxLength||2147483647;exports.alloc=function(size,fill,encoding){if("function"==typeof Buffer.alloc)return Buffer.alloc(size,fill,encoding);if("number"==typeof encoding)throw new TypeError("encoding must not be number");if("number"!=typeof size)throw new TypeError("size must be a number");if(size>MAX_LEN)throw new RangeError("size is too large");var enc=encoding,_fill=fill;void 0===_fill&&(enc=void 0,_fill=0);var buf=new Buffer(size);if("string"==typeof _fill)for(var fillBuf=new Buffer(_fill,enc),flen=fillBuf.length,i=-1;++iMAX_LEN)throw new RangeError("size is too large");return new Buffer(size)},exports.from=function(value,encodingOrOffset,length){if("function"==typeof Buffer.from&&(!global.Uint8Array||Uint8Array.from!==Buffer.from))return Buffer.from(value,encodingOrOffset,length);if("number"==typeof value)throw new TypeError('"value" argument must not be a number');if("string"==typeof value)return new Buffer(value,encodingOrOffset);if("undefined"!=typeof ArrayBuffer&&value instanceof ArrayBuffer){var offset=encodingOrOffset;if(1===arguments.length)return new Buffer(value);"undefined"==typeof offset&&(offset=0);var len=length;if("undefined"==typeof len&&(len=value.byteLength-offset),offset>=value.byteLength)throw new RangeError("'offset' is out of bounds");if(len>value.byteLength-offset)throw new RangeError("'length' is out of bounds");return new Buffer(value.slice(offset,offset+len))}if(Buffer.isBuffer(value)){var out=new Buffer(value.length);return value.copy(out,0,0,value.length),out}if(value){if(Array.isArray(value)||"undefined"!=typeof ArrayBuffer&&value.buffer instanceof ArrayBuffer||"length"in value)return new Buffer(value);if("Buffer"===value.type&&Array.isArray(value.data))return new Buffer(value.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},exports.allocUnsafeSlow=function(size){if("function"==typeof Buffer.allocUnsafeSlow)return Buffer.allocUnsafeSlow(size);if("number"!=typeof size)throw new TypeError("size must be a number");if(size>=MAX_LEN)throw new RangeError("size is too large");return new SlowBuffer(size)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:75}],91:[function(require,module,exports){(function(Buffer){function isArray(arg){return Array.isArray?Array.isArray(arg):"[object Array]"===objectToString(arg)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNullOrUndefined(arg){return null==arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isSymbol(arg){return"symbol"==typeof arg}function isUndefined(arg){return void 0===arg}function isRegExp(re){return"[object RegExp]"===objectToString(re)}function isObject(arg){return"object"==typeof arg&&null!==arg}function isDate(d){return"[object Date]"===objectToString(d)}function isError(e){return"[object Error]"===objectToString(e)||e instanceof Error}function isFunction(arg){return"function"==typeof arg}function isPrimitive(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||"undefined"==typeof arg}function objectToString(o){return Object.prototype.toString.call(o)}exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=Buffer.isBuffer}).call(this,{isBuffer:require("../../../../insert-module-globals/node_modules/is-buffer/index.js")})},{"../../../../insert-module-globals/node_modules/is-buffer/index.js":81}],92:[function(require,module,exports){arguments[4][78][0].apply(exports,arguments)},{dup:78}],93:[function(require,module,exports){(function(process){"use strict";function nextTick(fn,arg1,arg2,arg3){if("function"!=typeof fn)throw new TypeError('"callback" argument must be a function');var args,i,len=arguments.length;switch(len){case 0:case 1:return process.nextTick(fn);case 2:return process.nextTick(function(){fn.call(null,arg1)});case 3:return process.nextTick(function(){fn.call(null,arg1,arg2)});case 4:return process.nextTick(function(){fn.call(null,arg1,arg2,arg3)});default:for(args=new Array(len-1),i=0;i=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;if(buffer.copy(this.charBuffer,this.charReceived,0,available),this.charReceived+=available,this.charReceived=55296&&56319>=charCode)){if(this.charReceived=this.charLength=0,0===buffer.length)return charStr;break}this.charLength+=this.surrogateSize,charStr=""}this.detectIncompleteChar(buffer);var end=buffer.length;this.charLength&&(buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end),end-=this.charReceived),charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1,charCode=charStr.charCodeAt(end);if(charCode>=55296&&56319>=charCode){var size=this.surrogateSize;return this.charLength+=size,this.charReceived+=size,this.charBuffer.copy(this.charBuffer,size,0,size),buffer.copy(this.charBuffer,0,0,size),charStr.substring(0,end)}return charStr},StringDecoder.prototype.detectIncompleteChar=function(buffer){for(var i=buffer.length>=3?3:buffer.length;i>0;i--){var c=buffer[buffer.length-i];if(1==i&&c>>5==6){this.charLength=2;break}if(2>=i&&c>>4==14){this.charLength=3;break}if(3>=i&&c>>3==30){this.charLength=4;break}}this.charReceived=i},StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length&&(res=this.write(buffer)),this.charReceived){var cr=this.charReceived,buf=this.charBuffer,enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res}},{buffer:75}],101:[function(require,module,exports){module.exports=function(arg){return arg&&"object"==typeof arg&&"function"==typeof arg.copy&&"function"==typeof arg.fill&&"function"==typeof arg.readUInt8}},{}],102:[function(require,module,exports){(function(process,global){function inspect(obj,opts){var ctx={seen:[],stylize:stylizeNoColor};return arguments.length>=3&&(ctx.depth=arguments[2]),arguments.length>=4&&(ctx.colors=arguments[3]),isBoolean(opts)?ctx.showHidden=opts:opts&&exports._extend(ctx,opts),isUndefined(ctx.showHidden)&&(ctx.showHidden=!1),isUndefined(ctx.depth)&&(ctx.depth=2),isUndefined(ctx.colors)&&(ctx.colors=!1),isUndefined(ctx.customInspect)&&(ctx.customInspect=!0),ctx.colors&&(ctx.stylize=stylizeWithColor),formatValue(ctx,obj,ctx.depth)}function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];return style?"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m":str}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};return array.forEach(function(val,idx){hash[val]=!0}),hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&(!value.constructor||value.constructor.prototype!==value)){var ret=value.inspect(recurseTimes,ctx);return isString(ret)||(ret=formatValue(ctx,ret,recurseTimes)),ret}var primitive=formatPrimitive(ctx,value);if(primitive)return primitive;var keys=Object.keys(value),visibleKeys=arrayToHash(keys);if(ctx.showHidden&&(keys=Object.getOwnPropertyNames(value)),isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0))return formatError(value);if(0===keys.length){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value))return ctx.stylize(RegExp.prototype.toString.call(value),"regexp");if(isDate(value))return ctx.stylize(Date.prototype.toString.call(value),"date");if(isError(value))return formatError(value)}var base="",array=!1,braces=["{","}"];if(isArray(value)&&(array=!0,braces=["[","]"]),isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)&&(base=" "+RegExp.prototype.toString.call(value)),isDate(value)&&(base=" "+Date.prototype.toUTCString.call(value)),isError(value)&&(base=" "+formatError(value)),0===keys.length&&(!array||0==value.length))return braces[0]+base+braces[1];if(0>recurseTimes)return isRegExp(value)?ctx.stylize(RegExp.prototype.toString.call(value),"regexp"):ctx.stylize("[Object]","special");ctx.seen.push(value);var output;return output=array?formatArray(ctx,value,recurseTimes,visibleKeys,keys):keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)}),ctx.seen.pop(),reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}return isNumber(value)?ctx.stylize(""+value,"number"):isBoolean(value)?ctx.stylize(""+value,"boolean"):isNull(value)?ctx.stylize("null","null"):void 0}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){for(var output=[],i=0,l=value.length;l>i;++i)hasOwnProperty(value,String(i))?output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,String(i),!0)):output.push("");return keys.forEach(function(key){key.match(/^\d+$/)||output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,key,!0))}),output}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,desc;if(desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]},desc.get?str=desc.set?ctx.stylize("[Getter/Setter]","special"):ctx.stylize("[Getter]","special"):desc.set&&(str=ctx.stylize("[Setter]","special")),hasOwnProperty(visibleKeys,key)||(name="["+key+"]"),str||(ctx.seen.indexOf(desc.value)<0?(str=isNull(recurseTimes)?formatValue(ctx,desc.value,null):formatValue(ctx,desc.value,recurseTimes-1),str.indexOf("\n")>-1&&(str=array?str.split("\n").map(function(line){return" "+line}).join("\n").substr(2):"\n"+str.split("\n").map(function(line){return" "+line}).join("\n"))):str=ctx.stylize("[Circular]","special")),isUndefined(name)){if(array&&key.match(/^\d+$/))return str;name=JSON.stringify(""+key),name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(name=name.substr(1,name.length-2),name=ctx.stylize(name,"name")):(name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),name=ctx.stylize(name,"string"))}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0,length=output.reduce(function(prev,cur){return numLinesEst++,cur.indexOf("\n")>=0&&numLinesEst++,prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);return length>60?braces[0]+(""===base?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]:braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNullOrUndefined(arg){return null==arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isSymbol(arg){return"symbol"==typeof arg}function isUndefined(arg){return void 0===arg}function isRegExp(re){return isObject(re)&&"[object RegExp]"===objectToString(re)}function isObject(arg){return"object"==typeof arg&&null!==arg}function isDate(d){return isObject(d)&&"[object Date]"===objectToString(d)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(arg){return"function"==typeof arg}function isPrimitive(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||"undefined"==typeof arg}function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return 10>n?"0"+n.toString(10):n.toString(10)}function timestamp(){var d=new Date,time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){for(var objects=[],i=0;i=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}}),x=args[i];len>i;x=args[++i])str+=isNull(x)||!isObject(x)?" "+x:" "+inspect(x);return str},exports.deprecate=function(fn,msg){function deprecated(){if(!warned){if(process.throwDeprecation)throw new Error(msg);process.traceDeprecation?console.trace(msg):console.error(msg),warned=!0}return fn.apply(this,arguments)}if(isUndefined(global.process))return function(){return exports.deprecate(fn,msg).apply(this,arguments)};if(process.noDeprecation===!0)return fn;var warned=!1;return deprecated};var debugEnviron,debugs={};exports.debuglog=function(set){if(isUndefined(debugEnviron)&&(debugEnviron=process.env.NODE_DEBUG||""),set=set.toUpperCase(),!debugs[set])if(new RegExp("\\b"+set+"\\b","i").test(debugEnviron)){ +var pid=process.pid;debugs[set]=function(){var msg=exports.format.apply(exports,arguments);console.error("%s %d: %s",set,pid,msg)}}else debugs[set]=function(){};return debugs[set]},exports.inspect=inspect,inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=require("./support/isBuffer");var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))},exports.inherits=require("inherits"),exports._extend=function(origin,add){if(!add||!isObject(add))return origin;for(var keys=Object.keys(add),i=keys.length;i--;)origin[keys[i]]=add[keys[i]];return origin}}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":101,_process:83,inherits:80}],103:[function(require,module,exports){"use strict";var _keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";exports.encode=function(input,utf8){for(var chr1,chr2,chr3,enc1,enc2,enc3,enc4,output="",i=0;i>2,enc2=(3&chr1)<<4|chr2>>4,enc3=(15&chr2)<<2|chr3>>6,enc4=63&chr3,isNaN(chr2)?enc3=enc4=64:isNaN(chr3)&&(enc4=64),output=output+_keyStr.charAt(enc1)+_keyStr.charAt(enc2)+_keyStr.charAt(enc3)+_keyStr.charAt(enc4);return output},exports.decode=function(input,utf8){var chr1,chr2,chr3,enc1,enc2,enc3,enc4,output="",i=0;for(input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");i>4,chr2=(15&enc2)<<4|enc3>>2,chr3=(3&enc3)<<6|enc4,output+=String.fromCharCode(chr1),64!=enc3&&(output+=String.fromCharCode(chr2)),64!=enc4&&(output+=String.fromCharCode(chr3));return output}},{}],104:[function(require,module,exports){"use strict";function CompressedObject(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}CompressedObject.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},module.exports=CompressedObject},{}],105:[function(require,module,exports){"use strict";exports.STORE={magic:"\x00\x00",compress:function(content,compressionOptions){return content},uncompress:function(content){return content},compressInputType:null,uncompressInputType:null},exports.DEFLATE=require("./flate")},{"./flate":110}],106:[function(require,module,exports){"use strict";var utils=require("./utils"),table=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];module.exports=function(input,crc){if("undefined"==typeof input||!input.length)return 0;var isArray="string"!==utils.getTypeOf(input);"undefined"==typeof crc&&(crc=0);var x=0,y=0,b=0;crc=-1^crc;for(var i=0,iTop=input.length;iTop>i;i++)b=isArray?input[i]:input.charCodeAt(i),y=255&(crc^b),x=table[y],crc=crc>>>8^x;return-1^crc}},{"./utils":123}],107:[function(require,module,exports){"use strict";function DataReader(data){this.data=null,this.length=0,this.index=0}var utils=require("./utils");DataReader.prototype={checkOffset:function(offset){this.checkIndex(this.index+offset)},checkIndex:function(newIndex){if(this.lengthnewIndex)throw new Error("End of data reached (data length = "+this.length+", asked index = "+newIndex+"). Corrupted zip ?")},setIndex:function(newIndex){this.checkIndex(newIndex),this.index=newIndex},skip:function(n){this.setIndex(this.index+n)},byteAt:function(i){},readInt:function(size){var i,result=0;for(this.checkOffset(size),i=this.index+size-1;i>=this.index;i--)result=(result<<8)+this.byteAt(i);return this.index+=size,result},readString:function(size){return utils.transformTo("string",this.readData(size))},readData:function(size){},lastIndexOfSignature:function(sig){},readDate:function(){var dostime=this.readInt(4);return new Date((dostime>>25&127)+1980,(dostime>>21&15)-1,dostime>>16&31,dostime>>11&31,dostime>>5&63,(31&dostime)<<1)}},module.exports=DataReader},{"./utils":123}],108:[function(require,module,exports){"use strict";exports.base64=!1,exports.binary=!1,exports.dir=!1,exports.createFolders=!1,exports.date=null,exports.compression=null,exports.compressionOptions=null,exports.comment=null,exports.unixPermissions=null,exports.dosPermissions=null},{}],109:[function(require,module,exports){"use strict";var utils=require("./utils");exports.string2binary=function(str){return utils.string2binary(str)},exports.string2Uint8Array=function(str){return utils.transformTo("uint8array",str)},exports.uint8Array2String=function(array){return utils.transformTo("string",array)},exports.string2Blob=function(str){var buffer=utils.transformTo("arraybuffer",str);return utils.arrayBuffer2Blob(buffer)},exports.arrayBuffer2Blob=function(buffer){return utils.arrayBuffer2Blob(buffer)},exports.transformTo=function(outputType,input){return utils.transformTo(outputType,input)},exports.getTypeOf=function(input){return utils.getTypeOf(input)},exports.checkSupport=function(type){return utils.checkSupport(type)},exports.MAX_VALUE_16BITS=utils.MAX_VALUE_16BITS,exports.MAX_VALUE_32BITS=utils.MAX_VALUE_32BITS,exports.pretty=function(str){return utils.pretty(str)},exports.findCompression=function(compressionMethod){return utils.findCompression(compressionMethod)},exports.isRegExp=function(object){return utils.isRegExp(object)}},{"./utils":123}],110:[function(require,module,exports){"use strict";var USE_TYPEDARRAY="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,pako=require("pako");exports.uncompressInputType=USE_TYPEDARRAY?"uint8array":"array",exports.compressInputType=USE_TYPEDARRAY?"uint8array":"array",exports.magic="\b\x00",exports.compress=function(input,compressionOptions){return pako.deflateRaw(input,{level:compressionOptions.level||-1})},exports.uncompress=function(input){return pako.inflateRaw(input)}},{pako:126}],111:[function(require,module,exports){"use strict";function JSZip(data,options){return this instanceof JSZip?(this.files={},this.comment=null,this.root="",data&&this.load(data,options),void(this.clone=function(){var newObj=new JSZip;for(var i in this)"function"!=typeof this[i]&&(newObj[i]=this[i]);return newObj})):new JSZip(data,options)}var base64=require("./base64");JSZip.prototype=require("./object"),JSZip.prototype.load=require("./load"),JSZip.support=require("./support"),JSZip.defaults=require("./defaults"),JSZip.utils=require("./deprecatedPublicUtils"),JSZip.base64={encode:function(input){return base64.encode(input)},decode:function(input){return base64.decode(input)}},JSZip.compressions=require("./compressions"),module.exports=JSZip},{"./base64":103,"./compressions":105,"./defaults":108,"./deprecatedPublicUtils":109,"./load":112,"./object":115,"./support":119}],112:[function(require,module,exports){"use strict";var base64=require("./base64"),ZipEntries=require("./zipEntries");module.exports=function(data,options){var files,zipEntries,i,input;for(options=options||{},options.base64&&(data=base64.decode(data)),zipEntries=new ZipEntries(data,options),files=zipEntries.files,i=0;ii;i++)hex+=String.fromCharCode(255&dec),dec>>>=8;return hex},extend=function(){var i,attr,result={};for(i=0;i0?path.substring(0,lastSlash):""},forceTrailingSlash=function(path){return"/"!=path.slice(-1)&&(path+="/"),path},folderAdd=function(name,createFolders){return createFolders="undefined"!=typeof createFolders?createFolders:!1,name=forceTrailingSlash(name),this.files[name]||fileAdd.call(this,name,null,{dir:!0,createFolders:createFolders}),this.files[name]},generateCompressedObjectFrom=function(file,compression,compressionOptions){var content,result=new CompressedObject;return file._data instanceof CompressedObject?(result.uncompressedSize=file._data.uncompressedSize,result.crc32=file._data.crc32,0===result.uncompressedSize||file.dir?(compression=compressions.STORE,result.compressedContent="",result.crc32=0):file._data.compressionMethod===compression.magic?result.compressedContent=file._data.getCompressedContent():(content=file._data.getContent(),result.compressedContent=compression.compress(utils.transformTo(compression.compressInputType,content),compressionOptions))):(content=getBinaryData(file),(!content||0===content.length||file.dir)&&(compression=compressions.STORE,content=""),result.uncompressedSize=content.length,result.crc32=crc32(content),result.compressedContent=compression.compress(utils.transformTo(compression.compressInputType,content),compressionOptions)),result.compressedSize=result.compressedContent.length,result.compressionMethod=compression.magic,result},generateUnixExternalFileAttr=function(unixPermissions,isDir){var result=unixPermissions;return unixPermissions||(result=isDir?16893:33204),(65535&result)<<16},generateDosExternalFileAttr=function(dosPermissions,isDir){return 63&(dosPermissions||0)},generateZipParts=function(name,file,compressedObject,offset,platform){var dosTime,dosDate,dir,date,utfEncodedFileName=(compressedObject.compressedContent,utils.transformTo("string",utf8.utf8encode(file.name))),comment=file.comment||"",utfEncodedComment=utils.transformTo("string",utf8.utf8encode(comment)),useUTF8ForFileName=utfEncodedFileName.length!==file.name.length,useUTF8ForComment=utfEncodedComment.length!==comment.length,o=file.options,extraFields="",unicodePathExtraField="",unicodeCommentExtraField="";dir=file._initialMetadata.dir!==file.dir?file.dir:o.dir,date=file._initialMetadata.date!==file.date?file.date:o.date;var extFileAttr=0,versionMadeBy=0;dir&&(extFileAttr|=16),"UNIX"===platform?(versionMadeBy=798,extFileAttr|=generateUnixExternalFileAttr(file.unixPermissions,dir)):(versionMadeBy=20,extFileAttr|=generateDosExternalFileAttr(file.dosPermissions,dir)),dosTime=date.getHours(),dosTime<<=6,dosTime|=date.getMinutes(),dosTime<<=5,dosTime|=date.getSeconds()/2,dosDate=date.getFullYear()-1980,dosDate<<=4,dosDate|=date.getMonth()+1,dosDate<<=5,dosDate|=date.getDate(),useUTF8ForFileName&&(unicodePathExtraField=decToHex(1,1)+decToHex(crc32(utfEncodedFileName),4)+utfEncodedFileName,extraFields+="up"+decToHex(unicodePathExtraField.length,2)+unicodePathExtraField),useUTF8ForComment&&(unicodeCommentExtraField=decToHex(1,1)+decToHex(this.crc32(utfEncodedComment),4)+utfEncodedComment,extraFields+="uc"+decToHex(unicodeCommentExtraField.length,2)+unicodeCommentExtraField);var header="";header+="\n\x00",header+=useUTF8ForFileName||useUTF8ForComment?"\x00\b":"\x00\x00",header+=compressedObject.compressionMethod,header+=decToHex(dosTime,2),header+=decToHex(dosDate,2),header+=decToHex(compressedObject.crc32,4),header+=decToHex(compressedObject.compressedSize,4),header+=decToHex(compressedObject.uncompressedSize,4),header+=decToHex(utfEncodedFileName.length,2),header+=decToHex(extraFields.length,2);var fileRecord=signature.LOCAL_FILE_HEADER+header+utfEncodedFileName+extraFields,dirRecord=signature.CENTRAL_FILE_HEADER+decToHex(versionMadeBy,2)+header+decToHex(utfEncodedComment.length,2)+"\x00\x00\x00\x00"+decToHex(extFileAttr,4)+decToHex(offset,4)+utfEncodedFileName+extraFields+utfEncodedComment;return{fileRecord:fileRecord,dirRecord:dirRecord,compressedObject:compressedObject}},out={load:function(stream,options){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(search){var filename,relativePath,file,fileClone,result=[];for(filename in this.files)this.files.hasOwnProperty(filename)&&(file=this.files[filename],fileClone=new ZipObject(file.name,file._data,extend(file.options)),relativePath=filename.slice(this.root.length,filename.length),filename.slice(0,this.root.length)===this.root&&search(relativePath,fileClone)&&result.push(fileClone));return result},file:function(name,data,o){if(1===arguments.length){if(utils.isRegExp(name)){var regexp=name;return this.filter(function(relativePath,file){return!file.dir&®exp.test(relativePath)})}return this.filter(function(relativePath,file){return!file.dir&&relativePath===name})[0]||null}return name=this.root+name,fileAdd.call(this,name,data,o),this},folder:function(arg){if(!arg)return this;if(utils.isRegExp(arg))return this.filter(function(relativePath,file){return file.dir&&arg.test(relativePath)});var name=this.root+arg,newFolder=folderAdd.call(this,name),ret=this.clone();return ret.root=newFolder.name,ret},remove:function(name){name=this.root+name;var file=this.files[name];if(file||("/"!=name.slice(-1)&&(name+="/"),file=this.files[name]),file&&!file.dir)delete this.files[name];else for(var kids=this.filter(function(relativePath,file){return file.name.slice(0,name.length)===name}),i=0;i=0;--i)if(this.data[i]===sig0&&this.data[i+1]===sig1&&this.data[i+2]===sig2&&this.data[i+3]===sig3)return i;return-1},Uint8ArrayReader.prototype.readData=function(size){if(this.checkOffset(size),0===size)return new Uint8Array(0);var result=this.data.subarray(this.index,this.index+size);return this.index+=size,result},module.exports=Uint8ArrayReader},{"./dataReader":107}],121:[function(require,module,exports){"use strict";var utils=require("./utils"),Uint8ArrayWriter=function(length){this.data=new Uint8Array(length),this.index=0};Uint8ArrayWriter.prototype={append:function(input){0!==input.length&&(input=utils.transformTo("uint8array",input),this.data.set(input,this.index),this.index+=input.length)},finalize:function(){return this.data}},module.exports=Uint8ArrayWriter},{"./utils":123}],122:[function(require,module,exports){"use strict";for(var utils=require("./utils"),support=require("./support"),nodeBuffer=require("./nodeBuffer"),_utf8len=new Array(256),i=0;256>i;i++)_utf8len[i]=i>=252?6:i>=248?5:i>=240?4:i>=224?3:i>=192?2:1;_utf8len[254]=_utf8len[254]=1;var string2buf=function(str){var buf,c,c2,m_pos,i,str_len=str.length,buf_len=0;for(m_pos=0;str_len>m_pos;m_pos++)c=str.charCodeAt(m_pos),55296===(64512&c)&&str_len>m_pos+1&&(c2=str.charCodeAt(m_pos+1),56320===(64512&c2)&&(c=65536+(c-55296<<10)+(c2-56320),m_pos++)),buf_len+=128>c?1:2048>c?2:65536>c?3:4;for(buf=support.uint8array?new Uint8Array(buf_len):new Array(buf_len),i=0,m_pos=0;buf_len>i;m_pos++)c=str.charCodeAt(m_pos),55296===(64512&c)&&str_len>m_pos+1&&(c2=str.charCodeAt(m_pos+1),56320===(64512&c2)&&(c=65536+(c-55296<<10)+(c2-56320),m_pos++)),128>c?buf[i++]=c:2048>c?(buf[i++]=192|c>>>6,buf[i++]=128|63&c):65536>c?(buf[i++]=224|c>>>12,buf[i++]=128|c>>>6&63,buf[i++]=128|63&c):(buf[i++]=240|c>>>18,buf[i++]=128|c>>>12&63,buf[i++]=128|c>>>6&63,buf[i++]=128|63&c);return buf},utf8border=function(buf,max){var pos;for(max=max||buf.length,max>buf.length&&(max=buf.length),pos=max-1;pos>=0&&128===(192&buf[pos]);)pos--;return 0>pos?max:0===pos?max:pos+_utf8len[buf[pos]]>max?pos:max},buf2string=function(buf){var i,out,c,c_len,len=buf.length,utf16buf=new Array(2*len);for(out=0,i=0;len>i;)if(c=buf[i++],128>c)utf16buf[out++]=c;else if(c_len=_utf8len[c],c_len>4)utf16buf[out++]=65533,i+=c_len-1;else{for(c&=2===c_len?31:3===c_len?15:7;c_len>1&&len>i;)c=c<<6|63&buf[i++],c_len--;c_len>1?utf16buf[out++]=65533:65536>c?utf16buf[out++]=c:(c-=65536,utf16buf[out++]=55296|c>>10&1023,utf16buf[out++]=56320|1023&c)}return utf16buf.length!==out&&(utf16buf.subarray?utf16buf=utf16buf.subarray(0,out):utf16buf.length=out),utils.applyFromCharCode(utf16buf)};exports.utf8encode=function(str){return support.nodebuffer?nodeBuffer(str,"utf-8"):string2buf(str)},exports.utf8decode=function(buf){if(support.nodebuffer)return utils.transformTo("nodebuffer",buf).toString("utf-8");buf=utils.transformTo(support.uint8array?"uint8array":"array",buf);for(var result=[],k=0,len=buf.length,chunk=65536;len>k;){var nextBoundary=utf8border(buf,Math.min(k+chunk,len));support.uint8array?result.push(buf2string(buf.subarray(k,nextBoundary))):result.push(buf2string(buf.slice(k,nextBoundary))),k=nextBoundary}return result.join("")}},{"./nodeBuffer":113,"./support":119,"./utils":123}],123:[function(require,module,exports){"use strict";function identity(input){return input}function stringToArrayLike(str,array){for(var i=0;ik&&chunk>1;)try{"array"===type||"nodebuffer"===type?result.push(String.fromCharCode.apply(null,array.slice(k,Math.min(k+chunk,len)))):result.push(String.fromCharCode.apply(null,array.subarray(k,Math.min(k+chunk,len)))),k+=chunk}catch(e){chunk=Math.floor(chunk/2)}return result.join("")}function arrayLikeToArrayLike(arrayFrom,arrayTo){for(var i=0;icode?"0":"")+code.toString(16).toUpperCase();return res},exports.findCompression=function(compressionMethod){for(var method in compressions)if(compressions.hasOwnProperty(method)&&compressions[method].magic===compressionMethod)return compressions[method];return null},exports.isRegExp=function(object){return"[object RegExp]"===Object.prototype.toString.call(object)}},{"./compressions":105,"./nodeBuffer":113,"./support":119}],124:[function(require,module,exports){"use strict";function ZipEntries(data,loadOptions){this.files=[],this.loadOptions=loadOptions,data&&this.load(data)}var StringReader=require("./stringReader"),NodeBufferReader=require("./nodeBufferReader"),Uint8ArrayReader=require("./uint8ArrayReader"),utils=require("./utils"),sig=require("./signature"),ZipEntry=require("./zipEntry"),support=require("./support"),jszipProto=require("./object");ZipEntries.prototype={checkSignature:function(expectedSignature){var signature=this.reader.readString(4);if(signature!==expectedSignature)throw new Error("Corrupted zip or bug : unexpected signature ("+utils.pretty(signature)+", expected "+utils.pretty(expectedSignature)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength),this.zipComment=jszipProto.utf8decode(this.zipComment)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var extraFieldId,extraFieldLength,extraFieldValue,extraDataSize=this.zip64EndOfCentralSize-44,index=0;extraDataSize>index;)extraFieldId=this.reader.readInt(2),extraFieldLength=this.reader.readInt(4),extraFieldValue=this.reader.readString(extraFieldLength),this.zip64ExtensibleData[extraFieldId]={id:extraFieldId,length:extraFieldLength,value:extraFieldValue}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var i,file;for(i=0;i>8;this.dir=16&this.externalFileAttributes?!0:!1,madeBy===MADE_BY_DOS&&(this.dosPermissions=63&this.externalFileAttributes),madeBy===MADE_BY_UNIX&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileName.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(reader){if(this.extraFields[1]){var extraReader=new StringReader(this.extraFields[1].value);this.uncompressedSize===utils.MAX_VALUE_32BITS&&(this.uncompressedSize=extraReader.readInt(8)),this.compressedSize===utils.MAX_VALUE_32BITS&&(this.compressedSize=extraReader.readInt(8)),this.localHeaderOffset===utils.MAX_VALUE_32BITS&&(this.localHeaderOffset=extraReader.readInt(8)),this.diskNumberStart===utils.MAX_VALUE_32BITS&&(this.diskNumberStart=extraReader.readInt(4))}},readExtraFields:function(reader){var extraFieldId,extraFieldLength,extraFieldValue,start=reader.index;for(this.extraFields=this.extraFields||{};reader.index0?opt.windowBits=-opt.windowBits:opt.gzip&&opt.windowBits>0&&opt.windowBits<16&&(opt.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;var status=zlib_deflate.deflateInit2(this.strm,opt.level,opt.method,opt.windowBits,opt.memLevel,opt.strategy);if(status!==Z_OK)throw new Error(msg[status]);opt.header&&zlib_deflate.deflateSetHeader(this.strm,opt.header)};Deflate.prototype.push=function(data,mode){var status,_mode,strm=this.strm,chunkSize=this.options.chunkSize;if(this.ended)return!1;_mode=mode===~~mode?mode:mode===!0?Z_FINISH:Z_NO_FLUSH,"string"==typeof data?strm.input=strings.string2buf(data):"[object ArrayBuffer]"===toString.call(data)?strm.input=new Uint8Array(data):strm.input=data,strm.next_in=0,strm.avail_in=strm.input.length;do{if(0===strm.avail_out&&(strm.output=new utils.Buf8(chunkSize),strm.next_out=0,strm.avail_out=chunkSize),status=zlib_deflate.deflate(strm,_mode),status!==Z_STREAM_END&&status!==Z_OK)return this.onEnd(status),this.ended=!0,!1;(0===strm.avail_out||0===strm.avail_in&&(_mode===Z_FINISH||_mode===Z_SYNC_FLUSH))&&("string"===this.options.to?this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output,strm.next_out))):this.onData(utils.shrinkBuf(strm.output,strm.next_out)))}while((strm.avail_in>0||0===strm.avail_out)&&status!==Z_STREAM_END);return _mode===Z_FINISH?(status=zlib_deflate.deflateEnd(this.strm),this.onEnd(status),this.ended=!0,status===Z_OK):_mode===Z_SYNC_FLUSH?(this.onEnd(Z_OK),strm.avail_out=0,!0):!0},Deflate.prototype.onData=function(chunk){this.chunks.push(chunk)},Deflate.prototype.onEnd=function(status){status===Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=utils.flattenChunks(this.chunks)),this.chunks=[],this.err=status,this.msg=this.strm.msg},exports.Deflate=Deflate,exports.deflate=deflate,exports.deflateRaw=deflateRaw,exports.gzip=gzip},{"./utils/common":129,"./utils/strings":130,"./zlib/deflate.js":134,"./zlib/messages":139,"./zlib/zstream":141}],128:[function(require,module,exports){"use strict";function inflate(input,options){var inflator=new Inflate(options);if(inflator.push(input,!0),inflator.err)throw inflator.msg;return inflator.result}function inflateRaw(input,options){return options=options||{},options.raw=!0,inflate(input,options)}var zlib_inflate=require("./zlib/inflate.js"),utils=require("./utils/common"),strings=require("./utils/strings"),c=require("./zlib/constants"),msg=require("./zlib/messages"),zstream=require("./zlib/zstream"),gzheader=require("./zlib/gzheader"),toString=Object.prototype.toString,Inflate=function(options){this.options=utils.assign({chunkSize:16384,windowBits:0,to:""},options||{});var opt=this.options;opt.raw&&opt.windowBits>=0&&opt.windowBits<16&&(opt.windowBits=-opt.windowBits,0===opt.windowBits&&(opt.windowBits=-15)),!(opt.windowBits>=0&&opt.windowBits<16)||options&&options.windowBits||(opt.windowBits+=32),opt.windowBits>15&&opt.windowBits<48&&0===(15&opt.windowBits)&&(opt.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;var status=zlib_inflate.inflateInit2(this.strm,opt.windowBits);if(status!==c.Z_OK)throw new Error(msg[status]);this.header=new gzheader,zlib_inflate.inflateGetHeader(this.strm,this.header)};Inflate.prototype.push=function(data,mode){var status,_mode,next_out_utf8,tail,utf8str,strm=this.strm,chunkSize=this.options.chunkSize;if(this.ended)return!1;_mode=mode===~~mode?mode:mode===!0?c.Z_FINISH:c.Z_NO_FLUSH,"string"==typeof data?strm.input=strings.binstring2buf(data):"[object ArrayBuffer]"===toString.call(data)?strm.input=new Uint8Array(data):strm.input=data,strm.next_in=0,strm.avail_in=strm.input.length;do{if(0===strm.avail_out&&(strm.output=new utils.Buf8(chunkSize),strm.next_out=0,strm.avail_out=chunkSize),status=zlib_inflate.inflate(strm,c.Z_NO_FLUSH),status!==c.Z_STREAM_END&&status!==c.Z_OK)return this.onEnd(status),this.ended=!0,!1;strm.next_out&&(0===strm.avail_out||status===c.Z_STREAM_END||0===strm.avail_in&&(_mode===c.Z_FINISH||_mode===c.Z_SYNC_FLUSH))&&("string"===this.options.to?(next_out_utf8=strings.utf8border(strm.output,strm.next_out),tail=strm.next_out-next_out_utf8,utf8str=strings.buf2string(strm.output,next_out_utf8),strm.next_out=tail,strm.avail_out=chunkSize-tail,tail&&utils.arraySet(strm.output,strm.output,next_out_utf8,tail,0),this.onData(utf8str)):this.onData(utils.shrinkBuf(strm.output,strm.next_out)))}while(strm.avail_in>0&&status!==c.Z_STREAM_END);return status===c.Z_STREAM_END&&(_mode=c.Z_FINISH),_mode===c.Z_FINISH?(status=zlib_inflate.inflateEnd(this.strm),this.onEnd(status),this.ended=!0,status===c.Z_OK):_mode===c.Z_SYNC_FLUSH?(this.onEnd(c.Z_OK),strm.avail_out=0,!0):!0},Inflate.prototype.onData=function(chunk){this.chunks.push(chunk)},Inflate.prototype.onEnd=function(status){status===c.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=utils.flattenChunks(this.chunks)),this.chunks=[],this.err=status,this.msg=this.strm.msg},exports.Inflate=Inflate,exports.inflate=inflate,exports.inflateRaw=inflateRaw,exports.ungzip=inflate},{"./utils/common":129,"./utils/strings":130,"./zlib/constants":132,"./zlib/gzheader":135,"./zlib/inflate.js":137,"./zlib/messages":139,"./zlib/zstream":141}],129:[function(require,module,exports){"use strict";var TYPED_OK="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;exports.assign=function(obj){for(var sources=Array.prototype.slice.call(arguments,1);sources.length;){var source=sources.shift();if(source){if("object"!=typeof source)throw new TypeError(source+"must be non-object");for(var p in source)source.hasOwnProperty(p)&&(obj[p]=source[p])}}return obj},exports.shrinkBuf=function(buf,size){return buf.length===size?buf:buf.subarray?buf.subarray(0,size):(buf.length=size,buf)};var fnTyped={arraySet:function(dest,src,src_offs,len,dest_offs){if(src.subarray&&dest.subarray)return void dest.set(src.subarray(src_offs,src_offs+len),dest_offs);for(var i=0;len>i;i++)dest[dest_offs+i]=src[src_offs+i]},flattenChunks:function(chunks){var i,l,len,pos,chunk,result;for(len=0,i=0,l=chunks.length;l>i;i++)len+=chunks[i].length;for(result=new Uint8Array(len),pos=0,i=0,l=chunks.length;l>i;i++)chunk=chunks[i],result.set(chunk,pos),pos+=chunk.length;return result}},fnUntyped={arraySet:function(dest,src,src_offs,len,dest_offs){for(var i=0;len>i;i++)dest[dest_offs+i]=src[src_offs+i]},flattenChunks:function(chunks){return[].concat.apply([],chunks)}};exports.setTyped=function(on){on?(exports.Buf8=Uint8Array,exports.Buf16=Uint16Array,exports.Buf32=Int32Array,exports.assign(exports,fnTyped)):(exports.Buf8=Array,exports.Buf16=Array,exports.Buf32=Array,exports.assign(exports,fnUntyped))},exports.setTyped(TYPED_OK)},{}],130:[function(require,module,exports){"use strict";function buf2binstring(buf,len){if(65537>len&&(buf.subarray&&STR_APPLY_UIA_OK||!buf.subarray&&STR_APPLY_OK))return String.fromCharCode.apply(null,utils.shrinkBuf(buf,len));for(var result="",i=0;len>i;i++)result+=String.fromCharCode(buf[i]);return result}var utils=require("./common"),STR_APPLY_OK=!0,STR_APPLY_UIA_OK=!0;try{String.fromCharCode.apply(null,[0])}catch(__){STR_APPLY_OK=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(__){STR_APPLY_UIA_OK=!1}for(var _utf8len=new utils.Buf8(256),q=0;256>q;q++)_utf8len[q]=q>=252?6:q>=248?5:q>=240?4:q>=224?3:q>=192?2:1;_utf8len[254]=_utf8len[254]=1,exports.string2buf=function(str){var buf,c,c2,m_pos,i,str_len=str.length,buf_len=0;for(m_pos=0;str_len>m_pos;m_pos++)c=str.charCodeAt(m_pos),55296===(64512&c)&&str_len>m_pos+1&&(c2=str.charCodeAt(m_pos+1),56320===(64512&c2)&&(c=65536+(c-55296<<10)+(c2-56320),m_pos++)),buf_len+=128>c?1:2048>c?2:65536>c?3:4;for(buf=new utils.Buf8(buf_len),i=0,m_pos=0;buf_len>i;m_pos++)c=str.charCodeAt(m_pos),55296===(64512&c)&&str_len>m_pos+1&&(c2=str.charCodeAt(m_pos+1),56320===(64512&c2)&&(c=65536+(c-55296<<10)+(c2-56320),m_pos++)),128>c?buf[i++]=c:2048>c?(buf[i++]=192|c>>>6,buf[i++]=128|63&c):65536>c?(buf[i++]=224|c>>>12,buf[i++]=128|c>>>6&63,buf[i++]=128|63&c):(buf[i++]=240|c>>>18,buf[i++]=128|c>>>12&63,buf[i++]=128|c>>>6&63,buf[i++]=128|63&c);return buf},exports.buf2binstring=function(buf){return buf2binstring(buf,buf.length)},exports.binstring2buf=function(str){for(var buf=new utils.Buf8(str.length),i=0,len=buf.length;len>i;i++)buf[i]=str.charCodeAt(i);return buf},exports.buf2string=function(buf,max){var i,out,c,c_len,len=max||buf.length,utf16buf=new Array(2*len);for(out=0,i=0;len>i;)if(c=buf[i++],128>c)utf16buf[out++]=c;else if(c_len=_utf8len[c],c_len>4)utf16buf[out++]=65533,i+=c_len-1;else{for(c&=2===c_len?31:3===c_len?15:7;c_len>1&&len>i;)c=c<<6|63&buf[i++],c_len--;c_len>1?utf16buf[out++]=65533:65536>c?utf16buf[out++]=c:(c-=65536,utf16buf[out++]=55296|c>>10&1023,utf16buf[out++]=56320|1023&c)}return buf2binstring(utf16buf,out)},exports.utf8border=function(buf,max){var pos;for(max=max||buf.length,max>buf.length&&(max=buf.length),pos=max-1;pos>=0&&128===(192&buf[pos]);)pos--;return 0>pos?max:0===pos?max:pos+_utf8len[buf[pos]]>max?pos:max}},{"./common":129}],131:[function(require,module,exports){"use strict";function adler32(adler,buf,len,pos){for(var s1=65535&adler|0,s2=adler>>>16&65535|0,n=0;0!==len;){n=len>2e3?2e3:len,len-=n;do s1=s1+buf[pos++]|0,s2=s2+s1|0;while(--n);s1%=65521,s2%=65521}return s1|s2<<16|0}module.exports=adler32},{}],132:[function(require,module,exports){module.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],133:[function(require,module,exports){"use strict";function makeTable(){for(var c,table=[],n=0;256>n;n++){c=n;for(var k=0;8>k;k++)c=1&c?3988292384^c>>>1:c>>>1;table[n]=c}return table}function crc32(crc,buf,len,pos){var t=crcTable,end=pos+len;crc=-1^crc;for(var i=pos;end>i;i++)crc=crc>>>8^t[255&(crc^buf[i])];return-1^crc}var crcTable=makeTable();module.exports=crc32},{}],134:[function(require,module,exports){"use strict";function err(strm,errorCode){return strm.msg=msg[errorCode],errorCode}function rank(f){return(f<<1)-(f>4?9:0)}function zero(buf){for(var len=buf.length;--len>=0;)buf[len]=0}function flush_pending(strm){var s=strm.state,len=s.pending;len>strm.avail_out&&(len=strm.avail_out),0!==len&&(utils.arraySet(strm.output,s.pending_buf,s.pending_out,len,strm.next_out),strm.next_out+=len,s.pending_out+=len,strm.total_out+=len,strm.avail_out-=len,s.pending-=len,0===s.pending&&(s.pending_out=0))}function flush_block_only(s,last){trees._tr_flush_block(s,s.block_start>=0?s.block_start:-1,s.strstart-s.block_start,last),s.block_start=s.strstart,flush_pending(s.strm)}function put_byte(s,b){s.pending_buf[s.pending++]=b}function putShortMSB(s,b){s.pending_buf[s.pending++]=b>>>8&255,s.pending_buf[s.pending++]=255&b}function read_buf(strm,buf,start,size){var len=strm.avail_in;return len>size&&(len=size),0===len?0:(strm.avail_in-=len,utils.arraySet(buf,strm.input,strm.next_in,len,start),1===strm.state.wrap?strm.adler=adler32(strm.adler,buf,len,start):2===strm.state.wrap&&(strm.adler=crc32(strm.adler,buf,len,start)),strm.next_in+=len,strm.total_in+=len,len)}function longest_match(s,cur_match){var match,len,chain_length=s.max_chain_length,scan=s.strstart,best_len=s.prev_length,nice_match=s.nice_match,limit=s.strstart>s.w_size-MIN_LOOKAHEAD?s.strstart-(s.w_size-MIN_LOOKAHEAD):0,_win=s.window,wmask=s.w_mask,prev=s.prev,strend=s.strstart+MAX_MATCH,scan_end1=_win[scan+best_len-1],scan_end=_win[scan+best_len];s.prev_length>=s.good_match&&(chain_length>>=2),nice_match>s.lookahead&&(nice_match=s.lookahead);do if(match=cur_match,_win[match+best_len]===scan_end&&_win[match+best_len-1]===scan_end1&&_win[match]===_win[scan]&&_win[++match]===_win[scan+1]){scan+=2,match++;do;while(_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&strend>scan);if(len=MAX_MATCH-(strend-scan),scan=strend-MAX_MATCH,len>best_len){if(s.match_start=cur_match,best_len=len,len>=nice_match)break;scan_end1=_win[scan+best_len-1],scan_end=_win[scan+best_len]}}while((cur_match=prev[cur_match&wmask])>limit&&0!==--chain_length);return best_len<=s.lookahead?best_len:s.lookahead}function fill_window(s){var p,n,m,more,str,_w_size=s.w_size;do{if(more=s.window_size-s.lookahead-s.strstart,s.strstart>=_w_size+(_w_size-MIN_LOOKAHEAD)){utils.arraySet(s.window,s.window,_w_size,_w_size,0),s.match_start-=_w_size,s.strstart-=_w_size,s.block_start-=_w_size,n=s.hash_size,p=n;do m=s.head[--p],s.head[p]=m>=_w_size?m-_w_size:0;while(--n);n=_w_size,p=n;do m=s.prev[--p],s.prev[p]=m>=_w_size?m-_w_size:0;while(--n);more+=_w_size}if(0===s.strm.avail_in)break;if(n=read_buf(s.strm,s.window,s.strstart+s.lookahead,more),s.lookahead+=n,s.lookahead+s.insert>=MIN_MATCH)for(str=s.strstart-s.insert,s.ins_h=s.window[str],s.ins_h=(s.ins_h<s.pending_buf_size-5&&(max_block_size=s.pending_buf_size-5);;){if(s.lookahead<=1){if(fill_window(s),0===s.lookahead&&flush===Z_NO_FLUSH)return BS_NEED_MORE;if(0===s.lookahead)break}s.strstart+=s.lookahead,s.lookahead=0;var max_start=s.block_start+max_block_size;if((0===s.strstart||s.strstart>=max_start)&&(s.lookahead=s.strstart-max_start,s.strstart=max_start,flush_block_only(s,!1),0===s.strm.avail_out))return BS_NEED_MORE;if(s.strstart-s.block_start>=s.w_size-MIN_LOOKAHEAD&&(flush_block_only(s,!1),0===s.strm.avail_out))return BS_NEED_MORE}return s.insert=0,flush===Z_FINISH?(flush_block_only(s,!0),0===s.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):s.strstart>s.block_start&&(flush_block_only(s,!1),0===s.strm.avail_out)?BS_NEED_MORE:BS_NEED_MORE}function deflate_fast(s,flush){for(var hash_head,bflush;;){if(s.lookahead=MIN_MATCH&&(s.ins_h=(s.ins_h<=MIN_MATCH)if(bflush=trees._tr_tally(s,s.strstart-s.match_start,s.match_length-MIN_MATCH),s.lookahead-=s.match_length,s.match_length<=s.max_lazy_match&&s.lookahead>=MIN_MATCH){s.match_length--;do s.strstart++,s.ins_h=(s.ins_h<=MIN_MATCH&&(s.ins_h=(s.ins_h<4096)&&(s.match_length=MIN_MATCH-1)),s.prev_length>=MIN_MATCH&&s.match_length<=s.prev_length){max_insert=s.strstart+s.lookahead-MIN_MATCH,bflush=trees._tr_tally(s,s.strstart-1-s.prev_match,s.prev_length-MIN_MATCH),s.lookahead-=s.prev_length-1,s.prev_length-=2;do++s.strstart<=max_insert&&(s.ins_h=(s.ins_h<=MIN_MATCH&&s.strstart>0&&(scan=s.strstart-1,prev=_win[scan],prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan])){strend=s.strstart+MAX_MATCH;do;while(prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&strend>scan); +s.match_length=MAX_MATCH-(strend-scan),s.match_length>s.lookahead&&(s.match_length=s.lookahead)}if(s.match_length>=MIN_MATCH?(bflush=trees._tr_tally(s,1,s.match_length-MIN_MATCH),s.lookahead-=s.match_length,s.strstart+=s.match_length,s.match_length=0):(bflush=trees._tr_tally(s,0,s.window[s.strstart]),s.lookahead--,s.strstart++),bflush&&(flush_block_only(s,!1),0===s.strm.avail_out))return BS_NEED_MORE}return s.insert=0,flush===Z_FINISH?(flush_block_only(s,!0),0===s.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):s.last_lit&&(flush_block_only(s,!1),0===s.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE}function deflate_huff(s,flush){for(var bflush;;){if(0===s.lookahead&&(fill_window(s),0===s.lookahead)){if(flush===Z_NO_FLUSH)return BS_NEED_MORE;break}if(s.match_length=0,bflush=trees._tr_tally(s,0,s.window[s.strstart]),s.lookahead--,s.strstart++,bflush&&(flush_block_only(s,!1),0===s.strm.avail_out))return BS_NEED_MORE}return s.insert=0,flush===Z_FINISH?(flush_block_only(s,!0),0===s.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):s.last_lit&&(flush_block_only(s,!1),0===s.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE}function lm_init(s){s.window_size=2*s.w_size,zero(s.head),s.max_lazy_match=configuration_table[s.level].max_lazy,s.good_match=configuration_table[s.level].good_length,s.nice_match=configuration_table[s.level].nice_length,s.max_chain_length=configuration_table[s.level].max_chain,s.strstart=0,s.block_start=0,s.lookahead=0,s.insert=0,s.match_length=s.prev_length=MIN_MATCH-1,s.match_available=0,s.ins_h=0}function DeflateState(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z_DEFLATED,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new utils.Buf16(2*HEAP_SIZE),this.dyn_dtree=new utils.Buf16(2*(2*D_CODES+1)),this.bl_tree=new utils.Buf16(2*(2*BL_CODES+1)),zero(this.dyn_ltree),zero(this.dyn_dtree),zero(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new utils.Buf16(MAX_BITS+1),this.heap=new utils.Buf16(2*L_CODES+1),zero(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new utils.Buf16(2*L_CODES+1),zero(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function deflateResetKeep(strm){var s;return strm&&strm.state?(strm.total_in=strm.total_out=0,strm.data_type=Z_UNKNOWN,s=strm.state,s.pending=0,s.pending_out=0,s.wrap<0&&(s.wrap=-s.wrap),s.status=s.wrap?INIT_STATE:BUSY_STATE,strm.adler=2===s.wrap?0:1,s.last_flush=Z_NO_FLUSH,trees._tr_init(s),Z_OK):err(strm,Z_STREAM_ERROR)}function deflateReset(strm){var ret=deflateResetKeep(strm);return ret===Z_OK&&lm_init(strm.state),ret}function deflateSetHeader(strm,head){return strm&&strm.state?2!==strm.state.wrap?Z_STREAM_ERROR:(strm.state.gzhead=head,Z_OK):Z_STREAM_ERROR}function deflateInit2(strm,level,method,windowBits,memLevel,strategy){if(!strm)return Z_STREAM_ERROR;var wrap=1;if(level===Z_DEFAULT_COMPRESSION&&(level=6),0>windowBits?(wrap=0,windowBits=-windowBits):windowBits>15&&(wrap=2,windowBits-=16),1>memLevel||memLevel>MAX_MEM_LEVEL||method!==Z_DEFLATED||8>windowBits||windowBits>15||0>level||level>9||0>strategy||strategy>Z_FIXED)return err(strm,Z_STREAM_ERROR);8===windowBits&&(windowBits=9);var s=new DeflateState;return strm.state=s,s.strm=strm,s.wrap=wrap,s.gzhead=null,s.w_bits=windowBits,s.w_size=1<>1,s.l_buf=3*s.lit_bufsize,s.level=level,s.strategy=strategy,s.method=method,deflateReset(strm)}function deflateInit(strm,level){return deflateInit2(strm,level,Z_DEFLATED,MAX_WBITS,DEF_MEM_LEVEL,Z_DEFAULT_STRATEGY)}function deflate(strm,flush){var old_flush,s,beg,val;if(!strm||!strm.state||flush>Z_BLOCK||0>flush)return strm?err(strm,Z_STREAM_ERROR):Z_STREAM_ERROR;if(s=strm.state,!strm.output||!strm.input&&0!==strm.avail_in||s.status===FINISH_STATE&&flush!==Z_FINISH)return err(strm,0===strm.avail_out?Z_BUF_ERROR:Z_STREAM_ERROR);if(s.strm=strm,old_flush=s.last_flush,s.last_flush=flush,s.status===INIT_STATE)if(2===s.wrap)strm.adler=0,put_byte(s,31),put_byte(s,139),put_byte(s,8),s.gzhead?(put_byte(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),put_byte(s,255&s.gzhead.time),put_byte(s,s.gzhead.time>>8&255),put_byte(s,s.gzhead.time>>16&255),put_byte(s,s.gzhead.time>>24&255),put_byte(s,9===s.level?2:s.strategy>=Z_HUFFMAN_ONLY||s.level<2?4:0),put_byte(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(put_byte(s,255&s.gzhead.extra.length),put_byte(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(strm.adler=crc32(strm.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=EXTRA_STATE):(put_byte(s,0),put_byte(s,0),put_byte(s,0),put_byte(s,0),put_byte(s,0),put_byte(s,9===s.level?2:s.strategy>=Z_HUFFMAN_ONLY||s.level<2?4:0),put_byte(s,OS_CODE),s.status=BUSY_STATE);else{var header=Z_DEFLATED+(s.w_bits-8<<4)<<8,level_flags=-1;level_flags=s.strategy>=Z_HUFFMAN_ONLY||s.level<2?0:s.level<6?1:6===s.level?2:3,header|=level_flags<<6,0!==s.strstart&&(header|=PRESET_DICT),header+=31-header%31,s.status=BUSY_STATE,putShortMSB(s,header),0!==s.strstart&&(putShortMSB(s,strm.adler>>>16),putShortMSB(s,65535&strm.adler)),strm.adler=1}if(s.status===EXTRA_STATE)if(s.gzhead.extra){for(beg=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>beg&&(strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)),flush_pending(strm),beg=s.pending,s.pending!==s.pending_buf_size));)put_byte(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>beg&&(strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=NAME_STATE)}else s.status=NAME_STATE;if(s.status===NAME_STATE)if(s.gzhead.name){beg=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>beg&&(strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)),flush_pending(strm),beg=s.pending,s.pending===s.pending_buf_size)){val=1;break}val=s.gzindexbeg&&(strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)),0===val&&(s.gzindex=0,s.status=COMMENT_STATE)}else s.status=COMMENT_STATE;if(s.status===COMMENT_STATE)if(s.gzhead.comment){beg=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>beg&&(strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)),flush_pending(strm),beg=s.pending,s.pending===s.pending_buf_size)){val=1;break}val=s.gzindexbeg&&(strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)),0===val&&(s.status=HCRC_STATE)}else s.status=HCRC_STATE;if(s.status===HCRC_STATE&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&flush_pending(strm),s.pending+2<=s.pending_buf_size&&(put_byte(s,255&strm.adler),put_byte(s,strm.adler>>8&255),strm.adler=0,s.status=BUSY_STATE)):s.status=BUSY_STATE),0!==s.pending){if(flush_pending(strm),0===strm.avail_out)return s.last_flush=-1,Z_OK}else if(0===strm.avail_in&&rank(flush)<=rank(old_flush)&&flush!==Z_FINISH)return err(strm,Z_BUF_ERROR);if(s.status===FINISH_STATE&&0!==strm.avail_in)return err(strm,Z_BUF_ERROR);if(0!==strm.avail_in||0!==s.lookahead||flush!==Z_NO_FLUSH&&s.status!==FINISH_STATE){var bstate=s.strategy===Z_HUFFMAN_ONLY?deflate_huff(s,flush):s.strategy===Z_RLE?deflate_rle(s,flush):configuration_table[s.level].func(s,flush);if((bstate===BS_FINISH_STARTED||bstate===BS_FINISH_DONE)&&(s.status=FINISH_STATE),bstate===BS_NEED_MORE||bstate===BS_FINISH_STARTED)return 0===strm.avail_out&&(s.last_flush=-1),Z_OK;if(bstate===BS_BLOCK_DONE&&(flush===Z_PARTIAL_FLUSH?trees._tr_align(s):flush!==Z_BLOCK&&(trees._tr_stored_block(s,0,0,!1),flush===Z_FULL_FLUSH&&(zero(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),flush_pending(strm),0===strm.avail_out))return s.last_flush=-1,Z_OK}return flush!==Z_FINISH?Z_OK:s.wrap<=0?Z_STREAM_END:(2===s.wrap?(put_byte(s,255&strm.adler),put_byte(s,strm.adler>>8&255),put_byte(s,strm.adler>>16&255),put_byte(s,strm.adler>>24&255),put_byte(s,255&strm.total_in),put_byte(s,strm.total_in>>8&255),put_byte(s,strm.total_in>>16&255),put_byte(s,strm.total_in>>24&255)):(putShortMSB(s,strm.adler>>>16),putShortMSB(s,65535&strm.adler)),flush_pending(strm),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?Z_OK:Z_STREAM_END)}function deflateEnd(strm){var status;return strm&&strm.state?(status=strm.state.status,status!==INIT_STATE&&status!==EXTRA_STATE&&status!==NAME_STATE&&status!==COMMENT_STATE&&status!==HCRC_STATE&&status!==BUSY_STATE&&status!==FINISH_STATE?err(strm,Z_STREAM_ERROR):(strm.state=null,status===BUSY_STATE?err(strm,Z_DATA_ERROR):Z_OK)):Z_STREAM_ERROR}var configuration_table,utils=require("../utils/common"),trees=require("./trees"),adler32=require("./adler32"),crc32=require("./crc32"),msg=require("./messages"),Z_NO_FLUSH=0,Z_PARTIAL_FLUSH=1,Z_FULL_FLUSH=3,Z_FINISH=4,Z_BLOCK=5,Z_OK=0,Z_STREAM_END=1,Z_STREAM_ERROR=-2,Z_DATA_ERROR=-3,Z_BUF_ERROR=-5,Z_DEFAULT_COMPRESSION=-1,Z_FILTERED=1,Z_HUFFMAN_ONLY=2,Z_RLE=3,Z_FIXED=4,Z_DEFAULT_STRATEGY=0,Z_UNKNOWN=2,Z_DEFLATED=8,MAX_MEM_LEVEL=9,MAX_WBITS=15,DEF_MEM_LEVEL=8,LENGTH_CODES=29,LITERALS=256,L_CODES=LITERALS+1+LENGTH_CODES,D_CODES=30,BL_CODES=19,HEAP_SIZE=2*L_CODES+1,MAX_BITS=15,MIN_MATCH=3,MAX_MATCH=258,MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1,PRESET_DICT=32,INIT_STATE=42,EXTRA_STATE=69,NAME_STATE=73,COMMENT_STATE=91,HCRC_STATE=103,BUSY_STATE=113,FINISH_STATE=666,BS_NEED_MORE=1,BS_BLOCK_DONE=2,BS_FINISH_STARTED=3,BS_FINISH_DONE=4,OS_CODE=3,Config=function(good_length,max_lazy,nice_length,max_chain,func){this.good_length=good_length,this.max_lazy=max_lazy,this.nice_length=nice_length,this.max_chain=max_chain,this.func=func};configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)],exports.deflateInit=deflateInit,exports.deflateInit2=deflateInit2,exports.deflateReset=deflateReset,exports.deflateResetKeep=deflateResetKeep,exports.deflateSetHeader=deflateSetHeader,exports.deflate=deflate,exports.deflateEnd=deflateEnd,exports.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":129,"./adler32":131,"./crc32":133,"./messages":139,"./trees":140}],135:[function(require,module,exports){"use strict";function GZheader(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}module.exports=GZheader},{}],136:[function(require,module,exports){"use strict";var BAD=30,TYPE=12;module.exports=function(strm,start){var state,_in,last,_out,beg,end,dmax,wsize,whave,wnext,window,hold,bits,lcode,dcode,lmask,dmask,here,op,len,dist,from,from_source,input,output;state=strm.state,_in=strm.next_in,input=strm.input,last=_in+(strm.avail_in-5),_out=strm.next_out,output=strm.output,beg=_out-(start-strm.avail_out),end=_out+(strm.avail_out-257),dmax=state.dmax,wsize=state.wsize,whave=state.whave,wnext=state.wnext,window=state.window,hold=state.hold,bits=state.bits,lcode=state.lencode,dcode=state.distcode,lmask=(1<bits&&(hold+=input[_in++]<>>24,hold>>>=op,bits-=op,op=here>>>16&255,0===op)output[_out++]=65535&here;else{if(!(16&op)){if(0===(64&op)){here=lcode[(65535&here)+(hold&(1<bits&&(hold+=input[_in++]<>>=op,bits-=op),15>bits&&(hold+=input[_in++]<>>24,hold>>>=op,bits-=op,op=here>>>16&255,!(16&op)){if(0===(64&op)){here=dcode[(65535&here)+(hold&(1<bits&&(hold+=input[_in++]<bits&&(hold+=input[_in++]<dmax){strm.msg="invalid distance too far back",state.mode=BAD;break top}if(hold>>>=op,bits-=op,op=_out-beg,dist>op){if(op=dist-op,op>whave&&state.sane){strm.msg="invalid distance too far back",state.mode=BAD;break top}if(from=0,from_source=window,0===wnext){if(from+=wsize-op,len>op){len-=op;do output[_out++]=window[from++];while(--op);from=_out-dist,from_source=output}}else if(op>wnext){if(from+=wsize+wnext-op,op-=wnext,len>op){len-=op;do output[_out++]=window[from++];while(--op);if(from=0,len>wnext){op=wnext,len-=op;do output[_out++]=window[from++];while(--op);from=_out-dist,from_source=output}}}else if(from+=wnext-op,len>op){len-=op;do output[_out++]=window[from++];while(--op);from=_out-dist,from_source=output}for(;len>2;)output[_out++]=from_source[from++],output[_out++]=from_source[from++],output[_out++]=from_source[from++],len-=3;len&&(output[_out++]=from_source[from++],len>1&&(output[_out++]=from_source[from++]))}else{from=_out-dist;do output[_out++]=output[from++],output[_out++]=output[from++],output[_out++]=output[from++],len-=3;while(len>2);len&&(output[_out++]=output[from++],len>1&&(output[_out++]=output[from++]))}break}}break}}while(last>_in&&end>_out);len=bits>>3,_in-=len,bits-=len<<3,hold&=(1<_in?5+(last-_in):5-(_in-last),strm.avail_out=end>_out?257+(end-_out):257-(_out-end),state.hold=hold,state.bits=bits}},{}],137:[function(require,module,exports){"use strict";function ZSWAP32(q){return(q>>>24&255)+(q>>>8&65280)+((65280&q)<<8)+((255&q)<<24)}function InflateState(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new utils.Buf16(320),this.work=new utils.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function inflateResetKeep(strm){var state;return strm&&strm.state?(state=strm.state,strm.total_in=strm.total_out=state.total=0,strm.msg="",state.wrap&&(strm.adler=1&state.wrap),state.mode=HEAD,state.last=0,state.havedict=0,state.dmax=32768,state.head=null,state.hold=0,state.bits=0,state.lencode=state.lendyn=new utils.Buf32(ENOUGH_LENS),state.distcode=state.distdyn=new utils.Buf32(ENOUGH_DISTS),state.sane=1,state.back=-1,Z_OK):Z_STREAM_ERROR}function inflateReset(strm){var state;return strm&&strm.state?(state=strm.state,state.wsize=0,state.whave=0,state.wnext=0,inflateResetKeep(strm)):Z_STREAM_ERROR}function inflateReset2(strm,windowBits){var wrap,state;return strm&&strm.state?(state=strm.state,0>windowBits?(wrap=0,windowBits=-windowBits):(wrap=(windowBits>>4)+1,48>windowBits&&(windowBits&=15)),windowBits&&(8>windowBits||windowBits>15)?Z_STREAM_ERROR:(null!==state.window&&state.wbits!==windowBits&&(state.window=null),state.wrap=wrap,state.wbits=windowBits,inflateReset(strm))):Z_STREAM_ERROR}function inflateInit2(strm,windowBits){var ret,state;return strm?(state=new InflateState,strm.state=state,state.window=null,ret=inflateReset2(strm,windowBits),ret!==Z_OK&&(strm.state=null),ret):Z_STREAM_ERROR}function inflateInit(strm){return inflateInit2(strm,DEF_WBITS)}function fixedtables(state){if(virgin){var sym;for(lenfix=new utils.Buf32(512),distfix=new utils.Buf32(32),sym=0;144>sym;)state.lens[sym++]=8;for(;256>sym;)state.lens[sym++]=9;for(;280>sym;)state.lens[sym++]=7;for(;288>sym;)state.lens[sym++]=8;for(inflate_table(LENS,state.lens,0,288,lenfix,0,state.work,{bits:9}),sym=0;32>sym;)state.lens[sym++]=5;inflate_table(DISTS,state.lens,0,32,distfix,0,state.work,{bits:5}),virgin=!1}state.lencode=lenfix,state.lenbits=9,state.distcode=distfix,state.distbits=5}function updatewindow(strm,src,end,copy){var dist,state=strm.state;return null===state.window&&(state.wsize=1<=state.wsize?(utils.arraySet(state.window,src,end-state.wsize,state.wsize,0),state.wnext=0,state.whave=state.wsize):(dist=state.wsize-state.wnext,dist>copy&&(dist=copy),utils.arraySet(state.window,src,end-copy,dist,state.wnext),copy-=dist,copy?(utils.arraySet(state.window,src,end-copy,copy,0),state.wnext=copy,state.whave=state.wsize):(state.wnext+=dist,state.wnext===state.wsize&&(state.wnext=0),state.whavebits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>8&255,state.check=crc32(state.check,hbuf,2,0),hold=0,bits=0,state.mode=FLAGS;break}if(state.flags=0,state.head&&(state.head.done=!1),!(1&state.wrap)||(((255&hold)<<8)+(hold>>8))%31){strm.msg="incorrect header check",state.mode=BAD;break}if((15&hold)!==Z_DEFLATED){strm.msg="unknown compression method",state.mode=BAD;break}if(hold>>>=4,bits-=4,len=(15&hold)+8,0===state.wbits)state.wbits=len;else if(len>state.wbits){strm.msg="invalid window size",state.mode=BAD;break}state.dmax=1<bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>8&1),512&state.flags&&(hbuf[0]=255&hold,hbuf[1]=hold>>>8&255,state.check=crc32(state.check,hbuf,2,0)),hold=0,bits=0,state.mode=TIME;case TIME:for(;32>bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>8&255,hbuf[2]=hold>>>16&255,hbuf[3]=hold>>>24&255,state.check=crc32(state.check,hbuf,4,0)),hold=0,bits=0,state.mode=OS;case OS:for(;16>bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>8),512&state.flags&&(hbuf[0]=255&hold,hbuf[1]=hold>>>8&255,state.check=crc32(state.check,hbuf,2,0)),hold=0,bits=0,state.mode=EXLEN;case EXLEN:if(1024&state.flags){for(;16>bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>8&255,state.check=crc32(state.check,hbuf,2,0)),hold=0,bits=0}else state.head&&(state.head.extra=null);state.mode=EXTRA;case EXTRA:if(1024&state.flags&&(copy=state.length,copy>have&&(copy=have),copy&&(state.head&&(len=state.head.extra_len-state.length,state.head.extra||(state.head.extra=new Array(state.head.extra_len)),utils.arraySet(state.head.extra,input,next,copy,len)),512&state.flags&&(state.check=crc32(state.check,input,copy,next)),have-=copy,next+=copy,state.length-=copy),state.length))break inf_leave;state.length=0,state.mode=NAME;case NAME:if(2048&state.flags){if(0===have)break inf_leave;copy=0;do len=input[next+copy++],state.head&&len&&state.length<65536&&(state.head.name+=String.fromCharCode(len));while(len&&have>copy);if(512&state.flags&&(state.check=crc32(state.check,input,copy,next)),have-=copy,next+=copy,len)break inf_leave}else state.head&&(state.head.name=null);state.length=0,state.mode=COMMENT;case COMMENT:if(4096&state.flags){if(0===have)break inf_leave;copy=0;do len=input[next+copy++],state.head&&len&&state.length<65536&&(state.head.comment+=String.fromCharCode(len));while(len&&have>copy);if(512&state.flags&&(state.check=crc32(state.check,input,copy,next)),have-=copy,next+=copy,len)break inf_leave}else state.head&&(state.head.comment=null);state.mode=HCRC;case HCRC:if(512&state.flags){for(;16>bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>9&1,state.head.done=!0),strm.adler=state.check=0,state.mode=TYPE;break;case DICTID:for(;32>bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>=7&bits,bits-=7&bits,state.mode=CHECK;break}for(;3>bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>=1,bits-=1,3&hold){case 0:state.mode=STORED;break;case 1:if(fixedtables(state),state.mode=LEN_,flush===Z_TREES){hold>>>=2,bits-=2;break inf_leave}break;case 2:state.mode=TABLE;break;case 3:strm.msg="invalid block type",state.mode=BAD}hold>>>=2,bits-=2;break;case STORED:for(hold>>>=7&bits,bits-=7&bits;32>bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>16^65535)){strm.msg="invalid stored block lengths",state.mode=BAD;break}if(state.length=65535&hold,hold=0,bits=0,state.mode=COPY_,flush===Z_TREES)break inf_leave;case COPY_:state.mode=COPY;case COPY:if(copy=state.length){if(copy>have&&(copy=have),copy>left&&(copy=left),0===copy)break inf_leave;utils.arraySet(output,input,next,copy,put),have-=copy,next+=copy,left-=copy,put+=copy,state.length-=copy;break}state.mode=TYPE;break;case TABLE:for(;14>bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>=5,bits-=5,state.ndist=(31&hold)+1,hold>>>=5,bits-=5,state.ncode=(15&hold)+4,hold>>>=4,bits-=4,state.nlen>286||state.ndist>30){strm.msg="too many length or distance symbols",state.mode=BAD;break}state.have=0,state.mode=LENLENS;case LENLENS:for(;state.havebits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>=3,bits-=3}for(;state.have<19;)state.lens[order[state.have++]]=0;if(state.lencode=state.lendyn,state.lenbits=7,opts={bits:state.lenbits},ret=inflate_table(CODES,state.lens,0,19,state.lencode,0,state.work,opts),state.lenbits=opts.bits,ret){strm.msg="invalid code lengths set",state.mode=BAD;break}state.have=0,state.mode=CODELENS;case CODELENS:for(;state.have>>24,here_op=here>>>16&255,here_val=65535&here,!(bits>=here_bits);){if(0===have)break inf_leave;have--,hold+=input[next++]<here_val)hold>>>=here_bits,bits-=here_bits,state.lens[state.have++]=here_val;else{if(16===here_val){for(n=here_bits+2;n>bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>=here_bits,bits-=here_bits,0===state.have){strm.msg="invalid bit length repeat",state.mode=BAD;break}len=state.lens[state.have-1],copy=3+(3&hold),hold>>>=2,bits-=2}else if(17===here_val){for(n=here_bits+3;n>bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>=here_bits,bits-=here_bits,len=0,copy=3+(7&hold),hold>>>=3,bits-=3}else{for(n=here_bits+7;n>bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>=here_bits,bits-=here_bits,len=0,copy=11+(127&hold),hold>>>=7,bits-=7}if(state.have+copy>state.nlen+state.ndist){strm.msg="invalid bit length repeat",state.mode=BAD;break}for(;copy--;)state.lens[state.have++]=len}}if(state.mode===BAD)break;if(0===state.lens[256]){strm.msg="invalid code -- missing end-of-block",state.mode=BAD;break}if(state.lenbits=9,opts={bits:state.lenbits},ret=inflate_table(LENS,state.lens,0,state.nlen,state.lencode,0,state.work,opts),state.lenbits=opts.bits,ret){strm.msg="invalid literal/lengths set",state.mode=BAD;break}if(state.distbits=6,state.distcode=state.distdyn,opts={bits:state.distbits},ret=inflate_table(DISTS,state.lens,state.nlen,state.ndist,state.distcode,0,state.work,opts),state.distbits=opts.bits,ret){strm.msg="invalid distances set",state.mode=BAD;break}if(state.mode=LEN_,flush===Z_TREES)break inf_leave;case LEN_:state.mode=LEN;case LEN:if(have>=6&&left>=258){strm.next_out=put,strm.avail_out=left,strm.next_in=next,strm.avail_in=have,state.hold=hold,state.bits=bits,inflate_fast(strm,_out),put=strm.next_out,output=strm.output,left=strm.avail_out,next=strm.next_in,input=strm.input,have=strm.avail_in,hold=state.hold,bits=state.bits,state.mode===TYPE&&(state.back=-1);break}for(state.back=0;here=state.lencode[hold&(1<>>24,here_op=here>>>16&255,here_val=65535&here,!(bits>=here_bits);){if(0===have)break inf_leave;have--,hold+=input[next++]<>last_bits)],here_bits=here>>>24,here_op=here>>>16&255,here_val=65535&here,!(bits>=last_bits+here_bits);){if(0===have)break inf_leave;have--,hold+=input[next++]<>>=last_bits,bits-=last_bits,state.back+=last_bits}if(hold>>>=here_bits,bits-=here_bits,state.back+=here_bits,state.length=here_val,0===here_op){state.mode=LIT;break}if(32&here_op){state.back=-1,state.mode=TYPE;break}if(64&here_op){strm.msg="invalid literal/length code",state.mode=BAD;break}state.extra=15&here_op,state.mode=LENEXT;case LENEXT:if(state.extra){for(n=state.extra;n>bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>=state.extra,bits-=state.extra,state.back+=state.extra}state.was=state.length,state.mode=DIST;case DIST:for(;here=state.distcode[hold&(1<>>24,here_op=here>>>16&255,here_val=65535&here,!(bits>=here_bits);){if(0===have)break inf_leave;have--,hold+=input[next++]<>last_bits)],here_bits=here>>>24,here_op=here>>>16&255,here_val=65535&here,!(bits>=last_bits+here_bits);){if(0===have)break inf_leave;have--,hold+=input[next++]<>>=last_bits,bits-=last_bits,state.back+=last_bits}if(hold>>>=here_bits,bits-=here_bits,state.back+=here_bits,64&here_op){strm.msg="invalid distance code",state.mode=BAD;break}state.offset=here_val,state.extra=15&here_op,state.mode=DISTEXT;case DISTEXT:if(state.extra){for(n=state.extra;n>bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<>>=state.extra,bits-=state.extra,state.back+=state.extra}if(state.offset>state.dmax){strm.msg="invalid distance too far back",state.mode=BAD;break}state.mode=MATCH;case MATCH:if(0===left)break inf_leave;if(copy=_out-left,state.offset>copy){if(copy=state.offset-copy,copy>state.whave&&state.sane){strm.msg="invalid distance too far back",state.mode=BAD;break}copy>state.wnext?(copy-=state.wnext,from=state.wsize-copy):from=state.wnext-copy,copy>state.length&&(copy=state.length),from_source=state.window}else from_source=output,from=put-state.offset,copy=state.length;copy>left&&(copy=left),left-=copy,state.length-=copy;do output[put++]=from_source[from++];while(--copy);0===state.length&&(state.mode=LEN);break;case LIT:if(0===left)break inf_leave;output[put++]=state.length,left--,state.mode=LEN;break;case CHECK:if(state.wrap){for(;32>bits;){if(0===have)break inf_leave;have--,hold|=input[next++]<bits;){if(0===have)break inf_leave;have--,hold+=input[next++]<=len;len++)count[len]=0;for(sym=0;codes>sym;sym++)count[lens[lens_index+sym]]++;for(root=bits,max=MAXBITS;max>=1&&0===count[max];max--);if(root>max&&(root=max),0===max)return table[table_index++]=20971520,table[table_index++]=20971520,opts.bits=1,0;for(min=1;max>min&&0===count[min];min++);for(min>root&&(root=min),left=1,len=1;MAXBITS>=len;len++)if(left<<=1,left-=count[len],0>left)return-1;if(left>0&&(type===CODES||1!==max))return-1;for(offs[1]=0,len=1;MAXBITS>len;len++)offs[len+1]=offs[len]+count[len];for(sym=0;codes>sym;sym++)0!==lens[lens_index+sym]&&(work[offs[lens[lens_index+sym]]++]=sym);if(type===CODES?(base=extra=work,end=19):type===LENS?(base=lbase,base_index-=257,extra=lext,extra_index-=257,end=256):(base=dbase,extra=dext,end=-1),huff=0,sym=0,len=min,next=table_index,curr=root,drop=0,low=-1,used=1<ENOUGH_LENS||type===DISTS&&used>ENOUGH_DISTS)return 1;for(var i=0;;){i++,here_bits=len-drop,work[sym]end?(here_op=extra[extra_index+work[sym]],here_val=base[base_index+work[sym]]):(here_op=96,here_val=0),incr=1<>drop)+fill]=here_bits<<24|here_op<<16|here_val|0;while(0!==fill);for(incr=1<>=1;if(0!==incr?(huff&=incr-1,huff+=incr):huff=0,sym++,0===--count[len]){if(len===max)break;len=lens[lens_index+work[sym]]}if(len>root&&(huff&mask)!==low){for(0===drop&&(drop=root),next+=min,curr=len-drop,left=1<curr+drop&&(left-=count[curr+drop],!(0>=left));)curr++,left<<=1;if(used+=1<ENOUGH_LENS||type===DISTS&&used>ENOUGH_DISTS)return 1;low=huff&mask,table[low]=root<<24|curr<<16|next-table_index|0}}return 0!==huff&&(table[next+huff]=len-drop<<24|64<<16|0),opts.bits=root,0}},{"../utils/common":129}],139:[function(require,module,exports){"use strict";module.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],140:[function(require,module,exports){"use strict";function zero(buf){for(var len=buf.length;--len>=0;)buf[len]=0}function d_code(dist){return 256>dist?_dist_code[dist]:_dist_code[256+(dist>>>7)]}function put_short(s,w){s.pending_buf[s.pending++]=255&w,s.pending_buf[s.pending++]=w>>>8&255}function send_bits(s,value,length){s.bi_valid>Buf_size-length?(s.bi_buf|=value<>Buf_size-s.bi_valid,s.bi_valid+=length-Buf_size):(s.bi_buf|=value<>>=1,res<<=1;while(--len>0);return res>>>1}function bi_flush(s){16===s.bi_valid?(put_short(s,s.bi_buf),s.bi_buf=0,s.bi_valid=0):s.bi_valid>=8&&(s.pending_buf[s.pending++]=255&s.bi_buf,s.bi_buf>>=8,s.bi_valid-=8)}function gen_bitlen(s,desc){var h,n,m,bits,xbits,f,tree=desc.dyn_tree,max_code=desc.max_code,stree=desc.stat_desc.static_tree,has_stree=desc.stat_desc.has_stree,extra=desc.stat_desc.extra_bits,base=desc.stat_desc.extra_base,max_length=desc.stat_desc.max_length,overflow=0;for(bits=0;MAX_BITS>=bits;bits++)s.bl_count[bits]=0;for(tree[2*s.heap[s.heap_max]+1]=0,h=s.heap_max+1;HEAP_SIZE>h;h++)n=s.heap[h],bits=tree[2*tree[2*n+1]+1]+1,bits>max_length&&(bits=max_length,overflow++),tree[2*n+1]=bits,n>max_code||(s.bl_count[bits]++,xbits=0,n>=base&&(xbits=extra[n-base]),f=tree[2*n],s.opt_len+=f*(bits+xbits),has_stree&&(s.static_len+=f*(stree[2*n+1]+xbits)));if(0!==overflow){do{for(bits=max_length-1;0===s.bl_count[bits];)bits--;s.bl_count[bits]--,s.bl_count[bits+1]+=2,s.bl_count[max_length]--,overflow-=2}while(overflow>0);for(bits=max_length;0!==bits;bits--)for(n=s.bl_count[bits];0!==n;)m=s.heap[--h],m>max_code||(tree[2*m+1]!==bits&&(s.opt_len+=(bits-tree[2*m+1])*tree[2*m],tree[2*m+1]=bits),n--)}}function gen_codes(tree,max_code,bl_count){var bits,n,next_code=new Array(MAX_BITS+1),code=0;for(bits=1;MAX_BITS>=bits;bits++)next_code[bits]=code=code+bl_count[bits-1]<<1;for(n=0;max_code>=n;n++){var len=tree[2*n+1];0!==len&&(tree[2*n]=bi_reverse(next_code[len]++,len))}}function tr_static_init(){var n,bits,length,code,dist,bl_count=new Array(MAX_BITS+1);for(length=0,code=0;LENGTH_CODES-1>code;code++)for(base_length[code]=length,n=0;n<1<code;code++)for(base_dist[code]=dist,n=0;n<1<>=7;D_CODES>code;code++)for(base_dist[code]=dist<<7,n=0;n<1<=bits;bits++)bl_count[bits]=0;for(n=0;143>=n;)static_ltree[2*n+1]=8,n++,bl_count[8]++;for(;255>=n;)static_ltree[2*n+1]=9,n++,bl_count[9]++;for(;279>=n;)static_ltree[2*n+1]=7,n++,bl_count[7]++;for(;287>=n;)static_ltree[2*n+1]=8,n++,bl_count[8]++;for(gen_codes(static_ltree,L_CODES+1,bl_count),n=0;D_CODES>n;n++)static_dtree[2*n+1]=5,static_dtree[2*n]=bi_reverse(n,5);static_l_desc=new StaticTreeDesc(static_ltree,extra_lbits,LITERALS+1,L_CODES,MAX_BITS),static_d_desc=new StaticTreeDesc(static_dtree,extra_dbits,0,D_CODES,MAX_BITS),static_bl_desc=new StaticTreeDesc(new Array(0),extra_blbits,0,BL_CODES,MAX_BL_BITS)}function init_block(s){var n;for(n=0;L_CODES>n;n++)s.dyn_ltree[2*n]=0;for(n=0;D_CODES>n;n++)s.dyn_dtree[2*n]=0;for(n=0;BL_CODES>n;n++)s.bl_tree[2*n]=0;s.dyn_ltree[2*END_BLOCK]=1,s.opt_len=s.static_len=0,s.last_lit=s.matches=0}function bi_windup(s){s.bi_valid>8?put_short(s,s.bi_buf):s.bi_valid>0&&(s.pending_buf[s.pending++]=s.bi_buf),s.bi_buf=0,s.bi_valid=0}function copy_block(s,buf,len,header){bi_windup(s),header&&(put_short(s,len),put_short(s,~len)),utils.arraySet(s.pending_buf,s.window,buf,len,s.pending),s.pending+=len}function smaller(tree,n,m,depth){var _n2=2*n,_m2=2*m;return tree[_n2]n;n++)0!==tree[2*n]?(s.heap[++s.heap_len]=max_code=n,s.depth[n]=0):tree[2*n+1]=0;for(;s.heap_len<2;)node=s.heap[++s.heap_len]=2>max_code?++max_code:0,tree[2*node]=1,s.depth[node]=0,s.opt_len--,has_stree&&(s.static_len-=stree[2*node+1]);for(desc.max_code=max_code,n=s.heap_len>>1;n>=1;n--)pqdownheap(s,tree,n);node=elems;do n=s.heap[1],s.heap[1]=s.heap[s.heap_len--],pqdownheap(s,tree,1),m=s.heap[1],s.heap[--s.heap_max]=n,s.heap[--s.heap_max]=m,tree[2*node]=tree[2*n]+tree[2*m],s.depth[node]=(s.depth[n]>=s.depth[m]?s.depth[n]:s.depth[m])+1,tree[2*n+1]=tree[2*m+1]=node,s.heap[1]=node++,pqdownheap(s,tree,1);while(s.heap_len>=2);s.heap[--s.heap_max]=s.heap[1],gen_bitlen(s,desc),gen_codes(tree,max_code,s.bl_count)}function scan_tree(s,tree,max_code){var n,curlen,prevlen=-1,nextlen=tree[1],count=0,max_count=7,min_count=4;for(0===nextlen&&(max_count=138,min_count=3),tree[2*(max_code+1)+1]=65535,n=0;max_code>=n;n++)curlen=nextlen,nextlen=tree[2*(n+1)+1],++countcount?s.bl_tree[2*curlen]+=count:0!==curlen?(curlen!==prevlen&&s.bl_tree[2*curlen]++,s.bl_tree[2*REP_3_6]++):10>=count?s.bl_tree[2*REPZ_3_10]++:s.bl_tree[2*REPZ_11_138]++,count=0,prevlen=curlen,0===nextlen?(max_count=138,min_count=3):curlen===nextlen?(max_count=6,min_count=3):(max_count=7,min_count=4))}function send_tree(s,tree,max_code){var n,curlen,prevlen=-1,nextlen=tree[1],count=0,max_count=7,min_count=4;for(0===nextlen&&(max_count=138,min_count=3),n=0;max_code>=n;n++)if(curlen=nextlen,nextlen=tree[2*(n+1)+1],!(++countcount){do send_code(s,curlen,s.bl_tree);while(0!==--count)}else 0!==curlen?(curlen!==prevlen&&(send_code(s,curlen,s.bl_tree),count--),send_code(s,REP_3_6,s.bl_tree),send_bits(s,count-3,2)):10>=count?(send_code(s,REPZ_3_10,s.bl_tree),send_bits(s,count-3,3)):(send_code(s,REPZ_11_138,s.bl_tree),send_bits(s,count-11,7));count=0,prevlen=curlen,0===nextlen?(max_count=138,min_count=3):curlen===nextlen?(max_count=6,min_count=3):(max_count=7,min_count=4)}}function build_bl_tree(s){var max_blindex;for(scan_tree(s,s.dyn_ltree,s.l_desc.max_code),scan_tree(s,s.dyn_dtree,s.d_desc.max_code),build_tree(s,s.bl_desc),max_blindex=BL_CODES-1;max_blindex>=3&&0===s.bl_tree[2*bl_order[max_blindex]+1];max_blindex--);return s.opt_len+=3*(max_blindex+1)+5+5+4,max_blindex}function send_all_trees(s,lcodes,dcodes,blcodes){var rank;for(send_bits(s,lcodes-257,5),send_bits(s,dcodes-1,5),send_bits(s,blcodes-4,4),rank=0;blcodes>rank;rank++)send_bits(s,s.bl_tree[2*bl_order[rank]+1],3);send_tree(s,s.dyn_ltree,lcodes-1),send_tree(s,s.dyn_dtree,dcodes-1)}function detect_data_type(s){var n,black_mask=4093624447;for(n=0;31>=n;n++,black_mask>>>=1)if(1&black_mask&&0!==s.dyn_ltree[2*n])return Z_BINARY;if(0!==s.dyn_ltree[18]||0!==s.dyn_ltree[20]||0!==s.dyn_ltree[26])return Z_TEXT;for(n=32;LITERALS>n;n++)if(0!==s.dyn_ltree[2*n])return Z_TEXT;return Z_BINARY}function _tr_init(s){static_init_done||(tr_static_init(),static_init_done=!0),s.l_desc=new TreeDesc(s.dyn_ltree,static_l_desc),s.d_desc=new TreeDesc(s.dyn_dtree,static_d_desc),s.bl_desc=new TreeDesc(s.bl_tree,static_bl_desc),s.bi_buf=0,s.bi_valid=0,init_block(s)}function _tr_stored_block(s,buf,stored_len,last){send_bits(s,(STORED_BLOCK<<1)+(last?1:0),3),copy_block(s,buf,stored_len,!0)}function _tr_align(s){send_bits(s,STATIC_TREES<<1,3),send_code(s,END_BLOCK,static_ltree),bi_flush(s)}function _tr_flush_block(s,buf,stored_len,last){var opt_lenb,static_lenb,max_blindex=0;s.level>0?(s.strm.data_type===Z_UNKNOWN&&(s.strm.data_type=detect_data_type(s)),build_tree(s,s.l_desc),build_tree(s,s.d_desc),max_blindex=build_bl_tree(s),opt_lenb=s.opt_len+3+7>>>3,static_lenb=s.static_len+3+7>>>3,opt_lenb>=static_lenb&&(opt_lenb=static_lenb)):opt_lenb=static_lenb=stored_len+5,opt_lenb>=stored_len+4&&-1!==buf?_tr_stored_block(s,buf,stored_len,last):s.strategy===Z_FIXED||static_lenb===opt_lenb?(send_bits(s,(STATIC_TREES<<1)+(last?1:0),3),compress_block(s,static_ltree,static_dtree)):(send_bits(s,(DYN_TREES<<1)+(last?1:0),3),send_all_trees(s,s.l_desc.max_code+1,s.d_desc.max_code+1,max_blindex+1),compress_block(s,s.dyn_ltree,s.dyn_dtree)),init_block(s),last&&bi_windup(s)}function _tr_tally(s,dist,lc){return s.pending_buf[s.d_buf+2*s.last_lit]=dist>>>8&255,s.pending_buf[s.d_buf+2*s.last_lit+1]=255&dist,s.pending_buf[s.l_buf+s.last_lit]=255&lc,s.last_lit++,0===dist?s.dyn_ltree[2*lc]++:(s.matches++,dist--,s.dyn_ltree[2*(_length_code[lc]+LITERALS+1)]++,s.dyn_dtree[2*d_code(dist)]++),s.last_lit===s.lit_bufsize-1}var utils=require("../utils/common"),Z_FIXED=4,Z_BINARY=0,Z_TEXT=1,Z_UNKNOWN=2,STORED_BLOCK=0,STATIC_TREES=1,DYN_TREES=2,MIN_MATCH=3,MAX_MATCH=258,LENGTH_CODES=29,LITERALS=256,L_CODES=LITERALS+1+LENGTH_CODES,D_CODES=30,BL_CODES=19,HEAP_SIZE=2*L_CODES+1,MAX_BITS=15,Buf_size=16,MAX_BL_BITS=7,END_BLOCK=256,REP_3_6=16,REPZ_3_10=17,REPZ_11_138=18,extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],DIST_CODE_LEN=512,static_ltree=new Array(2*(L_CODES+2));zero(static_ltree);var static_dtree=new Array(2*D_CODES);zero(static_dtree);var _dist_code=new Array(DIST_CODE_LEN);zero(_dist_code);var _length_code=new Array(MAX_MATCH-MIN_MATCH+1);zero(_length_code);var base_length=new Array(LENGTH_CODES);zero(base_length);var base_dist=new Array(D_CODES);zero(base_dist);var static_l_desc,static_d_desc,static_bl_desc,StaticTreeDesc=function(static_tree,extra_bits,extra_base,elems,max_length){this.static_tree=static_tree,this.extra_bits=extra_bits,this.extra_base=extra_base,this.elems=elems,this.max_length=max_length,this.has_stree=static_tree&&static_tree.length},TreeDesc=function(dyn_tree,stat_desc){this.dyn_tree=dyn_tree,this.max_code=0,this.stat_desc=stat_desc},static_init_done=!1;exports._tr_init=_tr_init,exports._tr_stored_block=_tr_stored_block,exports._tr_flush_block=_tr_flush_block,exports._tr_tally=_tr_tally,exports._tr_align=_tr_align},{"../utils/common":129}],141:[function(require,module,exports){"use strict";function ZStream(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}module.exports=ZStream},{}],142:[function(require,module,exports){exports.Parser=require("./lib/parser").Parser,exports.rules=require("./lib/rules"),exports.errors=require("./lib/errors"),exports.results=require("./lib/parsing-results"),exports.StringSource=require("./lib/StringSource"),exports.Token=require("./lib/Token"),exports.bottomUp=require("./lib/bottom-up"),exports.RegexTokeniser=require("./lib/regex-tokeniser").RegexTokeniser,exports.rule=function(ruleBuilder){var rule;return function(input){return rule||(rule=ruleBuilder()),rule(input)}}},{"./lib/StringSource":143,"./lib/Token":144,"./lib/bottom-up":146,"./lib/errors":147,"./lib/parser":149,"./lib/parsing-results":150,"./lib/regex-tokeniser":151,"./lib/rules":152}],143:[function(require,module,exports){var util=require("util"),StringSourceRange=(module.exports=function(string,description){var self={asString:function(){return string},range:function(startIndex,endIndex){return new StringSourceRange(string,description,startIndex,endIndex)}};return self},function(string,description,startIndex,endIndex){this._string=string,this._description=description,this._startIndex=startIndex,this._endIndex=endIndex});StringSourceRange.prototype.to=function(otherRange){return new StringSourceRange(this._string,this._description,this._startIndex,otherRange._endIndex)},StringSourceRange.prototype.describe=function(){var position=this._position(),description=this._description?this._description+"\n":"";return util.format("%sLine number: %s\nCharacter number: %s",description,position.lineNumber,position.characterNumber)},StringSourceRange.prototype.lineNumber=function(){return this._position().lineNumber},StringSourceRange.prototype.characterNumber=function(){return this._position().characterNumber},StringSourceRange.prototype._position=function(){for(var self=this,index=0,nextNewLine=function(){return self._string.indexOf("\n",index)},lineNumber=1;-1!==nextNewLine()&&nextNewLine()startIndex){var value=result[1],token=new Token(rules[i].name,value,source.range(startIndex,endIndex));return{token:token,endIndex:endIndex}}}}var endIndex=startIndex+1,token=new Token("unrecognisedCharacter",string.substring(startIndex,endIndex),source.range(startIndex,endIndex));return{token:token,endIndex:endIndex}}function endToken(input,source){return new Token("end",null,source.range(input.length,input.length))}return rules=rules.map(function(rule){return{name:rule.name,regex:new RegExp(rule.regex.source,"g")}}),{tokenise:tokenise}}var Token=require("./Token"),StringSource=require("./StringSource");exports.RegexTokeniser=RegexTokeniser},{"./StringSource":143,"./Token":144}],152:[function(require,module,exports){function noOpRule(input){return results.success(null,input)}function describeTokenMismatch(input,expected){var error,token=input.head();return error=token?errors.error({expected:expected,actual:describeToken(token),location:token.source}):errors.error({expected:expected,actual:"end of tokens"}),results.failure([error],input)}var _=require("underscore"),options=require("option"),results=require("./parsing-results"),errors=require("./errors"),lazyIterators=require("./lazy-iterators");exports.token=function(tokenType,value){var matchValue=void 0!==value;return function(input){var token=input.head();if(!token||token.name!==tokenType||matchValue&&token.value!==value){var expected=describeToken({name:tokenType,value:value});return describeTokenMismatch(input,expected)}return results.success(token.value,input.tail(),token.source)}},exports.tokenOfType=function(tokenType){return exports.token(tokenType)},exports.firstOf=function(name,parsers){return _.isArray(parsers)||(parsers=Array.prototype.slice.call(arguments,1)),function(input){return lazyIterators.fromArray(parsers).map(function(parser){return parser(input)}).filter(function(result){return result.isSuccess()||result.isError()}).first()||describeTokenMismatch(input,name)}},exports.then=function(parser,func){return function(input){var result=parser(input);return result.map||console.log(result),result.map(func)}},exports.sequence=function(){function isCapturedRule(subRule){return subRule.isCaptured}var parsers=Array.prototype.slice.call(arguments,0),rule=function(input){var result=_.foldl(parsers,function(memo,parser){var result=memo.result,hasCut=memo.hasCut;if(!result.isSuccess())return{result:result,hasCut:hasCut};var subResult=parser(result.remaining());if(subResult.isCut())return{result:result,hasCut:!0};if(subResult.isSuccess()){var values;values=parser.isCaptured?result.value().withValue(parser,subResult.value()):result.value();var remaining=subResult.remaining(),source=input.to(remaining);return{result:results.success(values,remaining,source),hasCut:hasCut}}return hasCut?{result:results.error(subResult.errors(),subResult.remaining()),hasCut:hasCut}:{result:subResult,hasCut:hasCut}},{result:results.success(new SequenceValues,input),hasCut:!1}).result,source=input.to(result.remaining());return result.map(function(values){return values.withValue(exports.sequence.source,source)})};return rule.head=function(){var firstCapture=_.find(parsers,isCapturedRule);return exports.then(rule,exports.sequence.extract(firstCapture))},rule.map=function(func){return exports.then(rule,function(result){return func.apply(this,result.toArray())})},rule};var SequenceValues=function(values,valuesArray){this._values=values||{},this._valuesArray=valuesArray||[]};SequenceValues.prototype.withValue=function(rule,value){if(rule.captureName&&rule.captureName in this._values)throw new Error('Cannot add second value for capture "'+rule.captureName+'"');var newValues=_.clone(this._values);newValues[rule.captureName]=value;var newValuesArray=this._valuesArray.concat([value]);return new SequenceValues(newValues,newValuesArray)},SequenceValues.prototype.get=function(rule){if(rule.captureName in this._values)return this._values[rule.captureName];throw new Error('No value for capture "'+rule.captureName+'"')},SequenceValues.prototype.toArray=function(){return this._valuesArray},exports.sequence.capture=function(rule,name){var captureRule=function(){return rule.apply(this,arguments)};return captureRule.captureName=name,captureRule.isCaptured=!0,captureRule},exports.sequence.extract=function(rule){return function(result){return result.get(rule)}},exports.sequence.applyValues=function(func){var rules=Array.prototype.slice.call(arguments,1);return function(result){var values=rules.map(function(rule){return result.get(rule)});return func.apply(this,values)}},exports.sequence.source={captureName:"☃source☃"},exports.sequence.cut=function(){return function(input){return results.cut(input)}},exports.optional=function(rule){return function(input){var result=rule(input);return result.isSuccess()?result.map(options.some):result.isFailure()?results.success(options.none,input):result}},exports.zeroOrMoreWithSeparator=function(rule,separator){return repeatedWithSeparator(rule,separator,!1)},exports.oneOrMoreWithSeparator=function(rule,separator){return repeatedWithSeparator(rule,separator,!0)};var zeroOrMore=exports.zeroOrMore=function(rule){return function(input){for(var result,values=[];(result=rule(input))&&result.isSuccess();)input=result.remaining(),values.push(result.value());return result.isError()?result:results.success(values,input)}};exports.oneOrMore=function(rule){return exports.oneOrMoreWithSeparator(rule,noOpRule)};var repeatedWithSeparator=function(rule,separator,isOneOrMore){return function(input){var result=rule(input);if(result.isSuccess()){var mainRule=exports.sequence.capture(rule,"main"),remainingRule=zeroOrMore(exports.then(exports.sequence(separator,mainRule),exports.sequence.extract(mainRule))),remainingResult=remainingRule(result.remaining());return results.success([result.value()].concat(remainingResult.value()),remainingResult.remaining())}return isOneOrMore||result.isError()?result:results.success([],input)}};exports.leftAssociative=function(leftRule,rightRule,func){var rights;rights=func?[{func:func,rule:rightRule}]:rightRule,rights=rights.map(function(right){return exports.then(right.rule,function(rightValue){return function(leftValue,source){return right.func(leftValue,rightValue,source)}})});var repeatedRule=exports.firstOf.apply(null,["rules"].concat(rights));return function(input){var start=input,leftResult=leftRule(input);if(!leftResult.isSuccess())return leftResult;for(var repeatedResult=repeatedRule(leftResult.remaining());repeatedResult.isSuccess();){var remaining=repeatedResult.remaining(),source=start.to(repeatedResult.remaining()),right=repeatedResult.value();leftResult=results.success(right(leftResult.value(),source),remaining,source),repeatedResult=repeatedRule(leftResult.remaining())}return repeatedResult.isError()?repeatedResult:leftResult}},exports.leftAssociative.firstOf=function(){return Array.prototype.slice.call(arguments,0)},exports.nonConsuming=function(rule){return function(input){return rule(input).changeRemaining(input)}};var describeToken=function(token){return token.value?token.name+' "'+token.value+'"':token.name}},{"./errors":147,"./lazy-iterators":148,"./parsing-results":150,option:153,underscore:154}],153:[function(require,module,exports){function callOrReturn(value){return"function"==typeof value?value():value}exports.none=Object.create({value:function(){throw new Error("Called value on none")},isNone:function(){return!0},isSome:function(){return!1},map:function(){return exports.none},flatMap:function(){return exports.none},toArray:function(){return[]},orElse:callOrReturn,valueOrElse:callOrReturn}),exports.some=function(value){return new Some(value)};var Some=function(value){this._value=value};Some.prototype.value=function(){return this._value},Some.prototype.isNone=function(){return!1},Some.prototype.isSome=function(){ +return!0},Some.prototype.map=function(func){return new Some(func(this._value))},Some.prototype.flatMap=function(func){return func(this._value)},Some.prototype.toArray=function(){return[this._value]},Some.prototype.orElse=function(value){return this},Some.prototype.valueOrElse=function(value){return this._value},exports.isOption=function(value){return value===exports.none||value instanceof Some},exports.fromNullable=function(value){return null==value?exports.none:new Some(value)}},{}],154:[function(require,module,exports){(function(){var root=this,previousUnderscore=root._,breaker={},ArrayProto=Array.prototype,ObjProto=Object.prototype,FuncProto=Function.prototype,push=ArrayProto.push,slice=ArrayProto.slice,concat=ArrayProto.concat,toString=ObjProto.toString,hasOwnProperty=ObjProto.hasOwnProperty,nativeForEach=ArrayProto.forEach,nativeMap=ArrayProto.map,nativeReduce=ArrayProto.reduce,nativeReduceRight=ArrayProto.reduceRight,nativeFilter=ArrayProto.filter,nativeEvery=ArrayProto.every,nativeSome=ArrayProto.some,nativeIndexOf=ArrayProto.indexOf,nativeLastIndexOf=ArrayProto.lastIndexOf,nativeIsArray=Array.isArray,nativeKeys=Object.keys,nativeBind=FuncProto.bind,_=function(obj){return obj instanceof _?obj:this instanceof _?void(this._wrapped=obj):new _(obj)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=_),exports._=_):root._=_,_.VERSION="1.4.4";var each=_.each=_.forEach=function(obj,iterator,context){if(null!=obj)if(nativeForEach&&obj.forEach===nativeForEach)obj.forEach(iterator,context);else if(obj.length===+obj.length){for(var i=0,l=obj.length;l>i;i++)if(iterator.call(context,obj[i],i,obj)===breaker)return}else for(var key in obj)if(_.has(obj,key)&&iterator.call(context,obj[key],key,obj)===breaker)return};_.map=_.collect=function(obj,iterator,context){var results=[];return null==obj?results:nativeMap&&obj.map===nativeMap?obj.map(iterator,context):(each(obj,function(value,index,list){results[results.length]=iterator.call(context,value,index,list)}),results)};var reduceError="Reduce of empty array with no initial value";_.reduce=_.foldl=_.inject=function(obj,iterator,memo,context){var initial=arguments.length>2;if(null==obj&&(obj=[]),nativeReduce&&obj.reduce===nativeReduce)return context&&(iterator=_.bind(iterator,context)),initial?obj.reduce(iterator,memo):obj.reduce(iterator);if(each(obj,function(value,index,list){initial?memo=iterator.call(context,memo,value,index,list):(memo=value,initial=!0)}),!initial)throw new TypeError(reduceError);return memo},_.reduceRight=_.foldr=function(obj,iterator,memo,context){var initial=arguments.length>2;if(null==obj&&(obj=[]),nativeReduceRight&&obj.reduceRight===nativeReduceRight)return context&&(iterator=_.bind(iterator,context)),initial?obj.reduceRight(iterator,memo):obj.reduceRight(iterator);var length=obj.length;if(length!==+length){var keys=_.keys(obj);length=keys.length}if(each(obj,function(value,index,list){index=keys?keys[--length]:--length,initial?memo=iterator.call(context,memo,obj[index],index,list):(memo=obj[index],initial=!0)}),!initial)throw new TypeError(reduceError);return memo},_.find=_.detect=function(obj,iterator,context){var result;return any(obj,function(value,index,list){return iterator.call(context,value,index,list)?(result=value,!0):void 0}),result},_.filter=_.select=function(obj,iterator,context){var results=[];return null==obj?results:nativeFilter&&obj.filter===nativeFilter?obj.filter(iterator,context):(each(obj,function(value,index,list){iterator.call(context,value,index,list)&&(results[results.length]=value)}),results)},_.reject=function(obj,iterator,context){return _.filter(obj,function(value,index,list){return!iterator.call(context,value,index,list)},context)},_.every=_.all=function(obj,iterator,context){iterator||(iterator=_.identity);var result=!0;return null==obj?result:nativeEvery&&obj.every===nativeEvery?obj.every(iterator,context):(each(obj,function(value,index,list){return(result=result&&iterator.call(context,value,index,list))?void 0:breaker}),!!result)};var any=_.some=_.any=function(obj,iterator,context){iterator||(iterator=_.identity);var result=!1;return null==obj?result:nativeSome&&obj.some===nativeSome?obj.some(iterator,context):(each(obj,function(value,index,list){return result||(result=iterator.call(context,value,index,list))?breaker:void 0}),!!result)};_.contains=_.include=function(obj,target){return null==obj?!1:nativeIndexOf&&obj.indexOf===nativeIndexOf?-1!=obj.indexOf(target):any(obj,function(value){return value===target})},_.invoke=function(obj,method){var args=slice.call(arguments,2),isFunc=_.isFunction(method);return _.map(obj,function(value){return(isFunc?method:value[method]).apply(value,args)})},_.pluck=function(obj,key){return _.map(obj,function(value){return value[key]})},_.where=function(obj,attrs,first){return _.isEmpty(attrs)?first?null:[]:_[first?"find":"filter"](obj,function(value){for(var key in attrs)if(attrs[key]!==value[key])return!1;return!0})},_.findWhere=function(obj,attrs){return _.where(obj,attrs,!0)},_.max=function(obj,iterator,context){if(!iterator&&_.isArray(obj)&&obj[0]===+obj[0]&&obj.length<65535)return Math.max.apply(Math,obj);if(!iterator&&_.isEmpty(obj))return-(1/0);var result={computed:-(1/0),value:-(1/0)};return each(obj,function(value,index,list){var computed=iterator?iterator.call(context,value,index,list):value;computed>=result.computed&&(result={value:value,computed:computed})}),result.value},_.min=function(obj,iterator,context){if(!iterator&&_.isArray(obj)&&obj[0]===+obj[0]&&obj.length<65535)return Math.min.apply(Math,obj);if(!iterator&&_.isEmpty(obj))return 1/0;var result={computed:1/0,value:1/0};return each(obj,function(value,index,list){var computed=iterator?iterator.call(context,value,index,list):value;computedb||void 0===a)return 1;if(b>a||void 0===b)return-1}return left.indexlow;){var mid=low+high>>>1;iterator.call(context,array[mid])=0})})},_.difference=function(array){var rest=concat.apply(ArrayProto,slice.call(arguments,1));return _.filter(array,function(value){return!_.contains(rest,value)})},_.zip=function(){for(var args=slice.call(arguments),length=_.max(_.pluck(args,"length")),results=new Array(length),i=0;length>i;i++)results[i]=_.pluck(args,""+i);return results},_.object=function(list,values){if(null==list)return{};for(var result={},i=0,l=list.length;l>i;i++)values?result[list[i]]=values[i]:result[list[i][0]]=list[i][1];return result},_.indexOf=function(array,item,isSorted){if(null==array)return-1;var i=0,l=array.length;if(isSorted){if("number"!=typeof isSorted)return i=_.sortedIndex(array,item),array[i]===item?i:-1;i=0>isSorted?Math.max(0,l+isSorted):isSorted}if(nativeIndexOf&&array.indexOf===nativeIndexOf)return array.indexOf(item,isSorted);for(;l>i;i++)if(array[i]===item)return i;return-1},_.lastIndexOf=function(array,item,from){if(null==array)return-1;var hasIndex=null!=from;if(nativeLastIndexOf&&array.lastIndexOf===nativeLastIndexOf)return hasIndex?array.lastIndexOf(item,from):array.lastIndexOf(item);for(var i=hasIndex?from:array.length;i--;)if(array[i]===item)return i;return-1},_.range=function(start,stop,step){arguments.length<=1&&(stop=start||0,start=0),step=arguments[2]||1;for(var len=Math.max(Math.ceil((stop-start)/step),0),idx=0,range=new Array(len);len>idx;)range[idx++]=start,start+=step;return range},_.bind=function(func,context){if(func.bind===nativeBind&&nativeBind)return nativeBind.apply(func,slice.call(arguments,1));var args=slice.call(arguments,2);return function(){return func.apply(context,args.concat(slice.call(arguments)))}},_.partial=function(func){var args=slice.call(arguments,1);return function(){return func.apply(this,args.concat(slice.call(arguments)))}},_.bindAll=function(obj){var funcs=slice.call(arguments,1);return 0===funcs.length&&(funcs=_.functions(obj)),each(funcs,function(f){obj[f]=_.bind(obj[f],obj)}),obj},_.memoize=function(func,hasher){var memo={};return hasher||(hasher=_.identity),function(){var key=hasher.apply(this,arguments);return _.has(memo,key)?memo[key]:memo[key]=func.apply(this,arguments)}},_.delay=function(func,wait){var args=slice.call(arguments,2);return setTimeout(function(){return func.apply(null,args)},wait)},_.defer=function(func){return _.delay.apply(_,[func,1].concat(slice.call(arguments,1)))},_.throttle=function(func,wait){var context,args,timeout,result,previous=0,later=function(){previous=new Date,timeout=null,result=func.apply(context,args)};return function(){var now=new Date,remaining=wait-(now-previous);return context=this,args=arguments,0>=remaining?(clearTimeout(timeout),timeout=null,previous=now,result=func.apply(context,args)):timeout||(timeout=setTimeout(later,remaining)),result}},_.debounce=function(func,wait,immediate){var timeout,result;return function(){var context=this,args=arguments,later=function(){timeout=null,immediate||(result=func.apply(context,args))},callNow=immediate&&!timeout;return clearTimeout(timeout),timeout=setTimeout(later,wait),callNow&&(result=func.apply(context,args)),result}},_.once=function(func){var memo,ran=!1;return function(){return ran?memo:(ran=!0,memo=func.apply(this,arguments),func=null,memo)}},_.wrap=function(func,wrapper){return function(){var args=[func];return push.apply(args,arguments),wrapper.apply(this,args)}},_.compose=function(){var funcs=arguments;return function(){for(var args=arguments,i=funcs.length-1;i>=0;i--)args=[funcs[i].apply(this,args)];return args[0]}},_.after=function(times,func){return 0>=times?func():function(){return--times<1?func.apply(this,arguments):void 0}},_.keys=nativeKeys||function(obj){if(obj!==Object(obj))throw new TypeError("Invalid object");var keys=[];for(var key in obj)_.has(obj,key)&&(keys[keys.length]=key);return keys},_.values=function(obj){var values=[];for(var key in obj)_.has(obj,key)&&values.push(obj[key]);return values},_.pairs=function(obj){var pairs=[];for(var key in obj)_.has(obj,key)&&pairs.push([key,obj[key]]);return pairs},_.invert=function(obj){var result={};for(var key in obj)_.has(obj,key)&&(result[obj[key]]=key);return result},_.functions=_.methods=function(obj){var names=[];for(var key in obj)_.isFunction(obj[key])&&names.push(key);return names.sort()},_.extend=function(obj){return each(slice.call(arguments,1),function(source){if(source)for(var prop in source)obj[prop]=source[prop]}),obj},_.pick=function(obj){var copy={},keys=concat.apply(ArrayProto,slice.call(arguments,1));return each(keys,function(key){key in obj&&(copy[key]=obj[key])}),copy},_.omit=function(obj){var copy={},keys=concat.apply(ArrayProto,slice.call(arguments,1));for(var key in obj)_.contains(keys,key)||(copy[key]=obj[key]);return copy},_.defaults=function(obj){return each(slice.call(arguments,1),function(source){if(source)for(var prop in source)null==obj[prop]&&(obj[prop]=source[prop])}),obj},_.clone=function(obj){return _.isObject(obj)?_.isArray(obj)?obj.slice():_.extend({},obj):obj},_.tap=function(obj,interceptor){return interceptor(obj),obj};var eq=function(a,b,aStack,bStack){if(a===b)return 0!==a||1/a==1/b;if(null==a||null==b)return a===b;a instanceof _&&(a=a._wrapped),b instanceof _&&(b=b._wrapped);var className=toString.call(a);if(className!=toString.call(b))return!1;switch(className){case"[object String]":return a==String(b);case"[object Number]":return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case"[object Date]":case"[object Boolean]":return+a==+b;case"[object RegExp]":return a.source==b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase}if("object"!=typeof a||"object"!=typeof b)return!1;for(var length=aStack.length;length--;)if(aStack[length]==a)return bStack[length]==b;aStack.push(a),bStack.push(b);var size=0,result=!0;if("[object Array]"==className){if(size=a.length,result=size==b.length)for(;size--&&(result=eq(a[size],b[size],aStack,bStack)););}else{var aCtor=a.constructor,bCtor=b.constructor;if(aCtor!==bCtor&&!(_.isFunction(aCtor)&&aCtor instanceof aCtor&&_.isFunction(bCtor)&&bCtor instanceof bCtor))return!1;for(var key in a)if(_.has(a,key)&&(size++,!(result=_.has(b,key)&&eq(a[key],b[key],aStack,bStack))))break;if(result){for(key in b)if(_.has(b,key)&&!size--)break;result=!size}}return aStack.pop(),bStack.pop(),result};_.isEqual=function(a,b){return eq(a,b,[],[])},_.isEmpty=function(obj){if(null==obj)return!0;if(_.isArray(obj)||_.isString(obj))return 0===obj.length;for(var key in obj)if(_.has(obj,key))return!1;return!0},_.isElement=function(obj){return!(!obj||1!==obj.nodeType)},_.isArray=nativeIsArray||function(obj){return"[object Array]"==toString.call(obj)},_.isObject=function(obj){return obj===Object(obj)},each(["Arguments","Function","String","Number","Date","RegExp"],function(name){_["is"+name]=function(obj){return toString.call(obj)=="[object "+name+"]"}}),_.isArguments(arguments)||(_.isArguments=function(obj){return!(!obj||!_.has(obj,"callee"))}),"function"!=typeof/./&&(_.isFunction=function(obj){return"function"==typeof obj}),_.isFinite=function(obj){return isFinite(obj)&&!isNaN(parseFloat(obj))},_.isNaN=function(obj){return _.isNumber(obj)&&obj!=+obj},_.isBoolean=function(obj){return obj===!0||obj===!1||"[object Boolean]"==toString.call(obj)},_.isNull=function(obj){return null===obj},_.isUndefined=function(obj){return void 0===obj},_.has=function(obj,key){return hasOwnProperty.call(obj,key)},_.noConflict=function(){return root._=previousUnderscore,this},_.identity=function(value){return value},_.times=function(n,iterator,context){for(var accum=Array(n),i=0;n>i;i++)accum[i]=iterator.call(context,i);return accum},_.random=function(min,max){return null==max&&(max=min,min=0),min+Math.floor(Math.random()*(max-min+1))};var entityMap={escape:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}};entityMap.unescape=_.invert(entityMap.escape);var entityRegexes={escape:new RegExp("["+_.keys(entityMap.escape).join("")+"]","g"),unescape:new RegExp("("+_.keys(entityMap.unescape).join("|")+")","g")};_.each(["escape","unescape"],function(method){_[method]=function(string){return null==string?"":(""+string).replace(entityRegexes[method],function(match){return entityMap[method][match]})}}),_.result=function(object,property){if(null==object)return null;var value=object[property];return _.isFunction(value)?value.call(object):value},_.mixin=function(obj){each(_.functions(obj),function(name){var func=_[name]=obj[name];_.prototype[name]=function(){var args=[this._wrapped];return push.apply(args,arguments),result.call(this,func.apply(_,args))}})};var idCounter=0;_.uniqueId=function(prefix){var id=++idCounter+"";return prefix?prefix+id:id},_.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var noMatch=/(.)^/,escapes={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},escaper=/\\|'|\r|\n|\t|\u2028|\u2029/g;_.template=function(text,data,settings){var render;settings=_.defaults({},settings,_.templateSettings);var matcher=new RegExp([(settings.escape||noMatch).source,(settings.interpolate||noMatch).source,(settings.evaluate||noMatch).source].join("|")+"|$","g"),index=0,source="__p+='";text.replace(matcher,function(match,escape,interpolate,evaluate,offset){return source+=text.slice(index,offset).replace(escaper,function(match){return"\\"+escapes[match]}),escape&&(source+="'+\n((__t=("+escape+"))==null?'':_.escape(__t))+\n'"),interpolate&&(source+="'+\n((__t=("+interpolate+"))==null?'':__t)+\n'"),evaluate&&(source+="';\n"+evaluate+"\n__p+='"),index=offset+match.length,match}),source+="';\n",settings.variable||(source="with(obj||{}){\n"+source+"}\n"),source="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+source+"return __p;\n";try{render=new Function(settings.variable||"obj","_",source)}catch(e){throw e.source=source,e}if(data)return render(data,_);var template=function(data){return render.call(this,data,_)};return template.source="function("+(settings.variable||"obj")+"){\n"+source+"}",template},_.chain=function(obj){return _(obj).chain()};var result=function(obj){return this._chain?_(obj).chain():obj};_.mixin(_),each(["pop","push","reverse","shift","sort","splice","unshift"],function(name){var method=ArrayProto[name];_.prototype[name]=function(){var obj=this._wrapped;return method.apply(obj,arguments),"shift"!=name&&"splice"!=name||0!==obj.length||delete obj[0],result.call(this,obj)}}),each(["concat","join","slice"],function(name){var method=ArrayProto[name];_.prototype[name]=function(){return result.call(this,method.apply(this._wrapped,arguments))}}),_.extend(_.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this)},{}],155:[function(require,module,exports){(function(Buffer){!function(sax){function SAXParser(strict,opt){if(!(this instanceof SAXParser))return new SAXParser(strict,opt);var parser=this;clearBuffers(parser),parser.q=parser.c="",parser.bufferCheckPosition=sax.MAX_BUFFER_LENGTH,parser.opt=opt||{},parser.opt.lowercase=parser.opt.lowercase||parser.opt.lowercasetags,parser.looseCase=parser.opt.lowercase?"toLowerCase":"toUpperCase",parser.tags=[],parser.closed=parser.closedRoot=parser.sawRoot=!1,parser.tag=parser.error=null,parser.strict=!!strict,parser.noscript=!(!strict&&!parser.opt.noscript),parser.state=S.BEGIN,parser.strictEntities=parser.opt.strictEntities,parser.ENTITIES=parser.strictEntities?Object.create(sax.XML_ENTITIES):Object.create(sax.ENTITIES),parser.attribList=[],parser.opt.xmlns&&(parser.ns=Object.create(rootNS)),parser.trackPosition=parser.opt.position!==!1,parser.trackPosition&&(parser.position=parser.line=parser.column=0),emit(parser,"onready")}function checkBufferLength(parser){for(var maxAllowed=Math.max(sax.MAX_BUFFER_LENGTH,10),maxActual=0,i=0,l=buffers.length;l>i;i++){var len=parser[buffers[i]].length;if(len>maxAllowed)switch(buffers[i]){case"textNode":closeText(parser);break;case"cdata":emitNode(parser,"oncdata",parser.cdata),parser.cdata="";break;case"script":emitNode(parser,"onscript",parser.script),parser.script="";break;default:error(parser,"Max buffer length exceeded: "+buffers[i])}maxActual=Math.max(maxActual,len)}var m=sax.MAX_BUFFER_LENGTH-maxActual;parser.bufferCheckPosition=m+parser.position}function clearBuffers(parser){for(var i=0,l=buffers.length;l>i;i++)parser[buffers[i]]=""}function flushBuffers(parser){closeText(parser),""!==parser.cdata&&(emitNode(parser,"oncdata",parser.cdata),parser.cdata=""),""!==parser.script&&(emitNode(parser,"onscript",parser.script),parser.script="")}function createStream(strict,opt){return new SAXStream(strict,opt)}function SAXStream(strict,opt){if(!(this instanceof SAXStream))return new SAXStream(strict,opt);Stream.apply(this),this._parser=new SAXParser(strict,opt),this.writable=!0,this.readable=!0;var me=this;this._parser.onend=function(){me.emit("end")},this._parser.onerror=function(er){me.emit("error",er),me._parser.error=null},this._decoder=null,streamWraps.forEach(function(ev){Object.defineProperty(me,"on"+ev,{get:function(){return me._parser["on"+ev]},set:function(h){return h?void me.on(ev,h):(me.removeAllListeners(ev),me._parser["on"+ev]=h,h)},enumerable:!0,configurable:!1})})}function charClass(str){return str.split("").reduce(function(s,c){return s[c]=!0,s},{})}function isRegExp(c){return"[object RegExp]"===Object.prototype.toString.call(c)}function is(charclass,c){return isRegExp(charclass)?!!c.match(charclass):charclass[c]}function not(charclass,c){return!is(charclass,c)}function emit(parser,event,data){parser[event]&&parser[event](data)}function emitNode(parser,nodeType,data){parser.textNode&&closeText(parser),emit(parser,nodeType,data)}function closeText(parser){parser.textNode=textopts(parser.opt,parser.textNode),parser.textNode&&emit(parser,"ontext",parser.textNode),parser.textNode=""}function textopts(opt,text){return opt.trim&&(text=text.trim()),opt.normalize&&(text=text.replace(/\s+/g," ")),text}function error(parser,er){return closeText(parser),parser.trackPosition&&(er+="\nLine: "+parser.line+"\nColumn: "+parser.column+"\nChar: "+parser.c),er=new Error(er),parser.error=er,emit(parser,"onerror",er),parser}function end(parser){return parser.sawRoot&&!parser.closedRoot&&strictFail(parser,"Unclosed root tag"),parser.state!==S.BEGIN&&parser.state!==S.BEGIN_WHITESPACE&&parser.state!==S.TEXT&&error(parser,"Unexpected end"),closeText(parser),parser.c="",parser.closed=!0,emit(parser,"onend"),SAXParser.call(parser,parser.strict,parser.opt),parser}function strictFail(parser,message){if("object"!=typeof parser||!(parser instanceof SAXParser))throw new Error("bad call to strictFail");parser.strict&&error(parser,message)}function newTag(parser){parser.strict||(parser.tagName=parser.tagName[parser.looseCase]());var parent=parser.tags[parser.tags.length-1]||parser,tag=parser.tag={name:parser.tagName,attributes:{}};parser.opt.xmlns&&(tag.ns=parent.ns),parser.attribList.length=0}function qname(name,attribute){var i=name.indexOf(":"),qualName=0>i?["",name]:name.split(":"),prefix=qualName[0],local=qualName[1];return attribute&&"xmlns"===name&&(prefix="xmlns",local=""),{prefix:prefix,local:local}}function attrib(parser){if(parser.strict||(parser.attribName=parser.attribName[parser.looseCase]()),-1!==parser.attribList.indexOf(parser.attribName)||parser.tag.attributes.hasOwnProperty(parser.attribName))return void(parser.attribName=parser.attribValue="");if(parser.opt.xmlns){var qn=qname(parser.attribName,!0),prefix=qn.prefix,local=qn.local;if("xmlns"===prefix)if("xml"===local&&parser.attribValue!==XML_NAMESPACE)strictFail(parser,"xml: prefix must be bound to "+XML_NAMESPACE+"\nActual: "+parser.attribValue);else if("xmlns"===local&&parser.attribValue!==XMLNS_NAMESPACE)strictFail(parser,"xmlns: prefix must be bound to "+XMLNS_NAMESPACE+"\nActual: "+parser.attribValue);else{var tag=parser.tag,parent=parser.tags[parser.tags.length-1]||parser;tag.ns===parent.ns&&(tag.ns=Object.create(parent.ns)),tag.ns[local]=parser.attribValue}parser.attribList.push([parser.attribName,parser.attribValue])}else parser.tag.attributes[parser.attribName]=parser.attribValue,emitNode(parser,"onattribute",{name:parser.attribName,value:parser.attribValue});parser.attribName=parser.attribValue=""}function openTag(parser,selfClosing){if(parser.opt.xmlns){var tag=parser.tag,qn=qname(parser.tagName);tag.prefix=qn.prefix,tag.local=qn.local,tag.uri=tag.ns[qn.prefix]||"",tag.prefix&&!tag.uri&&(strictFail(parser,"Unbound namespace prefix: "+JSON.stringify(parser.tagName)),tag.uri=qn.prefix);var parent=parser.tags[parser.tags.length-1]||parser;tag.ns&&parent.ns!==tag.ns&&Object.keys(tag.ns).forEach(function(p){emitNode(parser,"onopennamespace",{prefix:p,uri:tag.ns[p]})});for(var i=0,l=parser.attribList.length;l>i;i++){var nv=parser.attribList[i],name=nv[0],value=nv[1],qualName=qname(name,!0),prefix=qualName.prefix,local=qualName.local,uri=""===prefix?"":tag.ns[prefix]||"",a={name:name,value:value,prefix:prefix,local:local,uri:uri};prefix&&"xmlns"!==prefix&&!uri&&(strictFail(parser,"Unbound namespace prefix: "+JSON.stringify(prefix)),a.uri=prefix),parser.tag.attributes[name]=a,emitNode(parser,"onattribute",a)}parser.attribList.length=0}parser.tag.isSelfClosing=!!selfClosing,parser.sawRoot=!0,parser.tags.push(parser.tag),emitNode(parser,"onopentag",parser.tag),selfClosing||(parser.noscript||"script"!==parser.tagName.toLowerCase()?parser.state=S.TEXT:parser.state=S.SCRIPT,parser.tag=null,parser.tagName=""),parser.attribName=parser.attribValue="",parser.attribList.length=0}function closeTag(parser){if(!parser.tagName)return strictFail(parser,"Weird empty close tag."),parser.textNode+="",void(parser.state=S.TEXT);if(parser.script){if("script"!==parser.tagName)return parser.script+="",parser.tagName="",void(parser.state=S.SCRIPT);emitNode(parser,"onscript",parser.script),parser.script=""}var t=parser.tags.length,tagName=parser.tagName;parser.strict||(tagName=tagName[parser.looseCase]());for(var closeTo=tagName;t--;){var close=parser.tags[t];if(close.name===closeTo)break;strictFail(parser,"Unexpected close tag")}if(0>t)return strictFail(parser,"Unmatched closing tag: "+parser.tagName),parser.textNode+="",void(parser.state=S.TEXT);parser.tagName=tagName;for(var s=parser.tags.length;s-->t;){var tag=parser.tag=parser.tags.pop();parser.tagName=parser.tag.name,emitNode(parser,"onclosetag",parser.tagName);var x={};for(var i in tag.ns)x[i]=tag.ns[i];var parent=parser.tags[parser.tags.length-1]||parser;parser.opt.xmlns&&tag.ns!==parent.ns&&Object.keys(tag.ns).forEach(function(p){var n=tag.ns[p];emitNode(parser,"onclosenamespace",{prefix:p,uri:n})})}0===t&&(parser.closedRoot=!0),parser.tagName=parser.attribValue=parser.attribName="",parser.attribList.length=0,parser.state=S.TEXT}function parseEntity(parser){var num,entity=parser.entity,entityLC=entity.toLowerCase(),numStr="";return parser.ENTITIES[entity]?parser.ENTITIES[entity]:parser.ENTITIES[entityLC]?parser.ENTITIES[entityLC]:(entity=entityLC,"#"===entity.charAt(0)&&("x"===entity.charAt(1)?(entity=entity.slice(2),num=parseInt(entity,16),numStr=num.toString(16)):(entity=entity.slice(1),num=parseInt(entity,10),numStr=num.toString(10))),entity=entity.replace(/^0+/,""),numStr.toLowerCase()!==entity?(strictFail(parser,"Invalid character entity"),"&"+parser.entity+";"):String.fromCodePoint(num))}function beginWhiteSpace(parser,c){"<"===c?(parser.state=S.OPEN_WAKA,parser.startTagPosition=parser.position):not(whitespace,c)&&(strictFail(parser,"Non-whitespace before first tag."),parser.textNode=c,parser.state=S.TEXT)}function charAt(chunk,i){var result="";return i"===c?(emitNode(parser,"onsgmldeclaration",parser.sgmlDecl),parser.sgmlDecl="",parser.state=S.TEXT):is(quote,c)?(parser.state=S.SGML_DECL_QUOTED,parser.sgmlDecl+=c):parser.sgmlDecl+=c;continue;case S.SGML_DECL_QUOTED:c===parser.q&&(parser.state=S.SGML_DECL,parser.q=""),parser.sgmlDecl+=c;continue;case S.DOCTYPE:">"===c?(parser.state=S.TEXT,emitNode(parser,"ondoctype",parser.doctype),parser.doctype=!0):(parser.doctype+=c,"["===c?parser.state=S.DOCTYPE_DTD:is(quote,c)&&(parser.state=S.DOCTYPE_QUOTED,parser.q=c));continue;case S.DOCTYPE_QUOTED:parser.doctype+=c,c===parser.q&&(parser.q="",parser.state=S.DOCTYPE);continue;case S.DOCTYPE_DTD:parser.doctype+=c,"]"===c?parser.state=S.DOCTYPE:is(quote,c)&&(parser.state=S.DOCTYPE_DTD_QUOTED,parser.q=c);continue;case S.DOCTYPE_DTD_QUOTED:parser.doctype+=c,c===parser.q&&(parser.state=S.DOCTYPE_DTD,parser.q="");continue;case S.COMMENT:"-"===c?parser.state=S.COMMENT_ENDING:parser.comment+=c;continue;case S.COMMENT_ENDING:"-"===c?(parser.state=S.COMMENT_ENDED, +parser.comment=textopts(parser.opt,parser.comment),parser.comment&&emitNode(parser,"oncomment",parser.comment),parser.comment=""):(parser.comment+="-"+c,parser.state=S.COMMENT);continue;case S.COMMENT_ENDED:">"!==c?(strictFail(parser,"Malformed comment"),parser.comment+="--"+c,parser.state=S.COMMENT):parser.state=S.TEXT;continue;case S.CDATA:"]"===c?parser.state=S.CDATA_ENDING:parser.cdata+=c;continue;case S.CDATA_ENDING:"]"===c?parser.state=S.CDATA_ENDING_2:(parser.cdata+="]"+c,parser.state=S.CDATA);continue;case S.CDATA_ENDING_2:">"===c?(parser.cdata&&emitNode(parser,"oncdata",parser.cdata),emitNode(parser,"onclosecdata"),parser.cdata="",parser.state=S.TEXT):"]"===c?parser.cdata+="]":(parser.cdata+="]]"+c,parser.state=S.CDATA);continue;case S.PROC_INST:"?"===c?parser.state=S.PROC_INST_ENDING:is(whitespace,c)?parser.state=S.PROC_INST_BODY:parser.procInstName+=c;continue;case S.PROC_INST_BODY:if(!parser.procInstBody&&is(whitespace,c))continue;"?"===c?parser.state=S.PROC_INST_ENDING:parser.procInstBody+=c;continue;case S.PROC_INST_ENDING:">"===c?(emitNode(parser,"onprocessinginstruction",{name:parser.procInstName,body:parser.procInstBody}),parser.procInstName=parser.procInstBody="",parser.state=S.TEXT):(parser.procInstBody+="?"+c,parser.state=S.PROC_INST_BODY);continue;case S.OPEN_TAG:is(nameBody,c)?parser.tagName+=c:(newTag(parser),">"===c?openTag(parser):"/"===c?parser.state=S.OPEN_TAG_SLASH:(not(whitespace,c)&&strictFail(parser,"Invalid character in tag name"),parser.state=S.ATTRIB));continue;case S.OPEN_TAG_SLASH:">"===c?(openTag(parser,!0),closeTag(parser)):(strictFail(parser,"Forward-slash in opening tag not followed by >"),parser.state=S.ATTRIB);continue;case S.ATTRIB:if(is(whitespace,c))continue;">"===c?openTag(parser):"/"===c?parser.state=S.OPEN_TAG_SLASH:is(nameStart,c)?(parser.attribName=c,parser.attribValue="",parser.state=S.ATTRIB_NAME):strictFail(parser,"Invalid attribute name");continue;case S.ATTRIB_NAME:"="===c?parser.state=S.ATTRIB_VALUE:">"===c?(strictFail(parser,"Attribute without value"),parser.attribValue=parser.attribName,attrib(parser),openTag(parser)):is(whitespace,c)?parser.state=S.ATTRIB_NAME_SAW_WHITE:is(nameBody,c)?parser.attribName+=c:strictFail(parser,"Invalid attribute name");continue;case S.ATTRIB_NAME_SAW_WHITE:if("="===c)parser.state=S.ATTRIB_VALUE;else{if(is(whitespace,c))continue;strictFail(parser,"Attribute without value"),parser.tag.attributes[parser.attribName]="",parser.attribValue="",emitNode(parser,"onattribute",{name:parser.attribName,value:""}),parser.attribName="",">"===c?openTag(parser):is(nameStart,c)?(parser.attribName=c,parser.state=S.ATTRIB_NAME):(strictFail(parser,"Invalid attribute name"),parser.state=S.ATTRIB)}continue;case S.ATTRIB_VALUE:if(is(whitespace,c))continue;is(quote,c)?(parser.q=c,parser.state=S.ATTRIB_VALUE_QUOTED):(strictFail(parser,"Unquoted attribute value"),parser.state=S.ATTRIB_VALUE_UNQUOTED,parser.attribValue=c);continue;case S.ATTRIB_VALUE_QUOTED:if(c!==parser.q){"&"===c?parser.state=S.ATTRIB_VALUE_ENTITY_Q:parser.attribValue+=c;continue}attrib(parser),parser.q="",parser.state=S.ATTRIB_VALUE_CLOSED;continue;case S.ATTRIB_VALUE_CLOSED:is(whitespace,c)?parser.state=S.ATTRIB:">"===c?openTag(parser):"/"===c?parser.state=S.OPEN_TAG_SLASH:is(nameStart,c)?(strictFail(parser,"No whitespace between attributes"),parser.attribName=c,parser.attribValue="",parser.state=S.ATTRIB_NAME):strictFail(parser,"Invalid attribute name");continue;case S.ATTRIB_VALUE_UNQUOTED:if(not(attribEnd,c)){"&"===c?parser.state=S.ATTRIB_VALUE_ENTITY_U:parser.attribValue+=c;continue}attrib(parser),">"===c?openTag(parser):parser.state=S.ATTRIB;continue;case S.CLOSE_TAG:if(parser.tagName)">"===c?closeTag(parser):is(nameBody,c)?parser.tagName+=c:parser.script?(parser.script+=""===c?closeTag(parser):strictFail(parser,"Invalid characters in closing tag");continue;case S.TEXT_ENTITY:case S.ATTRIB_VALUE_ENTITY_Q:case S.ATTRIB_VALUE_ENTITY_U:var returnState,buffer;switch(parser.state){case S.TEXT_ENTITY:returnState=S.TEXT,buffer="textNode";break;case S.ATTRIB_VALUE_ENTITY_Q:returnState=S.ATTRIB_VALUE_QUOTED,buffer="attribValue";break;case S.ATTRIB_VALUE_ENTITY_U:returnState=S.ATTRIB_VALUE_UNQUOTED,buffer="attribValue"}";"===c?(parser[buffer]+=parseEntity(parser),parser.entity="",parser.state=returnState):is(parser.entity.length?entityBody:entityStart,c)?parser.entity+=c:(strictFail(parser,"Invalid character in entity name"),parser[buffer]+="&"+parser.entity+c,parser.entity="",parser.state=returnState);continue;default:throw new Error(parser,"Unknown state: "+parser.state)}}return parser.position>=parser.bufferCheckPosition&&checkBufferLength(parser),parser}sax.parser=function(strict,opt){return new SAXParser(strict,opt)},sax.SAXParser=SAXParser,sax.SAXStream=SAXStream,sax.createStream=createStream,sax.MAX_BUFFER_LENGTH=65536;var buffers=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];sax.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(o){function F(){}F.prototype=o;var newf=new F;return newf}),Object.keys||(Object.keys=function(o){var a=[];for(var i in o)o.hasOwnProperty(i)&&a.push(i);return a}),SAXParser.prototype={end:function(){end(this)},write:write,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){flushBuffers(this)}};var Stream;try{Stream=require("stream").Stream}catch(ex){Stream=function(){}}var streamWraps=sax.EVENTS.filter(function(ev){return"error"!==ev&&"end"!==ev});SAXStream.prototype=Object.create(Stream.prototype,{constructor:{value:SAXStream}}),SAXStream.prototype.write=function(data){if("function"==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(data)){if(!this._decoder){var SD=require("string_decoder").StringDecoder;this._decoder=new SD("utf8")}data=this._decoder.write(data)}return this._parser.write(data.toString()),this.emit("data",data),!0},SAXStream.prototype.end=function(chunk){return chunk&&chunk.length&&this.write(chunk),this._parser.end(),!0},SAXStream.prototype.on=function(ev,handler){var me=this;return me._parser["on"+ev]||-1===streamWraps.indexOf(ev)||(me._parser["on"+ev]=function(){var args=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);args.splice(0,0,ev),me.emit.apply(me,args)}),Stream.prototype.on.call(me,ev,handler)};var whitespace="\r\n ",number="0124356789",letter="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",quote="'\"",attribEnd=whitespace+">",CDATA="[CDATA[",DOCTYPE="DOCTYPE",XML_NAMESPACE="http://www.w3.org/XML/1998/namespace",XMLNS_NAMESPACE="http://www.w3.org/2000/xmlns/",rootNS={xml:XML_NAMESPACE,xmlns:XMLNS_NAMESPACE};whitespace=charClass(whitespace),number=charClass(number),letter=charClass(letter);var nameStart=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,nameBody=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/,entityStart=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,entityBody=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;quote=charClass(quote),attribEnd=charClass(attribEnd);var S=0;sax.STATE={BEGIN:S++,BEGIN_WHITESPACE:S++,TEXT:S++,TEXT_ENTITY:S++,OPEN_WAKA:S++,SGML_DECL:S++,SGML_DECL_QUOTED:S++,DOCTYPE:S++,DOCTYPE_QUOTED:S++,DOCTYPE_DTD:S++,DOCTYPE_DTD_QUOTED:S++,COMMENT_STARTING:S++,COMMENT:S++,COMMENT_ENDING:S++,COMMENT_ENDED:S++,CDATA:S++,CDATA_ENDING:S++,CDATA_ENDING_2:S++,PROC_INST:S++,PROC_INST_BODY:S++,PROC_INST_ENDING:S++,OPEN_TAG:S++,OPEN_TAG_SLASH:S++,ATTRIB:S++,ATTRIB_NAME:S++,ATTRIB_NAME_SAW_WHITE:S++,ATTRIB_VALUE:S++,ATTRIB_VALUE_QUOTED:S++,ATTRIB_VALUE_CLOSED:S++,ATTRIB_VALUE_UNQUOTED:S++,ATTRIB_VALUE_ENTITY_Q:S++,ATTRIB_VALUE_ENTITY_U:S++,CLOSE_TAG:S++,CLOSE_TAG_SAW_WHITE:S++,SCRIPT:S++,SCRIPT_ENDING:S++},sax.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},sax.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,"int":8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(sax.ENTITIES).forEach(function(key){var e=sax.ENTITIES[key],s="number"==typeof e?String.fromCharCode(e):e;sax.ENTITIES[key]=s});for(var s in sax.STATE)sax.STATE[sax.STATE[s]]=s;S=sax.STATE,String.fromCodePoint||!function(){var stringFromCharCode=String.fromCharCode,floor=Math.floor,fromCodePoint=function(){var highSurrogate,lowSurrogate,MAX_SIZE=16384,codeUnits=[],index=-1,length=arguments.length;if(!length)return"";for(var result="";++indexcodePoint||codePoint>1114111||floor(codePoint)!==codePoint)throw RangeError("Invalid code point: "+codePoint);65535>=codePoint?codeUnits.push(codePoint):(codePoint-=65536,highSurrogate=(codePoint>>10)+55296,lowSurrogate=codePoint%1024+56320,codeUnits.push(highSurrogate,lowSurrogate)),(index+1===length||codeUnits.length>MAX_SIZE)&&(result+=stringFromCharCode.apply(null,codeUnits),codeUnits.length=0)}return result};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:fromCodePoint,configurable:!0,writable:!0}):String.fromCodePoint=fromCodePoint}()}("undefined"==typeof exports?this.sax={}:exports)}).call(this,require("buffer").Buffer)},{buffer:75,stream:99,string_decoder:100}],156:[function(require,module,exports){(function(){function createReduce(dir){function iterator(obj,iteratee,memo,keys,index,length){for(;index>=0&&length>index;index+=dir){var currentKey=keys?keys[index]:index;memo=iteratee(memo,obj[currentKey],currentKey,obj)}return memo}return function(obj,iteratee,memo,context){iteratee=optimizeCb(iteratee,context,4);var keys=!isArrayLike(obj)&&_.keys(obj),length=(keys||obj).length,index=dir>0?0:length-1;return arguments.length<3&&(memo=obj[keys?keys[index]:index],index+=dir),iterator(obj,iteratee,memo,keys,index,length)}}function createPredicateIndexFinder(dir){return function(array,predicate,context){predicate=cb(predicate,context);for(var length=getLength(array),index=dir>0?0:length-1;index>=0&&length>index;index+=dir)if(predicate(array[index],index,array))return index;return-1}}function createIndexFinder(dir,predicateFind,sortedIndex){return function(array,item,idx){var i=0,length=getLength(array);if("number"==typeof idx)dir>0?i=idx>=0?idx:Math.max(idx+length,i):length=idx>=0?Math.min(idx+1,length):idx+length+1;else if(sortedIndex&&idx&&length)return idx=sortedIndex(array,item),array[idx]===item?idx:-1;if(item!==item)return idx=predicateFind(slice.call(array,i,length),_.isNaN),idx>=0?idx+i:-1;for(idx=dir>0?i:length-1;idx>=0&&length>idx;idx+=dir)if(array[idx]===item)return idx;return-1}}function collectNonEnumProps(obj,keys){var nonEnumIdx=nonEnumerableProps.length,constructor=obj.constructor,proto=_.isFunction(constructor)&&constructor.prototype||ObjProto,prop="constructor";for(_.has(obj,prop)&&!_.contains(keys,prop)&&keys.push(prop);nonEnumIdx--;)prop=nonEnumerableProps[nonEnumIdx],prop in obj&&obj[prop]!==proto[prop]&&!_.contains(keys,prop)&&keys.push(prop)}var root=this,previousUnderscore=root._,ArrayProto=Array.prototype,ObjProto=Object.prototype,FuncProto=Function.prototype,push=ArrayProto.push,slice=ArrayProto.slice,toString=ObjProto.toString,hasOwnProperty=ObjProto.hasOwnProperty,nativeIsArray=Array.isArray,nativeKeys=Object.keys,nativeBind=FuncProto.bind,nativeCreate=Object.create,Ctor=function(){},_=function(obj){return obj instanceof _?obj:this instanceof _?void(this._wrapped=obj):new _(obj)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=_),exports._=_):root._=_,_.VERSION="1.8.3";var optimizeCb=function(func,context,argCount){if(void 0===context)return func;switch(null==argCount?3:argCount){case 1:return function(value){return func.call(context,value)};case 2:return function(value,other){return func.call(context,value,other)};case 3:return function(value,index,collection){return func.call(context,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(context,accumulator,value,index,collection)}}return function(){return func.apply(context,arguments)}},cb=function(value,context,argCount){return null==value?_.identity:_.isFunction(value)?optimizeCb(value,context,argCount):_.isObject(value)?_.matcher(value):_.property(value)};_.iteratee=function(value,context){return cb(value,context,1/0)};var createAssigner=function(keysFunc,undefinedOnly){return function(obj){var length=arguments.length;if(2>length||null==obj)return obj;for(var index=1;length>index;index++)for(var source=arguments[index],keys=keysFunc(source),l=keys.length,i=0;l>i;i++){var key=keys[i];undefinedOnly&&void 0!==obj[key]||(obj[key]=source[key])}return obj}},baseCreate=function(prototype){if(!_.isObject(prototype))return{};if(nativeCreate)return nativeCreate(prototype);Ctor.prototype=prototype;var result=new Ctor;return Ctor.prototype=null,result},property=function(key){return function(obj){return null==obj?void 0:obj[key]}},MAX_ARRAY_INDEX=Math.pow(2,53)-1,getLength=property("length"),isArrayLike=function(collection){var length=getLength(collection);return"number"==typeof length&&length>=0&&MAX_ARRAY_INDEX>=length};_.each=_.forEach=function(obj,iteratee,context){iteratee=optimizeCb(iteratee,context);var i,length;if(isArrayLike(obj))for(i=0,length=obj.length;length>i;i++)iteratee(obj[i],i,obj);else{var keys=_.keys(obj);for(i=0,length=keys.length;length>i;i++)iteratee(obj[keys[i]],keys[i],obj)}return obj},_.map=_.collect=function(obj,iteratee,context){iteratee=cb(iteratee,context);for(var keys=!isArrayLike(obj)&&_.keys(obj),length=(keys||obj).length,results=Array(length),index=0;length>index;index++){var currentKey=keys?keys[index]:index;results[index]=iteratee(obj[currentKey],currentKey,obj)}return results},_.reduce=_.foldl=_.inject=createReduce(1),_.reduceRight=_.foldr=createReduce(-1),_.find=_.detect=function(obj,predicate,context){var key;return key=isArrayLike(obj)?_.findIndex(obj,predicate,context):_.findKey(obj,predicate,context),void 0!==key&&-1!==key?obj[key]:void 0},_.filter=_.select=function(obj,predicate,context){var results=[];return predicate=cb(predicate,context),_.each(obj,function(value,index,list){predicate(value,index,list)&&results.push(value)}),results},_.reject=function(obj,predicate,context){return _.filter(obj,_.negate(cb(predicate)),context)},_.every=_.all=function(obj,predicate,context){predicate=cb(predicate,context);for(var keys=!isArrayLike(obj)&&_.keys(obj),length=(keys||obj).length,index=0;length>index;index++){var currentKey=keys?keys[index]:index;if(!predicate(obj[currentKey],currentKey,obj))return!1}return!0},_.some=_.any=function(obj,predicate,context){predicate=cb(predicate,context);for(var keys=!isArrayLike(obj)&&_.keys(obj),length=(keys||obj).length,index=0;length>index;index++){var currentKey=keys?keys[index]:index;if(predicate(obj[currentKey],currentKey,obj))return!0}return!1},_.contains=_.includes=_.include=function(obj,item,fromIndex,guard){return isArrayLike(obj)||(obj=_.values(obj)),("number"!=typeof fromIndex||guard)&&(fromIndex=0),_.indexOf(obj,item,fromIndex)>=0},_.invoke=function(obj,method){var args=slice.call(arguments,2),isFunc=_.isFunction(method);return _.map(obj,function(value){var func=isFunc?method:value[method];return null==func?func:func.apply(value,args)})},_.pluck=function(obj,key){return _.map(obj,_.property(key))},_.where=function(obj,attrs){return _.filter(obj,_.matcher(attrs))},_.findWhere=function(obj,attrs){return _.find(obj,_.matcher(attrs))},_.max=function(obj,iteratee,context){var value,computed,result=-(1/0),lastComputed=-(1/0);if(null==iteratee&&null!=obj){obj=isArrayLike(obj)?obj:_.values(obj);for(var i=0,length=obj.length;length>i;i++)value=obj[i],value>result&&(result=value)}else iteratee=cb(iteratee,context),_.each(obj,function(value,index,list){computed=iteratee(value,index,list),(computed>lastComputed||computed===-(1/0)&&result===-(1/0))&&(result=value,lastComputed=computed)});return result},_.min=function(obj,iteratee,context){var value,computed,result=1/0,lastComputed=1/0;if(null==iteratee&&null!=obj){obj=isArrayLike(obj)?obj:_.values(obj);for(var i=0,length=obj.length;length>i;i++)value=obj[i],result>value&&(result=value)}else iteratee=cb(iteratee,context),_.each(obj,function(value,index,list){computed=iteratee(value,index,list),(lastComputed>computed||computed===1/0&&result===1/0)&&(result=value,lastComputed=computed)});return result},_.shuffle=function(obj){for(var rand,set=isArrayLike(obj)?obj:_.values(obj),length=set.length,shuffled=Array(length),index=0;length>index;index++)rand=_.random(0,index),rand!==index&&(shuffled[index]=shuffled[rand]),shuffled[rand]=set[index];return shuffled},_.sample=function(obj,n,guard){return null==n||guard?(isArrayLike(obj)||(obj=_.values(obj)),obj[_.random(obj.length-1)]):_.shuffle(obj).slice(0,Math.max(0,n))},_.sortBy=function(obj,iteratee,context){return iteratee=cb(iteratee,context),_.pluck(_.map(obj,function(value,index,list){return{value:value,index:index,criteria:iteratee(value,index,list)}}).sort(function(left,right){var a=left.criteria,b=right.criteria;if(a!==b){if(a>b||void 0===a)return 1;if(b>a||void 0===b)return-1}return left.index-right.index}),"value")};var group=function(behavior){return function(obj,iteratee,context){var result={};return iteratee=cb(iteratee,context),_.each(obj,function(value,index){var key=iteratee(value,index,obj);behavior(result,value,key)}),result}};_.groupBy=group(function(result,value,key){_.has(result,key)?result[key].push(value):result[key]=[value]}),_.indexBy=group(function(result,value,key){result[key]=value}),_.countBy=group(function(result,value,key){_.has(result,key)?result[key]++:result[key]=1}),_.toArray=function(obj){return obj?_.isArray(obj)?slice.call(obj):isArrayLike(obj)?_.map(obj,_.identity):_.values(obj):[]},_.size=function(obj){return null==obj?0:isArrayLike(obj)?obj.length:_.keys(obj).length},_.partition=function(obj,predicate,context){predicate=cb(predicate,context);var pass=[],fail=[];return _.each(obj,function(value,key,obj){(predicate(value,key,obj)?pass:fail).push(value)}),[pass,fail]},_.first=_.head=_.take=function(array,n,guard){return null==array?void 0:null==n||guard?array[0]:_.initial(array,array.length-n)},_.initial=function(array,n,guard){return slice.call(array,0,Math.max(0,array.length-(null==n||guard?1:n)))},_.last=function(array,n,guard){return null==array?void 0:null==n||guard?array[array.length-1]:_.rest(array,Math.max(0,array.length-n))},_.rest=_.tail=_.drop=function(array,n,guard){return slice.call(array,null==n||guard?1:n)},_.compact=function(array){return _.filter(array,_.identity)};var flatten=function(input,shallow,strict,startIndex){for(var output=[],idx=0,i=startIndex||0,length=getLength(input);length>i;i++){var value=input[i];if(isArrayLike(value)&&(_.isArray(value)||_.isArguments(value))){shallow||(value=flatten(value,shallow,strict));var j=0,len=value.length;for(output.length+=len;len>j;)output[idx++]=value[j++]}else strict||(output[idx++]=value)}return output};_.flatten=function(array,shallow){return flatten(array,shallow,!1)},_.without=function(array){return _.difference(array,slice.call(arguments,1))},_.uniq=_.unique=function(array,isSorted,iteratee,context){_.isBoolean(isSorted)||(context=iteratee,iteratee=isSorted,isSorted=!1),null!=iteratee&&(iteratee=cb(iteratee,context));for(var result=[],seen=[],i=0,length=getLength(array);length>i;i++){var value=array[i],computed=iteratee?iteratee(value,i,array):value;isSorted?(i&&seen===computed||result.push(value),seen=computed):iteratee?_.contains(seen,computed)||(seen.push(computed),result.push(value)):_.contains(result,value)||result.push(value)}return result},_.union=function(){return _.uniq(flatten(arguments,!0,!0))},_.intersection=function(array){for(var result=[],argsLength=arguments.length,i=0,length=getLength(array);length>i;i++){var item=array[i];if(!_.contains(result,item)){for(var j=1;argsLength>j&&_.contains(arguments[j],item);j++);j===argsLength&&result.push(item)}}return result},_.difference=function(array){var rest=flatten(arguments,!0,!0,1);return _.filter(array,function(value){return!_.contains(rest,value)})},_.zip=function(){return _.unzip(arguments)},_.unzip=function(array){for(var length=array&&_.max(array,getLength).length||0,result=Array(length),index=0;length>index;index++)result[index]=_.pluck(array,index);return result},_.object=function(list,values){for(var result={},i=0,length=getLength(list);length>i;i++)values?result[list[i]]=values[i]:result[list[i][0]]=list[i][1];return result},_.findIndex=createPredicateIndexFinder(1),_.findLastIndex=createPredicateIndexFinder(-1),_.sortedIndex=function(array,obj,iteratee,context){iteratee=cb(iteratee,context,1);for(var value=iteratee(obj),low=0,high=getLength(array);high>low;){var mid=Math.floor((low+high)/2);iteratee(array[mid])idx;idx++,start+=step)range[idx]=start;return range};var executeBound=function(sourceFunc,boundFunc,context,callingContext,args){if(!(callingContext instanceof boundFunc))return sourceFunc.apply(context,args);var self=baseCreate(sourceFunc.prototype),result=sourceFunc.apply(self,args);return _.isObject(result)?result:self};_.bind=function(func,context){if(nativeBind&&func.bind===nativeBind)return nativeBind.apply(func,slice.call(arguments,1));if(!_.isFunction(func))throw new TypeError("Bind must be called on a function");var args=slice.call(arguments,2),bound=function(){return executeBound(func,bound,context,this,args.concat(slice.call(arguments)))};return bound},_.partial=function(func){var boundArgs=slice.call(arguments,1),bound=function(){for(var position=0,length=boundArgs.length,args=Array(length),i=0;length>i;i++)args[i]=boundArgs[i]===_?arguments[position++]:boundArgs[i];for(;position=length)throw new Error("bindAll must be passed function names");for(i=1;length>i;i++)key=arguments[i],obj[key]=_.bind(obj[key],obj);return obj},_.memoize=function(func,hasher){var memoize=function(key){var cache=memoize.cache,address=""+(hasher?hasher.apply(this,arguments):key);return _.has(cache,address)||(cache[address]=func.apply(this,arguments)),cache[address]};return memoize.cache={},memoize},_.delay=function(func,wait){var args=slice.call(arguments,2);return setTimeout(function(){return func.apply(null,args)},wait)},_.defer=_.partial(_.delay,_,1),_.throttle=function(func,wait,options){var context,args,result,timeout=null,previous=0;options||(options={});var later=function(){previous=options.leading===!1?0:_.now(),timeout=null,result=func.apply(context,args),timeout||(context=args=null)};return function(){var now=_.now();previous||options.leading!==!1||(previous=now);var remaining=wait-(now-previous);return context=this,args=arguments,0>=remaining||remaining>wait?(timeout&&(clearTimeout(timeout),timeout=null),previous=now,result=func.apply(context,args),timeout||(context=args=null)):timeout||options.trailing===!1||(timeout=setTimeout(later,remaining)),result}},_.debounce=function(func,wait,immediate){var timeout,args,context,timestamp,result,later=function(){var last=_.now()-timestamp;wait>last&&last>=0?timeout=setTimeout(later,wait-last):(timeout=null,immediate||(result=func.apply(context,args),timeout||(context=args=null)))};return function(){context=this,args=arguments,timestamp=_.now();var callNow=immediate&&!timeout;return timeout||(timeout=setTimeout(later,wait)),callNow&&(result=func.apply(context,args),context=args=null),result}},_.wrap=function(func,wrapper){return _.partial(wrapper,func)},_.negate=function(predicate){return function(){return!predicate.apply(this,arguments)}},_.compose=function(){var args=arguments,start=args.length-1;return function(){for(var i=start,result=args[start].apply(this,arguments);i--;)result=args[i].call(this,result);return result}},_.after=function(times,func){return function(){return--times<1?func.apply(this,arguments):void 0}},_.before=function(times,func){var memo;return function(){return--times>0&&(memo=func.apply(this,arguments)),1>=times&&(func=null),memo}},_.once=_.partial(_.before,2);var hasEnumBug=!{toString:null}.propertyIsEnumerable("toString"),nonEnumerableProps=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];_.keys=function(obj){if(!_.isObject(obj))return[];if(nativeKeys)return nativeKeys(obj);var keys=[];for(var key in obj)_.has(obj,key)&&keys.push(key);return hasEnumBug&&collectNonEnumProps(obj,keys),keys},_.allKeys=function(obj){if(!_.isObject(obj))return[];var keys=[];for(var key in obj)keys.push(key);return hasEnumBug&&collectNonEnumProps(obj,keys),keys},_.values=function(obj){for(var keys=_.keys(obj),length=keys.length,values=Array(length),i=0;length>i;i++)values[i]=obj[keys[i]];return values},_.mapObject=function(obj,iteratee,context){iteratee=cb(iteratee,context);for(var currentKey,keys=_.keys(obj),length=keys.length,results={},index=0;length>index;index++)currentKey=keys[index],results[currentKey]=iteratee(obj[currentKey],currentKey,obj);return results},_.pairs=function(obj){for(var keys=_.keys(obj),length=keys.length,pairs=Array(length),i=0;length>i;i++)pairs[i]=[keys[i],obj[keys[i]]];return pairs},_.invert=function(obj){for(var result={},keys=_.keys(obj),i=0,length=keys.length;length>i;i++)result[obj[keys[i]]]=keys[i];return result},_.functions=_.methods=function(obj){var names=[];for(var key in obj)_.isFunction(obj[key])&&names.push(key);return names.sort()},_.extend=createAssigner(_.allKeys),_.extendOwn=_.assign=createAssigner(_.keys),_.findKey=function(obj,predicate,context){predicate=cb(predicate,context);for(var key,keys=_.keys(obj),i=0,length=keys.length;length>i;i++)if(key=keys[i],predicate(obj[key],key,obj))return key},_.pick=function(object,oiteratee,context){var iteratee,keys,result={},obj=object;if(null==obj)return result;_.isFunction(oiteratee)?(keys=_.allKeys(obj),iteratee=optimizeCb(oiteratee,context)):(keys=flatten(arguments,!1,!1,1),iteratee=function(value,key,obj){return key in obj},obj=Object(obj));for(var i=0,length=keys.length;length>i;i++){var key=keys[i],value=obj[key];iteratee(value,key,obj)&&(result[key]=value)}return result},_.omit=function(obj,iteratee,context){if(_.isFunction(iteratee))iteratee=_.negate(iteratee);else{var keys=_.map(flatten(arguments,!1,!1,1),String);iteratee=function(value,key){return!_.contains(keys,key)}}return _.pick(obj,iteratee,context)},_.defaults=createAssigner(_.allKeys,!0),_.create=function(prototype,props){var result=baseCreate(prototype);return props&&_.extendOwn(result,props),result},_.clone=function(obj){return _.isObject(obj)?_.isArray(obj)?obj.slice():_.extend({},obj):obj},_.tap=function(obj,interceptor){return interceptor(obj),obj},_.isMatch=function(object,attrs){var keys=_.keys(attrs),length=keys.length;if(null==object)return!length;for(var obj=Object(object),i=0;length>i;i++){var key=keys[i];if(attrs[key]!==obj[key]||!(key in obj))return!1}return!0};var eq=function(a,b,aStack,bStack){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;a instanceof _&&(a=a._wrapped),b instanceof _&&(b=b._wrapped);var className=toString.call(a);if(className!==toString.call(b))return!1;switch(className){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var areArrays="[object Array]"===className;if(!areArrays){if("object"!=typeof a||"object"!=typeof b)return!1;var aCtor=a.constructor,bCtor=b.constructor;if(aCtor!==bCtor&&!(_.isFunction(aCtor)&&aCtor instanceof aCtor&&_.isFunction(bCtor)&&bCtor instanceof bCtor)&&"constructor"in a&&"constructor"in b)return!1}aStack=aStack||[],bStack=bStack||[];for(var length=aStack.length;length--;)if(aStack[length]===a)return bStack[length]===b;if(aStack.push(a),bStack.push(b),areArrays){if(length=a.length,length!==b.length)return!1;for(;length--;)if(!eq(a[length],b[length],aStack,bStack))return!1}else{var key,keys=_.keys(a);if(length=keys.length,_.keys(b).length!==length)return!1;for(;length--;)if(key=keys[length],!_.has(b,key)||!eq(a[key],b[key],aStack,bStack))return!1}return aStack.pop(), +bStack.pop(),!0};_.isEqual=function(a,b){return eq(a,b)},_.isEmpty=function(obj){return null==obj?!0:isArrayLike(obj)&&(_.isArray(obj)||_.isString(obj)||_.isArguments(obj))?0===obj.length:0===_.keys(obj).length},_.isElement=function(obj){return!(!obj||1!==obj.nodeType)},_.isArray=nativeIsArray||function(obj){return"[object Array]"===toString.call(obj)},_.isObject=function(obj){var type=typeof obj;return"function"===type||"object"===type&&!!obj},_.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(name){_["is"+name]=function(obj){return toString.call(obj)==="[object "+name+"]"}}),_.isArguments(arguments)||(_.isArguments=function(obj){return _.has(obj,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(_.isFunction=function(obj){return"function"==typeof obj||!1}),_.isFinite=function(obj){return isFinite(obj)&&!isNaN(parseFloat(obj))},_.isNaN=function(obj){return _.isNumber(obj)&&obj!==+obj},_.isBoolean=function(obj){return obj===!0||obj===!1||"[object Boolean]"===toString.call(obj)},_.isNull=function(obj){return null===obj},_.isUndefined=function(obj){return void 0===obj},_.has=function(obj,key){return null!=obj&&hasOwnProperty.call(obj,key)},_.noConflict=function(){return root._=previousUnderscore,this},_.identity=function(value){return value},_.constant=function(value){return function(){return value}},_.noop=function(){},_.property=property,_.propertyOf=function(obj){return null==obj?function(){}:function(key){return obj[key]}},_.matcher=_.matches=function(attrs){return attrs=_.extendOwn({},attrs),function(obj){return _.isMatch(obj,attrs)}},_.times=function(n,iteratee,context){var accum=Array(Math.max(0,n));iteratee=optimizeCb(iteratee,context,1);for(var i=0;n>i;i++)accum[i]=iteratee(i);return accum},_.random=function(min,max){return null==max&&(max=min,min=0),min+Math.floor(Math.random()*(max-min+1))},_.now=Date.now||function(){return(new Date).getTime()};var escapeMap={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},unescapeMap=_.invert(escapeMap),createEscaper=function(map){var escaper=function(match){return map[match]},source="(?:"+_.keys(map).join("|")+")",testRegexp=RegExp(source),replaceRegexp=RegExp(source,"g");return function(string){return string=null==string?"":""+string,testRegexp.test(string)?string.replace(replaceRegexp,escaper):string}};_.escape=createEscaper(escapeMap),_.unescape=createEscaper(unescapeMap),_.result=function(object,property,fallback){var value=null==object?void 0:object[property];return void 0===value&&(value=fallback),_.isFunction(value)?value.call(object):value};var idCounter=0;_.uniqueId=function(prefix){var id=++idCounter+"";return prefix?prefix+id:id},_.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var noMatch=/(.)^/,escapes={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},escaper=/\\|'|\r|\n|\u2028|\u2029/g,escapeChar=function(match){return"\\"+escapes[match]};_.template=function(text,settings,oldSettings){!settings&&oldSettings&&(settings=oldSettings),settings=_.defaults({},settings,_.templateSettings);var matcher=RegExp([(settings.escape||noMatch).source,(settings.interpolate||noMatch).source,(settings.evaluate||noMatch).source].join("|")+"|$","g"),index=0,source="__p+='";text.replace(matcher,function(match,escape,interpolate,evaluate,offset){return source+=text.slice(index,offset).replace(escaper,escapeChar),index=offset+match.length,escape?source+="'+\n((__t=("+escape+"))==null?'':_.escape(__t))+\n'":interpolate?source+="'+\n((__t=("+interpolate+"))==null?'':__t)+\n'":evaluate&&(source+="';\n"+evaluate+"\n__p+='"),match}),source+="';\n",settings.variable||(source="with(obj||{}){\n"+source+"}\n"),source="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+source+"return __p;\n";try{var render=new Function(settings.variable||"obj","_",source)}catch(e){throw e.source=source,e}var template=function(data){return render.call(this,data,_)},argument=settings.variable||"obj";return template.source="function("+argument+"){\n"+source+"}",template},_.chain=function(obj){var instance=_(obj);return instance._chain=!0,instance};var result=function(instance,obj){return instance._chain?_(obj).chain():obj};_.mixin=function(obj){_.each(_.functions(obj),function(name){var func=_[name]=obj[name];_.prototype[name]=function(){var args=[this._wrapped];return push.apply(args,arguments),result(this,func.apply(_,args))}})},_.mixin(_),_.each(["pop","push","reverse","shift","sort","splice","unshift"],function(name){var method=ArrayProto[name];_.prototype[name]=function(){var obj=this._wrapped;return method.apply(obj,arguments),"shift"!==name&&"splice"!==name||0!==obj.length||delete obj[0],result(this,obj)}}),_.each(["concat","join","slice"],function(name){var method=ArrayProto[name];_.prototype[name]=function(){return result(this,method.apply(this._wrapped,arguments))}}),_.prototype.value=function(){return this._wrapped},_.prototype.valueOf=_.prototype.toJSON=_.prototype.value,_.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return _})}).call(this)},{}],157:[function(require,module,exports){(function(){var XMLAttribute,create;create=require("lodash/object/create"),module.exports=XMLAttribute=function(){function XMLAttribute(parent,name,value){if(this.stringify=parent.stringify,null==name)throw new Error("Missing attribute name of element "+parent.name);if(null==value)throw new Error("Missing attribute value for attribute "+name+" of element "+parent.name);this.name=this.stringify.attName(name),this.value=this.stringify.attValue(value)}return XMLAttribute.prototype.clone=function(){return create(XMLAttribute.prototype,this)},XMLAttribute.prototype.toString=function(options,level){return" "+this.name+'="'+this.value+'"'},XMLAttribute}()}).call(this)},{"lodash/object/create":227}],158:[function(require,module,exports){(function(){var XMLBuilder,XMLDeclaration,XMLDocType,XMLElement,XMLStringifier;XMLStringifier=require("./XMLStringifier"),XMLDeclaration=require("./XMLDeclaration"),XMLDocType=require("./XMLDocType"),XMLElement=require("./XMLElement"),module.exports=XMLBuilder=function(){function XMLBuilder(name,options){var root,temp;if(null==name)throw new Error("Root element needs a name");null==options&&(options={}),this.options=options,this.stringify=new XMLStringifier(options),temp=new XMLElement(this,"doc"),root=temp.element(name),root.isRoot=!0,root.documentObject=this,this.rootObject=root,options.headless||(root.declaration(options),(null!=options.pubID||null!=options.sysID)&&root.doctype(options))}return XMLBuilder.prototype.root=function(){return this.rootObject},XMLBuilder.prototype.end=function(options){return this.toString(options)},XMLBuilder.prototype.toString=function(options){var indent,newline,offset,pretty,r,ref,ref1,ref2;return pretty=(null!=options?options.pretty:void 0)||!1,indent=null!=(ref=null!=options?options.indent:void 0)?ref:" ",offset=null!=(ref1=null!=options?options.offset:void 0)?ref1:0,newline=null!=(ref2=null!=options?options.newline:void 0)?ref2:"\n",r="",null!=this.xmldec&&(r+=this.xmldec.toString(options)),null!=this.doctype&&(r+=this.doctype.toString(options)),r+=this.rootObject.toString(options),pretty&&r.slice(-newline.length)===newline&&(r=r.slice(0,-newline.length)),r},XMLBuilder}()}).call(this)},{"./XMLDeclaration":165,"./XMLDocType":166,"./XMLElement":167,"./XMLStringifier":171}],159:[function(require,module,exports){(function(){var XMLCData,XMLNode,create,extend=function(child,parent){function ctor(){this.constructor=child}for(var key in parent)hasProp.call(parent,key)&&(child[key]=parent[key]);return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child},hasProp={}.hasOwnProperty;create=require("lodash/object/create"),XMLNode=require("./XMLNode"),module.exports=XMLCData=function(superClass){function XMLCData(parent,text){if(XMLCData.__super__.constructor.call(this,parent),null==text)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(text)}return extend(XMLCData,superClass),XMLCData.prototype.clone=function(){return create(XMLCData.prototype,this)},XMLCData.prototype.toString=function(options,level){var indent,newline,offset,pretty,r,ref,ref1,ref2,space;return pretty=(null!=options?options.pretty:void 0)||!1,indent=null!=(ref=null!=options?options.indent:void 0)?ref:" ",offset=null!=(ref1=null!=options?options.offset:void 0)?ref1:0,newline=null!=(ref2=null!=options?options.newline:void 0)?ref2:"\n",level||(level=0),space=new Array(level+offset+1).join(indent),r="",pretty&&(r+=space),r+="",pretty&&(r+=newline),r},XMLCData}(XMLNode)}).call(this)},{"./XMLNode":168,"lodash/object/create":227}],160:[function(require,module,exports){(function(){var XMLComment,XMLNode,create,extend=function(child,parent){function ctor(){this.constructor=child}for(var key in parent)hasProp.call(parent,key)&&(child[key]=parent[key]);return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child},hasProp={}.hasOwnProperty;create=require("lodash/object/create"),XMLNode=require("./XMLNode"),module.exports=XMLComment=function(superClass){function XMLComment(parent,text){if(XMLComment.__super__.constructor.call(this,parent),null==text)throw new Error("Missing comment text");this.text=this.stringify.comment(text)}return extend(XMLComment,superClass),XMLComment.prototype.clone=function(){return create(XMLComment.prototype,this)},XMLComment.prototype.toString=function(options,level){var indent,newline,offset,pretty,r,ref,ref1,ref2,space;return pretty=(null!=options?options.pretty:void 0)||!1,indent=null!=(ref=null!=options?options.indent:void 0)?ref:" ",offset=null!=(ref1=null!=options?options.offset:void 0)?ref1:0,newline=null!=(ref2=null!=options?options.newline:void 0)?ref2:"\n",level||(level=0),space=new Array(level+offset+1).join(indent),r="",pretty&&(r+=space),r+="",pretty&&(r+=newline),r},XMLComment}(XMLNode)}).call(this)},{"./XMLNode":168,"lodash/object/create":227}],161:[function(require,module,exports){(function(){var XMLDTDAttList,create;create=require("lodash/object/create"),module.exports=XMLDTDAttList=function(){function XMLDTDAttList(parent,elementName,attributeName,attributeType,defaultValueType,defaultValue){if(this.stringify=parent.stringify,null==elementName)throw new Error("Missing DTD element name");if(null==attributeName)throw new Error("Missing DTD attribute name");if(!attributeType)throw new Error("Missing DTD attribute type");if(!defaultValueType)throw new Error("Missing DTD attribute default");if(0!==defaultValueType.indexOf("#")&&(defaultValueType="#"+defaultValueType),!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(defaultValue&&!defaultValueType.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(elementName),this.attributeName=this.stringify.attName(attributeName),this.attributeType=this.stringify.dtdAttType(attributeType),this.defaultValue=this.stringify.dtdAttDefault(defaultValue),this.defaultValueType=defaultValueType}return XMLDTDAttList.prototype.clone=function(){return create(XMLDTDAttList.prototype,this)},XMLDTDAttList.prototype.toString=function(options,level){var indent,newline,offset,pretty,r,ref,ref1,ref2,space;return pretty=(null!=options?options.pretty:void 0)||!1,indent=null!=(ref=null!=options?options.indent:void 0)?ref:" ",offset=null!=(ref1=null!=options?options.offset:void 0)?ref1:0,newline=null!=(ref2=null!=options?options.newline:void 0)?ref2:"\n",level||(level=0),space=new Array(level+offset+1).join(indent),r="",pretty&&(r+=space),r+="",pretty&&(r+=newline),r},XMLDTDAttList}()}).call(this)},{"lodash/object/create":227}],162:[function(require,module,exports){(function(){var XMLDTDElement,create;create=require("lodash/object/create"),module.exports=XMLDTDElement=function(){function XMLDTDElement(parent,name,value){if(this.stringify=parent.stringify,null==name)throw new Error("Missing DTD element name");value||(value="(#PCDATA)"),Array.isArray(value)&&(value="("+value.join(",")+")"),this.name=this.stringify.eleName(name),this.value=this.stringify.dtdElementValue(value)}return XMLDTDElement.prototype.clone=function(){return create(XMLDTDElement.prototype,this)},XMLDTDElement.prototype.toString=function(options,level){var indent,newline,offset,pretty,r,ref,ref1,ref2,space;return pretty=(null!=options?options.pretty:void 0)||!1,indent=null!=(ref=null!=options?options.indent:void 0)?ref:" ",offset=null!=(ref1=null!=options?options.offset:void 0)?ref1:0,newline=null!=(ref2=null!=options?options.newline:void 0)?ref2:"\n",level||(level=0),space=new Array(level+offset+1).join(indent),r="",pretty&&(r+=space),r+="",pretty&&(r+=newline),r},XMLDTDElement}()}).call(this)},{"lodash/object/create":227}],163:[function(require,module,exports){(function(){var XMLDTDEntity,create,isObject;create=require("lodash/object/create"),isObject=require("lodash/lang/isObject"),module.exports=XMLDTDEntity=function(){function XMLDTDEntity(parent,pe,name,value){if(this.stringify=parent.stringify,null==name)throw new Error("Missing entity name");if(null==value)throw new Error("Missing entity value");if(this.pe=!!pe,this.name=this.stringify.eleName(name),isObject(value)){if(!value.pubID&&!value.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(value.pubID&&!value.sysID)throw new Error("System identifier is required for a public external entity");if(null!=value.pubID&&(this.pubID=this.stringify.dtdPubID(value.pubID)),null!=value.sysID&&(this.sysID=this.stringify.dtdSysID(value.sysID)),null!=value.nData&&(this.nData=this.stringify.dtdNData(value.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(value)}return XMLDTDEntity.prototype.clone=function(){return create(XMLDTDEntity.prototype,this)},XMLDTDEntity.prototype.toString=function(options,level){var indent,newline,offset,pretty,r,ref,ref1,ref2,space;return pretty=(null!=options?options.pretty:void 0)||!1,indent=null!=(ref=null!=options?options.indent:void 0)?ref:" ",offset=null!=(ref1=null!=options?options.offset:void 0)?ref1:0,newline=null!=(ref2=null!=options?options.newline:void 0)?ref2:"\n",level||(level=0),space=new Array(level+offset+1).join(indent),r="",pretty&&(r+=space),r+="",pretty&&(r+=newline),r},XMLDTDEntity}()}).call(this)},{"lodash/lang/isObject":223,"lodash/object/create":227}],164:[function(require,module,exports){(function(){var XMLDTDNotation,create;create=require("lodash/object/create"),module.exports=XMLDTDNotation=function(){function XMLDTDNotation(parent,name,value){if(this.stringify=parent.stringify,null==name)throw new Error("Missing notation name");if(!value.pubID&&!value.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(name),null!=value.pubID&&(this.pubID=this.stringify.dtdPubID(value.pubID)),null!=value.sysID&&(this.sysID=this.stringify.dtdSysID(value.sysID))}return XMLDTDNotation.prototype.clone=function(){return create(XMLDTDNotation.prototype,this)},XMLDTDNotation.prototype.toString=function(options,level){var indent,newline,offset,pretty,r,ref,ref1,ref2,space;return pretty=(null!=options?options.pretty:void 0)||!1,indent=null!=(ref=null!=options?options.indent:void 0)?ref:" ",offset=null!=(ref1=null!=options?options.offset:void 0)?ref1:0,newline=null!=(ref2=null!=options?options.newline:void 0)?ref2:"\n",level||(level=0),space=new Array(level+offset+1).join(indent),r="",pretty&&(r+=space),r+="",pretty&&(r+=newline),r},XMLDTDNotation}()}).call(this)},{"lodash/object/create":227}],165:[function(require,module,exports){(function(){var XMLDeclaration,XMLNode,create,isObject,extend=function(child,parent){function ctor(){this.constructor=child}for(var key in parent)hasProp.call(parent,key)&&(child[key]=parent[key]);return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child},hasProp={}.hasOwnProperty;create=require("lodash/object/create"),isObject=require("lodash/lang/isObject"),XMLNode=require("./XMLNode"),module.exports=XMLDeclaration=function(superClass){function XMLDeclaration(parent,version,encoding,standalone){var ref;XMLDeclaration.__super__.constructor.call(this,parent),isObject(version)&&(ref=version,version=ref.version,encoding=ref.encoding,standalone=ref.standalone),version||(version="1.0"),null!=version&&(this.version=this.stringify.xmlVersion(version)),null!=encoding&&(this.encoding=this.stringify.xmlEncoding(encoding)),null!=standalone&&(this.standalone=this.stringify.xmlStandalone(standalone))}return extend(XMLDeclaration,superClass),XMLDeclaration.prototype.clone=function(){return create(XMLDeclaration.prototype,this)},XMLDeclaration.prototype.toString=function(options,level){var indent,newline,offset,pretty,r,ref,ref1,ref2,space;return pretty=(null!=options?options.pretty:void 0)||!1,indent=null!=(ref=null!=options?options.indent:void 0)?ref:" ",offset=null!=(ref1=null!=options?options.offset:void 0)?ref1:0,newline=null!=(ref2=null!=options?options.newline:void 0)?ref2:"\n",level||(level=0),space=new Array(level+offset+1).join(indent),r="",pretty&&(r+=space),r+="",pretty&&(r+=newline),r},XMLDeclaration}(XMLNode)}).call(this)},{"./XMLNode":168,"lodash/lang/isObject":223,"lodash/object/create":227}],166:[function(require,module,exports){(function(){var XMLCData,XMLComment,XMLDTDAttList,XMLDTDElement,XMLDTDEntity,XMLDTDNotation,XMLDocType,XMLProcessingInstruction,create,isObject;create=require("lodash/object/create"),isObject=require("lodash/lang/isObject"),XMLCData=require("./XMLCData"),XMLComment=require("./XMLComment"),XMLDTDAttList=require("./XMLDTDAttList"),XMLDTDEntity=require("./XMLDTDEntity"),XMLDTDElement=require("./XMLDTDElement"),XMLDTDNotation=require("./XMLDTDNotation"),XMLProcessingInstruction=require("./XMLProcessingInstruction"),module.exports=XMLDocType=function(){function XMLDocType(parent,pubID,sysID){var ref,ref1;this.documentObject=parent,this.stringify=this.documentObject.stringify,this.children=[],isObject(pubID)&&(ref=pubID,pubID=ref.pubID,sysID=ref.sysID),null==sysID&&(ref1=[pubID,sysID],sysID=ref1[0],pubID=ref1[1]),null!=pubID&&(this.pubID=this.stringify.dtdPubID(pubID)),null!=sysID&&(this.sysID=this.stringify.dtdSysID(sysID))}return XMLDocType.prototype.clone=function(){return create(XMLDocType.prototype,this)},XMLDocType.prototype.element=function(name,value){var child;return child=new XMLDTDElement(this,name,value),this.children.push(child),this},XMLDocType.prototype.attList=function(elementName,attributeName,attributeType,defaultValueType,defaultValue){var child;return child=new XMLDTDAttList(this,elementName,attributeName,attributeType,defaultValueType,defaultValue),this.children.push(child),this},XMLDocType.prototype.entity=function(name,value){var child;return child=new XMLDTDEntity(this,!1,name,value),this.children.push(child),this},XMLDocType.prototype.pEntity=function(name,value){var child;return child=new XMLDTDEntity(this,!0,name,value),this.children.push(child),this},XMLDocType.prototype.notation=function(name,value){var child;return child=new XMLDTDNotation(this,name,value),this.children.push(child),this},XMLDocType.prototype.cdata=function(value){var child;return child=new XMLCData(this,value),this.children.push(child),this},XMLDocType.prototype.comment=function(value){var child;return child=new XMLComment(this,value),this.children.push(child),this},XMLDocType.prototype.instruction=function(target,value){var child;return child=new XMLProcessingInstruction(this,target,value),this.children.push(child),this},XMLDocType.prototype.root=function(){return this.documentObject.root()},XMLDocType.prototype.document=function(){return this.documentObject},XMLDocType.prototype.toString=function(options,level){var child,i,indent,len,newline,offset,pretty,r,ref,ref1,ref2,ref3,space;if(pretty=(null!=options?options.pretty:void 0)||!1,indent=null!=(ref=null!=options?options.indent:void 0)?ref:" ",offset=null!=(ref1=null!=options?options.offset:void 0)?ref1:0,newline=null!=(ref2=null!=options?options.newline:void 0)?ref2:"\n",level||(level=0),space=new Array(level+offset+1).join(indent),r="",pretty&&(r+=space),r+="0){for(r+=" [",pretty&&(r+=newline),ref3=this.children,i=0,len=ref3.length;len>i;i++)child=ref3[i],r+=child.toString(options,level+1);r+="]"}return r+=">",pretty&&(r+=newline),r},XMLDocType.prototype.ele=function(name,value){return this.element(name,value)},XMLDocType.prototype.att=function(elementName,attributeName,attributeType,defaultValueType,defaultValue){return this.attList(elementName,attributeName,attributeType,defaultValueType,defaultValue)},XMLDocType.prototype.ent=function(name,value){return this.entity(name,value)},XMLDocType.prototype.pent=function(name,value){return this.pEntity(name,value)},XMLDocType.prototype.not=function(name,value){return this.notation(name,value)},XMLDocType.prototype.dat=function(value){return this.cdata(value)},XMLDocType.prototype.com=function(value){return this.comment(value)},XMLDocType.prototype.ins=function(target,value){return this.instruction(target,value)},XMLDocType.prototype.up=function(){return this.root()},XMLDocType.prototype.doc=function(){return this.document()},XMLDocType}()}).call(this)},{"./XMLCData":159,"./XMLComment":160,"./XMLDTDAttList":161,"./XMLDTDElement":162,"./XMLDTDEntity":163,"./XMLDTDNotation":164,"./XMLProcessingInstruction":169,"lodash/lang/isObject":223,"lodash/object/create":227}],167:[function(require,module,exports){(function(){var XMLAttribute,XMLElement,XMLNode,XMLProcessingInstruction,create,every,isFunction,isObject,extend=function(child,parent){function ctor(){this.constructor=child}for(var key in parent)hasProp.call(parent,key)&&(child[key]=parent[key]);return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child},hasProp={}.hasOwnProperty;create=require("lodash/object/create"),isObject=require("lodash/lang/isObject"),isFunction=require("lodash/lang/isFunction"),every=require("lodash/collection/every"),XMLNode=require("./XMLNode"),XMLAttribute=require("./XMLAttribute"),XMLProcessingInstruction=require("./XMLProcessingInstruction"),module.exports=XMLElement=function(superClass){function XMLElement(parent,name,attributes){if(XMLElement.__super__.constructor.call(this,parent),null==name)throw new Error("Missing element name");this.name=this.stringify.eleName(name),this.children=[],this.instructions=[],this.attributes={},null!=attributes&&this.attribute(attributes)}return extend(XMLElement,superClass),XMLElement.prototype.clone=function(){var att,attName,clonedSelf,i,len,pi,ref,ref1;clonedSelf=create(XMLElement.prototype,this),clonedSelf.isRoot&&(clonedSelf.documentObject=null),clonedSelf.attributes={},ref=this.attributes;for(attName in ref)hasProp.call(ref,attName)&&(att=ref[attName],clonedSelf.attributes[attName]=att.clone());for(clonedSelf.instructions=[],ref1=this.instructions,i=0,len=ref1.length;len>i;i++)pi=ref1[i],clonedSelf.instructions.push(pi.clone());return clonedSelf.children=[],this.children.forEach(function(child){var clonedChild;return clonedChild=child.clone(),clonedChild.parent=clonedSelf,clonedSelf.children.push(clonedChild)}),clonedSelf},XMLElement.prototype.attribute=function(name,value){var attName,attValue;if(null!=name&&(name=name.valueOf()),isObject(name))for(attName in name)hasProp.call(name,attName)&&(attValue=name[attName],this.attribute(attName,attValue));else isFunction(value)&&(value=value.apply()),this.options.skipNullAttributes&&null==value||(this.attributes[name]=new XMLAttribute(this,name,value));return this},XMLElement.prototype.removeAttribute=function(name){var attName,i,len;if(null==name)throw new Error("Missing attribute name");if(name=name.valueOf(),Array.isArray(name))for(i=0,len=name.length;len>i;i++)attName=name[i],delete this.attributes[attName];else delete this.attributes[name];return this},XMLElement.prototype.instruction=function(target,value){var i,insTarget,insValue,instruction,len;if(null!=target&&(target=target.valueOf()),null!=value&&(value=value.valueOf()),Array.isArray(target))for(i=0,len=target.length;len>i;i++)insTarget=target[i],this.instruction(insTarget);else if(isObject(target))for(insTarget in target)hasProp.call(target,insTarget)&&(insValue=target[insTarget],this.instruction(insTarget,insValue));else isFunction(value)&&(value=value.apply()),instruction=new XMLProcessingInstruction(this,target,value),this.instructions.push(instruction);return this},XMLElement.prototype.toString=function(options,level){var att,child,i,indent,instruction,j,len,len1,name,newline,offset,pretty,r,ref,ref1,ref2,ref3,ref4,ref5,space;for(pretty=(null!=options?options.pretty:void 0)||!1,indent=null!=(ref=null!=options?options.indent:void 0)?ref:" ",offset=null!=(ref1=null!=options?options.offset:void 0)?ref1:0,newline=null!=(ref2=null!=options?options.newline:void 0)?ref2:"\n",level||(level=0),space=new Array(level+offset+1).join(indent),r="",ref3=this.instructions,i=0,len=ref3.length;len>i;i++)instruction=ref3[i],r+=instruction.toString(options,level);pretty&&(r+=space),r+="<"+this.name,ref4=this.attributes;for(name in ref4)hasProp.call(ref4,name)&&(att=ref4[name],r+=att.toString(options));if(0===this.children.length||every(this.children,function(e){return""===e.value}))r+="/>",pretty&&(r+=newline);else if(pretty&&1===this.children.length&&null!=this.children[0].value)r+=">",r+=this.children[0].value,r+="",r+=newline;else{for(r+=">",pretty&&(r+=newline),ref5=this.children,j=0,len1=ref5.length;len1>j;j++)child=ref5[j],r+=child.toString(options,level+1);pretty&&(r+=space),r+="",pretty&&(r+=newline)}return r},XMLElement.prototype.att=function(name,value){return this.attribute(name,value)},XMLElement.prototype.ins=function(target,value){return this.instruction(target,value)},XMLElement.prototype.a=function(name,value){return this.attribute(name,value)},XMLElement.prototype.i=function(target,value){return this.instruction(target,value)},XMLElement}(XMLNode)}).call(this)},{"./XMLAttribute":157,"./XMLNode":168,"./XMLProcessingInstruction":169,"lodash/collection/every":175,"lodash/lang/isFunction":221,"lodash/lang/isObject":223,"lodash/object/create":227}],168:[function(require,module,exports){(function(){var XMLCData,XMLComment,XMLDeclaration,XMLDocType,XMLElement,XMLNode,XMLRaw,XMLText,isEmpty,isFunction,isObject,hasProp={}.hasOwnProperty;isObject=require("lodash/lang/isObject"),isFunction=require("lodash/lang/isFunction"),isEmpty=require("lodash/lang/isEmpty"),XMLElement=null,XMLCData=null,XMLComment=null,XMLDeclaration=null,XMLDocType=null,XMLRaw=null,XMLText=null,module.exports=XMLNode=function(){function XMLNode(parent){this.parent=parent,this.options=this.parent.options,this.stringify=this.parent.stringify,null===XMLElement&&(XMLElement=require("./XMLElement"),XMLCData=require("./XMLCData"),XMLComment=require("./XMLComment"),XMLDeclaration=require("./XMLDeclaration"),XMLDocType=require("./XMLDocType"),XMLRaw=require("./XMLRaw"),XMLText=require("./XMLText"))}return XMLNode.prototype.clone=function(){throw new Error("Cannot clone generic XMLNode")},XMLNode.prototype.element=function(name,attributes,text){var item,j,key,lastChild,len,ref,val;if(lastChild=null,null==attributes&&(attributes={}),attributes=attributes.valueOf(),isObject(attributes)||(ref=[attributes,text],text=ref[0],attributes=ref[1]),null!=name&&(name=name.valueOf()),Array.isArray(name))for(j=0,len=name.length;len>j;j++)item=name[j],lastChild=this.element(item);else if(isFunction(name))lastChild=this.element(name.apply());else if(isObject(name))for(key in name)hasProp.call(name,key)&&(val=name[key],isFunction(val)&&(val=val.apply()),isObject(val)&&isEmpty(val)&&(val=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&0===key.indexOf(this.stringify.convertAttKey)?lastChild=this.attribute(key.substr(this.stringify.convertAttKey.length),val):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&0===key.indexOf(this.stringify.convertPIKey)?lastChild=this.instruction(key.substr(this.stringify.convertPIKey.length),val):isObject(val)?!this.options.ignoreDecorators&&this.stringify.convertListKey&&0===key.indexOf(this.stringify.convertListKey)&&Array.isArray(val)?lastChild=this.element(val):(lastChild=this.element(key),lastChild.element(val)):lastChild=this.element(key,val));else lastChild=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===name.indexOf(this.stringify.convertTextKey)?this.text(text):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&0===name.indexOf(this.stringify.convertCDataKey)?this.cdata(text):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&0===name.indexOf(this.stringify.convertCommentKey)?this.comment(text):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&0===name.indexOf(this.stringify.convertRawKey)?this.raw(text):this.node(name,attributes,text);if(null==lastChild)throw new Error("Could not create any elements with: "+name);return lastChild},XMLNode.prototype.insertBefore=function(name,attributes,text){var child,i,removed;if(this.isRoot)throw new Error("Cannot insert elements at root level");return i=this.parent.children.indexOf(this),removed=this.parent.children.splice(i),child=this.parent.element(name,attributes,text),Array.prototype.push.apply(this.parent.children,removed),child},XMLNode.prototype.insertAfter=function(name,attributes,text){var child,i,removed;if(this.isRoot)throw new Error("Cannot insert elements at root level");return i=this.parent.children.indexOf(this),removed=this.parent.children.splice(i+1),child=this.parent.element(name,attributes,text),Array.prototype.push.apply(this.parent.children,removed),child},XMLNode.prototype.remove=function(){var i,ref;if(this.isRoot)throw new Error("Cannot remove the root element");return i=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[i,i-i+1].concat(ref=[])),ref,this.parent},XMLNode.prototype.node=function(name,attributes,text){var child,ref;return null!=name&&(name=name.valueOf()),null==attributes&&(attributes={}),attributes=attributes.valueOf(),isObject(attributes)||(ref=[attributes,text],text=ref[0],attributes=ref[1]),child=new XMLElement(this,name,attributes),null!=text&&child.text(text),this.children.push(child),child},XMLNode.prototype.text=function(value){var child;return child=new XMLText(this,value),this.children.push(child),this},XMLNode.prototype.cdata=function(value){var child;return child=new XMLCData(this,value),this.children.push(child), +this},XMLNode.prototype.comment=function(value){var child;return child=new XMLComment(this,value),this.children.push(child),this},XMLNode.prototype.raw=function(value){var child;return child=new XMLRaw(this,value),this.children.push(child),this},XMLNode.prototype.declaration=function(version,encoding,standalone){var doc,xmldec;return doc=this.document(),xmldec=new XMLDeclaration(doc,version,encoding,standalone),doc.xmldec=xmldec,doc.root()},XMLNode.prototype.doctype=function(pubID,sysID){var doc,doctype;return doc=this.document(),doctype=new XMLDocType(doc,pubID,sysID),doc.doctype=doctype,doctype},XMLNode.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},XMLNode.prototype.root=function(){var child;if(this.isRoot)return this;for(child=this.parent;!child.isRoot;)child=child.parent;return child},XMLNode.prototype.document=function(){return this.root().documentObject},XMLNode.prototype.end=function(options){return this.document().toString(options)},XMLNode.prototype.prev=function(){var i;if(this.isRoot)throw new Error("Root node has no siblings");if(i=this.parent.children.indexOf(this),1>i)throw new Error("Already at the first node");return this.parent.children[i-1]},XMLNode.prototype.next=function(){var i;if(this.isRoot)throw new Error("Root node has no siblings");if(i=this.parent.children.indexOf(this),-1===i||i===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[i+1]},XMLNode.prototype.importXMLBuilder=function(xmlbuilder){var clonedRoot;return clonedRoot=xmlbuilder.root().clone(),clonedRoot.parent=this,clonedRoot.isRoot=!1,this.children.push(clonedRoot),this},XMLNode.prototype.ele=function(name,attributes,text){return this.element(name,attributes,text)},XMLNode.prototype.nod=function(name,attributes,text){return this.node(name,attributes,text)},XMLNode.prototype.txt=function(value){return this.text(value)},XMLNode.prototype.dat=function(value){return this.cdata(value)},XMLNode.prototype.com=function(value){return this.comment(value)},XMLNode.prototype.doc=function(){return this.document()},XMLNode.prototype.dec=function(version,encoding,standalone){return this.declaration(version,encoding,standalone)},XMLNode.prototype.dtd=function(pubID,sysID){return this.doctype(pubID,sysID)},XMLNode.prototype.e=function(name,attributes,text){return this.element(name,attributes,text)},XMLNode.prototype.n=function(name,attributes,text){return this.node(name,attributes,text)},XMLNode.prototype.t=function(value){return this.text(value)},XMLNode.prototype.d=function(value){return this.cdata(value)},XMLNode.prototype.c=function(value){return this.comment(value)},XMLNode.prototype.r=function(value){return this.raw(value)},XMLNode.prototype.u=function(){return this.up()},XMLNode}()}).call(this)},{"./XMLCData":159,"./XMLComment":160,"./XMLDeclaration":165,"./XMLDocType":166,"./XMLElement":167,"./XMLRaw":170,"./XMLText":172,"lodash/lang/isEmpty":220,"lodash/lang/isFunction":221,"lodash/lang/isObject":223}],169:[function(require,module,exports){(function(){var XMLProcessingInstruction,create;create=require("lodash/object/create"),module.exports=XMLProcessingInstruction=function(){function XMLProcessingInstruction(parent,target,value){if(this.stringify=parent.stringify,null==target)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(target),value&&(this.value=this.stringify.insValue(value))}return XMLProcessingInstruction.prototype.clone=function(){return create(XMLProcessingInstruction.prototype,this)},XMLProcessingInstruction.prototype.toString=function(options,level){var indent,newline,offset,pretty,r,ref,ref1,ref2,space;return pretty=(null!=options?options.pretty:void 0)||!1,indent=null!=(ref=null!=options?options.indent:void 0)?ref:" ",offset=null!=(ref1=null!=options?options.offset:void 0)?ref1:0,newline=null!=(ref2=null!=options?options.newline:void 0)?ref2:"\n",level||(level=0),space=new Array(level+offset+1).join(indent),r="",pretty&&(r+=space),r+="",pretty&&(r+=newline),r},XMLProcessingInstruction}()}).call(this)},{"lodash/object/create":227}],170:[function(require,module,exports){(function(){var XMLNode,XMLRaw,create,extend=function(child,parent){function ctor(){this.constructor=child}for(var key in parent)hasProp.call(parent,key)&&(child[key]=parent[key]);return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child},hasProp={}.hasOwnProperty;create=require("lodash/object/create"),XMLNode=require("./XMLNode"),module.exports=XMLRaw=function(superClass){function XMLRaw(parent,text){if(XMLRaw.__super__.constructor.call(this,parent),null==text)throw new Error("Missing raw text");this.value=this.stringify.raw(text)}return extend(XMLRaw,superClass),XMLRaw.prototype.clone=function(){return create(XMLRaw.prototype,this)},XMLRaw.prototype.toString=function(options,level){var indent,newline,offset,pretty,r,ref,ref1,ref2,space;return pretty=(null!=options?options.pretty:void 0)||!1,indent=null!=(ref=null!=options?options.indent:void 0)?ref:" ",offset=null!=(ref1=null!=options?options.offset:void 0)?ref1:0,newline=null!=(ref2=null!=options?options.newline:void 0)?ref2:"\n",level||(level=0),space=new Array(level+offset+1).join(indent),r="",pretty&&(r+=space),r+=this.value,pretty&&(r+=newline),r},XMLRaw}(XMLNode)}).call(this)},{"./XMLNode":168,"lodash/object/create":227}],171:[function(require,module,exports){(function(){var XMLStringifier,bind=function(fn,me){return function(){return fn.apply(me,arguments)}},hasProp={}.hasOwnProperty;module.exports=XMLStringifier=function(){function XMLStringifier(options){this.assertLegalChar=bind(this.assertLegalChar,this);var key,ref,value;this.allowSurrogateChars=null!=options?options.allowSurrogateChars:void 0,ref=(null!=options?options.stringify:void 0)||{};for(key in ref)hasProp.call(ref,key)&&(value=ref[key],this[key]=value)}return XMLStringifier.prototype.eleName=function(val){return val=""+val||"",this.assertLegalChar(val)},XMLStringifier.prototype.eleText=function(val){return val=""+val||"",this.assertLegalChar(this.elEscape(val))},XMLStringifier.prototype.cdata=function(val){if(val=""+val||"",val.match(/]]>/))throw new Error("Invalid CDATA text: "+val);return this.assertLegalChar(val)},XMLStringifier.prototype.comment=function(val){if(val=""+val||"",val.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+val);return this.assertLegalChar(val)},XMLStringifier.prototype.raw=function(val){return""+val||""},XMLStringifier.prototype.attName=function(val){return""+val||""},XMLStringifier.prototype.attValue=function(val){return val=""+val||"",this.attEscape(val)},XMLStringifier.prototype.insTarget=function(val){return""+val||""},XMLStringifier.prototype.insValue=function(val){if(val=""+val||"",val.match(/\?>/))throw new Error("Invalid processing instruction value: "+val);return val},XMLStringifier.prototype.xmlVersion=function(val){if(val=""+val||"",!val.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+val);return val},XMLStringifier.prototype.xmlEncoding=function(val){if(val=""+val||"",!val.match(/[A-Za-z](?:[A-Za-z0-9._-]|-)*/))throw new Error("Invalid encoding: "+val);return val},XMLStringifier.prototype.xmlStandalone=function(val){return val?"yes":"no"},XMLStringifier.prototype.dtdPubID=function(val){return""+val||""},XMLStringifier.prototype.dtdSysID=function(val){return""+val||""},XMLStringifier.prototype.dtdElementValue=function(val){return""+val||""},XMLStringifier.prototype.dtdAttType=function(val){return""+val||""},XMLStringifier.prototype.dtdAttDefault=function(val){return null!=val?""+val||"":val},XMLStringifier.prototype.dtdEntityValue=function(val){return""+val||""},XMLStringifier.prototype.dtdNData=function(val){return""+val||""},XMLStringifier.prototype.convertAttKey="@",XMLStringifier.prototype.convertPIKey="?",XMLStringifier.prototype.convertTextKey="#text",XMLStringifier.prototype.convertCDataKey="#cdata",XMLStringifier.prototype.convertCommentKey="#comment",XMLStringifier.prototype.convertRawKey="#raw",XMLStringifier.prototype.convertListKey="#list",XMLStringifier.prototype.assertLegalChar=function(str){var chars,chr;if(chars=this.allowSurrogateChars?/[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uFFFE-\uFFFF]/:/[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/,chr=str.match(chars))throw new Error("Invalid character ("+chr+") in string: "+str+" at index "+chr.index);return str},XMLStringifier.prototype.elEscape=function(str){return str.replace(/&/g,"&").replace(//g,">").replace(/\r/g," ")},XMLStringifier.prototype.attEscape=function(str){return str.replace(/&/g,"&").replace(/index;)object=object[path[index++]];return index&&index==length?object:void 0}}var toObject=require("./toObject");module.exports=baseGet},{"./toObject":216}],189:[function(require,module,exports){function baseIsEqual(value,other,customizer,isLoose,stackA,stackB){return value===other?!0:null==value||null==other||!isObject(value)&&!isObjectLike(other)?value!==value&&other!==other:baseIsEqualDeep(value,other,baseIsEqual,customizer,isLoose,stackA,stackB)}var baseIsEqualDeep=require("./baseIsEqualDeep"),isObject=require("../lang/isObject"),isObjectLike=require("./isObjectLike");module.exports=baseIsEqual},{"../lang/isObject":223,"./baseIsEqualDeep":190,"./isObjectLike":213}],190:[function(require,module,exports){function baseIsEqualDeep(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=arrayTag,othTag=arrayTag;objIsArr||(objTag=objToString.call(object),objTag==argsTag?objTag=objectTag:objTag!=objectTag&&(objIsArr=isTypedArray(object))),othIsArr||(othTag=objToString.call(other),othTag==argsTag?othTag=objectTag:othTag!=objectTag&&(othIsArr=isTypedArray(other)));var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&!objIsArr&&!objIsObj)return equalByTag(object,other,objTag);if(!isLoose){var objIsWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othIsWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped)return equalFunc(objIsWrapped?object.value():object,othIsWrapped?other.value():other,customizer,isLoose,stackA,stackB)}if(!isSameTag)return!1;stackA||(stackA=[]),stackB||(stackB=[]);for(var length=stackA.length;length--;)if(stackA[length]==object)return stackB[length]==other;stackA.push(object),stackB.push(other);var result=(objIsArr?equalArrays:equalObjects)(object,other,equalFunc,customizer,isLoose,stackA,stackB);return stackA.pop(),stackB.pop(),result}var equalArrays=require("./equalArrays"),equalByTag=require("./equalByTag"),equalObjects=require("./equalObjects"),isArray=require("../lang/isArray"),isTypedArray=require("../lang/isTypedArray"),argsTag="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,objToString=objectProto.toString;module.exports=baseIsEqualDeep},{"../lang/isArray":219,"../lang/isTypedArray":225,"./equalArrays":202,"./equalByTag":203,"./equalObjects":204}],191:[function(require,module,exports){function baseIsMatch(object,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(null==object)return!length;for(object=toObject(object);index--;){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object))return!1}for(;++indexstart&&(start=-start>length?0:length+start),end=void 0===end||end>length?length:+end||0,0>end&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);++index2?sources[length-2]:void 0,guard=length>2?sources[2]:void 0,thisArg=length>1?sources[length-1]:void 0;for("function"==typeof customizer?(customizer=bindCallback(customizer,thisArg,5),length-=2):(customizer="function"==typeof thisArg?thisArg:void 0,length-=customizer?1:0),guard&&isIterateeCall(sources[0],sources[1],guard)&&(customizer=3>length?void 0:customizer,length=1);++indexarrLength))return!1;for(;++index-1&&value%1==0&&length>value}var reIsUint=/^\d+$/,MAX_SAFE_INTEGER=9007199254740991;module.exports=isIndex},{}],210:[function(require,module,exports){function isIterateeCall(value,index,object){if(!isObject(object))return!1;var type=typeof index;if("number"==type?isArrayLike(object)&&isIndex(index,object.length):"string"==type&&index in object){var other=object[index];return value===value?value===other:other!==other}return!1}var isArrayLike=require("./isArrayLike"),isIndex=require("./isIndex"),isObject=require("../lang/isObject");module.exports=isIterateeCall},{"../lang/isObject":223,"./isArrayLike":208,"./isIndex":209}],211:[function(require,module,exports){function isKey(value,object){var type=typeof value;if("string"==type&&reIsPlainProp.test(value)||"number"==type)return!0;if(isArray(value))return!1;var result=!reIsDeepProp.test(value);return result||null!=object&&value in toObject(object)}var isArray=require("../lang/isArray"),toObject=require("./toObject"),reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;module.exports=isKey},{"../lang/isArray":219,"./toObject":216}],212:[function(require,module,exports){function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&MAX_SAFE_INTEGER>=value}var MAX_SAFE_INTEGER=9007199254740991;module.exports=isLength},{}],213:[function(require,module,exports){function isObjectLike(value){return!!value&&"object"==typeof value}module.exports=isObjectLike},{}],214:[function(require,module,exports){function isStrictComparable(value){return value===value&&!isObject(value)}var isObject=require("../lang/isObject");module.exports=isStrictComparable},{"../lang/isObject":223}],215:[function(require,module,exports){function shimKeys(object){for(var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length,allowIndexes=!!length&&isLength(length)&&(isArray(object)||isArguments(object)),index=-1,result=[];++index0;++index{"use strict";var __webpack_modules__=[,(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});t.addLinkAttributes=function addLinkAttributes(e,{url:t,target:s,rel:n,enabled:a=!0}={}){(0,r.assert)(t&&"string"==typeof t,'addLinkAttributes: A valid "url" parameter must provided.');const o=(0,r.removeNullCharacters)(t);if(a)e.href=e.title=o;else{e.href="";e.title=`Disabled: ${o}`;e.onclick=()=>!1}let l="";switch(s){case i.NONE:break;case i.SELF:l="_self";break;case i.BLANK:l="_blank";break;case i.PARENT:l="_parent";break;case i.TOP:l="_top"}e.target=l;e.rel="string"==typeof n?n:"noopener noreferrer nofollow"};t.deprecated=function deprecated(e){console.log("Deprecated API usage: "+e)};t.getFilenameFromUrl=function getFilenameFromUrl(e){const t=e.indexOf("#"),s=e.indexOf("?"),r=Math.min(t>0?t:e.length,s>0?s:e.length);return e.substring(e.lastIndexOf("/",r)+1,r)};t.getPdfFilenameFromUrl=function getPdfFilenameFromUrl(e,t="document.pdf"){if("string"!=typeof e)return t;if(isDataScheme(e)){(0,r.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.');return t}const s=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,n=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e);let a=s.exec(n[1])||s.exec(n[2])||s.exec(n[3]);if(a){a=a[0];if(a.includes("%"))try{a=s.exec(decodeURIComponent(a))[0]}catch(e){}}return a||t};t.getXfaPageViewport=function getXfaPageViewport(e,{scale:t=1,rotation:s=0}){const{width:r,height:n}=e.attributes.style,a=[0,0,parseInt(r),parseInt(n)];return new PageViewport({viewBox:a,scale:t,rotation:s})};t.isDataScheme=isDataScheme;t.isPdfFile=function isPdfFile(e){return"string"==typeof e&&/\.pdf$/i.test(e)};t.isValidFetchUrl=isValidFetchUrl;t.loadScript=function loadScript(e,t=!1){return new Promise(((s,r)=>{const n=document.createElement("script");n.src=e;n.onload=function(e){t&&n.remove();s(e)};n.onerror=function(){r(new Error(`Cannot load script at: ${n.src}`))};(document.head||document.documentElement).appendChild(n)}))};t.StatTimer=t.RenderingCancelledException=t.PixelsPerInch=t.PDFDateString=t.PageViewport=t.LinkTarget=t.DOMSVGFactory=t.DOMStandardFontDataFactory=t.DOMCMapReaderFactory=t.DOMCanvasFactory=void 0;var r=s(2),n=s(5);const a={CSS:96,PDF:72,get PDF_TO_CSS_UNITS(){return(0,r.shadow)(this,"PDF_TO_CSS_UNITS",this.CSS/this.PDF)}};t.PixelsPerInch=a;class DOMCanvasFactory extends n.BaseCanvasFactory{constructor({ownerDocument:e=globalThis.document}={}){super();this._document=e}_createCanvas(e,t){const s=this._document.createElement("canvas");s.width=e;s.height=t;return s}}t.DOMCanvasFactory=DOMCanvasFactory;async function fetchData(e,t=!1){if(isValidFetchUrl(e,document.baseURI)){const s=await fetch(e);if(!s.ok)throw new Error(s.statusText);return t?new Uint8Array(await s.arrayBuffer()):(0,r.stringToBytes)(await s.text())}return new Promise(((s,n)=>{const a=new XMLHttpRequest;a.open("GET",e,!0);t&&(a.responseType="arraybuffer");a.onreadystatechange=()=>{if(a.readyState===XMLHttpRequest.DONE){if(200===a.status||0===a.status){let e;t&&a.response?e=new Uint8Array(a.response):!t&&a.responseText&&(e=(0,r.stringToBytes)(a.responseText));if(e){s(e);return}}n(new Error(a.statusText))}};a.send(null)}))}class DOMCMapReaderFactory extends n.BaseCMapReaderFactory{_fetchData(e,t){return fetchData(e,this.isCompressed).then((e=>({cMapData:e,compressionType:t})))}}t.DOMCMapReaderFactory=DOMCMapReaderFactory;class DOMStandardFontDataFactory extends n.BaseStandardFontDataFactory{_fetchData(e){return fetchData(e,!0)}}t.DOMStandardFontDataFactory=DOMStandardFontDataFactory;class DOMSVGFactory extends n.BaseSVGFactory{_createSVG(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}}t.DOMSVGFactory=DOMSVGFactory;class PageViewport{constructor({viewBox:e,scale:t,rotation:s,offsetX:r=0,offsetY:n=0,dontFlip:a=!1}){this.viewBox=e;this.scale=t;this.rotation=s;this.offsetX=r;this.offsetY=n;const i=(e[2]+e[0])/2,o=(e[3]+e[1])/2;let l,c,h,d,u,p,g,f;(s%=360)<0&&(s+=360);switch(s){case 180:l=-1;c=0;h=0;d=1;break;case 90:l=0;c=1;h=1;d=0;break;case 270:l=0;c=-1;h=-1;d=0;break;case 0:l=1;c=0;h=0;d=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}if(a){h=-h;d=-d}if(0===l){u=Math.abs(o-e[1])*t+r;p=Math.abs(i-e[0])*t+n;g=Math.abs(e[3]-e[1])*t;f=Math.abs(e[2]-e[0])*t}else{u=Math.abs(i-e[0])*t+r;p=Math.abs(o-e[1])*t+n;g=Math.abs(e[2]-e[0])*t;f=Math.abs(e[3]-e[1])*t}this.transform=[l*t,c*t,h*t,d*t,u-l*t*i-h*t*o,p-c*t*i-d*t*o];this.width=g;this.height=f}clone({scale:e=this.scale,rotation:t=this.rotation,offsetX:s=this.offsetX,offsetY:r=this.offsetY,dontFlip:n=!1}={}){return new PageViewport({viewBox:this.viewBox.slice(),scale:e,rotation:t,offsetX:s,offsetY:r,dontFlip:n})}convertToViewportPoint(e,t){return r.Util.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){const t=r.Util.applyTransform([e[0],e[1]],this.transform),s=r.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],s[0],s[1]]}convertToPdfPoint(e,t){return r.Util.applyInverseTransform([e,t],this.transform)}}t.PageViewport=PageViewport;class RenderingCancelledException extends r.BaseException{constructor(e,t){super(e,"RenderingCancelledException");this.type=t}}t.RenderingCancelledException=RenderingCancelledException;const i={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};t.LinkTarget=i;function isDataScheme(e){const t=e.length;let s=0;for(;st&&(t=s.length)}for(const s of this.times){const r=s.end-s.start;e.push(`${s.name.padEnd(t)} ${r}ms\n`)}return e.join("")}};function isValidFetchUrl(e,t){try{const{protocol:s}=t?new URL(e,t):new URL(e);return"http:"===s||"https:"===s}catch(e){return!1}}let o;t.PDFDateString=class PDFDateString{static toDateObject(e){if(!e||!(0,r.isString)(e))return null;o||(o=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const t=o.exec(e);if(!t)return null;const s=parseInt(t[1],10);let n=parseInt(t[2],10);n=n>=1&&n<=12?n-1:0;let a=parseInt(t[3],10);a=a>=1&&a<=31?a:1;let i=parseInt(t[4],10);i=i>=0&&i<=23?i:0;let l=parseInt(t[5],10);l=l>=0&&l<=59?l:0;let c=parseInt(t[6],10);c=c>=0&&c<=59?c:0;const h=t[7]||"Z";let d=parseInt(t[8],10);d=d>=0&&d<=23?d:0;let u=parseInt(t[9],10)||0;u=u>=0&&u<=59?u:0;if("-"===h){i+=d;l+=u}else if("+"===h){i-=d;l-=u}return new Date(Date.UTC(s,n,a,i,l,c))}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});t.arrayByteLength=arrayByteLength;t.arraysToBytes=function arraysToBytes(e){const t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];let s=0;for(let r=0;r>2]+r[(3&a)<<4|i>>4]+r[t+1>6:64]+r[t+2t});e.promise=new Promise((function(s,r){e.resolve=function(e){t=!0;s(e)};e.reject=function(e){t=!0;r(e)}}));return e};t.createValidAbsoluteUrl=function createValidAbsoluteUrl(e,t=null,s=null){if(!e)return null;try{if(s&&"string"==typeof e){if(s.addDefaultProtocol&&e.startsWith("www.")){const t=e.match(/\./g);t&&t.length>=2&&(e=`http://${e}`)}if(s.tryConvertEncoding)try{e=stringToUTF8String(e)}catch(e){}}const r=t?new URL(e,t):new URL(e);if(function _isValidProtocol(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 escapeString(e){return e.replace(/([()\\\n\r])/g,(e=>"\n"===e?"\\n":"\r"===e?"\\r":`\\${e}`))};t.getModificationDate=function getModificationDate(e=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 getVerbosityLevel(){return n};t.info=function info(e){n>=r.INFOS&&console.log(`Info: ${e}`)};t.isArrayBuffer=function isArrayBuffer(e){return"object"==typeof e&&null!==e&&void 0!==e.byteLength};t.isArrayEqual=function isArrayEqual(e,t){if(e.length!==t.length)return!1;for(let s=0,r=e.length;s>24&255,e>>16&255,e>>8&255,255&e)};t.stringToBytes=stringToBytes;t.stringToPDFString=function stringToPDFString(e){const t=e.length,s=[];if("þ"===e[0]&&"ÿ"===e[1])for(let r=2;r>8&255),String.fromCharCode(255&r))}return t.join("")};t.stringToUTF8String=stringToUTF8String;t.unreachable=unreachable;t.utf8StringToString=function utf8StringToString(e){return unescape(encodeURIComponent(e))};t.warn=warn;t.VerbosityLevel=t.Util=t.UNSUPPORTED_FEATURES=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.RenderingIntentFlag=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.AnnotationMode=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0;s(3);t.IDENTITY_MATRIX=[1,0,0,1,0,0];t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];t.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256};t.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3};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",TYPE1STANDARD:"TYPE1STANDARD",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};const r={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=r;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",errorContentSubStream:"errorContentSubStream"};t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let n=r.WARNINGS;function warn(e){n>=r.WARNINGS&&console.log(`Warning: ${e}`)}function unreachable(e){throw new Error(e)}function assert(e,t){e||unreachable(t)}function shadow(e,t,s){Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!1});return s}const a=function BaseExceptionClosure(){function BaseException(e,t){this.constructor===BaseException&&unreachable("Cannot initialize BaseException.");this.message=e;this.name=t}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();t.BaseException=a;t.PasswordException=class PasswordException extends a{constructor(e,t){super(e,"PasswordException");this.code=t}};t.UnknownErrorException=class UnknownErrorException extends a{constructor(e,t){super(e,"UnknownErrorException");this.details=t}};t.InvalidPDFException=class InvalidPDFException extends a{constructor(e){super(e,"InvalidPDFException")}};t.MissingPDFException=class MissingPDFException extends a{constructor(e){super(e,"MissingPDFException")}};t.UnexpectedResponseException=class UnexpectedResponseException extends a{constructor(e,t){super(e,"UnexpectedResponseException");this.status=t}};t.FormatError=class FormatError extends a{constructor(e){super(e,"FormatError")}};t.AbortException=class AbortException extends a{constructor(e){super(e,"AbortException")}};const i=/\x00/g;function stringToBytes(e){assert("string"==typeof e,"Invalid argument for stringToBytes");const t=e.length,s=new Uint8Array(t);for(let r=0;re.toString(16).padStart(2,"0")));class Util{static makeHexColor(e,t,s){return`#${c[e]}${c[t]}${c[s]}`}static transform(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]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){const s=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])/s,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/s]}static getAxialAlignedBoundingBox(e,t){const s=Util.applyTransform(e,t),r=Util.applyTransform(e.slice(2,4),t),n=Util.applyTransform([e[0],e[3]],t),a=Util.applyTransform([e[2],e[1]],t);return[Math.min(s[0],r[0],n[0],a[0]),Math.min(s[1],r[1],n[1],a[1]),Math.max(s[0],r[0],n[0],a[0]),Math.max(s[1],r[1],n[1],a[1])]}static inverseTransform(e){const 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]}static apply3dTransform(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]]}static singularValueDecompose2dScale(e){const t=[e[0],e[2],e[1],e[3]],s=e[0]*t[0]+e[1]*t[2],r=e[0]*t[1]+e[1]*t[3],n=e[2]*t[0]+e[3]*t[2],a=e[2]*t[1]+e[3]*t[3],i=(s+a)/2,o=Math.sqrt((s+a)**2-4*(s*a-n*r))/2,l=i+o||1,c=i-o||1;return[Math.sqrt(l),Math.sqrt(c)]}static normalizeRect(e){const t=e.slice(0);if(e[0]>e[2]){t[0]=e[2];t[2]=e[0]}if(e[1]>e[3]){t[1]=e[3];t[3]=e[1]}return t}static intersect(e,t){function compare(e,t){return e-t}const s=[e[0],e[2],t[0],t[2]].sort(compare),r=[e[1],e[3],t[1],t[3]].sort(compare),n=[];e=Util.normalizeRect(e);t=Util.normalizeRect(t);if(!(s[0]===e[0]&&s[1]===t[0]||s[0]===t[0]&&s[1]===e[0]))return null;n[0]=s[1];n[2]=s[2];if(!(r[0]===e[1]&&r[1]===t[1]||r[0]===t[1]&&r[1]===e[1]))return null;n[1]=r[1];n[3]=r[2];return n}}t.Util=Util;const h=[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];function stringToUTF8String(e){return decodeURIComponent(escape(e))}},(e,t,s)=>{s(4)},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.isNodeJS=void 0;const s=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=s},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});t.BaseSVGFactory=t.BaseStandardFontDataFactory=t.BaseCMapReaderFactory=t.BaseCanvasFactory=void 0;var r=s(2);class BaseCanvasFactory{constructor(){this.constructor===BaseCanvasFactory&&(0,r.unreachable)("Cannot initialize BaseCanvasFactory.")}create(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");const s=this._createCanvas(e,t);return{canvas:s,context:s.getContext("2d")}}reset(e,t,s){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||s<=0)throw new Error("Invalid canvas size");e.canvas.width=t;e.canvas.height=s}destroy(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}_createCanvas(e,t){(0,r.unreachable)("Abstract method `_createCanvas` called.")}}t.BaseCanvasFactory=BaseCanvasFactory;class BaseCMapReaderFactory{constructor({baseUrl:e=null,isCompressed:t=!1}){this.constructor===BaseCMapReaderFactory&&(0,r.unreachable)("Cannot initialize BaseCMapReaderFactory.");this.baseUrl=e;this.isCompressed=t}async fetch({name:e}){if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!e)throw new Error("CMap name must be specified.");const t=this.baseUrl+e+(this.isCompressed?".bcmap":""),s=this.isCompressed?r.CMapCompressionType.BINARY:r.CMapCompressionType.NONE;return this._fetchData(t,s).catch((e=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${t}`)}))}_fetchData(e,t){(0,r.unreachable)("Abstract method `_fetchData` called.")}}t.BaseCMapReaderFactory=BaseCMapReaderFactory;class BaseStandardFontDataFactory{constructor({baseUrl:e=null}){this.constructor===BaseStandardFontDataFactory&&(0,r.unreachable)("Cannot initialize BaseStandardFontDataFactory.");this.baseUrl=e}async fetch({filename:e}){if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!e)throw new Error("Font filename must be specified.");const t=`${this.baseUrl}${e}`;return this._fetchData(t).catch((e=>{throw new Error(`Unable to load font data at: ${t}`)}))}_fetchData(e){(0,r.unreachable)("Abstract method `_fetchData` called.")}}t.BaseStandardFontDataFactory=BaseStandardFontDataFactory;class BaseSVGFactory{constructor(){this.constructor===BaseSVGFactory&&(0,r.unreachable)("Cannot initialize BaseSVGFactory.")}create(e,t){if(e<=0||t<=0)throw new Error("Invalid SVG dimensions");const s=this._createSVG("svg:svg");s.setAttribute("version","1.1");s.setAttribute("width",`${e}px`);s.setAttribute("height",`${t}px`);s.setAttribute("preserveAspectRatio","none");s.setAttribute("viewBox",`0 0 ${e} ${t}`);return s}createElement(e){if("string"!=typeof e)throw new Error("Invalid SVG element type");return this._createSVG(e)}_createSVG(e){(0,r.unreachable)("Abstract method `_createSVG` called.")}}t.BaseSVGFactory=BaseSVGFactory},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0});exports.getDocument=getDocument;exports.setPDFNetworkStreamFactory=setPDFNetworkStreamFactory;exports.version=exports.RenderTask=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultCMapReaderFactory=exports.DefaultCanvasFactory=exports.build=void 0;var _util=__w_pdfjs_require__(2),_display_utils=__w_pdfjs_require__(1),_font_loader=__w_pdfjs_require__(7),_node_utils=__w_pdfjs_require__(8),_annotation_storage=__w_pdfjs_require__(9),_canvas=__w_pdfjs_require__(10),_worker_options=__w_pdfjs_require__(12),_is_node=__w_pdfjs_require__(4),_message_handler=__w_pdfjs_require__(13),_metadata=__w_pdfjs_require__(14),_optional_content_config=__w_pdfjs_require__(15),_transport_stream=__w_pdfjs_require__(16),_xfa_text=__w_pdfjs_require__(17);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DefaultCanvasFactory=_is_node.isNodeJS?_node_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;const DefaultCMapReaderFactory=_is_node.isNodeJS?_node_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;const DefaultStandardFontDataFactory=_is_node.isNodeJS?_node_utils.NodeStandardFontDataFactory:_display_utils.DOMStandardFontDataFactory;exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;let createPDFNetworkStream;function setPDFNetworkStreamFactory(e){createPDFNetworkStream=e}function getDocument(e){const t=new PDFDocumentLoadingTask;let s;if("string"==typeof e||e instanceof URL)s={url:e};else if((0,_util.isArrayBuffer)(e))s={data:e};else if(e instanceof PDFDataRangeTransport)s={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");s=e}const r=Object.create(null);let n=null,a=null;for(const e in s){const t=s[e];switch(e){case"url":if("undefined"!=typeof window)try{r[e]=new URL(t,window.location).href;continue}catch(e){(0,_util.warn)(`Cannot create valid URL: "${e}".`)}else if("string"==typeof t||t instanceof URL){r[e]=t.toString();continue}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.");case"range":n=t;continue;case"worker":a=t;continue;case"data":if(_is_node.isNodeJS&&"undefined"!=typeof Buffer&&t instanceof Buffer)r[e]=new Uint8Array(t);else{if(t instanceof Uint8Array)break;if("string"==typeof t)r[e]=(0,_util.stringToBytes)(t);else if("object"!=typeof t||null===t||isNaN(t.length)){if(!(0,_util.isArrayBuffer)(t))throw new Error("Invalid PDF binary data: either typed array, string, or array-like object is expected in the data property.");r[e]=new Uint8Array(t)}else r[e]=new Uint8Array(t)}continue}r[e]=t}r.rangeChunkSize=r.rangeChunkSize||DEFAULT_RANGE_CHUNK_SIZE;r.CMapReaderFactory=r.CMapReaderFactory||DefaultCMapReaderFactory;r.StandardFontDataFactory=r.StandardFontDataFactory||DefaultStandardFontDataFactory;r.ignoreErrors=!0!==r.stopAtErrors;r.fontExtraProperties=!0===r.fontExtraProperties;r.pdfBug=!0===r.pdfBug;r.enableXfa=!0===r.enableXfa;("string"!=typeof r.docBaseUrl||(0,_display_utils.isDataScheme)(r.docBaseUrl))&&(r.docBaseUrl=null);Number.isInteger(r.maxImageSize)||(r.maxImageSize=-1);"boolean"!=typeof r.useWorkerFetch&&(r.useWorkerFetch=r.CMapReaderFactory===_display_utils.DOMCMapReaderFactory&&r.StandardFontDataFactory===_display_utils.DOMStandardFontDataFactory);"boolean"!=typeof r.isEvalSupported&&(r.isEvalSupported=!0);"boolean"!=typeof r.disableFontFace&&(r.disableFontFace=_is_node.isNodeJS);"boolean"!=typeof r.useSystemFonts&&(r.useSystemFonts=!_is_node.isNodeJS&&!r.disableFontFace);void 0===r.ownerDocument&&(r.ownerDocument=globalThis.document);"boolean"!=typeof r.disableRange&&(r.disableRange=!1);"boolean"!=typeof r.disableStream&&(r.disableStream=!1);"boolean"!=typeof r.disableAutoFetch&&(r.disableAutoFetch=!1);(0,_util.setVerbosityLevel)(r.verbosity);if(!a){const e={verbosity:r.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};a=e.port?PDFWorker.fromPort(e):new PDFWorker(e);t._worker=a}const i=t.docId;a.promise.then((function(){if(t.destroyed)throw new Error("Loading aborted");const e=_fetchDocument(a,r,n,i),s=new Promise((function(e){let t;n?t=new _transport_stream.PDFDataTransportStream({length:r.length,initialData:r.initialData,progressiveDone:r.progressiveDone,contentDispositionFilename:r.contentDispositionFilename,disableRange:r.disableRange,disableStream:r.disableStream},n):r.data||(t=createPDFNetworkStream({url:r.url,length:r.length,httpHeaders:r.httpHeaders,withCredentials:r.withCredentials,rangeChunkSize:r.rangeChunkSize,disableRange:r.disableRange,disableStream:r.disableStream}));e(t)}));return Promise.all([e,s]).then((function([e,s]){if(t.destroyed)throw new Error("Loading aborted");const n=new _message_handler.MessageHandler(i,e,a.port);n.postMessageTransfers=a.postMessageTransfers;const o=new WorkerTransport(n,t,s,r);t._transport=o;n.send("Ready",null)}))})).catch(t._capability.reject);return t}async function _fetchDocument(e,t,s,r){if(e.destroyed)throw new Error("Worker was destroyed");if(s){t.length=s.length;t.initialData=s.initialData;t.progressiveDone=s.progressiveDone;t.contentDispositionFilename=s.contentDispositionFilename}const n=await e.messageHandler.sendWithPromise("GetDocRequest",{docId:r,apiVersion:"2.11.338",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,useSystemFonts:t.useSystemFonts,cMapUrl:t.useWorkerFetch?t.cMapUrl:null,standardFontDataUrl:t.useWorkerFetch?t.standardFontDataUrl:null});if(e.destroyed)throw new Error("Worker was destroyed");return n}class PDFDocumentLoadingTask{static get idCounters(){return(0,_util.shadow)(this,"idCounters",{doc:0})}constructor(){this._capability=(0,_util.createPromiseCapability)();this._transport=null;this._worker=null;this.docId="d"+PDFDocumentLoadingTask.idCounters.doc++;this.destroyed=!1;this.onPassword=null;this.onProgress=null;this.onUnsupportedFeature=null}get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;await(this._transport?.destroy());this._transport=null;if(this._worker){this._worker.destroy();this._worker=null}}}exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(e,t,s=!1,r=null){this.length=e;this.initialData=t;this.progressiveDone=s;this.contentDispositionFilename=r;this._rangeListeners=[];this._progressListeners=[];this._progressiveReadListeners=[];this._progressiveDoneListeners=[];this._readyCapability=(0,_util.createPromiseCapability)()}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(const s of this._rangeListeners)s(e,t)}onDataProgress(e,t){this._readyCapability.promise.then((()=>{for(const s of this._progressListeners)s(e,t)}))}onDataProgressiveRead(e){this._readyCapability.promise.then((()=>{for(const t of this._progressiveReadListeners)t(e)}))}onDataProgressiveDone(){this._readyCapability.promise.then((()=>{for(const e of this._progressiveDoneListeners)e()}))}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(e,t){this._pdfInfo=e;this._transport=t;Object.defineProperty(this,"fingerprint",{get(){(0,_display_utils.deprecated)("`PDFDocumentProxy.fingerprint`, please use `PDFDocumentProxy.fingerprints` instead.");return this.fingerprints[0]}})}get annotationStorage(){return this._transport.annotationStorage}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return!!this._transport._htmlForXfa}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJavaScript(){return this._transport.getJavaScript()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}getStats(){return this._transport.getStats()}cleanup(e=!1){return this._transport.startCleanup(e||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}saveDocument(){this._transport.annotationStorage.size<=0&&(0,_display_utils.deprecated)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");return this._transport.saveDocument()}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{constructor(e,t,s,r,n=!1){this._pageIndex=e;this._pageInfo=t;this._ownerDocument=r;this._transport=s;this._stats=n?new _display_utils.StatTimer:null;this._pdfBug=n;this.commonObjs=s.commonObjs;this.objs=new PDFObjects;this.cleanupAfterRender=!1;this.pendingCleanup=!1;this._intentStates=new Map;this._annotationPromises=new Map;this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:e,rotation:t=this.rotate,offsetX:s=0,offsetY:r=0,dontFlip:n=!1}={}){return new _display_utils.PageViewport({viewBox:this.view,scale:e,rotation:t,offsetX:s,offsetY:r,dontFlip:n})}getAnnotations({intent:e="display"}={}){const t=this._transport.getRenderingIntent(e);let s=this._annotationPromises.get(t.cacheKey);if(!s){s=this._transport.getAnnotations(this._pageIndex,t.renderingIntent);this._annotationPromises.set(t.cacheKey,s);s=s.then((e=>{for(const t of e){void 0!==t.titleObj&&Object.defineProperty(t,"title",{get(){(0,_display_utils.deprecated)("`title`-property on annotation, please use `titleObj` instead.");return t.titleObj.str}});void 0!==t.contentsObj&&Object.defineProperty(t,"contents",{get(){(0,_display_utils.deprecated)("`contents`-property on annotation, please use `contentsObj` instead.");return t.contentsObj.str}})}return e}))}return s}getJSActions(){return this._jsActionsPromise||=this._transport.getPageJSActions(this._pageIndex)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render({canvasContext:e,viewport:t,intent:s="display",annotationMode:r=_util.AnnotationMode.ENABLE,transform:n=null,imageLayer:a=null,canvasFactory:i=null,background:o=null,optionalContentConfigPromise:l=null}){if(void 0!==arguments[0]?.renderInteractiveForms){(0,_display_utils.deprecated)("render no longer accepts the `renderInteractiveForms`-option, please use the `annotationMode`-option instead.");!0===arguments[0].renderInteractiveForms&&r===_util.AnnotationMode.ENABLE&&(r=_util.AnnotationMode.ENABLE_FORMS)}if(void 0!==arguments[0]?.includeAnnotationStorage){(0,_display_utils.deprecated)("render no longer accepts the `includeAnnotationStorage`-option, please use the `annotationMode`-option instead.");!0===arguments[0].includeAnnotationStorage&&r===_util.AnnotationMode.ENABLE&&(r=_util.AnnotationMode.ENABLE_STORAGE)}this._stats&&this._stats.time("Overall");const c=this._transport.getRenderingIntent(s,r);this.pendingCleanup=!1;l||(l=this._transport.getOptionalContentConfig());let h=this._intentStates.get(c.cacheKey);if(!h){h=Object.create(null);this._intentStates.set(c.cacheKey,h)}if(h.streamReaderCancelTimeout){clearTimeout(h.streamReaderCancelTimeout);h.streamReaderCancelTimeout=null}const d=i||new DefaultCanvasFactory({ownerDocument:this._ownerDocument}),u=!!(c.renderingIntent&_util.RenderingIntentFlag.PRINT);if(!h.displayReadyCapability){h.displayReadyCapability=(0,_util.createPromiseCapability)();h.operatorList={fnArray:[],argsArray:[],lastChunk:!1};this._stats&&this._stats.time("Page Request");this._pumpOperatorList(c)}const complete=e=>{h.renderTasks.delete(p);(this.cleanupAfterRender||u)&&(this.pendingCleanup=!0);this._tryCleanup();if(e){p.capability.reject(e);this._abortOperatorList({intentState:h,reason:e instanceof Error?e:new Error(e)})}else p.capability.resolve();if(this._stats){this._stats.timeEnd("Rendering");this._stats.timeEnd("Overall")}},p=new InternalRenderTask({callback:complete,params:{canvasContext:e,viewport:t,transform:n,imageLayer:a,background:o},objs:this.objs,commonObjs:this.commonObjs,operatorList:h.operatorList,pageIndex:this._pageIndex,canvasFactory:d,useRequestAnimationFrame:!u,pdfBug:this._pdfBug});(h.renderTasks||=new Set).add(p);const g=p.task;Promise.all([h.displayReadyCapability.promise,l]).then((([e,t])=>{if(this.pendingCleanup)complete();else{this._stats&&this._stats.time("Rendering");p.initializeGraphics({transparency:e,optionalContentConfig:t});p.operatorListChanged()}})).catch(complete);return g}getOperatorList({intent:e="display",annotationMode:t=_util.AnnotationMode.ENABLE}={}){const s=this._transport.getRenderingIntent(e,t,!0);let r,n=this._intentStates.get(s.cacheKey);if(!n){n=Object.create(null);this._intentStates.set(s.cacheKey,n)}if(!n.opListReadCapability){r=Object.create(null);r.operatorListChanged=function operatorListChanged(){if(n.operatorList.lastChunk){n.opListReadCapability.resolve(n.operatorList);n.renderTasks.delete(r)}};n.opListReadCapability=(0,_util.createPromiseCapability)();(n.renderTasks||=new Set).add(r);n.operatorList={fnArray:[],argsArray:[],lastChunk:!1};this._stats&&this._stats.time("Page Request");this._pumpOperatorList(s)}return n.opListReadCapability.promise}streamTextContent({normalizeWhitespace:e=!1,disableCombineTextItems:t=!1,includeMarkedContent:s=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,normalizeWhitespace:!0===e,combineTextItems:!0!==t,includeMarkedContent:!0===s},{highWaterMark:100,size:e=>e.items.length})}getTextContent(e={}){if(this._transport._htmlForXfa)return this.getXfa().then((e=>_xfa_text.XfaText.textContent(e)));const t=this.streamTextContent(e);return new Promise((function(e,s){const r=t.getReader(),n={items:[],styles:Object.create(null)};!function pump(){r.read().then((function({value:t,done:s}){if(s)e(n);else{Object.assign(n.styles,t.styles);n.items.push(...t.items);pump()}}),s)}()}))}getStructTree(){return this._structTreePromise||=this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;this._transport.pageCache[this._pageIndex]=null;const e=[];for(const t of this._intentStates.values()){this._abortOperatorList({intentState:t,reason:new Error("Page was destroyed."),force:!0});if(!t.opListReadCapability)for(const s of t.renderTasks){e.push(s.completed);s.cancel()}}this.objs.clear();this._annotationPromises.clear();this._jsActionsPromise=null;this._structTreePromise=null;this.pendingCleanup=!1;return Promise.all(e)}cleanup(e=!1){this.pendingCleanup=!0;return this._tryCleanup(e)}_tryCleanup(e=!1){if(!this.pendingCleanup)return!1;for(const{renderTasks:e,operatorList:t}of this._intentStates.values())if(e.size>0||!t.lastChunk)return!1;this._intentStates.clear();this.objs.clear();this._annotationPromises.clear();this._jsActionsPromise=null;this._structTreePromise=null;e&&this._stats&&(this._stats=new _display_utils.StatTimer);this.pendingCleanup=!1;return!0}_startRenderPage(e,t){const s=this._intentStates.get(t);if(s){this._stats&&this._stats.timeEnd("Page Request");s.displayReadyCapability&&s.displayReadyCapability.resolve(e)}}_renderPageChunk(e,t){for(let s=0,r=e.length;s{s.read().then((({value:e,done:t})=>{if(t)r.streamReader=null;else if(!this._transport.destroyed){this._renderPageChunk(e,r);pump()}}),(e=>{r.streamReader=null;if(!this._transport.destroyed){if(r.operatorList){r.operatorList.lastChunk=!0;for(const e of r.renderTasks)e.operatorListChanged();this._tryCleanup()}if(r.displayReadyCapability)r.displayReadyCapability.reject(e);else{if(!r.opListReadCapability)throw e;r.opListReadCapability.reject(e)}}}))};pump()}_abortOperatorList({intentState:e,reason:t,force:s=!1}){if(e.streamReader){if(!s){if(e.renderTasks.size>0)return;if(t instanceof _display_utils.RenderingCancelledException){e.streamReaderCancelTimeout=setTimeout((()=>{this._abortOperatorList({intentState:e,reason:t,force:!0});e.streamReaderCancelTimeout=null}),RENDERING_CANCELLED_TIMEOUT);return}}e.streamReader.cancel(new _util.AbortException(t.message)).catch((()=>{}));e.streamReader=null;if(!this._transport.destroyed){for(const[t,s]of this._intentStates)if(s===e){this._intentStates.delete(t);break}this.cleanup()}}}get stats(){return this._stats}}exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(){this._listeners=[];this._deferred=Promise.resolve(void 0)}postMessage(e,t){const s=new WeakMap,r={data:function cloneValue(e){if("function"==typeof e||"symbol"==typeof e||e instanceof URL)throw new Error(`LoopbackPort.postMessage - cannot clone: ${e?.toString()}`);if("object"!=typeof e||null===e)return e;if(s.has(e))return s.get(e);let r,n;if((r=e.buffer)&&(0,_util.isArrayBuffer)(r)){n=t?.includes(r)?new e.constructor(r,e.byteOffset,e.byteLength):new e.constructor(e);s.set(e,n);return n}if(e instanceof Map){n=new Map;s.set(e,n);for(const[t,s]of e)n.set(t,cloneValue(s));return n}if(e instanceof Set){n=new Set;s.set(e,n);for(const t of e)n.add(cloneValue(t));return n}n=Array.isArray(e)?[]:Object.create(null);s.set(e,n);for(const t in e){let s,r=e;for(;!(s=Object.getOwnPropertyDescriptor(r,t));)r=Object.getPrototypeOf(r);void 0!==s.value&&(("function"!=typeof s.value||e.hasOwnProperty?.(t))&&(n[t]=cloneValue(s.value)))}return n}(e)};this._deferred.then((()=>{for(const e of this._listeners)e.call(this,r)}))}addEventListener(e,t){this._listeners.push(t)}removeEventListener(e,t){const s=this._listeners.indexOf(t);this._listeners.splice(s,1)}terminate(){this._listeners.length=0}}exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(_is_node.isNodeJS&&"function"==typeof require){PDFWorkerUtil.isWorkerDisabled=!0;PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js"}else if("object"==typeof document){const e=document?.currentScript?.src;e&&(PDFWorkerUtil.fallbackWorkerSrc=e.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.createCDNWrapper=function(e){const t=`importScripts("${e}");`;return URL.createObjectURL(new Blob([t]))};class PDFWorker{static get _workerPorts(){return(0,_util.shadow)(this,"_workerPorts",new WeakMap)}constructor({name:e=null,port:t=null,verbosity:s=(0,_util.getVerbosityLevel)()}={}){if(t&&PDFWorker._workerPorts.has(t))throw new Error("Cannot use more than one PDFWorker per port.");this.name=e;this.destroyed=!1;this.postMessageTransfers=!0;this.verbosity=s;this._readyCapability=(0,_util.createPromiseCapability)();this._port=null;this._webWorker=null;this._messageHandler=null;if(t){PDFWorker._workerPorts.set(t,this);this._initializeFromPort(t)}else this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e;this._messageHandler=new _message_handler.MessageHandler("main","worker",e);this._messageHandler.on("ready",(function(){}));this._readyCapability.resolve()}_initialize(){if("undefined"!=typeof Worker&&!PDFWorkerUtil.isWorkerDisabled&&!PDFWorker._mainThreadWorkerMessageHandler){let e=PDFWorker.workerSrc;try{(0,_util.isSameOrigin)(window.location.href,e)||(e=PDFWorkerUtil.createCDNWrapper(new URL(e,window.location).href));const t=new Worker(e),s=new _message_handler.MessageHandler("main","worker",t),terminateEarly=()=>{t.removeEventListener("error",onWorkerError);s.destroy();t.terminate();this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},onWorkerError=()=>{this._webWorker||terminateEarly()};t.addEventListener("error",onWorkerError);s.on("test",(e=>{t.removeEventListener("error",onWorkerError);if(this.destroyed)terminateEarly();else if(e){this._messageHandler=s;this._port=t;this._webWorker=t;e.supportTransfers||(this.postMessageTransfers=!1);this._readyCapability.resolve();s.send("configure",{verbosity:this.verbosity})}else{this._setupFakeWorker();s.destroy();t.terminate()}}));s.on("ready",(e=>{t.removeEventListener("error",onWorkerError);if(this.destroyed)terminateEarly();else try{sendTest()}catch(e){this._setupFakeWorker()}}));const sendTest=()=>{const e=new Uint8Array([this.postMessageTransfers?255:0]);try{s.send("test",e,[e.buffer])}catch(t){(0,_util.warn)("Cannot use postMessage transfers.");e[0]=0;s.send("test",e)}};sendTest();return}catch(e){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){if(!PDFWorkerUtil.isWorkerDisabled){(0,_util.warn)("Setting up fake worker.");PDFWorkerUtil.isWorkerDisabled=!0}PDFWorker._setupFakeWorkerGlobal.then((e=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const t=new LoopbackPort;this._port=t;const s="fake"+PDFWorkerUtil.fakeWorkerId++,r=new _message_handler.MessageHandler(s+"_worker",s,t);e.setup(r,t);const n=new _message_handler.MessageHandler(s,s+"_worker",t);this._messageHandler=n;this._readyCapability.resolve();n.send("configure",{verbosity:this.verbosity})})).catch((e=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${e.message}".`))}))}destroy(){this.destroyed=!0;if(this._webWorker){this._webWorker.terminate();this._webWorker=null}PDFWorker._workerPorts.delete(this._port);this._port=null;if(this._messageHandler){this._messageHandler.destroy();this._messageHandler=null}}static fromPort(e){if(!e?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return this._workerPorts.has(e.port)?this._workerPorts.get(e.port):new PDFWorker(e)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc){_is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.');return PDFWorkerUtil.fallbackWorkerSrc}throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch(e){return null}}static get _setupFakeWorkerGlobal(){const loader=async()=>{const mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_is_node.isNodeJS&&"function"==typeof require){const worker=eval("require")(this.workerSrc);return worker.WorkerMessageHandler}await(0,_display_utils.loadScript)(this.workerSrc);return window.pdfjsWorker.WorkerMessageHandler};return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}exports.PDFWorker=PDFWorker;PDFWorker.getWorkerSrc=function(){(0,_display_utils.deprecated)("`PDFWorker.getWorkerSrc()`, please use `PDFWorker.workerSrc` instead.");return this.workerSrc};class WorkerTransport{constructor(e,t,s,r){this.messageHandler=e;this.loadingTask=t;this.commonObjs=new PDFObjects;this.fontLoader=new _font_loader.FontLoader({docId:t.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),ownerDocument:r.ownerDocument,styleElement:r.styleElement});this._params=r;if(!r.useWorkerFetch){this.CMapReaderFactory=new r.CMapReaderFactory({baseUrl:r.cMapUrl,isCompressed:r.cMapPacked});this.StandardFontDataFactory=new r.StandardFontDataFactory({baseUrl:r.standardFontDataUrl})}this.destroyed=!1;this.destroyCapability=null;this._passwordCapability=null;this._networkStream=s;this._fullReader=null;this._lastProgress=null;this.pageCache=[];this.pagePromises=[];this.downloadInfoCapability=(0,_util.createPromiseCapability)();this.setupMessageHandler()}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}getRenderingIntent(e,t=_util.AnnotationMode.ENABLE,s=!1){let r=_util.RenderingIntentFlag.DISPLAY,n="";switch(e){case"any":r=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":r=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${e}`)}switch(t){case _util.AnnotationMode.DISABLE:r+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:r+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:r+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE;n=this.annotationStorage.lastModified;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${t}`)}s&&(r+=_util.RenderingIntentFlag.OPLIST);return{renderingIntent:r,cacheKey:`${r}_${n}`}}destroy(){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"));const e=[];for(const t of this.pageCache)t&&e.push(t._destroy());this.pageCache.length=0;this.pagePromises.length=0;this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const t=this.messageHandler.sendWithPromise("Terminate",null);e.push(t);Promise.all(e).then((()=>{this.commonObjs.clear();this.fontLoader.clear();this._getFieldObjectsPromise=null;this._hasJSActionsPromise=null;this._networkStream&&this._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated."));if(this.messageHandler){this.messageHandler.destroy();this.messageHandler=null}this.destroyCapability.resolve()}),this.destroyCapability.reject);return this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e,loadingTask:t}=this;e.on("GetReader",((e,t)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available.");this._fullReader=this._networkStream.getFullReader();this._fullReader.onProgress=e=>{this._lastProgress={loaded:e.loaded,total:e.total}};t.onPull=()=>{this._fullReader.read().then((function({value:e,done:s}){if(s)t.close();else{(0,_util.assert)((0,_util.isArrayBuffer)(e),"GetReader - expected an ArrayBuffer.");t.enqueue(new Uint8Array(e),1,[e])}})).catch((e=>{t.error(e)}))};t.onCancel=e=>{this._fullReader.cancel(e);t.ready.catch((e=>{if(!this.destroyed)throw e}))}}));e.on("ReaderHeadersReady",(e=>{const s=(0,_util.createPromiseCapability)(),r=this._fullReader;r.headersReady.then((()=>{if(!r.isStreamingSupported||!r.isRangeSupported){this._lastProgress&&t.onProgress&&t.onProgress(this._lastProgress);r.onProgress=e=>{t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})}}s.resolve({isStreamingSupported:r.isStreamingSupported,isRangeSupported:r.isRangeSupported,contentLength:r.contentLength})}),s.reject);return s.promise}));e.on("GetRangeReader",((e,t)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const s=this._networkStream.getRangeReader(e.begin,e.end);if(s){t.onPull=()=>{s.read().then((function({value:e,done:s}){if(s)t.close();else{(0,_util.assert)((0,_util.isArrayBuffer)(e),"GetRangeReader - expected an ArrayBuffer.");t.enqueue(new Uint8Array(e),1,[e])}})).catch((e=>{t.error(e)}))};t.onCancel=e=>{s.cancel(e);t.ready.catch((e=>{if(!this.destroyed)throw e}))}}else t.close()}));e.on("GetDoc",(({pdfInfo:e})=>{this._numPages=e.numPages;this._htmlForXfa=e.htmlForXfa;delete e.htmlForXfa;t._capability.resolve(new PDFDocumentProxy(e,this))}));e.on("DocException",(function(e){let s;switch(e.name){case"PasswordException":s=new _util.PasswordException(e.message,e.code);break;case"InvalidPDFException":s=new _util.InvalidPDFException(e.message);break;case"MissingPDFException":s=new _util.MissingPDFException(e.message);break;case"UnexpectedResponseException":s=new _util.UnexpectedResponseException(e.message,e.status);break;case"UnknownErrorException":s=new _util.UnknownErrorException(e.message,e.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}t._capability.reject(s)}));e.on("PasswordRequest",(e=>{this._passwordCapability=(0,_util.createPromiseCapability)();if(t.onPassword){const updatePassword=e=>{this._passwordCapability.resolve({password:e})};try{t.onPassword(updatePassword,e.code)}catch(e){this._passwordCapability.reject(e)}}else this._passwordCapability.reject(new _util.PasswordException(e.message,e.code));return this._passwordCapability.promise}));e.on("DataLoaded",(e=>{t.onProgress&&t.onProgress({loaded:e.length,total:e.length});this.downloadInfoCapability.resolve(e)}));e.on("StartRenderPage",(e=>{if(this.destroyed)return;this.pageCache[e.pageIndex]._startRenderPage(e.transparency,e.cacheKey)}));e.on("commonobj",(t=>{if(this.destroyed)return;const[s,r,n]=t;if(!this.commonObjs.has(s))switch(r){case"Font":const t=this._params;if("error"in n){const e=n.error;(0,_util.warn)(`Error during font loading: ${e}`);this.commonObjs.resolve(s,e);break}let a=null;t.pdfBug&&globalThis.FontInspector?.enabled&&(a={registerFont(e,t){globalThis.FontInspector.fontAdded(e,t)}});const i=new _font_loader.FontFaceObject(n,{isEvalSupported:t.isEvalSupported,disableFontFace:t.disableFontFace,ignoreErrors:t.ignoreErrors,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),fontRegistry:a});this.fontLoader.bind(i).catch((t=>e.sendWithPromise("FontFallback",{id:s}))).finally((()=>{!t.fontExtraProperties&&i.data&&(i.data=null);this.commonObjs.resolve(s,i)}));break;case"FontPath":case"Image":this.commonObjs.resolve(s,n);break;default:throw new Error(`Got unknown common object type ${r}`)}}));e.on("obj",(e=>{if(this.destroyed)return;const[t,s,r,n]=e,a=this.pageCache[s];if(!a.objs.has(t))switch(r){case"Image":a.objs.resolve(t,n);const e=8e6;n?.data?.length>e&&(a.cleanupAfterRender=!0);break;case"Pattern":a.objs.resolve(t,n);break;default:throw new Error(`Got unknown object type ${r}`)}}));e.on("DocProgress",(e=>{this.destroyed||t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})}));e.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this));e.on("FetchBuiltInCMap",(e=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.CMapReaderFactory?this.CMapReaderFactory.fetch(e):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))));e.on("FetchStandardFontData",(e=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.StandardFontDataFactory?this.StandardFontDataFactory.fetch(e):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))))}_onUnsupportedFeature({featureId:e}){this.destroyed||this.loadingTask.onUnsupportedFeature&&this.loadingTask.onUnsupportedFeature(e)}getData(){return this.messageHandler.sendWithPromise("GetData",null)}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request"));const t=e-1;if(t in this.pagePromises)return this.pagePromises[t];const s=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then((e=>{if(this.destroyed)throw new Error("Transport destroyed");const s=new PDFPageProxy(t,e,this,this._params.ownerDocument,this._params.pdfBug);this.pageCache[t]=s;return s}));this.pagePromises[t]=s;return s}getPageIndex(e){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:e})}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}saveDocument(){return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:this.annotationStorage.serializable,filename:this._fullReader?.filename??null}).finally((()=>{this.annotationStorage.resetModified()}))}getFieldObjects(){return this._getFieldObjectsPromise||=this.messageHandler.sendWithPromise("GetFieldObjects",null)}hasJSActions(){return this._hasJSActionsPromise||=this.messageHandler.sendWithPromise("HasJSActions",null)}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return"string"!=typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getJavaScript(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}getDocJSActions(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then((e=>new _optional_content_config.OptionalContentConfig(e)))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){return this.messageHandler.sendWithPromise("GetMetadata",null).then((e=>({info:e[0],metadata:e[1]?new _metadata.Metadata(e[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null})))}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}getStats(){return this.messageHandler.sendWithPromise("GetStats",null)}async startCleanup(e=!1){await this.messageHandler.sendWithPromise("Cleanup",null);if(!this.destroyed){for(let e=0,t=this.pageCache.length;e{this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){if(!this.cancelled){this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper);if(this.operatorListIdx===this.operatorList.argsArray.length){this.running=!1;if(this.operatorList.lastChunk){this.gfx.endDrawing();this._canvas&&InternalRenderTask.canvasInUse.delete(this._canvas);this.callback()}}}}}const version="2.11.338";exports.version=version;const build="dedff3c98";exports.build=build},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});t.FontLoader=t.FontFaceObject=void 0;var r=s(2);class BaseFontLoader{constructor({docId:e,onUnsupportedFeature:t,ownerDocument:s=globalThis.document,styleElement:n=null}){this.constructor===BaseFontLoader&&(0,r.unreachable)("Cannot initialize BaseFontLoader.");this.docId=e;this._onUnsupportedFeature=t;this._document=s;this.nativeFontFaces=[];this.styleElement=null}addNativeFontFace(e){this.nativeFontFaces.push(e);this._document.fonts.add(e)}insertRule(e){let t=this.styleElement;if(!t){t=this.styleElement=this._document.createElement("style");t.id=`PDFJS_FONT_STYLE_TAG_${this.docId}`;this._document.documentElement.getElementsByTagName("head")[0].appendChild(t)}const s=t.sheet;s.insertRule(e,s.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.length=0;if(this.styleElement){this.styleElement.remove();this.styleElement=null}}async bind(e){if(e.attached||e.missingFile)return;e.attached=!0;if(this.isFontLoadingAPISupported){const t=e.createNativeFontFace();if(t){this.addNativeFontFace(t);try{await t.loaded}catch(s){this._onUnsupportedFeature({featureId:r.UNSUPPORTED_FEATURES.errorFontLoadNative});(0,r.warn)(`Failed to load font '${t.family}': '${s}'.`);e.disableFontFace=!0;throw s}}return}const t=e.createFontFaceRule();if(t){this.insertRule(t);if(this.isSyncFontLoadingSupported)return;await new Promise((s=>{const r=this._queueLoadingCallback(s);this._prepareFontLoadEvent([t],[e],r)}))}}_queueLoadingCallback(e){(0,r.unreachable)("Abstract method `_queueLoadingCallback`.")}get isFontLoadingAPISupported(){const e=!!this._document?.fonts;return(0,r.shadow)(this,"isFontLoadingAPISupported",e)}get isSyncFontLoadingSupported(){(0,r.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}get _loadTestFont(){(0,r.unreachable)("Abstract method `_loadTestFont`.")}_prepareFontLoadEvent(e,t,s){(0,r.unreachable)("Abstract method `_prepareFontLoadEvent`.")}}let n;t.FontLoader=n;t.FontLoader=n=class GenericFontLoader extends BaseFontLoader{constructor(e){super(e);this.loadingContext={requests:[],nextRequestId:0};this.loadTestFontId=0}get isSyncFontLoadingSupported(){let e=!1;if("undefined"==typeof navigator)e=!0;else{/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent)?.[1]>=14&&(e=!0)}return(0,r.shadow)(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){const t=this.loadingContext,s={id:"pdfjs-font-loading-"+t.nextRequestId++,done:!1,complete:function completeRequest(){(0,r.assert)(!s.done,"completeRequest() cannot be called twice.");s.done=!0;for(;t.requests.length>0&&t.requests[0].done;){const e=t.requests.shift();setTimeout(e.callback,0)}},callback:e};t.requests.push(s);return s}get _loadTestFont(){return(0,r.shadow)(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(e,t,s){function int32(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function spliceString(e,t,s,r){return e.substring(0,t)+r+e.substring(t+s)}let n,a;const i=this._document.createElement("canvas");i.width=1;i.height=1;const o=i.getContext("2d");let l=0;const c=`lt${Date.now()}${this.loadTestFontId++}`;let h=this._loadTestFont;h=spliceString(h,976,c.length,c);const d=1482184792;let u=int32(h,16);for(n=0,a=c.length-3;n30){(0,r.warn)("Load test font never loaded.");t();return}o.font="30px "+e;o.fillText(".",0,20);o.getImageData(0,0,1,1).data[3]>0?t():setTimeout(isFontReady.bind(null,e,t))}(c,(()=>{this._document.body.removeChild(f);s.complete()}))}};t.FontFaceObject=class FontFaceObject{constructor(e,{isEvalSupported:t=!0,disableFontFace:s=!1,ignoreErrors:r=!1,onUnsupportedFeature:n,fontRegistry:a=null}){this.compiledGlyphs=Object.create(null);for(const t in e)this[t]=e[t];this.isEvalSupported=!1!==t;this.disableFontFace=!0===s;this.ignoreErrors=!0===r;this._onUnsupportedFeature=n;this.fontRegistry=a}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let e;if(this.cssFontInfo){const t={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(t.style=`oblique ${this.cssFontInfo.italicAngle}deg`);e=new FontFace(this.cssFontInfo.fontFamily,this.data,t)}else e=new FontFace(this.loadedName,this.data,{});this.fontRegistry&&this.fontRegistry.registerFont(this);return e}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const e=(0,r.bytesToString)(this.data),t=`url(data:${this.mimetype};base64,${btoa(e)});`;let s;if(this.cssFontInfo){let e=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(e+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`);s=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${e}src:${t}}`}else s=`@font-face {font-family:"${this.loadedName}";src:${t}}`;this.fontRegistry&&this.fontRegistry.registerFont(this,t);return s}getPathGenerator(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];let s;try{s=e.get(this.loadedName+"_path_"+t)}catch(e){if(!this.ignoreErrors)throw e;this._onUnsupportedFeature({featureId:r.UNSUPPORTED_FEATURES.errorFontGetPath});(0,r.warn)(`getPathGenerator - ignoring character: "${e}".`);return this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&r.IsEvalSupportedCached.value){const e=[];for(const t of s){const s=void 0!==t.args?t.args.join(","):"";e.push("c.",t.cmd,"(",s,");\n")}return this.compiledGlyphs[t]=new Function("c","size",e.join(""))}return this.compiledGlyphs[t]=function(e,t){for(const r of s){"scale"===r.cmd&&(r.args=[t,-t]);e[r.cmd].apply(e,r.args)}}}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});t.NodeStandardFontDataFactory=t.NodeCMapReaderFactory=t.NodeCanvasFactory=void 0;var r=s(5),n=s(4),a=s(2);let i=class{constructor(){(0,a.unreachable)("Not implemented: NodeCanvasFactory")}};t.NodeCanvasFactory=i;let o=class{constructor(){(0,a.unreachable)("Not implemented: NodeCMapReaderFactory")}};t.NodeCMapReaderFactory=o;let l=class{constructor(){(0,a.unreachable)("Not implemented: NodeStandardFontDataFactory")}};t.NodeStandardFontDataFactory=l;if(n.isNodeJS){const fetchData=function(e){return new Promise(((t,s)=>{require("fs").readFile(e,((e,r)=>{!e&&r?t(new Uint8Array(r)):s(new Error(e))}))}))};t.NodeCanvasFactory=i=class extends r.BaseCanvasFactory{_createCanvas(e,t){return require("canvas").createCanvas(e,t)}};t.NodeCMapReaderFactory=o=class extends r.BaseCMapReaderFactory{_fetchData(e,t){return fetchData(e).then((e=>({cMapData:e,compressionType:t})))}};t.NodeStandardFontDataFactory=l=class extends r.BaseStandardFontDataFactory{_fetchData(e){return fetchData(e)}}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});t.AnnotationStorage=void 0;var r=s(2);t.AnnotationStorage=class AnnotationStorage{constructor(){this._storage=new Map;this._timeStamp=Date.now();this._modified=!1;this.onSetModified=null;this.onResetModified=null}getValue(e,t){const s=this._storage.get(e);return void 0===s?t:Object.assign(t,s)}setValue(e,t){const s=this._storage.get(e);let r=!1;if(void 0!==s){for(const[e,n]of Object.entries(t))if(s[e]!==n){r=!0;s[e]=n}}else{r=!0;this._storage.set(e,t)}if(r){this._timeStamp=Date.now();this._setModified()}}getAll(){return this._storage.size>0?(0,r.objectFromMap)(this._storage):null}get size(){return this._storage.size}_setModified(){if(!this._modified){this._modified=!0;"function"==typeof this.onSetModified&&this.onSetModified()}}resetModified(){if(this._modified){this._modified=!1;"function"==typeof this.onResetModified&&this.onResetModified()}}get serializable(){return this._storage.size>0?this._storage:null}get lastModified(){return this._timeStamp.toString()}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});t.CanvasGraphics=void 0;var r=s(2),n=s(11),a=s(1);const i=4096,o=16;function addContextCurrentTransform(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{const t=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"lineWidth");e._setLineWidth=t.set;e._getLineWidth=t.get;Object.defineProperty(e,"lineWidth",{set:function setLineWidth(e){this._setLineWidth(1.000001*e)},get:function getLineWidth(){return this._getLineWidth()}})}catch(e){}Object.defineProperty(e,"mozCurrentTransform",{get:function getCurrentTransform(){return this._transformMatrix}});Object.defineProperty(e,"mozCurrentTransformInverse",{get:function getCurrentTransformInverse(){const[e,t,s,r,n,a]=this._transformMatrix,i=e*r-t*s,o=t*s-e*r;return[r/i,t/o,s/o,e/i,(r*n-s*a)/o,(t*n-e*a)/i]}});e.save=function ctxSave(){const e=this._transformMatrix;this._transformStack.push(e);this._transformMatrix=e.slice(0,6);this._originalSave()};e.restore=function ctxRestore(){const e=this._transformStack.pop();if(e){this._transformMatrix=e;this._originalRestore()}};e.translate=function ctxTranslate(e,t){const s=this._transformMatrix;s[4]=s[0]*e+s[2]*t+s[4];s[5]=s[1]*e+s[3]*t+s[5];this._originalTranslate(e,t)};e.scale=function ctxScale(e,t){const s=this._transformMatrix;s[0]*=e;s[1]*=e;s[2]*=t;s[3]*=t;this._originalScale(e,t)};e.transform=function ctxTransform(t,s,r,n,a,i){const o=this._transformMatrix;this._transformMatrix=[o[0]*t+o[2]*s,o[1]*t+o[3]*s,o[0]*r+o[2]*n,o[1]*r+o[3]*n,o[0]*a+o[2]*i+o[4],o[1]*a+o[3]*i+o[5]];e._originalTransform(t,s,r,n,a,i)};e.setTransform=function ctxSetTransform(t,s,r,n,a,i){this._transformMatrix=[t,s,r,n,a,i];e._originalSetTransform(t,s,r,n,a,i)};e.resetTransform=function ctxResetTransform(){this._transformMatrix=[1,0,0,1,0,0];e._originalResetTransform()};e.rotate=function ctxRotate(e){const t=Math.cos(e),s=Math.sin(e),r=this._transformMatrix;this._transformMatrix=[r[0]*t+r[2]*s,r[1]*t+r[3]*s,r[0]*-s+r[2]*t,r[1]*-s+r[3]*t,r[4],r[5]];this._originalRotate(e)}}}class CachedCanvases{constructor(e){this.canvasFactory=e;this.cache=Object.create(null)}getCanvas(e,t,s,r){let n;if(void 0!==this.cache[e]){n=this.cache[e];this.canvasFactory.reset(n,t,s);n.context.setTransform(1,0,0,1,0,0)}else{n=this.canvasFactory.create(t,s);this.cache[e]=n}r&&addContextCurrentTransform(n.context);return n}clear(){for(const e in this.cache){const t=this.cache[e];this.canvasFactory.destroy(t);delete this.cache[e]}}}class LRUCache{constructor(e=0){this._cache=new Map;this._maxSize=e}has(e){return this._cache.has(e)}get(e){if(this._cache.has(e)){const t=this._cache.get(e);this._cache.delete(e);this._cache.set(e,t)}return this._cache.get(e)}set(e,t){if(!(this._maxSize<=0)){this._cache.size+1>this._maxSize&&this._cache.delete(this._cache.keys().next().value);this._cache.set(e,t)}}clear(){this._cache.clear()}}class CanvasExtraState{constructor(){this.alphaIsShape=!1;this.fontSize=0;this.fontSizeScale=1;this.textMatrix=r.IDENTITY_MATRIX;this.textMatrixScale=1;this.fontMatrix=r.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=r.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}clone(){return Object.create(this)}setCurrentPoint(e,t){this.x=e;this.y=t}}function putBinaryImageData(e,t,s=null){if("undefined"!=typeof ImageData&&t instanceof ImageData){e.putImageData(t,0,0);return}const n=t.height,a=t.width,i=n%o,l=(n-i)/o,c=0===i?l:l+1,h=e.createImageData(a,o);let d,u=0;const p=t.data,g=h.data;let f,m,_,A,b,y,S,x;if(s)switch(s.length){case 1:b=s[0];y=s[0];S=s[0];x=s[0];break;case 4:b=s[0];y=s[1];S=s[2];x=s[3]}if(t.kind===r.ImageKind.GRAYSCALE_1BPP){const t=p.byteLength,s=new Uint32Array(g.buffer,0,g.byteLength>>2),n=s.length,A=a+7>>3;let b=4294967295,y=r.IsLittleEndianCached.value?4278190080:255;x&&255===x[0]&&0===x[255]&&([b,y]=[y,b]);for(f=0;fA?a:8*e-7,i=-8&n;let o=0,l=0;for(;r>=1}}for(;d=l){_=i;A=a*_}d=0;for(m=A;m--;){g[d++]=p[u++];g[d++]=p[u++];g[d++]=p[u++];g[d++]=255}if(t)for(let e=0;e>=1}}e.putImageData(l,0,t*o)}}function copyCtxState(e,t){const s=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"];for(let r=0,n=s.length;r>8;e[a-2]=e[a-2]*n+s*i>>8;e[a-1]=e[a-1]*n+r*i>>8}}}function composeSMaskAlpha(e,t,s){const r=e.length;for(let n=3;n>8]>>8:t[n]*r>>16}}function composeSMask(e,t,s){const r=t.canvas,n=t.context;e.setTransform(t.scaleX,0,0,t.scaleY,t.offsetX,t.offsetY);!function genericComposeSMask(e,t,s,r,n,a,i){const o=!!a,l=o?a[0]:0,c=o?a[1]:0,h=o?a[2]:0;let d;d="Luminosity"===n?composeSMaskLuminosity:composeSMaskAlpha;const u=Math.min(r,Math.ceil(1048576/s));for(let n=0;n10&&"function"==typeof s,h=c?Date.now()+15:0;let d=0;const u=this.commonObjs,p=this.objs;let g;for(;;){if(void 0!==n&&o===n.nextBreakPoint){n.breakIt(o,s);return o}g=i[o];if(g!==r.OPS.dependency)this[g].apply(this,a[o]);else for(const e of a[o]){const t=e.startsWith("g_")?u:p;if(!t.has(e)){t.get(e,s);return o}}o++;if(o===l)return o;if(c&&++d>10){if(Date.now()>h){s();return o}d=0}}}endDrawing(){for(;this.stateStack.length||null!==this.current.activeSMask;)this.restore();this.ctx.restore();if(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.cachedCanvasPatterns.clear();this.cachedPatterns.clear();this.imageLayer&&this.imageLayer.endLayout()}_scaleImage(e,t){const s=e.width,r=e.height;let n,a,i=Math.max(Math.hypot(t[0],t[1]),1),o=Math.max(Math.hypot(t[2],t[3]),1),l=s,c=r,h="prescale1";for(;i>2&&l>1||o>2&&c>1;){let t=l,s=c;if(i>2&&l>1){t=Math.ceil(l/2);i/=l/t}if(o>2&&c>1){s=Math.ceil(c/2);o/=c/s}n=this.cachedCanvases.getCanvas(h,t,s);a=n.context;a.clearRect(0,0,t,s);a.drawImage(e,0,0,l,c,0,0,t,s);e=n.canvas;l=t;c=s;h="prescale1"===h?"prescale2":"prescale1"}return{img:e,paintWidth:l,paintHeight:c}}_createMaskCanvas(e){const t=this.ctx,s=e.width,n=e.height,a=this.current.fillColor,i=this.current.patternFill,o=this.cachedCanvases.getCanvas("maskCanvas",s,n);putBinaryImageMask(o.context,e);const l=t.mozCurrentTransform;let c=r.Util.transform(l,[1/s,0,0,-1/n,0,0]);c=r.Util.transform(c,[1,0,0,1,0,-n]);const h=r.Util.applyTransform([0,0],c),d=r.Util.applyTransform([s,n],c),u=r.Util.normalizeRect([h[0],h[1],d[0],d[1]]),p=Math.ceil(u[2]-u[0]),g=Math.ceil(u[3]-u[1]),f=this.cachedCanvases.getCanvas("fillCanvas",p,g,!0),m=f.context,_=Math.min(h[0],d[0]),A=Math.min(h[1],d[1]);m.translate(-_,-A);m.transform.apply(m,c);const b=this._scaleImage(o.canvas,m.mozCurrentTransformInverse);m.imageSmoothingEnabled=getImageSmoothingEnabled(m.mozCurrentTransform,e.interpolate);m.drawImage(b.img,0,0,b.img.width,b.img.height,0,0,s,n);m.globalCompositeOperation="source-in";const y=r.Util.transform(m.mozCurrentTransformInverse,[1,0,0,1,-_,-A]);m.fillStyle=i?a.getPattern(t,this,y,!1):a;m.fillRect(0,0,s,n);return{canvas:f.canvas,offsetX:Math.round(_),offsetY:Math.round(A)}}setLineWidth(e){this.current.lineWidth=e;this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=l[e]}setLineJoin(e){this.ctx.lineJoin=c[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,t){const s=this.ctx;if(void 0!==s.setLineDash){s.setLineDash(e);s.lineDashOffset=t}}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(let t=0,s=e.length;t0&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask?this.suspendSMaskGroup():this.endSMaskGroup());this.current.activeSMask=n?this.tempSMask:null;this.current.activeSMask&&this.beginSMaskGroup();this.tempSMask=null;break;case"TR":this.current.transferMaps=n}}}beginSMaskGroup(){const e=this.current.activeSMask,t=e.canvas.width,s=e.canvas.height,r="smaskGroupAt"+this.groupLevel,n=this.cachedCanvases.getCanvas(r,t,s,!0),a=this.ctx,i=a.mozCurrentTransform;this.ctx.save();const o=n.context;o.scale(1/e.scaleX,1/e.scaleY);o.translate(-e.offsetX,-e.offsetY);o.transform.apply(o,i);e.startTransformInverse=o.mozCurrentTransformInverse;copyCtxState(a,o);this.ctx=o;this.setGState([["BM","source-over"],["ca",1],["CA",1]]);this.groupStack.push(a);this.groupLevel++}suspendSMaskGroup(){const e=this.ctx;this.groupLevel--;this.ctx=this.groupStack.pop();composeSMask(this.ctx,this.current.activeSMask,e);this.ctx.restore();this.ctx.save();copyCtxState(e,this.ctx);this.current.resumeSMaskCtx=e;const t=r.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()}resumeSMaskGroup(){const e=this.current.resumeSMaskCtx,t=this.ctx;this.ctx=e;this.groupStack.push(t);this.groupLevel++}endSMaskGroup(){const e=this.ctx;this.groupLevel--;this.ctx=this.groupStack.pop();composeSMask(this.ctx,this.current.activeSMask,e);this.ctx.restore();copyCtxState(e,this.ctx);const t=r.Util.transform(this.current.activeSMask.startTransformInverse,e.mozCurrentTransform);this.ctx.transform.apply(this.ctx,t)}save(){this.ctx.save();const e=this.current;this.stateStack.push(e);this.current=e.clone();this.current.resumeSMaskCtx=null}restore(){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();if(0!==this.stateStack.length){this.current=this.stateStack.pop();this.ctx.restore();this.pendingClip=null;this._cachedGetSinglePixelWidth=null}else this.current.activeSMask=null}transform(e,t,s,r,n,a){this.ctx.transform(e,t,s,r,n,a);this._cachedGetSinglePixelWidth=null}constructPath(e,t){const s=this.ctx,n=this.current;let a=n.x,i=n.y;for(let n=0,o=0,l=e.length;n=this.current.lineWidth){t.save();t.resetTransform();t.lineWidth=Math.round(this._combinedScaleFactor);t.stroke();t.restore()}else{t.lineWidth=Math.max(e,this.current.lineWidth);t.stroke()}}e&&this.consumePath();t.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath();this.stroke()}fill(e){e=void 0===e||e;const t=this.ctx,s=this.current.fillColor;let r=!1;if(this.current.patternFill){t.save();t.fillStyle=s.getPattern(t,this,t.mozCurrentTransformInverse);r=!0}if(this.contentVisible)if(this.pendingEOFill){t.fill("evenodd");this.pendingEOFill=!1}else t.fill();r&&t.restore();e&&this.consumePath()}eoFill(){this.pendingEOFill=!0;this.fill()}fillStroke(){this.fill(!1);this.stroke(!1);this.consumePath()}eoFillStroke(){this.pendingEOFill=!0;this.fillStroke()}closeFillStroke(){this.closePath();this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0;this.closePath();this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=h}eoClip(){this.pendingClip=d}beginText(){this.current.textMatrix=r.IDENTITY_MATRIX;this.current.textMatrixScale=1;this.current.x=this.current.lineX=0;this.current.y=this.current.lineY=0}endText(){const e=this.pendingTextPaths,t=this.ctx;if(void 0!==e){t.save();t.beginPath();for(let s=0;s100&&(c=100);this.current.fontSizeScale=t/c;this.ctx.font=`${o} ${i} ${c}px ${l}`}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,t){this.current.x=this.current.lineX+=e;this.current.y=this.current.lineY+=t}setLeadingMoveText(e,t){this.setLeading(-t);this.moveText(e,t)}setTextMatrix(e,t,s,r,n,a){this.current.textMatrix=[e,t,s,r,n,a];this.current.textMatrixScale=Math.hypot(e,t);this.current.x=this.current.lineX=0;this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(e,t,s,n,a){const i=this.ctx,o=this.current,l=o.font,c=o.textRenderingMode,h=o.fontSize/o.fontSizeScale,d=c&r.TextRenderingMode.FILL_STROKE_MASK,u=!!(c&r.TextRenderingMode.ADD_TO_PATH_FLAG),p=o.patternFill&&!l.missingFile;let g;(l.disableFontFace||u||p)&&(g=l.getPathGenerator(this.commonObjs,e));if(l.disableFontFace||p){i.save();i.translate(t,s);i.beginPath();g(i,h);n&&i.setTransform.apply(i,n);d!==r.TextRenderingMode.FILL&&d!==r.TextRenderingMode.FILL_STROKE||i.fill();if(d===r.TextRenderingMode.STROKE||d===r.TextRenderingMode.FILL_STROKE){if(a){i.resetTransform();i.lineWidth=Math.round(this._combinedScaleFactor)}i.stroke()}i.restore()}else{d!==r.TextRenderingMode.FILL&&d!==r.TextRenderingMode.FILL_STROKE||i.fillText(e,t,s);if(d===r.TextRenderingMode.STROKE||d===r.TextRenderingMode.FILL_STROKE)if(a){i.save();i.moveTo(t,s);i.resetTransform();i.lineWidth=Math.round(this._combinedScaleFactor);i.strokeText(e,0,0);i.restore()}else i.strokeText(e,t,s)}if(u){(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:i.mozCurrentTransform,x:t,y:s,fontSize:h,addToPath:g})}}get isFontSubpixelAAEnabled(){const{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1);e.fillText("I",0,10);const t=e.getImageData(0,0,10,10).data;let s=!1;for(let e=3;e0&&t[e]<255){s=!0;break}return(0,r.shadow)(this,"isFontSubpixelAAEnabled",s)}showText(e){const t=this.current,s=t.font;if(s.isType3Font)return this.showType3Text(e);const n=t.fontSize;if(0===n)return;const a=this.ctx,i=t.fontSizeScale,o=t.charSpacing,l=t.wordSpacing,c=t.fontDirection,h=t.textHScale*c,d=e.length,u=s.vertical,p=u?1:-1,g=s.defaultVMetrics,f=n*t.fontMatrix[0],m=t.textRenderingMode===r.TextRenderingMode.FILL&&!s.disableFontFace&&!t.patternFill;a.save();let _;if(t.patternFill){a.save();const e=t.fillColor.getPattern(a,this,a.mozCurrentTransformInverse);_=a.mozCurrentTransform;a.restore();a.fillStyle=e}a.transform.apply(a,t.textMatrix);a.translate(t.x,t.y+t.textRise);c>0?a.scale(h,-1):a.scale(h,1);let A=t.lineWidth,b=!1;const y=t.textMatrixScale;if(0===y||0===A){const e=t.textRenderingMode&r.TextRenderingMode.FILL_STROKE_MASK;if(e===r.TextRenderingMode.STROKE||e===r.TextRenderingMode.FILL_STROKE){this._cachedGetSinglePixelWidth=null;A=this.getSinglePixelWidth();b=A<0}}else A/=y;if(1!==i){a.scale(i,i);A/=i}a.lineWidth=A;let S,x=0;for(S=0;S0){const e=1e3*a.measureText(A).width/n*i;if(knew CanvasGraphics(e,this.commonObjs,this.objs,this.canvasFactory)};t=new n.TilingPattern(e,s,this.ctx,a,r)}else t=this._getPattern(e[1],e[2]);return t}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments);this.current.patternFill=!0}setStrokeRGBColor(e,t,s){const n=r.Util.makeHexColor(e,t,s);this.ctx.strokeStyle=n;this.current.strokeColor=n}setFillRGBColor(e,t,s){const n=r.Util.makeHexColor(e,t,s);this.ctx.fillStyle=n;this.current.fillColor=n;this.current.patternFill=!1}_getPattern(e,t=null){let s;if(this.cachedPatterns.has(e))s=this.cachedPatterns.get(e);else{s=(0,n.getShadingPattern)(this.objs.get(e),this.cachedCanvasPatterns);this.cachedPatterns.set(e,s)}t&&(s.matrix=t);return s}shadingFill(e){if(!this.contentVisible)return;const t=this.ctx;this.save();const s=this._getPattern(e);t.fillStyle=s.getPattern(t,this,t.mozCurrentTransformInverse,!0);const n=t.mozCurrentTransformInverse;if(n){const e=t.canvas,s=e.width,a=e.height,i=r.Util.applyTransform([0,0],n),o=r.Util.applyTransform([0,a],n),l=r.Util.applyTransform([s,0],n),c=r.Util.applyTransform([s,a],n),h=Math.min(i[0],o[0],l[0],c[0]),d=Math.min(i[1],o[1],l[1],c[1]),u=Math.max(i[0],o[0],l[0],c[0]),p=Math.max(i[1],o[1],l[1],c[1]);this.ctx.fillRect(h,d,u-h,p-d)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.restore()}beginInlineImage(){(0,r.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,r.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(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;if(t){const e=t[2]-t[0],s=t[3]-t[1];this.ctx.rect(t[0],t[1],e,s);this.clip();this.endPath()}}}paintFormXObjectEnd(){if(this.contentVisible){this.restore();this.baseTransform=this.baseTransformStack.pop()}}beginGroup(e){if(!this.contentVisible)return;this.save();const t=this.ctx;e.isolated||(0,r.info)("TODO: Support non-isolated groups.");e.knockout&&(0,r.warn)("Knockout groups not supported.");const s=t.mozCurrentTransform;e.matrix&&t.transform.apply(t,e.matrix);if(!e.bbox)throw new Error("Bounding box is required.");let n=r.Util.getAxialAlignedBoundingBox(e.bbox,t.mozCurrentTransform);const a=[0,0,t.canvas.width,t.canvas.height];n=r.Util.intersect(n,a)||[0,0,0,0];const o=Math.floor(n[0]),l=Math.floor(n[1]);let c=Math.max(Math.ceil(n[2])-o,1),h=Math.max(Math.ceil(n[3])-l,1),d=1,u=1;if(c>i){d=c/i;c=i}if(h>i){u=h/i;h=i}let p="groupAt"+this.groupLevel;e.smask&&(p+="_smask_"+this.smaskCounter++%2);const g=this.cachedCanvases.getCanvas(p,c,h,!0),f=g.context;f.scale(1/d,1/u);f.translate(-o,-l);f.transform.apply(f,s);if(e.smask)this.smaskStack.push({canvas:g.canvas,context:f,offsetX:o,offsetY:l,scaleX:d,scaleY:u,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null});else{t.setTransform(1,0,0,1,0,0);t.translate(o,l);t.scale(d,u)}copyCtxState(t,f);this.ctx=f;this.setGState([["BM","source-over"],["ca",1],["CA",1]]);this.groupStack.push(t);this.groupLevel++;this.current.activeSMask=null}endGroup(e){if(!this.contentVisible)return;this.groupLevel--;const t=this.ctx;this.ctx=this.groupStack.pop();this.ctx.imageSmoothingEnabled=!1;e.smask?this.tempSMask=this.smaskStack.pop():this.ctx.drawImage(t.canvas,0,0);this.restore()}beginAnnotations(){this.save();this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)}endAnnotations(){this.restore()}beginAnnotation(e,t,s,r){this.save();resetCtxToDefault(this.ctx);this.current=new CanvasExtraState;if(Array.isArray(t)&&4===t.length){const e=t[2]-t[0],s=t[3]-t[1];this.ctx.rect(t[0],t[1],e,s);this.clip();this.endPath()}this.transform.apply(this,s);this.transform.apply(this,r)}endAnnotation(){this.restore()}paintImageMaskXObject(e){if(!this.contentVisible)return;const t=this.ctx,s=e.width,r=e.height,n=this.processingType3;n&&void 0===n.compiled&&(n.compiled=s<=1e3&&r<=1e3?function compileType3Glyph(e){const t=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),s=e.width,r=e.height,n=s+1;let a,i,o,l;const c=new Uint8Array(n*(r+1)),h=s+7&-8,d=e.data,u=new Uint8Array(h*r);let p=0;for(a=0,i=d.length;a0;){u[p++]=e&t?0:255;t>>=1}}let g=0;p=0;if(0!==u[p]){c[0]=1;++g}for(o=1;o>2)+(u[p+1]?4:0)+(u[p-h+1]?8:0);if(t[e]){c[l+o]=t[e];++g}p++}if(u[p-h]!==u[p]){c[l+o]=u[p]?2:4;++g}if(g>1e3)return null}p=h*(r-1);l=a*n;if(0!==u[p]){c[l]=8;++g}for(o=1;o1e3)return null;const f=new Int32Array([0,n,-1,0,-n,0,0,0,1]),m=[];for(a=0;g&&a<=r;a++){let e=a*n;const t=e+s;for(;e>4;c[e]&=o>>2|o<<2}r.push(e%n,e/n|0);c[e]||--g}while(i!==e);m.push(r);--a}return function(e){e.save();e.scale(1/s,-1/r);e.translate(0,-r);e.beginPath();for(let t=0,s=m.length;t1?this._cachedGetSinglePixelWidth=-this._combinedScaleFactor*n:t>Number.EPSILON?this._cachedGetSinglePixelWidth=n:this._cachedGetSinglePixelWidth=1}return this._cachedGetSinglePixelWidth}getCanvasPosition(e,t){const s=this.ctx.mozCurrentTransform;return[s[0]*e+s[2]*t+s[4],s[1]*e+s[3]*t+s[5]]}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}}t.CanvasGraphics=CanvasGraphics;for(const e in r.OPS)void 0!==CanvasGraphics.prototype[e]&&(CanvasGraphics.prototype[r.OPS[e]]=CanvasGraphics.prototype[e])},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});t.getShadingPattern=function getShadingPattern(e,t){switch(e[0]){case"RadialAxial":return new RadialAxialShadingPattern(e,t);case"Mesh":return new MeshShadingPattern(e);case"Dummy":return new DummyShadingPattern}throw new Error(`Unknown IR type: ${e[0]}`)};t.TilingPattern=void 0;var r=s(2);function applyBoundingBox(e,t){if(!t||"undefined"==typeof Path2D)return;const s=t[2]-t[0],r=t[3]-t[1],n=new Path2D;n.rect(t[0],t[1],s,r);e.clip(n)}class BaseShadingPattern{constructor(){this.constructor===BaseShadingPattern&&(0,r.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,r.unreachable)("Abstract method `getPattern` called.")}}class RadialAxialShadingPattern extends BaseShadingPattern{constructor(e,t){super();this._type=e[1];this._bbox=e[2];this._colorStops=e[3];this._p0=e[4];this._p1=e[5];this._r0=e[6];this._r1=e[7];this.matrix=null;this.cachedCanvasPatterns=t}_createGradient(e){let t;"axial"===this._type?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const e of this._colorStops)t.addColorStop(e[0],e[1]);return t}getPattern(e,t,s,n=!1){let a;if(n){applyBoundingBox(e,this._bbox);a=this._createGradient(e)}else if(this.cachedCanvasPatterns.has(this))a=this.cachedCanvasPatterns.get(this);else{const s=t.cachedCanvases.getCanvas("pattern",t.ctx.canvas.width,t.ctx.canvas.height,!0),r=s.context;r.clearRect(0,0,r.canvas.width,r.canvas.height);r.beginPath();r.rect(0,0,r.canvas.width,r.canvas.height);r.setTransform.apply(r,t.baseTransform);this.matrix&&r.transform.apply(r,this.matrix);applyBoundingBox(r,this._bbox);r.fillStyle=this._createGradient(r);r.fill();a=e.createPattern(s.canvas,"repeat");this.cachedCanvasPatterns.set(this,a)}if(!n){const e=new DOMMatrix(s);try{a.setTransform(e)}catch(e){(0,r.warn)(`RadialAxialShadingPattern.getPattern: "${e?.message}".`)}}return a}}function drawTriangle(e,t,s,r,n,a,i,o){const l=t.coords,c=t.colors,h=e.data,d=4*e.width;let u;if(l[s+1]>l[r+1]){u=s;s=r;r=u;u=a;a=i;i=u}if(l[r+1]>l[n+1]){u=r;r=n;n=u;u=i;i=o;o=u}if(l[s+1]>l[r+1]){u=s;s=r;r=u;u=a;a=i;i=u}const p=(l[s]+t.offsetX)*t.scaleX,g=(l[s+1]+t.offsetY)*t.scaleY,f=(l[r]+t.offsetX)*t.scaleX,m=(l[r+1]+t.offsetY)*t.scaleY,_=(l[n]+t.offsetX)*t.scaleX,A=(l[n+1]+t.offsetY)*t.scaleY;if(g>=A)return;const b=c[a],y=c[a+1],S=c[a+2],x=c[i],v=c[i+1],C=c[i+2],P=c[o],k=c[o+1],w=c[o+2],F=Math.round(g),R=Math.round(A);let T,E,M,D,O,I,L,N;for(let e=F;e<=R;e++){if(eA?1:m===A?0:(m-e)/(m-A);T=f-(f-_)*t;E=x-(x-P)*t;M=v-(v-k)*t;D=C-(C-w)*t}let t;t=eA?1:(g-e)/(g-A);O=p-(p-_)*t;I=b-(b-P)*t;L=y-(y-k)*t;N=S-(S-w)*t;const s=Math.round(Math.min(T,O)),r=Math.round(Math.max(T,O));let n=d*e+4*s;for(let e=s;e<=r;e++){t=(T-e)/(T-O);t<0?t=0:t>1&&(t=1);h[n++]=E-(E-I)*t|0;h[n++]=M-(M-L)*t|0;h[n++]=D-(D-N)*t|0;h[n++]=255}}}function drawFigure(e,t,s){const r=t.coords,n=t.colors;let a,i;switch(t.type){case"lattice":const o=t.verticesPerRow,l=Math.floor(r.length/o)-1,c=o-1;for(a=0;a=r?n=r:s=n/e;return{scale:s,size:n}}clipBbox(e,t,s,r,n){const a=r-t,i=n-s;e.ctx.rect(t,s,a,i);e.clip();e.endPath()}setFillAndStrokeStyleToContext(e,t,s){const i=e.ctx,o=e.current;switch(t){case n:const e=this.ctx;i.fillStyle=e.fillStyle;i.strokeStyle=e.strokeStyle;o.fillColor=e.fillStyle;o.strokeColor=e.strokeStyle;break;case a:const l=r.Util.makeHexColor(s[0],s[1],s[2]);i.fillStyle=l;i.strokeStyle=l;o.fillColor=l;o.strokeColor=l;break;default:throw new r.FormatError(`Unsupported paint type: ${t}`)}}getPattern(e,t,s,n=!1){let a=s;if(!n){a=r.Util.transform(a,t.baseTransform);this.matrix&&(a=r.Util.transform(a,this.matrix))}const i=this.createPatternCanvas(t);let o=new DOMMatrix(a);o=o.translate(i.offsetX,i.offsetY);o=o.scale(1/i.scaleX,1/i.scaleY);const l=e.createPattern(i.canvas,"repeat");try{l.setTransform(o)}catch(e){(0,r.warn)(`TilingPattern.getPattern: "${e?.message}".`)}return l}}t.TilingPattern=TilingPattern},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.GlobalWorkerOptions=void 0;const s=Object.create(null);t.GlobalWorkerOptions=s;s.workerPort=void 0===s.workerPort?null:s.workerPort;s.workerSrc=void 0===s.workerSrc?"":s.workerSrc},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});t.MessageHandler=void 0;var r=s(2);const n=1,a=2,i=1,o=2,l=3,c=4,h=5,d=6,u=7,p=8;function wrapReason(e){if(!(e instanceof Error||"object"==typeof e&&null!==e)){(0,r.warn)('wrapReason: Expected "reason" to be a (possibly cloned) Error.');return e}switch(e.name){case"AbortException":return new r.AbortException(e.message);case"MissingPDFException":return new r.MissingPDFException(e.message);case"PasswordException":return new r.PasswordException(e.message,e.code);case"UnexpectedResponseException":return new r.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new r.UnknownErrorException(e.message,e.details);default:return new r.UnknownErrorException(e.message,e.toString())}}t.MessageHandler=class MessageHandler{constructor(e,t,s){this.sourceName=e;this.targetName=t;this.comObj=s;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=e=>{const t=e.data;if(t.targetName!==this.sourceName)return;if(t.stream){this._processStreamMessage(t);return}if(t.callback){const e=t.callbackId,s=this.callbackCapabilities[e];if(!s)throw new Error(`Cannot resolve callback ${e}`);delete this.callbackCapabilities[e];if(t.callback===n)s.resolve(t.data);else{if(t.callback!==a)throw new Error("Unexpected callback case");s.reject(wrapReason(t.reason))}return}const r=this.actionHandler[t.action];if(!r)throw new Error(`Unknown action from worker: ${t.action}`);if(t.callbackId){const e=this.sourceName,i=t.sourceName;new Promise((function(e){e(r(t.data))})).then((function(r){s.postMessage({sourceName:e,targetName:i,callback:n,callbackId:t.callbackId,data:r})}),(function(r){s.postMessage({sourceName:e,targetName:i,callback:a,callbackId:t.callbackId,reason:wrapReason(r)})}))}else t.streamId?this._createStreamSink(t):r(t.data)};s.addEventListener("message",this._onComObjOnMessage)}on(e,t){const s=this.actionHandler;if(s[e])throw new Error(`There is already an actionName called "${e}"`);s[e]=t}send(e,t,s){this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},s)}sendWithPromise(e,t,s){const n=this.callbackId++,a=(0,r.createPromiseCapability)();this.callbackCapabilities[n]=a;try{this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:n,data:t},s)}catch(e){a.reject(e)}return a.promise}sendWithStream(e,t,s,n){const a=this.streamId++,o=this.sourceName,l=this.targetName,c=this.comObj;return new ReadableStream({start:s=>{const i=(0,r.createPromiseCapability)();this.streamControllers[a]={controller:s,startCall:i,pullCall:null,cancelCall:null,isClosed:!1};this._postMessage({sourceName:o,targetName:l,action:e,streamId:a,data:t,desiredSize:s.desiredSize},n);return i.promise},pull:e=>{const t=(0,r.createPromiseCapability)();this.streamControllers[a].pullCall=t;c.postMessage({sourceName:o,targetName:l,stream:d,streamId:a,desiredSize:e.desiredSize});return t.promise},cancel:e=>{(0,r.assert)(e instanceof Error,"cancel must have a valid reason");const t=(0,r.createPromiseCapability)();this.streamControllers[a].cancelCall=t;this.streamControllers[a].isClosed=!0;c.postMessage({sourceName:o,targetName:l,stream:i,streamId:a,reason:wrapReason(e)});return t.promise}},s)}_createStreamSink(e){const t=e.streamId,s=this.sourceName,n=e.sourceName,a=this.comObj,i=this,o=this.actionHandler[e.action],d={enqueue(e,a=1,o){if(this.isCancelled)return;const l=this.desiredSize;this.desiredSize-=a;if(l>0&&this.desiredSize<=0){this.sinkCapability=(0,r.createPromiseCapability)();this.ready=this.sinkCapability.promise}i._postMessage({sourceName:s,targetName:n,stream:c,streamId:t,chunk:e},o)},close(){if(!this.isCancelled){this.isCancelled=!0;a.postMessage({sourceName:s,targetName:n,stream:l,streamId:t});delete i.streamSinks[t]}},error(e){(0,r.assert)(e instanceof Error,"error must have a valid reason");if(!this.isCancelled){this.isCancelled=!0;a.postMessage({sourceName:s,targetName:n,stream:h,streamId:t,reason:wrapReason(e)})}},sinkCapability:(0,r.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};d.sinkCapability.resolve();d.ready=d.sinkCapability.promise;this.streamSinks[t]=d;new Promise((function(t){t(o(e.data,d))})).then((function(){a.postMessage({sourceName:s,targetName:n,stream:p,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:s,targetName:n,stream:p,streamId:t,reason:wrapReason(e)})}))}_processStreamMessage(e){const t=e.streamId,s=this.sourceName,n=e.sourceName,a=this.comObj,g=this.streamControllers[t],f=this.streamSinks[t];switch(e.stream){case p:e.success?g.startCall.resolve():g.startCall.reject(wrapReason(e.reason));break;case u:e.success?g.pullCall.resolve():g.pullCall.reject(wrapReason(e.reason));break;case d:if(!f){a.postMessage({sourceName:s,targetName:n,stream:u,streamId:t,success:!0});break}f.desiredSize<=0&&e.desiredSize>0&&f.sinkCapability.resolve();f.desiredSize=e.desiredSize;new Promise((function(e){e(f.onPull&&f.onPull())})).then((function(){a.postMessage({sourceName:s,targetName:n,stream:u,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:s,targetName:n,stream:u,streamId:t,reason:wrapReason(e)})}));break;case c:(0,r.assert)(g,"enqueue should have stream controller");if(g.isClosed)break;g.controller.enqueue(e.chunk);break;case l:(0,r.assert)(g,"close should have stream controller");if(g.isClosed)break;g.isClosed=!0;g.controller.close();this._deleteStreamController(g,t);break;case h:(0,r.assert)(g,"error should have stream controller");g.controller.error(wrapReason(e.reason));this._deleteStreamController(g,t);break;case o:e.success?g.cancelCall.resolve():g.cancelCall.reject(wrapReason(e.reason));this._deleteStreamController(g,t);break;case i:if(!f)break;new Promise((function(t){t(f.onCancel&&f.onCancel(wrapReason(e.reason)))})).then((function(){a.postMessage({sourceName:s,targetName:n,stream:o,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:s,targetName:n,stream:o,streamId:t,reason:wrapReason(e)})}));f.sinkCapability.reject(wrapReason(e.reason));f.isCancelled=!0;delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}async _deleteStreamController(e,t){await Promise.allSettled([e.startCall&&e.startCall.promise,e.pullCall&&e.pullCall.promise,e.cancelCall&&e.cancelCall.promise]);delete this.streamControllers[t]}_postMessage(e,t){t&&this.postMessageTransfers?this.comObj.postMessage(e,t):this.comObj.postMessage(e)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});t.Metadata=void 0;var r=s(2);t.Metadata=class Metadata{constructor({parsedData:e,rawData:t}){this._metadataMap=e;this._data=t}getRaw(){return this._data}get(e){return this._metadataMap.get(e)??null}getAll(){return(0,r.objectFromMap)(this._metadataMap)}has(e){return this._metadataMap.has(e)}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});t.OptionalContentConfig=void 0;var r=s(2);class OptionalContentGroup{constructor(e,t){this.visible=!0;this.name=e;this.intent=t}}t.OptionalContentConfig=class OptionalContentConfig{constructor(e){this.name=null;this.creator=null;this._order=null;this._groups=new Map;if(null!==e){this.name=e.name;this.creator=e.creator;this._order=e.order;for(const t of e.groups)this._groups.set(t.id,new OptionalContentGroup(t.name,t.intent));if("OFF"===e.baseState)for(const e of this._groups)e.visible=!1;for(const t of e.on)this._groups.get(t).visible=!0;for(const t of e.off)this._groups.get(t).visible=!1}}_evaluateVisibilityExpression(e){const t=e.length;if(t<2)return!0;const s=e[0];for(let n=1;n0?(0,r.objectFromMap)(this._groups):null}getGroup(e){return this._groups.get(e)||null}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});t.PDFDataTransportStream=void 0;var r=s(2),n=s(1);t.PDFDataTransportStream=class PDFDataTransportStream{constructor(e,t){(0,r.assert)(t,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');this._queuedChunks=[];this._progressiveDone=e.progressiveDone||!1;this._contentDispositionFilename=e.contentDispositionFilename||null;const s=e.initialData;if(s?.length>0){const e=new Uint8Array(s).buffer;this._queuedChunks.push(e)}this._pdfDataRangeTransport=t;this._isStreamingSupported=!e.disableStream;this._isRangeSupported=!e.disableRange;this._contentLength=e.length;this._fullRequestReader=null;this._rangeReaders=[];this._pdfDataRangeTransport.addRangeListener(((e,t)=>{this._onReceiveData({begin:e,chunk:t})}));this._pdfDataRangeTransport.addProgressListener(((e,t)=>{this._onProgress({loaded:e,total:t})}));this._pdfDataRangeTransport.addProgressiveReadListener((e=>{this._onReceiveData({chunk:e})}));this._pdfDataRangeTransport.addProgressiveDoneListener((()=>{this._onProgressiveDone()}));this._pdfDataRangeTransport.transportReady()}_onReceiveData(e){const t=new Uint8Array(e.chunk).buffer;if(void 0===e.begin)this._fullRequestReader?this._fullRequestReader._enqueue(t):this._queuedChunks.push(t);else{const s=this._rangeReaders.some((function(s){if(s._begin!==e.begin)return!1;s._enqueue(t);return!0}));(0,r.assert)(s,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(e){if(void 0===e.total){const t=this._rangeReaders[0];t?.onProgress&&t.onProgress({loaded:e.loaded})}else{const t=this._fullRequestReader;t?.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})}}_onProgressiveDone(){this._fullRequestReader&&this._fullRequestReader.progressiveDone();this._progressiveDone=!0}_removeRangeReader(e){const t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){(0,r.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const e=this._queuedChunks;this._queuedChunks=null;return new PDFDataTransportStreamReader(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const s=new PDFDataTransportStreamRangeReader(this,e,t);this._pdfDataRangeTransport.requestDataRange(e,t);this._rangeReaders.push(s);return s}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);for(const t of this._rangeReaders.slice(0))t.cancel(e);this._pdfDataRangeTransport.abort()}};class PDFDataTransportStreamReader{constructor(e,t,s=!1,r=null){this._stream=e;this._done=s||!1;this._filename=(0,n.isPdfFile)(r)?r:null;this._queuedChunks=t||[];this._loaded=0;for(const e of this._queuedChunks)this._loaded+=e.byteLength;this._requests=[];this._headersReady=Promise.resolve();e._fullRequestReader=this;this.onProgress=null}_enqueue(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}}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0){return{value:this._queuedChunks.shift(),done:!1}}if(this._done)return{value:void 0,done:!0};const e=(0,r.createPromiseCapability)();this._requests.push(e);return e.promise}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class PDFDataTransportStreamRangeReader{constructor(e,t,s){this._stream=e;this._begin=t;this._end=s;this._queuedChunk=null;this._requests=[];this._done=!1;this.onProgress=null}_enqueue(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0;this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const e=this._queuedChunk;this._queuedChunk=null;return{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=(0,r.createPromiseCapability)();this._requests.push(e);return e.promise}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0;this._stream._removeRangeReader(this)}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.XfaText=void 0;class XfaText{static textContent(e){const t=[],s={items:t,styles:Object.create(null)};!function walk(e){if(!e)return;let s=null;const r=e.name;if("#text"===r)s=e.value;else{if(!XfaText.shouldBuildText(r))return;e?.attributes?.textContent?s=e.attributes.textContent:e.value&&(s=e.value)}null!==s&&t.push({str:s});if(e.children)for(const t of e.children)walk(t)}(e);return s}static shouldBuildText(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}t.XfaText=XfaText},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});t.AnnotationLayer=void 0;var r=s(2),n=s(1),a=s(9),i=s(19);const o=1e3,l=new WeakSet;class AnnotationElementFactory{static create(e){switch(e.data.annotationType){case r.AnnotationType.LINK:return new LinkAnnotationElement(e);case r.AnnotationType.TEXT:return new TextAnnotationElement(e);case r.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new TextWidgetAnnotationElement(e);case"Btn":return e.data.radioButton?new RadioButtonWidgetAnnotationElement(e):e.data.checkBox?new CheckboxWidgetAnnotationElement(e):new PushButtonWidgetAnnotationElement(e);case"Ch":return new ChoiceWidgetAnnotationElement(e)}return new WidgetAnnotationElement(e);case r.AnnotationType.POPUP:return new PopupAnnotationElement(e);case r.AnnotationType.FREETEXT:return new FreeTextAnnotationElement(e);case r.AnnotationType.LINE:return new LineAnnotationElement(e);case r.AnnotationType.SQUARE:return new SquareAnnotationElement(e);case r.AnnotationType.CIRCLE:return new CircleAnnotationElement(e);case r.AnnotationType.POLYLINE:return new PolylineAnnotationElement(e);case r.AnnotationType.CARET:return new CaretAnnotationElement(e);case r.AnnotationType.INK:return new InkAnnotationElement(e);case r.AnnotationType.POLYGON:return new PolygonAnnotationElement(e);case r.AnnotationType.HIGHLIGHT:return new HighlightAnnotationElement(e);case r.AnnotationType.UNDERLINE:return new UnderlineAnnotationElement(e);case r.AnnotationType.SQUIGGLY:return new SquigglyAnnotationElement(e);case r.AnnotationType.STRIKEOUT:return new StrikeOutAnnotationElement(e);case r.AnnotationType.STAMP:return new StampAnnotationElement(e);case r.AnnotationType.FILEATTACHMENT:return new FileAttachmentAnnotationElement(e);default:return new AnnotationElement(e)}}}class AnnotationElement{constructor(e,{isRenderable:t=!1,ignoreBorder:s=!1,createQuadrilaterals:r=!1}={}){this.isRenderable=t;this.data=e.data;this.layer=e.layer;this.page=e.page;this.viewport=e.viewport;this.linkService=e.linkService;this.downloadManager=e.downloadManager;this.imageResourcesPath=e.imageResourcesPath;this.renderForms=e.renderForms;this.svgFactory=e.svgFactory;this.annotationStorage=e.annotationStorage;this.enableScripting=e.enableScripting;this.hasJSActions=e.hasJSActions;this._fieldObjects=e.fieldObjects;this._mouseState=e.mouseState;t&&(this.container=this._createContainer(s));r&&(this.quadrilaterals=this._createQuadrilaterals(s))}_createContainer(e=!1){const t=this.data,s=this.page,n=this.viewport,a=document.createElement("section");let i=t.rect[2]-t.rect[0],o=t.rect[3]-t.rect[1];a.setAttribute("data-annotation-id",t.id);const l=r.Util.normalizeRect([t.rect[0],s.view[3]-t.rect[1]+s.view[1],t.rect[2],s.view[3]-t.rect[3]+s.view[1]]);a.style.transform=`matrix(${n.transform.join(",")})`;a.style.transformOrigin=`${-l[0]}px ${-l[1]}px`;if(!e&&t.borderStyle.width>0){a.style.borderWidth=`${t.borderStyle.width}px`;if(t.borderStyle.style!==r.AnnotationBorderStyleType.UNDERLINE){i-=2*t.borderStyle.width;o-=2*t.borderStyle.width}const e=t.borderStyle.horizontalCornerRadius,s=t.borderStyle.verticalCornerRadius;if(e>0||s>0){const t=`${e}px / ${s}px`;a.style.borderRadius=t}switch(t.borderStyle.style){case r.AnnotationBorderStyleType.SOLID:a.style.borderStyle="solid";break;case r.AnnotationBorderStyleType.DASHED:a.style.borderStyle="dashed";break;case r.AnnotationBorderStyleType.BEVELED:(0,r.warn)("Unimplemented border style: beveled");break;case r.AnnotationBorderStyleType.INSET:(0,r.warn)("Unimplemented border style: inset");break;case r.AnnotationBorderStyleType.UNDERLINE:a.style.borderBottomStyle="solid"}t.borderColor||t.color||null?a.style.borderColor=r.Util.makeHexColor(0|t.color[0],0|t.color[1],0|t.color[2]):a.style.borderWidth=0}a.style.left=`${l[0]}px`;a.style.top=`${l[1]}px`;a.style.width=`${i}px`;a.style.height=`${o}px`;return a}_createQuadrilaterals(e=!1){if(!this.data.quadPoints)return null;const t=[],s=this.data.rect;for(const s of this.data.quadPoints){this.data.rect=[s[2].x,s[2].y,s[1].x,s[1].y];t.push(this._createContainer(e))}this.data.rect=s;return t}_createPopup(e,t){let s=this.container;if(this.quadrilaterals){e=e||this.quadrilaterals;s=this.quadrilaterals[0]}if(!e){(e=document.createElement("div")).style.height=s.style.height;e.style.width=s.style.width;s.appendChild(e)}const r=new PopupElement({container:s,trigger:e,color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,hideWrapper:!0}).render();r.style.left=s.style.width;s.appendChild(r)}_renderQuadrilaterals(e){for(const t of this.quadrilaterals)t.className=e;return this.quadrilaterals}render(){(0,r.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(e,t=null){const s=[];if(this._fieldObjects){const n=this._fieldObjects[e];if(n)for(const{page:e,id:a,exportValues:i}of n){if(-1===e)continue;if(a===t)continue;const n="string"==typeof i?i:null,o=document.getElementById(a);!o||l.has(o)?s.push({id:a,exportValue:n,domElement:o}):(0,r.warn)(`_getElementsByName - element not allowed: ${a}`)}return s}for(const r of document.getElementsByName(e)){const{id:e,exportValue:n}=r;e!==t&&(l.has(r)&&s.push({id:e,exportValue:n,domElement:r}))}return s}static get platform(){const e="undefined"!=typeof navigator?navigator.platform:"";return(0,r.shadow)(this,"platform",{isWin:e.includes("Win"),isMac:e.includes("Mac")})}}class LinkAnnotationElement extends AnnotationElement{constructor(e){super(e,{isRenderable:!!(e.data.url||e.data.dest||e.data.action||e.data.isTooltipOnly||e.data.resetForm||e.data.actions&&(e.data.actions.Action||e.data.actions["Mouse Up"]||e.data.actions["Mouse Down"])),createQuadrilaterals:!0})}render(){const{data:e,linkService:t}=this,s=document.createElement("a");if(e.url){t.addLinkAttributes||(0,r.warn)("LinkAnnotationElement.render - missing `addLinkAttributes`-method on the `linkService`-instance.");t.addLinkAttributes?.(s,e.url,e.newWindow)}else if(e.action)this._bindNamedAction(s,e.action);else if(e.dest)this._bindLink(s,e.dest);else{let t=!1;if(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions){t=!0;this._bindJSAction(s,e)}e.resetForm?this._bindResetFormAction(s,e.resetForm):t||this._bindLink(s,"")}if(this.quadrilaterals)return this._renderQuadrilaterals("linkAnnotation").map(((e,t)=>{const r=0===t?s:s.cloneNode();e.appendChild(r);return e}));this.container.className="linkAnnotation";this.container.appendChild(s);return this.container}_bindLink(e,t){e.href=this.linkService.getDestinationHash(t);e.onclick=()=>{t&&this.linkService.goToDestination(t);return!1};(t||""===t)&&(e.className="internalLink")}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl("");e.onclick=()=>{this.linkService.executeNamedAction(t);return!1};e.className="internalLink"}_bindJSAction(e,t){e.href=this.linkService.getAnchorUrl("");const s=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const r of Object.keys(t.actions)){const n=s.get(r);n&&(e[n]=()=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t.id,name:r}});return!1})}e.onclick||(e.onclick=()=>!1);e.className="internalLink"}_bindResetFormAction(e,t){const s=e.onclick;s||(e.href=this.linkService.getAnchorUrl(""));e.className="internalLink";if(this._fieldObjects)e.onclick=()=>{s&&s();const{fields:e,refs:r,include:n}=t,a=[];if(0!==e.length||0!==r.length){const t=new Set(r);for(const s of e){const e=this._fieldObjects[s]||[];for(const{id:s}of e)t.add(s)}for(const e of Object.values(this._fieldObjects))for(const s of e)t.has(s.id)===n&&a.push(s)}else for(const e of Object.values(this._fieldObjects))a.push(...e);const i=this.annotationStorage,o=[];for(const e of a){const{id:t}=e;o.push(t);switch(e.type){case"text":{const s=e.defaultValue||"";i.setValue(t,{value:s,valueAsString:s});break}case"checkbox":case"radiobutton":{const s=e.defaultValue===e.exportValues;i.setValue(t,{value:s});break}case"combobox":case"listbox":{const s=e.defaultValue||"";i.setValue(t,{value:s});break}default:continue}const s=document.getElementById(t);s&&l.has(s)&&s.dispatchEvent(new Event("resetform"))}this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:o,name:"ResetForm"}});return!1};else{(0,r.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.');s||(e.onclick=()=>!1)}}}class TextAnnotationElement extends AnnotationElement{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.titleObj?.str||e.data.contentsObj?.str)})}render(){this.container.className="textAnnotation";const e=document.createElement("img");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);return this.container}}class WidgetAnnotationElement extends AnnotationElement{render(){this.data.alternativeText&&(this.container.title=this.data.alternativeText);return this.container}_getKeyModifier(e){const{isWin:t,isMac:s}=AnnotationElement.platform;return t&&e.ctrlKey||s&&e.metaKey}_setEventListener(e,t,s,r){t.includes("mouse")?e.addEventListener(t,(e=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:s,value:r(e),shift:e.shiftKey,modifier:this._getKeyModifier(e)}})})):e.addEventListener(t,(e=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:s,value:e.target.checked}})}))}_setEventListeners(e,t,s){for(const[r,n]of t)("Action"===n||this.data.actions?.[n])&&this._setEventListener(e,r,n,s)}_setBackgroundColor(e){const t=this.data.backgroundColor||null;e.style.backgroundColor=null===t?"transparent":r.Util.makeHexColor(t[0],t[1],t[2])}_dispatchEventFromSandbox(e,t){const setColor=(e,t,s)=>{const r=s.detail[e];s.target.style[t]=i.ColorConverters[`${r[0]}_HTML`](r.slice(1))},s={display:e=>{const t=e.detail.display%2==1;e.target.style.visibility=t?"hidden":"visible";this.annotationStorage.setValue(this.data.id,{hidden:t,print:0===e.detail.display||3===e.detail.display})},print:e=>{this.annotationStorage.setValue(this.data.id,{print:e.detail.print})},hidden:e=>{e.target.style.visibility=e.detail.hidden?"hidden":"visible";this.annotationStorage.setValue(this.data.id,{hidden:e.detail.hidden})},focus:e=>{setTimeout((()=>e.target.focus({preventScroll:!1})),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.detail.readonly?e.target.setAttribute("readonly",""):e.target.removeAttribute("readonly")},required:e=>{e.detail.required?e.target.setAttribute("required",""):e.target.removeAttribute("required")},bgColor:e=>{setColor("bgColor","backgroundColor",e)},fillColor:e=>{setColor("fillColor","backgroundColor",e)},fgColor:e=>{setColor("fgColor","color",e)},textColor:e=>{setColor("textColor","color",e)},borderColor:e=>{setColor("borderColor","borderColor",e)},strokeColor:e=>{setColor("strokeColor","borderColor",e)}};for(const r of Object.keys(t.detail)){const n=e[r]||s[r];n&&n(t)}}}class TextWidgetAnnotationElement extends WidgetAnnotationElement{constructor(e){super(e,{isRenderable:e.renderForms||!e.data.hasAppearance&&!!e.data.fieldValue})}setPropertyOnSiblings(e,t,s,r){const n=this.annotationStorage;for(const a of this._getElementsByName(e.name,e.id)){a.domElement&&(a.domElement[t]=s);n.setValue(a.id,{[r]:s})}}render(){const e=this.annotationStorage,t=this.data.id;this.container.className="textWidgetAnnotation";let s=null;if(this.renderForms){const r=e.getValue(t,{value:this.data.fieldValue,valueAsString:this.data.fieldValue}),n=r.valueAsString||r.value||"",a={userValue:null,formattedValue:null,beforeInputSelectionRange:null,beforeInputValue:null};if(this.data.multiLine){s=document.createElement("textarea");s.textContent=n}else{s=document.createElement("input");s.type="text";s.setAttribute("value",n)}l.add(s);s.disabled=this.data.readOnly;s.name=this.data.fieldName;s.tabIndex=o;a.userValue=n;s.setAttribute("id",t);s.addEventListener("input",(r=>{e.setValue(t,{value:r.target.value});this.setPropertyOnSiblings(s,"value",r.target.value,"value")}));s.addEventListener("resetform",(e=>{const t=this.data.defaultFieldValue||"";s.value=a.userValue=t;delete a.formattedValue}));let blurListener=e=>{a.formattedValue&&(e.target.value=a.formattedValue);e.target.scrollLeft=0;a.beforeInputSelectionRange=null};if(this.enableScripting&&this.hasJSActions){s.addEventListener("focus",(e=>{a.userValue&&(e.target.value=a.userValue)}));s.addEventListener("updatefromsandbox",(s=>{const r={value(s){a.userValue=s.detail.value||"";e.setValue(t,{value:a.userValue.toString()});a.formattedValue||(s.target.value=a.userValue)},valueAsString(s){a.formattedValue=s.detail.valueAsString||"";s.target!==document.activeElement&&(s.target.value=a.formattedValue);e.setValue(t,{formattedValue:a.formattedValue})},selRange(e){const[t,s]=e.detail.selRange;t>=0&&s{a.beforeInputValue=e.target.value;let s=-1;"Escape"===e.key?s=0:"Enter"===e.key?s=2:"Tab"===e.key&&(s=3);if(-1!==s){a.userValue=e.target.value;this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:e.target.value,willCommit:!0,commitKey:s,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}})}}));const r=blurListener;blurListener=null;s.addEventListener("blur",(e=>{if(this._mouseState.isDown){a.userValue=e.target.value;this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:e.target.value,willCommit:!0,commitKey:1,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}})}r(e)}));s.addEventListener("mousedown",(e=>{a.beforeInputValue=e.target.value;a.beforeInputSelectionRange=null}));s.addEventListener("keyup",(e=>{e.target.selectionStart===e.target.selectionEnd&&(a.beforeInputSelectionRange=null)}));s.addEventListener("select",(e=>{a.beforeInputSelectionRange=[e.target.selectionStart,e.target.selectionEnd]}));this.data.actions?.Keystroke&&s.addEventListener("input",(e=>{let s=-1,r=-1;a.beforeInputSelectionRange&&([s,r]=a.beforeInputSelectionRange);this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:a.beforeInputValue,change:e.data,willCommit:!1,selStart:s,selEnd:r}})}));this._setEventListeners(s,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.value))}blurListener&&s.addEventListener("blur",blurListener);null!==this.data.maxLen&&(s.maxLength=this.data.maxLen);if(this.data.comb){const e=(this.data.rect[2]-this.data.rect[0])/this.data.maxLen;s.classList.add("comb");s.style.letterSpacing=`calc(${e}px - 1ch)`}}else{s=document.createElement("div");s.textContent=this.data.fieldValue;s.style.verticalAlign="middle";s.style.display="table-cell"}this._setTextStyle(s);this._setBackgroundColor(s);this.container.appendChild(s);return this.container}_setTextStyle(e){const t=["left","center","right"],{fontSize:s,fontColor:n}=this.data.defaultAppearanceData,a=e.style;s&&(a.fontSize=`${s}px`);a.color=r.Util.makeHexColor(n[0],n[1],n[2]);null!==this.data.textAlignment&&(a.textAlign=t[this.data.textAlignment])}}class CheckboxWidgetAnnotationElement extends WidgetAnnotationElement{constructor(e){super(e,{isRenderable:e.renderForms})}render(){const e=this.annotationStorage,t=this.data,s=t.id;let r=e.getValue(s,{value:t.exportValue===t.fieldValue}).value;if("string"==typeof r){r="Off"!==r;e.setValue(s,{value:r})}this.container.className="buttonWidgetAnnotation checkBox";const n=document.createElement("input");l.add(n);n.disabled=t.readOnly;n.type="checkbox";n.name=t.fieldName;r&&n.setAttribute("checked",!0);n.setAttribute("id",s);n.setAttribute("exportValue",t.exportValue);n.tabIndex=o;n.addEventListener("change",(r=>{const{name:n,checked:a}=r.target;for(const r of this._getElementsByName(n,s)){const s=a&&r.exportValue===t.exportValue;r.domElement&&(r.domElement.checked=s);e.setValue(r.id,{value:s})}e.setValue(s,{value:a})}));n.addEventListener("resetform",(e=>{const s=t.defaultFieldValue||"Off";e.target.checked=s===t.exportValue}));if(this.enableScripting&&this.hasJSActions){n.addEventListener("updatefromsandbox",(t=>{const r={value(t){t.target.checked="Off"!==t.detail.value;e.setValue(s,{value:t.target.checked})}};this._dispatchEventFromSandbox(r,t)}));this._setEventListeners(n,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.checked))}this._setBackgroundColor(n);this.container.appendChild(n);return this.container}}class RadioButtonWidgetAnnotationElement extends WidgetAnnotationElement{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.className="buttonWidgetAnnotation radioButton";const e=this.annotationStorage,t=this.data,s=t.id;let r=e.getValue(s,{value:t.fieldValue===t.buttonValue}).value;if("string"==typeof r){r=r!==t.buttonValue;e.setValue(s,{value:r})}const n=document.createElement("input");l.add(n);n.disabled=t.readOnly;n.type="radio";n.name=t.fieldName;r&&n.setAttribute("checked",!0);n.setAttribute("id",s);n.tabIndex=o;n.addEventListener("change",(t=>{const{name:r,checked:n}=t.target;for(const t of this._getElementsByName(r,s))e.setValue(t.id,{value:!1});e.setValue(s,{value:n})}));n.addEventListener("resetform",(e=>{const s=t.defaultFieldValue;e.target.checked=null!=s&&s===t.buttonValue}));if(this.enableScripting&&this.hasJSActions){const r=t.buttonValue;n.addEventListener("updatefromsandbox",(t=>{const n={value:t=>{const n=r===t.detail.value;for(const r of this._getElementsByName(t.target.name)){const t=n&&r.id===s;r.domElement&&(r.domElement.checked=t);e.setValue(r.id,{value:t})}}};this._dispatchEventFromSandbox(n,t)}));this._setEventListeners(n,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.checked))}this._setBackgroundColor(n);this.container.appendChild(n);return this.container}}class PushButtonWidgetAnnotationElement extends LinkAnnotationElement{render(){const e=super.render();e.className="buttonWidgetAnnotation pushButton";this.data.alternativeText&&(e.title=this.data.alternativeText);return e}}class ChoiceWidgetAnnotationElement extends WidgetAnnotationElement{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.className="choiceWidgetAnnotation";const e=this.annotationStorage,t=this.data.id;e.getValue(t,{value:this.data.fieldValue.length>0?this.data.fieldValue[0]:void 0});let{fontSize:s}=this.data.defaultAppearanceData;s||(s=9);const r=`calc(${s}px * var(--zoom-factor))`,n=document.createElement("select");l.add(n);n.disabled=this.data.readOnly;n.name=this.data.fieldName;n.setAttribute("id",t);n.tabIndex=o;n.style.fontSize=`${s}px`;if(!this.data.combo){n.size=this.data.options.length;this.data.multiSelect&&(n.multiple=!0)}n.addEventListener("resetform",(e=>{const t=this.data.defaultFieldValue;for(const e of n.options)e.selected=e.value===t}));for(const e of this.data.options){const t=document.createElement("option");t.textContent=e.displayValue;t.value=e.exportValue;this.data.combo&&(t.style.fontSize=r);this.data.fieldValue.includes(e.exportValue)&&t.setAttribute("selected",!0);n.appendChild(t)}const getValue=(e,t)=>{const s=t?"value":"textContent",r=e.target.options;return e.target.multiple?Array.prototype.filter.call(r,(e=>e.selected)).map((e=>e[s])):-1===r.selectedIndex?null:r[r.selectedIndex][s]},getItems=e=>{const t=e.target.options;return Array.prototype.map.call(t,(e=>({displayValue:e.textContent,exportValue:e.value})))};if(this.enableScripting&&this.hasJSActions){n.addEventListener("updatefromsandbox",(s=>{const r={value(s){const r=s.detail.value,a=new Set(Array.isArray(r)?r:[r]);for(const e of n.options)e.selected=a.has(e.value);e.setValue(t,{value:getValue(s,!0)})},multipleSelection(e){n.multiple=!0},remove(s){const r=n.options,a=s.detail.remove;r[a].selected=!1;n.remove(a);if(r.length>0){-1===Array.prototype.findIndex.call(r,(e=>e.selected))&&(r[0].selected=!0)}e.setValue(t,{value:getValue(s,!0),items:getItems(s)})},clear(s){for(;0!==n.length;)n.remove(0);e.setValue(t,{value:null,items:[]})},insert(s){const{index:r,displayValue:a,exportValue:i}=s.detail.insert,o=document.createElement("option");o.textContent=a;o.value=i;n.insertBefore(o,n.children[r]);e.setValue(t,{value:getValue(s,!0),items:getItems(s)})},items(s){const{items:r}=s.detail;for(;0!==n.length;)n.remove(0);for(const e of r){const{displayValue:t,exportValue:s}=e,r=document.createElement("option");r.textContent=t;r.value=s;n.appendChild(r)}n.options.length>0&&(n.options[0].selected=!0);e.setValue(t,{value:getValue(s,!0),items:getItems(s)})},indices(s){const r=new Set(s.detail.indices);for(const e of s.target.options)e.selected=r.has(e.index);e.setValue(t,{value:getValue(s,!0)})},editable(e){e.target.disabled=!e.detail.editable}};this._dispatchEventFromSandbox(r,s)}));n.addEventListener("input",(s=>{const r=getValue(s,!0),n=getValue(s,!1);e.setValue(t,{value:r});this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:n,changeEx:r,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"]],(e=>e.target.checked))}else n.addEventListener("input",(function(s){e.setValue(t,{value:getValue(s)})}));this._setBackgroundColor(n);this.container.appendChild(n);return this.container}}class PopupAnnotationElement extends AnnotationElement{constructor(e){super(e,{isRenderable:!(!e.data.titleObj?.str&&!e.data.contentsObj?.str)})}render(){this.container.className="popupAnnotation";if(["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;const e=`[data-annotation-id="${this.data.parentId}"]`,t=this.layer.querySelectorAll(e);if(0===t.length)return this.container;const s=new PopupElement({container:this.container,trigger:Array.from(t),color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj}),n=this.page,a=r.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]]),i=a[0]+this.data.parentRect[2]-this.data.parentRect[0],o=a[1];this.container.style.transformOrigin=`${-i}px ${-o}px`;this.container.style.left=`${i}px`;this.container.style.top=`${o}px`;this.container.appendChild(s.render());return this.container}}class PopupElement{constructor(e){this.container=e.container;this.trigger=e.trigger;this.color=e.color;this.titleObj=e.titleObj;this.modificationDate=e.modificationDate;this.contentsObj=e.contentsObj;this.hideWrapper=e.hideWrapper||!1;this.pinned=!1}render(){const e=document.createElement("div");e.className="popupWrapper";this.hideElement=this.hideWrapper?e:this.container;this.hideElement.hidden=!0;const t=document.createElement("div");t.className="popup";const s=this.color;if(s){const e=.7*(255-s[0])+s[0],n=.7*(255-s[1])+s[1],a=.7*(255-s[2])+s[2];t.style.backgroundColor=r.Util.makeHexColor(0|e,0|n,0|a)}const a=document.createElement("h1");a.dir=this.titleObj.dir;a.textContent=this.titleObj.str;t.appendChild(a);const i=n.PDFDateString.toDateObject(this.modificationDate);if(i){const e=document.createElement("span");e.textContent="{{date}}, {{time}}";e.dataset.l10nId="annotation_date_string";e.dataset.l10nArgs=JSON.stringify({date:i.toLocaleDateString(),time:i.toLocaleTimeString()});t.appendChild(e)}const o=this._formatContents(this.contentsObj);t.appendChild(o);Array.isArray(this.trigger)||(this.trigger=[this.trigger]);for(const e of this.trigger){e.addEventListener("click",this._toggle.bind(this));e.addEventListener("mouseover",this._show.bind(this,!1));e.addEventListener("mouseout",this._hide.bind(this,!1))}t.addEventListener("click",this._hide.bind(this,!0));e.appendChild(t);return e}_formatContents({str:e,dir:t}){const s=document.createElement("p");s.dir=t;const r=e.split(/(?:\r\n?|\n)/);for(let e=0,t=r.length;e{Object.defineProperty(t,"__esModule",{value:!0});t.ColorConverters=void 0;function makeColorComp(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}t.ColorConverters=class ColorConverters{static CMYK_G([e,t,s,r]){return["G",1-Math.min(1,.3*e+.59*s+.11*t+r)]}static G_CMYK([e]){return["CMYK",0,0,0,1-e]}static G_RGB([e]){return["RGB",e,e,e]}static G_HTML([e]){const t=makeColorComp(e);return`#${t}${t}${t}`}static RGB_G([e,t,s]){return["G",.3*e+.59*t+.11*s]}static RGB_HTML([e,t,s]){return`#${makeColorComp(e)}${makeColorComp(t)}${makeColorComp(s)}`}static T_HTML(){return"#00000000"}static CMYK_RGB([e,t,s,r]){return["RGB",1-Math.min(1,e+r),1-Math.min(1,s+r),1-Math.min(1,t+r)]}static CMYK_HTML(e){return this.RGB_HTML(this.CMYK_RGB(e))}static RGB_CMYK([e,t,s]){const r=1-e,n=1-t,a=1-s;return["CMYK",r,n,a,Math.min(r,n,a)]}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});t.renderTextLayer=function renderTextLayer(e){const t=new TextLayerRenderTask({textContent:e.textContent,textContentStream:e.textContentStream,container:e.container,viewport:e.viewport,textDivs:e.textDivs,textContentItemsStr:e.textContentItemsStr,enhanceTextSelection:e.enhanceTextSelection});t._render(e.timeout);return t};var r=s(2);const n=30,a=new Map,i=/^\s+$/g;function appendText(e,t,s,o){const l=document.createElement("span"),c=e._enhanceTextSelection?{angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1}:{angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL};e._textDivs.push(l);const h=r.Util.transform(e._viewport.transform,t.transform);let d=Math.atan2(h[1],h[0]);const u=s[t.fontName];u.vertical&&(d+=Math.PI/2);const p=Math.hypot(h[2],h[3]),g=p*function getAscent(e,t){const s=a.get(e);if(s)return s;t.save();t.font=`30px ${e}`;const r=t.measureText("");let i=r.fontBoundingBoxAscent,o=Math.abs(r.fontBoundingBoxDescent);if(i){t.restore();const s=i/(i+o);a.set(e,s);return s}t.strokeStyle="red";t.clearRect(0,0,n,n);t.strokeText("g",0,0);let l=t.getImageData(0,0,n,n).data;o=0;for(let e=l.length-1-3;e>=0;e-=4)if(l[e]>0){o=Math.ceil(e/4/n);break}t.clearRect(0,0,n,n);t.strokeText("A",0,n);l=t.getImageData(0,0,n,n).data;i=0;for(let e=0,t=l.length;e0){i=n-Math.floor(e/4/n);break}t.restore();if(i){const t=i/(i+o);a.set(e,t);return t}a.set(e,.8);return.8}(u.fontFamily,o);let f,m;if(0===d){f=h[4];m=h[5]-g}else{f=h[4]+g*Math.sin(d);m=h[5]-g*Math.cos(d)}l.style.left=`${f}px`;l.style.top=`${m}px`;l.style.fontSize=`${p}px`;l.style.fontFamily=u.fontFamily;l.setAttribute("role","presentation");l.textContent=t.str;l.dir=t.dir;e._fontInspectorEnabled&&(l.dataset.fontName=t.fontName);0!==d&&(c.angle=d*(180/Math.PI));let _=!1;if(t.str.length>1||e._enhanceTextSelection&&i.test(t.str))_=!0;else if(t.transform[0]!==t.transform[3]){const e=Math.abs(t.transform[0]),s=Math.abs(t.transform[3]);e!==s&&Math.max(e,s)/Math.min(e,s)>1.5&&(_=!0)}_&&(u.vertical?c.canvasWidth=t.height*e._viewport.scale:c.canvasWidth=t.width*e._viewport.scale);e._textDivProperties.set(l,c);e._textContentStream&&e._layoutText(l);if(e._enhanceTextSelection&&c.hasText){let s=1,n=0;if(0!==d){s=Math.cos(d);n=Math.sin(d)}const a=(u.vertical?t.height:t.width)*e._viewport.scale,i=p;let o,c;if(0!==d){o=[s,n,-n,s,f,m];c=r.Util.getAxialAlignedBoundingBox([0,0,a,i],o)}else c=[f,m,f+a,m+i];e._bounds.push({left:c[0],top:c[1],right:c[2],bottom:c[3],div:l,size:[a,i],m:o})}}function render(e){if(e._canceled)return;const t=e._textDivs,s=e._capability,r=t.length;if(r>1e5){e._renderingDone=!0;s.resolve()}else{if(!e._textContentStream)for(let s=0;s0&&(r=r?Math.min(s,r):s)}return r}function expand(e){const t=e._bounds,s=e._viewport,n=function expandBounds(e,t,s){const r=s.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}}));expandBoundsLTR(e,r);const n=new Array(s.length);for(const e of r){const t=e.index;n[t]={left:e.x1New,top:0,right:e.x2New,bottom:0}}s.map((function(t,s){const a=n[s],i=r[s];i.x1=t.top;i.y1=e-a.right;i.x2=t.bottom;i.y2=e-a.left;i.index=s;i.x1New=void 0;i.x2New=void 0}));expandBoundsLTR(t,r);for(const e of r){const t=e.index;n[t].top=e.x1New;n[t].bottom=e.x2New}return n}(s.width,s.height,t);for(let s=0;s=0&&s[a].start>=e.y2;)a--;let i,o,l=-1/0;for(i=t;i<=a;i++){r=s[i];n=r.boundary;let t;t=n.x2>e.x1?n.index>e.index?n.x1New:e.x1:void 0===n.x2New?(n.x2+e.x1)/2:n.x2New;t>l&&(l=t)}e.x1New=l;for(i=t;i<=a;i++){r=s[i];n=r.boundary;void 0===n.x2New?n.x2>e.x1?n.index>e.index&&(n.x2New=n.x2):n.x2New=l:n.x2New>l&&(n.x2New=Math.max(l,n.x2))}const c=[];let h=null;for(i=t;i<=a;i++){r=s[i];n=r.boundary;const t=n.x2>e.x2?n:e;if(h===t)c[c.length-1].end=r.end;else{c.push({start:r.start,end:r.end,boundary:t});h=t}}if(s[t].start=0&&s[o].start>=n.y1;o--)e=s[o].boundary===n;for(o=a+1;!e&&o{this._enhanceTextSelection||(this._textDivProperties=null);if(this._layoutTextCtx){this._layoutTextCtx.canvas.width=0;this._layoutTextCtx.canvas.height=0;this._layoutTextCtx=null}})).catch((()=>{}))}get promise(){return this._capability.promise}cancel(){this._canceled=!0;if(this._reader){this._reader.cancel(new r.AbortException("TextLayer task cancelled.")).catch((()=>{}));this._reader=null}if(null!==this._renderTimer){clearTimeout(this._renderTimer);this._renderTimer=null}this._capability.reject(new Error("TextLayer task cancelled."))}_processItems(e,t){for(let s=0,r=e.length;s0){const e=t.canvasWidth/a;this._enhanceTextSelection&&(t.scale=e);s=`scaleX(${e})`}}0!==t.angle&&(s=`rotate(${t.angle}deg) ${s}`);if(s.length>0){this._enhanceTextSelection&&(t.originalTransform=s);e.style.transform=s}t.hasText&&this._container.appendChild(e);if(t.hasEOL){const e=document.createElement("br");e.setAttribute("role","presentation");this._container.appendChild(e)}}_render(e=0){const t=(0,r.createPromiseCapability)();let s=Object.create(null);const a=this._document.createElement("canvas");a.height=a.width=n;a.mozOpaque=!0;this._layoutTextCtx=a.getContext("2d",{alpha:!1});if(this._textContent){const e=this._textContent.items,s=this._textContent.styles;this._processItems(e,s);t.resolve()}else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');{const pump=()=>{this._reader.read().then((({value:e,done:r})=>{if(r)t.resolve();else{Object.assign(s,e.styles);this._processItems(e.items,s);pump()}}),t.reject)};this._reader=this._textContentStream.getReader();pump()}}t.promise.then((()=>{s=null;e?this._renderTimer=setTimeout((()=>{render(this);this._renderTimer=null}),e):render(this)}),this._capability.reject)}expandTextDivs(e=!1){if(!this._enhanceTextSelection||!this._renderingDone)return;if(null!==this._bounds){expand(this);this._bounds=null}const t=[],s=[];for(let r=0,n=this._textDivs.length;r0){s.push(`${a.paddingTop}px`);t.push(`translateY(${-a.paddingTop}px)`)}else s.push(0);a.paddingRight>0?s.push(a.paddingRight/a.scale+"px"):s.push(0);a.paddingBottom>0?s.push(`${a.paddingBottom}px`):s.push(0);if(a.paddingLeft>0){s.push(a.paddingLeft/a.scale+"px");t.push(`translateX(${-a.paddingLeft/a.scale}px)`)}else s.push(0);n.style.padding=s.join(" ");t.length&&(n.style.transform=t.join(" "))}else{n.style.padding=null;n.style.transform=a.originalTransform}}}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});t.SVGGraphics=void 0;var r=s(2),n=s(1),a=s(4);let i=class{constructor(){(0,r.unreachable)("Not implemented: SVGGraphics")}};t.SVGGraphics=i;{const e={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},s="http://www.w3.org/XML/1998/namespace",o="http://www.w3.org/1999/xlink",l=["butt","round","square"],c=["miter","round","bevel"],h=function(){const e=new Uint8Array([137,80,78,71,13,10,26,10]),t=new Int32Array(256);for(let e=0;e<256;e++){let s=e;for(let e=0;e<8;e++)s=1&s?3988292384^s>>1&2147483647:s>>1&2147483647;t[e]=s}function writePngChunk(e,s,r,n){let a=n;const i=s.length;r[a]=i>>24&255;r[a+1]=i>>16&255;r[a+2]=i>>8&255;r[a+3]=255&i;a+=4;r[a]=255&e.charCodeAt(0);r[a+1]=255&e.charCodeAt(1);r[a+2]=255&e.charCodeAt(2);r[a+3]=255&e.charCodeAt(3);a+=4;r.set(s,a);a+=s.length;const o=function crc32(e,s,r){let n=-1;for(let a=s;a>>8^t[s]}return-1^n}(r,n+4,a);r[a]=o>>24&255;r[a+1]=o>>16&255;r[a+2]=o>>8&255;r[a+3]=255&o}function deflateSyncUncompressed(e){let t=e.length;const s=65535,r=Math.ceil(t/s),n=new Uint8Array(2+t+5*r+4);let a=0;n[a++]=120;n[a++]=156;let i=0;for(;t>s;){n[a++]=0;n[a++]=255;n[a++]=255;n[a++]=0;n[a++]=0;n.set(e.subarray(i,i+s),a);a+=s;i+=s;t-=s}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;const o=function adler32(e,t,s){let r=1,n=0;for(let a=t;a>24&255;n[a++]=o>>16&255;n[a++]=o>>8&255;n[a++]=255&o;return n}function encode(t,s,n,i){const o=t.width,l=t.height;let c,h,d;const u=t.data;switch(s){case r.ImageKind.GRAYSCALE_1BPP:h=0;c=1;d=o+7>>3;break;case r.ImageKind.RGB_24BPP:h=2;c=8;d=3*o;break;case r.ImageKind.RGBA_32BPP:h=6;c=8;d=4*o;break;default:throw new Error("invalid format")}const p=new Uint8Array((1+d)*l);let g=0,f=0;for(let e=0;e>24&255,o>>16&255,o>>8&255,255&o,l>>24&255,l>>16&255,l>>8&255,255&l,c,h,0,0,0]),_=function deflateSync(e){if(!a.isNodeJS)return deflateSyncUncompressed(e);try{let t;t=parseInt(process.versions.node)>=8?e:Buffer.from(e);const s=require("zlib").deflateSync(t,{level:9});return s instanceof Uint8Array?s:new Uint8Array(s)}catch(e){(0,r.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return deflateSyncUncompressed(e)}(p),A=e.length+36+m.length+_.length,b=new Uint8Array(A);let y=0;b.set(e,y);y+=e.length;writePngChunk("IHDR",m,b,y);y+=12+m.length;writePngChunk("IDATA",_,b,y);y+=12+_.length;writePngChunk("IEND",new Uint8Array(0),b,y);return(0,r.createObjectURL)(b,"image/png",n)}return function convertImgDataToPng(e,t,s){return encode(e,void 0===e.kind?r.ImageKind.GRAYSCALE_1BPP:e.kind,t,s)}}();class SVGExtraState{constructor(){this.fontSizeScale=1;this.fontWeight=e.fontWeight;this.fontSize=0;this.textMatrix=r.IDENTITY_MATRIX;this.fontMatrix=r.FONT_IDENTITY_MATRIX;this.leading=0;this.textRenderingMode=r.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=e.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=""}clone(){return Object.create(this)}setCurrentPoint(e,t){this.x=e;this.y=t}}function opListToTree(e){let t=[];const s=[];for(const r of e)if("save"!==r.fn)"restore"===r.fn?t=s.pop():t.push(r);else{t.push({fnId:92,fn:"group",items:[]});s.push(t);t=t[t.length-1].items}return t}function pf(e){if(Number.isInteger(e))return e.toString();const t=e.toFixed(10);let s=t.length-1;if("0"!==t[s])return t;do{s--}while("0"===t[s]);return t.substring(0,"."===t[s]?s:s+1)}function pm(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":`scale(${pf(e[0])} ${pf(e[3])})`;if(e[0]===e[3]&&e[1]===-e[2]){return`rotate(${pf(180*Math.acos(e[0])/Math.PI)})`}}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return`translate(${pf(e[4])} ${pf(e[5])})`;return`matrix(${pf(e[0])} ${pf(e[1])} ${pf(e[2])} ${pf(e[3])} ${pf(e[4])} ${pf(e[5])})`}let d=0,u=0,p=0;t.SVGGraphics=i=class{constructor(e,t,s=!1){this.svgFactory=new n.DOMSVGFactory;this.current=new SVGExtraState;this.transformMatrix=r.IDENTITY_MATRIX;this.transformStack=[];this.extraStack=[];this.commonObjs=e;this.objs=t;this.pendingClip=null;this.pendingEOFill=!1;this.embedFonts=!1;this.embeddedFonts=Object.create(null);this.cssStyle=null;this.forceDataSchema=!!s;this._operatorIdMapping=[];for(const e in r.OPS)this._operatorIdMapping[r.OPS[e]]=e}save(){this.transformStack.push(this.transformMatrix);const e=this.current;this.extraStack.push(e);this.current=e.clone()}restore(){this.transformMatrix=this.transformStack.pop();this.current=this.extraStack.pop();this.pendingClip=null;this.tgrp=null}group(e){this.save();this.executeOpTree(e);this.restore()}loadDependencies(e){const t=e.fnArray,s=e.argsArray;for(let e=0,n=t.length;e{e.get(t,s)}));this.current.dependencies.push(s)}return Promise.all(this.current.dependencies)}transform(e,t,s,n,a,i){const o=[e,t,s,n,a,i];this.transformMatrix=r.Util.transform(this.transformMatrix,o);this.tgrp=null}getSVG(e,t){this.viewport=t;const s=this._initialize(t);return this.loadDependencies(e).then((()=>{this.transformMatrix=r.IDENTITY_MATRIX;this.executeOpTree(this.convertOpList(e));return s}))}convertOpList(e){const t=this._operatorIdMapping,s=e.argsArray,r=e.fnArray,n=[];for(let e=0,a=r.length;e0&&(this.current.lineWidth=e)}setLineCap(e){this.current.lineCap=l[e]}setLineJoin(e){this.current.lineJoin=c[e]}setMiterLimit(e){this.current.miterLimit=e}setStrokeAlpha(e){this.current.strokeAlpha=e}setStrokeRGBColor(e,t,s){this.current.strokeColor=r.Util.makeHexColor(e,t,s)}setFillAlpha(e){this.current.fillAlpha=e}setFillRGBColor(e,t,s){this.current.fillColor=r.Util.makeHexColor(e,t,s);this.current.tspan=this.svgFactory.createElement("svg:tspan");this.current.xcoords=[];this.current.ycoords=[]}setStrokeColorN(e){this.current.strokeColor=this._makeColorN_Pattern(e)}setFillColorN(e){this.current.fillColor=this._makeColorN_Pattern(e)}shadingFill(e){const t=this.viewport.width,s=this.viewport.height,n=r.Util.inverseTransform(this.transformMatrix),a=r.Util.applyTransform([0,0],n),i=r.Util.applyTransform([0,s],n),o=r.Util.applyTransform([t,0],n),l=r.Util.applyTransform([t,s],n),c=Math.min(a[0],i[0],o[0],l[0]),h=Math.min(a[1],i[1],o[1],l[1]),d=Math.max(a[0],i[0],o[0],l[0]),u=Math.max(a[1],i[1],o[1],l[1]),p=this.svgFactory.createElement("svg:rect");p.setAttributeNS(null,"x",c);p.setAttributeNS(null,"y",h);p.setAttributeNS(null,"width",d-c);p.setAttributeNS(null,"height",u-h);p.setAttributeNS(null,"fill",this._makeShadingPattern(e));this.current.fillAlpha<1&&p.setAttributeNS(null,"fill-opacity",this.current.fillAlpha);this._ensureTransformGroup().appendChild(p)}_makeColorN_Pattern(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}_makeTilingPattern(e){const t=e[1],s=e[2],n=e[3]||r.IDENTITY_MATRIX,[a,i,o,l]=e[4],c=e[5],h=e[6],d=e[7],u="shading"+p++,[g,f,m,_]=r.Util.normalizeRect([...r.Util.applyTransform([a,i],n),...r.Util.applyTransform([o,l],n)]),[A,b]=r.Util.singularValueDecompose2dScale(n),y=c*A,S=h*b,x=this.svgFactory.createElement("svg:pattern");x.setAttributeNS(null,"id",u);x.setAttributeNS(null,"patternUnits","userSpaceOnUse");x.setAttributeNS(null,"width",y);x.setAttributeNS(null,"height",S);x.setAttributeNS(null,"x",`${g}`);x.setAttributeNS(null,"y",`${f}`);const v=this.svg,C=this.transformMatrix,P=this.current.fillColor,k=this.current.strokeColor,w=this.svgFactory.create(m-g,_-f);this.svg=w;this.transformMatrix=n;if(2===d){const e=r.Util.makeHexColor(...t);this.current.fillColor=e;this.current.strokeColor=e}this.executeOpTree(this.convertOpList(s));this.svg=v;this.transformMatrix=C;this.current.fillColor=P;this.current.strokeColor=k;x.appendChild(w.childNodes[0]);this.defs.appendChild(x);return`url(#${u})`}_makeShadingPattern(e){switch(e[0]){case"RadialAxial":const t="shading"+p++,s=e[3];let n;switch(e[1]){case"axial":const s=e[4],r=e[5];n=this.svgFactory.createElement("svg:linearGradient");n.setAttributeNS(null,"id",t);n.setAttributeNS(null,"gradientUnits","userSpaceOnUse");n.setAttributeNS(null,"x1",s[0]);n.setAttributeNS(null,"y1",s[1]);n.setAttributeNS(null,"x2",r[0]);n.setAttributeNS(null,"y2",r[1]);break;case"radial":const a=e[4],i=e[5],o=e[6],l=e[7];n=this.svgFactory.createElement("svg:radialGradient");n.setAttributeNS(null,"id",t);n.setAttributeNS(null,"gradientUnits","userSpaceOnUse");n.setAttributeNS(null,"cx",i[0]);n.setAttributeNS(null,"cy",i[1]);n.setAttributeNS(null,"r",l);n.setAttributeNS(null,"fx",a[0]);n.setAttributeNS(null,"fy",a[1]);n.setAttributeNS(null,"fr",o);break;default:throw new Error(`Unknown RadialAxial type: ${e[1]}`)}for(const e of s){const t=this.svgFactory.createElement("svg:stop");t.setAttributeNS(null,"offset",e[0]);t.setAttributeNS(null,"stop-color",e[1]);n.appendChild(t)}this.defs.appendChild(n);return`url(#${t})`;case"Mesh":(0,r.warn)("Unimplemented pattern Mesh");return null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${e[0]}`)}}setDash(e,t){this.current.dashArray=e;this.current.dashPhase=t}constructPath(e,t){const s=this.current;let n=s.x,a=s.y,i=[],o=0;for(const s of e)switch(0|s){case r.OPS.rectangle:n=t[o++];a=t[o++];const e=n+t[o++],s=a+t[o++];i.push("M",pf(n),pf(a),"L",pf(e),pf(a),"L",pf(e),pf(s),"L",pf(n),pf(s),"Z");break;case r.OPS.moveTo:n=t[o++];a=t[o++];i.push("M",pf(n),pf(a));break;case r.OPS.lineTo:n=t[o++];a=t[o++];i.push("L",pf(n),pf(a));break;case r.OPS.curveTo:n=t[o+4];a=t[o+5];i.push("C",pf(t[o]),pf(t[o+1]),pf(t[o+2]),pf(t[o+3]),pf(n),pf(a));o+=6;break;case r.OPS.curveTo2:i.push("C",pf(n),pf(a),pf(t[o]),pf(t[o+1]),pf(t[o+2]),pf(t[o+3]));n=t[o+2];a=t[o+3];o+=4;break;case r.OPS.curveTo3:n=t[o+2];a=t[o+3];i.push("C",pf(t[o]),pf(t[o+1]),pf(n),pf(a),pf(n),pf(a));o+=4;break;case r.OPS.closePath:i.push("Z")}i=i.join(" ");if(s.path&&e.length>0&&e[0]!==r.OPS.rectangle&&e[0]!==r.OPS.moveTo)i=s.path.getAttributeNS(null,"d")+i;else{s.path=this.svgFactory.createElement("svg:path");this._ensureTransformGroup().appendChild(s.path)}s.path.setAttributeNS(null,"d",i);s.path.setAttributeNS(null,"fill","none");s.element=s.path;s.setCurrentPoint(n,a)}endPath(){const e=this.current;e.path=null;if(!this.pendingClip)return;if(!e.element){this.pendingClip=null;return}const t="clippath"+d++,s=this.svgFactory.createElement("svg:clipPath");s.setAttributeNS(null,"id",t);s.setAttributeNS(null,"transform",pm(this.transformMatrix));const r=e.element.cloneNode(!0);"evenodd"===this.pendingClip?r.setAttributeNS(null,"clip-rule","evenodd"):r.setAttributeNS(null,"clip-rule","nonzero");this.pendingClip=null;s.appendChild(r);this.defs.appendChild(s);if(e.activeClipUrl){e.clipGroup=null;for(const e of this.extraStack)e.clipGroup=null;s.setAttributeNS(null,"clip-path",e.activeClipUrl)}e.activeClipUrl=`url(#${t})`;this.tgrp=null}clip(e){this.pendingClip=e}closePath(){const e=this.current;if(e.path){const t=`${e.path.getAttributeNS(null,"d")}Z`;e.path.setAttributeNS(null,"d",t)}}setLeading(e){this.current.leading=-e}setTextRise(e){this.current.textRise=e}setTextRenderingMode(e){this.current.textRenderingMode=e}setHScale(e){this.current.textHScale=e/100}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,s]of e)switch(t){case"LW":this.setLineWidth(s);break;case"LC":this.setLineCap(s);break;case"LJ":this.setLineJoin(s);break;case"ML":this.setMiterLimit(s);break;case"D":this.setDash(s[0],s[1]);break;case"RI":this.setRenderingIntent(s);break;case"FL":this.setFlatness(s);break;case"Font":this.setFont(s);break;case"CA":this.setStrokeAlpha(s);break;case"ca":this.setFillAlpha(s);break;default:(0,r.warn)(`Unimplemented graphic state operator ${t}`)}}fill(){const e=this.current;if(e.element){e.element.setAttributeNS(null,"fill",e.fillColor);e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha);this.endPath()}}stroke(){const e=this.current;if(e.element){this._setStrokeAttributes(e.element);e.element.setAttributeNS(null,"fill","none");this.endPath()}}_setStrokeAttributes(e,t=1){const s=this.current;let r=s.dashArray;1!==t&&r.length>0&&(r=r.map((function(e){return t*e})));e.setAttributeNS(null,"stroke",s.strokeColor);e.setAttributeNS(null,"stroke-opacity",s.strokeAlpha);e.setAttributeNS(null,"stroke-miterlimit",pf(s.miterLimit));e.setAttributeNS(null,"stroke-linecap",s.lineCap);e.setAttributeNS(null,"stroke-linejoin",s.lineJoin);e.setAttributeNS(null,"stroke-width",pf(t*s.lineWidth)+"px");e.setAttributeNS(null,"stroke-dasharray",r.map(pf).join(" "));e.setAttributeNS(null,"stroke-dashoffset",pf(t*s.dashPhase)+"px")}eoFill(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd");this.fill()}fillStroke(){this.stroke();this.fill()}eoFillStroke(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd");this.fillStroke()}closeStroke(){this.closePath();this.stroke()}closeFillStroke(){this.closePath();this.fillStroke()}closeEOFillStroke(){this.closePath();this.eoFillStroke()}paintSolidColorImageMask(){const 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)}paintImageXObject(e){const t=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);t?this.paintInlineImageXObject(t):(0,r.warn)(`Dependent image with object ID ${e} is not ready yet`)}paintInlineImageXObject(e,t){const s=e.width,r=e.height,n=h(e,this.forceDataSchema,!!t),a=this.svgFactory.createElement("svg:rect");a.setAttributeNS(null,"x","0");a.setAttributeNS(null,"y","0");a.setAttributeNS(null,"width",pf(s));a.setAttributeNS(null,"height",pf(r));this.current.element=a;this.clip("nonzero");const i=this.svgFactory.createElement("svg:image");i.setAttributeNS(o,"xlink:href",n);i.setAttributeNS(null,"x","0");i.setAttributeNS(null,"y",pf(-r));i.setAttributeNS(null,"width",pf(s)+"px");i.setAttributeNS(null,"height",pf(r)+"px");i.setAttributeNS(null,"transform",`scale(${pf(1/s)} ${pf(-1/r)})`);t?t.appendChild(i):this._ensureTransformGroup().appendChild(i)}paintImageMaskXObject(e){const t=this.current,s=e.width,r=e.height,n=t.fillColor;t.maskId="mask"+u++;const a=this.svgFactory.createElement("svg:mask");a.setAttributeNS(null,"id",t.maskId);const i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x","0");i.setAttributeNS(null,"y","0");i.setAttributeNS(null,"width",pf(s));i.setAttributeNS(null,"height",pf(r));i.setAttributeNS(null,"fill",n);i.setAttributeNS(null,"mask",`url(#${t.maskId})`);this.defs.appendChild(a);this._ensureTransformGroup().appendChild(i);this.paintInlineImageXObject(e,a)}paintFormXObjectBegin(e,t){Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]);if(t){const e=t[2]-t[0],s=t[3]-t[1],r=this.svgFactory.createElement("svg:rect");r.setAttributeNS(null,"x",t[0]);r.setAttributeNS(null,"y",t[1]);r.setAttributeNS(null,"width",pf(e));r.setAttributeNS(null,"height",pf(s));this.current.element=r;this.clip("nonzero");this.endPath()}}paintFormXObjectEnd(){}_initialize(e){const t=this.svgFactory.create(e.width,e.height),s=this.svgFactory.createElement("svg:defs");t.appendChild(s);this.defs=s;const r=this.svgFactory.createElement("svg:g");r.setAttributeNS(null,"transform",pm(e.transform));t.appendChild(r);this.svg=r;return t}_ensureClipGroup(){if(!this.current.clipGroup){const 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}_ensureTransformGroup(){if(!this.tgrp){this.tgrp=this.svgFactory.createElement("svg:g");this.tgrp.setAttributeNS(null,"transform",pm(this.transformMatrix));this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)}return this.tgrp}}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});t.XfaLayer=void 0;var r=s(2),n=s(17);t.XfaLayer=class XfaLayer{static setupStorage(e,t,s,r,n){const a=r.getValue(t,{value:null});switch(s.name){case"textarea":null!==a.value&&(e.textContent=a.value);if("print"===n)break;e.addEventListener("input",(e=>{r.setValue(t,{value:e.target.value})}));break;case"input":if("radio"===s.attributes.type||"checkbox"===s.attributes.type){a.value===s.attributes.xfaOn?e.setAttribute("checked",!0):a.value===s.attributes.xfaOff&&e.removeAttribute("checked");if("print"===n)break;e.addEventListener("change",(e=>{r.setValue(t,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})}))}else{null!==a.value&&e.setAttribute("value",a.value);if("print"===n)break;e.addEventListener("input",(e=>{r.setValue(t,{value:e.target.value})}))}break;case"select":if(null!==a.value)for(const e of s.children)e.attributes.value===a.value&&(e.attributes.selected=!0);e.addEventListener("input",(e=>{const s=e.target.options,n=-1===s.selectedIndex?"":s[s.selectedIndex].value;r.setValue(t,{value:n})}))}}static setAttributes({html:e,element:t,storage:s=null,intent:n,linkService:a}){const{attributes:i}=t,o=e instanceof HTMLAnchorElement;"radio"===i.type&&(i.name=`${i.name}-${n}`);for(const[t,s]of Object.entries(i))if(null!=s&&"dataId"!==t)if("style"!==t)if("textContent"===t)e.textContent=s;else if("class"===t)e.setAttribute(t,s.join(" "));else{if(o&&("href"===t||"newWindow"===t))continue;e.setAttribute(t,s)}else Object.assign(e.style,s);if(o){a.addLinkAttributes||(0,r.warn)("XfaLayer.setAttribute - missing `addLinkAttributes`-method on the `linkService`-instance.");a.addLinkAttributes?.(e,i.href,i.newWindow)}s&&i.dataId&&this.setupStorage(e,i.dataId,t,s)}static render(e){const t=e.annotationStorage,s=e.linkService,r=e.xfa,a=e.intent||"display",i=document.createElement(r.name);r.attributes&&this.setAttributes({html:i,element:r,intent:a,linkService:s});const o=[[r,-1,i]],l=e.div;l.appendChild(i);const c=`matrix(${e.viewport.transform.join(",")})`;l.style.transform=c;l.setAttribute("class","xfaLayer xfaFont");const h=[];for(;o.length>0;){const[e,r,i]=o[o.length-1];if(r+1===e.children.length){o.pop();continue}const l=e.children[++o[o.length-1][1]];if(null===l)continue;const{name:c}=l;if("#text"===c){const e=document.createTextNode(l.value);h.push(e);i.appendChild(e);continue}let d;d=l?.attributes?.xmlns?document.createElementNS(l.attributes.xmlns,c):document.createElement(c);i.appendChild(d);l.attributes&&this.setAttributes({html:d,element:l,storage:t,intent:a,linkService:s});if(l.children&&l.children.length>0)o.push([l,-1,d]);else if(l.value){const e=document.createTextNode(l.value);n.XfaText.shouldBuildText(c)&&h.push(e);d.appendChild(e)}}for(const e of l.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))e.setAttribute("readOnly",!0);return{textDivs:h}}static update(e){const t=`matrix(${e.viewport.transform.join(",")})`;e.div.style.transform=t;e.div.hidden=!1}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});t.PDFNodeStream=void 0;var r=s(2),n=s(24);const a=require("fs"),i=require("http"),o=require("https"),l=require("url"),c=/^file:\/\/\/[a-zA-Z]:\//;t.PDFNodeStream=class PDFNodeStream{constructor(e){this.source=e;this.url=function parseUrl(e){const t=l.parse(e);if("file:"===t.protocol||t.host)return t;if(/^[a-z]:[/\\]/i.test(e))return l.parse(`file:///${e}`);t.host||(t.protocol="file:");return t}(e.url);this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol;this.isFsUrl="file:"===this.url.protocol;this.httpHeaders=this.isHttp&&e.httpHeaders||{};this._fullRequestReader=null;this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){(0,r.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once.");this._fullRequestReader=this.isFsUrl?new PDFNodeStreamFsFullReader(this):new PDFNodeStreamFullReader(this);return this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const s=this.isFsUrl?new PDFNodeStreamFsRangeReader(this,e,t):new PDFNodeStreamRangeReader(this,e,t);this._rangeRequestReaders.push(s);return s}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}};class BaseFullReader{constructor(e){this._url=e.url;this._done=!1;this._storedError=null;this.onProgress=null;const t=e.source;this._contentLength=t.length;this._loaded=0;this._filename=null;this._disableRange=t.disableRange||!1;this._rangeChunkSize=t.rangeChunkSize;this._rangeChunkSize||this._disableRange||(this._disableRange=!0);this._isStreamingSupported=!t.disableStream;this._isRangeSupported=!t.disableRange;this._readableStream=null;this._readCapability=(0,r.createPromiseCapability)();this._headersCapability=(0,r.createPromiseCapability)()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;if(this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();if(null===e){this._readCapability=(0,r.createPromiseCapability)();return this.read()}this._loaded+=e.length;this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength});return{value:new Uint8Array(e).buffer,done:!1}}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e;this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e;e.on("readable",(()=>{this._readCapability.resolve()}));e.on("end",(()=>{e.destroy();this._done=!0;this._readCapability.resolve()}));e.on("error",(e=>{this._error(e)}));!this._isStreamingSupported&&this._isRangeSupported&&this._error(new r.AbortException("streaming is disabled"));this._storedError&&this._readableStream.destroy(this._storedError)}}class BaseRangeReader{constructor(e){this._url=e.url;this._done=!1;this._storedError=null;this.onProgress=null;this._loaded=0;this._readableStream=null;this._readCapability=(0,r.createPromiseCapability)();const t=e.source;this._isStreamingSupported=!t.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;if(this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();if(null===e){this._readCapability=(0,r.createPromiseCapability)();return this.read()}this._loaded+=e.length;this.onProgress&&this.onProgress({loaded:this._loaded});return{value:new Uint8Array(e).buffer,done:!1}}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e;this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e;e.on("readable",(()=>{this._readCapability.resolve()}));e.on("end",(()=>{e.destroy();this._done=!0;this._readCapability.resolve()}));e.on("error",(e=>{this._error(e)}));this._storedError&&this._readableStream.destroy(this._storedError)}}function createRequestOptions(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}class PDFNodeStreamFullReader extends BaseFullReader{constructor(e){super(e);const handleResponse=t=>{if(404===t.statusCode){const e=new r.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=e;this._headersCapability.reject(e);return}this._headersCapability.resolve();this._setReadableStream(t);const getResponseHeader=e=>this._readableStream.headers[e.toLowerCase()],{allowRangeRequests:s,suggestedLength:a}=(0,n.validateRangeRequestCapabilities)({getResponseHeader:getResponseHeader,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=s;this._contentLength=a||this._contentLength;this._filename=(0,n.extractFilenameFromHeader)(getResponseHeader)};this._request=null;"http:"===this._url.protocol?this._request=i.request(createRequestOptions(this._url,e.httpHeaders),handleResponse):this._request=o.request(createRequestOptions(this._url,e.httpHeaders),handleResponse);this._request.on("error",(e=>{this._storedError=e;this._headersCapability.reject(e)}));this._request.end()}}class PDFNodeStreamRangeReader extends BaseRangeReader{constructor(e,t,s){super(e);this._httpHeaders={};for(const t in e.httpHeaders){const s=e.httpHeaders[t];void 0!==s&&(this._httpHeaders[t]=s)}this._httpHeaders.Range=`bytes=${t}-${s-1}`;const handleResponse=e=>{if(404!==e.statusCode)this._setReadableStream(e);else{const e=new r.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=e}};this._request=null;"http:"===this._url.protocol?this._request=i.request(createRequestOptions(this._url,this._httpHeaders),handleResponse):this._request=o.request(createRequestOptions(this._url,this._httpHeaders),handleResponse);this._request.on("error",(e=>{this._storedError=e}));this._request.end()}}class PDFNodeStreamFsFullReader extends BaseFullReader{constructor(e){super(e);let t=decodeURIComponent(this._url.path);c.test(this._url.href)&&(t=t.replace(/^\//,""));a.lstat(t,((e,s)=>{if(e){"ENOENT"===e.code&&(e=new r.MissingPDFException(`Missing PDF "${t}".`));this._storedError=e;this._headersCapability.reject(e)}else{this._contentLength=s.size;this._setReadableStream(a.createReadStream(t));this._headersCapability.resolve()}}))}}class PDFNodeStreamFsRangeReader extends BaseRangeReader{constructor(e,t,s){super(e);let r=decodeURIComponent(this._url.path);c.test(this._url.href)&&(r=r.replace(/^\//,""));this._setReadableStream(a.createReadStream(r,{start:t,end:s-1}))}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});t.createResponseStatusError=function createResponseStatusError(e,t){if(404===e||0===e&&t.startsWith("file:"))return new r.MissingPDFException('Missing PDF "'+t+'".');return new r.UnexpectedResponseException(`Unexpected server response (${e}) while retrieving PDF "${t}".`,e)};t.extractFilenameFromHeader=function extractFilenameFromHeader(e){const t=e("Content-Disposition");if(t){let e=(0,n.getFilenameFromContentDispositionHeader)(t);if(e.includes("%"))try{e=decodeURIComponent(e)}catch(e){}if((0,a.isPdfFile)(e))return e}return null};t.validateRangeRequestCapabilities=function validateRangeRequestCapabilities({getResponseHeader:e,isHttp:t,rangeChunkSize:s,disableRange:n}){(0,r.assert)(s>0,"Range chunk size must be larger than zero");const a={allowRangeRequests:!1,suggestedLength:void 0},i=parseInt(e("Content-Length"),10);if(!Number.isInteger(i))return a;a.suggestedLength=i;if(i<=2*s)return a;if(n||!t)return a;if("bytes"!==e("Accept-Ranges"))return a;if("identity"!==(e("Content-Encoding")||"identity"))return a;a.allowRangeRequests=!0;return a};t.validateResponseStatus=function validateResponseStatus(e){return 200===e||206===e};var r=s(2),n=s(25),a=s(1)},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});t.getFilenameFromContentDispositionHeader=function getFilenameFromContentDispositionHeader(e){let t=!0,s=toParamRegExp("filename\\*","i").exec(e);if(s){s=s[1];let e=rfc2616unquote(s);e=unescape(e);e=rfc5987decode(e);e=rfc2047decode(e);return fixupEncoding(e)}s=function rfc2231getparam(e){const t=[];let s;const r=toParamRegExp("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(s=r.exec(e));){let[,e,r,n]=s;e=parseInt(e,10);if(e in t){if(0===e)break}else t[e]=[r,n]}const n=[];for(let e=0;e{Object.defineProperty(t,"__esModule",{value:!0});t.PDFNetworkStream=void 0;var r=s(2),n=s(24);class NetworkManager{constructor(e,t={}){this.url=e;this.isHttp=/^https?:/i.test(e);this.httpHeaders=this.isHttp&&t.httpHeaders||Object.create(null);this.withCredentials=t.withCredentials||!1;this.getXhr=t.getXhr||function NetworkManager_getXhr(){return new XMLHttpRequest};this.currXhrId=0;this.pendingRequests=Object.create(null)}requestRange(e,t,s){const r={begin:e,end:t};for(const e in s)r[e]=s[e];return this.request(r)}requestFull(e){return this.request(e)}request(e){const t=this.getXhr(),s=this.currXhrId++,r=this.pendingRequests[s]={xhr:t};t.open("GET",this.url);t.withCredentials=this.withCredentials;for(const e in this.httpHeaders){const s=this.httpHeaders[e];void 0!==s&&t.setRequestHeader(e,s)}if(this.isHttp&&"begin"in e&&"end"in e){t.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`);r.expectedStatus=206}else r.expectedStatus=200;t.responseType="arraybuffer";e.onError&&(t.onerror=function(s){e.onError(t.status)});t.onreadystatechange=this.onStateChange.bind(this,s);t.onprogress=this.onProgress.bind(this,s);r.onHeadersReceived=e.onHeadersReceived;r.onDone=e.onDone;r.onError=e.onError;r.onProgress=e.onProgress;t.send(null);return s}onProgress(e,t){const s=this.pendingRequests[e];s&&s.onProgress?.(t)}onStateChange(e,t){const s=this.pendingRequests[e];if(!s)return;const n=s.xhr;if(n.readyState>=2&&s.onHeadersReceived){s.onHeadersReceived();delete s.onHeadersReceived}if(4!==n.readyState)return;if(!(e in this.pendingRequests))return;delete this.pendingRequests[e];if(0===n.status&&this.isHttp){s.onError?.(n.status);return}const a=n.status||200;if(!(200===a&&206===s.expectedStatus)&&a!==s.expectedStatus){s.onError?.(n.status);return}const i=function getArrayBuffer(e){const t=e.response;return"string"!=typeof t?t:(0,r.stringToBytes)(t).buffer}(n);if(206===a){const e=n.getResponseHeader("Content-Range"),t=/bytes (\d+)-(\d+)\/(\d+)/.exec(e);s.onDone({begin:parseInt(t[1],10),chunk:i})}else i?s.onDone({begin:0,chunk:i}):s.onError?.(n.status)}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortRequest(e){const t=this.pendingRequests[e].xhr;delete this.pendingRequests[e];t.abort()}}t.PDFNetworkStream=class PDFNetworkStream{constructor(e){this._source=e;this._manager=new NetworkManager(e.url,{httpHeaders:e.httpHeaders,withCredentials:e.withCredentials});this._rangeChunkSize=e.rangeChunkSize;this._fullRequestReader=null;this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){const t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){(0,r.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once.");this._fullRequestReader=new PDFNetworkStreamFullRequestReader(this._manager,this._source);return this._fullRequestReader}getRangeReader(e,t){const s=new PDFNetworkStreamRangeRequestReader(this._manager,e,t);s.onClosed=this._onRangeRequestReaderClosed.bind(this);this._rangeRequestReaders.push(s);return s}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}};class PDFNetworkStreamFullRequestReader{constructor(e,t){this._manager=e;const s={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url;this._fullRequestId=e.requestFull(s);this._headersReceivedCapability=(0,r.createPromiseCapability)();this._disableRange=t.disableRange||!1;this._contentLength=t.length;this._rangeChunkSize=t.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}_onHeadersReceived(){const e=this._fullRequestId,t=this._manager.getRequestXhr(e),getResponseHeader=e=>t.getResponseHeader(e),{allowRangeRequests:s,suggestedLength:r}=(0,n.validateRangeRequestCapabilities)({getResponseHeader:getResponseHeader,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});s&&(this._isRangeSupported=!0);this._contentLength=r||this._contentLength;this._filename=(0,n.extractFilenameFromHeader)(getResponseHeader);this._isRangeSupported&&this._manager.abortRequest(e);this._headersReceivedCapability.resolve()}_onDone(e){if(e)if(this._requests.length>0){this._requests.shift().resolve({value:e.chunk,done:!1})}else this._cachedChunks.push(e.chunk);this._done=!0;if(!(this._cachedChunks.length>0)){for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){this._storedError=(0,n.createResponseStatusError)(e,this._url);this._headersReceivedCapability.reject(this._storedError);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0;this._cachedChunks.length=0}_onProgress(e){this.onProgress?.({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0){return{value:this._cachedChunks.shift(),done:!1}}if(this._done)return{value:void 0,done:!0};const e=(0,r.createPromiseCapability)();this._requests.push(e);return e.promise}cancel(e){this._done=!0;this._headersReceivedCapability.reject(e);for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0;this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId);this._fullRequestReader=null}}class PDFNetworkStreamRangeRequestReader{constructor(e,t,s){this._manager=e;const r={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url;this._requestId=e.requestRange(t,s,r);this._requests=[];this._queuedChunk=null;this._done=!1;this._storedError=void 0;this.onProgress=null;this.onClosed=null}_close(){this.onClosed?.(this)}_onDone(e){const t=e.chunk;if(this._requests.length>0){this._requests.shift().resolve({value:t,done:!1})}else this._queuedChunk=t;this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0;this._close()}_onError(e){this._storedError=(0,n.createResponseStatusError)(e,this._url);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0;this._queuedChunk=null}_onProgress(e){this.isStreamingSupported||this.onProgress?.({loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(null!==this._queuedChunk){const e=this._queuedChunk;this._queuedChunk=null;return{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=(0,r.createPromiseCapability)();this._requests.push(e);return e.promise}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0;this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId);this._close()}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});t.PDFFetchStream=void 0;var r=s(2),n=s(24);function createFetchOptions(e,t,s){return{method:"GET",headers:e,signal:s?.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function createHeaders(e){const t=new Headers;for(const s in e){const r=e[s];void 0!==r&&t.append(s,r)}return t}t.PDFFetchStream=class PDFFetchStream{constructor(e){this.source=e;this.isHttp=/^https?:/i.test(e.url);this.httpHeaders=this.isHttp&&e.httpHeaders||{};this._fullRequestReader=null;this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){(0,r.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once.");this._fullRequestReader=new PDFFetchStreamReader(this);return this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const s=new PDFFetchStreamRangeReader(this,e,t);this._rangeRequestReaders.push(s);return s}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}};class PDFFetchStreamReader{constructor(e){this._stream=e;this._reader=null;this._loaded=0;this._filename=null;const t=e.source;this._withCredentials=t.withCredentials||!1;this._contentLength=t.length;this._headersCapability=(0,r.createPromiseCapability)();this._disableRange=t.disableRange||!1;this._rangeChunkSize=t.rangeChunkSize;this._rangeChunkSize||this._disableRange||(this._disableRange=!0);"undefined"!=typeof AbortController&&(this._abortController=new AbortController);this._isStreamingSupported=!t.disableStream;this._isRangeSupported=!t.disableRange;this._headers=createHeaders(this._stream.httpHeaders);const s=t.url;fetch(s,createFetchOptions(this._headers,this._withCredentials,this._abortController)).then((e=>{if(!(0,n.validateResponseStatus)(e.status))throw(0,n.createResponseStatusError)(e.status,s);this._reader=e.body.getReader();this._headersCapability.resolve();const getResponseHeader=t=>e.headers.get(t),{allowRangeRequests:t,suggestedLength:a}=(0,n.validateRangeRequestCapabilities)({getResponseHeader:getResponseHeader,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=t;this._contentLength=a||this._contentLength;this._filename=(0,n.extractFilenameFromHeader)(getResponseHeader);!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new r.AbortException("Streaming is disabled."))})).catch(this._headersCapability.reject);this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;const{value:e,done:t}=await this._reader.read();if(t)return{value:e,done:t};this._loaded+=e.byteLength;this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength});return{value:new Uint8Array(e).buffer,done:!1}}cancel(e){this._reader&&this._reader.cancel(e);this._abortController&&this._abortController.abort()}}class PDFFetchStreamRangeReader{constructor(e,t,s){this._stream=e;this._reader=null;this._loaded=0;const a=e.source;this._withCredentials=a.withCredentials||!1;this._readCapability=(0,r.createPromiseCapability)();this._isStreamingSupported=!a.disableStream;"undefined"!=typeof AbortController&&(this._abortController=new AbortController);this._headers=createHeaders(this._stream.httpHeaders);this._headers.append("Range",`bytes=${t}-${s-1}`);const i=a.url;fetch(i,createFetchOptions(this._headers,this._withCredentials,this._abortController)).then((e=>{if(!(0,n.validateResponseStatus)(e.status))throw(0,n.createResponseStatusError)(e.status,i);this._readCapability.resolve();this._reader=e.body.getReader()})).catch(this._readCapability.reject);this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:e,done:t}=await this._reader.read();if(t)return{value:e,done:t};this._loaded+=e.byteLength;this.onProgress&&this.onProgress({loaded:this._loaded});return{value:new Uint8Array(e).buffer,done:!1}}cancel(e){this._reader&&this._reader.cancel(e);this._abortController&&this._abortController.abort()}}}],__webpack_module_cache__={};function __w_pdfjs_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var s=__webpack_module_cache__[e]={exports:{}};__webpack_modules__[e](s,s.exports,__w_pdfjs_require__);return s.exports}var __webpack_exports__={};(()=>{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,"getXfaPageViewport",{enumerable:!0,get:function(){return t.getXfaPageViewport}});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,"PixelsPerInch",{enumerable:!0,get:function(){return t.PixelsPerInch}});Object.defineProperty(e,"RenderingCancelledException",{enumerable:!0,get:function(){return t.RenderingCancelledException}});Object.defineProperty(e,"AnnotationMode",{enumerable:!0,get:function(){return s.AnnotationMode}});Object.defineProperty(e,"CMapCompressionType",{enumerable:!0,get:function(){return s.CMapCompressionType}});Object.defineProperty(e,"createObjectURL",{enumerable:!0,get:function(){return s.createObjectURL}});Object.defineProperty(e,"createPromiseCapability",{enumerable:!0,get:function(){return s.createPromiseCapability}});Object.defineProperty(e,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return s.createValidAbsoluteUrl}});Object.defineProperty(e,"InvalidPDFException",{enumerable:!0,get:function(){return s.InvalidPDFException}});Object.defineProperty(e,"MissingPDFException",{enumerable:!0,get:function(){return s.MissingPDFException}});Object.defineProperty(e,"OPS",{enumerable:!0,get:function(){return s.OPS}});Object.defineProperty(e,"PasswordResponses",{enumerable:!0,get:function(){return s.PasswordResponses}});Object.defineProperty(e,"PermissionFlag",{enumerable:!0,get:function(){return s.PermissionFlag}});Object.defineProperty(e,"removeNullCharacters",{enumerable:!0,get:function(){return s.removeNullCharacters}});Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return s.shadow}});Object.defineProperty(e,"UnexpectedResponseException",{enumerable:!0,get:function(){return s.UnexpectedResponseException}});Object.defineProperty(e,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return s.UNSUPPORTED_FEATURES}});Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return s.Util}});Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return s.VerbosityLevel}});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,"AnnotationLayer",{enumerable:!0,get:function(){return n.AnnotationLayer}});Object.defineProperty(e,"GlobalWorkerOptions",{enumerable:!0,get:function(){return a.GlobalWorkerOptions}});Object.defineProperty(e,"renderTextLayer",{enumerable:!0,get:function(){return o.renderTextLayer}});Object.defineProperty(e,"SVGGraphics",{enumerable:!0,get:function(){return l.SVGGraphics}});Object.defineProperty(e,"XfaLayer",{enumerable:!0,get:function(){return c.XfaLayer}});var t=__w_pdfjs_require__(1),s=__w_pdfjs_require__(2),r=__w_pdfjs_require__(6),n=__w_pdfjs_require__(18),a=__w_pdfjs_require__(12),i=__w_pdfjs_require__(4),o=__w_pdfjs_require__(20),l=__w_pdfjs_require__(21),c=__w_pdfjs_require__(22);if(i.isNodeJS){const{PDFNodeStream:e}=__w_pdfjs_require__(23);(0,r.setPDFNetworkStreamFactory)((t=>new e(t)))}else{const{PDFNetworkStream:e}=__w_pdfjs_require__(26),{PDFFetchStream:s}=__w_pdfjs_require__(27);(0,r.setPDFNetworkStreamFactory)((r=>(0,t.isValidFetchUrl)(r.url)?new s(r):new e(r)))}})();return __webpack_exports__})()})); \ No newline at end of file diff --git a/public/textPdf/pdf.worker.min.js b/public/textPdf/pdf.worker.min.js new file mode 100644 index 0000000..116c4e3 --- /dev/null +++ b/public/textPdf/pdf.worker.min.js @@ -0,0 +1,22 @@ +/** + * @licstart The following is the entire license notice for the + * Javascript code in this page + * + * Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @licend The above is the entire license notice for the + * Javascript code in this page + */ +!function webpackUniversalModuleDefinition(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(()=>{"use strict";var e=[,(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.WorkerTask=t.WorkerMessageHandler=void 0;var a=r(2),i=r(5),n=r(7),s=r(71),o=r(4),c=r(99),l=r(100),h=r(9);class WorkerTask{constructor(e){this.name=e;this.terminated=!1;this._capability=(0,a.createPromiseCapability)()}get finished(){return this._capability.promise}finish(){this._capability.resolve()}terminate(){this.terminated=!0}ensureNotTerminated(){if(this.terminated)throw new Error("Worker task was terminated")}}t.WorkerTask=WorkerTask;class WorkerMessageHandler{static setup(e,t){let r=!1;e.on("test",(function wphSetupTest(t){if(r)return;r=!0;if(!(t instanceof Uint8Array)){e.send("test",null);return}const a=255===t[0];e.postMessageTransfers=a;e.send("test",{supportTransfers:a})}));e.on("configure",(function wphConfigure(e){(0,a.setVerbosityLevel)(e.verbosity)}));e.on("GetDocRequest",(function wphSetupDoc(e){return WorkerMessageHandler.createDocumentHandler(e,t)}))}static createDocumentHandler(e,t){let r,o=!1,u=null;const d=[],f=(0,a.getVerbosityLevel)(),g=e.apiVersion,p="2.11.338";if(g!==p)throw new Error(`The API version "${g}" does not match the Worker version "2.11.338".`);const m=[];for(const e in[])m.push(e);if(m.length)throw new Error("The `Array.prototype` contains unexpected enumerable properties: "+m.join(", ")+"; thus breaking e.g. `for...in` iteration of `Array`s.");if("undefined"==typeof ReadableStream)throw new Error("The browser/environment lacks native support for critical functionality used by the PDF.js library (e.g. `ReadableStream`); please use a `legacy`-build instead.");const b=e.docId,y=e.docBaseUrl,w=e.docId+"_worker";let S=new c.MessageHandler(w,b,t);S.postMessageTransfers=e.postMessageTransfers;function ensureNotTerminated(){if(o)throw new Error("Worker was terminated")}function startWorkerTask(e){d.push(e)}function finishWorkerTask(e){e.finish();const t=d.indexOf(e);d.splice(t,1)}async function loadDocument(e){await r.ensureDoc("checkHeader");await r.ensureDoc("parseStartXRef");await r.ensureDoc("parse",[e]);e||await r.ensureDoc("checkFirstPage");const t=await r.ensureDoc("isPureXfa");if(t){const e=new WorkerTask("loadXfaFonts");startWorkerTask(e);await Promise.all([r.loadXfaFonts(S,e).catch((e=>{})).then((()=>finishWorkerTask(e))),r.loadXfaImages()])}const[a,i]=await Promise.all([r.ensureDoc("numPages"),r.ensureDoc("fingerprints")]);return{numPages:a,fingerprints:i,htmlForXfa:t?await r.ensureDoc("htmlForXfa"):null}}function getPdfManager(e,t,r){const i=(0,a.createPromiseCapability)();let s;const o=e.source;if(o.data){try{s=new n.LocalPdfManager(b,o.data,o.password,t,r,y);i.resolve(s)}catch(e){i.reject(e)}return i.promise}let c,h=[];try{c=new l.PDFWorkerStream(S)}catch(e){i.reject(e);return i.promise}const d=c.getFullReader();d.headersReady.then((function(){if(!d.isRangeSupported)return;const e=o.disableAutoFetch||d.isStreamingSupported;s=new n.NetworkPdfManager(b,c,{msgHandler:S,password:o.password,length:d.contentLength,disableAutoFetch:e,rangeChunkSize:o.rangeChunkSize},t,r,y);for(let e=0;enull!==e)).reduce(((e,t)=>e.concat(t)),u);if(0===u.length)return t.bytes}const f=r instanceof i.Dict&&r.get("XFA")||null;let g=null,p=!1;if(Array.isArray(f)){for(let e=0,t=f.length;e{(0,a.isString)(t)&&(0,a.isString)(r)&&(e[t]=(0,a.stringToPDFString)(r))}));m={rootRef:c.trailer.getRaw("Root")||null,encryptRef:c.trailer.getRaw("Encrypt")||null,newRef:c.getNewRef(),infoRef:c.trailer.getRaw("Info")||null,info:e,fileIds:c.trailer.get("ID")||null,startXRef:l,filename:o}}c.resetNewRef();return(0,s.incrementalUpdate)({originalData:t.bytes,xrefInfo:m,newRefs:u,xref:c,hasXfa:!!f,xfaDatasetsRef:g,hasXfaDatasetsEntry:p,acroFormRef:n,acroForm:r,xfaData:d})}))}));S.on("GetOperatorList",(function wphSetupRenderPage(e,t){const i=e.pageIndex;r.getPage(i).then((function(r){const n=new WorkerTask(`GetOperatorList: page ${i}`);startWorkerTask(n);const s=f>=a.VerbosityLevel.INFOS?Date.now():0;r.getOperatorList({handler:S,sink:t,task:n,intent:e.intent,cacheKey:e.cacheKey,annotationStorage:e.annotationStorage}).then((function(e){finishWorkerTask(n);s&&(0,a.info)(`page=${i+1} - getOperatorList: time=${Date.now()-s}ms, len=${e.length}`);t.close()}),(function(e){finishWorkerTask(n);if(!n.terminated){S.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorOperatorList});t.error(e)}}))}))}));S.on("GetTextContent",(function wphExtractText(e,t){const i=e.pageIndex;r.getPage(i).then((function(r){const n=new WorkerTask("GetTextContent: page "+i);startWorkerTask(n);const s=f>=a.VerbosityLevel.INFOS?Date.now():0;r.extractTextContent({handler:S,task:n,sink:t,normalizeWhitespace:e.normalizeWhitespace,includeMarkedContent:e.includeMarkedContent,combineTextItems:e.combineTextItems}).then((function(){finishWorkerTask(n);s&&(0,a.info)(`page=${i+1} - getTextContent: time=`+(Date.now()-s)+"ms");t.close()}),(function(e){finishWorkerTask(n);n.terminated||t.error(e)}))}))}));S.on("GetStructTree",(function wphGetStructTree(e){return r.getPage(e.pageIndex).then((function(e){return r.ensure(e,"getStructTree")}))}));S.on("FontFallback",(function(e){return r.fontFallback(e.id,S)}));S.on("Cleanup",(function wphCleanup(e){return r.cleanup(!0)}));S.on("Terminate",(function wphTerminate(e){o=!0;const t=[];if(r){r.terminate(new a.AbortException("Worker was terminated."));const e=r.cleanup();t.push(e);r=null}else(0,i.clearPrimitiveCaches)();u&&u(new a.AbortException("Worker was terminated."));for(const e of d){t.push(e.finished);e.terminate()}return Promise.all(t).then((function(){S.destroy();S=null}))}));S.on("Ready",(function wphReady(t){!function setupDoc(e){function onSuccess(e){ensureNotTerminated();S.send("GetDoc",{pdfInfo:e})}function onFailure(e){ensureNotTerminated();if(e instanceof a.PasswordException){const t=new WorkerTask(`PasswordException: response ${e.code}`);startWorkerTask(t);S.sendWithPromise("PasswordRequest",e).then((function({password:e}){finishWorkerTask(t);r.updatePassword(e);pdfManagerReady()})).catch((function(){finishWorkerTask(t);S.send("DocException",e)}))}else e instanceof a.InvalidPDFException||e instanceof a.MissingPDFException||e instanceof a.UnexpectedResponseException||e instanceof a.UnknownErrorException?S.send("DocException",e):S.send("DocException",new a.UnknownErrorException(e.message,e.toString()))}function pdfManagerReady(){ensureNotTerminated();loadDocument(!1).then(onSuccess,(function(e){ensureNotTerminated();if(e instanceof h.XRefParseException){r.requestLoadedStream();r.onLoadedStream().then((function(){ensureNotTerminated();loadDocument(!0).then(onSuccess,onFailure)}))}else onFailure(e)}))}ensureNotTerminated();getPdfManager(e,{maxImageSize:e.maxImageSize,disableFontFace:e.disableFontFace,ignoreErrors:e.ignoreErrors,isEvalSupported:e.isEvalSupported,fontExtraProperties:e.fontExtraProperties,useSystemFonts:e.useSystemFonts,cMapUrl:e.cMapUrl,standardFontDataUrl:e.standardFontDataUrl},e.enableXfa).then((function(e){if(o){e.terminate(new a.AbortException("Worker was terminated."));throw new Error("Worker was terminated")}r=e;r.onLoadedStream().then((function(e){S.send("DataLoaded",{length:e.bytes.byteLength})}))})).then(pdfManagerReady,onFailure)}(e);e=null}));return w}static initializeFromPort(e){const t=new c.MessageHandler("worker","main",e);WorkerMessageHandler.setup(t,e);t.send("ready",null)}}t.WorkerMessageHandler=WorkerMessageHandler;"undefined"==typeof window&&!o.isNodeJS&&"undefined"!=typeof self&&function isMessagePort(e){return"function"==typeof e.postMessage&&"onmessage"in e}(self)&&WorkerMessageHandler.initializeFromPort(self)},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.arrayByteLength=arrayByteLength;t.arraysToBytes=function arraysToBytes(e){const t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];let r=0;for(let a=0;a>2]+a[(3&n)<<4|s>>4]+a[t+1>6:64]+a[t+2t});e.promise=new Promise((function(r,a){e.resolve=function(e){t=!0;r(e)};e.reject=function(e){t=!0;a(e)}}));return e};t.createValidAbsoluteUrl=function createValidAbsoluteUrl(e,t=null,r=null){if(!e)return null;try{if(r&&"string"==typeof e){if(r.addDefaultProtocol&&e.startsWith("www.")){const t=e.match(/\./g);t&&t.length>=2&&(e=`http://${e}`)}if(r.tryConvertEncoding)try{e=stringToUTF8String(e)}catch(e){}}const a=t?new URL(e,t):new URL(e);if(function _isValidProtocol(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(a))return a}catch(e){}return null};t.escapeString=function escapeString(e){return e.replace(/([()\\\n\r])/g,(e=>"\n"===e?"\\n":"\r"===e?"\\r":`\\${e}`))};t.getModificationDate=function getModificationDate(e=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 getVerbosityLevel(){return i};t.info=function info(e){i>=a.INFOS&&console.log(`Info: ${e}`)};t.isArrayBuffer=function isArrayBuffer(e){return"object"==typeof e&&null!==e&&void 0!==e.byteLength};t.isArrayEqual=function isArrayEqual(e,t){if(e.length!==t.length)return!1;for(let r=0,a=e.length;r>24&255,e>>16&255,e>>8&255,255&e)};t.stringToBytes=stringToBytes;t.stringToPDFString=function stringToPDFString(e){const t=e.length,r=[];if("þ"===e[0]&&"ÿ"===e[1])for(let a=2;a>8&255),String.fromCharCode(255&a))}return t.join("")};t.stringToUTF8String=stringToUTF8String;t.unreachable=unreachable;t.utf8StringToString=function utf8StringToString(e){return unescape(encodeURIComponent(e))};t.warn=warn;t.VerbosityLevel=t.Util=t.UNSUPPORTED_FEATURES=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.RenderingIntentFlag=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.AnnotationMode=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0;r(3);t.IDENTITY_MATRIX=[1,0,0,1,0,0];t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];t.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256};t.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3};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",TYPE1STANDARD:"TYPE1STANDARD",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};const a={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=a;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",errorContentSubStream:"errorContentSubStream"};t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let i=a.WARNINGS;function warn(e){i>=a.WARNINGS&&console.log(`Warning: ${e}`)}function unreachable(e){throw new Error(e)}function assert(e,t){e||unreachable(t)}function shadow(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1});return r}const n=function BaseExceptionClosure(){function BaseException(e,t){this.constructor===BaseException&&unreachable("Cannot initialize BaseException.");this.message=e;this.name=t}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();t.BaseException=n;t.PasswordException=class PasswordException extends n{constructor(e,t){super(e,"PasswordException");this.code=t}};t.UnknownErrorException=class UnknownErrorException extends n{constructor(e,t){super(e,"UnknownErrorException");this.details=t}};t.InvalidPDFException=class InvalidPDFException extends n{constructor(e){super(e,"InvalidPDFException")}};t.MissingPDFException=class MissingPDFException extends n{constructor(e){super(e,"MissingPDFException")}};t.UnexpectedResponseException=class UnexpectedResponseException extends n{constructor(e,t){super(e,"UnexpectedResponseException");this.status=t}};t.FormatError=class FormatError extends n{constructor(e){super(e,"FormatError")}};t.AbortException=class AbortException extends n{constructor(e){super(e,"AbortException")}};const s=/\x00/g;function stringToBytes(e){assert("string"==typeof e,"Invalid argument for stringToBytes");const t=e.length,r=new Uint8Array(t);for(let a=0;ae.toString(16).padStart(2,"0")));class Util{static makeHexColor(e,t,r){return`#${l[e]}${l[t]}${l[r]}`}static transform(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]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){const 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]}static getAxialAlignedBoundingBox(e,t){const r=Util.applyTransform(e,t),a=Util.applyTransform(e.slice(2,4),t),i=Util.applyTransform([e[0],e[3]],t),n=Util.applyTransform([e[2],e[1]],t);return[Math.min(r[0],a[0],i[0],n[0]),Math.min(r[1],a[1],i[1],n[1]),Math.max(r[0],a[0],i[0],n[0]),Math.max(r[1],a[1],i[1],n[1])]}static inverseTransform(e){const 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]}static apply3dTransform(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]]}static singularValueDecompose2dScale(e){const t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],a=e[0]*t[1]+e[1]*t[3],i=e[2]*t[0]+e[3]*t[2],n=e[2]*t[1]+e[3]*t[3],s=(r+n)/2,o=Math.sqrt((r+n)**2-4*(r*n-i*a))/2,c=s+o||1,l=s-o||1;return[Math.sqrt(c),Math.sqrt(l)]}static normalizeRect(e){const t=e.slice(0);if(e[0]>e[2]){t[0]=e[2];t[2]=e[0]}if(e[1]>e[3]){t[1]=e[3];t[3]=e[1]}return t}static intersect(e,t){function compare(e,t){return e-t}const r=[e[0],e[2],t[0],t[2]].sort(compare),a=[e[1],e[3],t[1],t[3]].sort(compare),i=[];e=Util.normalizeRect(e);t=Util.normalizeRect(t);if(!(r[0]===e[0]&&r[1]===t[0]||r[0]===t[0]&&r[1]===e[0]))return null;i[0]=r[1];i[2]=r[2];if(!(a[0]===e[1]&&a[1]===t[1]||a[0]===t[1]&&a[1]===e[1]))return null;i[1]=a[1];i[3]=a[2];return i}}t.Util=Util;const h=[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];function stringToUTF8String(e){return decodeURIComponent(escape(e))}},(e,t,r)=>{r(4)},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.isNodeJS=void 0;const r=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=r},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.clearPrimitiveCaches=function clearPrimitiveCaches(){o._clearCache();s._clearCache();l._clearCache()};t.isCmd=function isCmd(e,t){return e instanceof o&&(void 0===t||e.cmd===t)};t.isDict=function isDict(e,t){return e instanceof Dict&&(void 0===t||isName(e.get("Type"),t))};t.isName=isName;t.isRef=function isRef(e){return e instanceof l};t.isRefsEqual=function isRefsEqual(e,t){return e.num===t.num&&e.gen===t.gen};t.isStream=function isStream(e){return e instanceof i.BaseStream};t.RefSetCache=t.RefSet=t.Ref=t.Name=t.EOF=t.Dict=t.Cmd=void 0;var a=r(2),i=r(6);const n=Symbol("EOF");t.EOF=n;const s=function NameClosure(){let e=Object.create(null);class Name{constructor(e){this.name=e}static get(t){const r=e[t];return r||(e[t]=new Name(t))}static _clearCache(){e=Object.create(null)}}return Name}();t.Name=s;const o=function CmdClosure(){let e=Object.create(null);class Cmd{constructor(e){this.cmd=e}static get(t){const r=e[t];return r||(e[t]=new Cmd(t))}static _clearCache(){e=Object.create(null)}}return Cmd}();t.Cmd=o;const c=function nonSerializableClosure(){return c};class Dict{constructor(e=null){this._map=Object.create(null);this.xref=e;this.objId=null;this.suppressEncryption=!1;this.__nonSerializable__=c}assignXref(e){this.xref=e}get size(){return Object.keys(this._map).length}get(e,t,r){let a=this._map[e];if(void 0===a&&void 0!==t){a=this._map[t];void 0===a&&void 0!==r&&(a=this._map[r])}return a instanceof l&&this.xref?this.xref.fetch(a,this.suppressEncryption):a}async getAsync(e,t,r){let a=this._map[e];if(void 0===a&&void 0!==t){a=this._map[t];void 0===a&&void 0!==r&&(a=this._map[r])}return a instanceof l&&this.xref?this.xref.fetchAsync(a,this.suppressEncryption):a}getArray(e,t,r){let a=this._map[e];if(void 0===a&&void 0!==t){a=this._map[t];void 0===a&&void 0!==r&&(a=this._map[r])}a instanceof l&&this.xref&&(a=this.xref.fetch(a,this.suppressEncryption));if(Array.isArray(a)){a=a.slice();for(let e=0,t=a.length;e{(0,a.unreachable)("Should not call `set` on the empty dictionary.")};return(0,a.shadow)(this,"empty",e)}static merge({xref:e,dictArray:t,mergeSubDicts:r=!1}){const a=new Dict(e),i=new Map;for(const e of t)if(e instanceof Dict)for(const[t,a]of Object.entries(e._map)){let e=i.get(t);if(void 0===e){e=[];i.set(t,e)}else if(!(r&&a instanceof Dict))continue;e.push(a)}for(const[t,r]of i){if(1===r.length||!(r[0]instanceof Dict)){a._map[t]=r[0];continue}const i=new Dict(e);for(const e of r)for(const[t,r]of Object.entries(e._map))void 0===i._map[t]&&(i._map[t]=r);i.size>0&&(a._map[t]=i)}i.clear();return a.size>0?a:Dict.empty}}t.Dict=Dict;const l=function RefClosure(){let e=Object.create(null);class Ref{constructor(e,t){this.num=e;this.gen=t}toString(){return 0===this.gen?`${this.num}R`:`${this.num}R${this.gen}`}static get(t,r){const a=0===r?`${t}R`:`${t}R${r}`,i=e[a];return i||(e[a]=new Ref(t,r))}static _clearCache(){e=Object.create(null)}}return Ref}();t.Ref=l;t.RefSet=class RefSet{constructor(e=null){this._set=new Set(e&&e._set)}has(e){return this._set.has(e.toString())}put(e){this._set.add(e.toString())}remove(e){this._set.delete(e.toString())}forEach(e){for(const t of this._set.values())e(t)}clear(){this._set.clear()}};t.RefSetCache=class RefSetCache{constructor(){this._map=new Map}get size(){return this._map.size}get(e){return this._map.get(e.toString())}has(e){return this._map.has(e.toString())}put(e,t){this._map.set(e.toString(),t)}putAlias(e,t){this._map.set(e.toString(),this.get(t))}forEach(e){for(const t of this._map.values())e(t)}clear(){this._map.clear()}};function isName(e,t){return e instanceof s&&(void 0===t||e.name===t)}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.BaseStream=void 0;var a=r(2);class BaseStream{constructor(){this.constructor===BaseStream&&(0,a.unreachable)("Cannot initialize BaseStream.")}get length(){(0,a.unreachable)("Abstract getter `length` accessed")}get isEmpty(){(0,a.unreachable)("Abstract getter `isEmpty` accessed")}get isDataLoaded(){return(0,a.shadow)(this,"isDataLoaded",!0)}getByte(){(0,a.unreachable)("Abstract method `getByte` called")}getBytes(e,t=!1){(0,a.unreachable)("Abstract method `getBytes` called")}peekByte(){const e=this.getByte();-1!==e&&this.pos--;return e}peekBytes(e,t=!1){const r=this.getBytes(e,t);this.pos-=r.length;return r}getUint16(){const e=this.getByte(),t=this.getByte();return-1===e||-1===t?-1:(e<<8)+t}getInt32(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()}getByteRange(e,t){(0,a.unreachable)("Abstract method `getByteRange` called")}getString(e){return(0,a.bytesToString)(this.getBytes(e,!1))}skip(e){this.pos+=e||1}reset(){(0,a.unreachable)("Abstract method `reset` called")}moveStart(){(0,a.unreachable)("Abstract method `moveStart` called")}makeSubStream(e,t,r=null){(0,a.unreachable)("Abstract method `makeSubStream` called")}getBaseStreams(){return null}}t.BaseStream=BaseStream},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.NetworkPdfManager=t.LocalPdfManager=void 0;var a=r(2),i=r(8),n=r(9),s=r(11),o=r(10);function parseDocBaseUrl(e){if(e){const t=(0,a.createValidAbsoluteUrl)(e);if(t)return t.href;(0,a.warn)(`Invalid absolute docBaseUrl: "${e}".`)}return null}class BasePdfManager{constructor(){this.constructor===BasePdfManager&&(0,a.unreachable)("Cannot initialize BasePdfManager.")}get docId(){return this._docId}get password(){return this._password}get docBaseUrl(){return this._docBaseUrl}onLoadedStream(){(0,a.unreachable)("Abstract method `onLoadedStream` called")}ensureDoc(e,t){return this.ensure(this.pdfDocument,e,t)}ensureXRef(e,t){return this.ensure(this.pdfDocument.xref,e,t)}ensureCatalog(e,t){return this.ensure(this.pdfDocument.catalog,e,t)}getPage(e){return this.pdfDocument.getPage(e)}fontFallback(e,t){return this.pdfDocument.fontFallback(e,t)}loadXfaFonts(e,t){return this.pdfDocument.loadXfaFonts(e,t)}loadXfaImages(){return this.pdfDocument.loadXfaImages()}serializeXfaData(e){return this.pdfDocument.serializeXfaData(e)}cleanup(e=!1){return this.pdfDocument.cleanup(e)}async ensure(e,t,r){(0,a.unreachable)("Abstract method `ensure` called")}requestRange(e,t){(0,a.unreachable)("Abstract method `requestRange` called")}requestLoadedStream(){(0,a.unreachable)("Abstract method `requestLoadedStream` called")}sendProgressiveData(e){(0,a.unreachable)("Abstract method `sendProgressiveData` called")}updatePassword(e){this._password=e}terminate(e){(0,a.unreachable)("Abstract method `terminate` called")}}t.LocalPdfManager=class LocalPdfManager extends BasePdfManager{constructor(e,t,r,a,i,n){super();this._docId=e;this._password=r;this._docBaseUrl=parseDocBaseUrl(n);this.evaluatorOptions=a;this.enableXfa=i;const c=new o.Stream(t);this.pdfDocument=new s.PDFDocument(this,c);this._loadedStreamPromise=Promise.resolve(c)}async ensure(e,t,r){const a=e[t];return"function"==typeof a?a.apply(e,r):a}requestRange(e,t){return Promise.resolve()}requestLoadedStream(){}onLoadedStream(){return this._loadedStreamPromise}terminate(e){}};t.NetworkPdfManager=class NetworkPdfManager extends BasePdfManager{constructor(e,t,r,a,n,o){super();this._docId=e;this._password=r.password;this._docBaseUrl=parseDocBaseUrl(o);this.msgHandler=r.msgHandler;this.evaluatorOptions=a;this.enableXfa=n;this.streamManager=new i.ChunkedStreamManager(t,{msgHandler:r.msgHandler,length:r.length,disableAutoFetch:r.disableAutoFetch,rangeChunkSize:r.rangeChunkSize});this.pdfDocument=new s.PDFDocument(this,this.streamManager.getStream())}async ensure(e,t,r){try{const a=e[t];return"function"==typeof a?a.apply(e,r):a}catch(a){if(!(a instanceof n.MissingDataException))throw a;await this.requestRange(a.begin,a.end);return this.ensure(e,t,r)}}requestRange(e,t){return this.streamManager.requestRange(e,t)}requestLoadedStream(){this.streamManager.requestAllChunks()}sendProgressiveData(e){this.streamManager.onReceiveData({chunk:e})}onLoadedStream(){return this.streamManager.onLoadedStream()}terminate(e){this.streamManager.abort(e)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.ChunkedStreamManager=t.ChunkedStream=void 0;var a=r(2),i=r(9),n=r(10);class ChunkedStream extends n.Stream{constructor(e,t,r){super(new Uint8Array(e),0,e,null);this.chunkSize=t;this._loadedChunks=new Set;this.numChunks=Math.ceil(e/t);this.manager=r;this.progressiveDataLength=0;this.lastSuccessfulEnsureByteChunk=-1}getMissingChunks(){const e=[];for(let t=0,r=this.numChunks;t=this.end?this.numChunks:Math.floor(t/this.chunkSize);for(let e=r;e=t)return;if(t<=this.progressiveDataLength)return;const r=this.chunkSize,a=Math.floor(e/r),n=Math.floor((t-1)/r)+1;for(let r=a;r=this.end)return-1;e>=this.progressiveDataLength&&this.ensureByte(e);return this.bytes[this.pos++]}getBytes(e,t=!1){const r=this.bytes,a=this.pos,i=this.end;if(!e){i>this.progressiveDataLength&&this.ensureRange(a,i);const e=r.subarray(a,i);return t?new Uint8ClampedArray(e):e}let n=a+e;n>i&&(n=i);n>this.progressiveDataLength&&this.ensureRange(a,n);this.pos=n;const s=r.subarray(a,n);return t?new Uint8ClampedArray(s):s}getByteRange(e,t){e<0&&(e=0);t>this.end&&(t=this.end);t>this.progressiveDataLength&&this.ensureRange(e,t);return this.bytes.subarray(e,t)}makeSubStream(e,t,r=null){t?e+t>this.progressiveDataLength&&this.ensureRange(e,e+t):e>=this.progressiveDataLength&&this.ensureByte(e);function ChunkedStreamSubstream(){}ChunkedStreamSubstream.prototype=Object.create(this);ChunkedStreamSubstream.prototype.getMissingChunks=function(){const e=this.chunkSize,t=Math.floor(this.start/e),r=Math.floor((this.end-1)/e)+1,a=[];for(let e=t;e{const readChunk=s=>{try{if(!s.done){const e=s.value;i.push(e);n+=(0,a.arrayByteLength)(e);r.isStreamingSupported&&this.onProgress({loaded:n});r.read().then(readChunk,t);return}const o=(0,a.arraysToBytes)(i);i=null;e(o)}catch(e){t(e)}};r.read().then(readChunk,t)})).then((t=>{this.aborted||this.onReceiveData({chunk:t,begin:e})}))}requestAllChunks(){const e=this.stream.getMissingChunks();this._requestChunks(e);return this._loadedStreamCapability.promise}_requestChunks(e){const t=this.currRequestId++,r=new Set;this._chunksNeededByRequest.set(t,r);for(const t of e)this.stream.hasChunk(t)||r.add(t);if(0===r.size)return Promise.resolve();const i=(0,a.createPromiseCapability)();this._promisesByRequest.set(t,i);const n=[];for(const e of r){let r=this._requestsByChunk.get(e);if(!r){r=[];this._requestsByChunk.set(e,r);n.push(e)}r.push(t)}if(n.length>0){const e=this.groupChunks(n);for(const t of e){const e=t.beginChunk*this.chunkSize,r=Math.min(t.endChunk*this.chunkSize,this.length);this.sendRequest(e,r).catch(i.reject)}}return i.promise.catch((e=>{if(!this.aborted)throw e}))}getStream(){return this.stream}requestRange(e,t){t=Math.min(t,this.length);const r=this.getBeginChunk(e),a=this.getEndChunk(t),i=[];for(let e=r;e=0&&a+1!==n){t.push({beginChunk:r,endChunk:a+1});r=n}i+1===e.length&&t.push({beginChunk:r,endChunk:n+1});a=n}return t}onProgress(e){this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize+e.loaded,total:this.length})}onReceiveData(e){const t=e.chunk,r=void 0===e.begin,a=r?this.progressiveDataLength:e.begin,i=a+t.byteLength,n=Math.floor(a/this.chunkSize),s=i0||o.push(r)}}}if(!this.disableAutoFetch&&0===this._requestsByChunk.size){let e;if(1===this.stream.numChunksLoaded){const t=this.stream.numChunks-1;this.stream.hasChunk(t)||(e=t)}else e=this.stream.nextEmptyChunk(s);Number.isInteger(e)&&this._requestChunks([e])}for(const e of o){const t=this._promisesByRequest.get(e);this._promisesByRequest.delete(e);t.resolve()}this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize,total:this.length})}onError(e){this._loadedStreamCapability.reject(e)}getBeginChunk(e){return Math.floor(e/this.chunkSize)}getEndChunk(e){return Math.floor((e-1)/this.chunkSize)+1}abort(e){this.aborted=!0;this.pdfNetworkStream&&this.pdfNetworkStream.cancelAllRequests(e);for(const t of this._promisesByRequest.values())t.reject(e)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.collectActions=function collectActions(e,t,r){const n=Object.create(null),s=getInheritableProperty({dict:t,key:"AA",stopWhenFound:!1});if(s)for(let t=s.length-1;t>=0;t--){const a=s[t];if(a instanceof i.Dict)for(const t of a.getKeys()){const s=r[t];if(!s)continue;const o=a.getRaw(t),c=new i.RefSet,l=[];_collectJS(o,e,l,c);l.length>0&&(n[s]=l)}}if(t.has("A")){const r=t.get("A"),a=new i.RefSet,s=[];_collectJS(r,e,s,a);s.length>0&&(n.Action=s)}return(0,a.objectSize)(n)>0?n:null};t.encodeToXmlString=function encodeToXmlString(e){const t=[];let r=0;for(let a=0,i=e.length;a55295&&(i<57344||i>65533)&&a++;r=a+1}}if(0===t.length)return e;r126||35===i||40===i||41===i||60===i||62===i||91===i||93===i||123===i||125===i||47===i||37===i){r{const r=e.match(t);return r?{name:r[1],pos:parseInt(r[2],10)}:{name:e,pos:0}}))};t.readInt8=function readInt8(e,t){return e[t]<<24>>24};t.readUint16=function readUint16(e,t){return e[t]<<8|e[t+1]};t.readUint32=function readUint32(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0};t.recoverJsURL=function recoverJsURL(e){const t=new RegExp("^\\s*("+["app.launchURL","window.open","xfa.host.gotoURL"].join("|").split(".").join("\\.")+")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))","i").exec(e);if(t&&t[2]){const e=t[2];let r=!1;"true"===t[3]&&"app.launchURL"===t[1]&&(r=!0);return{url:e,newWindow:r}}return null};t.toRomanNumerals=function toRomanNumerals(e,t=!1){(0,a.assert)(Number.isInteger(e)&&e>0,"The number should be a positive integer.");const r=[];let i;for(;e>=1e3;){e-=1e3;r.push("M")}i=e/100|0;e%=100;r.push(n[i]);i=e/10|0;e%=10;r.push(n[10+i]);r.push(n[20+e]);const s=r.join("");return t?s.toLowerCase():s};t.validateCSSFont=function validateCSSFont(e){const t=new Set(["100","200","300","400","500","600","700","800","900","1000","normal","bold","bolder","lighter"]),{fontFamily:r,fontWeight:i,italicAngle:n}=e;if(/^".*"$/.test(r)){if(/[^\\]"/.test(r.slice(1,r.length-1))){(0,a.warn)(`XFA - FontFamily contains some unescaped ": ${r}.`);return!1}}else if(/^'.*'$/.test(r)){if(/[^\\]'/.test(r.slice(1,r.length-1))){(0,a.warn)(`XFA - FontFamily contains some unescaped ': ${r}.`);return!1}}else for(const e of r.split(/[ \t]+/))if(/^(\d|(-(\d|-)))/.test(e)||!/^[\w-\\]+$/.test(e)){(0,a.warn)(`XFA - FontFamily contains some invalid : ${r}.`);return!1}const s=i?i.toString():"";e.fontWeight=t.has(s)?s:"400";const o=parseFloat(n);e.italicAngle=isNaN(o)||o<-90||o>90?"14":n.toString();return!0};t.XRefParseException=t.XRefEntryException=t.ParserEOFException=t.MissingDataException=void 0;var a=r(2),i=r(5);class MissingDataException extends a.BaseException{constructor(e,t){super(`Missing data [${e}, ${t})`,"MissingDataException");this.begin=e;this.end=t}}t.MissingDataException=MissingDataException;class ParserEOFException extends a.BaseException{constructor(e){super(e,"ParserEOFException")}}t.ParserEOFException=ParserEOFException;class XRefEntryException extends a.BaseException{constructor(e){super(e,"XRefEntryException")}}t.XRefEntryException=XRefEntryException;class XRefParseException extends a.BaseException{constructor(e){super(e,"XRefParseException")}}t.XRefParseException=XRefParseException;function getInheritableProperty({dict:e,key:t,getArray:r=!1,stopWhenFound:a=!0}){let n;const s=new i.RefSet;for(;e instanceof i.Dict&&(!e.objId||!s.has(e.objId));){e.objId&&s.put(e.objId);const i=r?e.getArray(t):e.get(t);if(void 0!==i){if(a)return i;n||(n=[]);n.push(i)}e=e.get("Parent")}return n}const n=["","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 _collectJS(e,t,r,n){if(!e)return;let 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))for(const a of e)_collectJS(a,t,r,n);else if(e instanceof i.Dict){if((0,i.isName)(e.get("S"),"JavaScript")&&e.has("JS")){const t=e.get("JS");let n;n=(0,i.isStream)(t)?t.getString():t;n=(0,a.stringToPDFString)(n);n&&r.push(n)}_collectJS(e.getRaw("Next"),t,r,n)}s&&n.remove(s)}const s={60:"<",62:">",38:"&",34:""",39:"'"}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.StringStream=t.Stream=t.NullStream=void 0;var a=r(6),i=r(2);class Stream extends a.BaseStream{constructor(e,t,r,a){super();this.bytes=e instanceof Uint8Array?e:new Uint8Array(e);this.start=t||0;this.pos=this.start;this.end=t+r||this.bytes.length;this.dict=a}get length(){return this.end-this.start}get isEmpty(){return 0===this.length}getByte(){return this.pos>=this.end?-1:this.bytes[this.pos++]}getBytes(e,t=!1){const r=this.bytes,a=this.pos,i=this.end;if(!e){const e=r.subarray(a,i);return t?new Uint8ClampedArray(e):e}let n=a+e;n>i&&(n=i);this.pos=n;const s=r.subarray(a,n);return t?new Uint8ClampedArray(s):s}getByteRange(e,t){e<0&&(e=0);t>this.end&&(t=this.end);return this.bytes.subarray(e,t)}reset(){this.pos=this.start}moveStart(){this.start=this.pos}makeSubStream(e,t,r=null){return new Stream(this.bytes.buffer,e,t,r)}}t.Stream=Stream;t.StringStream=class StringStream extends Stream{constructor(e){super((0,i.stringToBytes)(e))}};t.NullStream=class NullStream extends Stream{constructor(){super(new Uint8Array(0))}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.PDFDocument=t.Page=void 0;var a=r(2),i=r(5),n=r(9),s=r(12),o=r(10),c=r(22),l=r(6),h=r(72),u=r(64),d=r(27),f=r(70),g=r(62),p=r(25),m=r(29),b=r(69),y=r(74),w=r(98);const S=[0,0,612,792];class Page{constructor({pdfManager:e,xref:t,pageIndex:r,pageDict:a,ref:i,globalIdFactory:n,fontCache:s,builtInCMapCache:o,standardFontDataCache:c,globalImageCache:l,nonBlendModesSet:h,xfaFactory:u}){this.pdfManager=e;this.pageIndex=r;this.pageDict=a;this.xref=t;this.ref=i;this.fontCache=s;this.builtInCMapCache=o;this.standardFontDataCache=c;this.globalImageCache=l;this.nonBlendModesSet=h;this.evaluatorOptions=e.evaluatorOptions;this.resourcesPromise=null;this.xfaFactory=u;const d={obj:0};this._localIdFactory=class extends n{static createObjId(){return`p${r}_${++d.obj}`}static getPageObjId(){return`page${i.toString()}`}}}_getInheritableProperty(e,t=!1){const r=(0,n.getInheritableProperty)({dict:this.pageDict,key:e,getArray:t,stopWhenFound:!1});return Array.isArray(r)?1!==r.length&&(0,i.isDict)(r[0])?i.Dict.merge({xref:this.xref,dictArray:r}):r[0]:r}get content(){return this.pageDict.getArray("Contents")}get resources(){return(0,a.shadow)(this,"resources",this._getInheritableProperty("Resources")||i.Dict.empty)}_getBoundingBox(e){if(this.xfaData)return this.xfaData.bbox;const t=this._getInheritableProperty(e,!0);if(Array.isArray(t)&&4===t.length){if(t[2]-t[0]!=0&&t[3]-t[1]!=0)return t;(0,a.warn)(`Empty /${e} entry.`)}return null}get mediaBox(){return(0,a.shadow)(this,"mediaBox",this._getBoundingBox("MediaBox")||S)}get cropBox(){return(0,a.shadow)(this,"cropBox",this._getBoundingBox("CropBox")||this.mediaBox)}get userUnit(){let e=this.pageDict.get("UserUnit");(!(0,a.isNum)(e)||e<=0)&&(e=1);return(0,a.shadow)(this,"userUnit",e)}get view(){const{cropBox:e,mediaBox:t}=this;let r;if(e===t||(0,a.isArrayEqual)(e,t))r=t;else{const i=a.Util.intersect(e,t);i&&i[2]-i[0]!=0&&i[3]-i[1]!=0?r=i:(0,a.warn)("Empty /CropBox and /MediaBox intersection.")}return(0,a.shadow)(this,"view",r||t)}get rotate(){let e=this._getInheritableProperty("Rotate")||0;e%90!=0?e=0:e>=360?e%=360:e<0&&(e=(e%360+360)%360);return(0,a.shadow)(this,"rotate",e)}_onSubStreamError(e,t,r){if(!this.evaluatorOptions.ignoreErrors)throw t;e.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorContentSubStream});(0,a.warn)(`getContentStream - ignoring sub-stream (${r}): "${t}".`)}getContentStream(e){return this.pdfManager.ensure(this,"content").then((t=>t instanceof l.BaseStream?t:Array.isArray(t)?new m.StreamsSequenceStream(t,this._onSubStreamError.bind(this,e)):new o.NullStream))}get xfaData(){return this.xfaFactory?(0,a.shadow)(this,"xfaData",{bbox:this.xfaFactory.getBoundingBox(this.pageIndex)}):(0,a.shadow)(this,"xfaData",null)}save(e,t,r){const i=new p.PartialEvaluator({xref:this.xref,handler:e,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,options:this.evaluatorOptions});return this._parsedAnnotations.then((function(e){const n=[];for(const s of e)s.mustBePrinted(r)&&n.push(s.save(i,t,r).catch((function(e){(0,a.warn)(`save - ignoring annotation data during "${t.name}" task: "${e}".`);return null})));return Promise.all(n)}))}loadResources(e){this.resourcesPromise||(this.resourcesPromise=this.pdfManager.ensure(this,"resources"));return this.resourcesPromise.then((()=>new f.ObjectLoader(this.resources,e,this.xref).load()))}getOperatorList({handler:e,sink:t,task:r,intent:i,cacheKey:n,annotationStorage:s=null}){const o=this.getContentStream(e),c=this.loadResources(["ColorSpace","ExtGState","Font","Pattern","Properties","Shading","XObject"]),l=new p.PartialEvaluator({xref:this.xref,handler:e,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,options:this.evaluatorOptions}),h=Promise.all([o,c]).then((([a])=>{const s=new g.OperatorList(i,t);e.send("StartRenderPage",{transparency:l.hasBlendModes(this.resources,this.nonBlendModesSet),pageIndex:this.pageIndex,cacheKey:n});return l.getOperatorList({stream:a,task:r,resources:this.resources,operatorList:s}).then((function(){return s}))}));return Promise.all([h,this._parsedAnnotations]).then((function([e,t]){if(0===t.length||i&a.RenderingIntentFlag.ANNOTATIONS_DISABLE){e.flush(!0);return{length:e.totalLength}}const n=!!(i&a.RenderingIntentFlag.ANNOTATIONS_FORMS),o=!!(i&a.RenderingIntentFlag.ANY),c=!!(i&a.RenderingIntentFlag.DISPLAY),h=!!(i&a.RenderingIntentFlag.PRINT),u=[];for(const e of t)(o||c&&e.mustBeViewed(s)||h&&e.mustBePrinted(s))&&u.push(e.getOperatorList(l,r,n,s).catch((function(e){(0,a.warn)(`getOperatorList - ignoring annotation data during "${r.name}" task: "${e}".`);return null})));return Promise.all(u).then((function(t){e.addOp(a.OPS.beginAnnotations,[]);for(const r of t)e.addOpList(r);e.addOp(a.OPS.endAnnotations,[]);e.flush(!0);return{length:e.totalLength}}))}))}extractTextContent({handler:e,task:t,normalizeWhitespace:r,includeMarkedContent:a,sink:i,combineTextItems:n}){const s=this.getContentStream(e),o=this.loadResources(["ExtGState","Font","Properties","XObject"]);return Promise.all([s,o]).then((([s])=>new p.PartialEvaluator({xref:this.xref,handler:e,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,options:this.evaluatorOptions}).getTextContent({stream:s,task:t,resources:this.resources,normalizeWhitespace:r,includeMarkedContent:a,combineTextItems:n,sink:i})))}async getStructTree(){const e=await this.pdfManager.ensureCatalog("structTreeRoot");if(!e)return null;return(await this.pdfManager.ensure(this,"_parseStructTree",[e])).serializable}_parseStructTree(e){const t=new b.StructTreePage(e,this.pageDict);t.parse();return t}getAnnotationsData(e){return this._parsedAnnotations.then((function(t){const r=[];if(0===t.length)return r;const i=!!(e&a.RenderingIntentFlag.ANY),n=!!(e&a.RenderingIntentFlag.DISPLAY),s=!!(e&a.RenderingIntentFlag.PRINT);for(const e of t)(i||n&&e.viewable||s&&e.printable)&&r.push(e.data);return r}))}get annotations(){const e=this._getInheritableProperty("Annots");return(0,a.shadow)(this,"annotations",Array.isArray(e)?e:[])}get _parsedAnnotations(){const e=this.pdfManager.ensure(this,"annotations").then((()=>{const e=[];for(const t of this.annotations)e.push(c.AnnotationFactory.create(this.xref,t,this.pdfManager,this._localIdFactory,!1).catch((function(e){(0,a.warn)(`_parsedAnnotations: "${e}".`);return null})));return Promise.all(e).then((function(e){return e.filter((e=>!!e))}))}));return(0,a.shadow)(this,"_parsedAnnotations",e)}get jsActions(){const e=(0,n.collectActions)(this.xref,this.pageDict,a.PageActionEventType);return(0,a.shadow)(this,"jsActions",e)}}t.Page=Page;const x=new Uint8Array([37,80,68,70,45]),k=new Uint8Array([115,116,97,114,116,120,114,101,102]),C=new Uint8Array([101,110,100,111,98,106]),v=/^[1-9]\.\d$/;function find(e,t,r=1024,a=!1){const i=t.length,n=e.peekBytes(r),s=n.length-i;if(s<=0)return!1;if(a){const r=i-1;let a=n.length-1;for(;a>=r;){let s=0;for(;s=i){e.pos+=a-r;return!0}a--}}else{let r=0;for(;r<=s;){let a=0;for(;a=i){e.pos+=r;return!0}r++}}return!1}t.PDFDocument=class PDFDocument{constructor(e,t){let r;if((0,i.isStream)(t))r=t;else{if(!(0,a.isArrayBuffer)(t))throw new Error("PDFDocument: Unknown argument type");r=new o.Stream(t)}if(r.length<=0)throw new a.InvalidPDFException("The PDF file is empty, i.e. its size is zero bytes.");this.pdfManager=e;this.stream=r;this.xref=new w.XRef(r,e);this._pagePromises=[];this._version=null;const n={font:0};this._globalIdFactory=class{static getDocId(){return`g_${e.docId}`}static createFontId(){return"f"+ ++n.font}static createObjId(){(0,a.unreachable)("Abstract method `createObjId` called.")}static getPageObjId(){(0,a.unreachable)("Abstract method `getPageObjId` called.")}}}parse(e){this.xref.parse(e);this.catalog=new u.Catalog(this.pdfManager,this.xref);this.catalog.version&&(this._version=this.catalog.version)}get linearization(){let e=null;try{e=d.Linearization.create(this.stream)}catch(e){if(e instanceof n.MissingDataException)throw e;(0,a.info)(e)}return(0,a.shadow)(this,"linearization",e)}get startXRef(){const e=this.stream;let t=0;if(this.linearization){e.reset();find(e,C)&&(t=e.pos+6-e.start)}else{const r=1024,a=k.length;let i=!1,s=e.end;for(;!i&&s>0;){s-=r-a;s<0&&(s=0);e.pos=s;i=find(e,k,r,!0)}if(i){e.skip(9);let r;do{r=e.getByte()}while((0,n.isWhiteSpace)(r));let a="";for(;r>=32&&r<=57;){a+=String.fromCharCode(r);r=e.getByte()}t=parseInt(a,10);isNaN(t)&&(t=0)}}return(0,a.shadow)(this,"startXRef",t)}checkHeader(){const e=this.stream;e.reset();if(!find(e,x))return;e.moveStart();let t,r="";for(;(t=e.getByte())>32&&!(r.length>=12);)r+=String.fromCharCode(t);this._version||(this._version=r.substring(5))}parseStartXRef(){this.xref.setStartXRef(this.startXRef)}get numPages(){if(this.xfaFactory)return(0,a.shadow)(this,"numPages",this.xfaFactory.numberPages);const e=this.linearization,t=e?e.numPages:this.catalog.numPages;return(0,a.shadow)(this,"numPages",t)}_hasOnlyDocumentSignatures(e,t=0){return!!Array.isArray(e)&&e.every((e=>{if(!((e=this.xref.fetchIfRef(e))instanceof i.Dict))return!1;if(e.has("Kids")){if(++t>10){(0,a.warn)("_hasOnlyDocumentSignatures: maximum recursion depth reached");return!1}return this._hasOnlyDocumentSignatures(e.get("Kids"),t)}const r=(0,i.isName)(e.get("FT"),"Sig"),n=e.get("Rect"),s=Array.isArray(n)&&n.every((e=>0===e));return r&&s}))}get xfaData(){const e=this.catalog.acroForm;if(!e)return null;const t=e.get("XFA"),r={"xdp:xdp":"",template:"",datasets:"",config:"",connectionSet:"",localeSet:"",stylesheet:"","/xdp:xdp":""};if((0,i.isStream)(t)&&!t.isEmpty)try{r["xdp:xdp"]=(0,a.stringToUTF8String)(t.getString());return r}catch(e){(0,a.warn)("XFA - Invalid utf-8 string.");return null}if(!Array.isArray(t)||0===t.length)return null;for(let e=0,n=t.length;e{y.set(e,t)}));const w=[];for(const[e,r]of y){const s=r.get("FontDescriptor");if(!(s instanceof i.Dict))continue;let c=s.get("FontFamily");c=c.replace(/[ ]+(\d)/g,"$1");const l={fontFamily:c,fontWeight:s.get("FontWeight"),italicAngle:-s.get("ItalicAngle")};(0,n.validateCSSFont)(l)&&w.push(u.handleSetFont(o,[i.Name.get(e),1],null,d,t,b,null,l).catch((function(e){(0,a.warn)(`loadXfaFonts: "${e}".`);return null})))}await Promise.all(w);const S=this.xfaFactory.setFonts(m);if(!S)return;h.ignoreErrors=!0;w.length=0;m.length=0;const x=new Set;for(const e of S)(0,s.getXfaFontName)(`${e}-Regular`)||x.add(e);x.size&&S.push("PdfJS-Fallback");for(const e of S)if(!x.has(e))for(const r of[{name:"Regular",fontWeight:400,italicAngle:0},{name:"Bold",fontWeight:700,italicAngle:0},{name:"Italic",fontWeight:400,italicAngle:12},{name:"BoldItalic",fontWeight:700,italicAngle:12}]){const n=`${e}-${r.name}`,c=(0,s.getXfaFontDict)(n);w.push(u.handleSetFont(o,[i.Name.get(n),1],null,d,t,b,c,{fontFamily:e,fontWeight:r.fontWeight,italicAngle:r.italicAngle}).catch((function(e){(0,a.warn)(`loadXfaFonts: "${e}".`);return null})))}await Promise.all(w);this.xfaFactory.appendFonts(m,x)}async serializeXfaData(e){return this.xfaFactory?this.xfaFactory.serializeData(e):null}get formInfo(){const e={hasFields:!1,hasAcroForm:!1,hasXfa:!1,hasSignatures:!1},t=this.catalog.acroForm;if(!t)return(0,a.shadow)(this,"formInfo",e);try{const r=t.get("Fields"),a=Array.isArray(r)&&r.length>0;e.hasFields=a;const n=t.get("XFA");e.hasXfa=Array.isArray(n)&&n.length>0||(0,i.isStream)(n)&&!n.isEmpty;const s=!!(1&t.get("SigFlags")),o=s&&this._hasOnlyDocumentSignatures(r);e.hasAcroForm=a&&!o;e.hasSignatures=s}catch(e){if(e instanceof n.MissingDataException)throw e;(0,a.warn)(`Cannot fetch form information: "${e}".`)}return(0,a.shadow)(this,"formInfo",e)}get documentInfo(){const e={Title:a.isString,Author:a.isString,Subject:a.isString,Keywords:a.isString,Creator:a.isString,Producer:a.isString,CreationDate:a.isString,ModDate:a.isString,Trapped:i.isName};let t=this._version;if("string"!=typeof t||!v.test(t)){(0,a.warn)(`Invalid PDF header version number: ${t}`);t=null}const r={PDFFormatVersion:t,IsLinearized:!!this.linearization,IsAcroFormPresent:this.formInfo.hasAcroForm,IsXFAPresent:this.formInfo.hasXfa,IsCollectionPresent:!!this.catalog.collection,IsSignaturesPresent:this.formInfo.hasSignatures};let s;try{s=this.xref.trailer.get("Info")}catch(e){if(e instanceof n.MissingDataException)throw e;(0,a.info)("The document information dictionary is invalid.")}if((0,i.isDict)(s))for(const t of s.getKeys()){const n=s.get(t);if(e[t])e[t](n)?r[t]="string"!=typeof n?n:(0,a.stringToPDFString)(n):(0,a.info)(`Bad value in document info for "${t}".`);else if("string"==typeof t){let e;if((0,a.isString)(n))e=(0,a.stringToPDFString)(n);else{if(!((0,i.isName)(n)||(0,a.isNum)(n)||(0,a.isBool)(n))){(0,a.info)(`Unsupported value in document info for (custom) "${t}".`);continue}e=n}r.Custom||(r.Custom=Object.create(null));r.Custom[t]=e}}return(0,a.shadow)(this,"documentInfo",r)}get fingerprints(){function validate(e){return"string"==typeof e&&e.length>0&&"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"!==e}function hexString(e){const t=[];for(let r=0,a=e.length;r{if((0,i.isDict)(e,"Page")||(0,i.isDict)(e)&&!e.has("Type")&&e.has("Contents")){n&&!t.pageKidsCountCache.has(n)&&t.pageKidsCountCache.put(n,1);return[e,n]}throw new a.FormatError("The Linearization dictionary doesn't point to a valid Page dictionary.")})).catch((r=>{(0,a.info)(r);return t.getPageDict(e)}))}getPage(e){if(void 0!==this._pagePromises[e])return this._pagePromises[e];const{catalog:t,linearization:r}=this;if(this.xfaFactory)return Promise.resolve(new Page({pdfManager:this.pdfManager,xref:this.xref,pageIndex:e,pageDict:i.Dict.empty,ref:null,globalIdFactory:this._globalIdFactory,fontCache:t.fontCache,builtInCMapCache:t.builtInCMapCache,standardFontDataCache:t.standardFontDataCache,globalImageCache:t.globalImageCache,nonBlendModesSet:t.nonBlendModesSet,xfaFactory:this.xfaFactory}));const a=r&&r.pageFirst===e?this._getLinearizationPage(e):t.getPageDict(e);return this._pagePromises[e]=a.then((([r,a])=>new Page({pdfManager:this.pdfManager,xref:this.xref,pageIndex:e,pageDict:r,ref:a,globalIdFactory:this._globalIdFactory,fontCache:t.fontCache,builtInCMapCache:t.builtInCMapCache,standardFontDataCache:t.standardFontDataCache,globalImageCache:t.globalImageCache,nonBlendModesSet:t.nonBlendModesSet,xfaFactory:null})))}checkFirstPage(){return this.getPage(0).catch((async e=>{if(e instanceof n.XRefEntryException){this._pagePromises.length=0;await this.cleanup();throw new n.XRefParseException}}))}fontFallback(e,t){return this.catalog.fontFallback(e,t)}async cleanup(e=!1){return this.catalog?this.catalog.cleanup(e):(0,i.clearPrimitiveCaches)()}_collectFieldObjects(e,t,r){const i=this.xref.fetchIfRef(t);if(i.has("T")){const t=(0,a.stringToPDFString)(i.get("T"));e=""===e?t:`${e}.${t}`}r.has(e)||r.set(e,[]);r.get(e).push(c.AnnotationFactory.create(this.xref,t,this.pdfManager,this._localIdFactory,!0).then((e=>e&&e.getFieldObject())).catch((function(e){(0,a.warn)(`_collectFieldObjects: "${e}".`);return null})));if(i.has("Kids")){const t=i.get("Kids");for(const a of t)this._collectFieldObjects(e,a,r)}}get fieldObjects(){if(!this.formInfo.hasFields)return(0,a.shadow)(this,"fieldObjects",Promise.resolve(null));const e=Object.create(null),t=new Map;for(const e of this.catalog.acroForm.get("Fields"))this._collectFieldObjects("",e,t);const r=[];for(const[a,i]of t)r.push(Promise.all(i).then((t=>{(t=t.filter((e=>!!e))).length>0&&(e[a]=t)})));return(0,a.shadow)(this,"fieldObjects",Promise.all(r).then((()=>e)))}get hasJSActions(){const e=this.pdfManager.ensureDoc("_parseHasJSActions");return(0,a.shadow)(this,"hasJSActions",e)}async _parseHasJSActions(){const[e,t]=await Promise.all([this.pdfManager.ensureCatalog("jsActions"),this.pdfManager.ensureDoc("fieldObjects")]);return!!e||!!t&&Object.values(t).some((e=>e.some((e=>null!==e.actions))))}get calculationOrderIds(){const e=this.catalog.acroForm;if(!e||!e.has("CO"))return(0,a.shadow)(this,"calculationOrderIds",null);const t=e.get("CO");if(!Array.isArray(t)||0===t.length)return(0,a.shadow)(this,"calculationOrderIds",null);const r=t.filter(i.isRef).map((e=>e.toString()));return 0===r.length?(0,a.shadow)(this,"calculationOrderIds",null):(0,a.shadow)(this,"calculationOrderIds",r)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.getXfaFontDict=function getXfaFontDict(e){const t=function getXfaFontWidths(e){const t=getXfaFontName(e);if(!t)return null;const{baseWidths:r,baseMapping:a,factors:i}=t;let n;n=i?r.map(((e,t)=>e*i[t])):r;let s,o=-2;const c=[];for(const[e,t]of a.map(((e,t)=>[e,t])).sort((([e],[t])=>e-t)))if(-1!==e)if(e===o+1){s.push(n[t]);o+=1}else{o=e;s=[n[t]];c.push(e,s)}return c}(e),r=new i.Dict(null);r.set("BaseFont",i.Name.get(e));r.set("Type",i.Name.get("Font"));r.set("Subtype",i.Name.get("CIDFontType2"));r.set("Encoding",i.Name.get("Identity-H"));r.set("CIDToGIDMap",i.Name.get("Identity"));r.set("W",t);r.set("FirstChar",t[0]);r.set("LastChar",t[t.length-2]+t[t.length-1].length-1);const a=new i.Dict(null);r.set("FontDescriptor",a);const n=new i.Dict(null);n.set("Ordering","Identity");n.set("Registry","Adobe");n.set("Supplement",0);r.set("CIDSystemInfo",n);return r};t.getXfaFontName=getXfaFontName;var a=r(13),i=r(5),n=r(14),s=r(15),o=r(16),c=r(17),l=r(9),h=r(18);const u=(0,l.getLookupTableFactory)((function(e){e["MyriadPro-Regular"]=e["PdfJS-Fallback-Regular"]={name:"LiberationSans-Regular",factors:o.MyriadProRegularFactors,baseWidths:s.LiberationSansRegularWidths,baseMapping:s.LiberationSansRegularMapping,metrics:o.MyriadProRegularMetrics};e["MyriadPro-Bold"]=e["PdfJS-Fallback-Bold"]={name:"LiberationSans-Bold",factors:o.MyriadProBoldFactors,baseWidths:s.LiberationSansBoldWidths,baseMapping:s.LiberationSansBoldMapping,metrics:o.MyriadProBoldMetrics};e["MyriadPro-It"]=e["MyriadPro-Italic"]=e["PdfJS-Fallback-Italic"]={name:"LiberationSans-Italic",factors:o.MyriadProItalicFactors,baseWidths:s.LiberationSansItalicWidths,baseMapping:s.LiberationSansItalicMapping,metrics:o.MyriadProItalicMetrics};e["MyriadPro-BoldIt"]=e["MyriadPro-BoldItalic"]=e["PdfJS-Fallback-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:o.MyriadProBoldItalicFactors,baseWidths:s.LiberationSansBoldItalicWidths,baseMapping:s.LiberationSansBoldItalicMapping,metrics:o.MyriadProBoldItalicMetrics};e.ArialMT=e.Arial=e["Arial-Regular"]={name:"LiberationSans-Regular",baseWidths:s.LiberationSansRegularWidths,baseMapping:s.LiberationSansRegularMapping};e["Arial-BoldMT"]=e["Arial-Bold"]={name:"LiberationSans-Bold",baseWidths:s.LiberationSansBoldWidths,baseMapping:s.LiberationSansBoldMapping};e["Arial-ItalicMT"]=e["Arial-Italic"]={name:"LiberationSans-Italic",baseWidths:s.LiberationSansItalicWidths,baseMapping:s.LiberationSansItalicMapping};e["Arial-BoldItalicMT"]=e["Arial-BoldItalic"]={name:"LiberationSans-BoldItalic",baseWidths:s.LiberationSansBoldItalicWidths,baseMapping:s.LiberationSansBoldItalicMapping};e["Calibri-Regular"]={name:"LiberationSans-Regular",factors:a.CalibriRegularFactors,baseWidths:s.LiberationSansRegularWidths,baseMapping:s.LiberationSansRegularMapping,metrics:a.CalibriRegularMetrics};e["Calibri-Bold"]={name:"LiberationSans-Bold",factors:a.CalibriBoldFactors,baseWidths:s.LiberationSansBoldWidths,baseMapping:s.LiberationSansBoldMapping,metrics:a.CalibriBoldMetrics};e["Calibri-Italic"]={name:"LiberationSans-Italic",factors:a.CalibriItalicFactors,baseWidths:s.LiberationSansItalicWidths,baseMapping:s.LiberationSansItalicMapping,metrics:a.CalibriItalicMetrics};e["Calibri-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:a.CalibriBoldItalicFactors,baseWidths:s.LiberationSansBoldItalicWidths,baseMapping:s.LiberationSansBoldItalicMapping,metrics:a.CalibriBoldItalicMetrics};e["Segoeui-Regular"]={name:"LiberationSans-Regular",factors:c.SegoeuiRegularFactors,baseWidths:s.LiberationSansRegularWidths,baseMapping:s.LiberationSansRegularMapping,metrics:c.SegoeuiRegularMetrics};e["Segoeui-Bold"]={name:"LiberationSans-Bold",factors:c.SegoeuiBoldFactors,baseWidths:s.LiberationSansBoldWidths,baseMapping:s.LiberationSansBoldMapping,metrics:c.SegoeuiBoldMetrics};e["Segoeui-Italic"]={name:"LiberationSans-Italic",factors:c.SegoeuiItalicFactors,baseWidths:s.LiberationSansItalicWidths,baseMapping:s.LiberationSansItalicMapping,metrics:c.SegoeuiItalicMetrics};e["Segoeui-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:c.SegoeuiBoldItalicFactors,baseWidths:s.LiberationSansBoldItalicWidths,baseMapping:s.LiberationSansBoldItalicMapping,metrics:c.SegoeuiBoldItalicMetrics};e["Helvetica-Regular"]=e.Helvetica={name:"LiberationSans-Regular",factors:n.HelveticaRegularFactors,baseWidths:s.LiberationSansRegularWidths,baseMapping:s.LiberationSansRegularMapping,metrics:n.HelveticaRegularMetrics};e["Helvetica-Bold"]={name:"LiberationSans-Bold",factors:n.HelveticaBoldFactors,baseWidths:s.LiberationSansBoldWidths,baseMapping:s.LiberationSansBoldMapping,metrics:n.HelveticaBoldMetrics};e["Helvetica-Italic"]={name:"LiberationSans-Italic",factors:n.HelveticaItalicFactors,baseWidths:s.LiberationSansItalicWidths,baseMapping:s.LiberationSansItalicMapping,metrics:n.HelveticaItalicMetrics};e["Helvetica-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:n.HelveticaBoldItalicFactors,baseWidths:s.LiberationSansBoldItalicWidths,baseMapping:s.LiberationSansBoldItalicMapping,metrics:n.HelveticaBoldItalicMetrics}}));function getXfaFontName(e){const t=(0,h.normalizeFontName)(e);return u()[t]}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.CalibriRegularMetrics=t.CalibriRegularFactors=t.CalibriItalicMetrics=t.CalibriItalicFactors=t.CalibriBoldMetrics=t.CalibriBoldItalicMetrics=t.CalibriBoldItalicFactors=t.CalibriBoldFactors=void 0;t.CalibriBoldFactors=[1.3877,1,1,1,.97801,.92482,.89552,.91133,.81988,.97566,.98152,.93548,.93548,1.2798,.85284,.92794,1,.96134,1.54657,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.82845,.82845,.85284,.85284,.85284,.75859,.92138,.83908,.7762,.73293,.87289,.73133,.7514,.81921,.87356,.95958,.59526,.75727,.69225,1.04924,.9121,.86943,.79795,.88198,.77958,.70864,.81055,.90399,.88653,.96017,.82577,.77892,.78257,.97507,1.54657,.97507,.85284,.89552,.90176,.88762,.8785,.75241,.8785,.90518,.95015,.77618,.8785,.88401,.91916,.86304,.88401,.91488,.8785,.8801,.8785,.8785,.91343,.7173,1.04106,.8785,.85075,.95794,.82616,.85162,.79492,.88331,1.69808,.88331,.85284,.97801,.89552,.91133,.89552,.91133,1.7801,.89552,1.24487,1.13254,1.12401,.96839,.85284,.68787,.70645,.85592,.90747,1.01466,1.0088,.90323,1,1.07463,1,.91056,.75806,1.19118,.96839,.78864,.82845,.84133,.75859,.83908,.83908,.83908,.83908,.83908,.83908,.77539,.73293,.73133,.73133,.73133,.73133,.95958,.95958,.95958,.95958,.88506,.9121,.86943,.86943,.86943,.86943,.86943,.85284,.87508,.90399,.90399,.90399,.90399,.77892,.79795,.90807,.88762,.88762,.88762,.88762,.88762,.88762,.8715,.75241,.90518,.90518,.90518,.90518,.88401,.88401,.88401,.88401,.8785,.8785,.8801,.8801,.8801,.8801,.8801,.90747,.89049,.8785,.8785,.8785,.8785,.85162,.8785,.85162,.83908,.88762,.83908,.88762,.83908,.88762,.73293,.75241,.73293,.75241,.73293,.75241,.73293,.75241,.87289,.83016,.88506,.93125,.73133,.90518,.73133,.90518,.73133,.90518,.73133,.90518,.73133,.90518,.81921,.77618,.81921,.77618,.81921,.77618,1,1,.87356,.8785,.91075,.89608,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.76229,.90167,.59526,.91916,1,1,.86304,.69225,.88401,1,1,.70424,.79468,.91926,.88175,.70823,.94903,.9121,.8785,1,1,.9121,.8785,.87802,.88656,.8785,.86943,.8801,.86943,.8801,.86943,.8801,.87402,.89291,.77958,.91343,1,1,.77958,.91343,.70864,.7173,.70864,.7173,.70864,.7173,.70864,.7173,1,1,.81055,.75841,.81055,1.06452,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.96017,.95794,.77892,.85162,.77892,.78257,.79492,.78257,.79492,.78257,.79492,.9297,.56892,.83908,.88762,.77539,.8715,.87508,.89049,1,1,.81055,1.04106,1.20528,1.20528,1,1.15543,.70674,.98387,.94721,1.33431,1.45894,.95161,1.06303,.83908,.80352,.57184,.6965,.56289,.82001,.56029,.81235,1.02988,.83908,.7762,.68156,.80367,.73133,.78257,.87356,.86943,.95958,.75727,.89019,1.04924,.9121,.7648,.86943,.87356,.79795,.78275,.81055,.77892,.9762,.82577,.99819,.84896,.95958,.77892,.96108,1.01407,.89049,1.02988,.94211,.96108,.8936,.84021,.87842,.96399,.79109,.89049,1.00813,1.02988,.86077,.87445,.92099,.84723,.86513,.8801,.75638,.85714,.78216,.79586,.87965,.94211,.97747,.78287,.97926,.84971,1.02988,.94211,.8801,.94211,.84971,.73133,1,1,1,1,1,1,1,1,1,1,1,1,.90264,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,1,1,1,1,1,1,1,1,1,1,.90518,1,1,1,1,1,1,1,1,1,1,1,1,.90548,1,1,1,1,1,1,.96017,.95794,.96017,.95794,.96017,.95794,.77892,.85162,1,1,.89552,.90527,1,.90363,.92794,.92794,.92794,.92794,.87012,.87012,.87012,.89552,.89552,1.42259,.71143,1.06152,1,1,1.03372,1.03372,.97171,1.4956,2.2807,.93835,.83406,.91133,.84107,.91133,1,1,1,.72021,1,1.23108,.83489,.88525,.88525,.81499,.90527,1.81055,.90527,1.81055,1.31006,1.53711,.94434,1.08696,1,.95018,.77192,.85284,.90747,1.17534,.69825,.9716,1.37077,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,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,.99862,.99862,1,1,1,1,1,1.08004,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,.90727,.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];t.CalibriBoldMetrics={lineHeight:1.2207,lineGap:.2207};t.CalibriBoldItalicFactors=[1.3877,1,1,1,.97801,.92482,.89552,.91133,.81988,.97566,.98152,.93548,.93548,1.2798,.85284,.92794,1,.96134,1.56239,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.82845,.82845,.85284,.85284,.85284,.75859,.92138,.83908,.7762,.71805,.87289,.73133,.7514,.81921,.87356,.95958,.59526,.75727,.69225,1.04924,.90872,.85938,.79795,.87068,.77958,.69766,.81055,.90399,.88653,.96068,.82577,.77892,.78257,.97507,1.529,.97507,.85284,.89552,.90176,.94908,.86411,.74012,.86411,.88323,.95015,.86411,.86331,.88401,.91916,.86304,.88401,.9039,.86331,.86331,.86411,.86411,.90464,.70852,1.04106,.86331,.84372,.95794,.82616,.84548,.79492,.88331,1.69808,.88331,.85284,.97801,.89552,.91133,.89552,.91133,1.7801,.89552,1.24487,1.13254,1.19129,.96839,.85284,.68787,.70645,.85592,.90747,1.01466,1.0088,.90323,1,1.07463,1,.91056,.75806,1.19118,.96839,.78864,.82845,.84133,.75859,.83908,.83908,.83908,.83908,.83908,.83908,.77539,.71805,.73133,.73133,.73133,.73133,.95958,.95958,.95958,.95958,.88506,.90872,.85938,.85938,.85938,.85938,.85938,.85284,.87068,.90399,.90399,.90399,.90399,.77892,.79795,.90807,.94908,.94908,.94908,.94908,.94908,.94908,.85887,.74012,.88323,.88323,.88323,.88323,.88401,.88401,.88401,.88401,.8785,.86331,.86331,.86331,.86331,.86331,.86331,.90747,.89049,.86331,.86331,.86331,.86331,.84548,.86411,.84548,.83908,.94908,.83908,.94908,.83908,.94908,.71805,.74012,.71805,.74012,.71805,.74012,.71805,.74012,.87289,.79538,.88506,.92726,.73133,.88323,.73133,.88323,.73133,.88323,.73133,.88323,.73133,.88323,.81921,.86411,.81921,.86411,.81921,.86411,1,1,.87356,.86331,.91075,.8777,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.76467,.90167,.59526,.91916,1,1,.86304,.69225,.88401,1,1,.70424,.77312,.91926,.88175,.70823,.94903,.90872,.86331,1,1,.90872,.86331,.86906,.88116,.86331,.85938,.86331,.85938,.86331,.85938,.86331,.87402,.86549,.77958,.90464,1,1,.77958,.90464,.69766,.70852,.69766,.70852,.69766,.70852,.69766,.70852,1,1,.81055,.75841,.81055,1.06452,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.96068,.95794,.77892,.84548,.77892,.78257,.79492,.78257,.79492,.78257,.79492,.9297,.56892,.83908,.94908,.77539,.85887,.87068,.89049,1,1,.81055,1.04106,1.20528,1.20528,1,1.15543,.70088,.98387,.94721,1.33431,1.45894,.95161,1.48387,.83908,.80352,.57118,.6965,.56347,.79179,.55853,.80346,1.02988,.83908,.7762,.67174,.86036,.73133,.78257,.87356,.86441,.95958,.75727,.89019,1.04924,.90872,.74889,.85938,.87891,.79795,.7957,.81055,.77892,.97447,.82577,.97466,.87179,.95958,.77892,.94252,.95612,.8753,1.02988,.92733,.94252,.87411,.84021,.8728,.95612,.74081,.8753,1.02189,1.02988,.84814,.87445,.91822,.84723,.85668,.86331,.81344,.87581,.76422,.82046,.96057,.92733,.99375,.78022,.95452,.86015,1.02988,.92733,.86331,.92733,.86015,.73133,1,1,1,1,1,1,1,1,1,1,1,1,.90631,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,1,1,1,1,1,1,1,1,1,1,.88323,1,1,1,1,1,1,1,1,1,1,1,1,.85174,1,1,1,1,1,1,.96068,.95794,.96068,.95794,.96068,.95794,.77892,.84548,1,1,.89552,.90527,1,.90363,.92794,.92794,.92794,.89807,.87012,.87012,.87012,.89552,.89552,1.42259,.71094,1.06152,1,1,1.03372,1.03372,.97171,1.4956,2.2807,.92972,.83406,.91133,.83326,.91133,1,1,1,.72021,1,1.23108,.83489,.88525,.88525,.81499,.90616,1.81055,.90527,1.81055,1.3107,1.53711,.94434,1.08696,1,.95018,.77192,.85284,.90747,1.17534,.69825,.9716,1.37077,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,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,.99862,.99862,1,1,1,1,1,1.08004,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,.90727,.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];t.CalibriBoldItalicMetrics={lineHeight:1.2207,lineGap:.2207};t.CalibriItalicFactors=[1.3877,1,1,1,1.17223,1.1293,.89552,.91133,.80395,1.02269,1.15601,.91056,.91056,1.2798,.85284,.89807,1,.90861,1.39543,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.96309,.96309,.85284,.85284,.85284,.83319,.88071,.8675,.81552,.72346,.85193,.73206,.7522,.81105,.86275,.90685,.6377,.77892,.75593,1.02638,.89249,.84118,.77452,.85374,.75186,.67789,.79776,.88844,.85066,.94309,.77818,.7306,.76659,1.10369,1.38313,1.10369,1.06139,.89552,.8739,.9245,.9245,.83203,.9245,.85865,1.09842,.9245,.9245,1.03297,1.07692,.90918,1.03297,.94959,.9245,.92274,.9245,.9245,1.02933,.77832,1.20562,.9245,.8916,.98986,.86621,.89453,.79004,.94152,1.77256,.94152,.85284,.97801,.89552,.91133,.89552,.91133,1.91729,.89552,1.17889,1.13254,1.16359,.92098,.85284,.68787,.71353,.84737,.90747,1.0088,1.0044,.87683,1,1.09091,1,.92229,.739,1.15642,.92098,.76288,.80504,.80972,.75859,.8675,.8675,.8675,.8675,.8675,.8675,.76318,.72346,.73206,.73206,.73206,.73206,.90685,.90685,.90685,.90685,.86477,.89249,.84118,.84118,.84118,.84118,.84118,.85284,.84557,.88844,.88844,.88844,.88844,.7306,.77452,.86331,.9245,.9245,.9245,.9245,.9245,.9245,.84843,.83203,.85865,.85865,.85865,.85865,.82601,.82601,.82601,.82601,.94469,.9245,.92274,.92274,.92274,.92274,.92274,.90747,.86651,.9245,.9245,.9245,.9245,.89453,.9245,.89453,.8675,.9245,.8675,.9245,.8675,.9245,.72346,.83203,.72346,.83203,.72346,.83203,.72346,.83203,.85193,.8875,.86477,.99034,.73206,.85865,.73206,.85865,.73206,.85865,.73206,.85865,.73206,.85865,.81105,.9245,.81105,.9245,.81105,.9245,1,1,.86275,.9245,.90872,.93591,.90685,.82601,.90685,.82601,.90685,.82601,.90685,1.03297,.90685,.82601,.77896,1.05611,.6377,1.07692,1,1,.90918,.75593,1.03297,1,1,.76032,.9375,.98156,.93407,.77261,1.11429,.89249,.9245,1,1,.89249,.9245,.92534,.86698,.9245,.84118,.92274,.84118,.92274,.84118,.92274,.8667,.86291,.75186,1.02933,1,1,.75186,1.02933,.67789,.77832,.67789,.77832,.67789,.77832,.67789,.77832,1,1,.79776,.97655,.79776,1.23023,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.94309,.98986,.7306,.89453,.7306,.76659,.79004,.76659,.79004,.76659,.79004,1.09231,.54873,.8675,.9245,.76318,.84843,.84557,.86651,1,1,.79776,1.20562,1.18622,1.18622,1,1.1437,.67009,.96334,.93695,1.35191,1.40909,.95161,1.48387,.8675,.90861,.6192,.7363,.64824,.82411,.56321,.85696,1.23516,.8675,.81552,.7286,.84134,.73206,.76659,.86275,.84369,.90685,.77892,.85871,1.02638,.89249,.75828,.84118,.85984,.77452,.76466,.79776,.7306,.90782,.77818,.903,.87291,.90685,.7306,.99058,1.03667,.94635,1.23516,.9849,.99058,.92393,.8916,.942,1.03667,.75026,.94635,1.0297,1.23516,.90918,.94048,.98217,.89746,.84153,.92274,.82507,.88832,.84438,.88178,1.03525,.9849,1.00225,.78086,.97248,.89404,1.23516,.9849,.92274,.9849,.89404,.73206,1,1,1,1,1,1,1,1,1,1,1,1,.89693,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,1,1,1,1,1,1,1,1,1,1,.85865,1,1,1,1,1,1,1,1,1,1,1,1,.90933,1,1,1,1,1,1,.94309,.98986,.94309,.98986,.94309,.98986,.7306,.89453,1,1,.89552,.90527,1,.90186,1.12308,1.12308,1.12308,1.12308,1.2566,1.2566,1.2566,.89552,.89552,1.42259,.68994,1.03809,1,1,1.0176,1.0176,1.11523,1.4956,2.01462,.97858,.82616,.91133,.83437,.91133,1,1,1,.70508,1,1.23108,.79801,.84426,.84426,.774,.90572,1.81055,.90749,1.81055,1.28809,1.55469,.94434,1.07806,1,.97094,.7589,.85284,.90747,1.19658,.69825,.97622,1.33512,.90747,.90747,.85284,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,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,.99862,.99862,1,1,1,1,1,1.0336,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,1.05859,1.05859,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];t.CalibriItalicMetrics={lineHeight:1.2207,lineGap:.2207};t.CalibriRegularFactors=[1.3877,1,1,1,1.17223,1.1293,.89552,.91133,.80395,1.02269,1.15601,.91056,.91056,1.2798,.85284,.89807,1,.90861,1.39016,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.96309,.96309,.85284,.85284,.85284,.83319,.88071,.8675,.81552,.73834,.85193,.73206,.7522,.81105,.86275,.90685,.6377,.77892,.75593,1.02638,.89385,.85122,.77452,.86503,.75186,.68887,.79776,.88844,.85066,.94258,.77818,.7306,.76659,1.10369,1.39016,1.10369,1.06139,.89552,.8739,.86128,.94469,.8457,.94469,.89464,1.09842,.84636,.94469,1.03297,1.07692,.90918,1.03297,.95897,.94469,.9482,.94469,.94469,1.04692,.78223,1.20562,.94469,.90332,.98986,.86621,.90527,.79004,.94152,1.77256,.94152,.85284,.97801,.89552,.91133,.89552,.91133,1.91729,.89552,1.17889,1.13254,1.08707,.92098,.85284,.68787,.71353,.84737,.90747,1.0088,1.0044,.87683,1,1.09091,1,.92229,.739,1.15642,.92098,.76288,.80504,.80972,.75859,.8675,.8675,.8675,.8675,.8675,.8675,.76318,.73834,.73206,.73206,.73206,.73206,.90685,.90685,.90685,.90685,.86477,.89385,.85122,.85122,.85122,.85122,.85122,.85284,.85311,.88844,.88844,.88844,.88844,.7306,.77452,.86331,.86128,.86128,.86128,.86128,.86128,.86128,.8693,.8457,.89464,.89464,.89464,.89464,.82601,.82601,.82601,.82601,.94469,.94469,.9482,.9482,.9482,.9482,.9482,.90747,.86651,.94469,.94469,.94469,.94469,.90527,.94469,.90527,.8675,.86128,.8675,.86128,.8675,.86128,.73834,.8457,.73834,.8457,.73834,.8457,.73834,.8457,.85193,.92454,.86477,.9921,.73206,.89464,.73206,.89464,.73206,.89464,.73206,.89464,.73206,.89464,.81105,.84636,.81105,.84636,.81105,.84636,1,1,.86275,.94469,.90872,.95786,.90685,.82601,.90685,.82601,.90685,.82601,.90685,1.03297,.90685,.82601,.77741,1.05611,.6377,1.07692,1,1,.90918,.75593,1.03297,1,1,.76032,.90452,.98156,1.11842,.77261,1.11429,.89385,.94469,1,1,.89385,.94469,.95877,.86901,.94469,.85122,.9482,.85122,.9482,.85122,.9482,.8667,.90016,.75186,1.04692,1,1,.75186,1.04692,.68887,.78223,.68887,.78223,.68887,.78223,.68887,.78223,1,1,.79776,.92188,.79776,1.23023,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.94258,.98986,.7306,.90527,.7306,.76659,.79004,.76659,.79004,.76659,.79004,1.09231,.54873,.8675,.86128,.76318,.8693,.85311,.86651,1,1,.79776,1.20562,1.18622,1.18622,1,1.1437,.67742,.96334,.93695,1.35191,1.40909,.95161,1.48387,.86686,.90861,.62267,.74359,.65649,.85498,.56963,.88254,1.23516,.8675,.81552,.75443,.84503,.73206,.76659,.86275,.85122,.90685,.77892,.85746,1.02638,.89385,.75657,.85122,.86275,.77452,.74171,.79776,.7306,.95165,.77818,.89772,.88831,.90685,.7306,.98142,1.02191,.96576,1.23516,.99018,.98142,.9236,.89258,.94035,1.02191,.78848,.96576,.9561,1.23516,.90918,.92578,.95424,.89746,.83969,.9482,.80113,.89442,.85208,.86155,.98022,.99018,1.00452,.81209,.99247,.89181,1.23516,.99018,.9482,.99018,.89181,.73206,1,1,1,1,1,1,1,1,1,1,1,1,.88844,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,1,1,1,1,1,1,1,1,1,1,.89464,1,1,1,1,1,1,1,1,1,1,1,1,.96766,1,1,1,1,1,1,.94258,.98986,.94258,.98986,.94258,.98986,.7306,.90527,1,1,.89552,.90527,1,.90186,1.12308,1.12308,1.12308,1.12308,1.2566,1.2566,1.2566,.89552,.89552,1.42259,.69043,1.03809,1,1,1.0176,1.0176,1.11523,1.4956,2.01462,.99331,.82616,.91133,.84286,.91133,1,1,1,.70508,1,1.23108,.79801,.84426,.84426,.774,.90527,1.81055,.90527,1.81055,1.28809,1.55469,.94434,1.07806,1,.97094,.7589,.85284,.90747,1.19658,.69825,.97622,1.33512,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,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,.99862,.99862,1,1,1,1,1,1.0336,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,1.05859,1.05859,1,1,1,1.07185,.99413,.96334,1.08065,1,1,1,1,1,1,1,1,1,1,1];t.CalibriRegularMetrics={lineHeight:1.2207,lineGap:.2207}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.HelveticaRegularMetrics=t.HelveticaRegularFactors=t.HelveticaItalicMetrics=t.HelveticaItalicFactors=t.HelveticaBoldMetrics=t.HelveticaBoldItalicMetrics=t.HelveticaBoldItalicFactors=t.HelveticaBoldFactors=void 0;t.HelveticaBoldFactors=[.76116,1,1,1.0006,.99998,.99974,.99973,.99973,.99982,.99977,1.00087,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99998,1,1.00003,1.00003,1.00003,1.00026,.9999,.99977,.99977,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,.99973,.99977,1.00026,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,.99998,1.0006,.99998,1.00003,.99973,.99998,.99973,1.00026,.99973,1.00026,.99973,.99998,1.00026,1.00026,1.0006,1.0006,.99973,1.0006,.99982,1.00026,1.00026,1.00026,1.00026,.99959,.99973,.99998,1.00026,.99973,1.00022,.99973,.99973,1,.99959,1.00077,.99959,1.00003,.99998,.99973,.99973,.99973,.99973,1.00077,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.99973,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,.99977,.99977,.99977,.99977,.99977,.99977,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,.99973,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.06409,1.00026,1.00026,1.00026,1.00026,1.00026,.99973,1.00026,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,1.03374,.99977,1.00026,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,.99977,1.00026,.99977,1.00026,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.00042,.99973,.99973,1.0006,.99977,.99973,.99973,1.00026,1.0006,1.00026,1.0006,1.00026,1.03828,1.00026,.99999,1.00026,1.0006,.99977,1.00026,.99977,1.00026,.99977,1.00026,.9993,.9998,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1,1.00016,.99977,.99959,.99977,.99959,.99977,.99959,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00026,.99998,1.00026,.8121,1.00026,.99998,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,1.00016,1.00022,1.00001,.99973,1.00001,1.00026,1,1.00026,1,1.00026,1,1.0006,.99973,.99977,.99973,1,.99982,1.00022,1.00026,1.00001,.99973,1.00026,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,1.00034,.99977,1,.99997,1.00026,1.00078,1.00036,.99973,1.00013,1.0006,.99977,.99977,.99988,.85148,1.00001,1.00026,.99977,1.00022,1.0006,.99977,1.00001,.99999,.99977,1.00069,1.00022,.99977,1.00001,.99984,1.00026,1.00001,1.00024,1.00001,.9999,1,1.0006,1.00001,1.00041,.99962,1.00026,1.0006,.99995,1.00041,.99942,.99973,.99927,1.00082,.99902,1.00026,1.00087,1.0006,1.00069,.99973,.99867,.99973,.9993,1.00026,1.00049,1.00056,1,.99988,.99935,.99995,.99954,1.00055,.99945,1.00032,1.0006,.99995,1.00026,.99995,1.00032,1.00001,1.00008,.99971,1.00019,.9994,1.00001,1.0006,1.00044,.99973,1.00023,1.00047,1,.99942,.99561,.99989,1.00035,.99977,1.00035,.99977,1.00019,.99944,1.00001,1.00021,.99926,1.00035,1.00035,.99942,1.00048,.99999,.99977,1.00022,1.00035,1.00001,.99977,1.00026,.99989,1.00057,1.00001,.99936,1.00052,1.00012,.99996,1.00043,1,1.00035,.9994,.99976,1.00035,.99973,1.00052,1.00041,1.00119,1.00037,.99973,1.00002,.99986,1.00041,1.00041,.99902,.9996,1.00034,.99999,1.00026,.99999,1.00026,.99973,1.00052,.99973,1,.99973,1.00041,1.00075,.9994,1.0003,.99999,1,1.00041,.99955,1,.99915,.99973,.99973,1.00026,1.00119,.99955,.99973,1.0006,.99911,1.0006,1.00026,.99972,1.00026,.99902,1.00041,.99973,.99999,1,1,1.00038,1.0005,1.00016,1.00022,1.00016,1.00022,1.00016,1.00022,1.00001,.99973,1,1,.99973,1,1,.99955,1.0006,1.0006,1.0006,1.0006,1,1,1,.99973,.99973,.99972,1,1,1.00106,.99999,.99998,.99998,.99999,.99998,1.66475,1,.99973,.99973,1.00023,.99973,.99971,1.00047,1.00023,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1,1,1,1,1,1,1,.99972,1,1.20985,1.39713,1.00003,1.00031,1.00015,1,.99561,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.99972,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1];t.HelveticaBoldMetrics={lineHeight:1.2,lineGap:.2};t.HelveticaBoldItalicFactors=[.76116,1,1,1.0006,.99998,.99974,.99973,.99973,.99982,.99977,1.00087,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99998,1,1.00003,1.00003,1.00003,1.00026,.9999,.99977,.99977,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,.99973,.99977,1.00026,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,.99998,1.0006,.99998,1.00003,.99973,.99998,.99973,1.00026,.99973,1.00026,.99973,.99998,1.00026,1.00026,1.0006,1.0006,.99973,1.0006,.99982,1.00026,1.00026,1.00026,1.00026,.99959,.99973,.99998,1.00026,.99973,1.00022,.99973,.99973,1,.99959,1.00077,.99959,1.00003,.99998,.99973,.99973,.99973,.99973,1.00077,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.99973,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,.99977,.99977,.99977,.99977,.99977,.99977,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,.99973,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.06409,1.00026,1.00026,1.00026,1.00026,1.00026,.99973,1.00026,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,1.0044,.99977,1.00026,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,.99977,1.00026,.99977,1.00026,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99971,.99973,.99973,1.0006,.99977,.99973,.99973,1.00026,1.0006,1.00026,1.0006,1.00026,1.01011,1.00026,.99999,1.00026,1.0006,.99977,1.00026,.99977,1.00026,.99977,1.00026,.9993,.9998,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1,1.00016,.99977,.99959,.99977,.99959,.99977,.99959,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00026,.99998,1.00026,.8121,1.00026,.99998,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,1.00016,1.00022,1.00001,.99973,1.00001,1.00026,1,1.00026,1,1.00026,1,1.0006,.99973,.99977,.99973,1,.99982,1.00022,1.00026,1.00001,.99973,1.00026,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99977,1,1,1.00026,.99969,.99972,.99981,.9998,1.0006,.99977,.99977,1.00022,.91155,1.00001,1.00026,.99977,1.00022,1.0006,.99977,1.00001,.99999,.99977,.99966,1.00022,1.00032,1.00001,.99944,1.00026,1.00001,.99968,1.00001,1.00047,1,1.0006,1.00001,.99981,1.00101,1.00026,1.0006,.99948,.99981,1.00064,.99973,.99942,1.00101,1.00061,1.00026,1.00069,1.0006,1.00014,.99973,1.01322,.99973,1.00065,1.00026,1.00012,.99923,1,1.00064,1.00076,.99948,1.00055,1.00063,1.00007,.99943,1.0006,.99948,1.00026,.99948,.99943,1.00001,1.00001,1.00029,1.00038,1.00035,1.00001,1.0006,1.0006,.99973,.99978,1.00001,1.00057,.99989,.99967,.99964,.99967,.99977,.99999,.99977,1.00038,.99977,1.00001,.99973,1.00066,.99967,.99967,1.00041,.99998,.99999,.99977,1.00022,.99967,1.00001,.99977,1.00026,.99964,1.00031,1.00001,.99999,.99999,1,1.00023,1,1,.99999,1.00035,1.00001,.99999,.99973,.99977,.99999,1.00058,.99973,.99973,.99955,.9995,1.00026,1.00026,1.00032,.99989,1.00034,.99999,1.00026,1.00026,1.00026,.99973,.45998,.99973,1.00026,.99973,1.00001,.99999,.99982,.99994,.99996,1,1.00042,1.00044,1.00029,1.00023,.99973,.99973,1.00026,.99949,1.00002,.99973,1.0006,1.0006,1.0006,.99975,1.00026,1.00026,1.00032,.98685,.99973,1.00026,1,1,.99966,1.00044,1.00016,1.00022,1.00016,1.00022,1.00016,1.00022,1.00001,.99973,1,1,.99973,1,1,.99955,1.0006,1.0006,1.0006,1.0006,1,1,1,.99973,.99973,.99972,1,1,1.00106,.99999,.99998,.99998,.99999,.99998,1.66475,1,.99973,.99973,1,.99973,.99971,.99978,1,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1.00098,1,1,1,1.00049,1,1,.99972,1,1.20985,1.39713,1.00003,1.00031,1.00015,1,.99561,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.99972,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1];t.HelveticaBoldItalicMetrics={lineHeight:1.35,lineGap:.2};t.HelveticaItalicFactors=[.76116,1,1,1.0006,1.0006,1.00006,.99973,.99973,.99982,1.00001,1.00043,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.0006,1,1.00003,1.00003,1.00003,.99973,.99987,1.00001,1.00001,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,1,1.00001,.99973,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,1.0006,1.0006,1.0006,.99949,.99973,.99998,.99973,.99973,1,.99973,.99973,1.0006,.99973,.99973,.99924,.99924,1,.99924,.99999,.99973,.99973,.99973,.99973,.99998,1,1.0006,.99973,1,.99977,1,1,1,1.00005,1.0009,1.00005,1.00003,.99998,.99973,.99973,.99973,.99973,1.0009,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.9998,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,1.00001,1.00001,1.00001,1.00001,1.00001,1.00001,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,1,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.06409,1.00026,.99973,.99973,.99973,.99973,1,.99973,1,1.00001,.99973,1.00001,.99973,1.00001,.99973,.99977,1,.99977,1,.99977,1,.99977,1,.99977,1.0288,.99977,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,.99977,.99973,.99977,.99973,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99924,1.0006,1.0006,.99946,1.00034,1,.99924,1.00001,1,1,.99973,.99924,.99973,.99924,.99973,1.06311,.99973,1.00024,.99973,.99924,.99977,.99973,.99977,.99973,.99977,.99973,1.00041,.9998,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1,1.00016,.99977,.99998,.99977,.99998,.99977,.99998,1.00001,1,1.00001,1,1.00001,1,1.00001,1,1.00026,1.0006,1.00026,.89547,1.00026,1.0006,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,1.00016,.99977,1.00001,1,1.00001,1.00026,1,1.00026,1,1.00026,1,.99924,.99973,1.00001,.99973,1,.99982,1.00022,1.00026,1.00001,1,1.00026,1.0006,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,1.00001,1,1.00054,.99977,1.00084,1.00007,.99973,1.00013,.99924,1.00001,1.00001,.99945,.91221,1.00001,1.00026,.99977,1.00022,1.0006,1.00001,1.00001,.99999,.99977,.99933,1.00022,1.00054,1.00001,1.00065,1.00026,1.00001,1.0001,1.00001,1.00052,1,1.0006,1.00001,.99945,.99897,.99968,.99924,1.00036,.99945,.99949,1,1.0006,.99897,.99918,.99968,.99911,.99924,1,.99962,1.01487,1,1.0005,.99973,1.00012,1.00043,1,.99995,.99994,1.00036,.99947,1.00019,1.00063,1.00025,.99924,1.00036,.99973,1.00036,1.00025,1.00001,1.00001,1.00027,1.0001,1.00068,1.00001,1.0006,1.0006,1,1.00008,.99957,.99972,.9994,.99954,.99975,1.00051,1.00001,1.00019,1.00001,1.0001,.99986,1.00001,1.00001,1.00038,.99954,.99954,.9994,1.00066,.99999,.99977,1.00022,1.00054,1.00001,.99977,1.00026,.99975,1.0001,1.00001,.99993,.9995,.99955,1.00016,.99978,.99974,1.00019,1.00022,.99955,1.00053,.99973,1.00089,1.00005,.99967,1.00048,.99973,1.00002,1.00034,.99973,.99973,.99964,1.00006,1.00066,.99947,.99973,.98894,.99973,1,.44898,1,.99946,1,1.00039,1.00082,.99991,.99991,.99985,1.00022,1.00023,1.00061,1.00006,.99966,.99973,.99973,.99973,1.00019,1.0008,1,.99924,.99924,.99924,.99983,1.00044,.99973,.99964,.98332,1,.99973,1,1,.99962,.99895,1.00016,.99977,1.00016,.99977,1.00016,.99977,1.00001,1,1,1,.99973,1,1,.99955,.99924,.99924,.99924,.99924,.99998,.99998,.99998,.99973,.99973,.99972,1,1,1.00267,.99999,.99998,.99998,1,.99998,1.66475,1,.99973,.99973,1.00023,.99973,1.00423,.99925,.99999,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1.00049,1,1.00245,1,1,1,1,.96329,1,1.20985,1.39713,1.00003,.8254,1.00015,1,1.00035,1.00027,1.00031,1.00031,1.00003,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.95317,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1];t.HelveticaItalicMetrics={lineHeight:1.35,lineGap:.2};t.HelveticaRegularFactors=[.76116,1,1,1.0006,1.0006,1.00006,.99973,.99973,.99982,1.00001,1.00043,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.0006,1,1.00003,1.00003,1.00003,.99973,.99987,1.00001,1.00001,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,1,1.00001,.99973,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,1.0006,1.0006,1.0006,.99949,.99973,.99998,.99973,.99973,1,.99973,.99973,1.0006,.99973,.99973,.99924,.99924,1,.99924,.99999,.99973,.99973,.99973,.99973,.99998,1,1.0006,.99973,1,.99977,1,1,1,1.00005,1.0009,1.00005,1.00003,.99998,.99973,.99973,.99973,.99973,1.0009,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.9998,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,1.00001,1.00001,1.00001,1.00001,1.00001,1.00001,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,1,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.06409,1.00026,.99973,.99973,.99973,.99973,1,.99973,1,1.00001,.99973,1.00001,.99973,1.00001,.99973,.99977,1,.99977,1,.99977,1,.99977,1,.99977,1.04596,.99977,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,.99977,.99973,.99977,.99973,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99924,1.0006,1.0006,1.00019,1.00034,1,.99924,1.00001,1,1,.99973,.99924,.99973,.99924,.99973,1.02572,.99973,1.00005,.99973,.99924,.99977,.99973,.99977,.99973,.99977,.99973,.99999,.9998,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1,1.00016,.99977,.99998,.99977,.99998,.99977,.99998,1.00001,1,1.00001,1,1.00001,1,1.00001,1,1.00026,1.0006,1.00026,.84533,1.00026,1.0006,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,1.00016,.99977,1.00001,1,1.00001,1.00026,1,1.00026,1,1.00026,1,.99924,.99973,1.00001,.99973,1,.99982,1.00022,1.00026,1.00001,1,1.00026,1.0006,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99928,1,.99977,1.00013,1.00055,.99947,.99945,.99941,.99924,1.00001,1.00001,1.0004,.91621,1.00001,1.00026,.99977,1.00022,1.0006,1.00001,1.00005,.99999,.99977,1.00015,1.00022,.99977,1.00001,.99973,1.00026,1.00001,1.00019,1.00001,.99946,1,1.0006,1.00001,.99978,1.00045,.99973,.99924,1.00023,.99978,.99966,1,1.00065,1.00045,1.00019,.99973,.99973,.99924,1,1,.96499,1,1.00055,.99973,1.00008,1.00027,1,.9997,.99995,1.00023,.99933,1.00019,1.00015,1.00031,.99924,1.00023,.99973,1.00023,1.00031,1.00001,.99928,1.00029,1.00092,1.00035,1.00001,1.0006,1.0006,1,.99988,.99975,1,1.00082,.99561,.9996,1.00035,1.00001,.99962,1.00001,1.00092,.99964,1.00001,.99963,.99999,1.00035,1.00035,1.00082,.99962,.99999,.99977,1.00022,1.00035,1.00001,.99977,1.00026,.9996,.99967,1.00001,1.00034,1.00074,1.00054,1.00053,1.00063,.99971,.99962,1.00035,.99975,.99977,.99973,1.00043,.99953,1.0007,.99915,.99973,1.00008,.99892,1.00073,1.00073,1.00114,.99915,1.00073,.99955,.99973,1.00092,.99973,1,.99998,1,1.0003,1,1.00043,1.00001,.99969,1.0003,1,1.00035,1.00001,.9995,1,1.00092,.99973,.99973,.99973,1.0007,.9995,1,.99924,1.0006,.99924,.99972,1.00062,.99973,1.00114,1.00073,1,.99955,1,1,1.00047,.99968,1.00016,.99977,1.00016,.99977,1.00016,.99977,1.00001,1,1,1,.99973,1,1,.99955,.99924,.99924,.99924,.99924,.99998,.99998,.99998,.99973,.99973,.99972,1,1,1.00267,.99999,.99998,.99998,1,.99998,1.66475,1,.99973,.99973,1.00023,.99973,.99971,.99925,1.00023,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1,1,1,1,1,1,1,.96329,1,1.20985,1.39713,1.00003,.8254,1.00015,1,1.00035,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.95317,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];t.HelveticaRegularMetrics={lineHeight:1.2,lineGap:.2}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.LiberationSansRegularWidths=t.LiberationSansRegularMapping=t.LiberationSansItalicWidths=t.LiberationSansItalicMapping=t.LiberationSansBoldWidths=t.LiberationSansBoldMapping=t.LiberationSansBoldItalicWidths=t.LiberationSansBoldItalicMapping=void 0;t.LiberationSansBoldWidths=[365,0,333,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,333,556,556,556,556,280,556,333,737,370,556,584,737,552,400,549,333,333,333,576,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,549,611,611,611,611,611,556,611,556,722,556,722,556,722,556,722,556,722,556,722,556,722,556,722,719,722,611,667,556,667,556,667,556,667,556,667,556,778,611,778,611,778,611,778,611,722,611,722,611,278,278,278,278,278,278,278,278,278,278,785,556,556,278,722,556,556,611,278,611,278,611,385,611,479,611,278,722,611,722,611,722,611,708,723,611,778,611,778,611,778,611,1e3,944,722,389,722,389,722,389,667,556,667,556,667,556,667,556,611,333,611,479,611,333,722,611,722,611,722,611,722,611,722,611,722,611,944,778,667,556,667,611,500,611,500,611,500,278,556,722,556,1e3,889,778,611,667,556,611,333,333,333,333,333,333,333,333,333,333,333,465,722,333,853,906,474,825,927,838,278,722,722,601,719,667,611,722,778,278,722,667,833,722,644,778,722,667,600,611,667,821,667,809,802,278,667,615,451,611,278,582,615,610,556,606,475,460,611,541,278,558,556,612,556,445,611,766,619,520,684,446,582,715,576,753,845,278,582,611,582,845,667,669,885,567,711,667,278,276,556,1094,1062,875,610,722,622,719,722,719,722,567,712,667,904,626,719,719,610,702,833,722,778,719,667,722,611,622,854,667,730,703,1005,1019,870,979,719,711,1031,719,556,618,615,417,635,556,709,497,615,615,500,635,740,604,611,604,611,556,490,556,875,556,615,581,833,844,729,854,615,552,854,583,556,556,611,417,552,556,278,281,278,969,906,611,500,615,556,604,778,611,487,447,944,778,944,778,944,778,667,556,333,333,556,1e3,1e3,552,278,278,278,278,500,500,500,556,556,350,1e3,1e3,240,479,333,333,604,333,167,396,556,556,1094,556,885,489,1115,1e3,768,600,834,834,834,834,1e3,500,1e3,500,1e3,500,500,494,612,823,713,584,549,713,979,722,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,611,611,333,333,333,333,333,333,333,333,222,222,333,333,333,333,333,333,333,333];t.LiberationSansBoldMapping=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];t.LiberationSansBoldItalicWidths=[365,0,333,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,333,556,556,556,556,280,556,333,737,370,556,584,737,552,400,549,333,333,333,576,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,549,611,611,611,611,611,556,611,556,722,556,722,556,722,556,722,556,722,556,722,556,722,556,722,740,722,611,667,556,667,556,667,556,667,556,667,556,778,611,778,611,778,611,778,611,722,611,722,611,278,278,278,278,278,278,278,278,278,278,782,556,556,278,722,556,556,611,278,611,278,611,396,611,479,611,278,722,611,722,611,722,611,708,723,611,778,611,778,611,778,611,1e3,944,722,389,722,389,722,389,667,556,667,556,667,556,667,556,611,333,611,479,611,333,722,611,722,611,722,611,722,611,722,611,722,611,944,778,667,556,667,611,500,611,500,611,500,278,556,722,556,1e3,889,778,611,667,556,611,333,333,333,333,333,333,333,333,333,333,333,333,722,333,854,906,473,844,930,847,278,722,722,610,671,667,611,722,778,278,722,667,833,722,657,778,718,667,590,611,667,822,667,829,781,278,667,620,479,611,278,591,620,621,556,610,479,492,611,558,278,566,556,603,556,450,611,712,605,532,664,409,591,704,578,773,834,278,591,611,591,834,667,667,886,614,719,667,278,278,556,1094,1042,854,622,719,677,719,722,708,722,614,722,667,927,643,719,719,615,687,833,722,778,719,667,722,611,677,781,667,729,708,979,989,854,1e3,708,719,1042,729,556,619,604,534,618,556,736,510,611,611,507,622,740,604,611,611,611,556,889,556,885,556,646,583,889,935,707,854,594,552,865,589,556,556,611,469,563,556,278,278,278,969,906,611,507,619,556,611,778,611,575,467,944,778,944,778,944,778,667,556,333,333,556,1e3,1e3,552,278,278,278,278,500,500,500,556,556,350,1e3,1e3,240,479,333,333,604,333,167,396,556,556,1104,556,885,516,1146,1e3,768,600,834,834,834,834,999,500,1e3,500,1e3,500,500,494,612,823,713,584,549,713,979,722,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,611,611,333,333,333,333,333,333,333,333,222,222,333,333,333,333,333,333,333,333];t.LiberationSansBoldItalicMapping=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];t.LiberationSansItalicWidths=[365,0,333,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,333,556,556,556,556,260,556,333,737,370,556,584,737,552,400,549,333,333,333,576,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,549,611,556,556,556,556,500,556,500,667,556,667,556,667,556,722,500,722,500,722,500,722,500,722,625,722,556,667,556,667,556,667,556,667,556,667,556,778,556,778,556,778,556,778,556,722,556,722,556,278,278,278,278,278,278,278,222,278,278,733,444,500,222,667,500,500,556,222,556,222,556,281,556,400,556,222,722,556,722,556,722,556,615,723,556,778,556,778,556,778,556,1e3,944,722,333,722,333,722,333,667,500,667,500,667,500,667,500,611,278,611,354,611,278,722,556,722,556,722,556,722,556,722,556,722,556,944,722,667,500,667,611,500,611,500,611,500,222,556,667,556,1e3,889,778,611,667,500,611,278,333,333,333,333,333,333,333,333,333,333,333,667,278,789,846,389,794,865,775,222,667,667,570,671,667,611,722,778,278,667,667,833,722,648,778,725,667,600,611,667,837,667,831,761,278,667,570,439,555,222,550,570,571,500,556,439,463,555,542,222,500,492,548,500,447,556,670,573,486,603,374,550,652,546,728,779,222,550,556,550,779,667,667,843,544,708,667,278,278,500,1066,982,844,589,715,639,724,667,651,667,544,704,667,917,614,715,715,589,686,833,722,778,725,667,722,611,639,795,667,727,673,920,923,805,886,651,694,1022,682,556,562,522,493,553,556,688,465,556,556,472,564,686,550,556,556,556,500,833,500,835,500,572,518,830,851,621,736,526,492,752,534,556,556,556,378,496,500,222,222,222,910,828,556,472,565,500,556,778,556,492,339,944,722,944,722,944,722,667,500,333,333,556,1e3,1e3,552,222,222,222,222,333,333,333,556,556,350,1e3,1e3,188,354,333,333,500,333,167,365,556,556,1094,556,885,323,1083,1e3,768,600,834,834,834,834,1e3,500,998,500,1e3,500,500,494,612,823,713,584,549,713,979,719,274,549,549,584,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,500,500,333,333,333,333,333,333,333,333,222,222,294,294,324,324,316,328,398,285];t.LiberationSansItalicMapping=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];t.LiberationSansRegularWidths=[365,0,333,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,333,556,556,556,556,260,556,333,737,370,556,584,737,552,400,549,333,333,333,576,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,549,611,556,556,556,556,500,556,500,667,556,667,556,667,556,722,500,722,500,722,500,722,500,722,615,722,556,667,556,667,556,667,556,667,556,667,556,778,556,778,556,778,556,778,556,722,556,722,556,278,278,278,278,278,278,278,222,278,278,735,444,500,222,667,500,500,556,222,556,222,556,292,556,334,556,222,722,556,722,556,722,556,604,723,556,778,556,778,556,778,556,1e3,944,722,333,722,333,722,333,667,500,667,500,667,500,667,500,611,278,611,375,611,278,722,556,722,556,722,556,722,556,722,556,722,556,944,722,667,500,667,611,500,611,500,611,500,222,556,667,556,1e3,889,778,611,667,500,611,278,333,333,333,333,333,333,333,333,333,333,333,667,278,784,838,384,774,855,752,222,667,667,551,668,667,611,722,778,278,667,668,833,722,650,778,722,667,618,611,667,798,667,835,748,278,667,578,446,556,222,547,578,575,500,557,446,441,556,556,222,500,500,576,500,448,556,690,569,482,617,395,547,648,525,713,781,222,547,556,547,781,667,667,865,542,719,667,278,278,500,1057,1010,854,583,722,635,719,667,656,667,542,677,667,923,604,719,719,583,656,833,722,778,719,667,722,611,635,760,667,740,667,917,938,792,885,656,719,1010,722,556,573,531,365,583,556,669,458,559,559,438,583,688,552,556,542,556,500,458,500,823,500,573,521,802,823,625,719,521,510,750,542,556,556,556,365,510,500,222,278,222,906,812,556,438,559,500,552,778,556,489,411,944,722,944,722,944,722,667,500,333,333,556,1e3,1e3,552,222,222,222,222,333,333,333,556,556,350,1e3,1e3,188,354,333,333,500,333,167,365,556,556,1094,556,885,323,1073,1e3,768,600,834,834,834,834,1e3,500,1e3,500,1e3,500,500,494,612,823,713,584,549,713,979,719,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,500,500,333,333,333,333,333,333,333,333,222,222,294,294,324,324,316,328,398,285];t.LiberationSansRegularMapping=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.MyriadProRegularMetrics=t.MyriadProRegularFactors=t.MyriadProItalicMetrics=t.MyriadProItalicFactors=t.MyriadProBoldMetrics=t.MyriadProBoldItalicMetrics=t.MyriadProBoldItalicFactors=t.MyriadProBoldFactors=void 0;t.MyriadProBoldFactors=[1.36898,1,1,.72706,.80479,.83734,.98894,.99793,.9897,.93884,.86209,.94292,.94292,1.16661,1.02058,.93582,.96694,.93582,1.19137,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.78076,.78076,1.02058,1.02058,1.02058,.72851,.78966,.90838,.83637,.82391,.96376,.80061,.86275,.8768,.95407,1.0258,.73901,.85022,.83655,1.0156,.95546,.92179,.87107,.92179,.82114,.8096,.89713,.94438,.95353,.94083,.91905,.90406,.9446,.94292,1.18777,.94292,1.02058,.89903,.90088,.94938,.97898,.81093,.97571,.94938,1.024,.9577,.95933,.98621,1.0474,.97455,.98981,.9672,.95933,.9446,.97898,.97407,.97646,.78036,1.10208,.95442,.95298,.97579,.9332,.94039,.938,.80687,1.01149,.80687,1.02058,.80479,.99793,.99793,.99793,.99793,1.01149,1.00872,.90088,.91882,1.0213,.8361,1.02058,.62295,.54324,.89022,1.08595,1,1,.90088,1,.97455,.93582,.90088,1,1.05686,.8361,.99642,.99642,.99642,.72851,.90838,.90838,.90838,.90838,.90838,.90838,.868,.82391,.80061,.80061,.80061,.80061,1.0258,1.0258,1.0258,1.0258,.97484,.95546,.92179,.92179,.92179,.92179,.92179,1.02058,.92179,.94438,.94438,.94438,.94438,.90406,.86958,.98225,.94938,.94938,.94938,.94938,.94938,.94938,.9031,.81093,.94938,.94938,.94938,.94938,.98621,.98621,.98621,.98621,.93969,.95933,.9446,.9446,.9446,.9446,.9446,1.08595,.9446,.95442,.95442,.95442,.95442,.94039,.97898,.94039,.90838,.94938,.90838,.94938,.90838,.94938,.82391,.81093,.82391,.81093,.82391,.81093,.82391,.81093,.96376,.84313,.97484,.97571,.80061,.94938,.80061,.94938,.80061,.94938,.80061,.94938,.80061,.94938,.8768,.9577,.8768,.9577,.8768,.9577,1,1,.95407,.95933,.97069,.95933,1.0258,.98621,1.0258,.98621,1.0258,.98621,1.0258,.98621,1.0258,.98621,.887,1.01591,.73901,1.0474,1,1,.97455,.83655,.98981,1,1,.83655,.73977,.83655,.73903,.84638,1.033,.95546,.95933,1,1,.95546,.95933,.8271,.95417,.95933,.92179,.9446,.92179,.9446,.92179,.9446,.936,.91964,.82114,.97646,1,1,.82114,.97646,.8096,.78036,.8096,.78036,1,1,.8096,.78036,1,1,.89713,.77452,.89713,1.10208,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94083,.97579,.90406,.94039,.90406,.9446,.938,.9446,.938,.9446,.938,1,.99793,.90838,.94938,.868,.9031,.92179,.9446,1,1,.89713,1.10208,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90989,.9358,.91945,.83181,.75261,.87992,.82976,.96034,.83689,.97268,1.0078,.90838,.83637,.8019,.90157,.80061,.9446,.95407,.92436,1.0258,.85022,.97153,1.0156,.95546,.89192,.92179,.92361,.87107,.96318,.89713,.93704,.95638,.91905,.91709,.92796,1.0258,.93704,.94836,1.0373,.95933,1.0078,.95871,.94836,.96174,.92601,.9498,.98607,.95776,.95933,1.05453,1.0078,.98275,.9314,.95617,.91701,1.05993,.9446,.78367,.9553,1,.86832,1.0128,.95871,.99394,.87548,.96361,.86774,1.0078,.95871,.9446,.95871,.86774,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,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,.94083,.97579,.94083,.97579,.94083,.97579,.90406,.94039,.96694,1,.89903,1,1,1,.93582,.93582,.93582,1,.908,.908,.918,.94219,.94219,.96544,1,1.285,1,1,.81079,.81079,1,1,.74854,1,1,1,1,.99793,1,1,1,.65,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.17173,1,.80535,.76169,1.02058,1.0732,1.05486,1,1,1.30692,1.08595,1.08595,1,1.08595,1.08595,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,1,1,1,1,1,1.16161,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];t.MyriadProBoldMetrics={lineHeight:1.2,lineGap:.2};t.MyriadProBoldItalicFactors=[1.36898,1,1,.66227,.80779,.81625,.97276,.97276,.97733,.92222,.83266,.94292,.94292,1.16148,1.02058,.93582,.96694,.93582,1.17337,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.78076,.78076,1.02058,1.02058,1.02058,.71541,.76813,.85576,.80591,.80729,.94299,.77512,.83655,.86523,.92222,.98621,.71743,.81698,.79726,.98558,.92222,.90637,.83809,.90637,.80729,.76463,.86275,.90699,.91605,.9154,.85308,.85458,.90531,.94292,1.21296,.94292,1.02058,.89903,1.18616,.99613,.91677,.78216,.91677,.90083,.98796,.9135,.92168,.95381,.98981,.95298,.95381,.93459,.92168,.91513,.92004,.91677,.95077,.748,1.04502,.91677,.92061,.94236,.89544,.89364,.9,.80687,.8578,.80687,1.02058,.80779,.97276,.97276,.97276,.97276,.8578,.99973,1.18616,.91339,1.08074,.82891,1.02058,.55509,.71526,.89022,1.08595,1,1,1.18616,1,.96736,.93582,1.18616,1,1.04864,.82711,.99043,.99043,.99043,.71541,.85576,.85576,.85576,.85576,.85576,.85576,.845,.80729,.77512,.77512,.77512,.77512,.98621,.98621,.98621,.98621,.95961,.92222,.90637,.90637,.90637,.90637,.90637,1.02058,.90251,.90699,.90699,.90699,.90699,.85458,.83659,.94951,.99613,.99613,.99613,.99613,.99613,.99613,.85811,.78216,.90083,.90083,.90083,.90083,.95381,.95381,.95381,.95381,.9135,.92168,.91513,.91513,.91513,.91513,.91513,1.08595,.91677,.91677,.91677,.91677,.91677,.89364,.92332,.89364,.85576,.99613,.85576,.99613,.85576,.99613,.80729,.78216,.80729,.78216,.80729,.78216,.80729,.78216,.94299,.76783,.95961,.91677,.77512,.90083,.77512,.90083,.77512,.90083,.77512,.90083,.77512,.90083,.86523,.9135,.86523,.9135,.86523,.9135,1,1,.92222,.92168,.92222,.92168,.98621,.95381,.98621,.95381,.98621,.95381,.98621,.95381,.98621,.95381,.86036,.97096,.71743,.98981,1,1,.95298,.79726,.95381,1,1,.79726,.6894,.79726,.74321,.81691,1.0006,.92222,.92168,1,1,.92222,.92168,.79464,.92098,.92168,.90637,.91513,.90637,.91513,.90637,.91513,.909,.87514,.80729,.95077,1,1,.80729,.95077,.76463,.748,.76463,.748,1,1,.76463,.748,1,1,.86275,.72651,.86275,1.04502,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.9154,.94236,.85458,.89364,.85458,.90531,.9,.90531,.9,.90531,.9,1,.97276,.85576,.99613,.845,.85811,.90251,.91677,1,1,.86275,1.04502,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.00899,1.30628,.85576,.80178,.66862,.7927,.69323,.88127,.72459,.89711,.95381,.85576,.80591,.7805,.94729,.77512,.90531,.92222,.90637,.98621,.81698,.92655,.98558,.92222,.85359,.90637,.90976,.83809,.94523,.86275,.83509,.93157,.85308,.83392,.92346,.98621,.83509,.92886,.91324,.92168,.95381,.90646,.92886,.90557,.86847,.90276,.91324,.86842,.92168,.99531,.95381,.9224,.85408,.92699,.86847,1.0051,.91513,.80487,.93481,1,.88159,1.05214,.90646,.97355,.81539,.89398,.85923,.95381,.90646,.91513,.90646,.85923,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,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,.9154,.94236,.9154,.94236,.9154,.94236,.85458,.89364,.96694,1,.89903,1,1,1,.91782,.91782,.91782,1,.896,.896,.896,.9332,.9332,.95973,1,1.26,1,1,.80479,.80178,1,1,.85633,1,1,1,1,.97276,1,1,1,.698,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.14542,1,.79199,.78694,1.02058,1.03493,1.05486,1,1,1.23026,1.08595,1.08595,1,1.08595,1.08595,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,1,1,1,1,1,1.20006,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];t.MyriadProBoldItalicMetrics={lineHeight:1.2,lineGap:.2};t.MyriadProItalicFactors=[1.36898,1,1,.65507,.84943,.85639,.88465,.88465,.86936,.88307,.86948,.85283,.85283,1.06383,1.02058,.75945,.9219,.75945,1.17337,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.75945,.75945,1.02058,1.02058,1.02058,.69046,.70926,.85158,.77812,.76852,.89591,.70466,.76125,.80094,.86822,.83864,.728,.77212,.79475,.93637,.87514,.8588,.76013,.8588,.72421,.69866,.77598,.85991,.80811,.87832,.78112,.77512,.8562,1.0222,1.18417,1.0222,1.27014,.89903,1.15012,.93859,.94399,.846,.94399,.81453,1.0186,.94219,.96017,1.03075,1.02175,.912,1.03075,.96998,.96017,.93859,.94399,.94399,.95493,.746,1.12658,.94578,.91,.979,.882,.882,.83,.85034,.83537,.85034,1.02058,.70869,.88465,.88465,.88465,.88465,.83537,.90083,1.15012,.9161,.94565,.73541,1.02058,.53609,.69353,.79519,1.08595,1,1,1.15012,1,.91974,.75945,1.15012,1,.9446,.73361,.9005,.9005,.9005,.62864,.85158,.85158,.85158,.85158,.85158,.85158,.773,.76852,.70466,.70466,.70466,.70466,.83864,.83864,.83864,.83864,.90561,.87514,.8588,.8588,.8588,.8588,.8588,1.02058,.85751,.85991,.85991,.85991,.85991,.77512,.76013,.88075,.93859,.93859,.93859,.93859,.93859,.93859,.8075,.846,.81453,.81453,.81453,.81453,.82424,.82424,.82424,.82424,.9278,.96017,.93859,.93859,.93859,.93859,.93859,1.08595,.8562,.94578,.94578,.94578,.94578,.882,.94578,.882,.85158,.93859,.85158,.93859,.85158,.93859,.76852,.846,.76852,.846,.76852,.846,.76852,.846,.89591,.8544,.90561,.94399,.70466,.81453,.70466,.81453,.70466,.81453,.70466,.81453,.70466,.81453,.80094,.94219,.80094,.94219,.80094,.94219,1,1,.86822,.96017,.86822,.96017,.83864,.82424,.83864,.82424,.83864,.82424,.83864,1.03075,.83864,.82424,.81402,1.02738,.728,1.02175,1,1,.912,.79475,1.03075,1,1,.79475,.83911,.79475,.66266,.80553,1.06676,.87514,.96017,1,1,.87514,.96017,.86865,.87396,.96017,.8588,.93859,.8588,.93859,.8588,.93859,.867,.84759,.72421,.95493,1,1,.72421,.95493,.69866,.746,.69866,.746,1,1,.69866,.746,1,1,.77598,.88417,.77598,1.12658,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.87832,.979,.77512,.882,.77512,.8562,.83,.8562,.83,.8562,.83,1,.88465,.85158,.93859,.773,.8075,.85751,.8562,1,1,.77598,1.12658,1.15012,1.15012,1.15012,1.15012,1.15012,1.15313,1.15012,1.15012,1.15012,1.08106,1.03901,.85158,.77025,.62264,.7646,.65351,.86026,.69461,.89947,1.03075,.85158,.77812,.76449,.88836,.70466,.8562,.86822,.8588,.83864,.77212,.85308,.93637,.87514,.82352,.8588,.85701,.76013,.89058,.77598,.8156,.82565,.78112,.77899,.89386,.83864,.8156,.9486,.92388,.96186,1.03075,.91123,.9486,.93298,.878,.93942,.92388,.84596,.96186,.95119,1.03075,.922,.88787,.95829,.88,.93559,.93859,.78815,.93758,1,.89217,1.03737,.91123,.93969,.77487,.85769,.86799,1.03075,.91123,.93859,.91123,.86799,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,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,.87832,.979,.87832,.979,.87832,.979,.77512,.882,.9219,1,.89903,1,1,1,.87321,.87321,.87321,1,1.027,1.027,1.027,.86847,.86847,.79121,1,1.124,1,1,.73572,.73572,1,1,.85034,1,1,1,1,.88465,1,1,1,.669,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.04828,1,.74948,.75187,1.02058,.98391,1.02119,1,1,1.06233,1.08595,1.08595,1,1.08595,1.08595,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,1,1,1,1,1,1.05233,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];t.MyriadProItalicMetrics={lineHeight:1.2,lineGap:.2};t.MyriadProRegularFactors=[1.36898,1,1,.76305,.82784,.94935,.89364,.92241,.89073,.90706,.98472,.85283,.85283,1.0664,1.02058,.74505,.9219,.74505,1.23456,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.74505,.74505,1.02058,1.02058,1.02058,.73002,.72601,.91755,.8126,.80314,.92222,.73764,.79726,.83051,.90284,.86023,.74,.8126,.84869,.96518,.91115,.8858,.79761,.8858,.74498,.73914,.81363,.89591,.83659,.89633,.85608,.8111,.90531,1.0222,1.22736,1.0222,1.27014,.89903,.90088,.86667,1.0231,.896,1.01411,.90083,1.05099,1.00512,.99793,1.05326,1.09377,.938,1.06226,1.00119,.99793,.98714,1.0231,1.01231,.98196,.792,1.19137,.99074,.962,1.01915,.926,.942,.856,.85034,.92006,.85034,1.02058,.69067,.92241,.92241,.92241,.92241,.92006,.9332,.90088,.91882,.93484,.75339,1.02058,.56866,.54324,.79519,1.08595,1,1,.90088,1,.95325,.74505,.90088,1,.97198,.75339,.91009,.91009,.91009,.66466,.91755,.91755,.91755,.91755,.91755,.91755,.788,.80314,.73764,.73764,.73764,.73764,.86023,.86023,.86023,.86023,.92915,.91115,.8858,.8858,.8858,.8858,.8858,1.02058,.8858,.89591,.89591,.89591,.89591,.8111,.79611,.89713,.86667,.86667,.86667,.86667,.86667,.86667,.86936,.896,.90083,.90083,.90083,.90083,.84224,.84224,.84224,.84224,.97276,.99793,.98714,.98714,.98714,.98714,.98714,1.08595,.89876,.99074,.99074,.99074,.99074,.942,1.0231,.942,.91755,.86667,.91755,.86667,.91755,.86667,.80314,.896,.80314,.896,.80314,.896,.80314,.896,.92222,.93372,.92915,1.01411,.73764,.90083,.73764,.90083,.73764,.90083,.73764,.90083,.73764,.90083,.83051,1.00512,.83051,1.00512,.83051,1.00512,1,1,.90284,.99793,.90976,.99793,.86023,.84224,.86023,.84224,.86023,.84224,.86023,1.05326,.86023,.84224,.82873,1.07469,.74,1.09377,1,1,.938,.84869,1.06226,1,1,.84869,.83704,.84869,.81441,.85588,1.08927,.91115,.99793,1,1,.91115,.99793,.91887,.90991,.99793,.8858,.98714,.8858,.98714,.8858,.98714,.894,.91434,.74498,.98196,1,1,.74498,.98196,.73914,.792,.73914,.792,1,1,.73914,.792,1,1,.81363,.904,.81363,1.19137,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89633,1.01915,.8111,.942,.8111,.90531,.856,.90531,.856,.90531,.856,1,.92241,.91755,.86667,.788,.86936,.8858,.89876,1,1,.81363,1.19137,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90388,1.03901,.92138,.78105,.7154,.86169,.80513,.94007,.82528,.98612,1.06226,.91755,.8126,.81884,.92819,.73764,.90531,.90284,.8858,.86023,.8126,.91172,.96518,.91115,.83089,.8858,.87791,.79761,.89297,.81363,.88157,.89992,.85608,.81992,.94307,.86023,.88157,.95308,.98699,.99793,1.06226,.95817,.95308,.97358,.928,.98088,.98699,.92761,.99793,.96017,1.06226,.986,.944,.95978,.938,.96705,.98714,.80442,.98972,1,.89762,1.04552,.95817,.99007,.87064,.91879,.88888,1.06226,.95817,.98714,.95817,.88888,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,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,.89633,1.01915,.89633,1.01915,.89633,1.01915,.8111,.942,.9219,1,.89903,1,1,1,.93173,.93173,.93173,1,1.06304,1.06304,1.06904,.89903,.89903,.80549,1,1.156,1,1,.76575,.76575,1,1,.72458,1,1,1,1,.92241,1,1,1,.619,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.07257,1,.74705,.71119,1.02058,1.024,1.02119,1,1,1.1536,1.08595,1.08595,1,1.08595,1.08595,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,1,1,1,1,1,1.05638,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];t.MyriadProRegularMetrics={lineHeight:1.2,lineGap:.2}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.SegoeuiRegularMetrics=t.SegoeuiRegularFactors=t.SegoeuiItalicMetrics=t.SegoeuiItalicFactors=t.SegoeuiBoldMetrics=t.SegoeuiBoldItalicMetrics=t.SegoeuiBoldItalicFactors=t.SegoeuiBoldFactors=void 0;t.SegoeuiBoldFactors=[1.76738,1,1,.99297,.9824,1.04016,1.06497,1.03424,.97529,1.17647,1.23203,1.1085,1.1085,1.16939,1.2107,.9754,1.21408,.9754,1.59578,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,.81378,.81378,1.2107,1.2107,1.2107,.71703,.97847,.97363,.88776,.8641,1.02096,.79795,.85132,.914,1.06085,1.1406,.8007,.89858,.83693,1.14889,1.09398,.97489,.92094,.97489,.90399,.84041,.95923,1.00135,1,1.06467,.98243,.90996,.99361,1.1085,1.56942,1.1085,1.2107,.74627,.94282,.96752,1.01519,.86304,1.01359,.97278,1.15103,1.01359,.98561,1.02285,1.02285,1.00527,1.02285,1.0302,.99041,1.0008,1.01519,1.01359,1.02258,.79104,1.16862,.99041,.97454,1.02511,.99298,.96752,.95801,.94856,1.16579,.94856,1.2107,.9824,1.03424,1.03424,1,1.03424,1.16579,.8727,1.3871,1.18622,1.10818,1.04478,1.2107,1.18622,.75155,.94994,1.28826,1.21408,1.21408,.91056,1,.91572,.9754,.64663,1.18328,1.24866,1.04478,1.14169,1.15749,1.17389,.71703,.97363,.97363,.97363,.97363,.97363,.97363,.93506,.8641,.79795,.79795,.79795,.79795,1.1406,1.1406,1.1406,1.1406,1.02096,1.09398,.97426,.97426,.97426,.97426,.97426,1.2107,.97489,1.00135,1.00135,1.00135,1.00135,.90996,.92094,1.02798,.96752,.96752,.96752,.96752,.96752,.96752,.93136,.86304,.97278,.97278,.97278,.97278,1.02285,1.02285,1.02285,1.02285,.97122,.99041,1,1,1,1,1,1.28826,1.0008,.99041,.99041,.99041,.99041,.96752,1.01519,.96752,.97363,.96752,.97363,.96752,.97363,.96752,.8641,.86304,.8641,.86304,.8641,.86304,.8641,.86304,1.02096,1.03057,1.02096,1.03517,.79795,.97278,.79795,.97278,.79795,.97278,.79795,.97278,.79795,.97278,.914,1.01359,.914,1.01359,.914,1.01359,1,1,1.06085,.98561,1.06085,1.00879,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,.97138,1.08692,.8007,1.02285,1,1,1.00527,.83693,1.02285,1,1,.83693,.9455,.83693,.90418,.83693,1.13005,1.09398,.99041,1,1,1.09398,.99041,.96692,1.09251,.99041,.97489,1.0008,.97489,1.0008,.97489,1.0008,.93994,.97931,.90399,1.02258,1,1,.90399,1.02258,.84041,.79104,.84041,.79104,.84041,.79104,.84041,.79104,1,1,.95923,1.07034,.95923,1.16862,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.06467,1.02511,.90996,.96752,.90996,.99361,.95801,.99361,.95801,.99361,.95801,1.07733,1.03424,.97363,.96752,.93506,.93136,.97489,1.0008,1,1,.95923,1.16862,1.15103,1.15103,1.01173,1.03959,.75953,.81378,.79912,1.15103,1.21994,.95161,.87815,1.01149,.81525,.7676,.98167,1.01134,1.02546,.84097,1.03089,1.18102,.97363,.88776,.85134,.97826,.79795,.99361,1.06085,.97489,1.1406,.89858,1.0388,1.14889,1.09398,.86039,.97489,1.0595,.92094,.94793,.95923,.90996,.99346,.98243,1.02112,.95493,1.1406,.90996,1.03574,1.02597,1.0008,1.18102,1.06628,1.03574,1.0192,1.01932,1.00886,.97531,1.0106,1.0008,1.13189,1.18102,1.02277,.98683,1.0016,.99561,1.07237,1.0008,.90434,.99921,.93803,.8965,1.23085,1.06628,1.04983,.96268,1.0499,.98439,1.18102,1.06628,1.0008,1.06628,.98439,.79795,1,1,1,1,1,1,1,1,1,1,1,1,1.09466,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,1,1,1,1,1,1,1,1,1,1,.97278,1,1,1,1,1,1,1,1,1,1,1,1,1.02065,1,1,1,1,1,1,1.06467,1.02511,1.06467,1.02511,1.06467,1.02511,.90996,.96752,1,1.21408,.89903,1,1,.75155,1.04394,1.04394,1.04394,1.04394,.98633,.98633,.98633,.73047,.73047,1.20642,.91211,1.25635,1.222,1.02956,1.03372,1.03372,.96039,1.24633,1,1.12454,.93503,1.03424,1.19687,1.03424,1,1,1,.771,1,1,1.15749,1.15749,1.15749,1.10948,.86279,.94434,.86279,.94434,.86182,1,1,1.16897,1,.96085,.90137,1.2107,1.18416,1.13973,.69825,.9716,2.10339,1.29004,1.29004,1.21172,1.29004,1.29004,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.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18874,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.09193,1.09193,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];t.SegoeuiBoldMetrics={lineHeight:1.33008,lineGap:0};t.SegoeuiBoldItalicFactors=[1.76738,1,1,.98946,1.03959,1.04016,1.02809,1.036,.97639,1.10953,1.23203,1.11144,1.11144,1.16939,1.21237,.9754,1.21261,.9754,1.59754,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,.81378,.81378,1.21237,1.21237,1.21237,.73541,.97847,.97363,.89723,.87897,1.0426,.79429,.85292,.91149,1.05815,1.1406,.79631,.90128,.83853,1.04396,1.10615,.97552,.94436,.97552,.88641,.80527,.96083,1.00135,1,1.06777,.9817,.91142,.99361,1.11144,1.57293,1.11144,1.21237,.74627,1.31818,1.06585,.97042,.83055,.97042,.93503,1.1261,.97042,.97922,1.14236,.94552,1.01054,1.14236,1.02471,.97922,.94165,.97042,.97042,1.0276,.78929,1.1261,.97922,.95874,1.02197,.98507,.96752,.97168,.95107,1.16579,.95107,1.21237,1.03959,1.036,1.036,1,1.036,1.16579,.87357,1.31818,1.18754,1.26781,1.05356,1.21237,1.18622,.79487,.94994,1.29004,1.24047,1.24047,1.31818,1,.91484,.9754,1.31818,1.1349,1.24866,1.05356,1.13934,1.15574,1.17389,.73541,.97363,.97363,.97363,.97363,.97363,.97363,.94385,.87897,.79429,.79429,.79429,.79429,1.1406,1.1406,1.1406,1.1406,1.0426,1.10615,.97552,.97552,.97552,.97552,.97552,1.21237,.97552,1.00135,1.00135,1.00135,1.00135,.91142,.94436,.98721,1.06585,1.06585,1.06585,1.06585,1.06585,1.06585,.96705,.83055,.93503,.93503,.93503,.93503,1.14236,1.14236,1.14236,1.14236,.93125,.97922,.94165,.94165,.94165,.94165,.94165,1.29004,.94165,.97922,.97922,.97922,.97922,.96752,.97042,.96752,.97363,1.06585,.97363,1.06585,.97363,1.06585,.87897,.83055,.87897,.83055,.87897,.83055,.87897,.83055,1.0426,1.0033,1.0426,.97042,.79429,.93503,.79429,.93503,.79429,.93503,.79429,.93503,.79429,.93503,.91149,.97042,.91149,.97042,.91149,.97042,1,1,1.05815,.97922,1.05815,.97922,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,.97441,1.04302,.79631,1.01582,1,1,1.01054,.83853,1.14236,1,1,.83853,1.09125,.83853,.90418,.83853,1.19508,1.10615,.97922,1,1,1.10615,.97922,1.01034,1.10466,.97922,.97552,.94165,.97552,.94165,.97552,.94165,.91602,.91981,.88641,1.0276,1,1,.88641,1.0276,.80527,.78929,.80527,.78929,.80527,.78929,.80527,.78929,1,1,.96083,1.05403,.95923,1.16862,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.06777,1.02197,.91142,.96752,.91142,.99361,.97168,.99361,.97168,.99361,.97168,1.23199,1.036,.97363,1.06585,.94385,.96705,.97552,.94165,1,1,.96083,1.1261,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,.95161,1.27126,1.00811,.83284,.77702,.99137,.95253,1.0347,.86142,1.07205,1.14236,.97363,.89723,.86869,1.09818,.79429,.99361,1.05815,.97552,1.1406,.90128,1.06662,1.04396,1.10615,.84918,.97552,1.04694,.94436,.98015,.96083,.91142,1.00356,.9817,1.01945,.98999,1.1406,.91142,1.04961,.9898,1.00639,1.14236,1.07514,1.04961,.99607,1.02897,1.008,.9898,.95134,1.00639,1.11121,1.14236,1.00518,.97981,1.02186,1,1.08578,.94165,.99314,.98387,.93028,.93377,1.35125,1.07514,1.10687,.93491,1.04232,1.00351,1.14236,1.07514,.94165,1.07514,1.00351,.79429,1,1,1,1,1,1,1,1,1,1,1,1,1.09097,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,1,1,1,1,1,1,1,1,1,1,.93503,1,1,1,1,1,1,1,1,1,1,1,1,.96609,1,1,1,1,1,1,1.06777,1.02197,1.06777,1.02197,1.06777,1.02197,.91142,.96752,1,1.21261,.89903,1,1,.75155,1.04745,1.04745,1.04745,1.04394,.98633,.98633,.98633,.72959,.72959,1.20502,.91406,1.26514,1.222,1.02956,1.03372,1.03372,.96039,1.24633,1,1.09125,.93327,1.03336,1.16541,1.036,1,1,1,.771,1,1,1.15574,1.15574,1.15574,1.15574,.86364,.94434,.86279,.94434,.86224,1,1,1.16798,1,.96085,.90068,1.21237,1.18416,1.13904,.69825,.9716,2.10339,1.29004,1.29004,1.21339,1.29004,1.29004,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.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18775,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.13269,1.13269,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];t.SegoeuiBoldItalicMetrics={lineHeight:1.33008,lineGap:0};t.SegoeuiItalicFactors=[1.76738,1,1,.98946,1.14763,1.05365,1.06234,.96927,.92586,1.15373,1.18414,.91349,.91349,1.07403,1.17308,.78383,1.20088,.78383,1.42531,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.78383,.78383,1.17308,1.17308,1.17308,.77349,.94565,.94729,.85944,.88506,.9858,.74817,.80016,.88449,.98039,.95782,.69238,.89898,.83231,.98183,1.03989,.96924,.86237,.96924,.80595,.74524,.86091,.95402,.94143,.98448,.8858,.83089,.93285,1.0949,1.39016,1.0949,1.45994,.74627,1.04839,.97454,.97454,.87207,.97454,.87533,1.06151,.97454,1.00176,1.16484,1.08132,.98047,1.16484,1.02989,1.01054,.96225,.97454,.97454,1.06598,.79004,1.16344,1.00351,.94629,.9973,.91016,.96777,.9043,.91082,.92481,.91082,1.17308,.95748,.96927,.96927,1,.96927,.92481,.80597,1.04839,1.23393,1.1781,.9245,1.17308,1.20808,.63218,.94261,1.24822,1.09971,1.09971,1.04839,1,.85273,.78032,1.04839,1.09971,1.22326,.9245,1.09836,1.13525,1.15222,.70424,.94729,.94729,.94729,.94729,.94729,.94729,.85498,.88506,.74817,.74817,.74817,.74817,.95782,.95782,.95782,.95782,.9858,1.03989,.96924,.96924,.96924,.96924,.96924,1.17308,.96924,.95402,.95402,.95402,.95402,.83089,.86237,.88409,.97454,.97454,.97454,.97454,.97454,.97454,.92916,.87207,.87533,.87533,.87533,.87533,.93146,.93146,.93146,.93146,.93854,1.01054,.96225,.96225,.96225,.96225,.96225,1.24822,.8761,1.00351,1.00351,1.00351,1.00351,.96777,.97454,.96777,.94729,.97454,.94729,.97454,.94729,.97454,.88506,.87207,.88506,.87207,.88506,.87207,.88506,.87207,.9858,.95391,.9858,.97454,.74817,.87533,.74817,.87533,.74817,.87533,.74817,.87533,.74817,.87533,.88449,.97454,.88449,.97454,.88449,.97454,1,1,.98039,1.00176,.98039,1.00176,.95782,.93146,.95782,.93146,.95782,.93146,.95782,1.16484,.95782,.93146,.84421,1.12761,.69238,1.08132,1,1,.98047,.83231,1.16484,1,1,.84723,1.04861,.84723,.78755,.83231,1.23736,1.03989,1.01054,1,1,1.03989,1.01054,.9857,1.03849,1.01054,.96924,.96225,.96924,.96225,.96924,.96225,.92383,.90171,.80595,1.06598,1,1,.80595,1.06598,.74524,.79004,.74524,.79004,.74524,.79004,.74524,.79004,1,1,.86091,1.02759,.85771,1.16344,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.98448,.9973,.83089,.96777,.83089,.93285,.9043,.93285,.9043,.93285,.9043,1.31868,.96927,.94729,.97454,.85498,.92916,.96924,.8761,1,1,.86091,1.16344,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,.81965,.81965,.94729,.78032,.71022,.90883,.84171,.99877,.77596,1.05734,1.2,.94729,.85944,.82791,.9607,.74817,.93285,.98039,.96924,.95782,.89898,.98316,.98183,1.03989,.78614,.96924,.97642,.86237,.86075,.86091,.83089,.90082,.8858,.97296,1.01284,.95782,.83089,1.0976,1.04,1.03342,1.2,1.0675,1.0976,.98205,1.03809,1.05097,1.04,.95364,1.03342,1.05401,1.2,1.02148,1.0119,1.04724,1.0127,1.02732,.96225,.8965,.97783,.93574,.94818,1.30679,1.0675,1.11826,.99821,1.0557,1.0326,1.2,1.0675,.96225,1.0675,1.0326,.74817,1,1,1,1,1,1,1,1,1,1,1,1,1.03754,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,1,1,1,1,1,1,1,1,1,1,.87533,1,1,1,1,1,1,1,1,1,1,1,1,.98705,1,1,1,1,1,1,.98448,.9973,.98448,.9973,.98448,.9973,.83089,.96777,1,1.20088,.89903,1,1,.75155,.94945,.94945,.94945,.94945,1.12317,1.12317,1.12317,.67603,.67603,1.15621,.73584,1.21191,1.22135,1.06483,.94868,.94868,.95996,1.24633,1,1.07497,.87709,.96927,1.01473,.96927,1,1,1,.77295,1,1,1.09836,1.09836,1.09836,1.01522,.86321,.94434,.8649,.94434,.86182,1,1,1.083,1,.91578,.86438,1.17308,1.18416,1.14589,.69825,.97622,1.96791,1.24822,1.24822,1.17308,1.24822,1.24822,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.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.17984,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.10742,1.10742,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];t.SegoeuiItalicMetrics={lineHeight:1.33008,lineGap:0};t.SegoeuiRegularFactors=[1.76738,1,1,.98594,1.02285,1.10454,1.06234,.96927,.92037,1.19985,1.2046,.90616,.90616,1.07152,1.1714,.78032,1.20088,.78032,1.40246,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.78032,.78032,1.1714,1.1714,1.1714,.80597,.94084,.96706,.85944,.85734,.97093,.75842,.79936,.88198,.9831,.95782,.71387,.86969,.84636,1.07796,1.03584,.96924,.83968,.96924,.82826,.79649,.85771,.95132,.93119,.98965,.88433,.8287,.93365,1.08612,1.3638,1.08612,1.45786,.74627,.80499,.91484,1.05707,.92383,1.05882,.9403,1.12654,1.05882,1.01756,1.09011,1.09011,.99414,1.09011,1.034,1.01756,1.05356,1.05707,1.05882,1.04399,.84863,1.21968,1.01756,.95801,1.00068,.91797,.96777,.9043,.90351,.92105,.90351,1.1714,.85337,.96927,.96927,.99912,.96927,.92105,.80597,1.2434,1.20808,1.05937,.90957,1.1714,1.20808,.75155,.94261,1.24644,1.09971,1.09971,.84751,1,.85273,.78032,.61584,1.05425,1.17914,.90957,1.08665,1.11593,1.14169,.73381,.96706,.96706,.96706,.96706,.96706,.96706,.86035,.85734,.75842,.75842,.75842,.75842,.95782,.95782,.95782,.95782,.97093,1.03584,.96924,.96924,.96924,.96924,.96924,1.1714,.96924,.95132,.95132,.95132,.95132,.8287,.83968,.89049,.91484,.91484,.91484,.91484,.91484,.91484,.93575,.92383,.9403,.9403,.9403,.9403,.8717,.8717,.8717,.8717,1.00527,1.01756,1.05356,1.05356,1.05356,1.05356,1.05356,1.24644,.95923,1.01756,1.01756,1.01756,1.01756,.96777,1.05707,.96777,.96706,.91484,.96706,.91484,.96706,.91484,.85734,.92383,.85734,.92383,.85734,.92383,.85734,.92383,.97093,1.0969,.97093,1.05882,.75842,.9403,.75842,.9403,.75842,.9403,.75842,.9403,.75842,.9403,.88198,1.05882,.88198,1.05882,.88198,1.05882,1,1,.9831,1.01756,.9831,1.01756,.95782,.8717,.95782,.8717,.95782,.8717,.95782,1.09011,.95782,.8717,.84784,1.11551,.71387,1.09011,1,1,.99414,.84636,1.09011,1,1,.84636,1.0536,.84636,.94298,.84636,1.23297,1.03584,1.01756,1,1,1.03584,1.01756,1.00323,1.03444,1.01756,.96924,1.05356,.96924,1.05356,.96924,1.05356,.93066,.98293,.82826,1.04399,1,1,.82826,1.04399,.79649,.84863,.79649,.84863,.79649,.84863,.79649,.84863,1,1,.85771,1.17318,.85771,1.21968,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.98965,1.00068,.8287,.96777,.8287,.93365,.9043,.93365,.9043,.93365,.9043,1.08571,.96927,.96706,.91484,.86035,.93575,.96924,.95923,1,1,.85771,1.21968,1.11437,1.11437,.93109,.91202,.60411,.84164,.55572,1.01173,.97361,.81818,.81818,.96635,.78032,.72727,.92366,.98601,1.03405,.77968,1.09799,1.2,.96706,.85944,.85638,.96491,.75842,.93365,.9831,.96924,.95782,.86969,.94152,1.07796,1.03584,.78437,.96924,.98715,.83968,.83491,.85771,.8287,.94492,.88433,.9287,1.0098,.95782,.8287,1.0625,.98248,1.03424,1.2,1.01071,1.0625,.95246,1.03809,1.04912,.98248,1.00221,1.03424,1.05443,1.2,1.04785,.99609,1.00169,1.05176,.99346,1.05356,.9087,1.03004,.95542,.93117,1.23362,1.01071,1.07831,1.02512,1.05205,1.03502,1.2,1.01071,1.05356,1.01071,1.03502,.75842,1,1,1,1,1,1,1,1,1,1,1,1,1.03719,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,1,1,1,1,1,1,1,1,1,1,.9403,1,1,1,1,1,1,1,1,1,1,1,1,1.04021,1,1,1,1,1,1,.98965,1.00068,.98965,1.00068,.98965,1.00068,.8287,.96777,1,1.20088,.89903,1,1,.75155,1.03077,1.03077,1.03077,1.03077,1.13196,1.13196,1.13196,.67428,.67428,1.16039,.73291,1.20996,1.22135,1.06483,.94868,.94868,.95996,1.24633,1,1.07497,.87796,.96927,1.01518,.96927,1,1,1,.77295,1,1,1.10539,1.10539,1.11358,1.06967,.86279,.94434,.86279,.94434,.86182,1,1,1.083,1,.91578,.86507,1.1714,1.18416,1.14589,.69825,.97622,1.9697,1.24822,1.24822,1.17238,1.24822,1.24822,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.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18083,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.10938,1.10938,1,1,1,1.05425,1.09971,1.09971,1.09971,1,1,1,1,1,1,1,1,1,1,1];t.SegoeuiRegularMetrics={lineHeight:1.33008,lineGap:0}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.getFontType=function getFontType(e,t,r=!1){switch(e){case"Type1":return r?a.FontType.TYPE1STANDARD:"Type1C"===t?a.FontType.TYPE1C:a.FontType.TYPE1;case"CIDFontType0":return"CIDFontType0C"===t?a.FontType.CIDFONTTYPE0C:a.FontType.CIDFONTTYPE0;case"OpenType":return a.FontType.OPENTYPE;case"TrueType":return a.FontType.TRUETYPE;case"CIDFontType2":return a.FontType.CIDFONTTYPE2;case"MMType1":return a.FontType.MMTYPE1;case"Type0":return a.FontType.TYPE0;default:return a.FontType.UNKNOWN}};t.normalizeFontName=function normalizeFontName(e){return e.replace(/[,_]/g,"-").replace(/\s/g,"")};t.recoverGlyphName=recoverGlyphName;t.type1FontGlyphMapping=function type1FontGlyphMapping(e,t,r){const a=Object.create(null);let s,c,l;const h=!!(e.flags&o.Symbolic);if(e.isInternalFont){l=t;for(c=0;c=0?s:0}}else if(e.baseEncodingName){l=(0,i.getEncoding)(e.baseEncodingName);for(c=0;c=0?s:0}}else if(h)for(c in t)a[c]=t[c];else{l=i.StandardEncoding;for(c=0;c=0?s:0}}const u=e.differences;let d;if(u)for(c in u){const e=u[c];s=r.indexOf(e);if(-1===s){d||(d=(0,n.getGlyphsUnicode)());const t=recoverGlyphName(e,d);t!==e&&(s=r.indexOf(t))}a[c]=s>=0?s:0}return a};t.SEAC_ANALYSIS_ENABLED=t.MacStandardGlyphOrdering=t.FontFlags=void 0;var a=r(2),i=r(19),n=r(20),s=r(21);t.SEAC_ANALYSIS_ENABLED=!0;const o={FixedPitch:1,Serif:2,Symbolic:4,Script:8,Nonsymbolic:32,Italic:64,AllCap:65536,SmallCap:131072,ForceBold:262144};t.FontFlags=o;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"];function recoverGlyphName(e,t){if(void 0!==t[e])return e;const r=(0,s.getUnicodeForGlyph)(e,t);if(-1!==r)for(const e in t)if(t[e]===r)return e;(0,a.info)("Unable to recover a standard glyph name for: "+e);return e}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.getEncoding=function getEncoding(e){switch(e){case"WinAnsiEncoding":return s;case"StandardEncoding":return n;case"MacRomanEncoding":return i;case"SymbolSetEncoding":return o;case"ZapfDingbatsEncoding":return c;case"ExpertEncoding":return r;case"MacExpertEncoding":return a;default:return null}};t.ZapfDingbatsEncoding=t.WinAnsiEncoding=t.SymbolSetEncoding=t.StandardEncoding=t.MacRomanEncoding=t.ExpertEncoding=void 0;const 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;const a=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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","","","",""],i=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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=i;const n=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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=n;const s=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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=s;const o=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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=o;const 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)=>{r.r(t);r.d(t,{getDingbatsGlyphsUnicode:()=>n,getGlyphsUnicode:()=>i});var a=r(9);const i=(0,a.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]})),n=(0,a.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)=>{r.r(t);r.d(t,{getNormalizedUnicodes:()=>s,getUnicodeForGlyph:()=>getUnicodeForGlyph,getUnicodeRangeFor:()=>getUnicodeRangeFor,mapSpecialUnicodeValues:()=>mapSpecialUnicodeValues,reverseIfRtl:()=>reverseIfRtl});var a=r(9);const i=(0,a.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}));function mapSpecialUnicodeValues(e){return e>=65520&&e<=65535?0:e>=62976&&e<=63743?i()[e]||e:173===e?45:e}function getUnicodeForGlyph(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 a;if(7===t&&"n"===e[1]&&"i"===e[2])a=e.substring(3);else{if(!(t>=5&&t<=7))return-1;a=e.substring(1)}if(a===a.toUpperCase()){r=parseInt(a,16);if(r>=0)return r}}return-1}const n=[{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}];function getUnicodeRangeFor(e){for(let t=0,r=n.length;t=r.begin&&e=t.begin&&e=t.begin&&e=0;a--)r.push(e[a]);return r.join("")}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.getQuadPoints=getQuadPoints;t.MarkupAnnotation=t.AnnotationFactory=t.AnnotationBorderStyle=t.Annotation=void 0;var a=r(2),i=r(9),n=r(23),s=r(5),o=r(59),c=r(64),l=r(24),h=r(66),u=r(70),d=r(62),f=r(10),g=r(71);t.AnnotationFactory=class AnnotationFactory{static create(e,t,r,a,i){return Promise.all([r.ensureCatalog("acroForm"),i?this._getPageIndex(e,t,r):-1]).then((([n,s])=>r.ensure(this,"_create",[e,t,r,a,n,i,s])))}static _create(e,t,r,n,o,c,l=-1){const h=e.fetchIfRef(t);if(!(0,s.isDict)(h))return;const u=(0,s.isRef)(t)?t.toString():`annot_${n.createObjId()}`;let d=h.get("Subtype");d=(0,s.isName)(d)?d.name:null;const f={xref:e,ref:t,dict:h,subtype:d,id:u,pdfManager:r,acroForm:o instanceof s.Dict?o:s.Dict.empty,collectFields:c,pageIndex:l};switch(d){case"Link":return new LinkAnnotation(f);case"Text":return new TextAnnotation(f);case"Widget":let e=(0,i.getInheritableProperty)({dict:h,key:"FT"});e=(0,s.isName)(e)?e.name:null;switch(e){case"Tx":return new TextWidgetAnnotation(f);case"Btn":return new ButtonWidgetAnnotation(f);case"Ch":return new ChoiceWidgetAnnotation(f);case"Sig":return new SignatureWidgetAnnotation(f)}(0,a.warn)(`Unimplemented widget field type "${e}", falling back to base field type.`);return new WidgetAnnotation(f);case"Popup":return new PopupAnnotation(f);case"FreeText":return new FreeTextAnnotation(f);case"Line":return new LineAnnotation(f);case"Square":return new SquareAnnotation(f);case"Circle":return new CircleAnnotation(f);case"PolyLine":return new PolylineAnnotation(f);case"Polygon":return new PolygonAnnotation(f);case"Caret":return new CaretAnnotation(f);case"Ink":return new InkAnnotation(f);case"Highlight":return new HighlightAnnotation(f);case"Underline":return new UnderlineAnnotation(f);case"Squiggly":return new SquigglyAnnotation(f);case"StrikeOut":return new StrikeOutAnnotation(f);case"Stamp":return new StampAnnotation(f);case"FileAttachment":return new FileAttachmentAnnotation(f);default:c||(d?(0,a.warn)(`Unimplemented annotation type "${d}", falling back to base annotation.`):(0,a.warn)("Annotation is missing the required /Subtype."));return new Annotation(f)}}static async _getPageIndex(e,t,r){try{const a=await e.fetchIfRefAsync(t);if(!(0,s.isDict)(a))return-1;const i=a.getRaw("P");if(!(0,s.isRef)(i))return-1;return await r.ensureCatalog("getPageIndex",[i])}catch(e){(0,a.warn)(`_getPageIndex: "${e}".`);return-1}}};function getRgbColor(e,t=new Uint8ClampedArray(3)){if(!Array.isArray(e))return t;const r=t||new Uint8ClampedArray(3);switch(e.length){case 0:return null;case 1:l.ColorSpace.singletons.gray.getRgbItem(e,0,r,0);return r;case 3:l.ColorSpace.singletons.rgb.getRgbItem(e,0,r,0);return r;case 4:l.ColorSpace.singletons.cmyk.getRgbItem(e,0,r,0);return r;default:return t}}function getQuadPoints(e,t){if(!e.has("QuadPoints"))return null;const r=e.getArray("QuadPoints");if(!Array.isArray(r)||0===r.length||r.length%8>0)return null;const a=[];for(let e=0,i=r.length/8;et[2]||st[3]))return null;a[e].push({x:n,y:s})}}return a.map((e=>{const[t,r,a,i]=e.reduce((([e,t,r,a],i)=>[Math.min(e,i.x),Math.max(t,i.x),Math.min(r,i.y),Math.max(a,i.y)]),[Number.MAX_VALUE,Number.MIN_VALUE,Number.MAX_VALUE,Number.MIN_VALUE]);return[{x:t,y:i},{x:r,y:i},{x:t,y:a},{x:r,y:a}]}))}function getTransformMatrix(e,t,r){const[i,n,s,o]=a.Util.getAxialAlignedBoundingBox(t,r);if(i===s||n===o)return[1,0,0,1,e[0],e[1]];const c=(e[2]-e[0])/(s-i),l=(e[3]-e[1])/(o-n);return[c,0,0,l,e[0]-i*c,e[1]-n*l]}class Annotation{constructor(e){const t=e.dict;this.setTitle(t.get("T"));this.setContents(t.get("Contents"));this.setModificationDate(t.get("M"));this.setFlags(t.get("F"));this.setRectangle(t.getArray("Rect"));this.setColor(t.getArray("C"));this.setBorderStyle(t);this.setAppearance(t);this.setBorderAndBackgroundColors(t.get("MK"));this._streams=[];this.appearance&&this._streams.push(this.appearance);this.data={annotationFlags:this.flags,borderStyle:this.borderStyle,color:this.color,backgroundColor:this.backgroundColor,borderColor:this.borderColor,contentsObj:this._contents,hasAppearance:!!this.appearance,id:e.id,modificationDate:this.modificationDate,rect:this.rectangle,subtype:e.subtype};if(e.collectFields){const r=t.get("Kids");if(Array.isArray(r)){const e=[];for(const t of r)(0,s.isRef)(t)&&e.push(t.toString());0!==e.length&&(this.data.kidIds=e)}this.data.actions=(0,i.collectActions)(e.xref,t,a.AnnotationActionEventType);this.data.fieldName=this._constructFieldName(t);this.data.pageIndex=e.pageIndex}this._fallbackFontDict=null}_hasFlag(e,t){return!!(e&t)}_isViewable(e){return!this._hasFlag(e,a.AnnotationFlag.INVISIBLE)&&!this._hasFlag(e,a.AnnotationFlag.NOVIEW)}_isPrintable(e){return this._hasFlag(e,a.AnnotationFlag.PRINT)&&!this._hasFlag(e,a.AnnotationFlag.INVISIBLE)}mustBeViewed(e){const t=e&&e.get(this.data.id);return t&&void 0!==t.hidden?!t.hidden:this.viewable&&!this._hasFlag(this.flags,a.AnnotationFlag.HIDDEN)}mustBePrinted(e){const t=e&&e.get(this.data.id);return t&&void 0!==t.print?t.print:this.printable}get viewable(){return null!==this.data.quadPoints&&(0===this.flags||this._isViewable(this.flags))}get printable(){return null!==this.data.quadPoints&&(0!==this.flags&&this._isPrintable(this.flags))}_parseStringHelper(e){const t="string"==typeof e?(0,a.stringToPDFString)(e):"";return{str:t,dir:t&&"rtl"===(0,o.bidi)(t).dir?"rtl":"ltr"}}setTitle(e){this._title=this._parseStringHelper(e)}setContents(e){this._contents=this._parseStringHelper(e)}setModificationDate(e){this.modificationDate=(0,a.isString)(e)?e:null}setFlags(e){this.flags=Number.isInteger(e)&&e>0?e:0}hasFlag(e){return this._hasFlag(this.flags,e)}setRectangle(e){Array.isArray(e)&&4===e.length?this.rectangle=a.Util.normalizeRect(e):this.rectangle=[0,0,0,0]}setColor(e){this.color=getRgbColor(e)}setBorderAndBackgroundColors(e){if(e instanceof s.Dict){this.borderColor=getRgbColor(e.getArray("BC"),null);this.backgroundColor=getRgbColor(e.getArray("BG"),null)}else this.borderColor=this.backgroundColor=null}setBorderStyle(e){this.borderStyle=new AnnotationBorderStyle;if((0,s.isDict)(e))if(e.has("BS")){const t=e.get("BS"),r=t.get("Type");if(!r||(0,s.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")){const t=e.getArray("Border");if(Array.isArray(t)&&t.length>=3){this.borderStyle.setHorizontalCornerRadius(t[0]);this.borderStyle.setVerticalCornerRadius(t[1]);this.borderStyle.setWidth(t[2],this.rectangle);4===t.length&&this.borderStyle.setDashArray(t[3])}}else this.borderStyle.setWidth(0)}setAppearance(e){this.appearance=null;const t=e.get("AP");if(!(0,s.isDict)(t))return;const r=t.get("N");if((0,s.isStream)(r)){this.appearance=r;return}if(!(0,s.isDict)(r))return;const a=e.get("AS");(0,s.isName)(a)&&r.has(a.name)&&(this.appearance=r.get(a.name))}loadResources(e){return this.appearance.dict.getAsync("Resources").then((t=>{if(!t)return;return new u.ObjectLoader(t,e,t.xref).load().then((function(){return t}))}))}getOperatorList(e,t,r,i){if(!this.appearance)return Promise.resolve(new d.OperatorList);const n=this.appearance,s=this.data,o=n.dict,c=this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"]),l=o.getArray("BBox")||[0,0,1,1],h=o.getArray("Matrix")||[1,0,0,1,0,0],u=getTransformMatrix(s.rect,l,h);return c.then((r=>{const i=new d.OperatorList;i.addOp(a.OPS.beginAnnotation,[s.id,s.rect,u,h]);return e.getOperatorList({stream:n,task:t,resources:r,operatorList:i,fallbackFontDict:this._fallbackFontDict}).then((()=>{i.addOp(a.OPS.endAnnotation,[]);this.reset();return i}))}))}async save(e,t,r){return null}getFieldObject(){return this.data.kidIds?{id:this.data.id,actions:this.data.actions,name:this.data.fieldName,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,type:"",kidIds:this.data.kidIds,page:this.data.pageIndex}:null}reset(){for(const e of this._streams)e.reset()}_constructFieldName(e){if(!e.has("T")&&!e.has("Parent")){(0,a.warn)("Unknown field name, falling back to empty field name.");return""}if(!e.has("Parent"))return(0,a.stringToPDFString)(e.get("T"));const t=[];e.has("T")&&t.unshift((0,a.stringToPDFString)(e.get("T")));let r=e;const i=new s.RefSet;e.objId&&i.put(e.objId);for(;r.has("Parent");){r=r.get("Parent");if(!(r instanceof s.Dict)||r.objId&&i.has(r.objId))break;r.objId&&i.put(r.objId);r.has("T")&&t.unshift((0,a.stringToPDFString)(r.get("T")))}return t.join(".")}}t.Annotation=Annotation;class AnnotationBorderStyle{constructor(){this.width=1;this.style=a.AnnotationBorderStyleType.SOLID;this.dashArray=[3];this.horizontalCornerRadius=0;this.verticalCornerRadius=0}setWidth(e,t=[0,0,0,0]){if((0,s.isName)(e))this.width=0;else if(Number.isInteger(e)){if(e>0){const r=(t[2]-t[0])/2,i=(t[3]-t[1])/2;if(r>0&&i>0&&(e>r||e>i)){(0,a.warn)(`AnnotationBorderStyle.setWidth - ignoring width: ${e}`);e=1}}this.width=e}}setStyle(e){if((0,s.isName)(e))switch(e.name){case"S":this.style=a.AnnotationBorderStyleType.SOLID;break;case"D":this.style=a.AnnotationBorderStyleType.DASHED;break;case"B":this.style=a.AnnotationBorderStyleType.BEVELED;break;case"I":this.style=a.AnnotationBorderStyleType.INSET;break;case"U":this.style=a.AnnotationBorderStyleType.UNDERLINE}}setDashArray(e){if(Array.isArray(e)&&e.length>0){let t=!0,r=!0;for(const a of e){if(!(+a>=0)){t=!1;break}a>0&&(r=!1)}t&&!r?this.dashArray=e:this.width=0}else e&&(this.width=0)}setHorizontalCornerRadius(e){Number.isInteger(e)&&(this.horizontalCornerRadius=e)}setVerticalCornerRadius(e){Number.isInteger(e)&&(this.verticalCornerRadius=e)}}t.AnnotationBorderStyle=AnnotationBorderStyle;class MarkupAnnotation extends Annotation{constructor(e){super(e);const t=e.dict;if(t.has("IRT")){const e=t.getRaw("IRT");this.data.inReplyTo=(0,s.isRef)(e)?e.toString():null;const r=t.get("RT");this.data.replyType=(0,s.isName)(r)?r.name:a.AnnotationReplyType.REPLY}if(this.data.replyType===a.AnnotationReplyType.GROUP){const e=t.get("IRT");this.setTitle(e.get("T"));this.data.titleObj=this._title;this.setContents(e.get("Contents"));this.data.contentsObj=this._contents;if(e.has("CreationDate")){this.setCreationDate(e.get("CreationDate"));this.data.creationDate=this.creationDate}else this.data.creationDate=null;if(e.has("M")){this.setModificationDate(e.get("M"));this.data.modificationDate=this.modificationDate}else this.data.modificationDate=null;this.data.hasPopup=e.has("Popup");if(e.has("C")){this.setColor(e.getArray("C"));this.data.color=this.color}else this.data.color=null}else{this.data.titleObj=this._title;this.setCreationDate(t.get("CreationDate"));this.data.creationDate=this.creationDate;this.data.hasPopup=t.has("Popup");t.has("C")||(this.data.color=null)}}setCreationDate(e){this.creationDate=(0,a.isString)(e)?e:null}_setDefaultAppearance({xref:e,extra:t,strokeColor:r,fillColor:a,blendMode:i,strokeAlpha:n,fillAlpha:o,pointsCallback:c}){let l=Number.MAX_VALUE,h=Number.MAX_VALUE,u=Number.MIN_VALUE,d=Number.MIN_VALUE;const g=["q"];t&&g.push(t);r&&g.push(`${r[0]} ${r[1]} ${r[2]} RG`);a&&g.push(`${a[0]} ${a[1]} ${a[2]} rg`);let p=this.data.quadPoints;p||(p=[[{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]}]]);for(const e of p){const[t,r,a,i]=c(g,e);l=Math.min(l,t);u=Math.max(u,r);h=Math.min(h,a);d=Math.max(d,i)}g.push("Q");const m=new s.Dict(e),b=new s.Dict(e);b.set("Subtype",s.Name.get("Form"));const y=new f.StringStream(g.join(" "));y.dict=b;m.set("Fm0",y);const w=new s.Dict(e);i&&w.set("BM",s.Name.get(i));"number"==typeof n&&w.set("CA",n);"number"==typeof o&&w.set("ca",o);const S=new s.Dict(e);S.set("GS0",w);const x=new s.Dict(e);x.set("ExtGState",S);x.set("XObject",m);const k=new s.Dict(e);k.set("Resources",x);const C=this.data.rect=[l,h,u,d];k.set("BBox",C);this.appearance=new f.StringStream("/GS0 gs /Fm0 Do");this.appearance.dict=k;this._streams.push(this.appearance,y)}}t.MarkupAnnotation=MarkupAnnotation;class WidgetAnnotation extends Annotation{constructor(e){super(e);const t=e.dict,r=this.data;this.ref=e.ref;r.annotationType=a.AnnotationType.WIDGET;void 0===r.fieldName&&(r.fieldName=this._constructFieldName(t));void 0===r.actions&&(r.actions=(0,i.collectActions)(e.xref,t,a.AnnotationActionEventType));const o=(0,i.getInheritableProperty)({dict:t,key:"V",getArray:!0});r.fieldValue=this._decodeFormValue(o);const c=(0,i.getInheritableProperty)({dict:t,key:"DV",getArray:!0});r.defaultFieldValue=this._decodeFormValue(c);void 0===o&&null!==r.defaultFieldValue&&(r.fieldValue=r.defaultFieldValue);r.alternativeText=(0,a.stringToPDFString)(t.get("TU")||"");const l=(0,i.getInheritableProperty)({dict:t,key:"DA"})||e.acroForm.get("DA");this._defaultAppearance=(0,a.isString)(l)?l:"";r.defaultAppearanceData=(0,n.parseDefaultAppearance)(this._defaultAppearance);const h=(0,i.getInheritableProperty)({dict:t,key:"FT"});r.fieldType=(0,s.isName)(h)?h.name:null;const u=(0,i.getInheritableProperty)({dict:t,key:"DR"}),d=e.acroForm.get("DR"),f=this.appearance&&this.appearance.dict.get("Resources");this._fieldResources={localResources:u,acroFormResources:d,appearanceResources:f,mergedResources:s.Dict.merge({xref:e.xref,dictArray:[u,f,d],mergeSubDicts:!0})};r.fieldFlags=(0,i.getInheritableProperty)({dict:t,key:"Ff"});(!Number.isInteger(r.fieldFlags)||r.fieldFlags<0)&&(r.fieldFlags=0);r.readOnly=this.hasFieldFlag(a.AnnotationFieldFlag.READONLY);r.hidden=this._hasFlag(r.annotationFlags,a.AnnotationFlag.HIDDEN)}_decodeFormValue(e){return Array.isArray(e)?e.filter((e=>(0,a.isString)(e))).map((e=>(0,a.stringToPDFString)(e))):(0,s.isName)(e)?(0,a.stringToPDFString)(e.name):(0,a.isString)(e)?(0,a.stringToPDFString)(e):null}hasFieldFlag(e){return!!(this.data.fieldFlags&e)}getOperatorList(e,t,r,i){return!r||this instanceof SignatureWidgetAnnotation?this._hasText?this._getAppearance(e,t,i).then((n=>{if(this.appearance&&null===n)return super.getOperatorList(e,t,r,i);const s=new d.OperatorList;if(!this._defaultAppearance||null===n)return s;const o=[1,0,0,1,0,0],c=[0,0,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1]],l=getTransformMatrix(this.data.rect,c,o);s.addOp(a.OPS.beginAnnotation,[this.data.id,this.data.rect,l,o]);const h=new f.StringStream(n);return e.getOperatorList({stream:h,task:t,resources:this._fieldResources.mergedResources,operatorList:s}).then((function(){s.addOp(a.OPS.endAnnotation,[]);return s}))})):super.getOperatorList(e,t,r,i):Promise.resolve(new d.OperatorList)}async save(e,t,r){if(!r)return null;const i=r.get(this.data.id),n=i&&i.value;if(n===this.data.fieldValue||void 0===n)return null;let o=await this._getAppearance(e,t,r);if(null===o)return null;const{xref:c}=e,l=c.fetchIfRef(this.ref);if(!(0,s.isDict)(l))return null;const h=[0,0,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1]],u={path:(0,a.stringToPDFString)(l.get("T")||""),value:n},d=c.getNewRef(),f=new s.Dict(c);f.set("N",d);const p=c.encrypt;let m=null,b=null;if(p){m=p.createCipherTransform(this.ref.num,this.ref.gen);b=p.createCipherTransform(d.num,d.gen);o=b.encryptString(o)}l.set("V",(0,a.isAscii)(n)?n:(0,a.stringToUTF16BEString)(n));l.set("AP",f);l.set("M",`D:${(0,a.getModificationDate)()}`);const y=new s.Dict(c);y.set("Length",o.length);y.set("Subtype",s.Name.get("Form"));y.set("Resources",this._getSaveFieldResources(c));y.set("BBox",h);const w=[`${this.ref.num} ${this.ref.gen} obj\n`];(0,g.writeDict)(l,w,m);w.push("\nendobj\n");const S=[`${d.num} ${d.gen} obj\n`];(0,g.writeDict)(y,S,b);S.push(" stream\n",o,"\nendstream\nendobj\n");return[{ref:this.ref,data:w.join(""),xfa:u},{ref:d,data:S.join(""),xfa:null}]}async _getAppearance(e,t,r){const i=this.hasFieldFlag(a.AnnotationFieldFlag.PASSWORD);if(!r||i)return null;const s=r.get(this.data.id);let o=s&&s.value;if(void 0===o)return null;o=o.trim();if(""===o)return"";let c=-1;this.data.multiLine&&(c=o.split(/\r\n|\r|\n/).length);const l=this.data.rect[3]-this.data.rect[1],h=this.data.rect[2]-this.data.rect[0];this._defaultAppearance||(this.data.defaultAppearanceData=(0,n.parseDefaultAppearance)(this._defaultAppearance="/Helvetica 0 Tf 0 g"));const[u,d]=this._computeFontSize(l,c),f=await this._getFontData(e,t);let g=f.descent;isNaN(g)&&(g=0);const p=2+Math.abs(g)*d,m=this.data.textAlignment;if(this.data.multiLine)return this._getMultilineAppearance(u,o,f,d,h,l,m,2,p);const b=f.encodeString(o).join("");if(this.data.comb)return this._getCombAppearance(u,f,b,h,2,p);if(0===m||m>2)return"/Tx BMC q BT "+u+` 1 0 0 1 2 ${p} Tm (${(0,a.escapeString)(b)}) Tj ET Q EMC`;return"/Tx BMC q BT "+u+` 1 0 0 1 0 0 Tm ${this._renderText(b,f,d,h,m,2,p)} ET Q EMC`}async _getFontData(e,t){const r=new d.OperatorList,a={font:null,clone(){return this}},{fontName:i,fontSize:n}=this.data.defaultAppearanceData;await e.handleSetFont(this._fieldResources.mergedResources,[i&&s.Name.get(i),n],null,r,t,a,null);return a.font}_computeFontSize(e,t){let{fontSize:r}=this.data.defaultAppearanceData;if(!r){const roundWithOneDigit=e=>Math.round(10*e)/10,a=.8;if(-1===t)r=roundWithOneDigit(a*e);else{r=10;let i=r/a,n=Math.round(e/i);n=Math.max(n,t);i=e/n;r=roundWithOneDigit(a*i)}const{fontName:i,fontColor:s}=this.data.defaultAppearanceData;this._defaultAppearance=(0,n.createDefaultAppearance)({fontSize:r,fontName:i,fontColor:s})}return[this._defaultAppearance,r]}_renderText(e,t,r,i,n,s,o){const c=t.charsToGlyphs(e),l=r/1e3;let h,u=0;for(const e of c)u+=e.width*l;h=1===n?(i-u)/2:2===n?i-u-s:s;h=h.toFixed(2);return`${h} ${o=o.toFixed(2)} Td (${(0,a.escapeString)(e)}) Tj`}_getSaveFieldResources(e){const{localResources:t,appearanceResources:r,acroFormResources:a}=this._fieldResources,i=this.data.defaultAppearanceData&&this.data.defaultAppearanceData.fontName;if(!i)return t||s.Dict.empty;for(const e of[t,r])if(e instanceof s.Dict){const t=e.get("Font");if(t instanceof s.Dict&&t.has(i))return e}if(a instanceof s.Dict){const r=a.get("Font");if(r instanceof s.Dict&&r.has(i)){const a=new s.Dict(e);a.set(i,r.getRaw(i));const n=new s.Dict(e);n.set("Font",a);return s.Dict.merge({xref:e,dictArray:[n,t],mergeSubDicts:!0})}}return t||s.Dict.empty}getFieldObject(){return null}}class TextWidgetAnnotation extends WidgetAnnotation{constructor(e){super(e);this._hasText=!0;const t=e.dict;(0,a.isString)(this.data.fieldValue)||(this.data.fieldValue="");let r=(0,i.getInheritableProperty)({dict:t,key:"Q"});(!Number.isInteger(r)||r<0||r>2)&&(r=null);this.data.textAlignment=r;let n=(0,i.getInheritableProperty)({dict:t,key:"MaxLen"});(!Number.isInteger(n)||n<0)&&(n=null);this.data.maxLen=n;this.data.multiLine=this.hasFieldFlag(a.AnnotationFieldFlag.MULTILINE);this.data.comb=this.hasFieldFlag(a.AnnotationFieldFlag.COMB)&&!this.hasFieldFlag(a.AnnotationFieldFlag.MULTILINE)&&!this.hasFieldFlag(a.AnnotationFieldFlag.PASSWORD)&&!this.hasFieldFlag(a.AnnotationFieldFlag.FILESELECT)&&null!==this.data.maxLen}_getCombAppearance(e,t,r,i,n,s){const o=(i/this.data.maxLen).toFixed(2),c=[],l=t.getCharPositions(r);for(const[e,t]of l)c.push(`(${(0,a.escapeString)(r.substring(e,t))}) Tj`);return"/Tx BMC q BT "+e+` 1 0 0 1 ${n} ${s} Tm ${c.join(` ${o} 0 Td `)} ET Q EMC`}_getMultilineAppearance(e,t,r,a,i,n,s,o,c){const l=t.split(/\r\n|\r|\n/),h=[],u=i-2*o;for(const e of l){const t=this._splitLine(e,r,a,u);for(const e of t){const t=0===h.length?o:0;h.push(this._renderText(e,r,a,i,s,t,-a))}}return"/Tx BMC q BT "+e+` 1 0 0 1 0 ${n} Tm ${h.join("\n")} ET Q EMC`}_splitLine(e,t,r,a){e=t.encodeString(e).join("");const i=t.charsToGlyphs(e);if(i.length<=1)return[e];const n=t.getCharPositions(e),s=r/1e3,o=[];let c=-1,l=-1,h=-1,u=0,d=0;for(let t=0,r=i.length;ta){o.push(e.substring(u,r));u=r;d=p;c=-1;h=-1}else{d+=p;c=r;l=f;h=t}else if(d+p>a)if(-1!==c){o.push(e.substring(u,l));u=l;t=h+1;c=-1;d=0}else{o.push(e.substring(u,r));u=r;d=p}else d+=p}u"Off"!==e));n.length=0;n.push("Off",e)}n.includes(this.data.fieldValue)||(this.data.fieldValue="Off");this.data.exportValue=n[1];this.checkedAppearance=r.get(this.data.exportValue)||null;this.uncheckedAppearance=r.get("Off")||null;this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(e,"check");this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance);this._fallbackFontDict=this.fallbackFontDict}_processRadioButton(e){this.data.fieldValue=this.data.buttonValue=null;const t=e.dict.get("Parent");if((0,s.isDict)(t)){this.parent=e.dict.getRaw("Parent");const r=t.get("V");(0,s.isName)(r)&&(this.data.fieldValue=this._decodeFormValue(r))}const r=e.dict.get("AP");if(!(0,s.isDict)(r))return;const a=r.get("N");if((0,s.isDict)(a)){for(const e of a.getKeys())if("Off"!==e){this.data.buttonValue=this._decodeFormValue(e);break}this.checkedAppearance=a.get(this.data.buttonValue)||null;this.uncheckedAppearance=a.get("Off")||null;this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(e,"disc");this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance);this._fallbackFontDict=this.fallbackFontDict}}_processPushButton(e){if(e.dict.has("A")||e.dict.has("AA")||this.data.alternativeText){this.data.isTooltipOnly=!e.dict.has("A")&&!e.dict.has("AA");c.Catalog.parseDestDictionary({destDict:e.dict,resultObj:this.data,docBaseUrl:e.pdfManager.docBaseUrl})}else(0,a.warn)("Push buttons without action dictionaries are not supported")}getFieldObject(){let e,t="button";if(this.data.checkBox){t="checkbox";e=this.data.exportValue}else if(this.data.radioButton){t="radiobutton";e=this.data.buttonValue}return{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,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,type:t}}get fallbackFontDict(){const e=new s.Dict;e.set("BaseFont",s.Name.get("ZapfDingbats"));e.set("Type",s.Name.get("FallbackType"));e.set("Subtype",s.Name.get("FallbackType"));e.set("Encoding",s.Name.get("ZapfDingbatsEncoding"));return(0,a.shadow)(this,"fallbackFontDict",e)}}class ChoiceWidgetAnnotation extends WidgetAnnotation{constructor(e){super(e);this.data.options=[];const t=(0,i.getInheritableProperty)({dict:e.dict,key:"Opt"});if(Array.isArray(t)){const r=e.xref;for(let e=0,a=t.length;e0?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,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,type:e}}}class SignatureWidgetAnnotation extends WidgetAnnotation{constructor(e){super(e);this.data.fieldValue=null}getFieldObject(){return{id:this.data.id,value:null,page:this.data.pageIndex,type:"signature"}}}class TextAnnotation extends MarkupAnnotation{constructor(e){super(e);const t=e.dict;this.data.annotationType=a.AnnotationType.TEXT;if(this.data.hasAppearance)this.data.name="NoIcon";else{this.data.rect[1]=this.data.rect[3]-22;this.data.rect[2]=this.data.rect[0]+22;this.data.name=t.has("Name")?t.get("Name").name:"Note"}if(t.has("State")){this.data.state=t.get("State")||null;this.data.stateModel=t.get("StateModel")||null}else{this.data.state=null;this.data.stateModel=null}}}class LinkAnnotation extends Annotation{constructor(e){super(e);this.data.annotationType=a.AnnotationType.LINK;const t=getQuadPoints(e.dict,this.rectangle);t&&(this.data.quadPoints=t);c.Catalog.parseDestDictionary({destDict:e.dict,resultObj:this.data,docBaseUrl:e.pdfManager.docBaseUrl})}}class PopupAnnotation extends Annotation{constructor(e){super(e);this.data.annotationType=a.AnnotationType.POPUP;let t=e.dict.get("Parent");if(!t){(0,a.warn)("Popup annotation has a missing or invalid parent annotation.");return}const r=t.get("Subtype");this.data.parentType=(0,s.isName)(r)?r.name:null;const i=e.dict.getRaw("Parent");this.data.parentId=(0,s.isRef)(i)?i.toString():null;const n=t.getArray("Rect");Array.isArray(n)&&4===n.length?this.data.parentRect=a.Util.normalizeRect(n):this.data.parentRect=[0,0,0,0];const o=t.get("RT");(0,s.isName)(o,a.AnnotationReplyType.GROUP)&&(t=t.get("IRT"));if(t.has("M")){this.setModificationDate(t.get("M"));this.data.modificationDate=this.modificationDate}else this.data.modificationDate=null;if(t.has("C")){this.setColor(t.getArray("C"));this.data.color=this.color}else this.data.color=null;if(!this.viewable){const e=t.get("F");this._isViewable(e)&&this.setFlags(e)}this.setTitle(t.get("T"));this.data.titleObj=this._title;this.setContents(t.get("Contents"));this.data.contentsObj=this._contents}}class FreeTextAnnotation extends MarkupAnnotation{constructor(e){super(e);this.data.annotationType=a.AnnotationType.FREETEXT}}class LineAnnotation extends MarkupAnnotation{constructor(e){super(e);this.data.annotationType=a.AnnotationType.LINE;const t=e.dict.getArray("L");this.data.lineCoordinates=a.Util.normalizeRect(t);if(!this.appearance){const r=this.color?Array.from(this.color).map((e=>e/255)):[0,0,0],i=e.dict.get("CA");let n=null,s=e.dict.getArray("IC");if(s){s=getRgbColor(s,null);n=s?Array.from(s).map((e=>e/255)):null}const o=n?i:null,c=this.borderStyle.width||1,l=2*c,h=[this.data.lineCoordinates[0]-l,this.data.lineCoordinates[1]-l,this.data.lineCoordinates[2]+l,this.data.lineCoordinates[3]+l];a.Util.intersect(this.rectangle,h)||(this.rectangle=h);this._setDefaultAppearance({xref:e.xref,extra:`${c} w`,strokeColor:r,fillColor:n,strokeAlpha:i,fillAlpha:o,pointsCallback:(e,r)=>{e.push(`${t[0]} ${t[1]} m`,`${t[2]} ${t[3]} l`,"S");return[r[0].x-c,r[1].x+c,r[3].y-c,r[1].y+c]}})}}}class SquareAnnotation extends MarkupAnnotation{constructor(e){super(e);this.data.annotationType=a.AnnotationType.SQUARE;if(!this.appearance){const t=this.color?Array.from(this.color).map((e=>e/255)):[0,0,0],r=e.dict.get("CA");let a=null,i=e.dict.getArray("IC");if(i){i=getRgbColor(i,null);a=i?Array.from(i).map((e=>e/255)):null}const n=a?r:null;this._setDefaultAppearance({xref:e.xref,extra:`${this.borderStyle.width} w`,strokeColor:t,fillColor:a,strokeAlpha:r,fillAlpha:n,pointsCallback:(e,t)=>{const r=t[2].x+this.borderStyle.width/2,i=t[2].y+this.borderStyle.width/2,n=t[3].x-t[2].x-this.borderStyle.width,s=t[1].y-t[3].y-this.borderStyle.width;e.push(`${r} ${i} ${n} ${s} re`);a?e.push("B"):e.push("S");return[t[0].x,t[1].x,t[3].y,t[1].y]}})}}}class CircleAnnotation extends MarkupAnnotation{constructor(e){super(e);this.data.annotationType=a.AnnotationType.CIRCLE;if(!this.appearance){const t=this.color?Array.from(this.color).map((e=>e/255)):[0,0,0],r=e.dict.get("CA");let a=null,i=e.dict.getArray("IC");if(i){i=getRgbColor(i,null);a=i?Array.from(i).map((e=>e/255)):null}const n=a?r:null,s=4/3*Math.tan(Math.PI/8);this._setDefaultAppearance({xref:e.xref,extra:`${this.borderStyle.width} w`,strokeColor:t,fillColor:a,strokeAlpha:r,fillAlpha:n,pointsCallback:(e,t)=>{const r=t[0].x+this.borderStyle.width/2,i=t[0].y-this.borderStyle.width/2,n=t[3].x-this.borderStyle.width/2,o=t[3].y+this.borderStyle.width/2,c=r+(n-r)/2,l=i+(o-i)/2,h=(n-r)/2*s,u=(o-i)/2*s;e.push(`${c} ${o} m`,`${c+h} ${o} ${n} ${l+u} ${n} ${l} c`,`${n} ${l-u} ${c+h} ${i} ${c} ${i} c`,`${c-h} ${i} ${r} ${l-u} ${r} ${l} c`,`${r} ${l+u} ${c-h} ${o} ${c} ${o} c`,"h");a?e.push("B"):e.push("S");return[t[0].x,t[1].x,t[3].y,t[1].y]}})}}}class PolylineAnnotation extends MarkupAnnotation{constructor(e){super(e);this.data.annotationType=a.AnnotationType.POLYLINE;this.data.vertices=[];const t=e.dict.getArray("Vertices");if(Array.isArray(t)){for(let e=0,r=t.length;ee/255)):[0,0,0],r=e.dict.get("CA"),i=this.borderStyle.width||1,n=2*i,s=[1/0,1/0,-1/0,-1/0];for(const e of this.data.vertices){s[0]=Math.min(s[0],e.x-n);s[1]=Math.min(s[1],e.y-n);s[2]=Math.max(s[2],e.x+n);s[3]=Math.max(s[3],e.y+n)}a.Util.intersect(this.rectangle,s)||(this.rectangle=s);this._setDefaultAppearance({xref:e.xref,extra:`${i} w`,strokeColor:t,strokeAlpha:r,pointsCallback:(e,t)=>{const r=this.data.vertices;for(let t=0,a=r.length;te/255)):[0,0,0],r=e.dict.get("CA"),i=this.borderStyle.width||1,n=2*i,s=[1/0,1/0,-1/0,-1/0];for(const e of this.data.inkLists)for(const t of e){s[0]=Math.min(s[0],t.x-n);s[1]=Math.min(s[1],t.y-n);s[2]=Math.max(s[2],t.x+n);s[3]=Math.max(s[3],t.y+n)}a.Util.intersect(this.rectangle,s)||(this.rectangle=s);this._setDefaultAppearance({xref:e.xref,extra:`${i} w`,strokeColor:t,strokeAlpha:r,pointsCallback:(e,t)=>{for(const t of this.data.inkLists){for(let r=0,a=t.length;re/255)):[1,1,0],r=e.dict.get("CA");this._setDefaultAppearance({xref:e.xref,fillColor:t,blendMode:"Multiply",fillAlpha:r,pointsCallback:(e,t)=>{e.push(`${t[0].x} ${t[0].y} m`,`${t[1].x} ${t[1].y} l`,`${t[3].x} ${t[3].y} l`,`${t[2].x} ${t[2].y} l`,"f");return[t[0].x,t[1].x,t[3].y,t[1].y]}})}}else this.data.hasPopup=!1}}class UnderlineAnnotation extends MarkupAnnotation{constructor(e){super(e);this.data.annotationType=a.AnnotationType.UNDERLINE;if(this.data.quadPoints=getQuadPoints(e.dict,null)){if(!this.appearance){const t=this.color?Array.from(this.color).map((e=>e/255)):[0,0,0],r=e.dict.get("CA");this._setDefaultAppearance({xref:e.xref,extra:"[] 0 d 1 w",strokeColor:t,strokeAlpha:r,pointsCallback:(e,t)=>{e.push(`${t[2].x} ${t[2].y} m`,`${t[3].x} ${t[3].y} l`,"S");return[t[0].x,t[1].x,t[3].y,t[1].y]}})}}else this.data.hasPopup=!1}}class SquigglyAnnotation extends MarkupAnnotation{constructor(e){super(e);this.data.annotationType=a.AnnotationType.SQUIGGLY;if(this.data.quadPoints=getQuadPoints(e.dict,null)){if(!this.appearance){const t=this.color?Array.from(this.color).map((e=>e/255)):[0,0,0],r=e.dict.get("CA");this._setDefaultAppearance({xref:e.xref,extra:"[] 0 d 1 w",strokeColor:t,strokeAlpha:r,pointsCallback:(e,t)=>{const r=(t[0].y-t[2].y)/6;let a=r,i=t[2].x;const n=t[2].y,s=t[3].x;e.push(`${i} ${n+a} m`);do{i+=2;a=0===a?r:0;e.push(`${i} ${n+a} l`)}while(ie/255)):[0,0,0],r=e.dict.get("CA");this._setDefaultAppearance({xref:e.xref,extra:"[] 0 d 1 w",strokeColor:t,strokeAlpha:r,pointsCallback:(e,t)=>{e.push((t[0].x+t[2].x)/2+" "+(t[0].y+t[2].y)/2+" m",(t[1].x+t[3].x)/2+" "+(t[1].y+t[3].y)/2+" l","S");return[t[0].x,t[1].x,t[3].y,t[1].y]}})}}else this.data.hasPopup=!1}}class StampAnnotation extends MarkupAnnotation{constructor(e){super(e);this.data.annotationType=a.AnnotationType.STAMP}}class FileAttachmentAnnotation extends MarkupAnnotation{constructor(e){super(e);const t=new h.FileSpec(e.dict.get("FS"),e.xref);this.data.annotationType=a.AnnotationType.FILEATTACHMENT;this.data.file=t.serializable}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.createDefaultAppearance=function createDefaultAppearance({fontSize:e,fontName:t,fontColor:r}){let a;a=r.every((e=>0===e))?"0 g":Array.from(r).map((e=>(e/255).toFixed(2))).join(" ")+" rg";return`/${(0,n.escapePDFName)(t)} ${e} Tf ${a}`};t.parseDefaultAppearance=function parseDefaultAppearance(e){return new DefaultAppearanceEvaluator(e).parse()};var a=r(2),i=r(24),n=r(9),s=r(25),o=r(5),c=r(10);class DefaultAppearanceEvaluator extends s.EvaluatorPreprocessor{constructor(e){super(new c.StringStream(e))}parse(){const e={fn:0,args:[]},t={fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3)};try{for(;;){e.args.length=0;if(!this.read(e))break;if(0!==this.savedStatesDepth)continue;const{fn:r,args:n}=e;switch(0|r){case a.OPS.setFont:const[e,r]=n;e instanceof o.Name&&(t.fontName=e.name);"number"==typeof r&&r>0&&(t.fontSize=r);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: "${e}".`)}return t}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.ColorSpace=void 0;var a=r(2),i=r(5),n=r(9);class ColorSpace{constructor(e,t){this.constructor===ColorSpace&&(0,a.unreachable)("Cannot initialize ColorSpace.");this.name=e;this.numComps=t}getRgb(e,t){const r=new Uint8ClampedArray(3);this.getRgbItem(e,t,r,0);return r}getRgbItem(e,t,r,i){(0,a.unreachable)("Should not call ColorSpace.getRgbItem")}getRgbBuffer(e,t,r,i,n,s,o){(0,a.unreachable)("Should not call ColorSpace.getRgbBuffer")}getOutputLength(e,t){(0,a.unreachable)("Should not call ColorSpace.getOutputLength")}isPassthrough(e){return!1}isDefaultDecode(e,t){return ColorSpace.isDefaultDecode(e,this.numComps)}fillRgb(e,t,r,a,i,n,s,o,c){const l=t*r;let h=null;const u=1<u&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){const t=s<=8?new Uint8Array(u):new Uint16Array(u);for(let e=0;e=.99554525?1:adjustToRange(0,1,1.055*e**(1/2.4)-.055)}function adjustToRange(e,t,r){return Math.max(e,Math.min(t,r))}function decodeL(e){return e<0?-decodeL(-e):e>8?((e+16)/116)**3:.0011070564598794539*e}function convertToRgb(a,c,l,h,u,d){const f=adjustToRange(0,1,c[l]*d),g=adjustToRange(0,1,c[l+1]*d),p=adjustToRange(0,1,c[l+2]*d),m=1===f?1:f**a.GR,b=1===g?1:g**a.GG,y=1===p?1:p**a.GB,w=a.MXA*m+a.MXB*b+a.MXC*y,S=a.MYA*m+a.MYB*b+a.MYC*y,x=a.MZA*m+a.MZB*b+a.MZC*y,k=s;k[0]=w;k[1]=S;k[2]=x;const C=o;!function normalizeWhitePointToFlat(r,a,i){if(1===r[0]&&1===r[2]){i[0]=a[0];i[1]=a[1];i[2]=a[2];return}const s=i;matrixProduct(e,a,s);const o=n;!function convertToFlat(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,s,o);matrixProduct(t,o,i)}(a.whitePoint,k,C);const v=s;!function compensateBlackPoint(e,t,r){if(0===e[0]&&0===e[1]&&0===e[2]){r[0]=t[0];r[1]=t[1];r[2]=t[2];return}const a=decodeL(0),i=(1-a)/(1-decodeL(e[0])),n=1-i,s=(1-a)/(1-decodeL(e[1])),o=1-s,c=(1-a)/(1-decodeL(e[2])),l=1-c;r[0]=t[0]*i+n;r[1]=t[1]*s+o;r[2]=t[2]*c+l}(a.blackPoint,C,v);const F=o;!function normalizeWhitePointToD65(r,a,i){const s=i;matrixProduct(e,a,s);const o=n;!function convertToD65(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,s,o);matrixProduct(t,o,i)}(i,v,F);const O=s;matrixProduct(r,F,O);h[u]=255*sRGBTransferFunction(O[0]);h[u+1]=255*sRGBTransferFunction(O[1]);h[u+2]=255*sRGBTransferFunction(O[2])}return class CalRGBCS extends ColorSpace{constructor(e,t,r,i){super("CalRGB",3);if(!e)throw new a.FormatError("WhitePoint missing - required for color space CalRGB");t=t||new Float32Array(3);r=r||new Float32Array([1,1,1]);i=i||new Float32Array([1,0,0,0,1,0,0,0,1]);const n=e[0],s=e[1],o=e[2];this.whitePoint=e;const c=t[0],l=t[1],h=t[2];this.blackPoint=t;this.GR=r[0];this.GG=r[1];this.GB=r[2];this.MXA=i[0];this.MYA=i[1];this.MZA=i[2];this.MXB=i[3];this.MYB=i[4];this.MZB=i[5];this.MXC=i[6];this.MYC=i[7];this.MZC=i[8];if(n<0||o<0||1!==s)throw new a.FormatError(`Invalid WhitePoint components for ${this.name}, no fallback available`);if(c<0||l<0||h<0){(0,a.info)(`Invalid BlackPoint for ${this.name} [${c}, ${l}, ${h}], falling back to default.`);this.blackPoint=new Float32Array(3)}if(this.GR<0||this.GG<0||this.GB<0){(0,a.info)(`Invalid Gamma [${this.GR}, ${this.GG}, ${this.GB}] for ${this.name}, falling back to default.`);this.GR=this.GG=this.GB=1}}getRgbItem(e,t,r,a){convertToRgb(this,e,t,r,a,1)}getRgbBuffer(e,t,r,a,i,n,s){const o=1/((1<=6/29?e**3:108/841*(e-4/29);return t}function decode(e,t,r,a){return r+e*(a-r)/t}function convertToRgb(e,t,r,a,i,n){let s=t[r],o=t[r+1],c=t[r+2];if(!1!==a){s=decode(s,a,0,100);o=decode(o,a,e.amin,e.amax);c=decode(c,a,e.bmin,e.bmax)}o>e.amax?o=e.amax:oe.bmax?c=e.bmax:cthis.amax||this.bmin>this.bmax){(0,a.info)("Invalid Range, falling back to defaults");this.amin=-100;this.amax=100;this.bmin=-100;this.bmax=100}}getRgbItem(e,t,r,a){convertToRgb(this,e,t,!1,r,a)}getRgbBuffer(e,t,r,a,i,n,s){const o=(1<{Object.defineProperty(t,"__esModule",{value:!0});t.PartialEvaluator=t.EvaluatorPreprocessor=void 0;var a=r(2),i=r(26),n=r(5),s=r(44),o=r(18),c=r(19),l=r(47),h=r(21),u=r(55),d=r(12),f=r(48),g=r(56),p=r(27),m=r(58),b=r(10),y=r(59),w=r(24),S=r(29),x=r(20),k=r(9),C=r(60),v=r(61),F=r(62),O=r(63);const T=Object.freeze({maxImageSize:-1,disableFontFace:!1,ignoreErrors:!1,isEvalSupported:!0,fontExtraProperties:!1,useSystemFonts:!0,cMapUrl:null,standardFontDataUrl:null}),M=1,E=2,D=Promise.resolve();function normalizeBlendMode(e,t=!1){if(Array.isArray(e)){for(let t=0,r=e.length;t{t.put(e)}));return!1}async fetchBuiltInCMap(e){const t=this.builtInCMapCache.get(e);if(t)return t;let r;if(null!==this.options.cMapUrl){const t=`${this.options.cMapUrl}${e}.bcmap`,i=await fetch(t);if(!i.ok)throw new Error(`fetchBuiltInCMap: failed to fetch file "${t}" with "${i.statusText}".`);r={cMapData:new Uint8Array(await i.arrayBuffer()),compressionType:a.CMapCompressionType.BINARY}}else r=await this.handler.sendWithPromise("FetchBuiltInCMap",{name:e});r.compressionType!==a.CMapCompressionType.NONE&&this.builtInCMapCache.set(e,r);return r}async fetchStandardFontData(e){const t=this.standardFontDataCache.get(e);if(t)return new b.Stream(t);if(this.options.useSystemFonts&&"Symbol"!==e&&"ZapfDingbats"!==e)return null;const r=(0,l.getFontNameToFileMap)()[e];let i;if(null!==this.options.standardFontDataUrl){const e=`${this.options.standardFontDataUrl}${r}`,t=await fetch(e);t.ok?i=await t.arrayBuffer():(0,a.warn)(`fetchStandardFontData: failed to fetch file "${e}" with "${t.statusText}".`)}else try{i=await this.handler.sendWithPromise("FetchStandardFontData",{filename:r})}catch(e){(0,a.warn)(`fetchStandardFontData: failed to fetch file "${r}" with "${e}".`)}if(!i)return null;this.standardFontDataCache.set(e,i);return new b.Stream(i)}async buildFormXObject(e,t,r,i,s,o,c){const l=t.dict,h=l.getArray("Matrix");let u,d,f=l.getArray("BBox");f=Array.isArray(f)&&4===f.length?a.Util.normalizeRect(f):null;l.has("OC")&&(u=await this.parseMarkedContentProps(l.get("OC"),e));void 0!==u&&i.addOp(a.OPS.beginMarkedContentProps,["OC",u]);const g=l.get("Group");if(g){d={matrix:h,bbox:f,smask:r,isolated:!1,knockout:!1};const t=g.get("S");let s=null;if((0,n.isName)(t,"Transparency")){d.isolated=g.get("I")||!1;d.knockout=g.get("K")||!1;if(g.has("CS")){const t=g.getRaw("CS"),r=w.ColorSpace.getCached(t,this.xref,c);s=r||await this.parseColorSpace({cs:t,resources:e,localColorSpaceCache:c})}}if(r&&r.backdrop){s=s||w.ColorSpace.singletons.rgb;r.backdrop=s.getRgb(r.backdrop,0)}i.addOp(a.OPS.beginGroup,[d])}i.addOp(a.OPS.paintFormXObjectBegin,[h,f]);return this.getOperatorList({stream:t,task:s,resources:l.get("Resources")||e,operatorList:i,initialState:o}).then((function(){i.addOp(a.OPS.paintFormXObjectEnd,[]);g&&i.addOp(a.OPS.endGroup,[d]);void 0!==u&&i.addOp(a.OPS.endMarkedContent,[])}))}_sendImgData(e,t,r=!1){const a=t?[t.data.buffer]:null;return this.parsingType3Font||r?this.handler.send("commonobj",[e,"Image",t],a):this.handler.send("obj",[e,this.pageIndex,"Image",t],a)}async buildPaintImageXObject({resources:e,image:t,isInline:r=!1,operatorList:i,cacheKey:n,localImageCache:s,localColorSpaceCache:o}){const c=t.dict,l=c.objId,h=c.get("Width","W"),u=c.get("Height","H");if(!(h&&(0,a.isNum)(h)&&u&&(0,a.isNum)(u))){(0,a.warn)("Image dimensions are missing, or not numbers.");return}const d=this.options.maxImageSize;if(-1!==d&&h*u>d){(0,a.warn)("Image exceeded maximum allowed size and was removed.");return}let f;c.has("OC")&&(f=await this.parseMarkedContentProps(c.get("OC"),e));void 0!==f&&i.addOp(a.OPS.beginMarkedContentProps,["OC",f]);const g=c.get("ImageMask","IM")||!1,p=c.get("Interpolate","I");let m,b;if(g){const e=c.get("Width","W"),r=c.get("Height","H"),o=e+7>>3,h=t.getBytes(o*r,!0),u=c.getArray("Decode","D");m=O.PDFImage.createMask({imgArray:h,width:e,height:r,imageIsFromDecodeStream:t instanceof S.DecodeStream,inverseDecode:!!u&&u[0]>0,interpolate:p});m.cached=!!n;b=[m];i.addOp(a.OPS.paintImageMaskXObject,b);n&&s.set(n,l,{fn:a.OPS.paintImageMaskXObject,args:b});void 0!==f&&i.addOp(a.OPS.endMarkedContent,[]);return}const y=c.get("SMask","SM")||!1,w=c.get("Mask")||!1;if(r&&!y&&!w&&h+u<200){const n=new O.PDFImage({xref:this.xref,res:e,image:t,isInline:r,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:o});m=n.createImageData(!0);i.addOp(a.OPS.paintInlineImageXObject,[m]);void 0!==f&&i.addOp(a.OPS.endMarkedContent,[]);return}let x=`img_${this.idFactory.createObjId()}`,k=!1;if(this.parsingType3Font)x=`${this.idFactory.getDocId()}_type3_${x}`;else if(l){k=this.globalImageCache.shouldCache(l,this.pageIndex);k&&(x=`${this.idFactory.getDocId()}_${x}`)}i.addDependency(x);b=[x,h,u];O.PDFImage.buildImage({xref:this.xref,res:e,image:t,isInline:r,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:o}).then((e=>{m=e.createImageData(!1);n&&l&&k&&this.globalImageCache.addByteSize(l,m.data.length);return this._sendImgData(x,m,k)})).catch((e=>{(0,a.warn)(`Unable to decode image "${x}": "${e}".`);return this._sendImgData(x,null,k)}));i.addOp(a.OPS.paintImageXObject,b);if(n){s.set(n,l,{fn:a.OPS.paintImageXObject,args:b});if(l){(0,a.assert)(!r,"Cannot cache an inline image globally.");this.globalImageCache.addPageIndex(l,this.pageIndex);k&&this.globalImageCache.setData(l,{objId:x,fn:a.OPS.paintImageXObject,args:b,byteSize:0})}}void 0!==f&&i.addOp(a.OPS.endMarkedContent,[])}handleSMask(e,t,r,a,i,n){const s=e.get("G"),o={subtype:e.get("S").name,backdrop:e.get("BC")},c=e.get("TR");if((0,g.isPDFFunction)(c)){const e=this._pdfFunctionFactory.create(c),t=new Uint8Array(256),r=new Float32Array(1);for(let a=0;a<256;a++){r[0]=a/255;e(r,0,r,0);t[a]=255*r[0]|0}o.transferMap=t}return this.buildFormXObject(t,s,o,r,a,i.state.clone(),n)}handleTransferFunction(e){let t;if(Array.isArray(e))t=e;else{if(!(0,g.isPDFFunction)(e))return null;t=[e]}const r=[];let a=0,i=0;for(const e of t){const t=this.xref.fetchIfRef(e);a++;if((0,n.isName)(t,"Identity")){r.push(null);continue}if(!(0,g.isPDFFunction)(t))return null;const s=this._pdfFunctionFactory.create(t),o=new Uint8Array(256),c=new Float32Array(1);for(let e=0;e<256;e++){c[0]=e/255;s(c,0,c,0);o[e]=255*c[0]|0}r.push(o);i++}return 1!==a&&4!==a||0===i?null:r}handleTilingType(e,t,r,i,s,o,c,l){const h=new F.OperatorList,d=n.Dict.merge({xref:this.xref,dictArray:[s.get("Resources"),r]});return this.getOperatorList({stream:i,task:c,resources:d,operatorList:h}).then((function(){const r=h.getIR(),a=(0,u.getTilingPatternIR)(r,s,t);o.addDependencies(h.dependencies);o.addOp(e,a);s.objId&&l.set(null,s.objId,{operatorListIR:r,dict:s})})).catch((e=>{if(!(e instanceof a.AbortException)){if(!this.options.ignoreErrors)throw e;this.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorTilingPattern});(0,a.warn)(`handleTilingType - ignoring pattern: "${e}".`)}}))}handleSetFont(e,t,r,i,o,c,l=null,h=null){const u=t&&t[0]instanceof n.Name?t[0].name:null;return this.loadFont(u,r,e,l,h).then((t=>t.font.isType3Font?t.loadType3Data(this,e,o).then((function(){i.addDependencies(t.type3Dependencies);return t})).catch((e=>{this.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorFontLoadType3});return new TranslatedFont({loadedName:"g_font_error",font:new s.ErrorFont(`Type3 font load error: ${e}`),dict:t.font,evaluatorOptions:this.options})})):t)).then((e=>{c.font=e.font;e.send(this.handler);return e.loadedName}))}handleText(e,t){const r=t.font,i=r.charsToGlyphs(e);if(r.data){(!!(t.textRenderingMode&a.TextRenderingMode.ADD_TO_PATH_FLAG)||"Pattern"===t.fillColorSpace.name||r.disableFontFace||this.options.disableFontFace)&&PartialEvaluator.buildFontPaths(r,i,this.handler,this.options)}return i}ensureStateFont(e){if(e.font)return;const t=new a.FormatError("Missing setFont (Tf) operator before text rendering operator.");if(!this.options.ignoreErrors)throw t;this.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorFontState});(0,a.warn)(`ensureStateFont: "${t}".`)}async setGState({resources:e,gState:t,operatorList:r,cacheKey:i,task:s,stateManager:o,localGStateCache:c,localColorSpaceCache:l}){const h=t.objId;let u=!0;const d=[],f=t.getKeys();let g=Promise.resolve();for(let i=0,c=f.length;ithis.handleSetFont(e,null,h[0],r,s,o.state).then((function(e){r.addDependency(e);d.push([c,[e,h[1]]])}))));break;case"BM":d.push([c,normalizeBlendMode(h)]);break;case"SMask":if((0,n.isName)(h,"None")){d.push([c,!1]);break}if((0,n.isDict)(h)){u=!1;g=g.then((()=>this.handleSMask(h,e,r,s,o,l)));d.push([c,!0])}else(0,a.warn)("Unsupported SMask type");break;case"TR":const t=this.handleTransferFunction(h);d.push([c,t]);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 "+c);break;default:(0,a.info)("Unknown graphic state operator "+c)}}return g.then((function(){d.length>0&&r.addOp(a.OPS.setGState,[d]);u&&c.set(i,h,d)}))}loadFont(e,t,r,i=null,c=null){const errorFont=async()=>new TranslatedFont({loadedName:"g_font_error",font:new s.ErrorFont(`Font "${e}" is not available.`),dict:t,evaluatorOptions:this.options}),l=this.xref;let h;if(t){if(!(0,n.isRef)(t))throw new a.FormatError('The "font" object should be a reference.');h=t}else{const t=r.get("Font");t&&(h=t.getRaw(e))}if(!h){const r=`Font "${e||t&&t.toString()}" is not available`;if(!this.options.ignoreErrors&&!this.parsingType3Font){(0,a.warn)(`${r}.`);return errorFont()}this.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorFontMissing});(0,a.warn)(`${r} -- attempting to fallback to a default font.`);h=i||PartialEvaluator.fallbackFontDict}if(this.fontCache.has(h))return this.fontCache.get(h);t=l.fetchIfRef(h);if(!(0,n.isDict)(t))return errorFont();if(t.cacheKey&&this.fontCache.has(t.cacheKey))return this.fontCache.get(t.cacheKey);const u=(0,a.createPromiseCapability)();let d;try{d=this.preEvaluateFont(t);d.cssFontInfo=c}catch(e){(0,a.warn)(`loadFont - preEvaluateFont failed: "${e}".`);return errorFont()}const{descriptor:f,hash:g}=d,p=(0,n.isRef)(h);let m;p&&(m=`f${h.toString()}`);if(g&&(0,n.isDict)(f)){f.fontAliases||(f.fontAliases=Object.create(null));const e=f.fontAliases;if(e[g]){const t=e[g].aliasRef;if(p&&t&&this.fontCache.has(t)){this.fontCache.putAlias(h,t);return this.fontCache.get(h)}}else e[g]={fontID:this.idFactory.createFontId()};p&&(e[g].aliasRef=h);m=e[g].fontID}if(p)this.fontCache.put(h,u.promise);else{m||(m=this.idFactory.createFontId());t.cacheKey=`cacheKey_${m}`;this.fontCache.put(t.cacheKey,u.promise)}(0,a.assert)(m&&m.startsWith("f"),'The "fontID" must be (correctly) defined.');t.loadedName=`${this.idFactory.getDocId()}_${m}`;this.translateFont(d).then((e=>{if(void 0!==e.fontType){l.stats.fontTypes[e.fontType]=!0}u.resolve(new TranslatedFont({loadedName:t.loadedName,font:e,dict:t,evaluatorOptions:this.options}))})).catch((e=>{this.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorFontTranslate});(0,a.warn)(`loadFont - translateFont failed: "${e}".`);try{const e=f&&f.get("FontFile3"),t=e&&e.get("Subtype"),r=(0,o.getFontType)(d.type,t&&t.name);l.stats.fontTypes[r]=!0}catch(e){}u.resolve(new TranslatedFont({loadedName:t.loadedName,font:new s.ErrorFont(e instanceof Error?e.message:e),dict:t,evaluatorOptions:this.options}))}));return u.promise}buildPath(e,t,r,i=!1){const n=e.length-1;r||(r=[]);if(n<0||e.fnArray[n]!==a.OPS.constructPath){if(i){(0,a.warn)(`Encountered path operator "${t}" inside of a text object.`);e.addOp(a.OPS.save,null)}e.addOp(a.OPS.constructPath,[[t],r]);i&&e.addOp(a.OPS.restore,null)}else{const a=e.argsArray[n];a[0].push(t);Array.prototype.push.apply(a[1],r)}}parseColorSpace({cs:e,resources:t,localColorSpaceCache:r}){return w.ColorSpace.parseAsync({cs:e,xref:this.xref,resources:t,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:r}).catch((e=>{if(e instanceof a.AbortException)return null;if(this.options.ignoreErrors){this.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorColorSpace});(0,a.warn)(`parseColorSpace - ignoring ColorSpace: "${e}".`);return null}throw e}))}parseShading({shading:e,resources:t,localColorSpaceCache:r,localShadingPatternCache:a}){let i=a.get(e);if(!i){const n=u.Pattern.parseShading(e,this.xref,t,this.handler,this._pdfFunctionFactory,r).getIR();i=`pattern_${this.idFactory.createObjId()}`;a.set(e,i);this.handler.send("obj",[i,this.pageIndex,"Pattern",n])}return i}handleColorN(e,t,r,i,s,o,c,l,h,d){const f=r.pop();if(f instanceof n.Name){const g=s.getRaw(f.name),p=g instanceof n.Ref&&h.getByRef(g);if(p)try{const a=i.base?i.base.getRgb(r,0):null,n=(0,u.getTilingPatternIR)(p.operatorListIR,p.dict,a);e.addOp(t,n);return}catch(e){}const m=this.xref.fetchIfRef(g);if(m){const s=(0,n.isStream)(m)?m.dict:m,u=s.get("PatternType");if(u===M){const a=i.base?i.base.getRgb(r,0):null;return this.handleTilingType(t,a,o,m,s,e,c,h)}if(u===E){const r=s.get("Shading"),a=s.getArray("Matrix"),i=this.parseShading({shading:r,resources:o,localColorSpaceCache:l,localShadingPatternCache:d});e.addOp(t,["Shading",i,a]);return}throw new a.FormatError(`Unknown PatternType: ${u}`)}}throw new a.FormatError(`Unknown PatternName: ${f}`)}_parseVisibilityExpression(e,t,r){if(++t>10){(0,a.warn)("Visibility expression is too deeply nested");return}const i=e.length,s=this.xref.fetchIfRef(e[0]);if(i<2||!(0,n.isName)(s))(0,a.warn)("Invalid visibility expression");else{switch(s.name){case"And":case"Or":case"Not":r.push(s.name);break;default:(0,a.warn)(`Invalid operator ${s.name} in visibility expression`);return}for(let a=1;a0)return{type:"OCMD",expression:t}}const t=r.get("OCGs");if(Array.isArray(t)||(0,n.isDict)(t)){const e=[];if(Array.isArray(t))for(const r of t)e.push(r.toString());else e.push(t.objId);return{type:i,ids:e,policy:(0,n.isName)(r.get("P"))?r.get("P").name:null,expression:null}}if((0,n.isRef)(t))return{type:i,id:t.toString()}}return null}getOperatorList({stream:e,task:t,resources:r,operatorList:i,initialState:s=null,fallbackFontDict:o=null}){r=r||n.Dict.empty;s=s||new EvalState;if(!i)throw new Error('getOperatorList: missing "operatorList" parameter');const c=this,l=this.xref;let h=!1;const u=new m.LocalImageCache,d=new m.LocalColorSpaceCache,f=new m.LocalGStateCache,g=new m.LocalTilingPatternCache,p=new Map,b=r.get("XObject")||n.Dict.empty,y=r.get("Pattern")||n.Dict.empty,S=new StateManager(s),x=new EvaluatorPreprocessor(e,l,S),k=new TimeSlotManager;function closePendingRestoreOPS(e){for(let e=0,t=x.savedStatesDepth;e0&&i.addOp(a.OPS.setGState,[t]);e=null;continue}}next(new Promise((function(e,s){if(!M)throw new a.FormatError("GState must be referred to by name.");const o=r.get("ExtGState");if(!(o instanceof n.Dict))throw new a.FormatError("ExtGState should be a dictionary.");const l=o.get(T);if(!(l instanceof n.Dict))throw new a.FormatError("GState should be a dictionary.");c.setGState({resources:r,gState:l,operatorList:i,cacheKey:T,task:t,stateManager:S,localGStateCache:f,localColorSpaceCache:d}).then(e,s)})).catch((function(e){if(!(e instanceof a.AbortException)){if(!c.options.ignoreErrors)throw e;c.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorExtGState});(0,a.warn)(`getOperatorList - ignoring ExtGState: "${e}".`)}})));return;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:c.buildPath(i,s,e,h);continue;case a.OPS.markPoint:case a.OPS.markPointProps:case a.OPS.beginCompat:case a.OPS.endCompat:continue;case a.OPS.beginMarkedContentProps:if(!(0,n.isName)(e[0])){(0,a.warn)(`Expected name for beginMarkedContentProps arg0=${e[0]}`);continue}if("OC"===e[0].name){next(c.parseMarkedContentProps(e[1],r).then((e=>{i.addOp(a.OPS.beginMarkedContentProps,["OC",e])})).catch((e=>{if(!(e instanceof a.AbortException)){if(!c.options.ignoreErrors)throw e;c.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorMarkedContent});(0,a.warn)(`getOperatorList - ignoring beginMarkedContentProps: "${e}".`)}})));return}e=[e[0].name,e[1]instanceof n.Dict?e[1].get("MCID"):null];break;case a.OPS.beginMarkedContent:case a.OPS.endMarkedContent:default:if(null!==e){for(v=0,F=e.length;v{if(!(e instanceof a.AbortException)){if(!this.options.ignoreErrors)throw e;this.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorOperatorList});(0,a.warn)(`getOperatorList - ignoring errors during "${t.name}" task: "${e}".`);closePendingRestoreOPS()}}))}getTextContent({stream:e,task:t,resources:r,stateManager:i=null,normalizeWhitespace:s=!1,combineTextItems:o=!1,includeMarkedContent:c=!1,sink:l,seenStyles:u=new Set}){r=r||n.Dict.empty;i=i||new StateManager(new TextState);const d=/\s/g,f={items:[],styles:Object.create(null)},g={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},p=this,b=this.xref,w=[];let S=null;const x=new m.LocalImageCache,k=new m.LocalGStateCache,C=new EvaluatorPreprocessor(e,b,i);let v;function getCurrentTextTransform(){const e=v.font,t=[v.fontSize*v.textHScale,0,0,v.fontSize,0,v.textRise];if(e.isType3Font&&(v.fontSize<=1||e.isCharBBox)&&!(0,a.isArrayEqual)(v.fontMatrix,a.FONT_IDENTITY_MATRIX)){const r=e.bbox[3]-e.bbox[1];r>0&&(t[3]*=r*v.fontMatrix[3])}return a.Util.transform(v.ctm,a.Util.transform(v.textMatrix,t))}function ensureTextContentItem(){if(g.initialized)return g;const e=v.font,t=e.loadedName;if(!u.has(t)){u.add(t);f.styles[t]={fontFamily:e.fallbackName,ascent:e.ascent,descent:e.descent,vertical:e.vertical}}g.fontName=t;const r=g.transform=getCurrentTextTransform();if(e.vertical){g.width=g.totalWidth=Math.hypot(r[0],r[1]);g.height=g.totalHeight=0;g.vertical=!0}else{g.width=g.totalWidth=0;g.height=g.totalHeight=Math.hypot(r[2],r[3]);g.vertical=!1}const a=Math.hypot(v.textLineMatrix[0],v.textLineMatrix[1]),i=Math.hypot(v.ctm[0],v.ctm[1]);g.textAdvanceScale=i*a;g.lastCharSize=g.lastCharSize||0;const n=e.spaceWidth/1e3*v.fontSize;if(n){g.spaceWidth=n;g.trackingSpaceMin=.3*n;g.spaceInFlowMin=.3*n;g.spaceInFlowMax=1.3*n}else{g.spaceWidth=0;g.trackingSpaceMin=1/0}g.hasEOL=!1;g.initialized=!0;return g}function updateAdvanceScale(){if(!g.initialized)return;const e=Math.hypot(v.textLineMatrix[0],v.textLineMatrix[1]),t=Math.hypot(v.ctm[0],v.ctm[1])*e;if(t!==g.textAdvanceScale){if(g.vertical){g.totalHeight+=g.height*g.textAdvanceScale;g.height=0}else{g.totalWidth+=g.width*g.textAdvanceScale;g.width=0}g.textAdvanceScale=t}}function runBidiTransform(e){const t=e.str.join(""),r=(0,y.bidi)(t,-1,e.vertical);return{str:s?function replaceWhitespace(e){const t=e.length;let r,a=0;for(;a=32&&r<=127;)a++;return ag.width/g.textAdvanceScale){appendEOL();return}if(l>c)return;if(c>g.trackingSpaceMin)g.height+=c;else if(!addFakeSpaces(c,0,g.prevTransform))if(0===g.str.length){f.items.push({str:" ",dir:"ltr",width:0,height:c,transform:g.prevTransform,fontName:g.fontName,hasEOL:!1});g.isLastCharWhiteSpace=!0}else g.height+=c}else if(Math.abs(c)>g.height/g.textAdvanceScale)appendEOL();else if(!(l>s))if(s<=g.trackingSpaceMin)g.width+=s;else if(!addFakeSpaces(s,0,g.prevTransform))if(0===g.str.length){f.items.push({str:" ",dir:"ltr",width:s,height:0,transform:g.prevTransform,fontName:g.fontName,hasEOL:!1});g.isLastCharWhiteSpace=!0}else g.width+=s}();let c=ensureTextContentItem(),l=0,u=0;for(let e=0,r=n.length;eg.trackingSpaceMin&&addFakeSpaces(d,l);a.vertical?v.translateTextMatrix(0,d):v.translateTextMatrix(d,0);if(e){c=ensureTextContentItem();l=0}else l+=d}u=p}c.lastCharSize=u;a.vertical?c.height+=l:c.width+=l;c.prevTransform=getCurrentTextTransform()}function appendEOL(){if(g.initialized){g.hasEOL=!0;flushTextContentItem()}else f.items.push({str:"",dir:"ltr",width:0,height:0,transform:getCurrentTextTransform(),fontName:v.font.loadedName,hasEOL:!0});g.isLastCharWhiteSpace=!1;g.lastCharSize=0}function addFakeSpaces(e,t,r=null){if(g.spaceInFlowMin<=e&&e<=g.spaceInFlowMax){if(g.initialized){g.str.push(" ");g.isLastCharWhiteSpace=!0}return!1}const a=g.fontName;let i=0;e*=g.textAdvanceScale;if(g.vertical){g.height+=t;i=e;e=0}else g.width+=t;flushTextContentItem();if(g.isLastCharWhiteSpace)return!0;g.isLastCharWhiteSpace=!0;f.items.push({str:" ",dir:"ltr",width:e,height:i,transform:r||getCurrentTextTransform(),fontName:a,hasEOL:!1});return!0}function flushTextContentItem(){if(g.initialized&&g.str){g.vertical?g.totalHeight+=g.height*g.textAdvanceScale:g.totalWidth+=g.width*g.textAdvanceScale;f.items.push(runBidiTransform(g));g.initialized=!1;g.str.length=0}}function enqueueChunk(e=!1){const t=f.items.length;if(0!==t&&!(e&&t<10)){l.enqueue(f,t);f.items=[];f.styles=Object.create(null)}}const F=new TimeSlotManager;return new Promise((function promiseBody(e,h){const next=function(t){enqueueChunk(!0);Promise.all([t,l.ready]).then((function(){try{promiseBody(e,h)}catch(e){h(e)}}),h)};t.ensureNotTerminated();F.reset();const d={};let m,y=[];for(;!(m=F.check());){y.length=0;d.args=y;if(!C.read(d))break;v=i.state;const e=d.fn;y=d.args;switch(0|e){case a.OPS.setFont:var O=y[0].name,T=y[1];if(v.font&&O===v.fontName&&T===v.fontSize)break;flushTextContentItem();v.fontName=O;v.fontSize=T;next(handleSetFont(O,null));return;case a.OPS.setTextRise:flushTextContentItem();v.textRise=y[0];break;case a.OPS.setHScale:flushTextContentItem();v.textHScale=y[0]/100;break;case a.OPS.setLeading:flushTextContentItem();v.leading=y[0];break;case a.OPS.moveText:v.translateTextLineMatrix(y[0],y[1]);v.textMatrix=v.textLineMatrix.slice();break;case a.OPS.setLeadingMoveText:flushTextContentItem();v.leading=-y[1];v.translateTextLineMatrix(y[0],y[1]);v.textMatrix=v.textLineMatrix.slice();break;case a.OPS.nextLine:appendEOL();v.carriageReturn();break;case a.OPS.setTextMatrix:v.setTextMatrix(y[0],y[1],y[2],y[3],y[4],y[5]);v.setTextLineMatrix(y[0],y[1],y[2],y[3],y[4],y[5]);updateAdvanceScale();break;case a.OPS.setCharSpacing:v.charSpacing=y[0];break;case a.OPS.setWordSpacing:v.wordSpacing=y[0];break;case a.OPS.beginText:flushTextContentItem();v.textMatrix=a.IDENTITY_MATRIX.slice();v.textLineMatrix=a.IDENTITY_MATRIX.slice();break;case a.OPS.showSpacedText:if(!i.state.font){p.ensureStateFont(i.state);continue}const e=(v.font.vertical?1:-1)*v.fontSize/1e3,h=y[0];let d=!0;for(let t=0,r=h.length;t0){const e=w.join("");w.length=0;buildTextContentItem({chars:e,extraSpacing:0,isFirstChunk:d})}break;case a.OPS.showText:if(!i.state.font){p.ensureStateFont(i.state);continue}buildTextContentItem({chars:y[0],extraSpacing:0,isFirstChunk:!0});break;case a.OPS.nextLineShowText:if(!i.state.font){p.ensureStateFont(i.state);continue}g.hasEOL=!0;flushTextContentItem();v.carriageReturn();buildTextContentItem({chars:y[0],extraSpacing:0,isFirstChunk:!0});break;case a.OPS.nextLineSetSpacingShowText:if(!i.state.font){p.ensureStateFont(i.state);continue}g.hasEOL=!0;flushTextContentItem();v.wordSpacing=y[0];v.charSpacing=y[1];v.carriageReturn();buildTextContentItem({chars:y[2],extraSpacing:0,isFirstChunk:!0});break;case a.OPS.paintXObject:flushTextContentItem();S||(S=r.get("XObject")||n.Dict.empty);var M=y[0]instanceof n.Name,E=y[0].name;if(M&&x.getByName(E))break;next(new Promise((function(e,h){if(!M)throw new a.FormatError("XObject must be referred to by name.");let d=S.getRaw(E);if(d instanceof n.Ref){if(x.getByRef(d)){e();return}if(p.globalImageCache.getData(d,p.pageIndex)){e();return}d=b.fetch(d)}if(!(0,n.isStream)(d))throw new a.FormatError("XObject should be a stream");const f=d.dict.get("Subtype");if(!(0,n.isName)(f))throw new a.FormatError("XObject should have a Name subtype");if("Form"!==f.name){x.set(E,d.dict.objId,!0);e();return}const g=i.state.clone(),m=new StateManager(g),y=d.dict.getArray("Matrix");Array.isArray(y)&&6===y.length&&m.transform(y);enqueueChunk();const w={enqueueInvoked:!1,enqueue(e,t){this.enqueueInvoked=!0;l.enqueue(e,t)},get desiredSize(){return l.desiredSize},get ready(){return l.ready}};p.getTextContent({stream:d,task:t,resources:d.dict.get("Resources")||r,stateManager:m,normalizeWhitespace:s,combineTextItems:o,includeMarkedContent:c,sink:w,seenStyles:u}).then((function(){w.enqueueInvoked||x.set(E,d.dict.objId,!0);e()}),h)})).catch((function(e){if(!(e instanceof a.AbortException)){if(!p.options.ignoreErrors)throw e;(0,a.warn)(`getTextContent - ignoring XObject: "${e}".`)}})));return;case a.OPS.setGState:M=y[0]instanceof n.Name;E=y[0].name;if(M&&k.getByName(E))break;next(new Promise((function(e,t){if(!M)throw new a.FormatError("GState must be referred to by name.");const i=r.get("ExtGState");if(!(i instanceof n.Dict))throw new a.FormatError("ExtGState should be a dictionary.");const s=i.get(E);if(!(s instanceof n.Dict))throw new a.FormatError("GState should be a dictionary.");const o=s.get("Font");if(o){flushTextContentItem();v.fontName=null;v.fontSize=o[1];handleSetFont(null,o[0]).then(e,t)}else{k.set(E,s.objId,!0);e()}})).catch((function(e){if(!(e instanceof a.AbortException)){if(!p.options.ignoreErrors)throw e;(0,a.warn)(`getTextContent - ignoring ExtGState: "${e}".`)}})));return;case a.OPS.beginMarkedContent:c&&f.items.push({type:"beginMarkedContent",tag:(0,n.isName)(y[0])?y[0].name:null});break;case a.OPS.beginMarkedContentProps:if(c){flushTextContentItem();let e=null;(0,n.isDict)(y[1])&&(e=y[1].get("MCID"));f.items.push({type:"beginMarkedContentProps",id:Number.isInteger(e)?`${p.idFactory.getPageObjId()}_mcid${e}`:null,tag:(0,n.isName)(y[0])?y[0].name:null})}break;case a.OPS.endMarkedContent:if(c){flushTextContentItem();f.items.push({type:"endMarkedContent"})}}if(f.items.length>=l.desiredSize){m=!0;break}}if(m)next(D);else{flushTextContentItem();enqueueChunk();e()}})).catch((e=>{if(!(e instanceof a.AbortException)){if(!this.options.ignoreErrors)throw e;(0,a.warn)(`getTextContent - ignoring errors during "${t.name}" task: "${e}".`);flushTextContentItem();enqueueChunk()}}))}extractDataStructures(e,t,r){const i=this.xref;let s;const l=this.readToUnicode(r.toUnicode||e.get("ToUnicode")||t.get("ToUnicode"));if(r.composite){const t=e.get("CIDSystemInfo");(0,n.isDict)(t)&&(r.cidSystemInfo={registry:(0,a.stringToPDFString)(t.get("Registry")),ordering:(0,a.stringToPDFString)(t.get("Ordering")),supplement:t.get("Supplement")});const i=e.get("CIDToGIDMap");(0,n.isStream)(i)&&(s=i.getBytes())}const h=[];let u,d=null;if(e.has("Encoding")){u=e.get("Encoding");if((0,n.isDict)(u)){d=u.get("BaseEncoding");d=(0,n.isName)(d)?d.name:null;if(u.has("Differences")){const e=u.get("Differences");let t=0;for(let r=0,s=e.length;r0;r.dict=e;return l.then((e=>{r.toUnicode=e;return this.buildToUnicode(r)})).then((e=>{r.toUnicode=e;s&&(r.cidToGidMap=this.readCidToGidMap(s,e));return r}))}_simpleFontToUnicode(e,t=!1){(0,a.assert)(!e.composite,"Must be a simple font.");const r=[],i=e.defaultEncoding.slice(),n=e.baseEncodingName,s=e.differences;for(const e in s){const t=s[e];".notdef"!==t&&(i[e]=t)}const o=(0,x.getGlyphsUnicode)();for(const a in i){let s=i[a];if(""!==s)if(void 0!==o[s])r[a]=String.fromCharCode(o[s]);else{let i=0;switch(s[0]){case"G":3===s.length&&(i=parseInt(s.substring(1),16));break;case"g":5===s.length&&(i=parseInt(s.substring(1),16));break;case"C":case"c":if(s.length>=3&&s.length<=4){const r=s.substring(1);if(t){i=parseInt(r,16);break}i=+r;if(Number.isNaN(i)&&Number.isInteger(parseInt(r,16)))return this._simpleFontToUnicode(e,!0)}break;default:const r=(0,h.getUnicodeForGlyph)(s,o);-1!==r&&(i=r)}if(i>0&&i<=1114111&&Number.isInteger(i)){if(n&&i===+a){const e=(0,c.getEncoding)(n);if(e&&(s=e[a])){r[a]=String.fromCharCode(o[s]);continue}}r[a]=String.fromCodePoint(i)}}}return r}async buildToUnicode(e){e.hasIncludedToUnicodeMap=!!e.toUnicode&&e.toUnicode.length>0;if(e.hasIncludedToUnicodeMap){!e.composite&&e.hasEncoding&&(e.fallbackToUnicode=this._simpleFontToUnicode(e));return e.toUnicode}if(!e.composite)return new f.ToUnicodeMap(this._simpleFontToUnicode(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))){const{registry:t,ordering:r}=e.cidSystemInfo,s=n.Name.get(`${t}-${r}-UCS2`),o=await i.CMapFactory.create({encoding:s,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}),c=[];e.cMap.forEach((function(e,t){if(t>65535)throw new a.FormatError("Max size of CID is 65,535");const r=o.lookup(t);r&&(c[e]=String.fromCharCode((r.charCodeAt(0)<<8)+r.charCodeAt(1)))}));return new f.ToUnicodeMap(c)}return new f.IdentityToUnicodeMap(e.firstChar,e.lastChar)}readToUnicode(e){return e?(0,n.isName)(e)?i.CMapFactory.create({encoding:e,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}).then((function(e){return e instanceof i.IdentityCMap?new f.IdentityToUnicodeMap(0,65535):new f.ToUnicodeMap(e.getMap())})):(0,n.isStream)(e)?i.CMapFactory.create({encoding:e,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}).then((function(e){if(e instanceof i.IdentityCMap)return new f.IdentityToUnicodeMap(0,65535);const t=new Array(e.length);e.forEach((function(e,r){if("number"==typeof r){t[e]=String.fromCodePoint(r);return}const a=[];for(let e=0;e{if(e instanceof a.AbortException)return null;if(this.options.ignoreErrors){this.handler.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorFontToUnicode});(0,a.warn)(`readToUnicode - ignoring ToUnicode data: "${e}".`);return null}throw e})):Promise.resolve(null):Promise.resolve(null)}readCidToGidMap(e,t){const r=[];for(let a=0,i=e.length;a>1;(0!==i||t.has(n))&&(r[n]=i)}return r}extractWidths(e,t,r){const a=this.xref;let i=[],s=0;const c=[];let l,h,u,d,f,g,p,m;if(r.composite){s=e.has("DW")?e.get("DW"):1e3;m=e.get("W");if(m)for(h=0,u=m.length;h{if(p){const e=[];let r=u;for(let t=0,a=p.length;t{this.extractWidths(t,e,r);return new s.Font(v.name,w,r)}))}static buildFontPaths(e,t,r,i){function buildPath(t){const n=`${e.loadedName}_path_${t}`;try{if(e.renderer.hasBuiltPath(t))return;r.send("commonobj",[n,"FontPath",e.renderer.getPathJs(t)])}catch(e){if(i.ignoreErrors){r.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.errorFontBuildPath});(0,a.warn)(`buildFontPaths - ignoring ${n} glyph: "${e}".`);return}throw e}}for(const e of t){buildPath(e.fontChar);const t=e.accent;t&&t.fontChar&&buildPath(t.fontChar)}}static get fallbackFontDict(){const e=new n.Dict;e.set("BaseFont",n.Name.get("PDFJS-FallbackFont"));e.set("Type",n.Name.get("FallbackType"));e.set("Subtype",n.Name.get("FallbackType"));e.set("Encoding",n.Name.get("WinAnsiEncoding"));return(0,a.shadow)(this,"fallbackFontDict",e)}}t.PartialEvaluator=PartialEvaluator;class TranslatedFont{constructor({loadedName:e,font:t,dict:r,evaluatorOptions:a}){this.loadedName=e;this.font=t;this.dict=r;this._evaluatorOptions=a||T;this.type3Loaded=null;this.type3Dependencies=t.isType3Font?new Set:null;this.sent=!1}send(e){if(!this.sent){this.sent=!0;e.send("commonobj",[this.loadedName,"Font",this.font.exportData(this._evaluatorOptions.fontExtraProperties)])}}fallback(e){if(this.font.data){this.font.disableFontFace=!0;PartialEvaluator.buildFontPaths(this.font,this.font.glyphCacheValues,e,this._evaluatorOptions)}}loadType3Data(e,t,r){if(this.type3Loaded)return this.type3Loaded;if(!this.font.isType3Font)throw new Error("Must be a Type3 font.");const i=e.clone({ignoreErrors:!1});i.parsingType3Font=!0;const n=this.font,s=this.type3Dependencies;let o=Promise.resolve();const c=this.dict.get("CharProcs"),l=this.dict.get("Resources")||t,h=Object.create(null),u=!n.bbox||(0,a.isArrayEqual)(n.bbox,[0,0,0,0]);for(const e of c.getKeys())o=o.then((()=>{const t=c.get(e),n=new F.OperatorList;return i.getOperatorList({stream:t,task:r,resources:l,operatorList:n}).then((()=>{n.fnArray[0]===a.OPS.setCharWidthAndBounds&&this._removeType3ColorOperators(n,u);h[e]=n.getIR();for(const e of n.dependencies)s.add(e)})).catch((function(t){(0,a.warn)(`Type3 font resource "${e}" is not available.`);const r=new F.OperatorList;h[e]=r.getIR()}))}));this.type3Loaded=o.then((()=>{n.charProcOperatorList=h;if(this._bbox){n.isCharBBox=!0;n.bbox=this._bbox}}));return this.type3Loaded}_removeType3ColorOperators(e,t=!1){if(t){this._bbox||(this._bbox=[1/0,1/0,-1/0,-1/0]);const t=a.Util.normalizeRect(e.argsArray[0].slice(2));this._bbox[0]=Math.min(this._bbox[0],t[0]);this._bbox[1]=Math.min(this._bbox[1],t[1]);this._bbox[2]=Math.max(this._bbox[2],t[2]);this._bbox[3]=Math.max(this._bbox[3],t[3])}let r=1,i=e.length;for(;ro&&(0,a.info)(`Command ${i}: expected [0, ${o}] args, but received ${c} args.`);else{if(c!==o){const e=this.nonProcessedArgs;for(;c>o;){e.push(t.shift());c--}for(;c=a.OPS.moveTo&&s<=a.OPS.endPath&&++this._numInvalidPathOPS>EvaluatorPreprocessor.MAX_INVALID_PATH_OPS)throw new a.FormatError(`Invalid ${e}`);(0,a.warn)(`Skipping ${e}`);null!==t&&(t.length=0);continue}}this.preprocessCommand(s,t);e.fn=s;e.args=t;return!0}if(r===n.EOF)return!1;if(null!==r){null===t&&(t=[]);t.push(r);if(t.length>33)throw new a.FormatError("Too many arguments")}}}preprocessCommand(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)}}}t.EvaluatorPreprocessor=EvaluatorPreprocessor},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.IdentityCMap=t.CMapFactory=t.CMap=void 0;var a=r(2),i=r(5),n=r(27),s=r(9),o=r(10);const c=["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"],l=2**24-1;class CMap{constructor(e=!1){this.codespaceRanges=[[],[],[],[]];this.numCodespaceRanges=0;this._map=[];this.name="";this.vertical=!1;this.useCMap=null;this.builtInCMap=e}addCodespaceRange(e,t,r){this.codespaceRanges[e-1].push(t,r);this.numCodespaceRanges++}mapCidRange(e,t,r){if(t-e>l)throw new Error("mapCidRange - ignoring data above MAX_MAP_RANGE.");for(;e<=t;)this._map[e++]=r++}mapBfRange(e,t,r){if(t-e>l)throw new Error("mapBfRange - ignoring data above MAX_MAP_RANGE.");const a=r.length-1;for(;e<=t;){this._map[e++]=r;r=r.substring(0,a)+String.fromCharCode(r.charCodeAt(a)+1)}}mapBfRangeToArray(e,t,r){if(t-e>l)throw new Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.");const a=r.length;let i=0;for(;e<=t&&i>>0;const s=i[n];for(let e=0,t=s.length;e=t&&a<=i){r.charcode=a;r.length=n+1;return}}}r.charcode=0;r.length=1}getCharCodeLength(e){const t=this.codespaceRanges;for(let r=0,a=t.length;r=i&&e<=n)return r+1}}return 1}get length(){return this._map.length}get isIdentityCMap(){if("Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(let e=0;e<65536;e++)if(this._map[e]!==e)return!1;return!0}}t.CMap=CMap;class IdentityCMap extends CMap{constructor(e,t){super();this.vertical=e;this.addCodespaceRange(t,0,65535)}mapCidRange(e,t,r){(0,a.unreachable)("should not call mapCidRange")}mapBfRange(e,t,r){(0,a.unreachable)("should not call mapBfRange")}mapBfRangeToArray(e,t,r){(0,a.unreachable)("should not call mapBfRangeToArray")}mapOne(e,t){(0,a.unreachable)("should not call mapCidOne")}lookup(e){return Number.isInteger(e)&&e<=65535?e:void 0}contains(e){return Number.isInteger(e)&&e<=65535}forEach(e){for(let t=0;t<=65535;t++)e(t,t)}charCodeOf(e){return Number.isInteger(e)&&e<=65535?e:-1}getMap(){const e=new Array(65536);for(let t=0;t<=65535;t++)e[t]=t;return e}get length(){return 65536}get isIdentityCMap(){(0,a.unreachable)("should not access .isIdentityCMap")}}t.IdentityCMap=IdentityCMap;const h=function BinaryCMapReaderClosure(){function hexToInt(e,t){let r=0;for(let a=0;a<=t;a++)r=r<<8|e[a];return r>>>0}function hexToStr(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 addHex(e,t,r){let a=0;for(let i=r;i>=0;i--){a+=e[i]+t[i];e[i]=255&a;a>>=8}}function incHex(e,t){let r=1;for(let a=t;a>=0&&r>0;a--){r+=e[a];e[a]=255&r;r>>=8}}const e=16;class BinaryCMapStream{constructor(e){this.buffer=e;this.pos=0;this.end=e.length;this.tmpBuf=new Uint8Array(19)}readByte(){return this.pos>=this.end?-1:this.buffer[this.pos++]}readNumber(){let e,t=0;do{const r=this.readByte();if(r<0)throw new a.FormatError("unexpected EOF in bcmap");e=!(128&r);t=t<<7|127&r}while(!e);return t}readSigned(){const e=this.readNumber();return 1&e?~(e>>>1):e>>>1}readHex(e,t){e.set(this.buffer.subarray(this.pos,this.pos+t+1));this.pos+=t+1}readHexNumber(e,t){let r;const i=this.tmpBuf;let n=0;do{const e=this.readByte();if(e<0)throw new a.FormatError("unexpected EOF in bcmap");r=!(128&e);i[n++]=127&e}while(!r);let s=t,o=0,c=0;for(;s>=0;){for(;c<8&&i.length>0;){o|=i[--n]<>=8;c-=8}}readHexSigned(e,t){this.readHexNumber(e,t);const r=1&e[t]?255:0;let a=0;for(let i=0;i<=t;i++){a=(1&a)<<8|e[i];e[i]=a>>1^r}}readString(){const e=this.readNumber();let t="";for(let r=0;r=0;){const t=f>>5;if(7===t){switch(31&f){case 0:i.readString();break;case 1:s=i.readString()}continue}const a=!!(16&f),n=15&f;if(n+1>e)throw new Error("BinaryCMapReader.process: Invalid dataSize.");const g=1,p=i.readNumber();switch(t){case 0:i.readHex(o,n);i.readHexNumber(c,n);addHex(c,o,n);r.addCodespaceRange(n+1,hexToInt(o,n),hexToInt(c,n));for(let e=1;e>>0}function expectString(e){if(!(0,a.isString)(e))throw new a.FormatError("Malformed CMap: expected string.")}function expectInt(e){if(!Number.isInteger(e))throw new a.FormatError("Malformed CMap: expected int.")}function parseBfChar(e,t){for(;;){let r=t.getObj();if(r===i.EOF)break;if((0,i.isCmd)(r,"endbfchar"))return;expectString(r);const a=strToInt(r);r=t.getObj();expectString(r);const n=r;e.mapOne(a,n)}}function parseBfRange(e,t){for(;;){let r=t.getObj();if(r===i.EOF)break;if((0,i.isCmd)(r,"endbfrange"))return;expectString(r);const n=strToInt(r);r=t.getObj();expectString(r);const s=strToInt(r);r=t.getObj();if(Number.isInteger(r)||(0,a.isString)(r)){const t=Number.isInteger(r)?String.fromCharCode(r):r;e.mapBfRange(n,s,t)}else{if(!(0,i.isCmd)(r,"["))break;{r=t.getObj();const a=[];for(;!(0,i.isCmd)(r,"]")&&r!==i.EOF;){a.push(r);r=t.getObj()}e.mapBfRangeToArray(n,s,a)}}}throw new a.FormatError("Invalid bf range.")}function parseCidChar(e,t){for(;;){let r=t.getObj();if(r===i.EOF)break;if((0,i.isCmd)(r,"endcidchar"))return;expectString(r);const a=strToInt(r);r=t.getObj();expectInt(r);const n=r;e.mapOne(a,n)}}function parseCidRange(e,t){for(;;){let r=t.getObj();if(r===i.EOF)break;if((0,i.isCmd)(r,"endcidrange"))return;expectString(r);const a=strToInt(r);r=t.getObj();expectString(r);const n=strToInt(r);r=t.getObj();expectInt(r);const s=r;e.mapCidRange(a,n,s)}}function parseCodespaceRange(e,t){for(;;){let r=t.getObj();if(r===i.EOF)break;if((0,i.isCmd)(r,"endcodespacerange"))return;if(!(0,a.isString)(r))break;const n=strToInt(r);r=t.getObj();if(!(0,a.isString)(r))break;const s=strToInt(r);e.addCodespaceRange(r.length,n,s)}throw new a.FormatError("Invalid codespace range.")}function parseWMode(e,t){const r=t.getObj();Number.isInteger(r)&&(e.vertical=!!r)}function parseCMapName(e,t){const r=t.getObj();(0,i.isName)(r)&&(0,a.isString)(r.name)&&(e.name=r.name)}async function parseCMap(e,t,r,n){let o,c;e:for(;;)try{const r=t.getObj();if(r===i.EOF)break;if((0,i.isName)(r)){"WMode"===r.name?parseWMode(e,t):"CMapName"===r.name&&parseCMapName(e,t);o=r}else if((0,i.isCmd)(r))switch(r.cmd){case"endcmap":break e;case"usecmap":(0,i.isName)(o)&&(c=o.name);break;case"begincodespacerange":parseCodespaceRange(e,t);break;case"beginbfchar":parseBfChar(e,t);break;case"begincidchar":parseCidChar(e,t);break;case"beginbfrange":parseBfRange(e,t);break;case"begincidrange":parseCidRange(e,t)}}catch(e){if(e instanceof s.MissingDataException)throw e;(0,a.warn)("Invalid cMap data: "+e);continue}!n&&c&&(n=c);return n?extendCMap(e,r,n):e}async function extendCMap(e,t,r){e.useCMap=await createBuiltInCMap(r,t);if(0===e.numCodespaceRanges){const t=e.useCMap.codespaceRanges;for(let r=0;rextendCMap(s,t,e)));if(i===a.CMapCompressionType.NONE){const e=new n.Lexer(new o.Stream(r));return parseCMap(s,e,t,null)}throw new Error("TODO: Only BINARY/NONE CMap compression is currently supported.")}return{async create(e){const t=e.encoding,r=e.fetchBuiltInCMap,a=e.useCMap;if((0,i.isName)(t))return createBuiltInCMap(t.name,r);if((0,i.isStream)(t)){const e=await parseCMap(new CMap,new n.Lexer(t),r,a);return e.isIdentityCMap?createBuiltInCMap(e.name,r):e}throw new Error("Encoding required.")}}}();t.CMapFactory=u},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.Parser=t.Linearization=t.Lexer=void 0;var a=r(2),i=r(5),n=r(9),s=r(28),o=r(30),c=r(31),l=r(33),h=r(34),u=r(37),d=r(39),f=r(41),g=r(10),p=r(42),m=r(43);function computeAdler32(e){const t=e.length;let r=1,a=0;for(let i=0;i>")&&this.buf1!==i.EOF;){if(!(0,i.isName)(this.buf1)){(0,a.info)("Malformed dictionary: key must be a name object");this.shift();continue}const t=this.buf1.name;this.shift();if(this.buf1===i.EOF)break;s.set(t,this.getObj(e))}if(this.buf1===i.EOF){if(this.recoveryMode)return s;throw new n.ParserEOFException("End of file inside dictionary.")}if((0,i.isCmd)(this.buf2,"stream"))return this.allowStreams?this.makeStream(s,e):s;this.shift();return s;default:return t}if(Number.isInteger(t)){if(Number.isInteger(this.buf1)&&(0,i.isCmd)(this.buf2,"R")){const e=i.Ref.get(t,this.buf1);this.shift();this.shift();return e}return t}return"string"==typeof t&&e?e.decryptString(t):t}findDefaultInlineStreamEnd(e){const t=this.lexer,r=e.pos;let s,o,c=0;for(;-1!==(s=e.getByte());)if(0===c)c=69===s?1:0;else if(1===c)c=73===s?2:0;else{(0,a.assert)(2===c,"findDefaultInlineStreamEnd - invalid state.");if(32===s||10===s||13===s){o=e.pos;const r=e.peekBytes(10);for(let e=0,t=r.length;e127))){c=0;break}}if(2!==c)continue;if(t.knownCommands){const e=t.peekObj();e instanceof i.Cmd&&!t.knownCommands[e.cmd]&&(c=0)}else(0,a.warn)("findDefaultInlineStreamEnd - `lexer.knownCommands` is undefined.");if(2===c)break}else c=0}if(-1===s){(0,a.warn)("findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker");if(o){(0,a.warn)('... trying to recover by using the last "EI" occurrence.');e.skip(-(e.pos-o))}}let l=4;e.skip(-l);s=e.peekByte();e.skip(l);(0,n.isWhiteSpace)(s)||l--;return e.pos-l-r}findDCTDecodeInlineStreamEnd(e){const t=e.pos;let r,i,n=!1;for(;-1!==(r=e.getByte());)if(255===r){switch(e.getByte()){case 0:break;case 255:e.skip(-1);break;case 217:n=!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:i=e.getUint16();i>2?e.skip(i-2):e.skip(-2)}if(n)break}const s=e.pos-t;if(-1===r){(0,a.warn)("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead.");e.skip(-s);return this.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);return s}findASCII85DecodeInlineStreamEnd(e){const t=e.pos;let r;for(;-1!==(r=e.getByte());)if(126===r){const t=e.pos;r=e.peekByte();for(;(0,n.isWhiteSpace)(r);){e.skip();r=e.peekByte()}if(62===r){e.skip();break}if(e.pos>t){const t=e.peekBytes(2);if(69===t[0]&&73===t[1])break}}const i=e.pos-t;if(-1===r){(0,a.warn)("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead.");e.skip(-i);return this.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);return i}findASCIIHexDecodeInlineStreamEnd(e){const t=e.pos;let r;for(;-1!==(r=e.getByte())&&62!==r;);const i=e.pos-t;if(-1===r){(0,a.warn)("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead.");e.skip(-i);return this.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);return i}inlineStreamSkipEI(e){let t,r=0;for(;-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}makeInlineImage(e){const t=this.lexer,r=t.stream,n=new i.Dict(this.xref);let s;for(;!(0,i.isCmd)(this.buf1,"ID")&&this.buf1!==i.EOF;){if(!(0,i.isName)(this.buf1))throw new a.FormatError("Dictionary key must be a name object");const t=this.buf1.name;this.shift();if(this.buf1===i.EOF)break;n.set(t,this.getObj(e))}-1!==t.beginInlineImagePos&&(s=r.pos-t.beginInlineImagePos);const o=n.get("Filter","F");let c;if((0,i.isName)(o))c=o.name;else if(Array.isArray(o)){const e=this.xref.fetchIfRef(o[0]);(0,i.isName)(e)&&(c=e.name)}const l=r.pos;let h;h="DCTDecode"===c||"DCT"===c?this.findDCTDecodeInlineStreamEnd(r):"ASCII85Decode"===c||"A85"===c?this.findASCII85DecodeInlineStreamEnd(r):"ASCIIHexDecode"===c||"AHx"===c?this.findASCIIHexDecodeInlineStreamEnd(r):this.findDefaultInlineStreamEnd(r);let u,d=r.makeSubStream(l,h,n);if(h<1e3&&s<5552){const e=d.getBytes();d.reset();const a=r.pos;r.pos=t.beginInlineImagePos;const n=r.getBytes(s);r.pos=a;u=computeAdler32(e)+"_"+computeAdler32(n);const o=this.imageCache[u];if(void 0!==o){this.buf2=i.Cmd.get("EI");this.shift();o.reset();return o}}e&&(d=e.createStream(d,h));d=this.filter(d,n,h);d.dict=n;if(void 0!==u){d.cacheKey=`inline_${h}_${u}`;this.imageCache[u]=d}this.buf2=i.Cmd.get("EI");this.shift();return d}_findStreamLength(e,t){const{stream:r}=this.lexer;r.pos=e;const a=t.length;for(;r.pos=a){r.pos+=s;return r.pos-e}s++}r.pos+=n}return-1}makeStream(e,t){const r=this.lexer;let s=r.stream;r.skipToNextLine();const o=s.pos-1;let c=e.get("Length");if(!Number.isInteger(c)){(0,a.info)(`Bad length "${c}" in stream`);c=0}s.pos=o+c;r.nextChar();if(this.tryShift()&&(0,i.isCmd)(this.buf2,"endstream"))this.shift();else{const e=new Uint8Array([101,110,100,115,116,114,101,97,109]);let t=this._findStreamLength(o,e);if(t<0){const r=1;for(let i=1;i<=r;i++){const r=e.length-i,c=e.slice(0,r),l=this._findStreamLength(o,c);if(l>=0){const e=s.peekBytes(r+1)[r];if(!(0,n.isWhiteSpace)(e))break;(0,a.info)(`Found "${(0,a.bytesToString)(c)}" when searching for endstream command.`);t=l;break}}if(t<0)throw new a.FormatError("Missing endstream command.")}c=t;r.nextChar();this.shift();this.shift()}this.shift();s=s.makeSubStream(o,c,e);t&&(s=t.createStream(s,c));s=this.filter(s,e,c);s.dict=e;return s}filter(e,t,r){let n=t.get("Filter","F"),s=t.get("DecodeParms","DP");if((0,i.isName)(n)){Array.isArray(s)&&(0,a.warn)("/DecodeParms should not contain an Array, when /Filter contains a Name.");return this.makeFilter(e,n.name,r,s)}let o=r;if(Array.isArray(n)){const t=n,r=s;for(let c=0,l=t.length;c=48&&e<=57?15&e:e>=65&&e<=70||e>=97&&e<=102?9+(15&e):-1}class Lexer{constructor(e,t=null){this.stream=e;this.nextChar();this.strBuf=[];this.knownCommands=t;this._hexStringNumWarn=0;this.beginInlineImagePos=-1}nextChar(){return this.currentChar=this.stream.getByte()}peekChar(){return this.stream.peekByte()}getNumber(){let e=this.currentChar,t=!1,r=0,i=0;if(45===e){i=-1;e=this.nextChar();45===e&&(e=this.nextChar())}else if(43===e){i=1;e=this.nextChar()}if(10===e||13===e)do{e=this.nextChar()}while(10===e||13===e);if(46===e){r=10;e=this.nextChar()}if(e<48||e>57){if(10===r&&0===i&&((0,n.isWhiteSpace)(e)||-1===e)){(0,a.warn)("Lexer.getNumber - treating a single decimal point as zero.");return 0}throw new a.FormatError(`Invalid number: ${String.fromCharCode(e)} (charCode ${e})`)}i=i||1;let s=e-48,o=0,c=1;for(;(e=this.nextChar())>=0;)if(e>=48&&e<=57){const a=e-48;if(t)o=10*o+a;else{0!==r&&(r*=10);s=10*s+a}}else if(46===e){if(0!==r)break;r=1}else if(45===e)(0,a.warn)("Badly formatted number: minus sign in the middle");else{if(69!==e&&101!==e)break;e=this.peekChar();if(43===e||45===e){c=45===e?-1:1;this.nextChar()}else if(e<48||e>57)break;t=!0}0!==r&&(s/=r);t&&(s*=10**(c*o));return i*s}getString(){let e=1,t=!1;const r=this.strBuf;r.length=0;let i=this.nextChar();for(;;){let n=!1;switch(0|i){case-1:(0,a.warn)("Unterminated string");t=!0;break;case 40:++e;r.push("(");break;case 41:if(0==--e){this.nextChar();t=!0}else r.push(")");break;case 92:i=this.nextChar();switch(i){case-1:(0,a.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(i));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:let e=15&i;i=this.nextChar();n=!0;if(i>=48&&i<=55){e=(e<<3)+(15&i);i=this.nextChar();if(i>=48&&i<=55){n=!1;e=(e<<3)+(15&i)}}r.push(String.fromCharCode(e));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:r.push(String.fromCharCode(i))}break;default:r.push(String.fromCharCode(i))}if(t)break;n||(i=this.nextChar())}return r.join("")}getName(){let e,t;const r=this.strBuf;r.length=0;for(;(e=this.nextChar())>=0&&!b[e];)if(35===e){e=this.nextChar();if(b[e]){(0,a.warn)("Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number.");r.push("#");break}const i=toHexDigit(e);if(-1!==i){t=e;e=this.nextChar();const n=toHexDigit(e);if(-1===n){(0,a.warn)(`Lexer_getName: Illegal digit (${String.fromCharCode(e)}) in hexadecimal number.`);r.push("#",String.fromCharCode(t));if(b[e])break;r.push(String.fromCharCode(e));continue}r.push(String.fromCharCode(i<<4|n))}else r.push("#",String.fromCharCode(e))}else r.push(String.fromCharCode(e));r.length>127?(0,a.warn)(`Name token is longer than allowed by the spec: ${r.length}`):0===r.length&&(0,a.warn)("Name token is empty.");return i.Name.get(r.join(""))}_hexStringWarn(e){5!=this._hexStringNumWarn++?this._hexStringNumWarn>5||(0,a.warn)(`getHexString - ignoring invalid character: ${e}`):(0,a.warn)("getHexString - ignoring additional invalid characters.")}getHexString(){const e=this.strBuf;e.length=0;let t,r,i=this.currentChar,n=!0;this._hexStringNumWarn=0;for(;;){if(i<0){(0,a.warn)("Unterminated hex string");break}if(62===i){this.nextChar();break}if(1!==b[i]){if(n){t=toHexDigit(i);if(-1===t){this._hexStringWarn(i);i=this.nextChar();continue}}else{r=toHexDigit(i);if(-1===r){this._hexStringWarn(i);i=this.nextChar();continue}e.push(String.fromCharCode(t<<4|r))}n=!n;i=this.nextChar()}else i=this.nextChar()}return e.join("")}getObj(){let e=!1,t=this.currentChar;for(;;){if(t<0)return i.EOF;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(1!==b[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:this.nextChar();return i.Cmd.get("[");case 93:this.nextChar();return i.Cmd.get("]");case 60:t=this.nextChar();if(60===t){this.nextChar();return i.Cmd.get("<<")}return this.getHexString();case 62:t=this.nextChar();if(62===t){this.nextChar();return i.Cmd.get(">>")}return i.Cmd.get(">");case 123:this.nextChar();return i.Cmd.get("{");case 125:this.nextChar();return i.Cmd.get("}");case 41:this.nextChar();throw new a.FormatError(`Illegal character: ${t}`)}let r=String.fromCharCode(t);if(t<32||t>127){const e=this.peekChar();if(e>=32&&e<=127){this.nextChar();return i.Cmd.get(r)}}const n=this.knownCommands;let s=n&&void 0!==n[r];for(;(t=this.nextChar())>=0&&!b[t];){const e=r+String.fromCharCode(t);if(s&&void 0===n[e])break;if(128===r.length)throw new a.FormatError(`Command token too long: ${r.length}`);r=e;s=n&&void 0!==n[r]}if("true"===r)return!0;if("false"===r)return!1;if("null"===r)return null;"BI"===r&&(this.beginInlineImagePos=this.stream.pos);return i.Cmd.get(r)}peekObj(){const e=this.stream.pos,t=this.currentChar,r=this.beginInlineImagePos;let i;try{i=this.getObj()}catch(e){if(e instanceof n.MissingDataException)throw e;(0,a.warn)(`peekObj: ${e}`)}this.stream.pos=e;this.currentChar=t;this.beginInlineImagePos=r;return i}skipToNextLine(){let e=this.currentChar;for(;e>=0;){if(13===e){e=this.nextChar();10===e&&this.nextChar();break}if(10===e){this.nextChar();break}e=this.nextChar()}}}t.Lexer=Lexer;t.Linearization=class Linearization{static create(e){function getInt(e,t,r=!1){const a=e.get(t);if(Number.isInteger(a)&&(r?a>=0:a>0))return a;throw new Error(`The "${t}" parameter in the linearization dictionary is invalid.`)}const t=new Parser({lexer:new Lexer(e),xref:null}),r=t.getObj(),n=t.getObj(),s=t.getObj(),o=t.getObj();let c,l;if(!(Number.isInteger(r)&&Number.isInteger(n)&&(0,i.isCmd)(s,"obj")&&(0,i.isDict)(o)&&(0,a.isNum)(c=o.get("Linearized"))&&c>0))return null;if((l=getInt(o,"L"))!==e.length)throw new Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:l,hints:function getHints(e){const t=e.get("H");let r;if(Array.isArray(t)&&(2===(r=t.length)||4===r)){for(let e=0;e0))throw new Error(`Hint (${e}) in the linearization dictionary is invalid.`)}return t}throw new Error("Hint array in the linearization dictionary is invalid.")}(o),objectNumberFirst:getInt(o,"O"),endFirst:getInt(o,"E"),numPages:getInt(o,"N"),mainXRefEntriesOffset:getInt(o,"T"),pageFirst:o.has("P")?getInt(o,"P",!0):0}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.Ascii85Stream=void 0;var a=r(29),i=r(9);class Ascii85Stream extends a.DecodeStream{constructor(e,t){t&&(t*=.8);super(t);this.str=e;this.dict=e.dict;this.input=new Uint8Array(5)}readBlock(){const e=this.str;let t=e.getByte();for(;(0,i.isWhiteSpace)(t);)t=e.getByte();if(-1===t||126===t){this.eof=!0;return}const r=this.bufferLength;let a,n;if(122===t){a=this.ensureBuffer(r+4);for(n=0;n<4;++n)a[r+n]=0;this.bufferLength+=4}else{const s=this.input;s[0]=t;for(n=1;n<5;++n){t=e.getByte();for(;(0,i.isWhiteSpace)(t);)t=e.getByte();s[n]=t;if(-1===t||126===t)break}a=this.ensureBuffer(r+n-1);this.bufferLength+=n-1;if(n<5){for(;n<5;++n)s[n]=117;this.eof=!0}let o=0;for(n=0;n<5;++n)o=85*o+(s[n]-33);for(n=3;n>=0;--n){a[r+n]=255&o;o>>=8}}}}t.Ascii85Stream=Ascii85Stream},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.StreamsSequenceStream=t.DecodeStream=void 0;var a=r(6),i=r(10);const n=new Uint8Array(0);class DecodeStream extends a.BaseStream{constructor(e){super();this._rawMinBufferLength=e||0;this.pos=0;this.bufferLength=0;this.eof=!1;this.buffer=n;this.minBufferLength=512;if(e)for(;this.minBufferLengtht&&(a=t)}else{for(;!this.eof;)this.readBlock();a=this.bufferLength}this.pos=a;const i=this.buffer.subarray(r,a);return!t||i instanceof Uint8ClampedArray?i:new Uint8ClampedArray(i)}reset(){this.pos=0}makeSubStream(e,t,r=null){if(void 0===t)for(;!this.eof;)this.readBlock();else{const r=e+t;for(;this.bufferLength<=r&&!this.eof;)this.readBlock()}return new i.Stream(this.buffer,e,t,r)}getBaseStreams(){return this.str?this.str.getBaseStreams():null}}t.DecodeStream=DecodeStream;t.StreamsSequenceStream=class StreamsSequenceStream extends DecodeStream{constructor(e,t=null){let r=0;for(const t of e)r+=t instanceof DecodeStream?t._rawMinBufferLength:t.length;super(r);this.streams=e;this._onError=t}readBlock(){const e=this.streams;if(0===e.length){this.eof=!0;return}const t=e.shift();let r;try{r=t.getBytes()}catch(e){if(this._onError){this._onError(e,t.dict&&t.dict.objId);return}throw e}const a=this.bufferLength,i=a+r.length;this.ensureBuffer(i).set(r,a);this.bufferLength=i}getBaseStreams(){const e=[];for(const t of this.streams){const r=t.getBaseStreams();r&&e.push(...r)}return e.length>0?e:null}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.AsciiHexStream=void 0;var a=r(29);class AsciiHexStream extends a.DecodeStream{constructor(e,t){t&&(t*=.5);super(t);this.str=e;this.dict=e.dict;this.firstDigit=-1}readBlock(){const e=this.str.getBytes(8e3);if(!e.length){this.eof=!0;return}const t=e.length+1>>1,r=this.ensureBuffer(this.bufferLength+t);let a=this.bufferLength,i=this.firstDigit;for(const t of e){let e;if(t>=48&&t<=57)e=15&t;else{if(!(t>=65&&t<=70||t>=97&&t<=102)){if(62===t){this.eof=!0;break}continue}e=9+(15&t)}if(i<0)i=e;else{r[a++]=i<<4|e;i=-1}}if(i>=0&&this.eof){r[a++]=i<<4;i=-1}this.firstDigit=i;this.bufferLength=a}}t.AsciiHexStream=AsciiHexStream},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.CCITTFaxStream=void 0;var a=r(5),i=r(32),n=r(29);class CCITTFaxStream extends n.DecodeStream{constructor(e,t,r){super(t);this.str=e;this.dict=e.dict;(0,a.isDict)(r)||(r=a.Dict.empty);const n={next:()=>e.getByte()};this.ccittFaxDecoder=new i.CCITTFaxDecoder(n,{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")})}readBlock(){for(;!this.eof;){const e=this.ccittFaxDecoder.readNextChar();if(-1===e){this.eof=!0;return}this.ensureBuffer(this.bufferLength+1);this.buffer[this.bufferLength++]=e}}}t.CCITTFaxStream=CCITTFaxStream},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.CCITTFaxDecoder=void 0;var a=r(2);const i=-1,n=[[-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]],s=[[-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]],o=[[-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]],l=[[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]],h=[[-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]];t.CCITTFaxDecoder=class CCITTFaxDecoder{constructor(e,t={}){if(!e||"function"!=typeof e.next)throw new Error('CCITTFaxDecoder - invalid "source" parameter.');this.source=e;this.eof=!1;this.encoding=t.K||0;this.eoline=t.EndOfLine||!1;this.byteAlign=t.EncodedByteAlign||!1;this.columns=t.Columns||1728;this.rows=t.Rows||0;let r,a=t.EndOfBlock;null==a&&(a=!0);this.eoblock=a;this.black=t.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;for(;0===(r=this._lookBits(12));)this._eatBits(1);1===r&&this._eatBits(12);if(this.encoding>0){this.nextLine2D=!this._lookBits(1);this._eatBits(1)}}readNextChar(){if(this.eof)return-1;const e=this.refLine,t=this.codingLine,r=this.columns;let n,s,o,c,l;if(0===this.outputBits){this.rowsDone&&(this.eof=!0);if(this.eof)return-1;this.err=!1;let o,l,h;if(this.nextLine2D){for(c=0;t[c]=64);do{l+=h=this._getWhiteCode()}while(h>=64)}else{do{o+=h=this._getWhiteCode()}while(h>=64);do{l+=h=this._getBlackCode()}while(h>=64)}this._addPixels(t[this.codingPos]+o,s);t[this.codingPos]0?--n:++n;for(;e[n]<=t[this.codingPos]&&e[n]0?--n:++n;for(;e[n]<=t[this.codingPos]&&e[n]0?--n:++n;for(;e[n]<=t[this.codingPos]&&e[n]=64);else do{o+=h=this._getWhiteCode()}while(h>=64);this._addPixels(t[this.codingPos]+o,s);s^=1}}let u=!1;this.byteAlign&&(this.inputBits&=-8);if(this.eoblock||this.row!==this.rows-1){o=this._lookBits(12);if(this.eoline)for(;o!==i&&1!==o;){this._eatBits(1);o=this._lookBits(12)}else for(;0===o;){this._eatBits(1);o=this._lookBits(12)}if(1===o){this._eatBits(12);u=!0}else o===i&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone){this.nextLine2D=!this._lookBits(1);this._eatBits(1)}if(this.eoblock&&u&&this.byteAlign){o=this._lookBits(12);if(1===o){this._eatBits(12);if(this.encoding>0){this._lookBits(1);this._eatBits(1)}if(this.encoding>=0)for(c=0;c<4;++c){o=this._lookBits(12);1!==o&&(0,a.info)("bad rtc code: "+o);this._eatBits(12);if(this.encoding>0){this._lookBits(1);this._eatBits(1)}}this.eof=!0}}else if(this.err&&this.eoline){for(;;){o=this._lookBits(13);if(o===i){this.eof=!0;return-1}if(o>>1==1)break;this._eatBits(1)}this._eatBits(12);if(this.encoding>0){this._eatBits(1);this.nextLine2D=!(1&o)}}t[0]>0?this.outputBits=t[this.codingPos=0]:this.outputBits=t[this.codingPos=1];this.row++}if(this.outputBits>=8){l=1&this.codingPos?0:255;this.outputBits-=8;if(0===this.outputBits&&t[this.codingPos]o){l<<=o;1&this.codingPos||(l|=255>>8-o);this.outputBits-=o;o=0}else{l<<=this.outputBits;1&this.codingPos||(l|=255>>8-this.outputBits);o-=this.outputBits;this.outputBits=0;if(t[this.codingPos]0){l<<=o;o=0}}}while(o)}this.black&&(l^=255);return l}_addPixels(e,t){const r=this.codingLine;let i=this.codingPos;if(e>r[i]){if(e>this.columns){(0,a.info)("row is wrong length");this.err=!0;e=this.columns}1&i^t&&++i;r[i]=e}this.codingPos=i}_addPixelsNeg(e,t){const r=this.codingLine;let i=this.codingPos;if(e>r[i]){if(e>this.columns){(0,a.info)("row is wrong length");this.err=!0;e=this.columns}1&i^t&&++i;r[i]=e}else if(e0&&e=n){const t=r[e-n];if(t[0]===a){this._eatBits(a);return[!0,t[1],!0]}}}return[!1,0,!1]}_getTwoDimCode(){let e,t=0;if(this.eoblock){t=this._lookBits(7);e=n[t];if(e&&e[0]>0){this._eatBits(e[0]);return e[1]}}else{const e=this._findTableCode(1,7,n);if(e[0]&&e[2])return e[1]}(0,a.info)("Bad two dim code");return i}_getWhiteCode(){let e,t=0;if(this.eoblock){t=this._lookBits(12);if(t===i)return 1;e=t>>5==0?s[t]:o[t>>3];if(e[0]>0){this._eatBits(e[0]);return e[1]}}else{let e=this._findTableCode(1,9,o);if(e[0])return e[1];e=this._findTableCode(11,12,s);if(e[0])return e[1]}(0,a.info)("bad white code");this._eatBits(1);return 1}_getBlackCode(){let e,t;if(this.eoblock){e=this._lookBits(13);if(e===i)return 1;t=e>>7==0?c[e]:e>>9==0&&e>>7!=0?l[(e>>1)-64]:h[e>>7];if(t[0]>0){this._eatBits(t[0]);return t[1]}}else{let e=this._findTableCode(2,6,h);if(e[0])return e[1];e=this._findTableCode(7,12,l,64);if(e[0])return e[1];e=this._findTableCode(10,13,c);if(e[0])return e[1]}(0,a.info)("bad black code");this._eatBits(1);return 1}_lookBits(e){let t;for(;this.inputBits>16-e;this.inputBuf=this.inputBuf<<8|t;this.inputBits+=8}return this.inputBuf>>this.inputBits-e&65535>>16-e}_eatBits(e){(this.inputBits-=e)<0&&(this.inputBits=0)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.FlateStream=void 0;var a=r(29),i=r(2);const n=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=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]),o=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]),c=[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],l=[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];class FlateStream extends a.DecodeStream{constructor(e,t){super(t);this.str=e;this.dict=e.dict;const r=e.getByte(),a=e.getByte();if(-1===r||-1===a)throw new i.FormatError(`Invalid header in flate stream: ${r}, ${a}`);if(8!=(15&r))throw new i.FormatError(`Unknown compression method in flate stream: ${r}, ${a}`);if(((r<<8)+a)%31!=0)throw new i.FormatError(`Bad FCHECK in flate stream: ${r}, ${a}`);if(32&a)throw new i.FormatError(`FDICT bit set in flate stream: ${r}, ${a}`);this.codeSize=0;this.codeBuf=0}getBits(e){const t=this.str;let r,a=this.codeSize,n=this.codeBuf;for(;a>e;this.codeSize=a-=e;return r}getCode(e){const t=this.str,r=e[0],a=e[1];let n,s=this.codeSize,o=this.codeBuf;for(;s>16,h=65535&c;if(l<1||s>l;this.codeSize=s-l;return h}generateHuffmanTable(e){const t=e.length;let r,a=0;for(r=0;ra&&(a=e[r]);const i=1<>=1}for(r=e;r>=1;if(0===u){let t;if(-1===(t=r.getByte()))throw new i.FormatError("Bad block header in flate stream");let a=t;if(-1===(t=r.getByte()))throw new i.FormatError("Bad block header in flate stream");a|=t<<8;if(-1===(t=r.getByte()))throw new i.FormatError("Bad block header in flate stream");let n=t;if(-1===(t=r.getByte()))throw new i.FormatError("Bad block header in flate stream");n|=t<<8;if(n!==(65535&~a)&&(0!==a||0!==n))throw new i.FormatError("Bad uncompressed block length in flate stream");this.codeBuf=0;this.codeSize=0;const s=this.bufferLength,o=s+a;e=this.ensureBuffer(o);this.bufferLength=o;if(0===a)-1===r.peekByte()&&(this.eof=!0);else{const t=r.getBytes(a);e.set(t,s);t.length0;)u[o++]=g}a=this.generateHuffmanTable(u.subarray(0,e));h=this.generateHuffmanTable(u.subarray(e,l))}}e=this.buffer;let d=e?e.length:0,f=this.bufferLength;for(;;){let r=this.getCode(a);if(r<256){if(f+1>=d){e=this.ensureBuffer(f+1);d=e.length}e[f++]=r;continue}if(256===r){this.bufferLength=f;return}r-=257;r=s[r];let i=r>>16;i>0&&(i=this.getBits(i));t=(65535&r)+i;r=this.getCode(h);r=o[r];i=r>>16;i>0&&(i=this.getBits(i));const n=(65535&r)+i;if(f+t>=d){e=this.ensureBuffer(f+t);d=e.length}for(let r=0;r{Object.defineProperty(t,"__esModule",{value:!0});t.Jbig2Stream=void 0;var a=r(5),i=r(29),n=r(35),s=r(2);class Jbig2Stream extends i.DecodeStream{constructor(e,t,r){super(t);this.stream=e;this.dict=e.dict;this.maybeLength=t;this.params=r}get bytes(){return(0,s.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(e){}readBlock(){if(this.eof)return;const e=new n.Jbig2Image,t=[];if((0,a.isDict)(this.params)){const e=this.params.get("JBIG2Globals");if((0,a.isStream)(e)){const r=e.getBytes();t.push({data:r,start:0,end:r.length})}}t.push({data:this.bytes,start:0,end:this.bytes.length});const r=e.parseChunks(t),i=r.length;for(let e=0;e{Object.defineProperty(t,"__esModule",{value:!0});t.Jbig2Image=void 0;var a=r(2),i=r(9),n=r(36),s=r(32);class Jbig2Error extends a.BaseException{constructor(e){super(`JBIG2 error: ${e}`,"Jbig2Error")}}class ContextCache{getContexts(e){return e in this?this[e]:this[e]=new Int8Array(65536)}}class DecodingContext{constructor(e,t,r){this.data=e;this.start=t;this.end=r}get decoder(){const e=new n.ArithmeticDecoder(this.data,this.start,this.end);return(0,a.shadow)(this,"decoder",e)}get contextCache(){const e=new ContextCache;return(0,a.shadow)(this,"contextCache",e)}}function decodeInteger(e,t,r){const a=e.getContexts(t);let i=1;function readBits(e){let t=0;for(let n=0;n>>0}const n=readBits(1),s=readBits(1)?readBits(1)?readBits(1)?readBits(1)?readBits(1)?readBits(32)+4436:readBits(12)+340:readBits(8)+84:readBits(6)+20:readBits(4)+4:readBits(2);return 0===n?s:s>0?-s:null}function decodeIAID(e,t,r){const a=e.getContexts("IAID");let i=1;for(let e=0;e=O&&j=T){q=q<<1&y;for(b=0;b=0&&_=0){U=N[$][_];U&&(q|=U<=e?l<<=1:l=l<<1|C[o][c]}for(p=0;p=x||c<0||c>=S?l<<=1:l=l<<1|a[o][c]}const h=v.readBit(F,l);t[s]=h}}return C}function decodeTextRegion(e,t,r,a,i,n,s,o,c,l,h,u,d,f,g,p,m,b,y){if(e&&t)throw new Jbig2Error("refinement with Huffman is not supported");const w=[];let S,x;for(S=0;S1&&(i=e?y.readBits(b):decodeInteger(C,"IAIT",k));const n=s*v+i,F=e?f.symbolIDTable.decode(y):decodeIAID(C,k,c),O=t&&(e?y.readBit():decodeInteger(C,"IARI",k));let T=o[F],M=T[0].length,E=T.length;if(O){const e=decodeInteger(C,"IARDW",k),t=decodeInteger(C,"IARDH",k),r=decodeInteger(C,"IARDX",k),a=decodeInteger(C,"IARDY",k);M+=e;E+=t;T=decodeRefinement(M,E,g,T,(e>>1)+r,(t>>1)+a,!1,p,m)}const D=n-(1&u?0:E-1),N=a-(2&u?M-1:0);let L,R,j;if(l){for(L=0;L>5&7;const h=[31&c];let u=t+6;if(7===c){l=536870911&(0,i.readUint32)(e,u-1);u+=3;let t=l+7>>3;h[0]=e[u++];for(;--t>0;)h.push(e[u++])}else if(5===c||6===c)throw new Jbig2Error("invalid referred-to flags");r.retainBits=h;let f=4;r.number<=256?f=1:r.number<=65536&&(f=2);const g=[];let p,m;for(p=0;p>>24&255;n[3]=t.height>>16&255;n[4]=t.height>>8&255;n[5]=255&t.height;for(p=u,m=e.length;p>2&3;e.huffmanDWSelector=t>>4&3;e.bitmapSizeSelector=t>>6&1;e.aggregationInstancesSelector=t>>7&1;e.bitmapCodingContextUsed=!!(256&t);e.bitmapCodingContextRetained=!!(512&t);e.template=t>>10&3;e.refinementTemplate=t>>12&1;h+=2;if(!e.huffman){l=0===e.template?4:1;o=[];for(c=0;c>2&3;u.stripSize=1<>4&3;u.transposed=!!(64&f);u.combinationOperator=f>>7&3;u.defaultPixelValue=f>>9&1;u.dsOffset=f<<17>>27;u.refinementTemplate=f>>15&1;if(u.huffman){const e=(0,i.readUint16)(a,h);h+=2;u.huffmanFS=3&e;u.huffmanDS=e>>2&3;u.huffmanDT=e>>4&3;u.huffmanRefinementDW=e>>6&3;u.huffmanRefinementDH=e>>8&3;u.huffmanRefinementDX=e>>10&3;u.huffmanRefinementDY=e>>12&3;u.huffmanRefinementSizeSelector=!!(16384&e)}if(u.refinement&&!u.refinementTemplate){o=[];for(c=0;c<2;c++){o.push({x:(0,i.readInt8)(a,h),y:(0,i.readInt8)(a,h+1)});h+=2}u.refinementAt=o}u.numberOfSymbolInstances=(0,i.readUint32)(a,h);h+=4;s=[u,r.referredTo,a,h,n];break;case 16:const g={},p=a[h++];g.mmr=!!(1&p);g.template=p>>1&3;g.patternWidth=a[h++];g.patternHeight=a[h++];g.maxPatternIndex=(0,i.readUint32)(a,h);h+=4;s=[g,r.number,a,h,n];break;case 22:case 23:const m={};m.info=readRegionSegmentInformation(a,h);h+=d;const b=a[h++];m.mmr=!!(1&b);m.template=b>>1&3;m.enableSkip=!!(8&b);m.combinationOperator=b>>4&7;m.defaultPixelValue=b>>7&1;m.gridWidth=(0,i.readUint32)(a,h);h+=4;m.gridHeight=(0,i.readUint32)(a,h);h+=4;m.gridOffsetX=4294967295&(0,i.readUint32)(a,h);h+=4;m.gridOffsetY=4294967295&(0,i.readUint32)(a,h);h+=4;m.gridVectorX=(0,i.readUint16)(a,h);h+=2;m.gridVectorY=(0,i.readUint16)(a,h);h+=2;s=[m,r.referredTo,a,h,n];break;case 38:case 39:const y={};y.info=readRegionSegmentInformation(a,h);h+=d;const w=a[h++];y.mmr=!!(1&w);y.template=w>>1&3;y.prediction=!!(8&w);if(!y.mmr){l=0===y.template?4:1;o=[];for(c=0;c>2&1;S.combinationOperator=x>>3&3;S.requiresBuffer=!!(32&x);S.combinationOperatorOverride=!!(64&x);s=[S];break;case 49:case 50:case 51:break;case 53:s=[r.number,a,h,n];break;case 62:break;default:throw new Jbig2Error(`segment type ${r.typeName}(${r.type}) is not implemented`)}const u="on"+r.typeName;u in t&&t[u].apply(t,s)}function processSegments(e,t){for(let r=0,a=e.length;r>3,r=new Uint8ClampedArray(t*e.height);if(e.defaultPixelValue)for(let e=0,t=r.length;e>3,s=r.combinationOperatorOverride?e.combinationOperator:r.combinationOperator,o=this.buffer,c=128>>(7&e.x);let l,h,u,d,f=e.y*n+(e.x>>3);switch(s){case 0:for(l=0;l>=1;if(!u){u=128;d++}}f+=n}break;case 2:for(l=0;l>=1;if(!u){u=128;d++}}f+=n}break;default:throw new Jbig2Error(`operator ${s} is not supported`)}}onImmediateGenericRegion(e,t,r,a){const i=e.info,n=new DecodingContext(t,r,a),s=decodeBitmap(e.mmr,i.width,i.height,e.template,e.prediction,null,e.at,n);this.drawBitmap(i,s)}onImmediateLosslessGenericRegion(){this.onImmediateGenericRegion.apply(this,arguments)}onSymbolDictionary(e,t,r,a,n,s){let o,c;if(e.huffman){o=function getSymbolDictionaryHuffmanTables(e,t,r){let a,i,n,s,o=0;switch(e.huffmanDHSelector){case 0:case 1:a=getStandardTable(e.huffmanDHSelector+4);break;case 3:a=getCustomHuffmanTable(o,t,r);o++;break;default:throw new Jbig2Error("invalid Huffman DH selector")}switch(e.huffmanDWSelector){case 0:case 1:i=getStandardTable(e.huffmanDWSelector+2);break;case 3:i=getCustomHuffmanTable(o,t,r);o++;break;default:throw new Jbig2Error("invalid Huffman DW selector")}if(e.bitmapSizeSelector){n=getCustomHuffmanTable(o,t,r);o++}else n=getStandardTable(1);s=e.aggregationInstancesSelector?getCustomHuffmanTable(o,t,r):getStandardTable(1);return{tableDeltaHeight:a,tableDeltaWidth:i,tableBitmapSize:n,tableAggregateInstances:s}}(e,r,this.customTables);c=new Reader(a,n,s)}let l=this.symbols;l||(this.symbols=l={});let h=[];for(let e=0,t=r.length;e1)y=decodeTextRegion(e,t,a,g,0,i,1,r.concat(f),p,0,0,1,0,s,l,h,u,0,d);else{const e=decodeIAID(b,m,p),t=decodeInteger(b,"IARDX",m),i=decodeInteger(b,"IARDY",m);y=decodeRefinement(a,g,l,e=32){let r,a,s;switch(t){case 32:if(0===e)throw new Jbig2Error("no previous value in symbol ID table");a=i.readBits(2)+3;r=n[e-1].prefixLength;break;case 33:a=i.readBits(3)+3;r=0;break;case 34:a=i.readBits(7)+11;r=0;break;default:throw new Jbig2Error("invalid code length in symbol ID table")}for(s=0;s=0;b--){M=e?decodeMMRBitmap(T,l,h,!0):decodeBitmap(!1,l,h,r,!1,null,F,p);O[b]=M}for(E=0;E=0;y--){N^=O[y][E][D];L|=N<>8;$=d+E*f-D*g>>8;if(j>=0&&j+k<=a&&$>=0&&$+C<=n)for(b=0;b=n)){U=m[t];_=R[b];for(y=0;y=0&&e>1&7),l=1+(a>>4&7),h=[];let u,d,f=n;do{u=o.readBits(c);d=o.readBits(l);h.push(new HuffmanLine([f,u,d,0]));f+=1<>t&1;if(t<=0)this.children[r]=new HuffmanTreeNode(e);else{let a=this.children[r];a||(this.children[r]=a=new HuffmanTreeNode(null));a.buildTree(e,t-1)}}decodeNode(e){if(this.isLeaf){if(this.isOOB)return null;const t=e.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-t:t)}const t=this.children[e.readBit()];if(!t)throw new Jbig2Error("invalid Huffman data");return t.decodeNode(e)}}class HuffmanTable{constructor(e,t){t||this.assignPrefixCodes(e);this.rootNode=new HuffmanTreeNode(null);for(let t=0,r=e.length;t0&&this.rootNode.buildTree(r,r.prefixLength-1)}}decode(e){return this.rootNode.decodeNode(e)}assignPrefixCodes(e){const t=e.length;let r=0;for(let a=0;a=this.end)throw new Jbig2Error("end of data while reading bit");this.currentByte=this.data[this.position++];this.shift=7}const e=this.currentByte>>this.shift&1;this.shift--;return e}readBits(e){let t,r=0;for(t=e-1;t>=0;t--)r|=this.readBit()<=this.end?-1:this.data[this.position++]}}function getCustomHuffmanTable(e,t,r){let a=0;for(let i=0,n=t.length;i>r&1;r--}}if(a&&!l){const e=5;for(let t=0;t>=1}}return{imgData:u,width:c,height:l}}(e);this.width=r;this.height=a;return t}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.ArithmeticDecoder=void 0;const r=[{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}];t.ArithmeticDecoder=class ArithmeticDecoder{constructor(e,t,r){this.data=e;this.bp=t;this.dataEnd=r;this.chigh=e[t];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}byteIn(){const e=this.data;let t=this.bp;if(255===e[t])if(e[t+1]>143){this.clow+=65280;this.ct=8}else{t++;this.clow+=e[t]<<9;this.ct=7;this.bp=t}else{t++;this.clow+=t65535){this.chigh+=this.clow>>16;this.clow&=65535}}readBit(e,t){let a=e[t]>>1,i=1&e[t];const n=r[a],s=n.qe;let o,c=this.a-s;if(this.chigh>15&1;this.clow=this.clow<<1&65535;this.ct--}while(0==(32768&c));this.a=c;e[t]=a<<1|i;return o}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.JpegStream=void 0;var a=r(29),i=r(5),n=r(38),s=r(2);class JpegStream extends a.DecodeStream{constructor(e,t,r){let a;for(;-1!==(a=e.getByte());)if(255===a){e.skip(-1);break}super(t);this.stream=e;this.dict=e.dict;this.maybeLength=t;this.params=r}get bytes(){return(0,s.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(e){}readBlock(){if(this.eof)return;const e={decodeTransform:void 0,colorTransform:void 0},t=this.dict.getArray("Decode","D");if(this.forceRGB&&Array.isArray(t)){const r=this.dict.get("BitsPerComponent")||8,a=t.length,i=new Int32Array(a);let n=!1;const s=(1<{Object.defineProperty(t,"__esModule",{value:!0});t.JpegImage=void 0;var a=r(2),i=r(9);class JpegError extends a.BaseException{constructor(e){super(`JPEG error: ${e}`,"JpegError")}}class DNLMarkerError extends a.BaseException{constructor(e,t){super(e,"DNLMarkerError");this.scanLines=t}}class EOIMarkerError extends a.BaseException{constructor(e){super(e,"EOIMarkerError")}}const n=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]),s=4017,o=799,c=3406,l=2276,h=1567,u=3784,d=5793,f=2896;function buildHuffmanTable(e,t){let r,a,i=0,n=16;for(;n>0&&!e[n-1];)n--;const s=[{children:[],index:0}];let o,c=s[0];for(r=0;r0;)c=s.pop();c.index++;s.push(c);for(;s.length<=r;){s.push(o={children:[],index:0});c.children[c.index]=o.children;c=o}i++}if(r+10){b--;return m>>b&1}m=e[t++];if(255===m){const a=e[t++];if(a){if(220===a&&d){t+=2;const a=(0,i.readUint16)(e,t);t+=2;if(a>0&&a!==r.scanLines)throw new DNLMarkerError("Found DNL marker (0xFFDC) while parsing scan data",a)}else if(217===a){if(d){const e=x*(8===r.precision?8:0);if(e>0&&Math.round(r.scanLines/e)>=10)throw new DNLMarkerError("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",e)}throw new EOIMarkerError("Found EOI marker (0xFFD9) while parsing scan data")}throw new JpegError(`unexpected marker ${(m<<8|a).toString(16)}`)}}b=7;return m>>>7}function decodeHuffman(e){let t=e;for(;;){t=t[readBit()];switch(typeof t){case"number":return t;case"object":continue}throw new JpegError("invalid huffman sequence")}}function receive(e){let t=0;for(;e>0;){t=t<<1|readBit();e--}return t}function receiveAndExtend(e){if(1===e)return 1===readBit()?1:-1;const t=receive(e);return t>=1<0){y--;return}let r=c;const a=l;for(;r<=a;){const a=decodeHuffman(e.huffmanTableAC),i=15&a,s=a>>4;if(0===i){if(s<15){y=receive(s)+(1<>4;if(0===i)if(o<15){y=receive(o)+(1<>4;if(0===a){if(s<15)break;i+=16;continue}i+=s;const o=n[i];e.blockData[t+o]=receiveAndExtend(a);i++}};let E,D,N,L,R=0;D=1===k?s[0].blocksPerLine*s[0].blocksPerColumn:f*r.mcusPerColumn;for(;R<=D;){const r=o?Math.min(D-R,o):D;if(r>0){for(v=0;v0?"unexpected":"excessive";(0,a.warn)(`decodeScan - ${e} MCU data, current marker is: ${E.invalid}`);t=E.offset}if(!(E.marker>=65488&&E.marker<=65495))break;t+=2}return t-p}function quantizeAndInverse(e,t,r){const a=e.quantizationTable,i=e.blockData;let n,g,p,m,b,y,w,S,x,k,C,v,F,O,T,M,E;if(!a)throw new JpegError("missing required Quantization Table.");for(let e=0;e<64;e+=8){x=i[t+e];k=i[t+e+1];C=i[t+e+2];v=i[t+e+3];F=i[t+e+4];O=i[t+e+5];T=i[t+e+6];M=i[t+e+7];x*=a[e];if(0!=(k|C|v|F|O|T|M)){k*=a[e+1];C*=a[e+2];v*=a[e+3];F*=a[e+4];O*=a[e+5];T*=a[e+6];M*=a[e+7];n=d*x+128>>8;g=d*F+128>>8;p=C;m=T;b=f*(k-M)+128>>8;S=f*(k+M)+128>>8;y=v<<4;w=O<<4;n=n+g+1>>1;g=n-g;E=p*u+m*h+128>>8;p=p*h-m*u+128>>8;m=E;b=b+w+1>>1;w=b-w;S=S+y+1>>1;y=S-y;n=n+m+1>>1;m=n-m;g=g+p+1>>1;p=g-p;E=b*l+S*c+2048>>12;b=b*c-S*l+2048>>12;S=E;E=y*o+w*s+2048>>12;y=y*s-w*o+2048>>12;w=E;r[e]=n+S;r[e+7]=n-S;r[e+1]=g+w;r[e+6]=g-w;r[e+2]=p+y;r[e+5]=p-y;r[e+3]=m+b;r[e+4]=m-b}else{E=d*x+512>>10;r[e]=E;r[e+1]=E;r[e+2]=E;r[e+3]=E;r[e+4]=E;r[e+5]=E;r[e+6]=E;r[e+7]=E}}for(let e=0;e<8;++e){x=r[e];k=r[e+8];C=r[e+16];v=r[e+24];F=r[e+32];O=r[e+40];T=r[e+48];M=r[e+56];if(0!=(k|C|v|F|O|T|M)){n=d*x+2048>>12;g=d*F+2048>>12;p=C;m=T;b=f*(k-M)+2048>>12;S=f*(k+M)+2048>>12;y=v;w=O;n=4112+(n+g+1>>1);g=n-g;E=p*u+m*h+2048>>12;p=p*h-m*u+2048>>12;m=E;b=b+w+1>>1;w=b-w;S=S+y+1>>1;y=S-y;n=n+m+1>>1;m=n-m;g=g+p+1>>1;p=g-p;E=b*l+S*c+2048>>12;b=b*c-S*l+2048>>12;S=E;E=y*o+w*s+2048>>12;y=y*s-w*o+2048>>12;w=E;x=n+S;M=n-S;k=g+w;T=g-w;C=p+y;O=p-y;v=m+b;F=m-b;x<16?x=0:x>=4080?x=255:x>>=4;k<16?k=0:k>=4080?k=255:k>>=4;C<16?C=0:C>=4080?C=255:C>>=4;v<16?v=0:v>=4080?v=255:v>>=4;F<16?F=0:F>=4080?F=255:F>>=4;O<16?O=0:O>=4080?O=255:O>>=4;T<16?T=0:T>=4080?T=255:T>>=4;M<16?M=0:M>=4080?M=255:M>>=4;i[t+e]=x;i[t+e+8]=k;i[t+e+16]=C;i[t+e+24]=v;i[t+e+32]=F;i[t+e+40]=O;i[t+e+48]=T;i[t+e+56]=M}else{E=d*x+8192>>14;E=E<-2040?0:E>=2024?255:E+2056>>4;i[t+e]=E;i[t+e+8]=E;i[t+e+16]=E;i[t+e+24]=E;i[t+e+32]=E;i[t+e+40]=E;i[t+e+48]=E;i[t+e+56]=E}}}function buildComponentData(e,t){const r=t.blocksPerLine,a=t.blocksPerColumn,i=new Int16Array(64);for(let e=0;e=a)return null;const s=(0,i.readUint16)(e,t);if(s>=65472&&s<=65534)return{invalid:null,marker:s,offset:t};let o=(0,i.readUint16)(e,n);for(;!(o>=65472&&o<=65534);){if(++n>=a)return null;o=(0,i.readUint16)(e,n)}return{invalid:s.toString(16),marker:o,offset:n}}t.JpegImage=class JpegImage{constructor({decodeTransform:e=null,colorTransform:t=-1}={}){this._decodeTransform=e;this._colorTransform=t}parse(e,{dnlScanLines:t=null}={}){function readDataBlock(){const t=(0,i.readUint16)(e,o);o+=2;let r=o+t-2;const n=findNextFileMarker(e,r,o);if(n&&n.invalid){(0,a.warn)("readDataBlock - incorrect length, current marker is: "+n.invalid);r=n.offset}const s=e.subarray(o,r);o+=s.length;return s}function prepareComponents(e){const t=Math.ceil(e.samplesPerLine/8/e.maxH),r=Math.ceil(e.scanLines/8/e.maxV);for(let a=0,i=e.components.length;a>4==0)for(m=0;m<64;m++){x=n[m];r[x]=e[o++]}else{if(t>>4!=1)throw new JpegError("DQT - invalid table spec");for(m=0;m<64;m++){x=n[m];r[x]=(0,i.readUint16)(e,o);o+=2}}u[15&t]=r}break;case 65472:case 65473:case 65474:if(r)throw new JpegError("Only single frame JPEGs supported");o+=2;r={};r.extended=65473===g;r.progressive=65474===g;r.precision=e[o++];const k=(0,i.readUint16)(e,o);o+=2;r.scanLines=t||k;r.samplesPerLine=(0,i.readUint16)(e,o);o+=2;r.components=[];r.componentIds={};const C=e[o++];let v=0,F=0;for(p=0;p>4,i=15&e[o+1];v>4==0?f:d)[15&t]=buildHuffmanTable(r,i)}break;case 65501:o+=2;s=(0,i.readUint16)(e,o);o+=2;break;case 65498:const T=1==++h&&!t;o+=2;const M=e[o++],E=[];for(p=0;p>4];i.huffmanTableAC=d[15&n];E.push(i)}const D=e[o++],N=e[o++],L=e[o++];try{const t=decodeScan(e,o,r,E,s,D,N,L>>4,15&L,T);o+=t}catch(t){if(t instanceof DNLMarkerError){(0,a.warn)(`${t.message} -- attempting to re-parse the JPEG image.`);return this.parse(e,{dnlScanLines:t.scanLines})}if(t instanceof EOIMarkerError){(0,a.warn)(`${t.message} -- ignoring the rest of the image data.`);break e}throw t}break;case 65500:o+=4;break;case 65535:255!==e[o]&&o--;break;default:const R=findNextFileMarker(e,o-2,o-3);if(R&&R.invalid){(0,a.warn)("JpegImage.parse - unexpected data, current marker is: "+R.invalid);o=R.offset;break}if(!R||o>=e.length-1){(0,a.warn)("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break e}throw new JpegError("JpegImage.parse - unknown marker: "+g.toString(16))}g=(0,i.readUint16)(e,o);o+=2}this.width=r.samplesPerLine;this.height=r.scanLines;this.jfif=c;this.adobe=l;this.components=[];for(let e=0,t=r.components.length;e>8)+C[f+1];return w}get _isColorConversionNeeded(){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}_convertYccToRgb(e){let t,r,a;for(let i=0,n=e.length;i4)throw new JpegError("Unsupported color mode");const i=this._getLinearizedBlockData(e,t,a);if(1===this.numComponents&&r){const e=i.length,t=new Uint8ClampedArray(3*e);let r=0;for(let a=0;a{Object.defineProperty(t,"__esModule",{value:!0});t.JpxStream=void 0;var a=r(29),i=r(40),n=r(2);class JpxStream extends a.DecodeStream{constructor(e,t,r){super(t);this.stream=e;this.dict=e.dict;this.maybeLength=t;this.params=r}get bytes(){return(0,n.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(e){}readBlock(){if(this.eof)return;const e=new i.JpxImage;e.parse(this.bytes);const t=e.width,r=e.height,a=e.componentsCount,n=e.tiles.length;if(1===n)this.buffer=e.tiles[0].items;else{const i=new Uint8ClampedArray(t*r*a);for(let r=0;r{Object.defineProperty(t,"__esModule",{value:!0});t.JpxImage=void 0;var a=r(2),i=r(9),n=r(36);class JpxError extends a.BaseException{constructor(e){super(`JPX error: ${e}`,"JpxError")}}const s={LL:0,LH:1,HL:1,HH:2};t.JpxImage=class JpxImage{constructor(){this.failOnCorruptedImage=!1}parse(e){if(65359===(0,i.readUint16)(e,0)){this.parseCodestream(e,0,e.length);return}const t=e.length;let r=0;for(;r>24&255,o>>16&255,o>>8&255,255&o);(0,a.warn)(`Unsupported header type ${o} (${n}).`)}l&&(r+=c)}}parseImageProperties(e){let t=e.getByte();for(;t>=0;){const r=t;t=e.getByte();if(65361===(r<<8|t)){e.skip(4);const t=e.getInt32()>>>0,r=e.getInt32()>>>0,a=e.getInt32()>>>0,i=e.getInt32()>>>0;e.skip(16);const n=e.getUint16();this.width=t-a;this.height=r-i;this.componentsCount=n;this.bitsPerComponent=8;return}}throw new JpxError("No size marker found in JPX stream")}parseCodestream(e,t,r){const n={};let s=!1;try{let o=t;for(;o+1>5;l=[];for(;r>3;t.mu=0}else{t.epsilon=e[r]>>3;t.mu=(7&e[r])<<8|e[r+1];r+=2}l.push(t)}b.SPqcds=l;if(n.mainHeader)n.QCD=b;else{n.currentTile.QCD=b;n.currentTile.QCC=[]}break;case 65373:f=(0,i.readUint16)(e,o);const y={};r=o+2;let w;if(n.SIZ.Csiz<257)w=e[r++];else{w=(0,i.readUint16)(e,r);r+=2}c=e[r++];switch(31&c){case 0:h=8;u=!0;break;case 1:h=16;u=!1;break;case 2:h=16;u=!0;break;default:throw new Error("Invalid SQcd value "+c)}y.noQuantization=8===h;y.scalarExpounded=u;y.guardBits=c>>5;l=[];for(;r>3;t.mu=0}else{t.epsilon=e[r]>>3;t.mu=(7&e[r])<<8|e[r+1];r+=2}l.push(t)}y.SPqcds=l;n.mainHeader?n.QCC[w]=y:n.currentTile.QCC[w]=y;break;case 65362:f=(0,i.readUint16)(e,o);const S={};r=o+2;const x=e[r++];S.entropyCoderWithCustomPrecincts=!!(1&x);S.sopMarkerUsed=!!(2&x);S.ephMarkerUsed=!!(4&x);S.progressionOrder=e[r++];S.layersCount=(0,i.readUint16)(e,r);r+=2;S.multipleComponentTransform=e[r++];S.decompositionLevelsCount=e[r++];S.xcb=2+(15&e[r++]);S.ycb=2+(15&e[r++]);const k=e[r++];S.selectiveArithmeticCodingBypass=!!(1&k);S.resetContextProbabilities=!!(2&k);S.terminationOnEachCodingPass=!!(4&k);S.verticallyStripe=!!(8&k);S.predictableTermination=!!(16&k);S.segmentationSymbolUsed=!!(32&k);S.reversibleTransformation=e[r++];if(S.entropyCoderWithCustomPrecincts){const t=[];for(;r>4})}S.precinctsSizes=t}const C=[];S.selectiveArithmeticCodingBypass&&C.push("selectiveArithmeticCodingBypass");S.resetContextProbabilities&&C.push("resetContextProbabilities");S.terminationOnEachCodingPass&&C.push("terminationOnEachCodingPass");S.verticallyStripe&&C.push("verticallyStripe");S.predictableTermination&&C.push("predictableTermination");if(C.length>0){s=!0;(0,a.warn)(`JPX: Unsupported COD options (${C.join(", ")}).`)}if(n.mainHeader)n.COD=S;else{n.currentTile.COD=S;n.currentTile.COC=[]}break;case 65424:f=(0,i.readUint16)(e,o);d={};d.index=(0,i.readUint16)(e,o+2);d.length=(0,i.readUint32)(e,o+4);d.dataEnd=d.length+o-2;d.partIndex=e[o+8];d.partsCount=e[o+9];n.mainHeader=!1;if(0===d.partIndex){d.COD=n.COD;d.COC=n.COC.slice(0);d.QCD=n.QCD;d.QCC=n.QCC.slice(0)}n.currentTile=d;break;case 65427:d=n.currentTile;if(0===d.partIndex){initializeTile(n,d.index);buildPackets(n)}f=d.dataEnd-o;parseTilePackets(n,e,o,f);break;case 65363:(0,a.warn)("JPX: Codestream code 0xFF53 (COC) is not implemented.");case 65365:case 65367:case 65368:case 65380:f=(0,i.readUint16)(e,o);break;default:throw new Error("Unknown codestream code: "+t.toString(16))}o+=f}}catch(e){if(s||this.failOnCorruptedImage)throw new JpxError(e.message);(0,a.warn)(`JPX: Trying to recover from: "${e.message}".`)}this.tiles=function transformComponents(e){const t=e.SIZ,r=e.components,a=t.Csiz,i=[];for(let t=0,n=e.tiles.length;t>2);c[b++]=e+m>>h;c[b++]=e>>h;c[b++]=e+p>>h}else for(d=0;d>h;c[b++]=g-.34413*p-.71414*m>>h;c[b++]=g+1.772*p>>h}if(e)for(d=0,b=3;d>h}else for(let e=0;e>h;b+=a}}i.push(l)}return i}(n);this.width=n.SIZ.Xsiz-n.SIZ.XOsiz;this.height=n.SIZ.Ysiz-n.SIZ.YOsiz;this.componentsCount=n.SIZ.Csiz}};function calculateComponentDimensions(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 calculateTileGrids(e,t){const r=e.SIZ,a=[];let i;const n=Math.ceil((r.Xsiz-r.XTOsiz)/r.XTsiz),s=Math.ceil((r.Ysiz-r.YTOsiz)/r.YTsiz);for(let e=0;e0?Math.min(a.xcb,i.PPx-1):Math.min(a.xcb,i.PPx);i.ycb_=r>0?Math.min(a.ycb,i.PPy-1):Math.min(a.ycb,i.PPy);return i}function buildPrecincts(e,t,r){const a=1<t.trx0?Math.ceil(t.trx1/a)-Math.floor(t.trx0/a):0,l=t.try1>t.try0?Math.ceil(t.try1/i)-Math.floor(t.try0/i):0,h=c*l;t.precinctParameters={precinctWidth:a,precinctHeight:i,numprecinctswide:c,numprecinctshigh:l,numprecincts:h,precinctWidthInSubband:s,precinctHeightInSubband:o}}function buildCodeblocks(e,t,r){const a=r.xcb_,i=r.ycb_,n=1<>a,c=t.tby0>>i,l=t.tbx1+n-1>>a,h=t.tby1+s-1>>i,u=t.resolution.precinctParameters,d=[],f=[];let g,p,m,b;for(p=c;pe.cbxMax&&(e.cbxMax=g);pe.cbyMax&&(e.cbyMax=p)}else f[b]=e={cbxMin:g,cbyMin:p,cbxMax:g,cbyMax:p};m.precinct=e}t.codeblockParameters={codeblockWidth:a,codeblockHeight:i,numcodeblockwide:l-o+1,numcodeblockhigh:h-c+1};t.codeblocks=d;t.precincts=f}function createPacket(e,t,r){const a=[],i=e.subbands;for(let e=0,r=i.length;ee.codingStyleParameters.decompositionLevelsCount)continue;const t=e.resolutions[c],r=t.precinctParameters.numprecincts;for(;he.codingStyleParameters.decompositionLevelsCount)continue;const t=e.resolutions[o],r=t.precinctParameters.numprecincts;for(;he.codingStyleParameters.decompositionLevelsCount)continue;const t=e.resolutions[o],r=t.precinctParameters.numprecincts;if(!(l>=r)){for(;s=0;--e){const r=t.resolutions[e],a=g*r.precinctParameters.precinctWidth,i=g*r.precinctParameters.precinctHeight;h=Math.min(h,a);u=Math.min(u,i);d=Math.max(d,r.precinctParameters.numprecinctswide);f=Math.max(f,r.precinctParameters.numprecinctshigh);l[e]={width:a,height:i};g<<=1}r=Math.min(r,h);a=Math.min(a,u);i=Math.max(i,d);n=Math.max(n,f);s[o]={resolutions:l,minWidth:h,minHeight:u,maxNumWide:d,maxNumHigh:f}}return{components:s,minWidth:r,minHeight:a,maxNumWide:i,maxNumHigh:n}}function buildPackets(e){const t=e.SIZ,r=e.currentTile.index,a=e.tiles[r],i=t.Csiz;for(let e=0;e>>o&(1<0;){const e=n.shift();o=e.codeblock;void 0===o.data&&(o.data=[]);o.data.push({data:t,start:r+s,end:r+s+e.dataLength,codingpasses:e.codingpasses});s+=e.dataLength}}return s}function copyCoefficients(e,t,r,a,i,s,c,l){const h=a.tbx0,u=a.tby0,d=a.tbx1-a.tbx0,f=a.codeblocks,g="H"===a.type.charAt(0)?1:0,p="H"===a.type.charAt(1)?t:0;for(let r=0,m=f.length;r=s?_:_*(1<0?1-e:0)}const g=t.subbands[a],p=s[g.type];copyCoefficients(n,r,0,g,f?1:2**(d+p-o)*(1+i/2048),h+o-1,f,u)}p.push({width:r,height:i,items:n})}const b=g.calculate(p,a.tcx0,a.tcy0);return{left:a.tcx0,top:a.tcy0,width:b.width,height:b.height,items:b.items}}function initializeTile(e,t){const r=e.SIZ.Csiz,a=e.tiles[t];for(let t=0;t>=1;t>>=1;a++}a--;r=this.levels[a];r.items[r.index]=i;this.currentLevel=a;delete this.value}incrementValue(){const e=this.levels[this.currentLevel];e.items[e.index]++}nextLevel(){let e=this.currentLevel,t=this.levels[e];const r=t.items[t.index];e--;if(e<0){this.value=r;return!1}this.currentLevel=e;t=this.levels[e];t.items[t.index]=r;return!0}}class InclusionTree{constructor(e,t,r){const a=(0,i.log2)(Math.max(e,t))+1;this.levels=[];for(let i=0;ir){this.currentLevel=a;this.propagateValues();return!1}e>>=1;t>>=1;a++}this.currentLevel=a-1;return!0}incrementValue(e){const t=this.levels[this.currentLevel];t.items[t.index]=e+1;this.propagateValues()}propagateValues(){let e=this.currentLevel,t=this.levels[e];const r=t.items[t.index];for(;--e>=0;){t=this.levels[e];t.items[t.index]=r}}nextLevel(){let e=this.currentLevel,t=this.levels[e];const r=t.items[t.index];t.items[t.index]=255;e--;if(e<0)return!1;this.currentLevel=e;t=this.levels[e];t.items[t.index]=r;return!0}}const o=function BitModelClosure(){const e=17,t=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]),r=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]),a=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 class BitModel{constructor(e,i,n,s,o){this.width=e;this.height=i;let c;c="HH"===n?a:"HL"===n?r:t;this.contextLabelTable=c;const l=e*i;this.neighborsSignificance=new Uint8Array(l);this.coefficentsSign=new Uint8Array(l);let h;h=o>14?new Uint32Array(l):o>6?new Uint16Array(l):new Uint8Array(l);this.coefficentsMagnitude=h;this.processingFlags=new Uint8Array(l);const u=new Uint8Array(l);if(0!==s)for(let e=0;e0,o=t+10){c=r-i;s&&(a[c-1]+=16);o&&(a[c+1]+=16);a[c]+=4}if(e+1=r)break;s[d]&=-2;if(a[d]||!n[d])continue;const g=c[n[d]];if(e.readBit(o,g)){const e=this.decodeSignBit(t,u,d);i[d]=e;a[d]=1;this.setNeighborsSignificance(t,u,d);s[d]|=2}l[d]++;s[d]|=1}}}decodeSignBit(e,t,r){const a=this.width,i=this.height,n=this.coefficentsMagnitude,s=this.coefficentsSign;let o,c,l,h,u,d;h=t>0&&0!==n[r-1];if(t+10&&0!==n[r-a];if(e+1=0){u=9+o;d=this.decoder.readBit(this.contexts,u)}else{u=9-o;d=1^this.decoder.readBit(this.contexts,u)}return d}runMagnitudeRefinementPass(){const e=this.decoder,t=this.width,r=this.height,a=this.coefficentsMagnitude,i=this.neighborsSignificance,n=this.contexts,s=this.bitsDecoded,o=this.processingFlags,c=t*r,l=4*t;for(let r,h=0;h>1;let i,n,s,o;const c=-1.586134342059924,l=-.052980118572961,h=.882911075530934,u=.443506852043971,d=1.230174104914001;i=(t|=0)-3;for(n=a+4;n--;i+=2)e[i]*=.8128930661159609;i=t-2;s=u*e[i-1];for(n=a+3;n--;i+=2){o=u*e[i+1];e[i]=d*e[i]-s-o;if(!n--)break;i+=2;s=u*e[i+1];e[i]=d*e[i]-s-o}i=t-1;s=h*e[i-1];for(n=a+2;n--;i+=2){o=h*e[i+1];e[i]-=s+o;if(!n--)break;i+=2;s=h*e[i+1];e[i]-=s+o}i=t;s=l*e[i-1];for(n=a+1;n--;i+=2){o=l*e[i+1];e[i]-=s+o;if(!n--)break;i+=2;s=l*e[i+1];e[i]-=s+o}if(0!==a){i=t+1;s=c*e[i-1];for(n=a;n--;i+=2){o=c*e[i+1];e[i]-=s+o;if(!n--)break;i+=2;s=c*e[i+1];e[i]-=s+o}}}}class ReversibleTransform extends Transform{filter(e,t,r){const a=r>>1;let i,n;for(i=t|=0,n=a+1;n--;i+=2)e[i]-=e[i-1]+e[i+1]+2>>2;for(i=t+1,n=a;n--;i+=2)e[i]+=e[i-1]+e[i+1]>>1}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.LZWStream=void 0;var a=r(29);class LZWStream extends a.DecodeStream{constructor(e,t,r){super(t);this.str=e;this.dict=e.dict;this.cachedData=0;this.bitsCached=0;const a=4096,i={earlyChange:r,codeLength:9,nextCode:258,dictionaryValues:new Uint8Array(a),dictionaryLengths:new Uint16Array(a),dictionaryPrevCodes:new Uint16Array(a),currentSequence:new Uint8Array(a),currentSequenceLength:0};for(let e=0;e<256;++e){i.dictionaryValues[e]=e;i.dictionaryLengths[e]=1}this.lzwState=i}readBits(e){let t=this.bitsCached,r=this.cachedData;for(;t>>t&(1<0;if(e<256){d[0]=e;f=1}else{if(!(e>=258)){if(256===e){h=9;s=258;f=0;continue}this.eof=!0;delete this.lzwState;break}if(e=0;t--){d[t]=o[r];r=l[r]}}else d[f++]=d[0]}if(i){l[s]=u;c[s]=c[u]+1;o[s]=d[0];s++;h=s+n&s+n-1?h:0|Math.min(Math.log(s+n)/.6931471805599453+1,12)}u=e;g+=f;if(a{Object.defineProperty(t,"__esModule",{value:!0});t.PredictorStream=void 0;var a=r(29),i=r(2),n=r(5);class PredictorStream extends a.DecodeStream{constructor(e,t,r){super(t);if(!(0,n.isDict)(r))return e;const a=this.predictor=r.get("Predictor")||1;if(a<=1)return e;if(2!==a&&(a<10||a>15))throw new i.FormatError(`Unsupported predictor: ${a}`);this.readBlock=2===a?this.readBlockTiff:this.readBlockPng;this.str=e;this.dict=e.dict;const s=this.colors=r.get("Colors")||1,o=this.bits=r.get("BitsPerComponent")||8,c=this.columns=r.get("Columns")||1;this.pixBytes=s*o+7>>3;this.rowBytes=c*s*o+7>>3;return this}readBlockTiff(){const e=this.rowBytes,t=this.bufferLength,r=this.ensureBuffer(t+e),a=this.bits,i=this.colors,n=this.str.getBytes(e);this.eof=!n.length;if(this.eof)return;let s,o=0,c=0,l=0,h=0,u=t;if(1===a&&1===i)for(s=0;s>1;e^=e>>2;e^=e>>4;o=(1&e)<<7;r[u++]=e}else if(8===a){for(s=0;s>8&255;r[u++]=255&e}}else{const e=new Uint8Array(i+1),u=(1<>l-a)&u;l-=a;c=c<=8){r[f++]=c>>h-8&255;h-=8}}h>0&&(r[f++]=(c<<8-h)+(o&(1<<8-h)-1))}this.bufferLength+=e}readBlockPng(){const e=this.rowBytes,t=this.pixBytes,r=this.str.getByte(),a=this.str.getBytes(e);this.eof=!a.length;if(this.eof)return;const n=this.bufferLength,s=this.ensureBuffer(n+e);let o=s.subarray(n-e,n);0===o.length&&(o=new Uint8Array(e));let c,l,h,u=n;switch(r){case 0:for(c=0;c>1)+a[c];for(;c>1)+a[c]&255;u++}break;case 4:for(c=0;c{Object.defineProperty(t,"__esModule",{value:!0});t.RunLengthStream=void 0;var a=r(29);class RunLengthStream extends a.DecodeStream{constructor(e,t){super(t);this.str=e;this.dict=e.dict}readBlock(){const e=this.str.getBytes(2);if(!e||e.length<2||128===e[0]){this.eof=!0;return}let t,r=this.bufferLength,a=e[0];if(a<128){t=this.ensureBuffer(r+a+1);t[r++]=e[1];if(a>0){const e=this.str.getBytes(a);t.set(e,r);r+=a}}else{a=257-a;const i=e[1];t=this.ensureBuffer(r+a+1);for(let e=0;e{Object.defineProperty(t,"__esModule",{value:!0});t.Font=t.ErrorFont=void 0;var a=r(2),i=r(45),n=r(18),s=r(20),o=r(19),c=r(47),l=r(21),h=r(48),u=r(49),d=r(50),f=r(51),g=r(26),p=r(52),m=r(9),b=r(10),y=r(53);const w=[[57344,63743],[1048576,1114109]],S=1e3,x=["ascent","bbox","black","bold","charProcOperatorList","composite","cssFontInfo","data","defaultVMetrics","defaultWidth","descent","fallbackName","fontMatrix","fontType","isType3Font","italic","loadedName","mimetype","missingFile","name","remeasure","subtype","type","vertical"],k=["cMap","defaultEncoding","differences","isMonospace","isSerifFont","isSymbolicFont","seacMap","toFontChar","toUnicode","vmetrics","widths"];function adjustWidths(e){if(!e.fontMatrix)return;if(e.fontMatrix[0]===a.FONT_IDENTITY_MATRIX[0])return;const t=.001/e.fontMatrix[0],r=e.widths;for(const e in r)r[e]*=t;e.defaultWidth*=t}function amendFallbackToUnicode(e){if(!e.fallbackToUnicode)return;if(e.toUnicode instanceof h.IdentityToUnicodeMap)return;const t=[];for(const r in e.fallbackToUnicode)e.toUnicode.has(r)||(t[r]=e.fallbackToUnicode[r]);t.length>0&&e.toUnicode.amend(t)}class Glyph{constructor(e,t,r,a,i,n,s,o,c){this.originalCharCode=e;this.fontChar=t;this.unicode=r;this.accent=a;this.width=i;this.vmetric=n;this.operatorListId=s;this.isSpace=o;this.isInFont=c}matchesForCache(e,t,r,a,i,n,s,o,c){return this.originalCharCode===e&&this.fontChar===t&&this.unicode===r&&this.accent===a&&this.width===i&&this.vmetric===n&&this.operatorListId===s&&this.isSpace===o&&this.isInFont===c}}function int16(e,t){return(e<<8)+t}function writeSignedInt16(e,t,r){e[t+1]=r;e[t]=r>>>8}function signedInt16(e,t){const r=(e<<8)+t;return 32768&r?r-65536:r}function string16(e){return String.fromCharCode(e>>8&255,255&e)}function safeString16(e){e>32767?e=32767:e<-32768&&(e=-32768);return String.fromCharCode(e>>8&255,255&e)}function isTrueTypeCollectionFile(e){const t=e.peekBytes(4);return"ttcf"===(0,a.bytesToString)(t)}function getFontFileType(e,{type:t,subtype:r,composite:i}){let n,s;if(function isTrueTypeFile(e){const t=e.peekBytes(4);return 65536===(0,m.readUint32)(t,0)||"true"===(0,a.bytesToString)(t)}(e)||isTrueTypeCollectionFile(e))n=i?"CIDFontType2":"TrueType";else if(function isOpenTypeFile(e){const t=e.peekBytes(4);return"OTTO"===(0,a.bytesToString)(t)}(e))n=i?"CIDFontType2":"OpenType";else if(function isType1File(e){const t=e.peekBytes(2);return 37===t[0]&&33===t[1]||128===t[0]&&1===t[1]}(e))n=i?"CIDFontType0":"MMType1"===t?"MMType1":"Type1";else if(function isCFFFile(e){const t=e.peekBytes(4);return t[0]>=1&&t[3]>=1&&t[3]<=4}(e))if(i){n="CIDFontType0";s="CIDFontType0C"}else{n="MMType1"===t?"MMType1":"Type1";s="Type1C"}else{(0,a.warn)("getFontFileType: Unable to detect correct font file Type/Subtype.");n=t;s=r}return[n,s]}function applyStandardFontGlyphMap(e,t){for(const r in t)e[+r]=t[r]}function buildToFontChar(e,t,r){const a=[];let i;for(let r=0,n=e.length;rc){s++;if(s>=w.length){(0,a.warn)("Ran out of space in font private use area.");break}o=w[s][0];c=w[s][1]}const u=o++;0===h&&(h=r);i[u]=h;n[l]=u}return{toFontChar:n,charCodeToGlyphId:i,nextAvailableFontCharCode:o}}function createCmapTable(e,t){const r=function getRanges(e,t){const r=[];for(const a in e)e[a]>=t||r.push({fontCharCode:0|a,glyphId:e[a]});0===r.length&&r.push({fontCharCode:0,glyphId:0});r.sort((function fontGetRangesSort(e,t){return e.fontCharCode-t.fontCharCode}));const a=[],i=r.length;for(let e=0;e65535?2:1;let n,s,o,c,l="\0\0"+string16(i)+"\0\0"+(0,a.string32)(4+8*i);for(n=r.length-1;n>=0&&!(r[n][0]<=65535);--n);const h=n+1;r[n][0]<65535&&65535===r[n][1]&&(r[n][1]=65534);const u=r[n][1]<65535?1:0,d=h+u,f=p.OpenTypeFileBuilder.getSearchParams(d,2);let g,m,b,y,w="",S="",x="",k="",C="",v=0;for(n=0,s=h;n0){S+="ÿÿ";w+="ÿÿ";x+="\0";k+="\0\0"}const F="\0\0"+string16(2*d)+string16(f.range)+string16(f.entry)+string16(f.rangeShift)+S+"\0\0"+w+x+k+C;let O="",T="";if(i>1){l+="\0\0\n"+(0,a.string32)(4+8*i+4+F.length);O="";for(n=0,s=r.length;ne||!c)&&(c=e);h 123 are reserved for internal usage");o|=1<65535&&(h=65535)}else{c=0;h=255}const u=e.bbox||[0,0,0,0],d=r.unitsPerEm||1/(e.fontMatrix||a.FONT_IDENTITY_MATRIX)[0],f=e.ascentScaled?1:d/S,g=r.ascent||Math.round(f*(e.ascent||u[3]));let p=r.descent||Math.round(f*(e.descent||u[1]));p>0&&e.descent>0&&u[1]<0&&(p=-p);const m=r.yMax||g,b=-r.yMin||-p;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,a.string32)(i)+(0,a.string32)(n)+(0,a.string32)(s)+(0,a.string32)(o)+"*21*"+string16(e.italicAngle?1:0)+string16(c||e.firstChar)+string16(h||e.lastChar)+string16(g)+string16(p)+"\0d"+string16(m)+string16(b)+"\0\0\0\0\0\0\0\0"+string16(e.xHeight)+string16(e.capHeight)+string16(0)+string16(c||e.firstChar)+"\0"}function createPostTable(e){const t=Math.floor(65536*e.italicAngle);return"\0\0\0"+(0,a.string32)(t)+"\0\0\0\0"+(0,a.string32)(e.fixedPitch?1:0)+"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}function createPostscriptName(e){return e.replace(/[^\x21-\x7E]|[[\](){}<>/%]/g,"").slice(0,63)}function createNameTable(e,t){t||(t=[[],[]]);const r=[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]||createPostscriptName(e),t[0][7]||"Unknown",t[0][8]||"Unknown",t[0][9]||"Unknown"],a=[];let i,n,s,o,c;for(i=0,n=r.length;i0;if((g||p)&&"CIDFontType2"===r&&this.cidEncoding.startsWith("Identity-")){const r=e.cidToGidMap,a=[];applyStandardFontGlyphMap(a,(0,c.getGlyphMapForStandardFonts)());/Arial-?Black/i.test(t)?applyStandardFontGlyphMap(a,(0,c.getSupplementalGlyphMapForArialBlack)()):/Calibri/i.test(t)&&applyStandardFontGlyphMap(a,(0,c.getSupplementalGlyphMapForCalibri)());if(r){for(const e in a){const t=a[e];void 0!==r[t]&&(a[+e]=r[t])}r.length!==this.toUnicode.length&&e.hasIncludedToUnicodeMap&&this.toUnicode instanceof h.IdentityToUnicodeMap&&this.toUnicode.forEach((function(e,t){const i=a[e];void 0===r[i]&&(a[+e]=t)}))}this.toUnicode instanceof h.IdentityToUnicodeMap||this.toUnicode.forEach((function(e,t){a[+e]=t}));this.toFontChar=a;this.toUnicode=new h.ToUnicodeMap(a)}else if(/Symbol/i.test(u))this.toFontChar=buildToFontChar(o.SymbolSetEncoding,(0,s.getGlyphsUnicode)(),this.differences);else if(/Dingbats/i.test(u)){/Wingdings/i.test(t)&&(0,a.warn)("Non-embedded Wingdings font, falling back to ZapfDingbats.");this.toFontChar=buildToFontChar(o.ZapfDingbatsEncoding,(0,s.getDingbatsGlyphsUnicode)(),this.differences)}else if(g){const e=buildToFontChar(this.defaultEncoding,(0,s.getGlyphsUnicode)(),this.differences);"CIDFontType2"!==r||this.cidEncoding.startsWith("Identity-")||this.toUnicode instanceof h.IdentityToUnicodeMap||this.toUnicode.forEach((function(t,r){e[+t]=r}));this.toFontChar=e}else{const e=(0,s.getGlyphsUnicode)(),r=[];this.toUnicode.forEach(((t,a)=>{if(!this.composite){const r=this.differences[t]||this.defaultEncoding[t],i=(0,l.getUnicodeForGlyph)(r,e);-1!==i&&(a=i)}r[+t]=a}));this.composite&&this.toUnicode instanceof h.IdentityToUnicodeMap&&/Verdana/i.test(t)&&applyStandardFontGlyphMap(r,(0,c.getGlyphMapForStandardFonts)());this.toFontChar=r}amendFallbackToUnicode(e);this.loadedName=u.split("-")[0];this.fontType=(0,n.getFontType)(r,i,e.isStandardFont)}checkAndRepair(e,t,r){const c=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "];function readTables(e,t){const 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(let a=0;a>>0,a=e.getInt32()>>>0,i=e.getInt32()>>>0,n=e.pos;e.pos=e.start?e.start:0;e.skip(a);const s=e.getBytes(i);e.pos=n;if("head"===t){s[8]=s[9]=s[10]=s[11]=0;s[17]|=32}return{tag:t,checksum:r,length:i,offset:a,data:s}}function readOpenTypeHeader(e){return{version:e.getString(4),numTables:e.getUint16(),searchRange:e.getUint16(),entrySelector:e.getUint16(),rangeShift:e.getUint16()}}function sanitizeGlyph(e,t,r,a,i,n){const s={length:0,sizeOfInstructions:0};if(r-t<=12)return s;const o=e.subarray(t,r);let c=signedInt16(o[0],o[1]);if(c<0){c=-1;writeSignedInt16(o,0,c);a.set(o,i);s.length=o.length;return s}let l,h=10,u=0;for(l=0;lo.length)return s;if(!n&&f>0){a.set(o.subarray(0,d),i);a.set([0,0],i+d);a.set(o.subarray(g,m),i+d+2);m-=f;o.length-m>3&&(m=m+3&-4);s.length=m;return s}if(o.length-m>3){m=m+3&-4;a.set(o.subarray(0,m),i);s.length=m;return s}a.set(o,i);s.length=o.length;return s}function readNameTable(e){const r=(t.start?t.start:0)+e.offset;t.pos=r;const a=[[],[]],i=e.length,n=r+i;if(0!==t.getUint16()||i<6)return a;const s=t.getUint16(),o=t.getUint16(),c=[];let l,h;for(l=0;ln)continue;t.pos=i;const s=e.name;if(e.encoding){let r="";for(let a=0,i=e.length;a0&&(h+=e-1)}}else{if(b||w){(0,a.warn)("TT: nested FDEFs not allowed");m=!0}b=!0;d=h;s=f.pop();t.functionsDefined[s]={data:c,i:h}}else if(!b&&!w){s=f[f.length-1];if(isNaN(s))(0,a.info)("TT: CALL empty stack (or invalid entry).");else{t.functionsUsed[s]=!0;if(s in t.functionsStackDeltas){const e=f.length+t.functionsStackDeltas[s];if(e<0){(0,a.warn)("TT: CALL invalid functions stack delta.");t.hintsValid=!1;return}f.length=e}else if(s in t.functionsDefined&&!p.includes(s)){g.push({data:c,i:h,stackTop:f.length-1});p.push(s);o=t.functionsDefined[s];if(!o){(0,a.warn)("TT: CALL non-existent function");t.hintsValid=!1;return}c=o.data;h=o.i}}}if(!b&&!w){let t=0;e<=142?t=l[e]:e>=192&&e<=223?t=-1:e>=224&&(t=-2);if(e>=113&&e<=117){i=f.pop();isNaN(i)||(t=2*-i)}for(;t<0&&f.length>0;){f.pop();t++}for(;t>0;){f.push(NaN);t--}}}t.tooComplexToFollowFunctions=m;const S=[c];h>c.length&&S.push(new Uint8Array(h-c.length));if(d>u){(0,a.warn)("TT: complementing a missing function tail");S.push(new Uint8Array([34,45]))}!function foldTTTable(e,t){if(t.length>1){let r,a,i=0;for(r=0,a=t.length;r>>0,s=[];for(let t=0;t>>0);const o={ttcTag:t,majorVersion:r,minorVersion:i,numFonts:n,offsetTable:s};switch(r){case 1:return o;case 2:o.dsigTag=e.getInt32()>>>0;o.dsigLength=e.getInt32()>>>0;o.dsigOffset=e.getInt32()>>>0;return o}throw new a.FormatError(`Invalid TrueType Collection majorVersion: ${r}.`)}(e),n=t.split("+");let s;for(let o=0;o0||!(r.cMap instanceof g.IdentityCMap));if("OTTO"===d.version&&!t||!m.head||!m.hhea||!m.maxp||!m.post){w=new b.Stream(m["CFF "].data);y=new u.CFFFont(w,r);adjustWidths(r);return this.convert(e,y,r)}delete m.glyf;delete m.loca;delete m.fpgm;delete m.prep;delete m["cvt "];this.isOpenType=!0}if(!m.maxp)throw new a.FormatError('Required "maxp" table is not found');t.pos=(t.start||0)+m.maxp.offset;const x=t.getInt32(),k=t.getUint16();if(r.scaleFactors&&r.scaleFactors.length===k&&S){const{scaleFactors:e}=r,t=int16(m.head.data[50],m.head.data[51]),a=new f.GlyfTable({glyfTable:m.glyf.data,isGlyphLocationsLong:t,locaTable:m.loca.data,numGlyphs:k});a.scale(e);const{glyf:i,loca:n,isLocationLong:s}=a.write();m.glyf.data=i;m.loca.data=n;if(s!==!!t){m.head.data[50]=0;m.head.data[51]=s?1:0}const o=m.hmtx.data;for(let t=0;t>8&255;o[r+1]=255&a;writeSignedInt16(o,r+2,Math.round(e[t]*signedInt16(o[r+2],o[r+3])))}}let C=k+1,v=!0;if(C>65535){v=!1;C=k;(0,a.warn)("Not enough space in glyfs to duplicate first glyph.")}let F=0,O=0;if(x>=65536&&m.maxp.length>=22){t.pos+=8;if(t.getUint16()>2){m.maxp.data[14]=0;m.maxp.data[15]=2}t.pos+=4;F=t.getUint16();t.pos+=4;O=t.getUint16()}m.maxp.data[4]=C>>8;m.maxp.data[5]=255&C;const T=function sanitizeTTPrograms(e,t,r,i){const n={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};e&&sanitizeTTProgram(e,n);t&&sanitizeTTProgram(t,n);e&&function checkInvalidFunctions(e,t){if(!e.tooComplexToFollowFunctions)if(e.functionsDefined.length>t){(0,a.warn)("TT: more functions defined than expected");e.hintsValid=!1}else for(let r=0,i=e.functionsUsed.length;rt){(0,a.warn)("TT: invalid function id: "+r);e.hintsValid=!1;return}if(e.functionsUsed[r]&&!e.functionsDefined[r]){(0,a.warn)("TT: undefined function: "+r);e.hintsValid=!1;return}}}(n,i);if(r&&1&r.length){const e=new Uint8Array(r.length+1);e.set(r.data);r.data=e}return n.hintsValid}(m.fpgm,m.prep,m["cvt "],F);if(!T){delete m.fpgm;delete m.prep;delete m["cvt "]}!function sanitizeMetrics(e,t,r,i,n,s){if(!t){r&&(r.data=null);return}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;const o=e.getUint16();e.pos+=8;e.pos+=2;let c=e.getUint16();if(0!==o){if(!(2&int16(i.data[44],i.data[45]))){t.data[22]=0;t.data[23]=0}}if(c>n){(0,a.info)(`The numOfMetrics (${c}) should not be greater than the numGlyphs (${n}).`);c=n;t.data[34]=(65280&c)>>8;t.data[35]=255&c}const l=n-c-(r.length-4*c>>1);if(l>0){const e=new Uint8Array(r.length+2*l);e.set(r.data);if(s){e[r.length]=r.data[2];e[r.length+1]=r.data[3]}r.data=e}}(t,m.hhea,m.hmtx,m.head,C,v);if(!m.head)throw new a.FormatError('Required "head" table is not found');!function sanitizeHead(e,t,r){const i=e.data,n=function int32(e,t,r,a){return(e<<24)+(t<<16)+(r<<8)+a}(i[0],i[1],i[2],i[3]);if(n>>16!=1){(0,a.info)("Attempting to fix invalid version in head table: "+n);i[0]=0;i[1]=1;i[2]=0;i[3]=0}const s=int16(i[50],i[51]);if(s<0||s>1){(0,a.info)("Attempting to fix invalid indexToLocFormat in head table: "+s);const e=t+1;if(r===e<<1){i[50]=0;i[51]=0}else{if(r!==e<<2)throw new a.FormatError("Could not fix indexToLocFormat: "+s);i[50]=0;i[51]=1}}}(m.head,k,S?m.loca.length:0);let M=Object.create(null);if(S){const e=int16(m.head.data[50],m.head.data[51]),t=function sanitizeGlyphLocations(e,t,r,a,i,n,s){let o,c,l;if(a){o=4;c=function fontItemDecodeLong(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]};l=function fontItemEncodeLong(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}}else{o=2;c=function fontItemDecode(e,t){return e[t]<<9|e[t+1]<<1};l=function fontItemEncode(e,t,r){e[t]=r>>9&255;e[t+1]=r>>1&255}}const h=n?r+1:r,u=o*(1+h),d=new Uint8Array(u);d.set(e.data.subarray(0,u));e.data=d;const f=t.data,g=f.length,p=new Uint8Array(g);let m,b;const y=[];for(m=0,b=0;mg&&(e=g);y.push({index:m,offset:e,endOffset:0})}y.sort(((e,t)=>e.offset-t.offset));for(m=0;me.index-t.index));const w=Object.create(null);let S=0;l(d,0,S);for(m=0,b=o;ms&&(s=e.sizeOfInstructions);S+=t;l(d,b,S)}if(0===S){const e=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(m=0,b=o;mr+S)t.data=p.subarray(0,r+S);else{t.data=new Uint8Array(r+S);t.data.set(p.subarray(0,S))}t.data.set(p.subarray(0,r),S);l(e.data,d.length-o,S+r)}else t.data=p.subarray(0,S);return{missingGlyphs:w,maxSizeOfInstructions:s}}(m.loca,m.glyf,k,e,T,v,O);M=t.missingGlyphs;if(x>=65536&&m.maxp.length>=22){m.maxp.data[26]=t.maxSizeOfInstructions>>8;m.maxp.data[27]=255&t.maxSizeOfInstructions}}if(!m.hhea)throw new a.FormatError('Required "hhea" table is not found');if(0===m.hhea.data[10]&&0===m.hhea.data[11]){m.hhea.data[10]=255;m.hhea.data[11]=255}const E={unitsPerEm:int16(m.head.data[18],m.head.data[19]),yMax:int16(m.head.data[42],m.head.data[43]),yMin:signedInt16(m.head.data[38],m.head.data[39]),ascent:signedInt16(m.hhea.data[4],m.hhea.data[5]),descent:signedInt16(m.hhea.data[6],m.hhea.data[7]),lineGap:signedInt16(m.hhea.data[8],m.hhea.data[9])};this.ascent=E.ascent/E.unitsPerEm;this.descent=E.descent/E.unitsPerEm;this.lineGap=E.lineGap/E.unitsPerEm;if(this.cssFontInfo&&this.cssFontInfo.lineHeight){this.lineHeight=this.cssFontInfo.metrics.lineHeight;this.lineGap=this.cssFontInfo.metrics.lineGap}else this.lineHeight=this.ascent-this.descent+this.lineGap;m.post&&function readPostScriptTable(e,r,i){const s=(t.start?t.start:0)+e.offset;t.pos=s;const o=s+e.length,c=t.getInt32();t.skip(28);let l,h,u=!0;switch(c){case 65536:l=n.MacStandardGlyphOrdering;break;case 131072:const e=t.getUint16();if(e!==i){u=!1;break}const s=[];for(h=0;h=32768){u=!1;break}s.push(e)}if(!u)break;const d=[],f=[];for(;t.pos65535)throw new a.FormatError("Max size of CID is 65,535");let n=-1;t?n=i:void 0!==e[i]&&(n=e[i]);n>=0&&n>>0;let h=!1;if(!c||c.platformId!==a||c.encodingId!==n){if(0!==a||0!==n&&1!==n&&3!==n)if(1===a&&0===n)h=!0;else if(3!==a||1!==n||!i&&c){if(r&&3===a&&0===n){h=!0;let r=!0;if(e>1;t.skip(6);const r=[];let a;for(a=0;a>1)-(e-a);n.offsetIndex=i;o=Math.max(o,i+n.end-n.start+1)}else n.offsetIndex=-1}const c=[];for(f=0;f=61440&&t<=61695&&(t&=255);D[t]=l[e].glyphId}if(r.glyphNames&&(d.length||this.differences.length))for(let e=0;e<256;++e){if(!f&&void 0!==D[e])continue;const t=this.differences[e]||d[e];if(!t)continue;const a=r.glyphNames.indexOf(t);a>0&&hasGlyph(a)&&(D[e]=a)}}0===D.length&&(D[0]=0);let N=C-1;v||(N=0);if(!r.cssFontInfo){const e=adjustMapping(D,hasGlyph,N);this.toFontChar=e.toFontChar;m.cmap={tag:"cmap",data:createCmapTable(e.charCodeToGlyphId,C)};m["OS/2"]&&function validateOS2Table(e,t){t.pos=(t.start||0)+e.offset;const r=t.getUint16();t.skip(60);const a=t.getUint16();if(r<4&&768&a)return!1;if(t.getUint16()>t.getUint16())return!1;t.skip(6);if(0===t.getUint16())return!1;e.data[8]=e.data[9]=0;return!0}(m["OS/2"],t)||(m["OS/2"]={tag:"OS/2",data:createOS2Table(r,e.charCodeToGlyphId,E)})}if(!S)try{w=new b.Stream(m["CFF "].data);y=new i.CFFParser(w,r,n.SEAC_ANALYSIS_ENABLED).parse();y.duplicateFirstGlyph();const e=new i.CFFCompiler(y);m["CFF "].data=e.compile()}catch(e){(0,a.warn)("Failed to compile font "+r.loadedName)}if(m.name){const t=readNameTable(m.name);m.name.data=createNameTable(e,t);this.psName=t[0][6]||null}else m.name={tag:"name",data:createNameTable(this.name)};const L=new p.OpenTypeFileBuilder(d.version);for(const e in m)L.addTable(e,m[e].data);return L.toArray()}convert(e,t,r){r.fixedPitch=!1;r.builtInEncoding&&function adjustToUnicode(e,t){if(e.isInternalFont)return;if(t===e.defaultEncoding)return;if(e.toUnicode instanceof h.IdentityToUnicodeMap)return;const r=[],a=(0,s.getGlyphsUnicode)();for(const i in t){if(e.hasIncludedToUnicodeMap){if(e.toUnicode.has(i))continue}else if(e.hasEncoding&&(0===e.differences.length||void 0!==e.differences[i]))continue;const n=t[i],s=(0,l.getUnicodeForGlyph)(n,a);-1!==s&&(r[i]=String.fromCharCode(s))}r.length>0&&e.toUnicode.amend(r)}(r,r.builtInEncoding);let i=1;t instanceof u.CFFFont&&(i=t.numGlyphs-1);const c=t.getGlyphMapping(r);let d=null,f=c;if(!r.cssFontInfo){d=adjustMapping(c,t.hasGlyphId.bind(t),i);this.toFontChar=d.toFontChar;f=d.charCodeToGlyphId}const g=t.numGlyphs;function getCharCodes(e,t){let r=null;for(const a in e)if(t===e[a]){r||(r=[]);r.push(0|a)}return r}function createCharCode(e,t){for(const r in e)if(t===e[r])return 0|r;d.charCodeToGlyphId[d.nextAvailableFontCharCode]=t;return d.nextAvailableFontCharCode++}const m=t.seacs;if(d&&n.SEAC_ANALYSIS_ENABLED&&m&&m.length){const e=r.fontMatrix||a.FONT_IDENTITY_MATRIX,i=t.getCharset(),n=Object.create(null);for(let t in m){t|=0;const r=m[t],a=o.StandardEncoding[r[2]],s=o.StandardEncoding[r[3]],l=i.indexOf(a),h=i.indexOf(s);if(l<0||h<0)continue;const u={x:r[0]*e[0]+r[1]*e[2]+e[4],y:r[0]*e[1]+r[1]*e[3]+e[5]},f=getCharCodes(c,t);if(f)for(let e=0,t=f.length;et.length%2==1,a=this.toUnicode instanceof h.IdentityToUnicodeMap?e=>this.toUnicode.charCodeOf(e):e=>this.toUnicode.charCodeOf(String.fromCodePoint(e));for(let i=0,n=e.length;i55295&&(n<57344||n>65533)&&i++;if(this.toUnicode){const e=a(n);if(-1!==e){if(hasCurrentBufErrors()){t.push(r.join(""));r.length=0}for(let t=(this.cMap?this.cMap.getCharCodeLength(e):1)-1;t>=0;t--)r.push(String.fromCharCode(e>>8*t&255));continue}}if(!hasCurrentBufErrors()){t.push(r.join(""));r.length=0}r.push(String.fromCodePoint(n))}t.push(r.join(""));return t}};t.ErrorFont=class ErrorFont{constructor(e){this.error=e;this.loadedName="g_font_error";this.missingFile=!0}charsToGlyphs(){return[]}encodeString(e){return[e]}exportData(e=!1){return{error:this.error}}}},(e,t,r)=>{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(2),i=r(46),n=r(19);const s=[".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=s;const o=391,c=function CFFParserClosure(){const 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 stack_div(e,t){e[t-2]=e[t-2]+e[t-1]}},{id:"sub",min:2,stackDelta:-1,stackFn:function stack_div(e,t){e[t-2]=e[t-2]-e[t-1]}},{id:"div",min:2,stackDelta:-1,stackFn:function stack_div(e,t){e[t-2]=e[t-2]/e[t-1]}},null,{id:"neg",min:1,stackDelta:0,stackFn:function stack_div(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 stack_div(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 class CFFParser{constructor(e,t,r){this.bytes=e.getBytes();this.properties=t;this.seacAnalysisEnabled=!!r}parse(){const e=this.properties,t=new CFF;this.cff=t;const r=this.parseHeader(),a=this.parseIndex(r.endPos),i=this.parseIndex(a.endPos),n=this.parseIndex(i.endPos),s=this.parseIndex(n.endPos),o=this.parseDict(i.obj.get(0)),c=this.createDict(l,o,t.strings);t.header=r.obj;t.names=this.parseNameIndex(a.obj);t.strings=this.parseStringIndex(n.obj);t.topDict=c;t.globalSubrIndex=s.obj;this.parsePrivateDict(t.topDict);t.isCIDFont=c.hasName("ROS");const h=c.getByName("CharStrings"),u=this.parseIndex(h).obj,d=c.getByName("FontMatrix");d&&(e.fontMatrix=d);const f=c.getByName("FontBBox");if(f){e.ascent=Math.max(f[3],f[1]);e.descent=Math.min(f[1],f[3]);e.ascentScaled=!0}let g,p;if(t.isCIDFont){const e=this.parseIndex(c.getByName("FDArray")).obj;for(let r=0,a=e.count;r=t)throw new a.FormatError("Invalid CFF header");if(0!==r){(0,a.info)("cff data is shifted");e=e.subarray(r);this.bytes=e}const i=e[0],n=e[1],s=e[2],o=e[3];return{obj:new CFFHeader(i,n,s,o),endPos:s}}parseDict(e){let t=0;function parseOperand(){let r=e[t++];if(30===r)return function parseFloatOperand(){let r="";const a=15,i=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],n=e.length;for(;t>4,o=15&n;if(s===a)break;r+=i[s];if(o===a)break;r+=i[o]}return parseFloat(r)}();if(28===r){r=e[t++];r=(r<<24|e[t++]<<16)>>16;return r}if(29===r){r=e[t++];r=r<<8|e[t++];r=r<<8|e[t++];r=r<<8|e[t++];return r}if(r>=32&&r<=246)return r-139;if(r>=247&&r<=250)return 256*(r-247)+e[t++]+108;if(r>=251&&r<=254)return-256*(r-251)-e[t++]-108;(0,a.warn)('CFFParser_parseDict: "'+r+'" is a reserved command.');return NaN}let r=[];const i=[];t=0;const n=e.length;for(;t10)return!1;let o=r.stackSize;const c=r.stack,l=i.length;for(let h=0;h>16;h+=2;o++}else if(14===l){if(o>=4){o-=4;if(this.seacAnalysisEnabled){r.seac=c.slice(o,o+4);return!1}}u=e[l]}else if(l>=32&&l<=246){c[o]=l-139;o++}else if(l>=247&&l<=254){c[o]=l<251?(l-247<<8)+i[h]+108:-(l-251<<8)-i[h]-108;h++;o++}else if(255===l){c[o]=(i[h]<<24|i[h+1]<<16|i[h+2]<<8|i[h+3])/65536;h+=4;o++}else if(19===l||20===l){r.hints+=o>>1;h+=r.hints+7>>3;o%=2;u=e[l]}else{if(10===l||29===l){let t;t=10===l?n:s;if(!t){u=e[l];(0,a.warn)("Missing subrsIndex for "+u.id);return!1}let i=32768;t.count<1240?i=107:t.count<33900&&(i=1131);const h=c[--o]+i;if(h<0||h>=t.count||isNaN(h)){u=e[l];(0,a.warn)("Out of bounds subrIndex for "+u.id);return!1}r.stackSize=o;r.callDepth++;if(!this.parseCharString(r,t.get(h),n,s))return!1;r.callDepth--;o=r.stackSize;continue}if(11===l){r.stackSize=o;return!0}if(0===l&&h===i.length){i[h-1]=14;u=e[14]}else u=e[l]}if(u){if(u.stem){r.hints+=o>>1;if(3===l||23===l)r.hasVStems=!0;else if(r.hasVStems&&(1===l||18===l)){(0,a.warn)("CFF stem hints are in wrong order");i[h-1]=1===l?3:23}}if("min"in u&&!r.undefStack&&o=2&&u.stem?o%=2:o>1&&(0,a.warn)("Found too many parameters for stack-clearing command");o>0&&(r.width=c[o-1])}if("stackDelta"in u){"stackFn"in u&&u.stackFn(c,o);o+=u.stackDelta}else if(u.stackClearing)o=0;else if(u.resetStack){o=0;r.undefStack=!1}else if(u.undefStack){o=0;r.undefStack=!0;r.firstStackClearing=!1}}}r.stackSize=o;return!0}parseCharStrings({charStrings:e,localSubrIndex:t,globalSubrIndex:r,fdSelect:i,fdArray:n,privateDict:s}){const o=[],c=[],l=e.count;for(let h=0;h=n.length){(0,a.warn)("Invalid fd index for glyph index.");d=!1}if(d){g=n[e].privateDict;f=g.subrsIndex}}else t&&(f=t);d&&(d=this.parseCharString(u,l,f,r));if(null!==u.width){const e=g.getByName("nominalWidthX");c[h]=e+u.width}else{const e=g.getByName("defaultWidthX");c[h]=e}null!==u.seac&&(o[h]=u.seac);d||e.set(h,new Uint8Array([14]))}return{charStrings:e,seacs:o,widths:c}}emptyPrivateDictionary(e){const t=this.createDict(h,[],e.strings);e.setByKey(18,[0,0]);e.privateDict=t}parsePrivateDict(e){if(!e.hasName("Private")){this.emptyPrivateDictionary(e);return}const t=e.getByName("Private");if(!Array.isArray(t)||2!==t.length){e.removeByName("Private");return}const r=t[0],a=t[1];if(0===r||a>=this.bytes.length){this.emptyPrivateDictionary(e);return}const i=a+r,n=this.bytes.subarray(a,i),s=this.parseDict(n),o=this.createDict(h,s,e.strings);e.privateDict=o;if(!o.getByName("Subrs"))return;const c=o.getByName("Subrs"),l=a+c;if(0===c||l>=this.bytes.length){this.emptyPrivateDictionary(e);return}const u=this.parseIndex(l);o.subrsIndex=u.obj}parseCharsets(e,t,r,n){if(0===e)return new CFFCharset(!0,u.ISO_ADOBE,i.ISOAdobeCharset);if(1===e)return new CFFCharset(!0,u.EXPERT,i.ExpertCharset);if(2===e)return new CFFCharset(!0,u.EXPERT_SUBSET,i.ExpertSubsetCharset);const s=this.bytes,o=e,c=s[e++],l=[n?0:".notdef"];let h,d,f;t-=1;switch(c){case 0:for(f=0;f=65535){(0,a.warn)("Not enough space in charstrings to duplicate first glyph.");return}const e=this.charStrings.get(0);this.charStrings.add(e);this.isCIDFont&&this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0])}hasGlyphId(e){if(e<0||e>=this.charStrings.count)return!1;return this.charStrings.get(e).length>0}}t.CFF=CFF;class CFFHeader{constructor(e,t,r,a){this.major=e;this.minor=t;this.hdrSize=r;this.offSize=a}}t.CFFHeader=CFFHeader;class CFFStrings{constructor(){this.strings=[]}get(e){return e>=0&&e<=390?s[e]:e-o<=this.strings.length?this.strings[e-o]:s[0]}getSID(e){let t=s.indexOf(e);if(-1!==t)return t;t=this.strings.indexOf(e);return-1!==t?t+o:-1}add(e){this.strings.push(e)}get count(){return this.strings.length}}t.CFFStrings=CFFStrings;class CFFIndex{constructor(){this.objects=[];this.length=0}add(e){this.length+=e.length;this.objects.push(e)}set(e,t){this.length+=t.length-this.objects[e].length;this.objects[e]=t}get(e){return this.objects[e]}get count(){return this.objects.length}}t.CFFIndex=CFFIndex;class CFFDict{constructor(e,t){this.keyToNameMap=e.keyToNameMap;this.nameToKeyMap=e.nameToKeyMap;this.defaults=e.defaults;this.types=e.types;this.opcodes=e.opcodes;this.order=e.order;this.strings=t;this.values=Object.create(null)}setByKey(e,t){if(!(e in this.keyToNameMap))return!1;const r=t.length;if(0===r)return!0;for(let i=0;i=this.fdSelect.length?-1:this.fdSelect[e]}}t.CFFFDSelect=CFFFDSelect;class CFFOffsetTracker{constructor(){this.offsets=Object.create(null)}isTracking(e){return e in this.offsets}track(e,t){if(e in this.offsets)throw new a.FormatError(`Already tracking location of ${e}`);this.offsets[e]=t}offset(e){for(const t in this.offsets)this.offsets[t]+=e}setEntryLocation(e,t,r){if(!(e in this.offsets))throw new a.FormatError(`Not tracking location of ${e}`);const i=r.data,n=this.offsets[e];for(let e=0,r=t.length;e>24&255;i[o]=h>>16&255;i[c]=h>>8&255;i[l]=255&h}}}class CFFCompiler{constructor(e){this.cff=e}compile(){const e=this.cff,t={data:[],length:0,add:function CFFCompiler_add(e){this.data=this.data.concat(e);this.length=this.data.length}},r=this.compileHeader(e.header);t.add(r);const i=this.compileNameIndex(e.names);t.add(i);if(e.isCIDFont&&e.topDict.hasName("FontMatrix")){const t=e.topDict.getByName("FontMatrix");e.topDict.removeByName("FontMatrix");for(let r=0,i=e.fdArray.length;r16&&e.topDict.removeByName("XUID");e.topDict.setByName("charset",0);let s=this.compileTopDicts([e.topDict],t.length,e.isCIDFont);t.add(s.output);const o=s.trackers[0],c=this.compileStringIndex(e.strings.strings);t.add(c);const l=this.compileIndex(e.globalSubrIndex);t.add(l);if(e.encoding&&e.topDict.hasName("Encoding"))if(e.encoding.predefined)o.setEntryLocation("Encoding",[e.encoding.format],t);else{const r=this.compileEncoding(e.encoding);o.setEntryLocation("Encoding",[t.length],t);t.add(r)}const h=this.compileCharset(e.charset,e.charStrings.count,e.strings,e.isCIDFont);o.setEntryLocation("charset",[t.length],t);t.add(h);const u=this.compileCharStrings(e.charStrings);o.setEntryLocation("CharStrings",[t.length],t);t.add(u);if(e.isCIDFont){o.setEntryLocation("FDSelect",[t.length],t);const r=this.compileFDSelect(e.fdSelect);t.add(r);s=this.compileTopDicts(e.fdArray,t.length,!0);o.setEntryLocation("FDArray",[t.length],t);t.add(s.output);const a=s.trackers;this.compilePrivateDicts(e.fdArray,a,t)}this.compilePrivateDicts([e.topDict],[o],t);t.add([0]);return t.data}encodeNumber(e){return Number.isInteger(e)?this.encodeInteger(e):this.encodeFloat(e)}static get EncodeFloatRegExp(){return(0,a.shadow)(this,"EncodeFloatRegExp",/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/)}encodeFloat(e){let t=e.toString();const r=CFFCompiler.EncodeFloatRegExp.exec(t);if(r){const a=parseFloat("1e"+((r[2]?+r[2]:0)+r[1].length));t=(Math.round(e*a)/a).toString()}let a,i,n="";for(a=0,i=t.length;a=-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];return t}compileHeader(e){return[e.major,e.minor,4,e.offSize]}compileNameIndex(e){const t=new CFFIndex;for(let r=0,i=e.length;r"~"||"["===t||"]"===t||"("===t||")"===t||"{"===t||"}"===t||"<"===t||">"===t||"/"===t||"%"===t)&&(t="_");s[e]=t}s=s.join("");""===s&&(s="Bad_Font_Name");t.add((0,a.stringToBytes)(s))}return this.compileIndex(t)}compileTopDicts(e,t,r){const a=[];let i=new CFFIndex;for(let n=0,s=e.length;n>8&255,255&s]);else{n=new Uint8Array(1+2*s);n[0]=0;let t=0;const i=e.charset.length;let o=!1;for(let s=1;s>8&255;n[s+1]=255&c}}return this.compileTypedArray(n)}compileEncoding(e){return this.compileTypedArray(e.raw)}compileFDSelect(e){const t=e.format;let r,a;switch(t){case 0:r=new Uint8Array(1+e.fdSelect.length);r[0]=t;for(a=0;a>8&255,255&i,n];for(a=1;a>8&255,255&a,t);n=t}}const o=(s.length-3)/3;s[1]=o>>8&255;s[2]=255&o;s.push(a>>8&255,255&a);r=new Uint8Array(s)}return this.compileTypedArray(r)}compileTypedArray(e){const t=[];for(let r=0,a=e.length;r>8&255,255&a];let n,s,o=1;for(n=0;n>8&255,255&c):3===s?i.push(c>>16&255,c>>8&255,255&c):i.push(c>>>24&255,c>>16&255,c>>8&255,255&c);r[n]&&(c+=r[n].length)}for(n=0;n{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,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.getStandardFontName=function getStandardFontName(e){const t=(0,i.normalizeFontName)(e);return n()[t]};t.getSymbolsFonts=t.getSupplementalGlyphMapForCalibri=t.getSupplementalGlyphMapForArialBlack=t.getStdFontMap=t.getSerifFonts=t.getNonStdFontMap=t.getGlyphMapForStandardFonts=t.getFontNameToFileMap=void 0;var a=r(9),i=r(18);const n=(0,a.getLookupTableFactory)((function(e){e["Times-Roman"]="Times-Roman";e.Helvetica="Helvetica";e.Courier="Courier";e.Symbol="Symbol";e["Times-Bold"]="Times-Bold";e["Helvetica-Bold"]="Helvetica-Bold";e["Courier-Bold"]="Courier-Bold";e.ZapfDingbats="ZapfDingbats";e["Times-Italic"]="Times-Italic";e["Helvetica-Oblique"]="Helvetica-Oblique";e["Courier-Oblique"]="Courier-Oblique";e["Times-BoldItalic"]="Times-BoldItalic";e["Helvetica-BoldOblique"]="Helvetica-BoldOblique";e["Courier-BoldOblique"]="Courier-BoldOblique";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-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-BoldItalic"]="Helvetica-BoldOblique";e["Helvetica-Italic"]="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=n;const s=(0,a.getLookupTableFactory)((function(e){e.Courier="FoxitFixed.pfb";e["Courier-Bold"]="FoxitFixedBold.pfb";e["Courier-BoldOblique"]="FoxitFixedBoldItalic.pfb";e["Courier-Oblique"]="FoxitFixedItalic.pfb";e.Helvetica="FoxitSans.pfb";e["Helvetica-Bold"]="FoxitSansBold.pfb";e["Helvetica-BoldOblique"]="FoxitSansBoldItalic.pfb";e["Helvetica-Oblique"]="FoxitSansItalic.pfb";e["Times-Roman"]="FoxitSerif.pfb";e["Times-Bold"]="FoxitSerifBold.pfb";e["Times-BoldItalic"]="FoxitSerifBoldItalic.pfb";e["Times-Italic"]="FoxitSerifItalic.pfb";e.Symbol="FoxitSymbol.pfb";e.ZapfDingbats="FoxitDingbats.pfb";e["LiberationSans-Regular"]="LiberationSans-Regular.ttf";e["LiberationSans-Bold"]="LiberationSans-Bold.ttf";e["LiberationSans-Italic"]="LiberationSans-Italic.ttf";e["LiberationSans-BoldItalic"]="LiberationSans-BoldItalic.ttf"}));t.getFontNameToFileMap=s;const o=(0,a.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["ItcSymbol-Bold"]="Helvetica-Bold";e["ItcSymbol-BoldItalic"]="Helvetica-BoldOblique";e["ItcSymbol-Book"]="Helvetica";e["ItcSymbol-BookItalic"]="Helvetica-Oblique";e["ItcSymbol-Medium"]="Helvetica";e["ItcSymbol-MediumItalic"]="Helvetica-Oblique";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=o;const c=(0,a.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.LiberationSerif=!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=c;const l=(0,a.getLookupTableFactory)((function(e){e.Dingbats=!0;e.Symbol=!0;e.ZapfDingbats=!0}));t.getSymbolsFonts=l;const h=(0,a.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[200]=193;e[203]=205;e[210]=218;e[223]=711;e[224]=321;e[225]=322;e[226]=352;e[227]=353;e[228]=381;e[229]=382;e[233]=221;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[267]=282;e[268]=283;e[269]=313;e[275]=323;e[276]=324;e[278]=328;e[283]=344;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=h;const u=(0,a.getLookupTableFactory)((function(e){e[227]=322;e[264]=261;e[291]=346}));t.getSupplementalGlyphMapForArialBlack=u;const d=(0,a.getLookupTableFactory)((function(e){e[1]=32;e[4]=65;e[6]=193;e[17]=66;e[18]=67;e[21]=268;e[24]=68;e[28]=69;e[30]=201;e[32]=282;e[38]=70;e[39]=71;e[44]=72;e[47]=73;e[49]=205;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[92]=344;e[94]=83;e[97]=352;e[100]=84;e[104]=85;e[115]=86;e[116]=87;e[121]=88;e[122]=89;e[124]=221;e[127]=90;e[129]=381;e[258]=97;e[260]=225;e[268]=261;e[271]=98;e[272]=99;e[273]=263;e[275]=269;e[282]=100;e[286]=101;e[288]=233;e[290]=283;e[295]=281;e[296]=102;e[336]=103;e[346]=104;e[349]=105;e[351]=237;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[398]=345;e[400]=115;e[401]=347;e[403]=353;e[410]=116;e[437]=117;e[448]=118;e[449]=119;e[454]=120;e[455]=121;e[457]=253;e[460]=122;e[462]=382;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=d},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.ToUnicodeMap=t.IdentityToUnicodeMap=void 0;var a=r(2);t.ToUnicodeMap=class ToUnicodeMap{constructor(e=[]){this._map=e}get length(){return this._map.length}forEach(e){for(const t in this._map)e(t,this._map[t].charCodeAt(0))}has(e){return void 0!==this._map[e]}get(e){return this._map[e]}charCodeOf(e){const t=this._map;if(t.length<=65536)return t.indexOf(e);for(const r in t)if(t[r]===e)return 0|r;return-1}amend(e){for(const t in e)this._map[t]=e[t]}};t.IdentityToUnicodeMap=class IdentityToUnicodeMap{constructor(e,t){this.firstChar=e;this.lastChar=t}get length(){return this.lastChar+1-this.firstChar}forEach(e){for(let t=this.firstChar,r=this.lastChar;t<=r;t++)e(t,t)}has(e){return this.firstChar<=e&&e<=this.lastChar}get(e){if(this.firstChar<=e&&e<=this.lastChar)return String.fromCharCode(e)}charCodeOf(e){return Number.isInteger(e)&&e>=this.firstChar&&e<=this.lastChar?e:-1}amend(e){(0,a.unreachable)("Should not call amend()")}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.CFFFont=void 0;var a=r(45),i=r(18),n=r(2);t.CFFFont=class CFFFont{constructor(e,t){this.properties=t;const r=new a.CFFParser(e,t,i.SEAC_ANALYSIS_ENABLED);this.cff=r.parse();this.cff.duplicateFirstGlyph();const s=new a.CFFCompiler(this.cff);this.seacs=this.cff.seacs;try{this.data=s.compile()}catch(r){(0,n.warn)("Failed to compile font "+t.loadedName);this.data=e}this._createBuiltInEncoding()}get numGlyphs(){return this.cff.charStrings.count}getCharset(){return this.cff.charset.charset}getGlyphMapping(){const e=this.cff,t=this.properties,r=e.charset.charset;let a,n;if(t.composite){a=Object.create(null);let i;if(e.isCIDFont)for(n=0;n=0){const a=r[t];a&&(i[e]=a)}}i.length>0&&(this.properties.builtInEncoding=i)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.FontRendererFactory=void 0;var a=r(2),i=r(45),n=r(20),s=r(19),o=r(10);function getLong(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function getUshort(e,t){return e[t]<<8|e[t+1]}function getSubroutineBias(e){const t=e.length;let r=32768;t<1240?r=107:t<33900&&(r=1131);return r}function parseCmap(e,t,r){const i=1===getUshort(e,t+2)?getLong(e,t+8):getLong(e,t+16),n=getUshort(e,t+i);let s,o,c;if(4===n){getUshort(e,t+i+2);const r=getUshort(e,t+i+6)>>1;o=t+i+14;s=[];for(c=0;c>1;r>16;let n,s=0,o=0;a+=10;if(i<0)do{n=e[a]<<8|e[a+1];const i=e[a+2]<<8|e[a+3];a+=4;let c,l;if(1&n){c=(e[a]<<24|e[a+1]<<16)>>16;l=(e[a+2]<<24|e[a+3]<<16)>>16;a+=4}else{c=e[a++];l=e[a++]}if(2&n){s=c;o=l}else{s=0;o=0}let h=1,u=1,d=0,f=0;if(8&n){h=u=(e[a]<<24|e[a+1]<<16)/1073741824;a+=2}else if(64&n){h=(e[a]<<24|e[a+1]<<16)/1073741824;u=(e[a+2]<<24|e[a+3]<<16)/1073741824;a+=4}else if(128&n){h=(e[a]<<24|e[a+1]<<16)/1073741824;d=(e[a+2]<<24|e[a+3]<<16)/1073741824;f=(e[a+4]<<24|e[a+5]<<16)/1073741824;u=(e[a+6]<<24|e[a+7]<<16)/1073741824;a+=8}const g=r.glyphs[i];if(g){t.push({cmd:"save"},{cmd:"transform",args:[h,d,f,u,s,o]});compileGlyf(g,t,r);t.push({cmd:"restore"})}}while(32&n);else{const t=[];let r,c;for(r=0;r0;)h.push({flags:n})}for(r=0;r>16;a+=2;break;case 2:s-=e[a++];break;case 18:s+=e[a++]}h[r].x=s}for(r=0;r>16;a+=2;break;case 4:o-=e[a++];break;case 36:o+=e[a++]}h[r].y=o}let u=0;for(a=0;a>1;S=!0;break;case 4:c+=n.pop();moveTo(o,c);S=!0;break;case 5:for(;n.length>0;){o+=n.shift();c+=n.shift();lineTo(o,c)}break;case 6:for(;n.length>0;){o+=n.shift();lineTo(o,c);if(0===n.length)break;c+=n.shift();lineTo(o,c)}break;case 7:for(;n.length>0;){c+=n.shift();lineTo(o,c);if(0===n.length)break;o+=n.shift();lineTo(o,c)}break;case 8:for(;n.length>0;){u=o+n.shift();f=c+n.shift();d=u+n.shift();g=f+n.shift();o=d+n.shift();c=g+n.shift();bezierCurveTo(u,f,d,g,o,c)}break;case 10:y=n.pop();w=null;if(r.isCFFCIDFont){const e=r.fdSelect.getFDIndex(i);if(e>=0&&eMath.abs(c-t)?o+=n.shift():c+=n.shift();bezierCurveTo(u,f,d,g,o,c);break;default:throw new a.FormatError(`unknown operator: 12 ${x}`)}break;case 14:if(n.length>=4){const e=n.pop(),a=n.pop();c=n.pop();o=n.pop();t.push({cmd:"save"},{cmd:"translate",args:[o,c]});let i=lookupCmap(r.cmap,String.fromCharCode(r.glyphNameMap[s.StandardEncoding[e]]));compileCharString(r.glyphs[i.glyphId],t,r,i.glyphId);t.push({cmd:"restore"});i=lookupCmap(r.cmap,String.fromCharCode(r.glyphNameMap[s.StandardEncoding[a]]));compileCharString(r.glyphs[i.glyphId],t,r,i.glyphId)}return;case 18:l+=n.length>>1;S=!0;break;case 19:case 20:l+=n.length>>1;h+=l+7>>3;S=!0;break;case 21:c+=n.pop();o+=n.pop();moveTo(o,c);S=!0;break;case 22:o+=n.pop();moveTo(o,c);S=!0;break;case 23:l+=n.length>>1;S=!0;break;case 24:for(;n.length>2;){u=o+n.shift();f=c+n.shift();d=u+n.shift();g=f+n.shift();o=d+n.shift();c=g+n.shift();bezierCurveTo(u,f,d,g,o,c)}o+=n.shift();c+=n.shift();lineTo(o,c);break;case 25:for(;n.length>6;){o+=n.shift();c+=n.shift();lineTo(o,c)}u=o+n.shift();f=c+n.shift();d=u+n.shift();g=f+n.shift();o=d+n.shift();c=g+n.shift();bezierCurveTo(u,f,d,g,o,c);break;case 26:n.length%2&&(o+=n.shift());for(;n.length>0;){u=o;f=c+n.shift();d=u+n.shift();g=f+n.shift();o=d;c=g+n.shift();bezierCurveTo(u,f,d,g,o,c)}break;case 27:n.length%2&&(c+=n.shift());for(;n.length>0;){u=o+n.shift();f=c;d=u+n.shift();g=f+n.shift();o=d+n.shift();c=g;bezierCurveTo(u,f,d,g,o,c)}break;case 28:n.push((e[h]<<24|e[h+1]<<16)>>16);h+=2;break;case 29:y=n.pop()+r.gsubrsBias;w=r.gsubrs[y];w&&parse(w);break;case 30:for(;n.length>0;){u=o;f=c+n.shift();d=u+n.shift();g=f+n.shift();o=d+n.shift();c=g+(1===n.length?n.shift():0);bezierCurveTo(u,f,d,g,o,c);if(0===n.length)break;u=o+n.shift();f=c;d=u+n.shift();g=f+n.shift();c=g+n.shift();o=d+(1===n.length?n.shift():0);bezierCurveTo(u,f,d,g,o,c)}break;case 31:for(;n.length>0;){u=o+n.shift();f=c;d=u+n.shift();g=f+n.shift();c=g+n.shift();o=d+(1===n.length?n.shift():0);bezierCurveTo(u,f,d,g,o,c);if(0===n.length)break;u=o;f=c+n.shift();d=u+n.shift();g=f+n.shift();o=d+n.shift();c=g+(1===n.length?n.shift():0);bezierCurveTo(u,f,d,g,o,c)}break;default:if(x<32)throw new a.FormatError(`unknown operator: ${x}`);if(x<247)n.push(x-139);else if(x<251)n.push(256*(x-247)+e[h++]+108);else if(x<255)n.push(256*-(x-251)-e[h++]-108);else{n.push((e[h]<<24|e[h+1]<<16|e[h+2]<<8|e[h+3])/65536);h+=4}}S&&(n.length=0)}}(e)}const c=[];class CompiledFont{constructor(e){this.constructor===CompiledFont&&(0,a.unreachable)("Cannot initialize CompiledFont.");this.fontMatrix=e;this.compiledGlyphs=Object.create(null);this.compiledCharCodeToGlyphId=Object.create(null)}getPathJs(e){const{charCode:t,glyphId:r}=lookupCmap(this.cmap,e);let a=this.compiledGlyphs[r];if(!a)try{a=this.compileGlyph(this.glyphs[r],r);this.compiledGlyphs[r]=a}catch(e){this.compiledGlyphs[r]=c;void 0===this.compiledCharCodeToGlyphId[t]&&(this.compiledCharCodeToGlyphId[t]=r);throw e}void 0===this.compiledCharCodeToGlyphId[t]&&(this.compiledCharCodeToGlyphId[t]=r);return a}compileGlyph(e,t){if(!e||0===e.length||14===e[0])return c;let r=this.fontMatrix;if(this.isCFFCIDFont){const e=this.fdSelect.getFDIndex(t);if(e>=0&&e{Object.defineProperty(t,"__esModule",{value:!0});t.GlyfTable=void 0;t.GlyfTable=class GlyfTable{constructor({glyfTable:e,isGlyphLocationsLong:t,locaTable:r,numGlyphs:a}){this.glyphs=[];const i=new DataView(r.buffer,r.byteOffset,r.byteLength),n=new DataView(e.buffer,e.byteOffset,e.byteLength),s=t?4:2;let o=t?i.getUint32(0):2*i.getUint16(0),c=0;for(let e=0;ee+(t.getSize()+3&-4)),0)}write(){const e=this.getSize(),t=new DataView(new ArrayBuffer(e)),r=e>131070,a=r?4:2,i=new DataView(new ArrayBuffer((this.glyphs.length+1)*a));r?i.setUint32(0,0):i.setUint16(0,0);let n=0,s=0;for(const e of this.glyphs){n+=e.write(n,t);n=n+3&-4;s+=a;r?i.setUint32(s,n):i.setUint16(s,n>>1)}return{isLocationLong:r,loca:new Uint8Array(i.buffer),glyf:new Uint8Array(t.buffer)}}scale(e){for(let t=0,r=this.glyphs.length;te+t.getSize()),0);return this.header.getSize()+e}write(e,t){if(!this.header)return 0;const r=e;e+=this.header.write(e,t);if(this.simple)e+=this.simple.write(e,t);else for(const r of this.composites)e+=r.write(e,t);return e-r}scale(e){if(!this.header)return;const t=(this.header.xMin+this.header.xMax)/2;this.header.scale(t,e);if(this.simple)this.simple.scale(t,e);else for(const r of this.composites)r.scale(t,e)}}class GlyphHeader{constructor({numberOfContours:e,xMin:t,yMin:r,xMax:a,yMax:i}){this.numberOfContours=e;this.xMin=t;this.yMin=r;this.xMax=a;this.yMax=i}static parse(e,t){return[10,new GlyphHeader({numberOfContours:t.getInt16(e),xMin:t.getInt16(e+2),yMin:t.getInt16(e+4),xMax:t.getInt16(e+6),yMax:t.getInt16(e+8)})]}getSize(){return 10}write(e,t){t.setInt16(e,this.numberOfContours);t.setInt16(e+2,this.xMin);t.setInt16(e+4,this.yMin);t.setInt16(e+6,this.xMax);t.setInt16(e+8,this.yMax);return 10}scale(e,t){this.xMin=Math.round(e+(this.xMin-e)*t);this.xMax=Math.round(e+(this.xMax-e)*t)}}class Contour{constructor({flags:e,xCoordinates:t,yCoordinates:r}){this.xCoordinates=t;this.yCoordinates=r;this.flags=e}}class SimpleGlyph{constructor({contours:e,instructions:t}){this.contours=e;this.instructions=t}static parse(e,t,r){const a=[];for(let i=0;i255?e+=2:o>0&&(e+=1);t=n;o=Math.abs(s-r);o>255?e+=2:o>0&&(e+=1);r=s}}return e}write(e,t){const r=e,a=[],i=[],n=[];let s=0,o=0;for(const r of this.contours){for(let e=0,t=r.xCoordinates.length;e=0?18:2;a.push(e)}else a.push(l)}s=c;const h=r.yCoordinates[e];l=h-o;if(0===l){t|=32;i.push(0)}else{const e=Math.abs(l);if(e<=255){t|=l>=0?36:4;i.push(e)}else i.push(l)}o=h;n.push(t)}t.setUint16(e,a.length-1);e+=2}t.setUint16(e,this.instructions.length);e+=2;if(this.instructions.length){new Uint8Array(t.buffer,0,t.buffer.byteLength).set(this.instructions,e);e+=this.instructions.length}for(const r of n)t.setUint8(e++,r);for(let r=0,i=a.length;r=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(e+=2):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(e+=2);return e}write(e,t){const r=e;2&this.flags?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(this.flags|=1):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(this.flags|=1);t.setUint16(e,this.flags);t.setUint16(e+2,this.glyphIndex);e+=4;if(1&this.flags){if(2&this.flags){t.setInt16(e,this.argument1);t.setInt16(e+2,this.argument2)}else{t.setUint16(e,this.argument1);t.setUint16(e+2,this.argument2)}e+=4}else{t.setUint8(e,this.argument1);t.setUint8(e+1,this.argument2);e+=2}if(256&this.flags){t.setUint16(e,this.instructions.length);e+=2;if(this.instructions.length){new Uint8Array(t.buffer,0,t.buffer.byteLength).set(this.instructions,e);e+=this.instructions.length}}return e-r}scale(e,t){}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.OpenTypeFileBuilder=void 0;var a=r(9),i=r(2);function writeInt16(e,t,r){e[t]=r>>8&255;e[t+1]=255&r}function writeInt32(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 writeData(e,t,r){if(r instanceof Uint8Array)e.set(r,t);else if("string"==typeof r)for(let a=0,i=r.length;ar;){r<<=1;a++}const i=r*t;return{range:i,entry:a,rangeShift:t*e-i}}toArray(){let e=this.sfnt;const t=this.tables,r=Object.keys(t);r.sort();const n=r.length;let s,o,c,l,h,u=12+16*n;const d=[u];for(s=0;s>>0;d.push(u)}const f=new Uint8Array(u);for(s=0;s>>0}writeInt32(f,u+4,e);writeInt32(f,u+8,d[s]);writeInt32(f,u+12,t[h].length);u+=16}return f}addTable(e,t){if(e in this.tables)throw new Error("Table "+e+" already exists");this.tables[e]=t}}t.OpenTypeFileBuilder=OpenTypeFileBuilder},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.Type1Font=void 0;var a=r(45),i=r(18),n=r(9),s=r(10),o=r(54),c=r(2);function findBlock(e,t,r){const a=e.length,i=t.length,s=a-i;let o=r,c=!1;for(;o=i){o+=r;for(;o=0&&(a[e]=n)}}return(0,i.type1FontGlyphMapping)(e,a,r)}hasGlyphId(e){if(e<0||e>=this.numGlyphs)return!1;if(0===e)return!0;return this.charstrings[e-1].charstring.length>0}getSeacs(e){const t=[];for(let r=0,a=e.length;r0;e--)t[e]-=t[e-1];g.setByName(e,t)}s.topDict.privateDict=g;const m=new a.CFFIndex;for(u=0,d=i.length;u{Object.defineProperty(t,"__esModule",{value:!0});t.Type1Parser=void 0;var a=r(19),i=r(9),n=r(10),s=r(2);const o=function Type1CharStringClosure(){const e=[4],t=[5],r=[6],a=[7],i=[8],n=[12,35],o=[14],c=[21],l=[22],h=[30],u=[31];return class Type1CharString{constructor(){this.width=0;this.lsb=0;this.flexing=!1;this.output=[];this.stack=[]}convert(d,f,g){const p=d.length;let m,b,y,w=!1;for(let S=0;Sa)return!0;const i=a-e;for(let e=i;e>8&255,255&t);else{t=65536*t|0;this.output.push(255,t>>24&255,t>>16&255,t>>8&255,255&t)}}this.output.push.apply(this.output,t);r?this.stack.splice(i,e):this.stack.length=0;return!1}}}(),c=function Type1ParserClosure(){function isHexDigit(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function decrypt(e,t,r){if(r>=e.length)return new Uint8Array(0);let a,i,n=0|t;for(a=0;a>8;n=52845*(t+n)+22719&65535}return o}function isSpecial(e){return 47===e||91===e||93===e||123===e||125===e||40===e||41===e}return class Type1Parser{constructor(e,t,r){if(t){const t=e.getBytes(),r=!((isHexDigit(t[0])||(0,i.isWhiteSpace)(t[0]))&&isHexDigit(t[1])&&isHexDigit(t[2])&&isHexDigit(t[3])&&isHexDigit(t[4])&&isHexDigit(t[5])&&isHexDigit(t[6])&&isHexDigit(t[7]));e=new n.Stream(r?decrypt(t,55665,4):function decryptAscii(e,t,r){let a=0|t;const i=e.length,n=new Uint8Array(i>>>1);let s,o;for(s=0,o=0;s>8;a=52845*(e+a)+22719&65535}}return n.slice(r,o)}(t,55665,4))}this.seacAnalysisEnabled=!!r;this.stream=e;this.nextChar()}readNumberArray(){this.getToken();const e=[];for(;;){const t=this.getToken();if(null===t||"]"===t||"}"===t)break;e.push(parseFloat(t||0))}return e}readNumber(){const e=this.getToken();return parseFloat(e||0)}readInt(){const e=this.getToken();return 0|parseInt(e||0,10)}readBoolean(){return"true"===this.getToken()?1:0}nextChar(){return this.currentChar=this.stream.getByte()}getToken(){let e=!1,t=this.currentChar;for(;;){if(-1===t)return null;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!(0,i.isWhiteSpace)(t))break;t=this.nextChar()}if(isSpecial(t)){this.nextChar();return String.fromCharCode(t)}let r="";do{r+=String.fromCharCode(t);t=this.nextChar()}while(t>=0&&!(0,i.isWhiteSpace)(t)&&!isSpecial(t));return r}readCharStrings(e,t){return-1===t?e:decrypt(e,4330,t)}extractFontProgram(e){const t=this.stream,r=[],a=[],i=Object.create(null);i.lenIV=4;const n={subrs:[],charstrings:[],properties:{privateData:i}};let s,c,l,h,u;for(;null!==(s=this.getToken());)if("/"===s){s=this.getToken();switch(s){case"CharStrings":this.getToken();this.getToken();this.getToken();this.getToken();for(;;){s=this.getToken();if(null===s||"end"===s)break;if("/"!==s)continue;const e=this.getToken();c=this.readInt();this.getToken();l=c>0?t.getBytes(c):new Uint8Array(0);h=n.properties.privateData.lenIV;u=this.readCharStrings(l,h);this.nextChar();s=this.getToken();"noaccess"===s&&this.getToken();a.push({glyph:e,encoded:u})}break;case"Subrs":this.readInt();this.getToken();for(;"dup"===this.getToken();){const e=this.readInt();c=this.readInt();this.getToken();l=c>0?t.getBytes(c):new Uint8Array(0);h=n.properties.privateData.lenIV;u=this.readCharStrings(l,h);this.nextChar();s=this.getToken();"noaccess"===s&&this.getToken();r[e]=u}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":const e=this.readNumberArray();e.length>0&&e.length,0;break;case"StemSnapH":case"StemSnapV":n.properties.privateData[s]=this.readNumberArray();break;case"StdHW":case"StdVW":n.properties.privateData[s]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":case"ExpansionFactor":n.properties.privateData[s]=this.readNumber();break;case"ForceBold":n.properties.privateData[s]=this.readBoolean()}}for(let t=0;t-1&&void 0===e.widths[t]&&t>=e.firstChar&&t<=e.lastChar&&(e.widths[t]=s.width)}}return n}extractFontHeader(e){let t;for(;null!==(t=this.getToken());)if("/"===t){t=this.getToken();switch(t){case"FontMatrix":const r=this.readNumberArray();e.fontMatrix=r;break;case"Encoding":const i=this.getToken();let n;if(/^\d+$/.test(i)){n=[];const e=0|parseInt(i,10);this.getToken();for(let r=0;r{Object.defineProperty(t,"__esModule",{value:!0});t.getTilingPatternIR=function getTilingPatternIR(e,t,r){const i=t.getArray("Matrix"),n=a.Util.normalizeRect(t.getArray("BBox")),s=t.get("XStep"),o=t.get("YStep"),c=t.get("PaintType"),l=t.get("TilingType");if(n[2]-n[0]==0||n[3]-n[1]==0)throw new a.FormatError(`Invalid getTilingPatternIR /BBox array: [${n}].`);return["TilingPattern",r,e,i,n,s,o,c,l]};t.Pattern=void 0;var a=r(2),i=r(24),n=r(5),s=r(9);const o=2,c=3,l=4,h=5,u=6,d=7;t.Pattern=class Pattern{constructor(){(0,a.unreachable)("Cannot initialize Pattern.")}static parseShading(e,t,r,i,f,g){const p=(0,n.isStream)(e)?e.dict:e,m=p.get("ShadingType");try{switch(m){case o:case c:return new RadialAxialShading(p,t,r,f,g);case l:case h:case u:case d:return new MeshShading(e,t,r,f,g);default:throw new a.FormatError("Unsupported ShadingType: "+m)}}catch(e){if(e instanceof s.MissingDataException)throw e;i.send("UnsupportedFeature",{featureId:a.UNSUPPORTED_FEATURES.shadingPattern});(0,a.warn)(e);return new DummyShading}}};class BaseShading{static get SMALL_NUMBER(){return(0,a.shadow)(this,"SMALL_NUMBER",1e-6)}constructor(){this.constructor===BaseShading&&(0,a.unreachable)("Cannot initialize BaseShading.")}getIR(){(0,a.unreachable)("Abstract method `getIR` called.")}}class RadialAxialShading extends BaseShading{constructor(e,t,r,n,s){super();this.coordsArr=e.getArray("Coords");this.shadingType=e.get("ShadingType");const o=i.ColorSpace.parse({cs:e.getRaw("ColorSpace")||e.getRaw("CS"),xref:t,resources:r,pdfFunctionFactory:n,localColorSpaceCache:s}),l=e.getArray("BBox");Array.isArray(l)&&4===l.length?this.bbox=a.Util.normalizeRect(l):this.bbox=null;let h=0,u=1;if(e.has("Domain")){const t=e.getArray("Domain");h=t[0];u=t[1]}let d=!1,f=!1;if(e.has("Extend")){const t=e.getArray("Extend");d=t[0];f=t[1]}if(!(this.shadingType!==c||d&&f)){const[e,t,r,i,n,s]=this.coordsArr,o=Math.hypot(e-i,t-n);r<=s+o&&s<=r+o&&(0,a.warn)("Unsupported radial gradient.")}this.extendStart=d;this.extendEnd=f;const g=e.getRaw("Function"),p=n.createFromArray(g),m=(u-h)/10,b=this.colorStops=[];if(h>=u||m<=0){(0,a.info)("Bad shading domain.");return}const y=new Float32Array(o.numComps),w=new Float32Array(1);let S;for(let e=0;e<=10;e++){w[0]=h+e*m;p(w,0,y,0);S=o.getRgb(y,0);const t=a.Util.makeHexColor(S[0],S[1],S[2]);b.push([e/10,t])}let x="transparent";if(e.has("Background")){S=o.getRgb(e.get("Background"),0);x=a.Util.makeHexColor(S[0],S[1],S[2])}if(!d){b.unshift([0,x]);b[1][0]+=BaseShading.SMALL_NUMBER}if(!f){b[b.length-1][0]-=BaseShading.SMALL_NUMBER;b.push([1,x])}this.colorStops=b}getIR(){const e=this.coordsArr,t=this.shadingType;let r,i,n,s,l;if(t===o){i=[e[0],e[1]];n=[e[2],e[3]];s=null;l=null;r="axial"}else if(t===c){i=[e[0],e[1]];n=[e[3],e[4]];s=e[2];l=e[5];r="radial"}else(0,a.unreachable)(`getPattern type unknown: ${t}`);return["RadialAxial",r,this.bbox,this.colorStops,i,n,s,l]}}class MeshStreamReader{constructor(e,t){this.stream=e;this.context=t;this.buffer=0;this.bufferLength=0;const r=t.numComps;this.tmpCompsBuf=new Float32Array(r);const a=t.colorSpace.numComps;this.tmpCsCompsBuf=t.colorFn?new Float32Array(a):this.tmpCompsBuf}get hasData(){if(this.stream.end)return this.stream.pos0)return!0;const e=this.stream.getByte();if(e<0)return!1;this.buffer=e;this.bufferLength=8;return!0}readBits(e){let 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();const e=this.stream.getByte();this.buffer=e&(1<>r)>>>0}if(8===e&&0===r)return this.stream.getByte();for(;r>r}align(){this.buffer=0;this.bufferLength=0}readFlag(){return this.readBits(this.context.bitsPerFlag)}readCoordinate(){const e=this.context.bitsPerCoordinate,t=this.readBits(e),r=this.readBits(e),a=this.context.decode,i=e<32?1/((1<n?n:e;t=t>s?s:t;r=r{Object.defineProperty(t,"__esModule",{value:!0});t.isPDFFunction=function isPDFFunction(e){let t;if("object"!=typeof e)return!1;if((0,a.isDict)(e))t=e;else{if(!(0,a.isStream)(e))return!1;t=e.dict}return t.has("FunctionType")};t.PostScriptEvaluator=t.PostScriptCompiler=t.PDFFunctionFactory=void 0;var a=r(5),i=r(2),n=r(57),s=r(58);t.PDFFunctionFactory=class PDFFunctionFactory{constructor({xref:e,isEvalSupported:t=!0}){this.xref=e;this.isEvalSupported=!1!==t}create(e){const t=this.getCached(e);if(t)return t;const r=PDFFunction.parse({xref:this.xref,isEvalSupported:this.isEvalSupported,fn:e instanceof a.Ref?this.xref.fetch(e):e});this._cache(e,r);return r}createFromArray(e){const t=this.getCached(e);if(t)return t;const r=PDFFunction.parseArray({xref:this.xref,isEvalSupported:this.isEvalSupported,fnObj:e instanceof a.Ref?this.xref.fetch(e):e});this._cache(e,r);return r}getCached(e){let t;e instanceof a.Ref?t=e:e instanceof a.Dict?t=e.objId:(0,a.isStream)(e)&&(t=e.dict&&e.dict.objId);if(t){const e=this._localFunctionCache.getByRef(t);if(e)return e}return null}_cache(e,t){if(!t)throw new Error('PDFFunctionFactory._cache - expected "parsedFunction" argument.');let r;e instanceof a.Ref?r=e:e instanceof a.Dict?r=e.objId:(0,a.isStream)(e)&&(r=e.dict&&e.dict.objId);r&&this._localFunctionCache.set(null,r,t)}get _localFunctionCache(){return(0,i.shadow)(this,"_localFunctionCache",new s.LocalFunctionCache)}};function toNumberArray(e){if(!Array.isArray(e))return null;const t=e.length;for(let r=0;r>c)*h;l&=(1<r?e=r:e0&&(d=o[u-1]);let f=a[1];u>1,d=s.length>>1,f=new PostScriptEvaluator(h),g=Object.create(null);let p=8192;const m=new Float32Array(d);return function constructPostScriptFn(e,t,r,a){let i,n,s="";const o=m;for(i=0;ie&&(n=e)}h[i]=n}if(p>0){p--;g[s]=h}r.set(h,a)}}}class PostScriptStack{static get MAX_STACK_SIZE(){return(0,i.shadow)(this,"MAX_STACK_SIZE",100)}constructor(e){this.stack=e?Array.prototype.slice.call(e,0):[]}push(e){if(this.stack.length>=PostScriptStack.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");this.stack.push(e)}pop(){if(this.stack.length<=0)throw new Error("PostScript function stack underflow.");return this.stack.pop()}copy(e){if(this.stack.length+e>=PostScriptStack.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");const t=this.stack;for(let r=t.length-e,a=e-1;a>=0;a--,r++)t.push(t[r])}index(e){this.push(this.stack[this.stack.length-e-1])}roll(e,t){const r=this.stack,a=r.length-e,i=r.length-1,n=a+(t-Math.floor(t/e)*e);for(let e=a,t=i;e0?t.push(o<>c);break;case"ceiling":o=t.pop();t.push(Math.ceil(o));break;case"copy":o=t.pop();t.copy(o);break;case"cos":o=t.pop();t.push(Math.cos(o));break;case"cvi":o=0|t.pop();t.push(o);break;case"cvr":break;case"div":c=t.pop();o=t.pop();t.push(o/c);break;case"dup":t.copy(1);break;case"eq":c=t.pop();o=t.pop();t.push(o===c);break;case"exch":t.roll(2,1);break;case"exp":c=t.pop();o=t.pop();t.push(o**c);break;case"false":t.push(!1);break;case"floor":o=t.pop();t.push(Math.floor(o));break;case"ge":c=t.pop();o=t.pop();t.push(o>=c);break;case"gt":c=t.pop();o=t.pop();t.push(o>c);break;case"idiv":c=t.pop();o=t.pop();t.push(o/c|0);break;case"index":o=t.pop();t.index(o);break;case"le":c=t.pop();o=t.pop();t.push(o<=c);break;case"ln":o=t.pop();t.push(Math.log(o));break;case"log":o=t.pop();t.push(Math.log(o)/Math.LN10);break;case"lt":c=t.pop();o=t.pop();t.push(o=t?new AstLiteral(t):e.max<=t?e:new AstMin(e,t)}return class PostScriptCompiler{compile(e,t,r){const a=[],i=[],n=t.length>>1,s=r.length>>1;let o,c,l,h,u,d,f,g,p=0;for(let e=0;et.min){o.unshift("Math.max(",n,", ");o.push(")")}if(s{Object.defineProperty(t,"__esModule",{value:!0});t.PostScriptParser=t.PostScriptLexer=void 0;var a=r(2),i=r(5),n=r(9);t.PostScriptParser=class PostScriptParser{constructor(e){this.lexer=e;this.operators=[];this.token=null;this.prev=null}nextToken(){this.prev=this.token;this.token=this.lexer.getToken()}accept(e){if(this.token.type===e){this.nextToken();return!0}return!1}expect(e){if(this.accept(e))return!0;throw new a.FormatError(`Unexpected symbol: found ${this.token.type} expected ${e}.`)}parse(){this.nextToken();this.expect(s.LBRACE);this.parseBlock();this.expect(s.RBRACE);return this.operators}parseBlock(){for(;;)if(this.accept(s.NUMBER))this.operators.push(this.prev.value);else if(this.accept(s.OPERATOR))this.operators.push(this.prev.value);else{if(!this.accept(s.LBRACE))return;this.parseCondition()}}parseCondition(){const e=this.operators.length;this.operators.push(null,null);this.parseBlock();this.expect(s.RBRACE);if(this.accept(s.IF)){this.operators[e]=this.operators.length;this.operators[e+1]="jz"}else{if(!this.accept(s.LBRACE))throw new a.FormatError("PS Function: error parsing conditional.");{const t=this.operators.length;this.operators.push(null,null);const r=this.operators.length;this.parseBlock();this.expect(s.RBRACE);this.expect(s.IFELSE);this.operators[t]=this.operators.length;this.operators[t+1]="j";this.operators[e]=r;this.operators[e+1]="jz"}}}};const s={LBRACE:0,RBRACE:1,NUMBER:2,OPERATOR:3,IF:4,IFELSE:5};class PostScriptToken{static get opCache(){return(0,a.shadow)(this,"opCache",Object.create(null))}constructor(e,t){this.type=e;this.value=t}static getOperator(e){const t=PostScriptToken.opCache[e];return t||(PostScriptToken.opCache[e]=new PostScriptToken(s.OPERATOR,e))}static get LBRACE(){return(0,a.shadow)(this,"LBRACE",new PostScriptToken(s.LBRACE,"{"))}static get RBRACE(){return(0,a.shadow)(this,"RBRACE",new PostScriptToken(s.RBRACE,"}"))}static get IF(){return(0,a.shadow)(this,"IF",new PostScriptToken(s.IF,"IF"))}static get IFELSE(){return(0,a.shadow)(this,"IFELSE",new PostScriptToken(s.IFELSE,"IFELSE"))}}t.PostScriptLexer=class PostScriptLexer{constructor(e){this.stream=e;this.nextChar();this.strBuf=[]}nextChar(){return this.currentChar=this.stream.getByte()}getToken(){let e=!1,t=this.currentChar;for(;;){if(t<0)return i.EOF;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!(0,n.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 PostScriptToken(s.NUMBER,this.getNumber());case 123:this.nextChar();return PostScriptToken.LBRACE;case 125:this.nextChar();return PostScriptToken.RBRACE}const r=this.strBuf;r.length=0;r[0]=String.fromCharCode(t);for(;(t=this.nextChar())>=0&&(t>=65&&t<=90||t>=97&&t<=122);)r.push(String.fromCharCode(t));const a=r.join("");switch(a.toLowerCase()){case"if":return PostScriptToken.IF;case"ifelse":return PostScriptToken.IFELSE;default:return PostScriptToken.getOperator(a)}}getNumber(){let e=this.currentChar;const t=this.strBuf;t.length=0;t[0]=String.fromCharCode(e);for(;(e=this.nextChar())>=0&&(e>=48&&e<=57||45===e||46===e);)t.push(String.fromCharCode(e));const r=parseFloat(t.join(""));if(isNaN(r))throw new a.FormatError(`Invalid floating point number: ${r}`);return r}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.LocalTilingPatternCache=t.LocalImageCache=t.LocalGStateCache=t.LocalFunctionCache=t.LocalColorSpaceCache=t.GlobalImageCache=void 0;var a=r(2),i=r(5);class BaseLocalCache{constructor(e){this.constructor===BaseLocalCache&&(0,a.unreachable)("Cannot initialize BaseLocalCache.");this._onlyRefs=!0===(e&&e.onlyRefs);if(!this._onlyRefs){this._nameRefMap=new Map;this._imageMap=new Map}this._imageCache=new i.RefSetCache}getByName(e){this._onlyRefs&&(0,a.unreachable)("Should not call `getByName` method.");const t=this._nameRefMap.get(e);return t?this.getByRef(t):this._imageMap.get(e)||null}getByRef(e){return this._imageCache.get(e)||null}set(e,t,r){(0,a.unreachable)("Abstract method `set` called.")}}t.LocalImageCache=class LocalImageCache extends BaseLocalCache{set(e,t=null,r){if("string"!=typeof e)throw new Error('LocalImageCache.set - expected "name" argument.');if(t){if(this._imageCache.has(t))return;this._nameRefMap.set(e,t);this._imageCache.put(t,r)}else this._imageMap.has(e)||this._imageMap.set(e,r)}};t.LocalColorSpaceCache=class LocalColorSpaceCache extends BaseLocalCache{set(e=null,t=null,r){if("string"!=typeof e&&!t)throw new Error('LocalColorSpaceCache.set - expected "name" and/or "ref" argument.');if(t){if(this._imageCache.has(t))return;null!==e&&this._nameRefMap.set(e,t);this._imageCache.put(t,r)}else this._imageMap.has(e)||this._imageMap.set(e,r)}};t.LocalFunctionCache=class LocalFunctionCache extends BaseLocalCache{constructor(e){super({onlyRefs:!0})}set(e=null,t,r){if(!t)throw new Error('LocalFunctionCache.set - expected "ref" argument.');this._imageCache.has(t)||this._imageCache.put(t,r)}};t.LocalGStateCache=class LocalGStateCache extends BaseLocalCache{set(e,t=null,r){if("string"!=typeof e)throw new Error('LocalGStateCache.set - expected "name" argument.');if(t){if(this._imageCache.has(t))return;this._nameRefMap.set(e,t);this._imageCache.put(t,r)}else this._imageMap.has(e)||this._imageMap.set(e,r)}};t.LocalTilingPatternCache=class LocalTilingPatternCache extends BaseLocalCache{constructor(e){super({onlyRefs:!0})}set(e=null,t,r){if(!t)throw new Error('LocalTilingPatternCache.set - expected "ref" argument.');this._imageCache.has(t)||this._imageCache.put(t,r)}};class GlobalImageCache{static get NUM_PAGES_THRESHOLD(){return(0,a.shadow)(this,"NUM_PAGES_THRESHOLD",2)}static get MIN_IMAGES_TO_CACHE(){return(0,a.shadow)(this,"MIN_IMAGES_TO_CACHE",10)}static get MAX_BYTE_SIZE(){return(0,a.shadow)(this,"MAX_BYTE_SIZE",4e7)}constructor(){this._refCache=new i.RefSetCache;this._imageCache=new i.RefSetCache}get _byteSize(){let e=0;this._imageCache.forEach((t=>{e+=t.byteSize}));return e}get _cacheLimitReached(){return!(this._imageCache.size{Object.defineProperty(t,"__esModule",{value:!0});t.bidi=function bidi(e,t=-1,r=!1){let c=!0;const l=e.length;if(0===l||r)return createBidiText(e,c,r);s.length=l;o.length=l;let h,u,d=0;for(h=0;h=0&&"ET"===o[e];--e)o[e]="EN";for(let e=h+1;e0&&(t=o[h-1]);let r=m;e+1w&&isOdd(w)&&(x=w)}for(w=S;w>=x;--w){let e=-1;for(h=0,u=f.length;h=0){reverseValues(s,e,h);e=-1}}else e<0&&(e=h);e>=0&&reverseValues(s,e,f.length)}for(h=0,u=s.length;h"!==e||(s[h]="")}return createBidiText(s.join(""),c)};var a=r(2);const i=["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"],n=["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 isOdd(e){return 0!=(1&e)}function isEven(e){return 0==(1&e)}function findUnequal(e,t,r){let a,i;for(a=t,i=e.length;a{Object.defineProperty(t,"__esModule",{value:!0});t.getMetrics=void 0;var a=r(9);const i=(0,a.getLookupTableFactory)((function(e){e.Courier=600;e["Courier-Bold"]=600;e["Courier-BoldOblique"]=600;e["Courier-Oblique"]=600;e.Helvetica=(0,a.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,a.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,a.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,a.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,a.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,a.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,a.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,a.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,a.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,a.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=i},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.MurmurHash3_64=void 0;var a=r(2);const i=3285377520,n=4294901760,s=65535;t.MurmurHash3_64=class MurmurHash3_64{constructor(e){this.h1=e?4294967295&e:i;this.h2=e?4294967295&e:i}update(e){let t,r;if((0,a.isString)(e)){t=new Uint8Array(2*e.length);r=0;for(let a=0,i=e.length;a>>8;t[r++]=255&i}}}else{if(!(0,a.isArrayBuffer)(e))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");t=e.slice();r=t.byteLength}const i=r>>2,o=r-4*i,c=new Uint32Array(t.buffer,0,i);let l=0,h=0,u=this.h1,d=this.h2;const f=3432918353,g=461845907,p=11601,m=13715;for(let e=0;e>>17;l=l*g&n|l*m&s;u^=l;u=u<<13|u>>>19;u=5*u+3864292196}else{h=c[e];h=h*f&n|h*p&s;h=h<<15|h>>>17;h=h*g&n|h*m&s;d^=h;d=d<<13|d>>>19;d=5*d+3864292196}l=0;switch(o){case 3:l^=t[4*i+2]<<16;case 2:l^=t[4*i+1]<<8;case 1:l^=t[4*i];l=l*f&n|l*p&s;l=l<<15|l>>>17;l=l*g&n|l*m&s;1&i?u^=l:d^=l}this.h1=u;this.h2=d}hexdigest(){let e=this.h1,t=this.h2;e^=t>>>1;e=3981806797*e&n|36045*e&s;t=4283543511*t&n|(2950163797*(t<<16|e>>>16)&n)>>>16;e^=t>>>1;e=444984403*e&n|60499*e&s;t=3301882366*t&n|(3120437893*(t<<16|e>>>16)&n)>>>16;e^=t>>>1;const r=(e>>>0).toString(16),a=(t>>>0).toString(16);return r.padStart(8,"0")+a.padStart(8,"0")}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.OperatorList=void 0;var a=r(2);function addState(e,t,r,a,i){let n=e;for(let e=0,r=t.length-1;e1e3){h=Math.max(h,f);g+=d+2;f=0;d=0}u.push({transform:t,x:f,y:g,w:r.width,h:r.height});f+=r.width+2;d=Math.max(d,r.height)}const p=Math.max(h,f)+1,m=g+d+1,b=new Uint8ClampedArray(p*m*4),y=p<<2;for(let e=0;e=0;){t[n-4]=t[n];t[n-3]=t[n+1];t[n-2]=t[n+2];t[n-1]=t[n+3];t[n+r]=t[n+r-4];t[n+r+1]=t[n+r-3];t[n+r+2]=t[n+r-2];t[n+r+3]=t[n+r-1];n-=y}}r.splice(s,4*l,a.OPS.paintInlineImageXObjectGroup);i.splice(s,4*l,[{width:p,height:m,kind:a.ImageKind.RGBA_32BPP,data:b},u]);return s+1}));addState(i,[a.OPS.save,a.OPS.transform,a.OPS.paintImageMaskXObject,a.OPS.restore],null,(function iterateImageMaskGroup(e,t){const r=e.fnArray,i=(t-(e.iCurr-3))%4;switch(i){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: ${i}`)}),(function foundImageMaskGroup(e,t){const r=e.fnArray,i=e.argsArray,n=e.iCurr,s=n-3,o=n-2,c=n-1;let l=Math.floor((t-s)/4);l=function handlePaintSolidColorImageMask(e,t,r,i){const n=e+2;let s;for(s=0;s=4&&r[n-4]===r[s]&&r[n-3]===r[o]&&r[n-2]===r[c]&&r[n-1]===r[l]&&a[n-4][0]===h&&a[n-4][1]===u){d++;f-=5}let g=f+4;for(let e=1;e=r)break}a=(a||i)[e[t]];if(a&&!Array.isArray(a)){s.iCurr=t;t++;if(!a.checkFn||(0,a.checkFn)(s)){n=a;a=null}else a=null}else t++}this.state=a;this.match=n;this.lastProcessed=t}flush(){for(;this.match;){const e=this.queue.fnArray.length;this.lastProcessed=(0,this.match.processFn)(this.context,e);this.match=null;this.state=null;this._optimize()}}reset(){this.state=null;this.match=null;this.lastProcessed=0}}class OperatorList{static get CHUNK_SIZE(){return(0,a.shadow)(this,"CHUNK_SIZE",1e3)}static get CHUNK_SIZE_ABOUT(){return(0,a.shadow)(this,"CHUNK_SIZE_ABOUT",this.CHUNK_SIZE-5)}constructor(e=0,t){this._streamSink=t;this.fnArray=[];this.argsArray=[];!t||e&a.RenderingIntentFlag.OPLIST?this.optimizer=new NullOptimizer(this):this.optimizer=new QueueOptimizer(this);this.dependencies=new Set;this._totalLength=0;this.weight=0;this._resolved=t?null:Promise.resolve()}get length(){return this.argsArray.length}get ready(){return this._resolved||this._streamSink.ready}get totalLength(){return this._totalLength+this.length}addOp(e,t){this.optimizer.push(e,t);this.weight++;this._streamSink&&(this.weight>=OperatorList.CHUNK_SIZE||this.weight>=OperatorList.CHUNK_SIZE_ABOUT&&(e===a.OPS.restore||e===a.OPS.endText))&&this.flush()}addDependency(e){if(!this.dependencies.has(e)){this.dependencies.add(e);this.addOp(a.OPS.dependency,[e])}}addDependencies(e){for(const t of e)this.addDependency(t)}addOpList(e){if(e instanceof OperatorList){for(const t of e.dependencies)this.dependencies.add(t);for(let t=0,r=e.length;t{Object.defineProperty(t,"__esModule",{value:!0});t.PDFImage=void 0;var a=r(2),i=r(5),n=r(24),s=r(29),o=r(37),c=r(40);function decodeAndClamp(e,t,r,a){(e=t+e*r)<0?e=0:e>a&&(e=a);return e}function resizeImageMask(e,t,r,a,i,n){const s=i*n;let o;o=t<=8?new Uint8Array(s):t<=16?new Uint16Array(s):new Uint32Array(s);const c=r/i,l=a/n;let h,u,d,f,g=0;const p=new Uint16Array(i),m=r;for(h=0;h0&&Number.isInteger(r.height)&&r.height>0&&(r.width!==p||r.height!==m)){(0,a.warn)("PDFImage - using the Width/Height of the image data, rather than the image dictionary.");p=r.width;m=r.height}if(p<1||m<1)throw new a.FormatError(`Invalid image width: ${p} or height: ${m}`);this.width=p;this.height=m;this.interpolate=f.get("Interpolate","I");this.imageMask=f.get("ImageMask","IM")||!1;this.matte=f.get("Matte")||!1;let b=r.bitsPerComponent;if(!b){b=f.get("BitsPerComponent","BPC");if(!b){if(!this.imageMask)throw new a.FormatError(`Bits per component missing in image: ${this.imageMask}`);b=1}}this.bpc=b;if(!this.imageMask){let o=f.getRaw("ColorSpace")||f.getRaw("CS");if(!o){(0,a.info)("JPX images (which do not require color spaces)");switch(r.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 ${r.numComps} color components not supported.`)}}this.colorSpace=n.ColorSpace.parse({cs:o,xref:e,resources:s?t:null,pdfFunctionFactory:u,localColorSpaceCache:d});this.numComps=this.colorSpace.numComps}this.decode=f.getArray("Decode","D");this.needsDecode=!1;if(this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode,b)||h&&!n.ColorSpace.isDefaultDecode(this.decode,1))){this.needsDecode=!0;const e=(1<>3)*r,o=e.byteLength;let c,l;if(!a||i&&!(s===o))if(i){c=new Uint8ClampedArray(s);c.set(e);for(l=o;l>7&1;s[d+1]=u>>6&1;s[d+2]=u>>5&1;s[d+3]=u>>4&1;s[d+4]=u>>3&1;s[d+5]=u>>2&1;s[d+6]=u>>1&1;s[d+7]=1&u;d+=8}if(d>=1}}}}else{let r=0;u=0;for(d=0,h=n;d>a;i<0?i=0:i>l&&(i=l);s[d]=i;u&=(1<o[a+1]){t=255;break}}c[u]=t}}}if(c)for(u=0,f=3,d=t*i;u>3;let d;if(!e){let e;"DeviceGray"===this.colorSpace.name&&1===h?e=a.ImageKind.GRAYSCALE_1BPP:"DeviceRGB"!==this.colorSpace.name||8!==h||this.needsDecode||(e=a.ImageKind.RGB_24BPP);if(e&&!this.smask&&!this.mask&&t===c&&r===l){i.kind=e;d=this.getImageBytes(l*u);if(this.image instanceof s.DecodeStream)i.data=d;else{const e=new Uint8ClampedArray(d.length);e.set(d);i.data=e}if(this.needsDecode){(0,a.assert)(e===a.ImageKind.GRAYSCALE_1BPP,"PDFImage.createImageData: The image must be grayscale.");const t=i.data;for(let e=0,r=t.length;e>3,o=this.getImageBytes(i*s),c=this.getComponents(o);let l,h;if(1===n){h=r*i;if(this.needsDecode)for(l=0;l{Object.defineProperty(t,"__esModule",{value:!0});t.Catalog=void 0;var a=r(5),i=r(9),n=r(2),s=r(65),o=r(24),c=r(66),l=r(58),h=r(67),u=r(69);function fetchDestination(e){e instanceof a.Dict&&(e=e.get("D"));return Array.isArray(e)?e:null}class Catalog{constructor(e,t){this.pdfManager=e;this.xref=t;this._catDict=t.getCatalogObj();if(!(0,a.isDict)(this._catDict))throw new n.FormatError("Catalog object is not a dictionary.");this.fontCache=new a.RefSetCache;this.builtInCMapCache=new Map;this.standardFontDataCache=new Map;this.globalImageCache=new l.GlobalImageCache;this.pageKidsCountCache=new a.RefSetCache;this.pageIndexCache=new a.RefSetCache;this.nonBlendModesSet=new a.RefSet}get version(){const e=this._catDict.get("Version");return(0,a.isName)(e)?(0,n.shadow)(this,"version",e.name):(0,n.shadow)(this,"version",null)}get needsRendering(){const e=this._catDict.get("NeedsRendering");return(0,n.isBool)(e)?(0,n.shadow)(this,"needsRendering",e):(0,n.shadow)(this,"needsRendering",!1)}get collection(){let e=null;try{const t=this._catDict.get("Collection");(0,a.isDict)(t)&&t.size>0&&(e=t)}catch(e){if(e instanceof i.MissingDataException)throw e;(0,n.info)("Cannot fetch Collection entry; assuming no collection is present.")}return(0,n.shadow)(this,"collection",e)}get acroForm(){let e=null;try{const t=this._catDict.get("AcroForm");(0,a.isDict)(t)&&t.size>0&&(e=t)}catch(e){if(e instanceof i.MissingDataException)throw e;(0,n.info)("Cannot fetch AcroForm entry; assuming no forms are present.")}return(0,n.shadow)(this,"acroForm",e)}get acroFormRef(){const e=this._catDict.getRaw("AcroForm");return(0,n.shadow)(this,"acroFormRef",(0,a.isRef)(e)?e:null)}get metadata(){const e=this._catDict.getRaw("Metadata");if(!(0,a.isRef)(e))return(0,n.shadow)(this,"metadata",null);const t=!(this.xref.encrypt&&this.xref.encrypt.encryptMetadata),r=this.xref.fetch(e,t);let s=null;if((0,a.isStream)(r)&&(0,a.isDict)(r.dict)){const e=r.dict.get("Type"),t=r.dict.get("Subtype");if((0,a.isName)(e,"Metadata")&&(0,a.isName)(t,"XML"))try{const e=(0,n.stringToUTF8String)(r.getString());e&&(s=new h.MetadataParser(e).serializable)}catch(e){if(e instanceof i.MissingDataException)throw e;(0,n.info)("Skipping invalid metadata.")}}return(0,n.shadow)(this,"metadata",s)}get markInfo(){let e=null;try{e=this._readMarkInfo()}catch(e){if(e instanceof i.MissingDataException)throw e;(0,n.warn)("Unable to read mark info.")}return(0,n.shadow)(this,"markInfo",e)}_readMarkInfo(){const e=this._catDict.get("MarkInfo");if(!(0,a.isDict)(e))return null;const t=Object.assign(Object.create(null),{Marked:!1,UserProperties:!1,Suspects:!1});for(const r in t){if(!e.has(r))continue;const a=e.get(r);(0,n.isBool)(a)&&(t[r]=a)}return t}get structTreeRoot(){let e=null;try{e=this._readStructTreeRoot()}catch(e){if(e instanceof i.MissingDataException)throw e;(0,n.warn)("Unable read to structTreeRoot info.")}return(0,n.shadow)(this,"structTreeRoot",e)}_readStructTreeRoot(){const e=this._catDict.get("StructTreeRoot");if(!(0,a.isDict)(e))return null;const t=new u.StructTreeRoot(e);t.init();return t}get toplevelPagesDict(){const e=this._catDict.get("Pages");if(!(0,a.isDict)(e))throw new n.FormatError("Invalid top-level pages dictionary.");return(0,n.shadow)(this,"toplevelPagesDict",e)}get documentOutline(){let e=null;try{e=this._readDocumentOutline()}catch(e){if(e instanceof i.MissingDataException)throw e;(0,n.warn)("Unable to read document outline.")}return(0,n.shadow)(this,"documentOutline",e)}_readDocumentOutline(){let e=this._catDict.get("Outlines");if(!(0,a.isDict)(e))return null;e=e.getRaw("First");if(!(0,a.isRef)(e))return null;const t={items:[]},r=[{obj:e,parent:t}],i=new a.RefSet;i.put(e);const s=this.xref,c=new Uint8ClampedArray(3);for(;r.length>0;){const t=r.shift(),l=s.fetchIfRef(t.obj);if(null===l)continue;if(!l.has("Title"))throw new n.FormatError("Invalid outline item encountered.");const h={url:null,dest:null};Catalog.parseDestDictionary({destDict:l,resultObj:h,docBaseUrl:this.pdfManager.docBaseUrl});const u=l.get("Title"),d=l.get("F")||0,f=l.getArray("C"),g=l.get("Count");let p=c;!Array.isArray(f)||3!==f.length||0===f[0]&&0===f[1]&&0===f[2]||(p=o.ColorSpace.singletons.rgb.getRgb(f,0));const m={dest:h.dest,url:h.url,unsafeUrl:h.unsafeUrl,newWindow:h.newWindow,title:(0,n.stringToPDFString)(u),color:p,count:Number.isInteger(g)?g:void 0,bold:!!(2&d),italic:!!(1&d),items:[]};t.parent.items.push(m);e=l.getRaw("First");if((0,a.isRef)(e)&&!i.has(e)){r.push({obj:e,parent:m});i.put(e)}e=l.getRaw("Next");if((0,a.isRef)(e)&&!i.has(e)){r.push({obj:e,parent:t.parent});i.put(e)}}return t.items.length>0?t.items:null}get permissions(){let e=null;try{e=this._readPermissions()}catch(e){if(e instanceof i.MissingDataException)throw e;(0,n.warn)("Unable to read permissions.")}return(0,n.shadow)(this,"permissions",e)}_readPermissions(){const e=this.xref.trailer.get("Encrypt");if(!(0,a.isDict)(e))return null;let t=e.get("P");if(!(0,n.isNum)(t))return null;t+=2**32;const r=[];for(const e in n.PermissionFlag){const a=n.PermissionFlag[e];t&a&&r.push(a)}return r}get optionalContentConfig(){let e=null;try{const t=this._catDict.get("OCProperties");if(!t)return(0,n.shadow)(this,"optionalContentConfig",null);const r=t.get("D");if(!r)return(0,n.shadow)(this,"optionalContentConfig",null);const i=t.get("OCGs");if(!Array.isArray(i))return(0,n.shadow)(this,"optionalContentConfig",null);const s=[],o=[];for(const e of i){if(!(0,a.isRef)(e))continue;o.push(e);const t=this.xref.fetchIfRef(e);s.push({id:e.toString(),name:(0,n.isString)(t.get("Name"))?(0,n.stringToPDFString)(t.get("Name")):null,intent:(0,n.isString)(t.get("Intent"))?(0,n.stringToPDFString)(t.get("Intent")):null})}e=this._readOptionalContentConfig(r,o);e.groups=s}catch(e){if(e instanceof i.MissingDataException)throw e;(0,n.warn)(`Unable to read optional content config: ${e}`)}return(0,n.shadow)(this,"optionalContentConfig",e)}_readOptionalContentConfig(e,t){function parseOnOff(e){const r=[];if(Array.isArray(e))for(const i of e)(0,a.isRef)(i)&&t.includes(i)&&r.push(i.toString());return r}function parseOrder(e,r=0){if(!Array.isArray(e))return null;const n=[];for(const s of e){if((0,a.isRef)(s)&&t.includes(s)){i.put(s);n.push(s.toString());continue}const e=parseNestedOrder(s,r);e&&n.push(e)}if(r>0)return n;const s=[];for(const e of t)i.has(e)||s.push(e.toString());s.length&&n.push({name:null,order:s});return n}function parseNestedOrder(e,t){if(++t>s){(0,n.warn)("parseNestedOrder - reached MAX_NESTED_LEVELS.");return null}const a=r.fetchIfRef(e);if(!Array.isArray(a))return null;const i=r.fetchIfRef(a[0]);if("string"!=typeof i)return null;const o=parseOrder(a.slice(1),t);return o&&o.length?{name:(0,n.stringToPDFString)(i),order:o}:null}const r=this.xref,i=new a.RefSet,s=10;return{name:(0,n.isString)(e.get("Name"))?(0,n.stringToPDFString)(e.get("Name")):null,creator:(0,n.isString)(e.get("Creator"))?(0,n.stringToPDFString)(e.get("Creator")):null,baseState:(0,a.isName)(e.get("BaseState"))?e.get("BaseState").name:null,on:parseOnOff(e.get("ON")),off:parseOnOff(e.get("OFF")),order:parseOrder(e.get("Order")),groups:null}}get numPages(){const e=this.toplevelPagesDict.get("Count");if(!Number.isInteger(e))throw new n.FormatError("Page count in top-level pages dictionary is not an integer.");return(0,n.shadow)(this,"numPages",e)}get destinations(){const e=this._readDests(),t=Object.create(null);if(e instanceof s.NameTree)for(const[r,a]of e.getAll()){const e=fetchDestination(a);e&&(t[r]=e)}else e instanceof a.Dict&&e.forEach((function(e,r){const a=fetchDestination(r);a&&(t[e]=a)}));return(0,n.shadow)(this,"destinations",t)}getDestination(e){const t=this._readDests();if(t instanceof s.NameTree){const r=fetchDestination(t.get(e));if(r)return r;const a=this.destinations[e];if(a){(0,n.warn)(`Found "${e}" at an incorrect position in the NameTree.`);return a}}else if(t instanceof a.Dict){const r=fetchDestination(t.get(e));if(r)return r}return null}_readDests(){const e=this._catDict.get("Names");return e&&e.has("Dests")?new s.NameTree(e.getRaw("Dests"),this.xref):this._catDict.has("Dests")?this._catDict.get("Dests"):void 0}get pageLabels(){let e=null;try{e=this._readPageLabels()}catch(e){if(e instanceof i.MissingDataException)throw e;(0,n.warn)("Unable to read page labels.")}return(0,n.shadow)(this,"pageLabels",e)}_readPageLabels(){const e=this._catDict.getRaw("PageLabels");if(!e)return null;const t=new Array(this.numPages);let r=null,o="";const c=new s.NumberTree(e,this.xref).getAll();let l="",h=1;for(let e=0,s=this.numPages;e=1))throw new n.FormatError("Invalid start in PageLabel dictionary.");h=e}else h=1}switch(r){case"D":l=h;break;case"R":case"r":l=(0,i.toRomanNumerals)(h,"r"===r);break;case"A":case"a":const e=26,t=65,a=97,s="a"===r?a:t,o=h-1,c=String.fromCharCode(s+o%e),u=[];for(let t=0,r=o/e|0;t<=r;t++)u.push(c);l=u.join("");break;default:if(r)throw new n.FormatError(`Invalid style "${r}" in PageLabel dictionary.`);l=""}t[e]=o+l;h++}return t}get pageLayout(){const e=this._catDict.get("PageLayout");let t="";if((0,a.isName)(e))switch(e.name){case"SinglePage":case"OneColumn":case"TwoColumnLeft":case"TwoColumnRight":case"TwoPageLeft":case"TwoPageRight":t=e.name}return(0,n.shadow)(this,"pageLayout",t)}get pageMode(){const e=this._catDict.get("PageMode");let t="UseNone";if((0,a.isName)(e))switch(e.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"FullScreen":case"UseOC":case"UseAttachments":t=e.name}return(0,n.shadow)(this,"pageMode",t)}get viewerPreferences(){const e={HideToolbar:n.isBool,HideMenubar:n.isBool,HideWindowUI:n.isBool,FitWindow:n.isBool,CenterWindow:n.isBool,DisplayDocTitle:n.isBool,NonFullScreenPageMode:a.isName,Direction:a.isName,ViewArea:a.isName,ViewClip:a.isName,PrintArea:a.isName,PrintClip:a.isName,PrintScaling:a.isName,Duplex:a.isName,PickTrayByPDFSize:n.isBool,PrintPageRange:Array.isArray,NumCopies:Number.isInteger},t=this._catDict.get("ViewerPreferences");let r=null;if((0,a.isDict)(t))for(const a in e){if(!t.has(a))continue;const i=t.get(a);if(!e[a](i)){(0,n.info)(`Bad value in ViewerPreferences for "${a}".`);continue}let s;switch(a){case"NonFullScreenPageMode":switch(i.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"UseOC":s=i.name;break;default:s="UseNone"}break;case"Direction":switch(i.name){case"L2R":case"R2L":s=i.name;break;default:s="L2R"}break;case"ViewArea":case"ViewClip":case"PrintArea":case"PrintClip":switch(i.name){case"MediaBox":case"CropBox":case"BleedBox":case"TrimBox":case"ArtBox":s=i.name;break;default:s="CropBox"}break;case"PrintScaling":switch(i.name){case"None":case"AppDefault":s=i.name;break;default:s="AppDefault"}break;case"Duplex":switch(i.name){case"Simplex":case"DuplexFlipShortEdge":case"DuplexFlipLongEdge":s=i.name;break;default:s="None"}break;case"PrintPageRange":if(i.length%2!=0)break;i.every(((e,t,r)=>Number.isInteger(e)&&e>0&&(0===t||e>=r[t-1])&&e<=this.numPages))&&(s=i);break;case"NumCopies":i>0&&(s=i);break;default:if("boolean"!=typeof i)throw new n.FormatError(`viewerPreferences - expected a boolean value for: ${a}`);s=i}if(void 0!==s){r||(r=Object.create(null));r[a]=s}else(0,n.info)(`Bad value in ViewerPreferences for "${a}".`)}return(0,n.shadow)(this,"viewerPreferences",r)}get openAction(){const e=this._catDict.get("OpenAction"),t=Object.create(null);if((0,a.isDict)(e)){const r=new a.Dict(this.xref);r.set("A",e);const i={url:null,dest:null,action:null};Catalog.parseDestDictionary({destDict:r,resultObj:i});Array.isArray(i.dest)?t.dest=i.dest:i.action&&(t.action=i.action)}else Array.isArray(e)&&(t.dest=e);return(0,n.shadow)(this,"openAction",(0,n.objectSize)(t)>0?t:null)}get attachments(){const e=this._catDict.get("Names");let t=null;if(e instanceof a.Dict&&e.has("EmbeddedFiles")){const r=new s.NameTree(e.getRaw("EmbeddedFiles"),this.xref);for(const[e,a]of r.getAll()){const r=new c.FileSpec(a,this.xref);t||(t=Object.create(null));t[(0,n.stringToPDFString)(e)]=r.serializable}}return(0,n.shadow)(this,"attachments",t)}get xfaImages(){const e=this._catDict.get("Names");let t=null;if(e instanceof a.Dict&&e.has("XFAImages")){const r=new s.NameTree(e.getRaw("XFAImages"),this.xref);for(const[e,i]of r.getAll()){t||(t=new a.Dict(this.xref));t.set(e,i)}}return(0,n.shadow)(this,"xfaImages",t)}_collectJavaScript(){const e=this._catDict.get("Names");let t=null;function appendIfJavaScriptDict(e,r){if(!(r instanceof a.Dict))return;if(!(0,a.isName)(r.get("S"),"JavaScript"))return;let i=r.get("JS");if((0,a.isStream)(i))i=i.getString();else if("string"!=typeof i)return;null===t&&(t=new Map);t.set(e,(0,n.stringToPDFString)(i))}if(e instanceof a.Dict&&e.has("JavaScript")){const t=new s.NameTree(e.getRaw("JavaScript"),this.xref);for(const[e,r]of t.getAll())appendIfJavaScriptDict(e,r)}const r=this._catDict.get("OpenAction");r&&appendIfJavaScriptDict("OpenAction",r);return t}get javaScript(){const e=this._collectJavaScript();return(0,n.shadow)(this,"javaScript",e?[...e.values()]:null)}get jsActions(){const e=this._collectJavaScript();let t=(0,i.collectActions)(this.xref,this._catDict,n.DocumentActionEventType);if(e){t||(t=Object.create(null));for(const[r,a]of e)r in t?t[r].push(a):t[r]=[a]}return(0,n.shadow)(this,"jsActions",t)}fontFallback(e,t){const r=[];this.fontCache.forEach((function(e){r.push(e)}));return Promise.all(r).then((r=>{for(const a of r)if(a.loadedName===e){a.fallback(t);return}}))}cleanup(e=!1){(0,a.clearPrimitiveCaches)();this.globalImageCache.clear(e);this.pageKidsCountCache.clear();this.pageIndexCache.clear();this.nonBlendModesSet.clear();const t=[];this.fontCache.forEach((function(e){t.push(e)}));return Promise.all(t).then((e=>{for(const{dict:t}of e)delete t.cacheKey;this.fontCache.clear();this.builtInCMapCache.clear();this.standardFontDataCache.clear()}))}getPageDict(e){const t=(0,n.createPromiseCapability)(),r=[this._catDict.getRaw("Pages")],i=new a.RefSet,s=this.xref,o=this.pageKidsCountCache;let c,l=0;!function next(){for(;r.length;){const h=r.pop();if((0,a.isRef)(h)){c=o.get(h);if(c>0&&l+c=0){const t=h.objId;t&&!o.has(t)&&o.put(t,c);if(l+c<=e){l+=c;continue}}const u=h.get("Kids");if(!Array.isArray(u)){if((0,a.isName)(h.get("Type"),"Page")||!h.has("Type")&&h.has("Contents")){if(l===e){t.resolve([h,null]);return}l++;continue}t.reject(new n.FormatError("Page dictionary kids object is not an array."));return}for(let e=u.length-1;e>=0;e--)r.push(u[e])}t.reject(new Error(`Page index ${e} not found.`))}();return t.promise}getPageIndex(e){const t=this.pageIndexCache.get(e);if(void 0!==t)return Promise.resolve(t);const r=this.xref;let i=0;const next=t=>function pagesBeforeRef(t){let i,s=0;return r.fetchAsync(t).then((function(r){if((0,a.isRefsEqual)(t,e)&&!(0,a.isDict)(r,"Page")&&(!(0,a.isDict)(r)||r.has("Type")||!r.has("Contents")))throw new n.FormatError("The reference does not point to a /Page dictionary.");if(!r)return null;if(!(0,a.isDict)(r))throw new n.FormatError("Node must be a dictionary.");i=r.getRaw("Parent");return r.getAsync("Parent")})).then((function(e){if(!e)return null;if(!(0,a.isDict)(e))throw new n.FormatError("Parent must be a dictionary.");return e.getAsync("Kids")})).then((function(e){if(!e)return null;const o=[];let c=!1;for(let i=0,l=e.length;i{if(!t){this.pageIndexCache.put(e,i);return i}const[r,a]=t;i+=r;return next(a)}));return next(e)}static parseDestDictionary(e){const t=e.destDict;if(!(0,a.isDict)(t)){(0,n.warn)("parseDestDictionary: `destDict` must be a dictionary.");return}const r=e.resultObj;if("object"!=typeof r){(0,n.warn)("parseDestDictionary: `resultObj` must be an object.");return}const s=e.docBaseUrl||null;let o,c,l=t.get("A");if(!(0,a.isDict)(l))if(t.has("Dest"))l=t.get("Dest");else{l=t.get("AA");(0,a.isDict)(l)&&(l.has("D")?l=l.get("D"):l.has("U")&&(l=l.get("U")))}if((0,a.isDict)(l)){const e=l.get("S");if(!(0,a.isName)(e)){(0,n.warn)("parseDestDictionary: Invalid type in Action dictionary.");return}const t=e.name;switch(t){case"ResetForm":const e=l.get("Flags"),s=0==(1&((0,n.isNum)(e)?e:0)),h=[],u=[];for(const e of l.get("Fields")||[])(0,a.isRef)(e)?u.push(e.toString()):(0,n.isString)(e)&&h.push((0,n.stringToPDFString)(e));r.resetForm={fields:h,refs:u,include:s};break;case"URI":o=l.get("URI");o instanceof a.Name&&(o="/"+o.name);break;case"GoTo":c=l.get("D");break;case"Launch":case"GoToR":const d=l.get("F");(0,a.isDict)(d)?o=d.get("F")||null:(0,n.isString)(d)&&(o=d);let f=l.get("D");if(f){(0,a.isName)(f)&&(f=f.name);if((0,n.isString)(o)){const e=o.split("#")[0];(0,n.isString)(f)?o=e+"#"+f:Array.isArray(f)&&(o=e+"#"+JSON.stringify(f))}}const g=l.get("NewWindow");(0,n.isBool)(g)&&(r.newWindow=g);break;case"Named":const p=l.get("N");(0,a.isName)(p)&&(r.action=p.name);break;case"JavaScript":const m=l.get("JS");let b;(0,a.isStream)(m)?b=m.getString():(0,n.isString)(m)&&(b=m);const y=b&&(0,i.recoverJsURL)((0,n.stringToPDFString)(b));if(y){o=y.url;r.newWindow=y.newWindow;break}default:if("JavaScript"===t||"SubmitForm"===t)break;(0,n.warn)(`parseDestDictionary - unsupported action: "${t}".`)}}else t.has("Dest")&&(c=t.get("Dest"));if((0,n.isString)(o)){const e=(0,n.createValidAbsoluteUrl)(o,s,{addDefaultProtocol:!0,tryConvertEncoding:!0});e&&(r.url=e.href);r.unsafeUrl=o}if(c){(0,a.isName)(c)&&(c=c.name);((0,n.isString)(c)||Array.isArray(c))&&(r.dest=c)}}}t.Catalog=Catalog},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.NumberTree=t.NameTree=void 0;var a=r(2),i=r(5);class NameOrNumberTree{constructor(e,t,r){this.constructor===NameOrNumberTree&&(0,a.unreachable)("Cannot initialize NameOrNumberTree.");this.root=e;this.xref=t;this._type=r}getAll(){const e=new Map;if(!this.root)return e;const t=this.xref,r=new i.RefSet;r.put(this.root);const n=[this.root];for(;n.length>0;){const s=t.fetchIfRef(n.shift());if(!(0,i.isDict)(s))continue;if(s.has("Kids")){const e=s.get("Kids");for(let t=0,i=e.length;t10){(0,a.warn)(`Search depth limit reached for "${this._type}" tree.`);return null}const n=r.get("Kids");if(!Array.isArray(n))return null;let s=0,o=n.length-1;for(;s<=o;){const a=s+o>>1,i=t.fetchIfRef(n[a]).get("Limits");if(et.fetchIfRef(i[1]))){r=t.fetchIfRef(n[a]);break}s=a+1}}if(s>o)return null}const n=r.get(this._type);if(Array.isArray(n)){let r=0,a=n.length-2;for(;r<=a;){const i=r+a>>1,s=i+(1&i),o=t.fetchIfRef(n[s]);if(eo))return t.fetchIfRef(n[s+1]);r=s+2}}}return null}}t.NameTree=class NameTree extends NameOrNumberTree{constructor(e,t){super(e,t,"Names")}};t.NumberTree=class NumberTree extends NameOrNumberTree{constructor(e,t){super(e,t,"Nums")}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.FileSpec=void 0;var a=r(5),i=r(2);function pickPlatformItem(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}t.FileSpec=class FileSpec{constructor(e,t){if(e&&(0,a.isDict)(e)){this.xref=t;this.root=e;e.has("FS")&&(this.fs=e.get("FS"));this.description=e.has("Desc")?(0,i.stringToPDFString)(e.get("Desc")):"";e.has("RF")&&(0,i.warn)("Related file specifications are not supported");this.contentAvailable=!0;if(!e.has("EF")){this.contentAvailable=!1;(0,i.warn)("Non-embedded file specifications are not supported")}}}get filename(){if(!this._filename&&this.root){const e=pickPlatformItem(this.root)||"unnamed";this._filename=(0,i.stringToPDFString)(e).replace(/\\\\/g,"\\").replace(/\\\//g,"/").replace(/\\/g,"/")}return this._filename}get content(){if(!this.contentAvailable)return null;!this.contentRef&&this.root&&(this.contentRef=pickPlatformItem(this.root.get("EF")));let e=null;if(this.contentRef){const t=this.xref.fetchIfRef(this.contentRef);t&&(0,a.isStream)(t)?e=t.getBytes():(0,i.warn)("Embedded file specification points to non-existing/invalid content")}else(0,i.warn)("Embedded file specification does not have a content");return e}get serializable(){return{filename:this.filename,content:this.content}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.MetadataParser=void 0;var a=r(68);t.MetadataParser=class MetadataParser{constructor(e){e=this._repair(e);const t=new a.SimpleXMLParser({lowerCaseName:!0}).parseFromString(e);this._metadataMap=new Map;this._data=e;t&&this._parse(t)}_repair(e){return e.replace(/^[^<]+/,"").replace(/>\\376\\377([^<]+)/g,(function(e,t){const r=t.replace(/\\([0-3])([0-7])([0-7])/g,(function(e,t,r,a){return String.fromCharCode(64*t+8*r+1*a)})).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: ${t} isn't defined.`)})),a=[];for(let e=0,t=r.length;e=32&&t<127&&60!==t&&62!==t&&38!==t?a.push(String.fromCharCode(t)):a.push("&#x"+(65536+t).toString(16).substring(1)+";")}return">"+a.join("")}))}_getSequence(e){const t=e.nodeName;return"rdf:bag"!==t&&"rdf:seq"!==t&&"rdf:alt"!==t?null:e.childNodes.filter((e=>"rdf:li"===e.nodeName))}_parseArray(e){if(!e.hasChildNodes())return;const[t]=e.childNodes,r=this._getSequence(t)||[];this._metadataMap.set(e.nodeName,r.map((e=>e.textContent.trim())))}_parse(e){let t=e.documentElement;if("rdf:rdf"!==t.nodeName){t=t.firstChild;for(;t&&"rdf:rdf"!==t.nodeName;)t=t.nextSibling}if(t&&"rdf:rdf"===t.nodeName&&t.hasChildNodes())for(const e of t.childNodes)if("rdf:description"===e.nodeName)for(const t of e.childNodes){const e=t.nodeName;switch(e){case"#text":continue;case"dc:creator":case"dc:subject":this._parseArray(t);continue}this._metadataMap.set(e,t.textContent.trim())}}get serializable(){return{parsedData:this._metadataMap,rawData:this._data}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.XMLParserErrorCode=t.XMLParserBase=t.SimpleXMLParser=t.SimpleDOMNode=void 0;var a=r(9);const i={NoError:0,EndOfDocument:-1,UnterminatedCdat:-2,UnterminatedXmlDeclaration:-3,UnterminatedDoctypeDeclaration:-4,UnterminatedComment:-5,MalformedElement:-6,OutOfMemory:-7,UnterminatedAttributeValue:-8,UnterminatedElement:-9,ElementNeverBegun:-10};t.XMLParserErrorCode=i;function isWhitespace(e,t){const r=e[t];return" "===r||"\n"===r||"\r"===r||"\t"===r}class XMLParserBase{_resolveEntities(e){return e.replace(/&([^;]+);/g,((e,t)=>{if("#x"===t.substring(0,2))return String.fromCodePoint(parseInt(t.substring(2),16));if("#"===t.substring(0,1))return String.fromCodePoint(parseInt(t.substring(1),10));switch(t){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"';case"apos":return"'"}return this.onResolveEntity(t)}))}_parseContent(e,t){const r=[];let a=t;function skipWs(){for(;a"!==e[a]&&"/"!==e[a];)++a;const i=e.substring(t,a);skipWs();for(;a"!==e[a]&&"/"!==e[a]&&"?"!==e[a];){skipWs();let t="",i="";for(;a"!==e[r]&&"?"!==e[r]&&"/"!==e[r];)++r;const a=e.substring(t,r);!function skipWs(){for(;r"!==e[r+1]);)++r;return{name:a,value:e.substring(i,r),parsed:r-t}}parseXml(e){let t=0;for(;t",r);if(t<0){this.onError(i.UnterminatedElement);return}this.onEndElement(e.substring(r,t));r=t+1;break;case"?":++r;const a=this._parseProcessingInstruction(e,r);if("?>"!==e.substring(r+a.parsed,r+a.parsed+2)){this.onError(i.UnterminatedXmlDeclaration);return}this.onPi(a.name,a.value);r+=a.parsed+2;break;case"!":if("--"===e.substring(r+1,r+3)){t=e.indexOf("--\x3e",r+3);if(t<0){this.onError(i.UnterminatedComment);return}this.onComment(e.substring(r+3,t));r=t+3}else if("[CDATA["===e.substring(r+1,r+8)){t=e.indexOf("]]>",r+8);if(t<0){this.onError(i.UnterminatedCdat);return}this.onCdata(e.substring(r+8,t));r=t+3}else{if("DOCTYPE"!==e.substring(r+1,r+8)){this.onError(i.MalformedElement);return}{const a=e.indexOf("[",r+8);let n=!1;t=e.indexOf(">",r+8);if(t<0){this.onError(i.UnterminatedDoctypeDeclaration);return}if(a>0&&t>a){t=e.indexOf("]>",r+8);if(t<0){this.onError(i.UnterminatedDoctypeDeclaration);return}n=!0}const s=e.substring(r+8,t+(n?1:0));this.onDoctype(s);r=t+(n?2:1)}}break;default:const n=this._parseContent(e,r);if(null===n){this.onError(i.MalformedElement);return}let s=!1;if("/>"===e.substring(r+n.parsed,r+n.parsed+2))s=!0;else if(">"!==e.substring(r+n.parsed,r+n.parsed+1)){this.onError(i.UnterminatedElement);return}this.onBeginElement(n.name,n.attributes,s);r+=n.parsed+(s?2:1)}}else{for(;r0}searchNode(e,t){if(t>=e.length)return this;const r=e[t],a=[];let i=this;for(;;){if(r.name===i.nodeName){if(0!==r.pos){if(0===a.length)return null;{const[n]=a.pop();let s=0;for(const a of n.childNodes)if(r.name===a.nodeName){if(s===r.pos)return a.searchNode(e,t+1);s++}return i.searchNode(e,t+1)}}{const r=i.searchNode(e,t+1);if(null!==r)return r}}if(i.childNodes&&0!==i.childNodes.length){a.push([i,0]);i=i.childNodes[0]}else{if(0===a.length)return null;for(;0!==a.length;){const[e,t]=a.pop(),r=t+1;if(r");for(const t of this.childNodes)t.dump(e);e.push(``)}else this.nodeValue?e.push(`>${(0,a.encodeToXmlString)(this.nodeValue)}`):e.push("/>")}else e.push((0,a.encodeToXmlString)(this.nodeValue))}}t.SimpleDOMNode=SimpleDOMNode;t.SimpleXMLParser=class SimpleXMLParser extends XMLParserBase{constructor({hasAttributes:e=!1,lowerCaseName:t=!1}){super();this._currentFragment=null;this._stack=null;this._errorCode=i.NoError;this._hasAttributes=e;this._lowerCaseName=t}parseFromString(e){this._currentFragment=[];this._stack=[];this._errorCode=i.NoError;this.parseXml(e);if(this._errorCode!==i.NoError)return;const[t]=this._currentFragment;return t?{documentElement:t}:void 0}onText(e){if(function isWhitespaceString(e){for(let t=0,r=e.length;t{Object.defineProperty(t,"__esModule",{value:!0});t.StructTreeRoot=t.StructTreePage=void 0;var a=r(5),i=r(2),n=r(65);const s="PAGE_CONTENT",o="STREAM_CONTENT",c="OBJECT",l="ELEMENT";t.StructTreeRoot=class StructTreeRoot{constructor(e){this.dict=e;this.roleMap=new Map}init(){this.readRoleMap()}readRoleMap(){const e=this.dict.get("RoleMap");(0,a.isDict)(e)&&e.forEach(((e,t)=>{(0,a.isName)(t)&&this.roleMap.set(e,t.name)}))}};class StructElementNode{constructor(e,t){this.tree=e;this.dict=t;this.kids=[];this.parseKids()}get role(){const e=this.dict.get("S"),t=(0,a.isName)(e)?e.name:"",{root:r}=this.tree;return r.roleMap.has(t)?r.roleMap.get(t):t}parseKids(){let e=null;const t=this.dict.getRaw("Pg");(0,a.isRef)(t)&&(e=t.toString());const r=this.dict.get("K");if(Array.isArray(r))for(const t of r){const r=this.parseKid(e,t);r&&this.kids.push(r)}else{const t=this.parseKid(e,r);t&&this.kids.push(t)}}parseKid(e,t){if(Number.isInteger(t))return this.tree.pageDict.objId!==e?null:new StructElement({type:s,mcid:t,pageObjId:e});let r=null;(0,a.isRef)(t)?r=this.dict.xref.fetch(t):(0,a.isDict)(t)&&(r=t);if(!r)return null;const i=r.getRaw("Pg");(0,a.isRef)(i)&&(e=i.toString());const n=(0,a.isName)(r.get("Type"))?r.get("Type").name:null;return"MCR"===n?this.tree.pageDict.objId!==e?null:new StructElement({type:o,refObjId:(0,a.isRef)(r.getRaw("Stm"))?r.getRaw("Stm").toString():null,pageObjId:e,mcid:r.get("MCID")}):"OBJR"===n?this.tree.pageDict.objId!==e?null:new StructElement({type:c,refObjId:(0,a.isRef)(r.getRaw("Obj"))?r.getRaw("Obj").toString():null,pageObjId:e}):new StructElement({type:l,dict:r})}}class StructElement{constructor({type:e,dict:t=null,mcid:r=null,pageObjId:a=null,refObjId:i=null}){this.type=e;this.dict=t;this.mcid=r;this.pageObjId=a;this.refObjId=i;this.parentNode=null}}t.StructTreePage=class StructTreePage{constructor(e,t){this.root=e;this.rootDict=e?e.dict:null;this.pageDict=t;this.nodes=[]}parse(){if(!this.root||!this.rootDict)return;const e=this.rootDict.get("ParentTree");if(!e)return;const t=this.pageDict.get("StructParents");if(!Number.isInteger(t))return;const r=new n.NumberTree(e,this.rootDict.xref).get(t);if(!Array.isArray(r))return;const i=new Map;for(const e of r)(0,a.isRef)(e)&&this.addNode(this.rootDict.xref.fetch(e),i)}addNode(e,t,r=0){if(r>40){(0,i.warn)("StructTree MAX_DEPTH reached.");return null}if(t.has(e))return t.get(e);const n=new StructElementNode(this,e);t.set(e,n);const s=e.get("P");if(!s||(0,a.isName)(s.get("Type"),"StructTreeRoot")){this.addTopLevelNode(e,n)||t.delete(e);return n}const o=this.addNode(s,t,r+1);if(!o)return n;let c=!1;for(const t of o.kids)if(t.type===l&&t.dict===e){t.parentNode=n;c=!0}c||t.delete(e);return n}addTopLevelNode(e,t){const r=this.rootDict.get("K");if(!r)return!1;if((0,a.isDict)(r)){if(r.objId!==e.objId)return!1;this.nodes[0]=t;return!0}if(!Array.isArray(r))return!0;let i=!1;for(let a=0;a40){(0,i.warn)("StructTree too deep to be fully serialized.");return}const a=Object.create(null);a.role=e.role;a.children=[];t.children.push(a);const n=e.dict.get("Alt");(0,i.isString)(n)&&(a.alt=(0,i.stringToPDFString)(n));for(const t of e.kids){const e=t.type===l?t.parentNode:null;e?nodeToSerializable(e,a,r+1):t.type===s||t.type===o?a.children.push({type:"content",id:`page${t.pageObjId}_mcid${t.mcid}`}):t.type===c&&a.children.push({type:"object",id:t.refObjId})}}const e=Object.create(null);e.children=[];e.role="Root";for(const t of this.nodes)t&&nodeToSerializable(t,e);return e}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.ObjectLoader=void 0;var a=r(5),i=r(9),n=r(2);function addChildren(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;for(const i of e)((r=i)instanceof a.Ref||r instanceof a.Dict||Array.isArray(r)||(0,a.isStream)(r))&&t.push(i);var r}t.ObjectLoader=class ObjectLoader{constructor(e,t,r){this.dict=e;this.keys=t;this.xref=r;this.refSet=null}async load(){if(this.xref.stream.isDataLoaded)return;const{keys:e,dict:t}=this;this.refSet=new a.RefSet;const r=[];for(let a=0,i=e.length;a{Object.defineProperty(t,"__esModule",{value:!0});t.incrementalUpdate=function incrementalUpdate({originalData:e,xrefInfo:t,newRefs:r,xref:c=null,hasXfa:l=!1,xfaDatasetsRef:h=null,hasXfaDatasetsEntry:u=!1,acroFormRef:d=null,acroForm:f=null,xfaData:g=null}){l&&function updateXFA({xfaData:e,xfaDatasetsRef:t,hasXfaDatasetsEntry:r,acroFormRef:i,acroForm:o,newRefs:c,xref:l,xrefInfo:h}){if(null===l)return;if(!r){if(!i){(0,a.warn)("XFA - Cannot save it");return}const e=o.get("XFA"),r=e.slice();r.splice(2,0,"datasets");r.splice(3,0,t);o.set("XFA",r);const n=l.encrypt;let s=null;n&&(s=n.createCipherTransform(i.num,i.gen));const h=[`${i.num} ${i.gen} obj\n`];writeDict(o,h,s);h.push("\n");o.set("XFA",e);c.push({ref:i,data:h.join("")})}if(null===e){e=function writeXFADataForAcroform(e,t){const r=new s.SimpleXMLParser({hasAttributes:!0}).parseFromString(e);for(const{xfa:e}of t){if(!e)continue;const{path:t,value:i}=e;if(!t)continue;const o=r.documentElement.searchNode((0,n.parseXFAPath)(t),0);o?o.childNodes=[new s.SimpleDOMNode("#text",i)]:(0,a.warn)(`Node not found for path: ${t}`)}const i=[];r.documentElement.dump(i);return i.join("")}(l.fetchIfRef(t).getString(),c)}const u=l.encrypt;if(u){e=u.createCipherTransform(t.num,t.gen).encryptString(e)}const d=`${t.num} ${t.gen} obj\n<< /Type /EmbeddedFile /Length ${e.length}>>\nstream\n`+e+"\nendstream\nendobj\n";c.push({ref:t,data:d})}({xfaData:g,xfaDatasetsRef:h,hasXfaDatasetsEntry:u,acroFormRef:d,acroForm:f,newRefs:r,xref:c,xrefInfo:t});const p=new i.Dict(null),m=t.newRef;let b,y;const w=e[e.length-1];if(10===w||13===w){b=[];y=e.length}else{b=["\n"];y=e.length+1}p.set("Size",m.num+1);p.set("Prev",t.startXRef);p.set("Type",i.Name.get("XRef"));null!==t.rootRef&&p.set("Root",t.rootRef);null!==t.infoRef&&p.set("Info",t.infoRef);null!==t.encryptRef&&p.set("Encrypt",t.encryptRef);r.push({ref:m,data:""});r=r.sort(((e,t)=>e.ref.num-t.ref.num));const S=[[0,1,65535]],x=[0,1];let k=0;for(const{ref:e,data:t}of r){k=Math.max(k,y);S.push([1,y,Math.min(e.gen,65535)]);y+=t.length;x.push(e.num,1);b.push(t)}p.set("Index",x);if(Array.isArray(t.fileIds)&&t.fileIds.length>0){const e=function computeMD5(e,t){const r=Math.floor(Date.now()/1e3),i=t.filename||"",n=[r.toString(),i,e.toString()];let s=n.reduce(((e,t)=>e+t.length),0);for(const e of Object.values(t.info)){n.push(e);s+=e.length}const c=new Uint8Array(s);let l=0;for(const e of n){writeString(e,l,c);l+=e.length}return(0,a.bytesToString)((0,o.calculateMD5)(c))}(y,t);p.set("ID",[t.fileIds[0],e])}const C=[1,Math.ceil(Math.log2(k)/8),2],v=(C[0]+C[1]+C[2])*S.length;p.set("W",C);p.set("Length",v);b.push(`${m.num} ${m.gen} obj\n`);writeDict(p,b,null);b.push(" stream\n");const F=b.reduce(((e,t)=>e+t.length),0),O=`\nendstream\nendobj\nstartxref\n${y}\n%%EOF\n`,T=new Uint8Array(e.length+F+v+O.length);T.set(e);let M=e.length;for(const e of b){writeString(e,M,T);M+=e.length}for(const[e,t,r]of S){M=writeInt(e,C[0],M,T);M=writeInt(t,C[1],M,T);M=writeInt(r,C[2],M,T)}writeString(O,M,T);return T};t.writeDict=writeDict;var a=r(2),i=r(5),n=r(9),s=r(68),o=r(72);function writeDict(e,t,r){t.push("<<");for(const a of e.getKeys()){t.push(` /${(0,n.escapePDFName)(a)} `);writeValue(e.getRaw(a),t,r)}t.push(">>")}function writeValue(e,t,r){if((0,i.isName)(e))t.push(`/${(0,n.escapePDFName)(e.name)}`);else if((0,i.isRef)(e))t.push(`${e.num} ${e.gen} R`);else if(Array.isArray(e))!function writeArray(e,t,r){t.push("[");let a=!0;for(const i of e){a?a=!1:t.push(" ");writeValue(i,t,r)}t.push("]")}(e,t,r);else if("string"==typeof e){null!==r&&(e=r.encryptString(e));t.push(`(${(0,a.escapeString)(e)})`)}else"number"==typeof e?t.push(function numberToString(e){if(Number.isInteger(e))return e.toString();const t=Math.round(100*e);return t%100==0?(t/100).toString():t%10==0?e.toFixed(1):e.toFixed(2)}(e)):"boolean"==typeof e?t.push(e.toString()):(0,i.isDict)(e)?writeDict(e,t,r):(0,i.isStream)(e)?function writeStream(e,t,r){writeDict(e.dict,t,r);t.push(" stream\n");let a=e.getString();null!==r&&(a=r.encryptString(a));t.push(a,"\nendstream\n")}(e,t,r):null===e?t.push("null"):(0,a.warn)(`Unhandled value in writer: ${typeof e}, please file a bug.`)}function writeInt(e,t,r,a){for(let i=t+r-1;i>r-1;i--){a[i]=255&e;e>>=8}return r+t}function writeString(e,t,r){for(let a=0,i=e.length;a{Object.defineProperty(t,"__esModule",{value:!0});t.calculateSHA384=calculateSHA384;t.PDF20=t.PDF17=t.CipherTransformFactory=t.calculateSHA512=t.calculateSHA256=t.calculateMD5=t.ARCFourCipher=t.AES256Cipher=t.AES128Cipher=void 0;var a=r(2),i=r(5),n=r(73);class ARCFourCipher{constructor(e){this.a=0;this.b=0;const t=new Uint8Array(256),r=e.length;for(let e=0;e<256;++e)t[e]=e;for(let a=0,i=0;a<256;++a){const n=t[a];i=i+n+e[a%r]&255;t[a]=t[i];t[i]=n}this.s=t}encryptBlock(e){let t=this.a,r=this.b;const a=this.s,i=e.length,n=new Uint8Array(i);for(let s=0;s>5&255;h[u++]=i>>13&255;h[u++]=i>>21&255;h[u++]=i>>>29&255;h[u++]=0;h[u++]=0;h[u++]=0;const g=new Int32Array(16);for(u=0;u>>32-o)|0;i=n}n=n+i|0;s=s+l|0;o=o+f|0;c=c+p|0}return new Uint8Array([255&n,n>>8&255,n>>16&255,n>>>24&255,255&s,s>>8&255,s>>16&255,s>>>24&255,255&o,o>>8&255,o>>16&255,o>>>24&255,255&c,c>>8&255,c>>16&255,c>>>24&255])}}();t.calculateMD5=s;class Word64{constructor(e,t){this.high=0|e;this.low=0|t}and(e){this.high&=e.high;this.low&=e.low}xor(e){this.high^=e.high;this.low^=e.low}or(e){this.high|=e.high;this.low|=e.low}shiftRight(e){if(e>=32){this.low=this.high>>>e-32|0;this.high=0}else{this.low=this.low>>>e|this.high<<32-e;this.high=this.high>>>e|0}}shiftLeft(e){if(e>=32){this.high=this.low<>>32-e;this.low<<=e}}rotateRight(e){let t,r;if(32&e){r=this.low;t=this.high}else{t=this.low;r=this.high}e&=31;this.low=t>>>e|r<<32-e;this.high=r>>>e|t<<32-e}not(){this.high=~this.high;this.low=~this.low}add(e){const t=(this.low>>>0)+(e.low>>>0);let r=(this.high>>>0)+(e.high>>>0);t>4294967295&&(r+=1);this.low=0|t;this.high=0|r}copyTo(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}assign(e){this.high=e.high;this.low=e.low}}const o=function calculateSHA256Closure(){function rotr(e,t){return e>>>t|e<<32-t}function ch(e,t,r){return e&t^~e&r}function maj(e,t,r){return e&t^e&r^t&r}function sigma(e){return rotr(e,2)^rotr(e,13)^rotr(e,22)}function sigmaPrime(e){return rotr(e,6)^rotr(e,11)^rotr(e,25)}function littleSigma(e){return rotr(e,7)^rotr(e,18)^e>>>3}const e=[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 hash(t,r,a){let i=1779033703,n=3144134277,s=1013904242,o=2773480762,c=1359893119,l=2600822924,h=528734635,u=1541459225;const d=64*Math.ceil((a+9)/64),f=new Uint8Array(d);let g,p;for(g=0;g>>29&255;f[g++]=a>>21&255;f[g++]=a>>13&255;f[g++]=a>>5&255;f[g++]=a<<3&255;const b=new Uint32Array(64);for(g=0;g>>10)+b[p-7]+littleSigma(b[p-15])+b[p-16]|0;let t,r,a=i,d=n,m=s,w=o,S=c,x=l,k=h,C=u;for(p=0;p<64;++p){t=C+sigmaPrime(S)+ch(S,x,k)+e[p]+b[p];r=sigma(a)+maj(a,d,m);C=k;k=x;x=S;S=w+t|0;w=m;m=d;d=a;a=t+r|0}i=i+a|0;n=n+d|0;s=s+m|0;o=o+w|0;c=c+S|0;l=l+x|0;h=h+k|0;u=u+C|0}var y;return new Uint8Array([i>>24&255,i>>16&255,i>>8&255,255&i,n>>24&255,n>>16&255,n>>8&255,255&n,s>>24&255,s>>16&255,s>>8&255,255&s,o>>24&255,o>>16&255,o>>8&255,255&o,c>>24&255,c>>16&255,c>>8&255,255&c,l>>24&255,l>>16&255,l>>8&255,255&l,h>>24&255,h>>16&255,h>>8&255,255&h,u>>24&255,u>>16&255,u>>8&255,255&u])}}();t.calculateSHA256=o;const c=function calculateSHA512Closure(){function ch(e,t,r,a,i){e.assign(t);e.and(r);i.assign(t);i.not();i.and(a);e.xor(i)}function maj(e,t,r,a,i){e.assign(t);e.and(r);i.assign(t);i.and(a);e.xor(i);i.assign(r);i.and(a);e.xor(i)}function sigma(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 sigmaPrime(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 littleSigma(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 littleSigmaPrime(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)}const e=[new Word64(1116352408,3609767458),new Word64(1899447441,602891725),new Word64(3049323471,3964484399),new Word64(3921009573,2173295548),new Word64(961987163,4081628472),new Word64(1508970993,3053834265),new Word64(2453635748,2937671579),new Word64(2870763221,3664609560),new Word64(3624381080,2734883394),new Word64(310598401,1164996542),new Word64(607225278,1323610764),new Word64(1426881987,3590304994),new Word64(1925078388,4068182383),new Word64(2162078206,991336113),new Word64(2614888103,633803317),new Word64(3248222580,3479774868),new Word64(3835390401,2666613458),new Word64(4022224774,944711139),new Word64(264347078,2341262773),new Word64(604807628,2007800933),new Word64(770255983,1495990901),new Word64(1249150122,1856431235),new Word64(1555081692,3175218132),new Word64(1996064986,2198950837),new Word64(2554220882,3999719339),new Word64(2821834349,766784016),new Word64(2952996808,2566594879),new Word64(3210313671,3203337956),new Word64(3336571891,1034457026),new Word64(3584528711,2466948901),new Word64(113926993,3758326383),new Word64(338241895,168717936),new Word64(666307205,1188179964),new Word64(773529912,1546045734),new Word64(1294757372,1522805485),new Word64(1396182291,2643833823),new Word64(1695183700,2343527390),new Word64(1986661051,1014477480),new Word64(2177026350,1206759142),new Word64(2456956037,344077627),new Word64(2730485921,1290863460),new Word64(2820302411,3158454273),new Word64(3259730800,3505952657),new Word64(3345764771,106217008),new Word64(3516065817,3606008344),new Word64(3600352804,1432725776),new Word64(4094571909,1467031594),new Word64(275423344,851169720),new Word64(430227734,3100823752),new Word64(506948616,1363258195),new Word64(659060556,3750685593),new Word64(883997877,3785050280),new Word64(958139571,3318307427),new Word64(1322822218,3812723403),new Word64(1537002063,2003034995),new Word64(1747873779,3602036899),new Word64(1955562222,1575990012),new Word64(2024104815,1125592928),new Word64(2227730452,2716904306),new Word64(2361852424,442776044),new Word64(2428436474,593698344),new Word64(2756734187,3733110249),new Word64(3204031479,2999351573),new Word64(3329325298,3815920427),new Word64(3391569614,3928383900),new Word64(3515267271,566280711),new Word64(3940187606,3454069534),new Word64(4118630271,4000239992),new Word64(116418474,1914138554),new Word64(174292421,2731055270),new Word64(289380356,3203993006),new Word64(460393269,320620315),new Word64(685471733,587496836),new Word64(852142971,1086792851),new Word64(1017036298,365543100),new Word64(1126000580,2618297676),new Word64(1288033470,3409855158),new Word64(1501505948,4234509866),new Word64(1607167915,987167468),new Word64(1816402316,1246189591)];return function hash(t,r,a,i=!1){let n,s,o,c,l,h,u,d;if(i){n=new Word64(3418070365,3238371032);s=new Word64(1654270250,914150663);o=new Word64(2438529370,812702999);c=new Word64(355462360,4144912697);l=new Word64(1731405415,4290775857);h=new Word64(2394180231,1750603025);u=new Word64(3675008525,1694076839);d=new Word64(1203062813,3204075428)}else{n=new Word64(1779033703,4089235720);s=new Word64(3144134277,2227873595);o=new Word64(1013904242,4271175723);c=new Word64(2773480762,1595750129);l=new Word64(1359893119,2917565137);h=new Word64(2600822924,725511199);u=new Word64(528734635,4215389547);d=new Word64(1541459225,327033209)}const f=128*Math.ceil((a+17)/128),g=new Uint8Array(f);let p,m;for(p=0;p>>29&255;g[p++]=a>>21&255;g[p++]=a>>13&255;g[p++]=a>>5&255;g[p++]=a<<3&255;const y=new Array(80);for(p=0;p<80;p++)y[p]=new Word64(0,0);let w=new Word64(0,0),S=new Word64(0,0),x=new Word64(0,0),k=new Word64(0,0),C=new Word64(0,0),v=new Word64(0,0),F=new Word64(0,0),O=new Word64(0,0);const T=new Word64(0,0),M=new Word64(0,0),E=new Word64(0,0),D=new Word64(0,0);let N,L;for(p=0;p=1;--e){r=n[13];n[13]=n[9];n[9]=n[5];n[5]=n[1];n[1]=r;r=n[14];a=n[10];n[14]=n[6];n[10]=n[2];n[6]=r;n[2]=a;r=n[15];a=n[11];i=n[7];n[15]=n[3];n[11]=r;n[7]=a;n[3]=i;for(let e=0;e<16;++e)n[e]=this._inv_s[n[e]];for(let r=0,a=16*e;r<16;++r,++a)n[r]^=t[a];for(let e=0;e<16;e+=4){const t=this._mix[n[e]],a=this._mix[n[e+1]],i=this._mix[n[e+2]],s=this._mix[n[e+3]];r=t^a>>>8^a<<24^i>>>16^i<<16^s>>>24^s<<8;n[e]=r>>>24&255;n[e+1]=r>>16&255;n[e+2]=r>>8&255;n[e+3]=255&r}}r=n[13];n[13]=n[9];n[9]=n[5];n[5]=n[1];n[1]=r;r=n[14];a=n[10];n[14]=n[6];n[10]=n[2];n[6]=r;n[2]=a;r=n[15];a=n[11];i=n[7];n[15]=n[3];n[11]=r;n[7]=a;n[3]=i;for(let e=0;e<16;++e){n[e]=this._inv_s[n[e]];n[e]^=t[e]}return n}_encrypt(e,t){const r=this._s;let a,i,n;const s=new Uint8Array(16);s.set(e);for(let e=0;e<16;++e)s[e]^=t[e];for(let e=1;e=a;--r)if(e[r]!==t){t=0;break}o-=t;n[n.length-1]=e.subarray(0,16-t)}}const c=new Uint8Array(o);for(let e=0,t=0,r=n.length;e=256&&(o=255&(27^o))}for(let t=0;t<4;++t){r[e]=a^=r[e-32];e++;r[e]=i^=r[e-32];e++;r[e]=n^=r[e-32];e++;r[e]=s^=r[e-32];e++}}return r}}t.AES256Cipher=AES256Cipher;class PDF17{checkOwnerPassword(e,t,r,i){const n=new Uint8Array(e.length+56);n.set(e,0);n.set(t,e.length);n.set(r,e.length+t.length);const s=o(n,0,n.length);return(0,a.isArrayEqual)(s,i)}checkUserPassword(e,t,r){const i=new Uint8Array(e.length+8);i.set(e,0);i.set(t,e.length);const n=o(i,0,i.length);return(0,a.isArrayEqual)(n,r)}getOwnerKey(e,t,r,a){const i=new Uint8Array(e.length+56);i.set(e,0);i.set(t,e.length);i.set(r,e.length+t.length);const n=o(i,0,i.length);return new AES256Cipher(n).decryptBlock(a,!1,new Uint8Array(16))}getUserKey(e,t,r){const a=new Uint8Array(e.length+8);a.set(e,0);a.set(t,e.length);const i=o(a,0,a.length);return new AES256Cipher(i).decryptBlock(r,!1,new Uint8Array(16))}}t.PDF17=PDF17;const l=function PDF20Closure(){function calculatePDF20Hash(e,t,r){let a=o(t,0,t.length).subarray(0,32),i=[0],n=0;for(;n<64||i[i.length-1]>n-32;){const t=e.length+a.length+r.length,s=new Uint8Array(t);let l=0;s.set(e,l);l+=e.length;s.set(a,l);l+=a.length;s.set(r,l);const h=new Uint8Array(64*t);for(let e=0,r=0;e<64;e++,r+=t)h.set(s,r);i=new AES128Cipher(a.subarray(0,16)).encrypt(h,a.subarray(16,32));let u=0;for(let e=0;e<16;e++){u*=1;u%=3;u+=(i[e]>>>0)%3;u%=3}0===u?a=o(i,0,i.length):1===u?a=calculateSHA384(i,0,i.length):2===u&&(a=c(i,0,i.length));n++}return a.subarray(0,32)}return class PDF20{hash(e,t,r){return calculatePDF20Hash(e,t,r)}checkOwnerPassword(e,t,r,i){const n=new Uint8Array(e.length+56);n.set(e,0);n.set(t,e.length);n.set(r,e.length+t.length);const s=calculatePDF20Hash(e,n,r);return(0,a.isArrayEqual)(s,i)}checkUserPassword(e,t,r){const i=new Uint8Array(e.length+8);i.set(e,0);i.set(t,e.length);const n=calculatePDF20Hash(e,i,[]);return(0,a.isArrayEqual)(n,r)}getOwnerKey(e,t,r,a){const i=new Uint8Array(e.length+56);i.set(e,0);i.set(t,e.length);i.set(r,e.length+t.length);const n=calculatePDF20Hash(e,i,r);return new AES256Cipher(n).decryptBlock(a,!1,new Uint8Array(16))}getUserKey(e,t,r){const a=new Uint8Array(e.length+8);a.set(e,0);a.set(t,e.length);const i=calculatePDF20Hash(e,a,[]);return new AES256Cipher(i).decryptBlock(r,!1,new Uint8Array(16))}}}();t.PDF20=l;class CipherTransform{constructor(e,t){this.StringCipherConstructor=e;this.StreamCipherConstructor=t}createStream(e,t){const r=new this.StreamCipherConstructor;return new n.DecryptStream(e,t,(function cipherTransformDecryptStream(e,t){return r.decryptBlock(e,t)}))}decryptString(e){const t=new this.StringCipherConstructor;let r=(0,a.stringToBytes)(e);r=t.decryptBlock(r,!0);return(0,a.bytesToString)(r)}encryptString(e){const t=new this.StringCipherConstructor;if(t instanceof AESBaseCipher){const r=16-e.length%16;e+=String.fromCharCode(r).repeat(r);const i=new Uint8Array(16);if("undefined"!=typeof crypto)crypto.getRandomValues(i);else for(let e=0;e<16;e++)i[e]=Math.floor(256*Math.random());let n=(0,a.stringToBytes)(e);n=t.encrypt(n,i);const s=new Uint8Array(16+n.length);s.set(i);s.set(n,16);return(0,a.bytesToString)(s)}let r=(0,a.stringToBytes)(e);r=t.encrypt(r);return(0,a.bytesToString)(r)}}const h=function CipherTransformFactoryClosure(){const 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 prepareKeyData(t,r,a,i,n,o,c,l){const h=40+a.length+t.length,u=new Uint8Array(h);let d,f,g=0;if(r){f=Math.min(32,r.length);for(;g>8&255;u[g++]=n>>16&255;u[g++]=n>>>24&255;for(d=0,f=t.length;d=4&&!l){u[g++]=255;u[g++]=255;u[g++]=255;u[g++]=255}let p=s(u,0,g);const m=c>>3;if(o>=3)for(d=0;d<50;++d)p=s(p,0,m);const b=p.subarray(0,m);let y,w;if(o>=3){for(g=0;g<32;++g)u[g]=e[g];for(d=0,f=t.length;d>8&255;i[o++]=e>>16&255;i[o++]=255&t;i[o++]=t>>8&255;if(a){i[o++]=115;i[o++]=65;i[o++]=108;i[o++]=84}return s(i,0,o).subarray(0,Math.min(r.length+5,16))}function buildCipherConstructor(e,t,r,n,s){if(!(0,i.isName)(t))throw new a.FormatError("Invalid crypt filter name.");const o=e.get(t.name);let c;null!=o&&(c=o.get("CFM"));if(!c||"None"===c.name)return function cipherTransformFactoryBuildCipherConstructorNone(){return new NullCipher};if("V2"===c.name)return function cipherTransformFactoryBuildCipherConstructorV2(){return new ARCFourCipher(buildObjectKey(r,n,s,!1))};if("AESV2"===c.name)return function cipherTransformFactoryBuildCipherConstructorAESV2(){return new AES128Cipher(buildObjectKey(r,n,s,!0))};if("AESV3"===c.name)return function cipherTransformFactoryBuildCipherConstructorAESV3(){return new AES256Cipher(s)};throw new a.FormatError("Unknown crypto method")}return class CipherTransformFactory{constructor(r,n,o){const c=r.get("Filter");if(!(0,i.isName)(c,"Standard"))throw new a.FormatError("unknown encryption method");this.dict=r;const h=r.get("V");if(!Number.isInteger(h)||1!==h&&2!==h&&4!==h&&5!==h)throw new a.FormatError("unsupported encryption algorithm");this.algorithm=h;let u=r.get("Length");if(!u)if(h<=3)u=40;else{const e=r.get("CF"),t=r.get("StmF");if((0,i.isDict)(e)&&(0,i.isName)(t)){e.suppressEncryption=!0;const r=e.get(t.name);u=r&&r.get("Length")||128;u<40&&(u<<=3)}}if(!Number.isInteger(u)||u<40||u%8!=0)throw new a.FormatError("invalid key length");const d=(0,a.stringToBytes)(r.get("O")).subarray(0,32),f=(0,a.stringToBytes)(r.get("U")).subarray(0,32),g=r.get("P"),p=r.get("R"),m=(4===h||5===h)&&!1!==r.get("EncryptMetadata");this.encryptMetadata=m;const b=(0,a.stringToBytes)(n);let y,w;if(o){if(6===p)try{o=(0,a.utf8StringToString)(o)}catch(e){(0,a.warn)("CipherTransformFactory: Unable to convert UTF8 encoded password.")}y=(0,a.stringToBytes)(o)}if(5!==h)w=prepareKeyData(b,y,d,f,g,p,u,m);else{const e=(0,a.stringToBytes)(r.get("O")).subarray(32,40),t=(0,a.stringToBytes)(r.get("O")).subarray(40,48),i=(0,a.stringToBytes)(r.get("U")).subarray(0,48),n=(0,a.stringToBytes)(r.get("U")).subarray(32,40),s=(0,a.stringToBytes)(r.get("U")).subarray(40,48),o=(0,a.stringToBytes)(r.get("OE")),c=(0,a.stringToBytes)(r.get("UE"));(0,a.stringToBytes)(r.get("Perms"));w=function createEncryptionKey20(e,t,r,a,i,n,s,o,c,h,u,d){if(t){const e=Math.min(127,t.length);t=t.subarray(0,e)}else t=[];let f;f=6===e?new l:new PDF17;return f.checkUserPassword(t,o,s)?f.getUserKey(t,c,u):t.length&&f.checkOwnerPassword(t,a,n,r)?f.getOwnerKey(t,i,n,h):null}(p,y,d,e,t,i,f,n,s,o,c)}if(!w&&!o)throw new a.PasswordException("No password given",a.PasswordResponses.NEED_PASSWORD);if(!w&&o){const t=function decodeUserPassword(t,r,a,i){const n=new Uint8Array(32);let o=0;const c=Math.min(32,t.length);for(;o>3;if(a>=3)for(l=0;l<50;++l)h=s(h,0,h.length);let d,f;if(a>=3){f=r;const e=new Uint8Array(u);for(l=19;l>=0;l--){for(let t=0;t=4){const e=r.get("CF");(0,i.isDict)(e)&&(e.suppressEncryption=!0);this.cf=e;this.stmf=r.get("StmF")||t;this.strf=r.get("StrF")||t;this.eff=r.get("EFF")||this.stmf}}createCipherTransform(e,t){if(4===this.algorithm||5===this.algorithm)return new CipherTransform(buildCipherConstructor(this.cf,this.stmf,e,t,this.encryptionKey),buildCipherConstructor(this.cf,this.strf,e,t,this.encryptionKey));const r=buildObjectKey(e,t,this.encryptionKey,!1),a=function buildCipherCipherConstructor(){return new ARCFourCipher(r)};return new CipherTransform(a,a)}}}();t.CipherTransformFactory=h},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.DecryptStream=void 0;var a=r(29);class DecryptStream extends a.DecodeStream{constructor(e,t,r){super(t);this.str=e;this.dict=e.dict;this.decrypt=r;this.nextChunk=null;this.initialized=!1}readBlock(){let e;if(this.initialized)e=this.nextChunk;else{e=this.str.getBytes(512);this.initialized=!0}if(!e||0===e.length){this.eof=!0;return}this.nextChunk=this.str.getBytes(512);const t=this.nextChunk&&this.nextChunk.length>0;e=(0,this.decrypt)(e,!t);let r=this.bufferLength;const a=e.length,i=this.ensureBuffer(r+a);for(let t=0;t{Object.defineProperty(t,"__esModule",{value:!0});t.XFAFactory=void 0;var a=r(75),i=r(79),n=r(85),s=r(83),o=r(76),c=r(2),l=r(86);class XFAFactory{constructor(e){try{this.root=(new l.XFAParser).parse(XFAFactory._createDocument(e));const t=new i.Binder(this.root);this.form=t.bind();this.dataHandler=new n.DataHandler(this.root,t.getData());this.form[a.$globalData].template=this.form}catch(e){(0,c.warn)(`XFA - an error occurred during parsing and binding: ${e}`)}}isValid(){return this.root&&this.form}_createPages(){try{this.pages=this.form[a.$toHTML]();this.dims=this.pages.children.map((e=>{const{width:t,height:r}=e.attributes.style;return[0,0,parseInt(t),parseInt(r)]}))}catch(e){(0,c.warn)(`XFA - an error occurred during layout: ${e}`)}}getBoundingBox(e){return this.dims[e]}get numberPages(){this.pages||this._createPages();return this.dims.length}setImages(e){this.form[a.$globalData].images=e}setFonts(e){this.form[a.$globalData].fontFinder=new s.FontFinder(e);const t=[];for(let e of this.form[a.$globalData].usedTypefaces){e=(0,o.stripQuotes)(e);this.form[a.$globalData].fontFinder.find(e)||t.push(e)}return t.length>0?t:null}appendFonts(e,t){this.form[a.$globalData].fontFinder.add(e,t)}getPages(){this.pages||this._createPages();const e=this.pages;this.pages=null;return e}serializeData(e){return this.dataHandler.serialize(e)}static _createDocument(e){return e["/xdp:xdp"]?Object.values(e).join(""):e["xdp:xdp"]}}t.XFAFactory=XFAFactory},(e,t,r)=>{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.$toString=t.$toHTML=t.$text=t.$tabIndex=t.$setValue=t.$setSetAttributes=t.$setId=t.$searchNode=t.$root=t.$resolvePrototypes=t.$removeChild=t.$pushPara=t.$pushGlyphs=t.$popPara=t.$onText=t.$onChildCheck=t.$onChild=t.$nsAttributes=t.$nodeName=t.$namespaceId=t.$isUsable=t.$isTransparent=t.$isThereMoreWidth=t.$isSplittable=t.$isNsAgnostic=t.$isDescendent=t.$isDataValue=t.$isCDATAXml=t.$isBindable=t.$insertAt=t.$indexOf=t.$ids=t.$hasSettableValue=t.$globalData=t.$getTemplateRoot=t.$getSubformParent=t.$getRealChildrenByNameIt=t.$getParent=t.$getNextPage=t.$getExtra=t.$getDataValue=t.$getContainedChildren=t.$getChildrenByNameIt=t.$getChildrenByName=t.$getChildrenByClass=t.$getChildren=t.$getAvailableSpace=t.$getAttributes=t.$getAttributeIt=t.$flushHTML=t.$finalize=t.$extra=t.$dump=t.$data=t.$content=t.$consumed=t.$clone=t.$cleanup=t.$cleanPage=t.$clean=t.$childrenToHTML=t.$appendChild=t.$addHTML=t.$acceptWhitespace=void 0;var a=r(76),i=r(2),n=r(9),s=r(77),o=r(78);const c=Symbol();t.$acceptWhitespace=c;const l=Symbol();t.$addHTML=l;const h=Symbol();t.$appendChild=h;const u=Symbol();t.$childrenToHTML=u;const d=Symbol();t.$clean=d;const f=Symbol();t.$cleanPage=f;const g=Symbol();t.$cleanup=g;const p=Symbol();t.$clone=p;const m=Symbol();t.$consumed=m;const b=Symbol("content");t.$content=b;const y=Symbol("data");t.$data=y;const w=Symbol();t.$dump=w;const S=Symbol("extra");t.$extra=S;const x=Symbol();t.$finalize=x;const k=Symbol();t.$flushHTML=k;const C=Symbol();t.$getAttributeIt=C;const v=Symbol();t.$getAttributes=v;const F=Symbol();t.$getAvailableSpace=F;const O=Symbol();t.$getChildrenByClass=O;const T=Symbol();t.$getChildrenByName=T;const M=Symbol();t.$getChildrenByNameIt=M;const E=Symbol();t.$getDataValue=E;const D=Symbol();t.$getExtra=D;const N=Symbol();t.$getRealChildrenByNameIt=N;const L=Symbol();t.$getChildren=L;const R=Symbol();t.$getContainedChildren=R;const j=Symbol();t.$getNextPage=j;const $=Symbol();t.$getSubformParent=$;const _=Symbol();t.$getParent=_;const U=Symbol();t.$getTemplateRoot=U;const X=Symbol();t.$globalData=X;const H=Symbol();t.$hasSettableValue=H;const q=Symbol();t.$ids=q;const z=Symbol();t.$indexOf=z;const W=Symbol();t.$insertAt=W;const G=Symbol();t.$isCDATAXml=G;const V=Symbol();t.$isBindable=V;const K=Symbol();t.$isDataValue=K;const Y=Symbol();t.$isDescendent=Y;const J=Symbol();t.$isNsAgnostic=J;const Z=Symbol();t.$isSplittable=Z;const Q=Symbol();t.$isThereMoreWidth=Q;const ee=Symbol();t.$isTransparent=ee;const te=Symbol();t.$isUsable=te;const re=Symbol(),ae=Symbol("namespaceId");t.$namespaceId=ae;const ie=Symbol("nodeName");t.$nodeName=ie;const ne=Symbol();t.$nsAttributes=ne;const se=Symbol();t.$onChild=se;const oe=Symbol();t.$onChildCheck=oe;const ce=Symbol();t.$onText=ce;const le=Symbol();t.$pushGlyphs=le;const he=Symbol();t.$popPara=he;const ue=Symbol();t.$pushPara=ue;const de=Symbol();t.$removeChild=de;const fe=Symbol("root");t.$root=fe;const ge=Symbol();t.$resolvePrototypes=ge;const pe=Symbol();t.$searchNode=pe;const me=Symbol();t.$setId=me;const be=Symbol();t.$setSetAttributes=be;const ye=Symbol();t.$setValue=ye;const we=Symbol();t.$tabIndex=we;const Se=Symbol();t.$text=Se;const xe=Symbol();t.$toHTML=xe;const ke=Symbol();t.$toString=ke;const Ae=Symbol();t.$toStyle=Ae;const Ce=Symbol("uid");t.$uid=Ce;const ve=Symbol(),Fe=Symbol(),Oe=Symbol(),Te=Symbol("_children"),Ie=Symbol(),Pe=Symbol(),Me=Symbol(),Ee=Symbol(),De=Symbol(),Be=Symbol(),Ne=Symbol(),Le=Symbol(),Re=Symbol(),je=Symbol("parent"),$e=Symbol(),_e=Symbol(),Ue=Symbol();let Xe=0;const He=s.NamespaceIds.datasets.id;class XFAObject{constructor(e,t,r=!1){this[ae]=e;this[ie]=t;this[Ne]=r;this[je]=null;this[Te]=[];this[Ce]=`${t}${Xe++}`;this[X]=null}[se](e){if(!this[Ne]||!this[oe](e))return!1;const t=e[ie],r=this[t];if(!(r instanceof XFAObjectArray)){null!==r&&this[de](r);this[t]=e;this[h](e);return!0}if(r.push(e)){this[h](e);return!0}let a="";this.id?a=` (id: ${this.id})`:this.name&&(a=` (name: ${this.name} ${this.h.value})`);(0,i.warn)(`XFA - node "${this[ie]}"${a} has already enough "${t}"!`);return!1}[oe](e){return this.hasOwnProperty(e[ie])&&e[ae]===this[ae]}[J](){return!1}[c](){return!1}[G](){return!1}[V](){return!1}[he](){this.para&&this[U]()[S].paraStack.pop()}[ue](){this[U]()[S].paraStack.push(this.para)}[me](e){this.id&&this[ae]===s.NamespaceIds.template.id&&e.set(this.id,this)}[U](){return this[X].template}[Z](){return!1}[Q](){return!1}[h](e){e[je]=this;this[Te].push(e);!e[X]&&this[X]&&(e[X]=this[X])}[de](e){const t=this[Te].indexOf(e);this[Te].splice(t,1)}[H](){return this.hasOwnProperty("value")}[ye](e){}[ce](e){}[x](){}[d](e){delete this[Ne];if(this[g]){e.clean(this[g]);delete this[g]}}[z](e){return this[Te].indexOf(e)}[W](e,t){t[je]=this;this[Te].splice(e,0,t);!t[X]&&this[X]&&(t[X]=this[X])}[ee](){return!this.name}[re](){return""}[Se](){return 0===this[Te].length?this[b]:this[Te].map((e=>e[Se]())).join("")}get[Oe](){const e=Object.getPrototypeOf(this);if(!e._attributes){const t=e._attributes=new Set;for(const e of Object.getOwnPropertyNames(this)){if(null===this[e]||this[e]instanceof XFAObject||this[e]instanceof XFAObjectArray)break;t.add(e)}}return(0,i.shadow)(this,Oe,e._attributes)}[Y](e){let t=this;for(;t;){if(t===e)return!0;t=t[_]()}return!1}[_](){return this[je]}[$](){return this[_]()}[L](e=null){return e?this[e]:this[Te]}[w](){const e=Object.create(null);this[b]&&(e.$content=this[b]);for(const t of Object.getOwnPropertyNames(this)){const r=this[t];null!==r&&(r instanceof XFAObject?e[t]=r[w]():r instanceof XFAObjectArray?r.isEmpty()||(e[t]=r.dump()):e[t]=r)}return e}[Ae](){return null}[xe](){return a.HTMLResult.EMPTY}*[R](){for(const e of this[L]())yield e}*[Ee](e,t){for(const r of this[R]())if(!e||t===e.has(r[ie])){const e=this[F](),t=r[xe](e);t.success||(this[S].failingNode=r);yield t}}[k](){return null}[l](e,t){this[S].children.push(e)}[F](){}[u]({filter:e=null,include:t=!0}){if(this[S].generator){const e=this[F](),t=this[S].failingNode[xe](e);if(!t.success)return t;t.html&&this[l](t.html,t.bbox);delete this[S].failingNode}else this[S].generator=this[Ee](e,t);for(;;){const e=this[S].generator.next();if(e.done)break;const t=e.value;if(!t.success)return t;t.html&&this[l](t.html,t.bbox)}this[S].generator=null;return a.HTMLResult.EMPTY}[be](e){this[_e]=new Set(Object.keys(e))}[Be](e){const t=this[Oe],r=this[_e];return[...e].filter((e=>t.has(e)&&!r.has(e)))}[ge](e,t=new Set){for(const r of this[Te])r[$e](e,t)}[$e](e,t){const r=this[De](e,t);r?this[ve](r,e,t):this[ge](e,t)}[De](e,t){const{use:r,usehref:a}=this;if(!r&&!a)return null;let n=null,s=null,c=null,l=r;if(a){l=a;a.startsWith("#som(")&&a.endsWith(")")?s=a.slice("#som(".length,a.length-1):a.startsWith(".#som(")&&a.endsWith(")")?s=a.slice(".#som(".length,a.length-1):a.startsWith("#")?c=a.slice(1):a.startsWith(".#")&&(c=a.slice(2))}else r.startsWith("#")?c=r.slice(1):s=r;this.use=this.usehref="";if(c)n=e.get(c);else{n=(0,o.searchNode)(e.get(fe),this,s,!0,!1);n&&(n=n[0])}if(!n){(0,i.warn)(`XFA - Invalid prototype reference: ${l}.`);return null}if(n[ie]!==this[ie]){(0,i.warn)(`XFA - Incompatible prototype: ${n[ie]} !== ${this[ie]}.`);return null}if(t.has(n)){(0,i.warn)("XFA - Cycle detected in prototypes use.");return null}t.add(n);const h=n[De](e,t);h&&n[ve](h,e,t);n[ge](e,t);t.delete(n);return n}[ve](e,t,r){if(r.has(e)){(0,i.warn)("XFA - Cycle detected in prototypes use.");return}!this[b]&&e[b]&&(this[b]=e[b]);new Set(r).add(e);for(const t of this[Be](e[_e])){this[t]=e[t];this[_e]&&this[_e].add(t)}for(const a of Object.getOwnPropertyNames(this)){if(this[Oe].has(a))continue;const i=this[a],n=e[a];if(i instanceof XFAObjectArray){for(const e of i[Te])e[$e](t,r);for(let a=i[Te].length,s=n[Te].length;aXFAObject[Ie](e))):"object"==typeof e&&null!==e?Object.assign({},e):e}[p](){const e=Object.create(Object.getPrototypeOf(this));for(const t of Object.getOwnPropertySymbols(this))try{e[t]=this[t]}catch(r){(0,i.shadow)(e,t,this[t])}e[Ce]=`${e[ie]}${Xe++}`;e[Te]=[];for(const t of Object.getOwnPropertyNames(this)){if(this[Oe].has(t)){e[t]=XFAObject[Ie](this[t]);continue}const r=this[t];e[t]=r instanceof XFAObjectArray?new XFAObjectArray(r[Le]):null}for(const t of this[Te]){const r=t[ie],a=t[p]();e[Te].push(a);a[je]=e;null===e[r]?e[r]=a:e[r][Te].push(a)}return e}[L](e=null){return e?this[Te].filter((t=>t[ie]===e)):this[Te]}[O](e){return this[e]}[T](e,t,r=!0){return Array.from(this[M](e,t,r))}*[M](e,t,r=!0){if("parent"!==e){for(const r of this[Te]){r[ie]===e&&(yield r);r.name===e&&(yield r);(t||r[ee]())&&(yield*r[M](e,t,!1))}r&&this[Oe].has(e)&&(yield new XFAAttribute(this,e,this[e]))}else yield this[je]}}t.XFAObject=XFAObject;class XFAObjectArray{constructor(e=1/0){this[Le]=e;this[Te]=[]}push(e){if(this[Te].length<=this[Le]){this[Te].push(e);return!0}(0,i.warn)(`XFA - node "${e[ie]}" accepts no more than ${this[Le]} children`);return!1}isEmpty(){return 0===this[Te].length}dump(){return 1===this[Te].length?this[Te][0][w]():this[Te].map((e=>e[w]()))}[p](){const e=new XFAObjectArray(this[Le]);e[Te]=this[Te].map((e=>e[p]()));return e}get children(){return this[Te]}clear(){this[Te].length=0}}t.XFAObjectArray=XFAObjectArray;class XFAAttribute{constructor(e,t,r){this[je]=e;this[ie]=t;this[b]=r;this[m]=!1;this[Ce]="attribute"+Xe++}[_](){return this[je]}[K](){return!0}[E](){return this[b].trim()}[ye](e){e=e.value||"";this[b]=e.toString()}[Se](){return this[b]}[Y](e){return this[je]===e||this[je][Y](e)}}t.XFAAttribute=XFAAttribute;class XmlObject extends XFAObject{constructor(e,t,r={}){super(e,t);this[b]="";this[Pe]=null;if("#text"!==t){const e=new Map;this[Fe]=e;for(const[t,a]of Object.entries(r))e.set(t,new XFAAttribute(this,t,a));if(r.hasOwnProperty(ne)){const e=r[ne].xfa.dataNode;void 0!==e&&("dataGroup"===e?this[Pe]=!1:"dataValue"===e&&(this[Pe]=!0))}}this[m]=!1}[ke](e){const t=this[ie];if("#text"===t){e.push((0,n.encodeToXmlString)(this[b]));return}const r=this[ae]===He?"xfa:":"";e.push(`<${r}${t}`);for(const[t,r]of this[Fe].entries())e.push(` ${t}="${(0,n.encodeToXmlString)(r[b])}"`);null!==this[Pe]&&(this[Pe]?e.push(' xfa:dataNode="dataValue"'):e.push(' xfa:dataNode="dataGroup"'));if(this[b]||0!==this[Te].length){e.push(">");if(this[b])"string"==typeof this[b]?e.push((0,n.encodeToXmlString)(this[b])):this[b][ke](e);else for(const t of this[Te])t[ke](e);e.push(``)}else e.push("/>")}[se](e){if(this[b]){const e=new XmlObject(this[ae],"#text");this[h](e);e[b]=this[b];this[b]=""}this[h](e);return!0}[ce](e){this[b]+=e}[x](){if(this[b]&&this[Te].length>0){const e=new XmlObject(this[ae],"#text");this[h](e);e[b]=this[b];delete this[b]}}[xe](){return"#text"===this[ie]?a.HTMLResult.success({name:"#text",value:this[b]}):a.HTMLResult.EMPTY}[L](e=null){return e?this[Te].filter((t=>t[ie]===e)):this[Te]}[v](){return this[Fe]}[O](e){const t=this[Fe].get(e);return void 0!==t?t:this[L](e)}*[M](e,t){const r=this[Fe].get(e);r&&(yield r);for(const r of this[Te]){r[ie]===e&&(yield r);t&&(yield*r[M](e,t))}}*[C](e,t){const r=this[Fe].get(e);!r||t&&r[m]||(yield r);for(const r of this[Te])yield*r[C](e,t)}*[N](e,t,r){for(const a of this[Te]){a[ie]!==e||r&&a[m]||(yield a);t&&(yield*a[N](e,t,r))}}[K](){return null===this[Pe]?0===this[Te].length||this[Te][0][ae]===s.NamespaceIds.xhtml.id:this[Pe]}[E](){return null===this[Pe]?0===this[Te].length?this[b].trim():this[Te][0][ae]===s.NamespaceIds.xhtml.id?this[Te][0][Se]().trim():null:this[b].trim()}[ye](e){e=e.value||"";this[b]=e.toString()}[w](e=!1){const t=Object.create(null);e&&(t.$ns=this[ae]);this[b]&&(t.$content=this[b]);t.$name=this[ie];t.children=[];for(const r of this[Te])t.children.push(r[w](e));t.attributes=Object.create(null);for(const[e,r]of this[Fe])t.attributes[e]=r[b];return t}}t.XmlObject=XmlObject;class ContentObject extends XFAObject{constructor(e,t){super(e,t);this[b]=""}[ce](e){this[b]+=e}[x](){}}t.ContentObject=ContentObject;t.OptionObject=class OptionObject extends ContentObject{constructor(e,t,r){super(e,t);this[Re]=r}[x](){this[b]=(0,a.getKeyword)({data:this[b],defaultValue:this[Re][0],validate:e=>this[Re].includes(e)})}[d](e){super[d](e);delete this[Re]}};t.StringObject=class StringObject extends ContentObject{[x](){this[b]=this[b].trim()}};class IntegerObject extends ContentObject{constructor(e,t,r,a){super(e,t);this[Me]=r;this[Ue]=a}[x](){this[b]=(0,a.getInteger)({data:this[b],defaultValue:this[Me],validate:this[Ue]})}[d](e){super[d](e);delete this[Me];delete this[Ue]}}t.IntegerObject=IntegerObject;t.Option01=class Option01 extends IntegerObject{constructor(e,t){super(e,t,0,(e=>1===e))}};t.Option10=class Option10 extends IntegerObject{constructor(e,t){super(e,t,1,(e=>0===e))}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.getBBox=function getBBox(e){const t=-1;if(!e)return{x:t,y:t,width:t,height:t};const r=e.trim().split(/\s*,\s*/).map((e=>getMeasurement(e,"-1")));if(r.length<4||r[2]<0||r[3]<0)return{x:t,y:t,width:t,height:t};const[a,i,n,s]=r;return{x:a,y:i,width:n,height:s}};t.getColor=function getColor(e,t=[0,0,0]){let[r,a,i]=t;if(!e)return{r:r,g:a,b:i};const n=e.trim().split(/\s*,\s*/).map((e=>Math.min(Math.max(0,parseInt(e.trim(),10)),255))).map((e=>isNaN(e)?0:e));if(n.length<3)return{r:r,g:a,b:i};[r,a,i]=n;return{r:r,g:a,b:i}};t.getFloat=function getFloat({data:e,defaultValue:t,validate:r}){if(!e)return t;e=e.trim();const a=parseFloat(e);if(!isNaN(a)&&r(a))return a;return t};t.getInteger=function getInteger({data:e,defaultValue:t,validate:r}){if(!e)return t;e=e.trim();const a=parseInt(e,10);if(!isNaN(a)&&r(a))return a;return t};t.getKeyword=getKeyword;t.getMeasurement=getMeasurement;t.getRatio=function getRatio(e){if(!e)return{num:1,den:1};const t=e.trim().split(/\s*:\s*/).map((e=>parseFloat(e))).filter((e=>!isNaN(e)));1===t.length&&t.push(1);if(0===t.length)return{num:1,den:1};const[r,a]=t;return{num:r,den:a}};t.getRelevant=function getRelevant(e){if(!e)return[];return e.trim().split(/\s+/).map((e=>({excluded:"-"===e[0],viewname:e.substring(1)})))};t.getStringOption=function getStringOption(e,t){return getKeyword({data:e,defaultValue:t[0],validate:e=>t.includes(e)})};t.stripQuotes=function stripQuotes(e){if(e.startsWith("'")||e.startsWith('"'))return e.slice(1,e.length-1);return e};t.HTMLResult=void 0;var a=r(2);const i={pt:e=>e,cm:e=>e/2.54*72,mm:e=>e/25.4*72,in:e=>72*e,px:e=>e},n=/([+-]?\d+\.?\d*)(.*)/;function getKeyword({data:e,defaultValue:t,validate:r}){return e&&r(e=e.trim())?e:t}function getMeasurement(e,t="0"){t=t||"0";if(!e)return getMeasurement(t);const r=e.trim().match(n);if(!r)return getMeasurement(t);const[,a,s]=r,o=parseFloat(a);if(isNaN(o))return getMeasurement(t);if(0===o)return 0;const c=i[s];return c?c(o):o}class HTMLResult{static get FAILURE(){return(0,a.shadow)(this,"FAILURE",new HTMLResult(!1,null,null,null))}static get EMPTY(){return(0,a.shadow)(this,"EMPTY",new HTMLResult(!0,null,null,null))}constructor(e,t,r,a){this.success=e;this.html=t;this.bbox=r;this.breakNode=a}isBreak(){return!!this.breakNode}static breakNode(e){return new HTMLResult(!1,null,null,e)}static success(e,t=null){return new HTMLResult(!0,e,t,null)}}t.HTMLResult=HTMLResult},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.NamespaceIds=t.$buildXFAObject=void 0;const r=Symbol();t.$buildXFAObject=r;t.NamespaceIds={config:{id:0,check:e=>e.startsWith("http://www.xfa.org/schema/xci/")},connectionSet:{id:1,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-connection-set/")},datasets:{id:2,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-data/")},form:{id:3,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-form/")},localeSet:{id:4,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-locale-set/")},pdf:{id:5,check:e=>"http://ns.adobe.com/xdp/pdf/"===e},signature:{id:6,check:e=>"http://www.w3.org/2000/09/xmldsig#"===e},sourceSet:{id:7,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-source-set/")},stylesheet:{id:8,check:e=>"http://www.w3.org/1999/XSL/Transform"===e},template:{id:9,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-template/")},xdc:{id:10,check:e=>e.startsWith("http://www.xfa.org/schema/xdc/")},xdp:{id:11,check:e=>"http://ns.adobe.com/xdp/"===e},xfdf:{id:12,check:e=>"http://ns.adobe.com/xfdf/"===e},xhtml:{id:13,check:e=>"http://www.w3.org/1999/xhtml"===e},xmpmeta:{id:14,check:e=>"http://ns.adobe.com/xmpmeta/"===e}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.createDataNode=function createDataNode(e,t,r){const i=parseExpression(r);if(!i)return null;if(i.some((e=>e.operator===l)))return null;const s=f.get(i[0].name);let o=0;if(s){e=s(e,t);o=1}else e=t||e;for(let t=i.length;o0&&p.push(e)}if(0!==p.length||u||0!==d)e=isFinite(f)?p.filter((e=>fe[f])):p.reduce(((e,t)=>e.concat(t)),[]);else{const r=t[a.$getParent]();if(!(t=r))return null;d=-1;e=[t]}}if(0===e.length)return null;return e};var a=r(75),i=r(77),n=r(2);const s=/^[^.[]+/,o=/^[^\]]+/,c=0,l=1,h=2,u=3,d=4,f=new Map([["$data",(e,t)=>e.datasets?e.datasets.data:e],["$record",(e,t)=>(e.datasets?e.datasets.data:e)[a.$getChildren]()[0]],["$template",(e,t)=>e.template],["$connectionSet",(e,t)=>e.connectionSet],["$form",(e,t)=>e.form],["$layout",(e,t)=>e.layout],["$host",(e,t)=>e.host],["$dataWindow",(e,t)=>e.dataWindow],["$event",(e,t)=>e.event],["!",(e,t)=>e.datasets],["$xfa",(e,t)=>e],["xfa",(e,t)=>e],["$",(e,t)=>t]]),g=new WeakMap,p=i.NamespaceIds.datasets.id;function parseExpression(e,t,r=!0){let a=e.match(s);if(!a)return null;let[i]=a;const f=[{name:i,cacheName:"."+i,index:0,js:null,formCalc:null,operator:c}];let g=i.length;for(;g{Object.defineProperty(t,"__esModule",{value:!0});t.Binder=void 0;var a=r(75),i=r(80),n=r(78),s=r(77),o=r(2);const c=s.NamespaceIds.datasets.id;function createText(e){const t=new i.Text({});t[a.$content]=e;return t}t.Binder=class Binder{constructor(e){this.root=e;this.datasets=e.datasets;e.datasets&&e.datasets.data?this.data=e.datasets.data:this.data=new a.XmlObject(s.NamespaceIds.datasets.id,"data");this.emptyMerge=0===this.data[a.$getChildren]().length;this.root.form=this.form=e.template[a.$clone]()}_isConsumeData(){return!this.emptyMerge&&this._mergeMode}_isMatchTemplate(){return!this._isConsumeData()}bind(){this._bindElement(this.form,this.data);return this.form}getData(){return this.data}_bindValue(e,t,r){e[a.$data]=t;if(e[a.$hasSettableValue]())if(t[a.$isDataValue]()){const r=t[a.$getDataValue]();e[a.$setValue](createText(r))}else if(e instanceof i.Field&&e.ui&&e.ui.choiceList&&"multiSelect"===e.ui.choiceList.open){const r=t[a.$getChildren]().map((e=>e[a.$content].trim())).join("\n");e[a.$setValue](createText(r))}else this._isConsumeData()&&(0,o.warn)("XFA - Nodes haven't the same type.");else!t[a.$isDataValue]()||this._isMatchTemplate()?this._bindElement(e,t):(0,o.warn)("XFA - Nodes haven't the same type.")}_findDataByNameToConsume(e,t,r,i){if(!e)return null;let n,o;for(let i=0;i<3;i++){n=r[a.$getRealChildrenByNameIt](e,!1,!0);for(;;){o=n.next().value;if(!o)break;if(t===o[a.$isDataValue]())return o}if(r[a.$namespaceId]===s.NamespaceIds.datasets.id&&"data"===r[a.$nodeName])break;r=r[a.$getParent]()}if(!i)return null;n=this.data[a.$getRealChildrenByNameIt](e,!0,!1);o=n.next().value;if(o)return o;n=this.data[a.$getAttributeIt](e,!0);o=n.next().value;return o&&o[a.$isDataValue]()?o:null}_setProperties(e,t){if(e.hasOwnProperty("setProperty"))for(const{ref:r,target:s,connection:c}of e.setProperty.children){if(c)continue;if(!r)continue;const l=(0,n.searchNode)(this.root,t,r,!1,!1);if(!l){(0,o.warn)(`XFA - Invalid reference: ${r}.`);continue}const[h]=l;if(!h[a.$isDescendent](this.data)){(0,o.warn)("XFA - Invalid node: must be a data node.");continue}const u=(0,n.searchNode)(this.root,e,s,!1,!1);if(!u){(0,o.warn)(`XFA - Invalid target: ${s}.`);continue}const[d]=u;if(!d[a.$isDescendent](e)){(0,o.warn)("XFA - Invalid target: must be a property or subproperty.");continue}const f=d[a.$getParent]();if(d instanceof i.SetProperty||f instanceof i.SetProperty){(0,o.warn)("XFA - Invalid target: cannot be a setProperty or one of its properties.");continue}if(d instanceof i.BindItems||f instanceof i.BindItems){(0,o.warn)("XFA - Invalid target: cannot be a bindItems or one of its properties.");continue}const g=h[a.$text](),p=d[a.$nodeName];if(d instanceof a.XFAAttribute){const e=Object.create(null);e[p]=g;const t=Reflect.construct(Object.getPrototypeOf(f).constructor,[e]);f[p]=t[p]}else if(d.hasOwnProperty(a.$content)){d[a.$data]=h;d[a.$content]=g;d[a.$finalize]()}else(0,o.warn)("XFA - Invalid node to use in setProperty")}}_bindItems(e,t){if(!e.hasOwnProperty("items")||!e.hasOwnProperty("bindItems")||e.bindItems.isEmpty())return;for(const t of e.items.children)e[a.$removeChild](t);e.items.clear();const r=new i.Items({}),s=new i.Items({});e[a.$appendChild](r);e.items.push(r);e[a.$appendChild](s);e.items.push(s);for(const{ref:i,labelRef:c,valueRef:l,connection:h}of e.bindItems.children){if(h)continue;if(!i)continue;const e=(0,n.searchNode)(this.root,t,i,!1,!1);if(e)for(const t of e){if(!t[a.$isDescendent](this.datasets)){(0,o.warn)(`XFA - Invalid ref (${i}): must be a datasets child.`);continue}const e=(0,n.searchNode)(this.root,t,c,!0,!1);if(!e){(0,o.warn)(`XFA - Invalid label: ${c}.`);continue}const[h]=e;if(!h[a.$isDescendent](this.datasets)){(0,o.warn)("XFA - Invalid label: must be a datasets child.");continue}const u=(0,n.searchNode)(this.root,t,l,!0,!1);if(!u){(0,o.warn)(`XFA - Invalid value: ${l}.`);continue}const[d]=u;if(!d[a.$isDescendent](this.datasets)){(0,o.warn)("XFA - Invalid value: must be a datasets child.");continue}const f=createText(h[a.$text]()),g=createText(d[a.$text]());r[a.$appendChild](f);r.text.push(f);s[a.$appendChild](g);s.text.push(g)}else(0,o.warn)(`XFA - Invalid reference: ${i}.`)}}_bindOccurrences(e,t,r){let i;if(t.length>1){i=e[a.$clone]();i[a.$removeChild](i.occur);i.occur=null}this._bindValue(e,t[0],r);this._setProperties(e,t[0]);this._bindItems(e,t[0]);if(1===t.length)return;const n=e[a.$getParent](),s=e[a.$nodeName],o=n[a.$indexOf](e);for(let e=1,c=t.length;et.name===e.name)).length:r[i].children.length;const s=r[a.$indexOf](e)+1,o=t.initial-n;if(o){const t=e[a.$clone]();t[a.$removeChild](t.occur);t.occur=null;r[i].push(t);r[a.$insertAt](s,t);for(let e=1;e0)this._bindOccurrences(i,[e[0]],null);else if(this.emptyMerge){const e=t[a.$namespaceId]===c?-1:t[a.$namespaceId],r=i[a.$data]=new a.XmlObject(e,i.name||"root");t[a.$appendChild](r);this._bindElement(i,r)}continue}if(!i[a.$isBindable]())continue;let e=!1,s=null,l=null,h=null;if(i.bind){switch(i.bind.match){case"none":this._setAndBind(i,t);continue;case"global":e=!0;break;case"dataRef":if(!i.bind.ref){(0,o.warn)(`XFA - ref is empty in node ${i[a.$nodeName]}.`);this._setAndBind(i,t);continue}l=i.bind.ref}i.bind.picture&&(s=i.bind.picture[a.$content])}const[u,d]=this._getOccurInfo(i);if(l){h=(0,n.searchNode)(this.root,t,l,!0,!1);if(null===h){h=(0,n.createDataNode)(this.data,t,l);if(!h)continue;this._isConsumeData()&&(h[a.$consumed]=!0);this._setAndBind(i,h);continue}this._isConsumeData()&&(h=h.filter((e=>!e[a.$consumed])));h.length>d?h=h.slice(0,d):0===h.length&&(h=null);h&&this._isConsumeData()&&h.forEach((e=>{e[a.$consumed]=!0}))}else{if(!i.name){this._setAndBind(i,t);continue}if(this._isConsumeData()){const r=[];for(;r.length0?r:null}else{h=t[a.$getRealChildrenByNameIt](i.name,!1,this.emptyMerge).next().value;if(!h){const e=t[a.$namespaceId]===c?-1:t[a.$namespaceId];h=i[a.$data]=new a.XmlObject(e,i.name);this.emptyMerge&&(h[a.$consumed]=!0);t[a.$appendChild](h);this._setAndBind(i,h);continue}this.emptyMerge&&(h[a.$consumed]=!0);h=[h]}}h?this._bindOccurrences(i,h,s):u>0?this._setAndBind(i,t):r.push(i)}r.forEach((e=>e[a.$getParent]()[a.$removeChild](e)))}}},(e,t,r)=>{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(75),i=r(77),n=r(81),s=r(82),o=r(76),c=r(2),l=r(83),h=r(9),u=r(78);const d=i.NamespaceIds.template.id,f="http://www.w3.org/2000/svg",g=/^H(\d+)$/,p=new Set(["image/gif","image/jpeg","image/jpg","image/pjpeg","image/png","image/apng","image/x-png","image/bmp","image/x-ms-bmp","image/tiff","image/tif"]),m=[[[66,77],"image/bmp"],[[255,216,255],"image/jpeg"],[[73,73,42,0],"image/tiff"],[[77,77,0,42],"image/tiff"],[[71,73,70,56,57,97],"image/gif"],[[137,80,78,71,13,10,26,10],"image/png"]];function getBorderDims(e){if(!e||!e.border)return{w:0,h:0};const t=e.border[a.$getExtra]();return t?{w:t.widths[0]+t.widths[2]+t.insets[0]+t.insets[2],h:t.widths[1]+t.widths[3]+t.insets[1]+t.insets[3]}:{w:0,h:0}}function hasMargin(e){return e.margin&&(e.margin.topInset||e.margin.rightInset||e.margin.bottomInset||e.margin.leftInset)}function _setValue(e,t){if(!e.value){const t=new Value({});e[a.$appendChild](t);e.value=t}e.value[a.$setValue](t)}function*getContainedChildren(e){for(const t of e[a.$getChildren]())t instanceof SubformSet?yield*t[a.$getContainedChildren]():yield t}function setTabIndex(e){for(;e;){if(!e.traversal){e[a.$tabIndex]=e[a.$getParent]()[a.$tabIndex];return}if(e[a.$tabIndex])return;let t=null;for(const r of e.traversal[a.$getChildren]())if("next"===r.operation){t=r;break}if(!t||!t.ref){e[a.$tabIndex]=e[a.$getParent]()[a.$tabIndex];return}const r=e[a.$getTemplateRoot]();e[a.$tabIndex]=++r[a.$tabIndex];const i=r[a.$searchNode](t.ref,e);if(!i)return;e=i[0]}}function applyAssist(e,t){const r=e.assist;if(r){const e=r[a.$toHTML]();e&&(t.title=e);const i=r.role.match(g);if(i){const e="heading",r=i[1];t.role=e;t["aria-level"]=r}}if("table"===e.layout)t.role="table";else if("row"===e.layout)t.role="row";else{const r=e[a.$getParent]();"row"===r.layout&&(r.assist&&"TH"===r.assist.role?t.role="columnheader":t.role="cell")}}function ariaLabel(e){if(!e.assist)return null;const t=e.assist;return t.speak&&""!==t.speak[a.$content]?t.speak[a.$content]:t.toolTip?t.toolTip[a.$content]:null}function valueToHtml(e){return o.HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:Object.create(null)},children:[{name:"span",attributes:{style:Object.create(null)},value:e}]})}function setFirstUnsplittable(e){const t=e[a.$getTemplateRoot]();if(null===t[a.$extra].firstUnsplittable){t[a.$extra].firstUnsplittable=e;t[a.$extra].noLayoutFailure=!0}}function unsetFirstUnsplittable(e){const t=e[a.$getTemplateRoot]();t[a.$extra].firstUnsplittable===e&&(t[a.$extra].noLayoutFailure=!1)}function handleBreak(e){if(e[a.$extra])return!1;e[a.$extra]=Object.create(null);if("auto"===e.targetType)return!1;const t=e[a.$getTemplateRoot]();let r=null;if(e.target){r=t[a.$searchNode](e.target,e[a.$getParent]());if(!r)return!1;r=r[0]}const{currentPageArea:i,currentContentArea:n}=t[a.$extra];if("pageArea"===e.targetType){r instanceof PageArea||(r=null);if(e.startNew){e[a.$extra].target=r||i;return!0}if(r&&r!==i){e[a.$extra].target=r;return!0}return!1}r instanceof ContentArea||(r=null);const s=r&&r[a.$getParent]();let o;if(e.startNew)if(r){o=s.contentArea.children.findIndex((e=>e===r))-1}else o=i.contentArea.children.findIndex((e=>e===n));else{if(!r||r===n)return!1;o=s.contentArea.children.findIndex((e=>e===r))-1}e[a.$extra].target=s===i?null:s;e[a.$extra].index=o;return!0}function handleOverflow(e,t,r){const i=e[a.$getTemplateRoot](),n=i[a.$extra].noLayoutFailure,s=t[a.$getSubformParent];t[a.$getSubformParent]=()=>e;i[a.$extra].noLayoutFailure=!0;const o=t[a.$toHTML](r);e[a.$addHTML](o.html,o.bbox);i[a.$extra].noLayoutFailure=n;t[a.$getSubformParent]=s}class AppearanceFilter extends a.StringObject{constructor(e){super(d,"appearanceFilter");this.id=e.id||"";this.type=(0,o.getStringOption)(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Arc extends a.XFAObject{constructor(e){super(d,"arc",!0);this.circular=(0,o.getInteger)({data:e.circular,defaultValue:0,validate:e=>1===e});this.hand=(0,o.getStringOption)(e.hand,["even","left","right"]);this.id=e.id||"";this.startAngle=(0,o.getFloat)({data:e.startAngle,defaultValue:0,validate:e=>!0});this.sweepAngle=(0,o.getFloat)({data:e.sweepAngle,defaultValue:360,validate:e=>!0});this.use=e.use||"";this.usehref=e.usehref||"";this.edge=null;this.fill=null}[a.$toHTML](){const e=this.edge?this.edge:new Edge({}),t=e[a.$toStyle](),r=Object.create(null);this.fill&&"visible"===this.fill.presence?Object.assign(r,this.fill[a.$toStyle]()):r.fill="transparent";r.strokeWidth=(0,s.measureToString)("visible"===e.presence?e.thickness:0);r.stroke=t.color;let i;const n={xmlns:f,style:{width:"100%",height:"100%",overflow:"visible"}};if(0===this.startAngle&&360===this.sweepAngle)i={name:"ellipse",attributes:{xmlns:f,cx:"50%",cy:"50%",rx:"50%",ry:"50%",style:r}};else{const e=this.startAngle*Math.PI/180,t=this.sweepAngle*Math.PI/180,a=this.sweepAngle-this.startAngle>180?1:0,[s,o,c,l]=[50*(1+Math.cos(e)),50*(1-Math.sin(e)),50*(1+Math.cos(t)),50*(1-Math.sin(t))];i={name:"path",attributes:{xmlns:f,d:`M ${s} ${o} A 50 50 0 ${a} 0 ${c} ${l}`,vectorEffect:"non-scaling-stroke",style:r}};Object.assign(n,{viewBox:"0 0 100 100",preserveAspectRatio:"none"})}const c={name:"svg",children:[i],attributes:n};if(hasMargin(this[a.$getParent]()[a.$getParent]()))return o.HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[c]});c.attributes.style.position="absolute";return o.HTMLResult.success(c)}}class Area extends a.XFAObject{constructor(e){super(d,"area",!0);this.colSpan=(0,o.getInteger)({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e});this.id=e.id||"";this.name=e.name||"";this.relevant=(0,o.getRelevant)(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.x=(0,o.getMeasurement)(e.x,"0pt");this.y=(0,o.getMeasurement)(e.y,"0pt");this.desc=null;this.extras=null;this.area=new a.XFAObjectArray;this.draw=new a.XFAObjectArray;this.exObject=new a.XFAObjectArray;this.exclGroup=new a.XFAObjectArray;this.field=new a.XFAObjectArray;this.subform=new a.XFAObjectArray;this.subformSet=new a.XFAObjectArray}*[a.$getContainedChildren](){yield*getContainedChildren(this)}[a.$isTransparent](){return!0}[a.$isBindable](){return!0}[a.$addHTML](e,t){const[r,i,n,s]=t;this[a.$extra].width=Math.max(this[a.$extra].width,r+n);this[a.$extra].height=Math.max(this[a.$extra].height,i+s);this[a.$extra].children.push(e)}[a.$getAvailableSpace](){return this[a.$extra].availableSpace}[a.$toHTML](e){const t=(0,s.toStyle)(this,"position"),r={style:t,id:this[a.$uid],class:["xfaArea"]};(0,s.isPrintOnly)(this)&&r.class.push("xfaPrintOnly");this.name&&(r.xfaName=this.name);const i=[];this[a.$extra]={children:i,width:0,height:0,availableSpace:e};const n=this[a.$childrenToHTML]({filter:new Set(["area","draw","field","exclGroup","subform","subformSet"]),include:!0});if(!n.success){if(n.isBreak())return n;delete this[a.$extra];return o.HTMLResult.FAILURE}t.width=(0,s.measureToString)(this[a.$extra].width);t.height=(0,s.measureToString)(this[a.$extra].height);const c={name:"div",attributes:r,children:i},l=[this.x,this.y,this[a.$extra].width,this[a.$extra].height];delete this[a.$extra];return o.HTMLResult.success(c,l)}}class Assist extends a.XFAObject{constructor(e){super(d,"assist",!0);this.id=e.id||"";this.role=e.role||"";this.use=e.use||"";this.usehref=e.usehref||"";this.speak=null;this.toolTip=null}[a.$toHTML](){return this.toolTip&&this.toolTip[a.$content]?this.toolTip[a.$content]:null}}class Barcode extends a.XFAObject{constructor(e){super(d,"barcode",!0);this.charEncoding=(0,o.getKeyword)({data:e.charEncoding?e.charEncoding.toLowerCase():"",defaultValue:"",validate:e=>["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-\d{2}/)});this.checksum=(0,o.getStringOption)(e.checksum,["none","1mod10","1mod10_1mod11","2mod10","auto"]);this.dataColumnCount=(0,o.getInteger)({data:e.dataColumnCount,defaultValue:-1,validate:e=>e>=0});this.dataLength=(0,o.getInteger)({data:e.dataLength,defaultValue:-1,validate:e=>e>=0});this.dataPrep=(0,o.getStringOption)(e.dataPrep,["none","flateCompress"]);this.dataRowCount=(0,o.getInteger)({data:e.dataRowCount,defaultValue:-1,validate:e=>e>=0});this.endChar=e.endChar||"";this.errorCorrectionLevel=(0,o.getInteger)({data:e.errorCorrectionLevel,defaultValue:-1,validate:e=>e>=0&&e<=8});this.id=e.id||"";this.moduleHeight=(0,o.getMeasurement)(e.moduleHeight,"5mm");this.moduleWidth=(0,o.getMeasurement)(e.moduleWidth,"0.25mm");this.printCheckDigit=(0,o.getInteger)({data:e.printCheckDigit,defaultValue:0,validate:e=>1===e});this.rowColumnRatio=(0,o.getRatio)(e.rowColumnRatio);this.startChar=e.startChar||"";this.textLocation=(0,o.getStringOption)(e.textLocation,["below","above","aboveEmbedded","belowEmbedded","none"]);this.truncate=(0,o.getInteger)({data:e.truncate,defaultValue:0,validate:e=>1===e});this.type=(0,o.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"]);this.upsMode=(0,o.getStringOption)(e.upsMode,["usCarrier","internationalCarrier","secureSymbol","standardSymbol"]);this.use=e.use||"";this.usehref=e.usehref||"";this.wideNarrowRatio=(0,o.getRatio)(e.wideNarrowRatio);this.encrypt=null;this.extras=null}}class Bind extends a.XFAObject{constructor(e){super(d,"bind",!0);this.match=(0,o.getStringOption)(e.match,["once","dataRef","global","none"]);this.ref=e.ref||"";this.picture=null}}class BindItems extends a.XFAObject{constructor(e){super(d,"bindItems");this.connection=e.connection||"";this.labelRef=e.labelRef||"";this.ref=e.ref||"";this.valueRef=e.valueRef||""}}t.BindItems=BindItems;class Bookend extends a.XFAObject{constructor(e){super(d,"bookend");this.id=e.id||"";this.leader=e.leader||"";this.trailer=e.trailer||"";this.use=e.use||"";this.usehref=e.usehref||""}}class BooleanElement extends a.Option01{constructor(e){super(d,"boolean");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[a.$toHTML](e){return valueToHtml(1===this[a.$content]?"1":"0")}}class Border extends a.XFAObject{constructor(e){super(d,"border",!0);this.break=(0,o.getStringOption)(e.break,["close","open"]);this.hand=(0,o.getStringOption)(e.hand,["even","left","right"]);this.id=e.id||"";this.presence=(0,o.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]);this.relevant=(0,o.getRelevant)(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.corner=new a.XFAObjectArray(4);this.edge=new a.XFAObjectArray(4);this.extras=null;this.fill=null;this.margin=null}[a.$getExtra](){if(!this[a.$extra]){const e=this.edge.children.slice();if(e.length<4){const t=e[e.length-1]||new Edge({});for(let r=e.length;r<4;r++)e.push(t)}const t=e.map((e=>e.thickness)),r=[0,0,0,0];if(this.margin){r[0]=this.margin.topInset;r[1]=this.margin.rightInset;r[2]=this.margin.bottomInset;r[3]=this.margin.leftInset}this[a.$extra]={widths:t,insets:r,edges:e}}return this[a.$extra]}[a.$toStyle](){const{edges:e}=this[a.$getExtra](),t=e.map((e=>{const t=e[a.$toStyle]();t.color=t.color||"#000000";return t})),r=Object.create(null);this.margin&&Object.assign(r,this.margin[a.$toStyle]());this.fill&&"visible"===this.fill.presence&&Object.assign(r,this.fill[a.$toStyle]());if(this.corner.children.some((e=>0!==e.radius))){const e=this.corner.children.map((e=>e[a.$toStyle]()));if(2===e.length||3===e.length){const t=e[e.length-1];for(let r=e.length;r<4;r++)e.push(t)}r.borderRadius=e.map((e=>e.radius)).join(" ")}switch(this.presence){case"invisible":case"hidden":r.borderStyle="";break;case"inactive":r.borderStyle="none";break;default:r.borderStyle=t.map((e=>e.style)).join(" ")}r.borderWidth=t.map((e=>e.width)).join(" ");r.borderColor=t.map((e=>e.color)).join(" ");return r}}class Break extends a.XFAObject{constructor(e){super(d,"break",!0);this.after=(0,o.getStringOption)(e.after,["auto","contentArea","pageArea","pageEven","pageOdd"]);this.afterTarget=e.afterTarget||"";this.before=(0,o.getStringOption)(e.before,["auto","contentArea","pageArea","pageEven","pageOdd"]);this.beforeTarget=e.beforeTarget||"";this.bookendLeader=e.bookendLeader||"";this.bookendTrailer=e.bookendTrailer||"";this.id=e.id||"";this.overflowLeader=e.overflowLeader||"";this.overflowTarget=e.overflowTarget||"";this.overflowTrailer=e.overflowTrailer||"";this.startNew=(0,o.getInteger)({data:e.startNew,defaultValue:0,validate:e=>1===e});this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}}class BreakAfter extends a.XFAObject{constructor(e){super(d,"breakAfter",!0);this.id=e.id||"";this.leader=e.leader||"";this.startNew=(0,o.getInteger)({data:e.startNew,defaultValue:0,validate:e=>1===e});this.target=e.target||"";this.targetType=(0,o.getStringOption)(e.targetType,["auto","contentArea","pageArea"]);this.trailer=e.trailer||"";this.use=e.use||"";this.usehref=e.usehref||"";this.script=null}}class BreakBefore extends a.XFAObject{constructor(e){super(d,"breakBefore",!0);this.id=e.id||"";this.leader=e.leader||"";this.startNew=(0,o.getInteger)({data:e.startNew,defaultValue:0,validate:e=>1===e});this.target=e.target||"";this.targetType=(0,o.getStringOption)(e.targetType,["auto","contentArea","pageArea"]);this.trailer=e.trailer||"";this.use=e.use||"";this.usehref=e.usehref||"";this.script=null}[a.$toHTML](e){this[a.$extra]={};return o.HTMLResult.FAILURE}}class Button extends a.XFAObject{constructor(e){super(d,"button",!0);this.highlight=(0,o.getStringOption)(e.highlight,["inverted","none","outline","push"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}[a.$toHTML](e){const t=this[a.$getParent]()[a.$getParent](),r={name:"button",attributes:{id:this[a.$uid],class:["xfaButton"],style:{}},children:[]};for(const e of t.event.children){if("click"!==e.activity||!e.script)continue;const t=(0,h.recoverJsURL)(e.script[a.$content]);if(!t)continue;const i=(0,s.fixURL)(t.url);i&&r.children.push({name:"a",attributes:{id:"link"+this[a.$uid],href:i,newWindow:t.newWindow,class:["xfaLink"],style:{}},children:[]})}return o.HTMLResult.success(r)}}class Calculate extends a.XFAObject{constructor(e){super(d,"calculate",!0);this.id=e.id||"";this.override=(0,o.getStringOption)(e.override,["disabled","error","ignore","warning"]);this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.message=null;this.script=null}}class Caption extends a.XFAObject{constructor(e){super(d,"caption",!0);this.id=e.id||"";this.placement=(0,o.getStringOption)(e.placement,["left","bottom","inline","right","top"]);this.presence=(0,o.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]);this.reserve=Math.ceil((0,o.getMeasurement)(e.reserve));this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.font=null;this.margin=null;this.para=null;this.value=null}[a.$setValue](e){_setValue(this,e)}[a.$getExtra](e){if(!this[a.$extra]){let{width:t,height:r}=e;switch(this.placement){case"left":case"right":case"inline":t=this.reserve<=0?t:this.reserve;break;case"top":case"bottom":r=this.reserve<=0?r:this.reserve}this[a.$extra]=(0,s.layoutNode)(this,{width:t,height:r})}return this[a.$extra]}[a.$toHTML](e){if(!this.value)return o.HTMLResult.EMPTY;this[a.$pushPara]();const t=this.value[a.$toHTML](e).html;if(!t){this[a.$popPara]();return o.HTMLResult.EMPTY}const r=this.reserve;if(this.reserve<=0){const{w:t,h:r}=this[a.$getExtra](e);switch(this.placement){case"left":case"right":case"inline":this.reserve=t;break;case"top":case"bottom":this.reserve=r}}const i=[];"string"==typeof t?i.push({name:"#text",value:t}):i.push(t);const n=(0,s.toStyle)(this,"font","margin","visibility");switch(this.placement){case"left":case"right":this.reserve>0&&(n.width=(0,s.measureToString)(this.reserve));break;case"top":case"bottom":this.reserve>0&&(n.height=(0,s.measureToString)(this.reserve))}(0,s.setPara)(this,null,t);this[a.$popPara]();this.reserve=r;return o.HTMLResult.success({name:"div",attributes:{style:n,class:["xfaCaption"]},children:i})}}class Certificate extends a.StringObject{constructor(e){super(d,"certificate");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Certificates extends a.XFAObject{constructor(e){super(d,"certificates",!0);this.credentialServerPolicy=(0,o.getStringOption)(e.credentialServerPolicy,["optional","required"]);this.id=e.id||"";this.url=e.url||"";this.urlPolicy=e.urlPolicy||"";this.use=e.use||"";this.usehref=e.usehref||"";this.encryption=null;this.issuers=null;this.keyUsage=null;this.oids=null;this.signing=null;this.subjectDNs=null}}class CheckButton extends a.XFAObject{constructor(e){super(d,"checkButton",!0);this.id=e.id||"";this.mark=(0,o.getStringOption)(e.mark,["default","check","circle","cross","diamond","square","star"]);this.shape=(0,o.getStringOption)(e.shape,["square","round"]);this.size=(0,o.getMeasurement)(e.size,"10pt");this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.extras=null;this.margin=null}[a.$toHTML](e){const t=(0,s.toStyle)("margin"),r=(0,s.measureToString)(this.size);t.width=t.height=r;let i,n,c;const l=this[a.$getParent]()[a.$getParent](),h=l.items.children.length&&l.items.children[0][a.$toHTML]().html||[],u={on:(void 0!==h[0]?h[0]:"on").toString(),off:(void 0!==h[1]?h[1]:"off").toString()},d=(l.value&&l.value[a.$text]()||"off")===u.on||void 0,f=l[a.$getSubformParent](),g=l[a.$uid];let p;if(f instanceof ExclGroup){c=f[a.$uid];i="radio";n="xfaRadio";p=f[a.$data]&&f[a.$data][a.$uid]||f[a.$uid]}else{i="checkbox";n="xfaCheckbox";p=l[a.$data]&&l[a.$data][a.$uid]||l[a.$uid]}const m={name:"input",attributes:{class:[n],style:t,fieldId:g,dataId:p,type:i,checked:d,xfaOn:u.on,xfaOff:u.off,"aria-label":ariaLabel(l)}};c&&(m.attributes.name=c);return o.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[m]})}}class ChoiceList extends a.XFAObject{constructor(e){super(d,"choiceList",!0);this.commitOn=(0,o.getStringOption)(e.commitOn,["select","exit"]);this.id=e.id||"";this.open=(0,o.getStringOption)(e.open,["userControl","always","multiSelect","onEntry"]);this.textEntry=(0,o.getInteger)({data:e.textEntry,defaultValue:0,validate:e=>1===e});this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.extras=null;this.margin=null}[a.$toHTML](e){const t=(0,s.toStyle)(this,"border","margin"),r=this[a.$getParent]()[a.$getParent](),i={fontSize:`calc(${r.font&&r.font.size||10}px * var(--zoom-factor))`},n=[];if(r.items.children.length>0){const e=r.items;let t=0,s=0;if(2===e.children.length){t=e.children[0].save;s=1-t}const o=e.children[t][a.$toHTML]().html,c=e.children[s][a.$toHTML]().html;let l=!1;const h=r.value&&r.value[a.$text]()||"";for(let e=0,t=o.length;ee>=0});this.use=e.use||"";this.usehref=e.usehref||""}}class Connect extends a.XFAObject{constructor(e){super(d,"connect",!0);this.connection=e.connection||"";this.id=e.id||"";this.ref=e.ref||"";this.usage=(0,o.getStringOption)(e.usage,["exportAndImport","exportOnly","importOnly"]);this.use=e.use||"";this.usehref=e.usehref||"";this.picture=null}}class ContentArea extends a.XFAObject{constructor(e){super(d,"contentArea",!0);this.h=(0,o.getMeasurement)(e.h);this.id=e.id||"";this.name=e.name||"";this.relevant=(0,o.getRelevant)(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.w=(0,o.getMeasurement)(e.w);this.x=(0,o.getMeasurement)(e.x,"0pt");this.y=(0,o.getMeasurement)(e.y,"0pt");this.desc=null;this.extras=null}[a.$toHTML](e){const t={left:(0,s.measureToString)(this.x),top:(0,s.measureToString)(this.y),width:(0,s.measureToString)(this.w),height:(0,s.measureToString)(this.h)},r=["xfaContentarea"];(0,s.isPrintOnly)(this)&&r.push("xfaPrintOnly");return o.HTMLResult.success({name:"div",children:[],attributes:{style:t,class:r,id:this[a.$uid]}})}}class Corner extends a.XFAObject{constructor(e){super(d,"corner",!0);this.id=e.id||"";this.inverted=(0,o.getInteger)({data:e.inverted,defaultValue:0,validate:e=>1===e});this.join=(0,o.getStringOption)(e.join,["square","round"]);this.presence=(0,o.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]);this.radius=(0,o.getMeasurement)(e.radius);this.stroke=(0,o.getStringOption)(e.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]);this.thickness=(0,o.getMeasurement)(e.thickness,"0.5pt");this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[a.$toStyle](){const e=(0,s.toStyle)(this,"visibility");e.radius=(0,s.measureToString)("square"===this.join?0:this.radius);return e}}class DateElement extends a.ContentObject{constructor(e){super(d,"date");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[a.$finalize](){const e=this[a.$content].trim();this[a.$content]=e?new Date(e):null}[a.$toHTML](e){return valueToHtml(this[a.$content]?this[a.$content].toString():"")}}class DateTime extends a.ContentObject{constructor(e){super(d,"dateTime");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[a.$finalize](){const e=this[a.$content].trim();this[a.$content]=e?new Date(e):null}[a.$toHTML](e){return valueToHtml(this[a.$content]?this[a.$content].toString():"")}}class DateTimeEdit extends a.XFAObject{constructor(e){super(d,"dateTimeEdit",!0);this.hScrollPolicy=(0,o.getStringOption)(e.hScrollPolicy,["auto","off","on"]);this.id=e.id||"";this.picker=(0,o.getStringOption)(e.picker,["host","none"]);this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.comb=null;this.extras=null;this.margin=null}[a.$toHTML](e){const t=(0,s.toStyle)(this,"border","font","margin"),r=this[a.$getParent]()[a.$getParent](),i={name:"input",attributes:{type:"text",fieldId:r[a.$uid],dataId:r[a.$data]&&r[a.$data][a.$uid]||r[a.$uid],class:["xfaTextfield"],style:t,"aria-label":ariaLabel(r)}};return o.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[i]})}}class Decimal extends a.ContentObject{constructor(e){super(d,"decimal");this.fracDigits=(0,o.getInteger)({data:e.fracDigits,defaultValue:2,validate:e=>!0});this.id=e.id||"";this.leadDigits=(0,o.getInteger)({data:e.leadDigits,defaultValue:-1,validate:e=>!0});this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[a.$finalize](){const e=parseFloat(this[a.$content].trim());this[a.$content]=isNaN(e)?null:e}[a.$toHTML](e){return valueToHtml(null!==this[a.$content]?this[a.$content].toString():"")}}class DefaultUi extends a.XFAObject{constructor(e){super(d,"defaultUi",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}}class Desc extends a.XFAObject{constructor(e){super(d,"desc",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.boolean=new a.XFAObjectArray;this.date=new a.XFAObjectArray;this.dateTime=new a.XFAObjectArray;this.decimal=new a.XFAObjectArray;this.exData=new a.XFAObjectArray;this.float=new a.XFAObjectArray;this.image=new a.XFAObjectArray;this.integer=new a.XFAObjectArray;this.text=new a.XFAObjectArray;this.time=new a.XFAObjectArray}}class DigestMethod extends a.OptionObject{constructor(e){super(d,"digestMethod",["","SHA1","SHA256","SHA512","RIPEMD160"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||""}}class DigestMethods extends a.XFAObject{constructor(e){super(d,"digestMethods",!0);this.id=e.id||"";this.type=(0,o.getStringOption)(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.digestMethod=new a.XFAObjectArray}}class Draw extends a.XFAObject{constructor(e){super(d,"draw",!0);this.anchorType=(0,o.getStringOption)(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]);this.colSpan=(0,o.getInteger)({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e});this.h=e.h?(0,o.getMeasurement)(e.h):"";this.hAlign=(0,o.getStringOption)(e.hAlign,["left","center","justify","justifyAll","radix","right"]);this.id=e.id||"";this.locale=e.locale||"";this.maxH=(0,o.getMeasurement)(e.maxH,"0pt");this.maxW=(0,o.getMeasurement)(e.maxW,"0pt");this.minH=(0,o.getMeasurement)(e.minH,"0pt");this.minW=(0,o.getMeasurement)(e.minW,"0pt");this.name=e.name||"";this.presence=(0,o.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]);this.relevant=(0,o.getRelevant)(e.relevant);this.rotate=(0,o.getInteger)({data:e.rotate,defaultValue:0,validate:e=>e%90==0});this.use=e.use||"";this.usehref=e.usehref||"";this.w=e.w?(0,o.getMeasurement)(e.w):"";this.x=(0,o.getMeasurement)(e.x,"0pt");this.y=(0,o.getMeasurement)(e.y,"0pt");this.assist=null;this.border=null;this.caption=null;this.desc=null;this.extras=null;this.font=null;this.keep=null;this.margin=null;this.para=null;this.traversal=null;this.ui=null;this.value=null;this.setProperty=new a.XFAObjectArray}[a.$setValue](e){_setValue(this,e)}[a.$toHTML](e){setTabIndex(this);if("hidden"===this.presence||"inactive"===this.presence)return o.HTMLResult.EMPTY;(0,s.fixDimensions)(this);this[a.$pushPara]();const t=this.w,r=this.h,{w:i,h:c,isBroken:l}=(0,s.layoutNode)(this,e);if(i&&""===this.w){if(l&&this[a.$getSubformParent]()[a.$isThereMoreWidth]()){this[a.$popPara]();return o.HTMLResult.FAILURE}this.w=i}c&&""===this.h&&(this.h=c);setFirstUnsplittable(this);if(!(0,n.checkDimensions)(this,e)){this.w=t;this.h=r;this[a.$popPara]();return o.HTMLResult.FAILURE}unsetFirstUnsplittable(this);const h=(0,s.toStyle)(this,"font","hAlign","dimensions","position","presence","rotate","anchorType","border","margin");(0,s.setMinMaxDimensions)(this,h);if(h.margin){h.padding=h.margin;delete h.margin}const u=["xfaDraw"];this.font&&u.push("xfaFont");(0,s.isPrintOnly)(this)&&u.push("xfaPrintOnly");const d={style:h,id:this[a.$uid],class:u};this.name&&(d.xfaName=this.name);const f={name:"div",attributes:d,children:[]};applyAssist(this,d);const g=(0,s.computeBbox)(this,f,e),p=this.value?this.value[a.$toHTML](e).html:null;if(null===p){this.w=t;this.h=r;this[a.$popPara]();return o.HTMLResult.success((0,s.createWrapper)(this,f),g)}f.children.push(p);(0,s.setPara)(this,h,p);this.w=t;this.h=r;this[a.$popPara]();return o.HTMLResult.success((0,s.createWrapper)(this,f),g)}}class Edge extends a.XFAObject{constructor(e){super(d,"edge",!0);this.cap=(0,o.getStringOption)(e.cap,["square","butt","round"]);this.id=e.id||"";this.presence=(0,o.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]);this.stroke=(0,o.getStringOption)(e.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]);this.thickness=(0,o.getMeasurement)(e.thickness,"0.5pt");this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[a.$toStyle](){const e=(0,s.toStyle)(this,"visibility");Object.assign(e,{linecap:this.cap,width:(0,s.measureToString)(this.thickness),color:this.color?this.color[a.$toStyle]():"#000000",style:""});if("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}}class Encoding extends a.OptionObject{constructor(e){super(d,"encoding",["adbe.x509.rsa_sha1","adbe.pkcs7.detached","adbe.pkcs7.sha1"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Encodings extends a.XFAObject{constructor(e){super(d,"encodings",!0);this.id=e.id||"";this.type=(0,o.getStringOption)(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.encoding=new a.XFAObjectArray}}class Encrypt extends a.XFAObject{constructor(e){super(d,"encrypt",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.certificate=null}}class EncryptData extends a.XFAObject{constructor(e){super(d,"encryptData",!0);this.id=e.id||"";this.operation=(0,o.getStringOption)(e.operation,["encrypt","decrypt"]);this.target=e.target||"";this.use=e.use||"";this.usehref=e.usehref||"";this.filter=null;this.manifest=null}}class Encryption extends a.XFAObject{constructor(e){super(d,"encryption",!0);this.id=e.id||"";this.type=(0,o.getStringOption)(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.certificate=new a.XFAObjectArray}}class EncryptionMethod extends a.OptionObject{constructor(e){super(d,"encryptionMethod",["","AES256-CBC","TRIPLEDES-CBC","AES128-CBC","AES192-CBC"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||""}}class EncryptionMethods extends a.XFAObject{constructor(e){super(d,"encryptionMethods",!0);this.id=e.id||"";this.type=(0,o.getStringOption)(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.encryptionMethod=new a.XFAObjectArray}}class Event extends a.XFAObject{constructor(e){super(d,"event",!0);this.activity=(0,o.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"]);this.id=e.id||"";this.listen=(0,o.getStringOption)(e.listen,["refOnly","refAndDescendents"]);this.name=e.name||"";this.ref=e.ref||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.encryptData=null;this.execute=null;this.script=null;this.signData=null;this.submit=null}}class ExData extends a.ContentObject{constructor(e){super(d,"exData");this.contentType=e.contentType||"";this.href=e.href||"";this.id=e.id||"";this.maxLength=(0,o.getInteger)({data:e.maxLength,defaultValue:-1,validate:e=>e>=-1});this.name=e.name||"";this.rid=e.rid||"";this.transferEncoding=(0,o.getStringOption)(e.transferEncoding,["none","base64","package"]);this.use=e.use||"";this.usehref=e.usehref||""}[a.$isCDATAXml](){return"text/html"===this.contentType}[a.$onChild](e){if("text/html"===this.contentType&&e[a.$namespaceId]===i.NamespaceIds.xhtml.id){this[a.$content]=e;return!0}if("text/xml"===this.contentType){this[a.$content]=e;return!0}return!1}[a.$toHTML](e){return"text/html"===this.contentType&&this[a.$content]?this[a.$content][a.$toHTML](e):o.HTMLResult.EMPTY}}class ExObject extends a.XFAObject{constructor(e){super(d,"exObject",!0);this.archive=e.archive||"";this.classId=e.classId||"";this.codeBase=e.codeBase||"";this.codeType=e.codeType||"";this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.boolean=new a.XFAObjectArray;this.date=new a.XFAObjectArray;this.dateTime=new a.XFAObjectArray;this.decimal=new a.XFAObjectArray;this.exData=new a.XFAObjectArray;this.exObject=new a.XFAObjectArray;this.float=new a.XFAObjectArray;this.image=new a.XFAObjectArray;this.integer=new a.XFAObjectArray;this.text=new a.XFAObjectArray;this.time=new a.XFAObjectArray}}class ExclGroup extends a.XFAObject{constructor(e){super(d,"exclGroup",!0);this.access=(0,o.getStringOption)(e.access,["open","nonInteractive","protected","readOnly"]);this.accessKey=e.accessKey||"";this.anchorType=(0,o.getStringOption)(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]);this.colSpan=(0,o.getInteger)({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e});this.h=e.h?(0,o.getMeasurement)(e.h):"";this.hAlign=(0,o.getStringOption)(e.hAlign,["left","center","justify","justifyAll","radix","right"]);this.id=e.id||"";this.layout=(0,o.getStringOption)(e.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]);this.maxH=(0,o.getMeasurement)(e.maxH,"0pt");this.maxW=(0,o.getMeasurement)(e.maxW,"0pt");this.minH=(0,o.getMeasurement)(e.minH,"0pt");this.minW=(0,o.getMeasurement)(e.minW,"0pt");this.name=e.name||"";this.presence=(0,o.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]);this.relevant=(0,o.getRelevant)(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.w=e.w?(0,o.getMeasurement)(e.w):"";this.x=(0,o.getMeasurement)(e.x,"0pt");this.y=(0,o.getMeasurement)(e.y,"0pt");this.assist=null;this.bind=null;this.border=null;this.calculate=null;this.caption=null;this.desc=null;this.extras=null;this.margin=null;this.para=null;this.traversal=null;this.validate=null;this.connect=new a.XFAObjectArray;this.event=new a.XFAObjectArray;this.field=new a.XFAObjectArray;this.setProperty=new a.XFAObjectArray}[a.$isBindable](){return!0}[a.$hasSettableValue](){return!0}[a.$setValue](e){for(const t of this.field.children){if(!t.value){const e=new Value({});t[a.$appendChild](e);t.value=e}t.value[a.$setValue](e)}}[a.$isThereMoreWidth](){return this.layout.endsWith("-tb")&&0===this[a.$extra].attempt&&this[a.$extra].numberInLine>0||this[a.$getParent]()[a.$isThereMoreWidth]()}[a.$isSplittable](){const e=this[a.$getSubformParent]();if(!e[a.$isSplittable]())return!1;if(void 0!==this[a.$extra]._isSplittable)return this[a.$extra]._isSplittable;if("position"===this.layout||this.layout.includes("row")){this[a.$extra]._isSplittable=!1;return!1}if(e.layout&&e.layout.endsWith("-tb")&&0!==e[a.$extra].numberInLine)return!1;this[a.$extra]._isSplittable=!0;return!0}[a.$flushHTML](){return(0,n.flushHTML)(this)}[a.$addHTML](e,t){(0,n.addHTML)(this,e,t)}[a.$getAvailableSpace](){return(0,n.getAvailableSpace)(this)}[a.$toHTML](e){setTabIndex(this);if("hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return o.HTMLResult.EMPTY;(0,s.fixDimensions)(this);const t=[],r={id:this[a.$uid],class:[]};(0,s.setAccess)(this,r.class);this[a.$extra]||(this[a.$extra]=Object.create(null));Object.assign(this[a.$extra],{children:t,attributes:r,attempt:0,line:null,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,e.width),height:Math.min(this.h||1/0,e.height)},width:0,height:0,prevHeight:0,currentWidth:0});const i=this[a.$isSplittable]();i||setFirstUnsplittable(this);if(!(0,n.checkDimensions)(this,e))return o.HTMLResult.FAILURE;const c=new Set(["field"]);if(this.layout.includes("row")){const e=this[a.$getSubformParent]().columnWidths;if(Array.isArray(e)&&e.length>0){this[a.$extra].columnWidths=e;this[a.$extra].currentColumn=0}}const l=(0,s.toStyle)(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),h=["xfaExclgroup"],u=(0,s.layoutClass)(this);u&&h.push(u);(0,s.isPrintOnly)(this)&&h.push("xfaPrintOnly");r.style=l;r.class=h;this.name&&(r.xfaName=this.name);this[a.$pushPara]();const d="lr-tb"===this.layout||"rl-tb"===this.layout,f=d?2:1;for(;this[a.$extra].attempte>=1||-1===e});this.h=e.h?(0,o.getMeasurement)(e.h):"";this.hAlign=(0,o.getStringOption)(e.hAlign,["left","center","justify","justifyAll","radix","right"]);this.id=e.id||"";this.locale=e.locale||"";this.maxH=(0,o.getMeasurement)(e.maxH,"0pt");this.maxW=(0,o.getMeasurement)(e.maxW,"0pt");this.minH=(0,o.getMeasurement)(e.minH,"0pt");this.minW=(0,o.getMeasurement)(e.minW,"0pt");this.name=e.name||"";this.presence=(0,o.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]);this.relevant=(0,o.getRelevant)(e.relevant);this.rotate=(0,o.getInteger)({data:e.rotate,defaultValue:0,validate:e=>e%90==0});this.use=e.use||"";this.usehref=e.usehref||"";this.w=e.w?(0,o.getMeasurement)(e.w):"";this.x=(0,o.getMeasurement)(e.x,"0pt");this.y=(0,o.getMeasurement)(e.y,"0pt");this.assist=null;this.bind=null;this.border=null;this.calculate=null;this.caption=null;this.desc=null;this.extras=null;this.font=null;this.format=null;this.items=new a.XFAObjectArray(2);this.keep=null;this.margin=null;this.para=null;this.traversal=null;this.ui=null;this.validate=null;this.value=null;this.bindItems=new a.XFAObjectArray;this.connect=new a.XFAObjectArray;this.event=new a.XFAObjectArray;this.setProperty=new a.XFAObjectArray}[a.$isBindable](){return!0}[a.$setValue](e){_setValue(this,e)}[a.$toHTML](e){setTabIndex(this);if(!this.ui){this.ui=new Ui({});this.ui[a.$globalData]=this[a.$globalData];this[a.$appendChild](this.ui);let e;switch(this.items.children.length){case 0:e=new TextEdit({});this.ui.textEdit=e;break;case 1:e=new CheckButton({});this.ui.checkButton=e;break;case 2:e=new ChoiceList({});this.ui.choiceList=e}this.ui[a.$appendChild](e)}if(!this.ui||"hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return o.HTMLResult.EMPTY;this.caption&&delete this.caption[a.$extra];this[a.$pushPara]();const t=this.caption?this.caption[a.$toHTML](e).html:null,r=this.w,i=this.h;let c=0,h=0;if(this.margin){c=this.margin.leftInset+this.margin.rightInset;h=this.margin.topInset+this.margin.bottomInset}let u=null;if(""===this.w||""===this.h){let t=null,r=null,i=0,n=0;if(this.ui.checkButton)i=n=this.ui.checkButton.size;else{const{w:t,h:r}=(0,s.layoutNode)(this,e);if(null!==t){i=t;n=r}else n=(0,l.getMetrics)(this.font,!0).lineNoGap}u=getBorderDims(this.ui[a.$getExtra]());i+=u.w;n+=u.h;if(this.caption){const{w:s,h:c,isBroken:l}=this.caption[a.$getExtra](e);if(l&&this[a.$getSubformParent]()[a.$isThereMoreWidth]()){this[a.$popPara]();return o.HTMLResult.FAILURE}t=s;r=c;switch(this.caption.placement){case"left":case"right":case"inline":t+=i;break;case"top":case"bottom":r+=n}}else{t=i;r=n}if(t&&""===this.w){t+=c;this.w=Math.min(this.maxW<=0?1/0:this.maxW,this.minW+1e>=1&&e<=5});this.appearanceFilter=null;this.certificates=null;this.digestMethods=null;this.encodings=null;this.encryptionMethods=null;this.handler=null;this.lockDocument=null;this.mdp=null;this.reasons=null;this.timeStamp=null}}class Float extends a.ContentObject{constructor(e){super(d,"float");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[a.$finalize](){const e=parseFloat(this[a.$content].trim());this[a.$content]=isNaN(e)?null:e}[a.$toHTML](e){return valueToHtml(null!==this[a.$content]?this[a.$content].toString():"")}}class Font extends a.XFAObject{constructor(e){super(d,"font",!0);this.baselineShift=(0,o.getMeasurement)(e.baselineShift);this.fontHorizontalScale=(0,o.getFloat)({data:e.fontHorizontalScale,defaultValue:100,validate:e=>e>=0});this.fontVerticalScale=(0,o.getFloat)({data:e.fontVerticalScale,defaultValue:100,validate:e=>e>=0});this.id=e.id||"";this.kerningMode=(0,o.getStringOption)(e.kerningMode,["none","pair"]);this.letterSpacing=(0,o.getMeasurement)(e.letterSpacing,"0");this.lineThrough=(0,o.getInteger)({data:e.lineThrough,defaultValue:0,validate:e=>1===e||2===e});this.lineThroughPeriod=(0,o.getStringOption)(e.lineThroughPeriod,["all","word"]);this.overline=(0,o.getInteger)({data:e.overline,defaultValue:0,validate:e=>1===e||2===e});this.overlinePeriod=(0,o.getStringOption)(e.overlinePeriod,["all","word"]);this.posture=(0,o.getStringOption)(e.posture,["normal","italic"]);this.size=(0,o.getMeasurement)(e.size,"10pt");this.typeface=e.typeface||"Courier";this.underline=(0,o.getInteger)({data:e.underline,defaultValue:0,validate:e=>1===e||2===e});this.underlinePeriod=(0,o.getStringOption)(e.underlinePeriod,["all","word"]);this.use=e.use||"";this.usehref=e.usehref||"";this.weight=(0,o.getStringOption)(e.weight,["normal","bold"]);this.extras=null;this.fill=null}[a.$clean](e){super[a.$clean](e);this[a.$globalData].usedTypefaces.add(this.typeface)}[a.$toStyle](){const e=(0,s.toStyle)(this,"fill"),t=e.color;if(t)if("#000000"===t)delete e.color;else if(!t.startsWith("#")){e.background=t;e.backgroundClip="text";e.color="transparent"}this.baselineShift&&(e.verticalAlign=(0,s.measureToString)(this.baselineShift));e.fontKerning="none"===this.kerningMode?"none":"normal";e.letterSpacing=(0,s.measureToString)(this.letterSpacing);if(0!==this.lineThrough){e.textDecoration="line-through";2===this.lineThrough&&(e.textDecorationStyle="double")}if(0!==this.overline){e.textDecoration="overline";2===this.overline&&(e.textDecorationStyle="double")}e.fontStyle=this.posture;e.fontSize=(0,s.measureToString)(.99*this.size);(0,s.setFontFamily)(this,this,this[a.$globalData].fontFinder,e);if(0!==this.underline){e.textDecoration="underline";2===this.underline&&(e.textDecorationStyle="double")}e.fontWeight=this.weight;return e}}class Format extends a.XFAObject{constructor(e){super(d,"format",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.picture=null}}class Handler extends a.StringObject{constructor(e){super(d,"handler");this.id=e.id||"";this.type=(0,o.getStringOption)(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Hyphenation extends a.XFAObject{constructor(e){super(d,"hyphenation");this.excludeAllCaps=(0,o.getInteger)({data:e.excludeAllCaps,defaultValue:0,validate:e=>1===e});this.excludeInitialCap=(0,o.getInteger)({data:e.excludeInitialCap,defaultValue:0,validate:e=>1===e});this.hyphenate=(0,o.getInteger)({data:e.hyphenate,defaultValue:0,validate:e=>1===e});this.id=e.id||"";this.pushCharacterCount=(0,o.getInteger)({data:e.pushCharacterCount,defaultValue:3,validate:e=>e>=0});this.remainCharacterCount=(0,o.getInteger)({data:e.remainCharacterCount,defaultValue:3,validate:e=>e>=0});this.use=e.use||"";this.usehref=e.usehref||"";this.wordCharacterCount=(0,o.getInteger)({data:e.wordCharacterCount,defaultValue:7,validate:e=>e>=0})}}class Image extends a.StringObject{constructor(e){super(d,"image");this.aspect=(0,o.getStringOption)(e.aspect,["fit","actual","height","none","width"]);this.contentType=e.contentType||"";this.href=e.href||"";this.id=e.id||"";this.name=e.name||"";this.transferEncoding=(0,o.getStringOption)(e.transferEncoding,["base64","none","package"]);this.use=e.use||"";this.usehref=e.usehref||""}[a.$toHTML](){if(this.contentType&&!p.has(this.contentType.toLowerCase()))return o.HTMLResult.EMPTY;let e=this[a.$globalData].images&&this[a.$globalData].images.get(this.href);if(!e&&(this.href||!this[a.$content]))return o.HTMLResult.EMPTY;e||"base64"!==this.transferEncoding||(e=(0,c.stringToBytes)(atob(this[a.$content])));if(!e)return o.HTMLResult.EMPTY;if(!this.contentType){for(const[t,r]of m)if(e.length>t.length&&t.every(((t,r)=>t===e[r]))){this.contentType=r;break}if(!this.contentType)return o.HTMLResult.EMPTY}const t=new Blob([e],{type:this.contentType});let r;switch(this.aspect){case"fit":case"actual":break;case"height":r={height:"100%",objectFit:"fill"};break;case"none":r={width:"100%",height:"100%",objectFit:"fill"};break;case"width":r={width:"100%",objectFit:"fill"}}const i=this[a.$getParent]();return o.HTMLResult.success({name:"img",attributes:{class:["xfaImage"],style:r,src:URL.createObjectURL(t),alt:i?ariaLabel(i[a.$getParent]()):null}})}}class ImageEdit extends a.XFAObject{constructor(e){super(d,"imageEdit",!0);this.data=(0,o.getStringOption)(e.data,["link","embed"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.extras=null;this.margin=null}[a.$toHTML](e){return"embed"===this.data?o.HTMLResult.success({name:"div",children:[],attributes:{}}):o.HTMLResult.EMPTY}}class Integer extends a.ContentObject{constructor(e){super(d,"integer");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[a.$finalize](){const e=parseInt(this[a.$content].trim(),10);this[a.$content]=isNaN(e)?null:e}[a.$toHTML](e){return valueToHtml(null!==this[a.$content]?this[a.$content].toString():"")}}class Issuers extends a.XFAObject{constructor(e){super(d,"issuers",!0);this.id=e.id||"";this.type=(0,o.getStringOption)(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.certificate=new a.XFAObjectArray}}class Items extends a.XFAObject{constructor(e){super(d,"items",!0);this.id=e.id||"";this.name=e.name||"";this.presence=(0,o.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]);this.ref=e.ref||"";this.save=(0,o.getInteger)({data:e.save,defaultValue:0,validate:e=>1===e});this.use=e.use||"";this.usehref=e.usehref||"";this.boolean=new a.XFAObjectArray;this.date=new a.XFAObjectArray;this.dateTime=new a.XFAObjectArray;this.decimal=new a.XFAObjectArray;this.exData=new a.XFAObjectArray;this.float=new a.XFAObjectArray;this.image=new a.XFAObjectArray;this.integer=new a.XFAObjectArray;this.text=new a.XFAObjectArray;this.time=new a.XFAObjectArray}[a.$toHTML](){const e=[];for(const t of this[a.$getChildren]())e.push(t[a.$text]());return o.HTMLResult.success(e)}}t.Items=Items;class Keep extends a.XFAObject{constructor(e){super(d,"keep",!0);this.id=e.id||"";const t=["none","contentArea","pageArea"];this.intact=(0,o.getStringOption)(e.intact,t);this.next=(0,o.getStringOption)(e.next,t);this.previous=(0,o.getStringOption)(e.previous,t);this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}}class KeyUsage extends a.XFAObject{constructor(e){super(d,"keyUsage");const t=["","yes","no"];this.crlSign=(0,o.getStringOption)(e.crlSign,t);this.dataEncipherment=(0,o.getStringOption)(e.dataEncipherment,t);this.decipherOnly=(0,o.getStringOption)(e.decipherOnly,t);this.digitalSignature=(0,o.getStringOption)(e.digitalSignature,t);this.encipherOnly=(0,o.getStringOption)(e.encipherOnly,t);this.id=e.id||"";this.keyAgreement=(0,o.getStringOption)(e.keyAgreement,t);this.keyCertSign=(0,o.getStringOption)(e.keyCertSign,t);this.keyEncipherment=(0,o.getStringOption)(e.keyEncipherment,t);this.nonRepudiation=(0,o.getStringOption)(e.nonRepudiation,t);this.type=(0,o.getStringOption)(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Line extends a.XFAObject{constructor(e){super(d,"line",!0);this.hand=(0,o.getStringOption)(e.hand,["even","left","right"]);this.id=e.id||"";this.slope=(0,o.getStringOption)(e.slope,["\\","/"]);this.use=e.use||"";this.usehref=e.usehref||"";this.edge=null}[a.$toHTML](){const e=this[a.$getParent]()[a.$getParent](),t=this.edge?this.edge:new Edge({}),r=t[a.$toStyle](),i=Object.create(null),n="visible"===t.presence?t.thickness:0;i.strokeWidth=(0,s.measureToString)(n);i.stroke=r.color;let c,l,h,u,d="100%",g="100%";if(e.w<=n){[c,l,h,u]=["50%",0,"50%","100%"];d=i.strokeWidth}else if(e.h<=n){[c,l,h,u]=[0,"50%","100%","50%"];g=i.strokeWidth}else"\\"===this.slope?[c,l,h,u]=[0,0,"100%","100%"]:[c,l,h,u]=[0,"100%","100%",0];const p={name:"svg",children:[{name:"line",attributes:{xmlns:f,x1:c,y1:l,x2:h,y2:u,style:i}}],attributes:{xmlns:f,width:d,height:g,style:{overflow:"visible"}}};if(hasMargin(e))return o.HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[p]});p.attributes.style.position="absolute";return o.HTMLResult.success(p)}}class Linear extends a.XFAObject{constructor(e){super(d,"linear",!0);this.id=e.id||"";this.type=(0,o.getStringOption)(e.type,["toRight","toBottom","toLeft","toTop"]);this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[a.$toStyle](e){e=e?e[a.$toStyle]():"#FFFFFF";return`linear-gradient(${this.type.replace(/([RBLT])/," $1").toLowerCase()}, ${e}, ${this.color?this.color[a.$toStyle]():"#000000"})`}}class LockDocument extends a.ContentObject{constructor(e){super(d,"lockDocument");this.id=e.id||"";this.type=(0,o.getStringOption)(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||""}[a.$finalize](){this[a.$content]=(0,o.getStringOption)(this[a.$content],["auto","0","1"])}}class Manifest extends a.XFAObject{constructor(e){super(d,"manifest",!0);this.action=(0,o.getStringOption)(e.action,["include","all","exclude"]);this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.ref=new a.XFAObjectArray}}class Margin extends a.XFAObject{constructor(e){super(d,"margin",!0);this.bottomInset=(0,o.getMeasurement)(e.bottomInset,"0");this.id=e.id||"";this.leftInset=(0,o.getMeasurement)(e.leftInset,"0");this.rightInset=(0,o.getMeasurement)(e.rightInset,"0");this.topInset=(0,o.getMeasurement)(e.topInset,"0");this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}[a.$toStyle](){return{margin:(0,s.measureToString)(this.topInset)+" "+(0,s.measureToString)(this.rightInset)+" "+(0,s.measureToString)(this.bottomInset)+" "+(0,s.measureToString)(this.leftInset)}}}class Mdp extends a.XFAObject{constructor(e){super(d,"mdp");this.id=e.id||"";this.permissions=(0,o.getInteger)({data:e.permissions,defaultValue:2,validate:e=>1===e||3===e});this.signatureType=(0,o.getStringOption)(e.signatureType,["filler","author"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Medium extends a.XFAObject{constructor(e){super(d,"medium");this.id=e.id||"";this.imagingBBox=(0,o.getBBox)(e.imagingBBox);this.long=(0,o.getMeasurement)(e.long);this.orientation=(0,o.getStringOption)(e.orientation,["portrait","landscape"]);this.short=(0,o.getMeasurement)(e.short);this.stock=e.stock||"";this.trayIn=(0,o.getStringOption)(e.trayIn,["auto","delegate","pageFront"]);this.trayOut=(0,o.getStringOption)(e.trayOut,["auto","delegate"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Message extends a.XFAObject{constructor(e){super(d,"message",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.text=new a.XFAObjectArray}}class NumericEdit extends a.XFAObject{constructor(e){super(d,"numericEdit",!0);this.hScrollPolicy=(0,o.getStringOption)(e.hScrollPolicy,["auto","off","on"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.comb=null;this.extras=null;this.margin=null}[a.$toHTML](e){const t=(0,s.toStyle)(this,"border","font","margin"),r=this[a.$getParent]()[a.$getParent](),i={name:"input",attributes:{type:"text",fieldId:r[a.$uid],dataId:r[a.$data]&&r[a.$data][a.$uid]||r[a.$uid],class:["xfaTextfield"],style:t,"aria-label":ariaLabel(r)}};return o.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[i]})}}class Occur extends a.XFAObject{constructor(e){super(d,"occur",!0);this.id=e.id||"";this.initial=""!==e.initial?(0,o.getInteger)({data:e.initial,defaultValue:"",validate:e=>!0}):"";this.max=""!==e.max?(0,o.getInteger)({data:e.max,defaultValue:1,validate:e=>!0}):"";this.min=""!==e.min?(0,o.getInteger)({data:e.min,defaultValue:1,validate:e=>!0}):"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}[a.$clean](){const e=this[a.$getParent](),t=this.min;""===this.min&&(this.min=e instanceof PageArea||e instanceof PageSet?0:1);""===this.max&&(this.max=""===t?e instanceof PageArea||e instanceof PageSet?-1:1:this.min);-1!==this.max&&this.max!0});this.name=e.name||"";this.numbered=(0,o.getInteger)({data:e.numbered,defaultValue:1,validate:e=>!0});this.oddOrEven=(0,o.getStringOption)(e.oddOrEven,["any","even","odd"]);this.pagePosition=(0,o.getStringOption)(e.pagePosition,["any","first","last","only","rest"]);this.relevant=(0,o.getRelevant)(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.desc=null;this.extras=null;this.medium=null;this.occur=null;this.area=new a.XFAObjectArray;this.contentArea=new a.XFAObjectArray;this.draw=new a.XFAObjectArray;this.exclGroup=new a.XFAObjectArray;this.field=new a.XFAObjectArray;this.subform=new a.XFAObjectArray}[a.$isUsable](){if(!this[a.$extra]){this[a.$extra]={numberOfUse:0};return!0}return!this.occur||-1===this.occur.max||this[a.$extra].numberOfUsee.oddOrEven===t&&e.pagePosition===r));if(i)return i;i=this.pageArea.children.find((e=>"any"===e.oddOrEven&&e.pagePosition===r));if(i)return i;i=this.pageArea.children.find((e=>"any"===e.oddOrEven&&"any"===e.pagePosition));return i||this.pageArea.children[0]}}class Para extends a.XFAObject{constructor(e){super(d,"para",!0);this.hAlign=(0,o.getStringOption)(e.hAlign,["left","center","justify","justifyAll","radix","right"]);this.id=e.id||"";this.lineHeight=e.lineHeight?(0,o.getMeasurement)(e.lineHeight,"0pt"):"";this.marginLeft=e.marginLeft?(0,o.getMeasurement)(e.marginLeft,"0pt"):"";this.marginRight=e.marginRight?(0,o.getMeasurement)(e.marginRight,"0pt"):"";this.orphans=(0,o.getInteger)({data:e.orphans,defaultValue:0,validate:e=>e>=0});this.preserve=e.preserve||"";this.radixOffset=e.radixOffset?(0,o.getMeasurement)(e.radixOffset,"0pt"):"";this.spaceAbove=e.spaceAbove?(0,o.getMeasurement)(e.spaceAbove,"0pt"):"";this.spaceBelow=e.spaceBelow?(0,o.getMeasurement)(e.spaceBelow,"0pt"):"";this.tabDefault=e.tabDefault?(0,o.getMeasurement)(this.tabDefault):"";this.tabStops=(e.tabStops||"").trim().split(/\s+/).map(((e,t)=>t%2==1?(0,o.getMeasurement)(e):e));this.textIndent=e.textIndent?(0,o.getMeasurement)(e.textIndent,"0pt"):"";this.use=e.use||"";this.usehref=e.usehref||"";this.vAlign=(0,o.getStringOption)(e.vAlign,["top","bottom","middle"]);this.widows=(0,o.getInteger)({data:e.widows,defaultValue:0,validate:e=>e>=0});this.hyphenation=null}[a.$toStyle](){const e=(0,s.toStyle)(this,"hAlign");""!==this.marginLeft&&(e.paddingLeft=(0,s.measureToString)(this.marginLeft));""!==this.marginRight&&(e.paddingight=(0,s.measureToString)(this.marginRight));""!==this.spaceAbove&&(e.paddingTop=(0,s.measureToString)(this.spaceAbove));""!==this.spaceBelow&&(e.paddingBottom=(0,s.measureToString)(this.spaceBelow));if(""!==this.textIndent){e.textIndent=(0,s.measureToString)(this.textIndent);(0,s.fixTextIndent)(e)}this.lineHeight>0&&(e.lineHeight=(0,s.measureToString)(this.lineHeight));""!==this.tabDefault&&(e.tabSize=(0,s.measureToString)(this.tabDefault));this.tabStops.length;this.hyphenatation&&Object.assign(e,this.hyphenatation[a.$toStyle]());return e}}class PasswordEdit extends a.XFAObject{constructor(e){super(d,"passwordEdit",!0);this.hScrollPolicy=(0,o.getStringOption)(e.hScrollPolicy,["auto","off","on"]);this.id=e.id||"";this.passwordChar=e.passwordChar||"*";this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.extras=null;this.margin=null}}class Pattern extends a.XFAObject{constructor(e){super(d,"pattern",!0);this.id=e.id||"";this.type=(0,o.getStringOption)(e.type,["crossHatch","crossDiagonal","diagonalLeft","diagonalRight","horizontal","vertical"]);this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[a.$toStyle](e){e=e?e[a.$toStyle]():"#FFFFFF";const t=this.color?this.color[a.$toStyle]():"#000000",r="repeating-linear-gradient",i=`${e},${e} 5px,${t} 5px,${t} 10px`;switch(this.type){case"crossHatch":return`${r}(to top,${i}) ${r}(to right,${i})`;case"crossDiagonal":return`${r}(45deg,${i}) ${r}(-45deg,${i})`;case"diagonalLeft":return`${r}(45deg,${i})`;case"diagonalRight":return`${r}(-45deg,${i})`;case"horizontal":return`${r}(to top,${i})`;case"vertical":return`${r}(to right,${i})`}return""}}class Picture extends a.StringObject{constructor(e){super(d,"picture");this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Proto extends a.XFAObject{constructor(e){super(d,"proto",!0);this.appearanceFilter=new a.XFAObjectArray;this.arc=new a.XFAObjectArray;this.area=new a.XFAObjectArray;this.assist=new a.XFAObjectArray;this.barcode=new a.XFAObjectArray;this.bindItems=new a.XFAObjectArray;this.bookend=new a.XFAObjectArray;this.boolean=new a.XFAObjectArray;this.border=new a.XFAObjectArray;this.break=new a.XFAObjectArray;this.breakAfter=new a.XFAObjectArray;this.breakBefore=new a.XFAObjectArray;this.button=new a.XFAObjectArray;this.calculate=new a.XFAObjectArray;this.caption=new a.XFAObjectArray;this.certificate=new a.XFAObjectArray;this.certificates=new a.XFAObjectArray;this.checkButton=new a.XFAObjectArray;this.choiceList=new a.XFAObjectArray;this.color=new a.XFAObjectArray;this.comb=new a.XFAObjectArray;this.connect=new a.XFAObjectArray;this.contentArea=new a.XFAObjectArray;this.corner=new a.XFAObjectArray;this.date=new a.XFAObjectArray;this.dateTime=new a.XFAObjectArray;this.dateTimeEdit=new a.XFAObjectArray;this.decimal=new a.XFAObjectArray;this.defaultUi=new a.XFAObjectArray;this.desc=new a.XFAObjectArray;this.digestMethod=new a.XFAObjectArray;this.digestMethods=new a.XFAObjectArray;this.draw=new a.XFAObjectArray;this.edge=new a.XFAObjectArray;this.encoding=new a.XFAObjectArray;this.encodings=new a.XFAObjectArray;this.encrypt=new a.XFAObjectArray;this.encryptData=new a.XFAObjectArray;this.encryption=new a.XFAObjectArray;this.encryptionMethod=new a.XFAObjectArray;this.encryptionMethods=new a.XFAObjectArray;this.event=new a.XFAObjectArray;this.exData=new a.XFAObjectArray;this.exObject=new a.XFAObjectArray;this.exclGroup=new a.XFAObjectArray;this.execute=new a.XFAObjectArray;this.extras=new a.XFAObjectArray;this.field=new a.XFAObjectArray;this.fill=new a.XFAObjectArray;this.filter=new a.XFAObjectArray;this.float=new a.XFAObjectArray;this.font=new a.XFAObjectArray;this.format=new a.XFAObjectArray;this.handler=new a.XFAObjectArray;this.hyphenation=new a.XFAObjectArray;this.image=new a.XFAObjectArray;this.imageEdit=new a.XFAObjectArray;this.integer=new a.XFAObjectArray;this.issuers=new a.XFAObjectArray;this.items=new a.XFAObjectArray;this.keep=new a.XFAObjectArray;this.keyUsage=new a.XFAObjectArray;this.line=new a.XFAObjectArray;this.linear=new a.XFAObjectArray;this.lockDocument=new a.XFAObjectArray;this.manifest=new a.XFAObjectArray;this.margin=new a.XFAObjectArray;this.mdp=new a.XFAObjectArray;this.medium=new a.XFAObjectArray;this.message=new a.XFAObjectArray;this.numericEdit=new a.XFAObjectArray;this.occur=new a.XFAObjectArray;this.oid=new a.XFAObjectArray;this.oids=new a.XFAObjectArray;this.overflow=new a.XFAObjectArray;this.pageArea=new a.XFAObjectArray;this.pageSet=new a.XFAObjectArray;this.para=new a.XFAObjectArray;this.passwordEdit=new a.XFAObjectArray;this.pattern=new a.XFAObjectArray;this.picture=new a.XFAObjectArray;this.radial=new a.XFAObjectArray;this.reason=new a.XFAObjectArray;this.reasons=new a.XFAObjectArray;this.rectangle=new a.XFAObjectArray;this.ref=new a.XFAObjectArray;this.script=new a.XFAObjectArray;this.setProperty=new a.XFAObjectArray;this.signData=new a.XFAObjectArray;this.signature=new a.XFAObjectArray;this.signing=new a.XFAObjectArray;this.solid=new a.XFAObjectArray;this.speak=new a.XFAObjectArray;this.stipple=new a.XFAObjectArray;this.subform=new a.XFAObjectArray;this.subformSet=new a.XFAObjectArray;this.subjectDN=new a.XFAObjectArray;this.subjectDNs=new a.XFAObjectArray;this.submit=new a.XFAObjectArray;this.text=new a.XFAObjectArray;this.textEdit=new a.XFAObjectArray;this.time=new a.XFAObjectArray;this.timeStamp=new a.XFAObjectArray;this.toolTip=new a.XFAObjectArray;this.traversal=new a.XFAObjectArray;this.traverse=new a.XFAObjectArray;this.ui=new a.XFAObjectArray;this.validate=new a.XFAObjectArray;this.value=new a.XFAObjectArray;this.variables=new a.XFAObjectArray}}class Radial extends a.XFAObject{constructor(e){super(d,"radial",!0);this.id=e.id||"";this.type=(0,o.getStringOption)(e.type,["toEdge","toCenter"]);this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[a.$toStyle](e){e=e?e[a.$toStyle]():"#FFFFFF";const t=this.color?this.color[a.$toStyle]():"#000000";return`radial-gradient(circle at center, ${"toEdge"===this.type?`${e},${t}`:`${t},${e}`})`}}class Reason extends a.StringObject{constructor(e){super(d,"reason");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Reasons extends a.XFAObject{constructor(e){super(d,"reasons",!0);this.id=e.id||"";this.type=(0,o.getStringOption)(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.reason=new a.XFAObjectArray}}class Rectangle extends a.XFAObject{constructor(e){super(d,"rectangle",!0);this.hand=(0,o.getStringOption)(e.hand,["even","left","right"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.corner=new a.XFAObjectArray(4);this.edge=new a.XFAObjectArray(4);this.fill=null}[a.$toHTML](){const e=this.edge.children.length?this.edge.children[0]:new Edge({}),t=e[a.$toStyle](),r=Object.create(null);this.fill&&"visible"===this.fill.presence?Object.assign(r,this.fill[a.$toStyle]()):r.fill="transparent";r.strokeWidth=(0,s.measureToString)("visible"===e.presence?e.thickness:0);r.stroke=t.color;const i=(this.corner.children.length?this.corner.children[0]:new Corner({}))[a.$toStyle](),n={name:"svg",children:[{name:"rect",attributes:{xmlns:f,width:"100%",height:"100%",x:0,y:0,rx:i.radius,ry:i.radius,style:r}}],attributes:{xmlns:f,style:{overflow:"visible"},width:"100%",height:"100%"}};if(hasMargin(this[a.$getParent]()[a.$getParent]()))return o.HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[n]});n.attributes.style.position="absolute";return o.HTMLResult.success(n)}}class RefElement extends a.StringObject{constructor(e){super(d,"ref");this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Script extends a.StringObject{constructor(e){super(d,"script");this.binding=e.binding||"";this.contentType=e.contentType||"";this.id=e.id||"";this.name=e.name||"";this.runAt=(0,o.getStringOption)(e.runAt,["client","both","server"]);this.use=e.use||"";this.usehref=e.usehref||""}}class SetProperty extends a.XFAObject{constructor(e){super(d,"setProperty");this.connection=e.connection||"";this.ref=e.ref||"";this.target=e.target||""}}t.SetProperty=SetProperty;class SignData extends a.XFAObject{constructor(e){super(d,"signData",!0);this.id=e.id||"";this.operation=(0,o.getStringOption)(e.operation,["sign","clear","verify"]);this.ref=e.ref||"";this.target=e.target||"";this.use=e.use||"";this.usehref=e.usehref||"";this.filter=null;this.manifest=null}}class Signature extends a.XFAObject{constructor(e){super(d,"signature",!0);this.id=e.id||"";this.type=(0,o.getStringOption)(e.type,["PDF1.3","PDF1.6"]);this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.extras=null;this.filter=null;this.manifest=null;this.margin=null}}class Signing extends a.XFAObject{constructor(e){super(d,"signing",!0);this.id=e.id||"";this.type=(0,o.getStringOption)(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.certificate=new a.XFAObjectArray}}class Solid extends a.XFAObject{constructor(e){super(d,"solid",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}[a.$toStyle](e){return e?e[a.$toStyle]():"#FFFFFF"}}class Speak extends a.StringObject{constructor(e){super(d,"speak");this.disable=(0,o.getInteger)({data:e.disable,defaultValue:0,validate:e=>1===e});this.id=e.id||"";this.priority=(0,o.getStringOption)(e.priority,["custom","caption","name","toolTip"]);this.rid=e.rid||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Stipple extends a.XFAObject{constructor(e){super(d,"stipple",!0);this.id=e.id||"";this.rate=(0,o.getInteger)({data:e.rate,defaultValue:50,validate:e=>e>=0&&e<=100});this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[a.$toStyle](e){const t=this.rate/100;return c.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))}}class Subform extends a.XFAObject{constructor(e){super(d,"subform",!0);this.access=(0,o.getStringOption)(e.access,["open","nonInteractive","protected","readOnly"]);this.allowMacro=(0,o.getInteger)({data:e.allowMacro,defaultValue:0,validate:e=>1===e});this.anchorType=(0,o.getStringOption)(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]);this.colSpan=(0,o.getInteger)({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e});this.columnWidths=(e.columnWidths||"").trim().split(/\s+/).map((e=>"-1"===e?-1:(0,o.getMeasurement)(e)));this.h=e.h?(0,o.getMeasurement)(e.h):"";this.hAlign=(0,o.getStringOption)(e.hAlign,["left","center","justify","justifyAll","radix","right"]);this.id=e.id||"";this.layout=(0,o.getStringOption)(e.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]);this.locale=e.locale||"";this.maxH=(0,o.getMeasurement)(e.maxH,"0pt");this.maxW=(0,o.getMeasurement)(e.maxW,"0pt");this.mergeMode=(0,o.getStringOption)(e.mergeMode,["consumeData","matchTemplate"]);this.minH=(0,o.getMeasurement)(e.minH,"0pt");this.minW=(0,o.getMeasurement)(e.minW,"0pt");this.name=e.name||"";this.presence=(0,o.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]);this.relevant=(0,o.getRelevant)(e.relevant);this.restoreState=(0,o.getStringOption)(e.restoreState,["manual","auto"]);this.scope=(0,o.getStringOption)(e.scope,["name","none"]);this.use=e.use||"";this.usehref=e.usehref||"";this.w=e.w?(0,o.getMeasurement)(e.w):"";this.x=(0,o.getMeasurement)(e.x,"0pt");this.y=(0,o.getMeasurement)(e.y,"0pt");this.assist=null;this.bind=null;this.bookend=null;this.border=null;this.break=null;this.calculate=null;this.desc=null;this.extras=null;this.keep=null;this.margin=null;this.occur=null;this.overflow=null;this.pageSet=null;this.para=null;this.traversal=null;this.validate=null;this.variables=null;this.area=new a.XFAObjectArray;this.breakAfter=new a.XFAObjectArray;this.breakBefore=new a.XFAObjectArray;this.connect=new a.XFAObjectArray;this.draw=new a.XFAObjectArray;this.event=new a.XFAObjectArray;this.exObject=new a.XFAObjectArray;this.exclGroup=new a.XFAObjectArray;this.field=new a.XFAObjectArray;this.proto=new a.XFAObjectArray;this.setProperty=new a.XFAObjectArray;this.subform=new a.XFAObjectArray;this.subformSet=new a.XFAObjectArray}[a.$getSubformParent](){const e=this[a.$getParent]();return e instanceof SubformSet?e[a.$getSubformParent]():e}[a.$isBindable](){return!0}[a.$isThereMoreWidth](){return this.layout.endsWith("-tb")&&0===this[a.$extra].attempt&&this[a.$extra].numberInLine>0||this[a.$getParent]()[a.$isThereMoreWidth]()}*[a.$getContainedChildren](){yield*getContainedChildren(this)}[a.$flushHTML](){return(0,n.flushHTML)(this)}[a.$addHTML](e,t){(0,n.addHTML)(this,e,t)}[a.$getAvailableSpace](){return(0,n.getAvailableSpace)(this)}[a.$isSplittable](){const e=this[a.$getSubformParent]();if(!e[a.$isSplittable]())return!1;if(void 0!==this[a.$extra]._isSplittable)return this[a.$extra]._isSplittable;if("position"===this.layout||this.layout.includes("row")){this[a.$extra]._isSplittable=!1;return!1}if(this.keep&&"none"!==this.keep.intact){this[a.$extra]._isSplittable=!1;return!1}if(e.layout&&e.layout.endsWith("-tb")&&0!==e[a.$extra].numberInLine)return!1;this[a.$extra]._isSplittable=!0;return!0}[a.$toHTML](e){setTabIndex(this);if(this.break){if("auto"!==this.break.after||""!==this.break.afterTarget){const e=new BreakAfter({targetType:this.break.after,target:this.break.afterTarget,startNew:this.break.startNew.toString()});e[a.$globalData]=this[a.$globalData];this[a.$appendChild](e);this.breakAfter.push(e)}if("auto"!==this.break.before||""!==this.break.beforeTarget){const e=new BreakBefore({targetType:this.break.before,target:this.break.beforeTarget,startNew:this.break.startNew.toString()});e[a.$globalData]=this[a.$globalData];this[a.$appendChild](e);this.breakBefore.push(e)}if(""!==this.break.overflowTarget){const e=new Overflow({target:this.break.overflowTarget,leader:this.break.overflowLeader,trailer:this.break.overflowTrailer});e[a.$globalData]=this[a.$globalData];this[a.$appendChild](e);this.overflow.push(e)}this[a.$removeChild](this.break);this.break=null}if("hidden"===this.presence||"inactive"===this.presence)return o.HTMLResult.EMPTY;(this.breakBefore.children.length>1||this.breakAfter.children.length>1)&&(0,c.warn)("XFA - Several breakBefore or breakAfter in subforms: please file a bug.");if(this.breakBefore.children.length>=1){const e=this.breakBefore.children[0];if(handleBreak(e))return o.HTMLResult.breakNode(e)}if(this[a.$extra]&&this[a.$extra].afterBreakAfter)return o.HTMLResult.EMPTY;(0,s.fixDimensions)(this);const t=[],r={id:this[a.$uid],class:[]};(0,s.setAccess)(this,r.class);this[a.$extra]||(this[a.$extra]=Object.create(null));Object.assign(this[a.$extra],{children:t,line:null,attributes:r,attempt:0,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,e.width),height:Math.min(this.h||1/0,e.height)},width:0,height:0,prevHeight:0,currentWidth:0});const i=this[a.$getTemplateRoot](),l=i[a.$extra].noLayoutFailure,h=this[a.$isSplittable]();h||setFirstUnsplittable(this);if(!(0,n.checkDimensions)(this,e))return o.HTMLResult.FAILURE;const u=new Set(["area","draw","exclGroup","field","subform","subformSet"]);if(this.layout.includes("row")){const e=this[a.$getSubformParent]().columnWidths;if(Array.isArray(e)&&e.length>0){this[a.$extra].columnWidths=e;this[a.$extra].currentColumn=0}}const d=(0,s.toStyle)(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),f=["xfaSubform"],g=(0,s.layoutClass)(this);g&&f.push(g);r.style=d;r.class=f;this.name&&(r.xfaName=this.name);if(this.overflow){const t=this.overflow[a.$getExtra]();if(t.addLeader){t.addLeader=!1;handleOverflow(this,t.leader,e)}}this[a.$pushPara]();const p="lr-tb"===this.layout||"rl-tb"===this.layout,m=p?2:1;for(;this[a.$extra].attempt=1){const e=this.breakAfter.children[0];if(handleBreak(e)){this[a.$extra].afterBreakAfter=C;return o.HTMLResult.breakNode(e)}}delete this[a.$extra];return C}}class SubformSet extends a.XFAObject{constructor(e){super(d,"subformSet",!0);this.id=e.id||"";this.name=e.name||"";this.relation=(0,o.getStringOption)(e.relation,["ordered","choice","unordered"]);this.relevant=(0,o.getRelevant)(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.bookend=null;this.break=null;this.desc=null;this.extras=null;this.occur=null;this.overflow=null;this.breakAfter=new a.XFAObjectArray;this.breakBefore=new a.XFAObjectArray;this.subform=new a.XFAObjectArray;this.subformSet=new a.XFAObjectArray}*[a.$getContainedChildren](){yield*getContainedChildren(this)}[a.$getSubformParent](){let e=this[a.$getParent]();for(;!(e instanceof Subform);)e=e[a.$getParent]();return e}[a.$isBindable](){return!0}}class SubjectDN extends a.ContentObject{constructor(e){super(d,"subjectDN");this.delimiter=e.delimiter||",";this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[a.$finalize](){this[a.$content]=new Map(this[a.$content].split(this.delimiter).map((e=>{(e=e.split("=",2))[0]=e[0].trim();return e})))}}class SubjectDNs extends a.XFAObject{constructor(e){super(d,"subjectDNs",!0);this.id=e.id||"";this.type=(0,o.getStringOption)(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.subjectDN=new a.XFAObjectArray}}class Submit extends a.XFAObject{constructor(e){super(d,"submit",!0);this.embedPDF=(0,o.getInteger)({data:e.embedPDF,defaultValue:0,validate:e=>1===e});this.format=(0,o.getStringOption)(e.format,["xdp","formdata","pdf","urlencoded","xfd","xml"]);this.id=e.id||"";this.target=e.target||"";this.textEncoding=(0,o.getKeyword)({data:e.textEncoding?e.textEncoding.toLowerCase():"",defaultValue:"",validate:e=>["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-\d{2}/)});this.use=e.use||"";this.usehref=e.usehref||"";this.xdpContent=e.xdpContent||"";this.encrypt=null;this.encryptData=new a.XFAObjectArray;this.signData=new a.XFAObjectArray}}class Template extends a.XFAObject{constructor(e){super(d,"template",!0);this.baseProfile=(0,o.getStringOption)(e.baseProfile,["full","interactiveForms"]);this.extras=null;this.subform=new a.XFAObjectArray}[a.$finalize](){0===this.subform.children.length&&(0,c.warn)("XFA - No subforms in template node.");this.subform.children.length>=2&&(0,c.warn)("XFA - Several subforms in template node: please file a bug.");this[a.$tabIndex]=5e3}[a.$isSplittable](){return!0}[a.$searchNode](e,t){return e.startsWith("#")?[this[a.$ids].get(e.slice(1))]:(0,u.searchNode)(this,t,e,!0,!0)}[a.$toHTML](){if(!this.subform.children.length)return o.HTMLResult.success({name:"div",children:[]});this[a.$extra]={overflowNode:null,firstUnsplittable:null,currentContentArea:null,currentPageArea:null,noLayoutFailure:!1,pageNumber:1,pagePosition:"first",oddOrEven:"odd",blankOrNotBlank:"nonBlank",paraStack:[]};const e=this.subform.children[0];e.pageSet[a.$cleanPage]();const t=e.pageSet.pageArea.children,r={name:"div",children:[]};let i=null,n=null,s=null;if(e.breakBefore.children.length>=1){n=e.breakBefore.children[0];s=n.target}else if(e.subform.children.length>=1&&e.subform.children[0].breakBefore.children.length>=1){n=e.subform.children[0].breakBefore.children[0];s=n.target}else if(e.break&&e.break.beforeTarget){n=e.break;s=n.beforeTarget}else if(e.subform.children.length>=1&&e.subform.children[0].break&&e.subform.children[0].break.beforeTarget){n=e.subform.children[0].break;s=n.beforeTarget}if(n){const e=this[a.$searchNode](s,n[a.$getParent]());if(e instanceof PageArea){i=e;n[a.$extra]={}}}i||(i=t[0]);i[a.$extra]={numberOfUse:1};const l=i[a.$getParent]();l[a.$extra]={numberOfUse:1,pageIndex:l.pageArea.children.indexOf(i),pageSetIndex:0};let h,u=null,d=null,f=!0,g=0,p=0;for(;;){if(f)g=0;else{r.children.pop();if(3==++g){(0,c.warn)("XFA - Something goes wrong: please file a bug.");return r}}h=null;this[a.$extra].currentPageArea=i;const t=i[a.$toHTML]().html;r.children.push(t);if(u){this[a.$extra].noLayoutFailure=!0;t.children.push(u[a.$toHTML](i[a.$extra].space).html);u=null}if(d){this[a.$extra].noLayoutFailure=!0;t.children.push(d[a.$toHTML](i[a.$extra].space).html);d=null}const n=i.contentArea.children,s=t.children.filter((e=>e.attributes.class.includes("xfaContentarea")));f=!1;this[a.$extra].firstUnsplittable=null;this[a.$extra].noLayoutFailure=!1;const flush=t=>{const r=e[a.$flushHTML]();if(r){f=f||r.children&&0!==r.children.length;s[t].children.push(r)}};for(let t=p,i=n.length;te===i));if(-1!==e)e>s?t=e-1:p=e;else{h=i[a.$getParent]();p=h.contentArea.children.findIndex((e=>e===i))}}}else flush(t)}this[a.$extra].pageNumber+=1;h&&(h[a.$isUsable]()?h[a.$extra].numberOfUse+=1:h=null);i=h||i[a.$getNextPage]()}}}t.Template=Template;class Text extends a.ContentObject{constructor(e){super(d,"text");this.id=e.id||"";this.maxChars=(0,o.getInteger)({data:e.maxChars,defaultValue:0,validate:e=>e>=0});this.name=e.name||"";this.rid=e.rid||"";this.use=e.use||"";this.usehref=e.usehref||""}[a.$acceptWhitespace](){return!0}[a.$onChild](e){if(e[a.$namespaceId]===i.NamespaceIds.xhtml.id){this[a.$content]=e;return!0}(0,c.warn)(`XFA - Invalid content in Text: ${e[a.$nodeName]}.`);return!1}[a.$onText](e){this[a.$content]instanceof a.XFAObject||super[a.$onText](e)}[a.$finalize](){"string"==typeof this[a.$content]&&(this[a.$content]=this[a.$content].replace(/\r\n/g,"\n"))}[a.$getExtra](){return"string"==typeof this[a.$content]?this[a.$content].split(/[\u2029\u2028\n]/).reduce(((e,t)=>{t&&e.push(t);return e}),[]).join("\n"):this[a.$content][a.$text]()}[a.$toHTML](e){if("string"==typeof this[a.$content]){const e=valueToHtml(this[a.$content]).html;if(this[a.$content].includes("\u2029")){e.name="div";e.children=[];this[a.$content].split("\u2029").map((e=>e.split(/[\u2028\n]/).reduce(((e,t)=>{e.push({name:"span",value:t},{name:"br"});return e}),[]))).forEach((t=>{e.children.push({name:"p",children:t})}))}else if(/[\u2028\n]/.test(this[a.$content])){e.name="div";e.children=[];this[a.$content].split(/[\u2028\n]/).forEach((t=>{e.children.push({name:"span",value:t},{name:"br"})}))}return o.HTMLResult.success(e)}return this[a.$content][a.$toHTML](e)}}t.Text=Text;class TextEdit extends a.XFAObject{constructor(e){super(d,"textEdit",!0);this.allowRichText=(0,o.getInteger)({data:e.allowRichText,defaultValue:0,validate:e=>1===e});this.hScrollPolicy=(0,o.getStringOption)(e.hScrollPolicy,["auto","off","on"]);this.id=e.id||"";this.multiLine=(0,o.getInteger)({data:e.multiLine,defaultValue:"",validate:e=>0===e||1===e});this.use=e.use||"";this.usehref=e.usehref||"";this.vScrollPolicy=(0,o.getStringOption)(e.vScrollPolicy,["auto","off","on"]);this.border=null;this.comb=null;this.extras=null;this.margin=null}[a.$toHTML](e){const t=(0,s.toStyle)(this,"border","font","margin");let r;const i=this[a.$getParent]()[a.$getParent]();""===this.multiLine&&(this.multiLine=i instanceof Draw?1:0);r=1===this.multiLine?{name:"textarea",attributes:{dataId:i[a.$data]&&i[a.$data][a.$uid]||i[a.$uid],fieldId:i[a.$uid],class:["xfaTextfield"],style:t,"aria-label":ariaLabel(i)}}:{name:"input",attributes:{type:"text",dataId:i[a.$data]&&i[a.$data][a.$uid]||i[a.$uid],fieldId:i[a.$uid],class:["xfaTextfield"],style:t,"aria-label":ariaLabel(i)}};return o.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[r]})}}class Time extends a.StringObject{constructor(e){super(d,"time");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[a.$finalize](){const e=this[a.$content].trim();this[a.$content]=e?new Date(e):null}[a.$toHTML](e){return valueToHtml(this[a.$content]?this[a.$content].toString():"")}}class TimeStamp extends a.XFAObject{constructor(e){super(d,"timeStamp");this.id=e.id||"";this.server=e.server||"";this.type=(0,o.getStringOption)(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||""}}class ToolTip extends a.StringObject{constructor(e){super(d,"toolTip");this.id=e.id||"";this.rid=e.rid||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Traversal extends a.XFAObject{constructor(e){super(d,"traversal",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.traverse=new a.XFAObjectArray}}class Traverse extends a.XFAObject{constructor(e){super(d,"traverse",!0);this.id=e.id||"";this.operation=(0,o.getStringOption)(e.operation,["next","back","down","first","left","right","up"]);this.ref=e.ref||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.script=null}get name(){return this.operation}[a.$isTransparent](){return!1}}class Ui extends a.XFAObject{constructor(e){super(d,"ui",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.picture=null;this.barcode=null;this.button=null;this.checkButton=null;this.choiceList=null;this.dateTimeEdit=null;this.defaultUi=null;this.imageEdit=null;this.numericEdit=null;this.passwordEdit=null;this.signature=null;this.textEdit=null}[a.$getExtra](){if(void 0===this[a.$extra]){for(const e of Object.getOwnPropertyNames(this)){if("extras"===e||"picture"===e)continue;const t=this[e];if(t instanceof a.XFAObject){this[a.$extra]=t;return t}}this[a.$extra]=null}return this[a.$extra]}[a.$toHTML](e){const t=this[a.$getExtra]();return t?t[a.$toHTML](e):o.HTMLResult.EMPTY}}class Validate extends a.XFAObject{constructor(e){super(d,"validate",!0);this.formatTest=(0,o.getStringOption)(e.formatTest,["warning","disabled","error"]);this.id=e.id||"";this.nullTest=(0,o.getStringOption)(e.nullTest,["disabled","error","warning"]);this.scriptTest=(0,o.getStringOption)(e.scriptTest,["error","disabled","warning"]);this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.message=null;this.picture=null;this.script=null}}class Value extends a.XFAObject{constructor(e){super(d,"value",!0);this.id=e.id||"";this.override=(0,o.getInteger)({data:e.override,defaultValue:0,validate:e=>1===e});this.relevant=(0,o.getRelevant)(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.arc=null;this.boolean=null;this.date=null;this.dateTime=null;this.decimal=null;this.exData=null;this.float=null;this.image=null;this.integer=null;this.line=null;this.rectangle=null;this.text=null;this.time=null}[a.$setValue](e){const t=this[a.$getParent]();if(t instanceof Field&&t.ui&&t.ui.imageEdit){if(!this.image){this.image=new Image({});this[a.$appendChild](this.image)}this.image[a.$content]=e[a.$content];return}const r=e[a.$nodeName];if(null===this[r]){for(const e of Object.getOwnPropertyNames(this)){const t=this[e];if(t instanceof a.XFAObject){this[e]=null;this[a.$removeChild](t)}}this[e[a.$nodeName]]=e;this[a.$appendChild](e)}else this[r][a.$content]=e[a.$content]}[a.$text](){if(this.exData)return"string"==typeof this.exData[a.$content]?this.exData[a.$content].trim():this.exData[a.$content][a.$text]().trim();for(const e of Object.getOwnPropertyNames(this)){if("image"===e)continue;const t=this[e];if(t instanceof a.XFAObject)return(t[a.$content]||"").toString().trim()}return null}[a.$toHTML](e){for(const t of Object.getOwnPropertyNames(this)){const r=this[t];if(r instanceof a.XFAObject)return r[a.$toHTML](e)}return o.HTMLResult.EMPTY}}t.Value=Value;class Variables extends a.XFAObject{constructor(e){super(d,"variables",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.boolean=new a.XFAObjectArray;this.date=new a.XFAObjectArray;this.dateTime=new a.XFAObjectArray;this.decimal=new a.XFAObjectArray;this.exData=new a.XFAObjectArray;this.float=new a.XFAObjectArray;this.image=new a.XFAObjectArray;this.integer=new a.XFAObjectArray;this.manifest=new a.XFAObjectArray;this.script=new a.XFAObjectArray;this.text=new a.XFAObjectArray;this.time=new a.XFAObjectArray}[a.$isTransparent](){return!0}}class TemplateNamespace{static[i.$buildXFAObject](e,t){if(TemplateNamespace.hasOwnProperty(e)){const r=TemplateNamespace[e](t);r[a.$setSetAttributes](t);return r}}static appearanceFilter(e){return new AppearanceFilter(e)}static arc(e){return new Arc(e)}static area(e){return new Area(e)}static assist(e){return new Assist(e)}static barcode(e){return new Barcode(e)}static bind(e){return new Bind(e)}static bindItems(e){return new BindItems(e)}static bookend(e){return new Bookend(e)}static boolean(e){return new BooleanElement(e)}static border(e){return new Border(e)}static break(e){return new Break(e)}static breakAfter(e){return new BreakAfter(e)}static breakBefore(e){return new BreakBefore(e)}static button(e){return new Button(e)}static calculate(e){return new Calculate(e)}static caption(e){return new Caption(e)}static certificate(e){return new Certificate(e)}static certificates(e){return new Certificates(e)}static checkButton(e){return new CheckButton(e)}static choiceList(e){return new ChoiceList(e)}static color(e){return new Color(e)}static comb(e){return new Comb(e)}static connect(e){return new Connect(e)}static contentArea(e){return new ContentArea(e)}static corner(e){return new Corner(e)}static date(e){return new DateElement(e)}static dateTime(e){return new DateTime(e)}static dateTimeEdit(e){return new DateTimeEdit(e)}static decimal(e){return new Decimal(e)}static defaultUi(e){return new DefaultUi(e)}static desc(e){return new Desc(e)}static digestMethod(e){return new DigestMethod(e)}static digestMethods(e){return new DigestMethods(e)}static draw(e){return new Draw(e)}static edge(e){return new Edge(e)}static encoding(e){return new Encoding(e)}static encodings(e){return new Encodings(e)}static encrypt(e){return new Encrypt(e)}static encryptData(e){return new EncryptData(e)}static encryption(e){return new Encryption(e)}static encryptionMethod(e){return new EncryptionMethod(e)}static encryptionMethods(e){return new EncryptionMethods(e)}static event(e){return new Event(e)}static exData(e){return new ExData(e)}static exObject(e){return new ExObject(e)}static exclGroup(e){return new ExclGroup(e)}static execute(e){return new Execute(e)}static extras(e){return new Extras(e)}static field(e){return new Field(e)}static fill(e){return new Fill(e)}static filter(e){return new Filter(e)}static float(e){return new Float(e)}static font(e){return new Font(e)}static format(e){return new Format(e)}static handler(e){return new Handler(e)}static hyphenation(e){return new Hyphenation(e)}static image(e){return new Image(e)}static imageEdit(e){return new ImageEdit(e)}static integer(e){return new Integer(e)}static issuers(e){return new Issuers(e)}static items(e){return new Items(e)}static keep(e){return new Keep(e)}static keyUsage(e){return new KeyUsage(e)}static line(e){return new Line(e)}static linear(e){return new Linear(e)}static lockDocument(e){return new LockDocument(e)}static manifest(e){return new Manifest(e)}static margin(e){return new Margin(e)}static mdp(e){return new Mdp(e)}static medium(e){return new Medium(e)}static message(e){return new Message(e)}static numericEdit(e){return new NumericEdit(e)}static occur(e){return new Occur(e)}static oid(e){return new Oid(e)}static oids(e){return new Oids(e)}static overflow(e){return new Overflow(e)}static pageArea(e){return new PageArea(e)}static pageSet(e){return new PageSet(e)}static para(e){return new Para(e)}static passwordEdit(e){return new PasswordEdit(e)}static pattern(e){return new Pattern(e)}static picture(e){return new Picture(e)}static proto(e){return new Proto(e)}static radial(e){return new Radial(e)}static reason(e){return new Reason(e)}static reasons(e){return new Reasons(e)}static rectangle(e){return new Rectangle(e)}static ref(e){return new RefElement(e)}static script(e){return new Script(e)}static setProperty(e){return new SetProperty(e)}static signData(e){return new SignData(e)}static signature(e){return new Signature(e)}static signing(e){return new Signing(e)}static solid(e){return new Solid(e)}static speak(e){return new Speak(e)}static stipple(e){return new Stipple(e)}static subform(e){return new Subform(e)}static subformSet(e){return new SubformSet(e)}static subjectDN(e){return new SubjectDN(e)}static subjectDNs(e){return new SubjectDNs(e)}static submit(e){return new Submit(e)}static template(e){return new Template(e)}static text(e){return new Text(e)}static textEdit(e){return new TextEdit(e)}static time(e){return new Time(e)}static timeStamp(e){return new TimeStamp(e)}static toolTip(e){return new ToolTip(e)}static traversal(e){return new Traversal(e)}static traverse(e){return new Traverse(e)}static ui(e){return new Ui(e)}static validate(e){return new Validate(e)}static value(e){return new Value(e)}static variables(e){return new Variables(e)}}t.TemplateNamespace=TemplateNamespace},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.addHTML=function addHTML(e,t,r){const n=e[a.$extra],s=n.availableSpace,[o,c,l,h]=r;switch(e.layout){case"position":n.width=Math.max(n.width,o+l);n.height=Math.max(n.height,c+h);n.children.push(t);break;case"lr-tb":case"rl-tb":if(!n.line||1===n.attempt){n.line=createLine(e,[]);n.children.push(n.line);n.numberInLine=0}n.numberInLine+=1;n.line.children.push(t);if(0===n.attempt){n.currentWidth+=l;n.height=Math.max(n.height,n.prevHeight+h)}else{n.currentWidth=l;n.prevHeight=n.height;n.height+=h;n.attempt=0}n.width=Math.max(n.width,n.currentWidth);break;case"rl-row":case"row":{n.children.push(t);n.width+=l;n.height=Math.max(n.height,h);const e=(0,i.measureToString)(n.height);for(const t of n.children)t.attributes.style.height=e;break}case"table":n.width=Math.min(s.width,Math.max(n.width,l));n.height+=h;n.children.push(t);break;case"tb":n.width=s.width;n.height+=h;n.children.push(t)}};t.checkDimensions=function checkDimensions(e,t){if(null===e[a.$getTemplateRoot]()[a.$extra].firstUnsplittable)return!0;if(0===e.w||0===e.h)return!0;const r=e[a.$getSubformParent](),i=r[a.$extra]&&r[a.$extra].attempt||0,[,n,s,o]=function getTransformedBBox(e){let t,r,a=""===e.w?NaN:e.w,i=""===e.h?NaN:e.h,[n,s]=[0,0];switch(e.anchorType||""){case"bottomCenter":[n,s]=[a/2,i];break;case"bottomLeft":[n,s]=[0,i];break;case"bottomRight":[n,s]=[a,i];break;case"middleCenter":[n,s]=[a/2,i/2];break;case"middleLeft":[n,s]=[0,i/2];break;case"middleRight":[n,s]=[a,i/2];break;case"topCenter":[n,s]=[a/2,0];break;case"topRight":[n,s]=[a,0]}switch(e.rotate||0){case 0:[t,r]=[-n,-s];break;case 90:[t,r]=[-s,n];[a,i]=[i,-a];break;case 180:[t,r]=[n,s];[a,i]=[-a,-i];break;case 270:[t,r]=[s,-n];[a,i]=[-i,a]}return[e.x+t+Math.min(0,a),e.y+r+Math.min(0,i),Math.abs(a),Math.abs(i)]}(e);switch(r.layout){case"lr-tb":case"rl-tb":return 0===i?e[a.$getTemplateRoot]()[a.$extra].noLayoutFailure?""!==e.w?Math.round(s-t.width)<=2:t.width>2:!(""!==e.h&&Math.round(o-t.height)>2)&&(""!==e.w?Math.round(s-t.width)<=2||0===r[a.$extra].numberInLine&&t.height>2:t.width>2):!!e[a.$getTemplateRoot]()[a.$extra].noLayoutFailure||!(""!==e.h&&Math.round(o-t.height)>2)&&((""===e.w||Math.round(s-t.width)<=2||!r[a.$isThereMoreWidth]())&&t.height>2);case"table":case"tb":return!!e[a.$getTemplateRoot]()[a.$extra].noLayoutFailure||(""===e.h||e[a.$isSplittable]()?(""===e.w||Math.round(s-t.width)<=2||!r[a.$isThereMoreWidth]())&&t.height>2:Math.round(o-t.height)<=2);case"position":if(e[a.$getTemplateRoot]()[a.$extra].noLayoutFailure)return!0;if(""===e.h||Math.round(o+n-t.height)<=2)return!0;const c=e[a.$getTemplateRoot]()[a.$extra].currentContentArea;return o+n>c.h;case"rl-row":case"row":return!!e[a.$getTemplateRoot]()[a.$extra].noLayoutFailure||(""===e.h||Math.round(o-t.height)<=2);default:return!0}};t.flushHTML=function flushHTML(e){if(!e[a.$extra])return null;const t={name:"div",attributes:e[a.$extra].attributes,children:e[a.$extra].children};if(e[a.$extra].failingNode){const r=e[a.$extra].failingNode[a.$flushHTML]();r&&(e.layout.endsWith("-tb")?t.children.push(createLine(e,[r])):t.children.push(r))}if(0===t.children.length)return null;return t};t.getAvailableSpace=function getAvailableSpace(e){const t=e[a.$extra].availableSpace,r=e.margin?e.margin.topInset+e.margin.bottomInset:0,i=e.margin?e.margin.leftInset+e.margin.rightInset:0;switch(e.layout){case"lr-tb":case"rl-tb":return 0===e[a.$extra].attempt?{width:t.width-i-e[a.$extra].currentWidth,height:t.height-r-e[a.$extra].prevHeight}:{width:t.width-i,height:t.height-r-e[a.$extra].height};case"rl-row":case"row":return{width:e[a.$extra].columnWidths.slice(e[a.$extra].currentColumn).reduce(((e,t)=>e+t)),height:t.height-i};case"table":case"tb":return{width:t.width-i,height:t.height-r-e[a.$extra].height};default:return t}};var a=r(75),i=r(82);function createLine(e,t){return{name:"div",attributes:{class:["lr-tb"===e.layout?"xfaLr":"xfaRl"]},children:t}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.computeBbox=function computeBbox(e,t,r){let i;if(""!==e.w&&""!==e.h)i=[e.x,e.y,e.w,e.h];else{if(!r)return null;let n=e.w;if(""===n){if(0===e.maxW){const t=e[a.$getSubformParent]();n="position"===t.layout&&""!==t.w?0:e.minW}else n=Math.min(e.maxW,r.width);t.attributes.style.width=measureToString(n)}let s=e.h;if(""===s){if(0===e.maxH){const t=e[a.$getSubformParent]();s="position"===t.layout&&""!==t.h?0:e.minH}else s=Math.min(e.maxH,r.height);t.attributes.style.height=measureToString(s)}i=[e.x,e.y,n,s]}return i};t.createWrapper=function createWrapper(e,t){const{attributes:r}=t,{style:i}=r,n={name:"div",attributes:{class:["xfaWrapper"],style:Object.create(null)},children:[]};r.class.push("xfaWrapped");if(e.border){const{widths:r,insets:s}=e.border[a.$extra];let o,c,l=s[0],h=s[3];const u=s[0]+s[2],d=s[1]+s[3];switch(e.border.hand){case"even":l-=r[0]/2;h-=r[3]/2;o=`calc(100% + ${(r[1]+r[3])/2-d}px)`;c=`calc(100% + ${(r[0]+r[2])/2-u}px)`;break;case"left":l-=r[0];h-=r[3];o=`calc(100% + ${r[1]+r[3]-d}px)`;c=`calc(100% + ${r[0]+r[2]-u}px)`;break;case"right":o=d?`calc(100% - ${d}px)`:"100%";c=u?`calc(100% - ${u}px)`:"100%"}const f=["xfaBorder"];isPrintOnly(e.border)&&f.push("xfaPrintOnly");const g={name:"div",attributes:{class:f,style:{top:`${l}px`,left:`${h}px`,width:o,height:c}},children:[]};for(const e of["border","borderWidth","borderColor","borderRadius","borderStyle"])if(void 0!==i[e]){g.attributes.style[e]=i[e];delete i[e]}n.children.push(g,t)}else n.children.push(t);for(const e of["background","backgroundClip","top","left","width","height","minWidth","minHeight","maxWidth","maxHeight","transform","transformOrigin","visibility"])if(void 0!==i[e]){n.attributes.style[e]=i[e];delete i[e]}"absolute"===i.position?n.attributes.style.position="absolute":n.attributes.style.position="relative";delete i.position;if(i.alignSelf){n.attributes.style.alignSelf=i.alignSelf;delete i.alignSelf}return n};t.fixDimensions=function fixDimensions(e){const t=e[a.$getSubformParent]();if(t.layout&&t.layout.includes("row")){const r=t[a.$extra],i=e.colSpan;let n;n=-1===i?r.columnWidths.slice(r.currentColumn).reduce(((e,t)=>e+t),0):r.columnWidths.slice(r.currentColumn,r.currentColumn+i).reduce(((e,t)=>e+t),0);isNaN(n)||(e.w=n)}t.layout&&"position"!==t.layout&&(e.x=e.y=0);"table"===e.layout&&""===e.w&&Array.isArray(e.columnWidths)&&(e.w=e.columnWidths.reduce(((e,t)=>e+t),0))};t.fixTextIndent=function fixTextIndent(e){const t=(0,n.getMeasurement)(e.textIndent,"0px");if(t>=0)return;const r="padding"+("left"==("right"===e.textAlign?"right":"left")?"Left":"Right"),a=(0,n.getMeasurement)(e[r],"0px");e[r]=a-t+"px"};t.fixURL=function fixURL(e){const t=(0,i.createValidAbsoluteUrl)(e,null,{addDefaultProtocol:!0,tryConvertEncoding:!0});return t?t.href:null};t.isPrintOnly=isPrintOnly;t.layoutClass=function layoutClass(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.layoutNode=function layoutNode(e,t){let r=null,i=null,n=!1;if((!e.w||!e.h)&&e.value){let s=0,o=0;if(e.margin){s=e.margin.leftInset+e.margin.rightInset;o=e.margin.topInset+e.margin.bottomInset}let c=null,l=null;if(e.para){l=Object.create(null);c=""===e.para.lineHeight?null:e.para.lineHeight;l.top=""===e.para.spaceAbove?0:e.para.spaceAbove;l.bottom=""===e.para.spaceBelow?0:e.para.spaceBelow;l.left=""===e.para.marginLeft?0:e.para.marginLeft;l.right=""===e.para.marginRight?0:e.para.marginRight}let h=e.font;if(!h){const t=e[a.$getTemplateRoot]();let r=e[a.$getParent]();for(;r!==t;){if(r.font){h=r.font;break}r=r[a.$getParent]()}}const u=(e.w?e.w:t.width)-s,d=e[a.$globalData].fontFinder;if(e.value.exData&&e.value.exData[a.$content]&&"text/html"===e.value.exData.contentType){const t=layoutText(e.value.exData[a.$content],h,l,c,d,u);i=t.width;r=t.height;n=t.isBroken}else{const t=e.value[a.$text]();if(t){const e=layoutText(t,h,l,c,d,u);i=e.width;r=e.height;n=e.isBroken}}null===i||e.w||(i+=s);null===r||e.h||(r+=o)}return{w:i,h:r,isBroken:n}};t.measureToString=measureToString;t.setAccess=function setAccess(e,t){switch(e.access){case"nonInteractive":t.push("xfaNonInteractive");break;case"readOnly":t.push("xfaReadOnly");break;case"protected":t.push("xfaDisabled")}};t.setFontFamily=function setFontFamily(e,t,r,a){const i=(0,n.stripQuotes)(e.typeface),o=r.find(i);a.fontFamily=`"${i}"`;if(o){const{fontFamily:r}=o.regular.cssFontInfo;r!==i&&(a.fontFamily=`"${r}"`);const n=getCurrentPara(t);if(n&&""!==n.lineHeight)return;if(a.lineHeight)return;const c=(0,s.selectFont)(e,o);c&&(a.lineHeight=Math.max(1.2,c.lineHeight))}};t.setMinMaxDimensions=function setMinMaxDimensions(e,t){if("position"===e[a.$getSubformParent]().layout){e.minW>0&&(t.minWidth=measureToString(e.minW));e.maxW>0&&(t.maxWidth=measureToString(e.maxW));e.minH>0&&(t.minHeight=measureToString(e.minH));e.maxH>0&&(t.maxHeight=measureToString(e.maxH))}};t.setPara=function setPara(e,t,r){if(r.attributes.class&&r.attributes.class.includes("xfaRich")){if(t){""===e.h&&(t.height="auto");""===e.w&&(t.width="auto")}const i=getCurrentPara(e);if(i){const e=r.attributes.style;e.display="flex";e.flexDirection="column";switch(i.vAlign){case"top":e.justifyContent="start";break;case"bottom":e.justifyContent="end";break;case"middle":e.justifyContent="center"}const t=i[a.$toStyle]();for(const[r,a]of Object.entries(t))r in e||(e[r]=a)}}};t.toStyle=function toStyle(e,...t){const r=Object.create(null);for(const n of t){const t=e[n];if(null!==t)if(c.hasOwnProperty(n))c[n](e,r);else if(t instanceof a.XFAObject){const e=t[a.$toStyle]();e?Object.assign(r,e):(0,i.warn)(`(DEBUG) - XFA - style for ${n} not implemented yet`)}}return r};var a=r(75),i=r(2),n=r(76),s=r(83),o=r(84);function measureToString(e){return"string"==typeof e?"0px":Number.isInteger(e)?`${e}px`:`${e.toFixed(2)}px`}const c={anchorType(e,t){const r=e[a.$getSubformParent]();if(r&&(!r.layout||"position"===r.layout)){"transform"in t||(t.transform="");switch(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(e,t){const r=e[a.$getSubformParent]();let i=e.w;const n=e.h;if(r.layout&&r.layout.includes("row")){const t=r[a.$extra],n=e.colSpan;let s;if(-1===n){s=t.columnWidths.slice(t.currentColumn).reduce(((e,t)=>e+t),0);t.currentColumn=0}else{s=t.columnWidths.slice(t.currentColumn,t.currentColumn+n).reduce(((e,t)=>e+t),0);t.currentColumn=(t.currentColumn+e.colSpan)%t.columnWidths.length}isNaN(s)||(i=e.w=s)}t.width=""!==i?measureToString(i):"auto";t.height=""!==n?measureToString(n):"auto"},position(e,t){const r=e[a.$getSubformParent]();if(!r||!r.layout||"position"===r.layout){t.position="absolute";t.left=measureToString(e.x);t.top=measureToString(e.y)}},rotate(e,t){if(e.rotate){"transform"in t||(t.transform="");t.transform+=`rotate(-${e.rotate}deg)`;t.transformOrigin="top left"}},presence(e,t){switch(e.presence){case"invisible":t.visibility="hidden";break;case"hidden":case"inactive":t.display="none"}},hAlign(e,t){if("para"===e[a.$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"left":t.alignSelf="start";break;case"center":t.alignSelf="center";break;case"right":t.alignSelf="end"}},margin(e,t){e.margin&&(t.margin=e.margin[a.$toStyle]().margin)}};function layoutText(e,t,r,i,n,s){const c=new o.TextMeasure(t,r,i,n);"string"==typeof e?c.addString(e):e[a.$pushGlyphs](c);return c.compute(s)}function isPrintOnly(e){return e.relevant.length>0&&!e.relevant[0].excluded&&"print"===e.relevant[0].viewname}function getCurrentPara(e){const t=e[a.$getTemplateRoot]()[a.$extra].paraStack;return t.length?t[t.length-1]:null}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.getMetrics=function getMetrics(e,t=!1){let r=null;if(e){const t=(0,i.stripQuotes)(e.typeface),n=e[a.$globalData].fontFinder.find(t);r=selectFont(e,n)}if(!r)return{lineHeight:12,lineGap:2,lineNoGap:10};const n=e.size||10,s=r.lineHeight?Math.max(t?0:1.2,r.lineHeight):1.2,o=void 0===r.lineGap?.2:r.lineGap;return{lineHeight:s*n,lineGap:o*n,lineNoGap:Math.max(1,s-o)*n}};t.selectFont=selectFont;t.FontFinder=void 0;var a=r(75),i=r(76),n=r(2);t.FontFinder=class FontFinder{constructor(e){this.fonts=new Map;this.cache=new Map;this.warned=new Set;this.defaultFont=null;this.add(e)}add(e,t=null){for(const t of e)this.addPdfFont(t);for(const e of this.fonts.values())e.regular||(e.regular=e.italic||e.bold||e.bolditalic);if(!t||0===t.size)return;const r=this.fonts.get("PdfJS-Fallback-PdfJS-XFA");for(const e of t)this.fonts.set(e,r)}addPdfFont(e){const t=e.cssFontInfo,r=t.fontFamily;let a=this.fonts.get(r);if(!a){a=Object.create(null);this.fonts.set(r,a);this.defaultFont||(this.defaultFont=a)}let i="";const n=parseFloat(t.fontWeight);0!==parseFloat(t.italicAngle)?i=n>=700?"bolditalic":"italic":n>=700&&(i="bold");if(!i){(e.name.includes("Bold")||e.psName&&e.psName.includes("Bold"))&&(i="bold");(e.name.includes("Italic")||e.name.endsWith("It")||e.psName&&(e.psName.includes("Italic")||e.psName.endsWith("It")))&&(i+="italic")}i||(i="regular");a[i]=e}getDefault(){return this.defaultFont}find(e,t=!0){let r=this.fonts.get(e)||this.cache.get(e);if(r)return r;const a=/,|-|_| |bolditalic|bold|italic|regular|it/gi;let i=e.replace(a,"");r=this.fonts.get(i);if(r){this.cache.set(e,r);return r}i=i.toLowerCase();const s=[];for(const[e,t]of this.fonts.entries())e.replace(a,"").toLowerCase().startsWith(i)&&s.push(t);if(0===s.length)for(const[,e]of this.fonts.entries())e.regular.name&&e.regular.name.replace(a,"").toLowerCase().startsWith(i)&&s.push(e);if(0===s.length){i=i.replace(/psmt|mt/gi,"");for(const[e,t]of this.fonts.entries())e.replace(a,"").toLowerCase().startsWith(i)&&s.push(t)}if(0===s.length)for(const e of this.fonts.values())e.regular.name&&e.regular.name.replace(a,"").toLowerCase().startsWith(i)&&s.push(e);if(s.length>=1){1!==s.length&&t&&(0,n.warn)(`XFA - Too many choices to guess the correct font: ${e}`);this.cache.set(e,s[0]);return s[0]}if(t&&!this.warned.has(e)){this.warned.add(e);(0,n.warn)(`XFA - Cannot find the font: ${e}`)}return null}};function selectFont(e,t){return"italic"===e.posture?"bold"===e.weight?t.bolditalic:t.italic:"bold"===e.weight?t.bold:t.regular}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.TextMeasure=void 0;var a=r(83);class FontInfo{constructor(e,t,r,i){this.lineHeight=r;this.paraMargin=t||{top:0,bottom:0,left:0,right:0};if(!e){[this.pdfFont,this.xfaFont]=this.defaultFont(i);return}this.xfaFont={typeface:e.typeface,posture:e.posture,weight:e.weight,size:e.size,letterSpacing:e.letterSpacing};const n=i.find(e.typeface);if(n){this.pdfFont=(0,a.selectFont)(e,n);this.pdfFont||([this.pdfFont,this.xfaFont]=this.defaultFont(i))}else[this.pdfFont,this.xfaFont]=this.defaultFont(i)}defaultFont(e){const t=e.find("Helvetica",!1)||e.find("Myriad Pro",!1)||e.find("Arial",!1)||e.getDefault();if(t&&t.regular){const e=t.regular;return[e,{typeface:e.cssFontInfo.fontFamily,posture:"normal",weight:"normal",size:10,letterSpacing:0}]}return[null,{typeface:"Courier",posture:"normal",weight:"normal",size:10,letterSpacing:0}]}}class FontSelector{constructor(e,t,r,a){this.fontFinder=a;this.stack=[new FontInfo(e,t,r,a)]}pushData(e,t,r){const a=this.stack[this.stack.length-1];for(const t of["typeface","posture","weight","size","letterSpacing"])e[t]||(e[t]=a.xfaFont[t]);for(const e of["top","bottom","left","right"])isNaN(t[e])&&(t[e]=a.paraMargin[e]);const i=new FontInfo(e,t,r||a.lineHeight,this.fontFinder);i.pdfFont||(i.pdfFont=a.pdfFont);this.stack.push(i)}popFont(){this.stack.pop()}topFont(){return this.stack[this.stack.length-1]}}t.TextMeasure=class TextMeasure{constructor(e,t,r,a){this.glyphs=[];this.fontSelector=new FontSelector(e,t,r,a);this.extraHeight=0}pushData(e,t,r){this.fontSelector.pushData(e,t,r)}popFont(e){return this.fontSelector.popFont()}addPara(){const e=this.fontSelector.topFont();this.extraHeight+=e.paraMargin.top+e.paraMargin.bottom}addString(e){if(!e)return;const t=this.fontSelector.topFont(),r=t.xfaFont.size;if(t.pdfFont){const a=t.xfaFont.letterSpacing,i=t.pdfFont,n=i.lineHeight||1.2,s=t.lineHeight||Math.max(1.2,n)*r,o=n-(void 0===i.lineGap?.2:i.lineGap),c=Math.max(1,o)*r,l=r/1e3,h=i.defaultWidth||i.charsToGlyphs(" ")[0].width;for(const t of e.split(/[\u2029\n]/)){const e=i.encodeString(t).join(""),r=i.charsToGlyphs(e);for(const e of r){const t=e.width||h;this.glyphs.push([t*l+a,s,c,e.unicode,!1])}this.glyphs.push([0,0,0,"\n",!0])}this.glyphs.pop()}else{for(const t of e.split(/[\u2029\n]/)){for(const e of t.split(""))this.glyphs.push([r,1.2*r,r,e,!1]);this.glyphs.push([0,0,0,"\n",!0])}this.glyphs.pop()}}compute(e){let t=-1,r=0,a=0,i=0,n=0,s=0,o=!1,c=!0;for(let l=0,h=this.glyphs.length;le){a=Math.max(a,n);n=0;i+=s;s=m;t=-1;r=0;o=!0;c=!1}else{s=Math.max(m,s);r=n;n+=h;t=l}else if(n+h>e){i+=s;s=m;if(-1!==t){l=t;a=Math.max(a,r);n=0;t=-1;r=0}else{a=Math.max(a,n);n=h}o=!0;c=!1}else{n+=h;s=Math.max(m,s)}}a=Math.max(a,n);i+=s+this.extraHeight;return{width:1.02*a,height:i,isBroken:o}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.DataHandler=void 0;var a=r(75);t.DataHandler=class DataHandler{constructor(e,t){this.data=t;this.dataset=e.datasets||null}serialize(e){const t=[[-1,this.data[a.$getChildren]()]];for(;t.length>0;){const r=t[t.length-1],[i,n]=r;if(i+1===n.length){t.pop();continue}const s=n[++r[0]],o=e.get(s[a.$uid]);if(o)s[a.$setValue](o);else{const t=s[a.$getAttributes]();for(const r of t.values()){const t=e.get(r[a.$uid]);if(t){r[a.$setValue](t);break}}}const c=s[a.$getChildren]();c.length>0&&t.push([-1,c])}const r=[''];if(this.dataset)for(const e of this.dataset[a.$getChildren]())"data"!==e[a.$nodeName]&&e[a.$toString](r);this.data[a.$toString](r);r.push("");return r.join("")}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.XFAParser=void 0;var a=r(75),i=r(68),n=r(87),s=r(2);class XFAParser extends i.XMLParserBase{constructor(){super();this._builder=new n.Builder;this._stack=[];this._globalData={usedTypefaces:new Set};this._ids=new Map;this._current=this._builder.buildRoot(this._ids);this._errorCode=i.XMLParserErrorCode.NoError;this._whiteRegex=/^\s+$/;this._nbsps=/\xa0+/g}parse(e){this.parseXml(e);if(this._errorCode===i.XMLParserErrorCode.NoError){this._current[a.$finalize]();return this._current.element}}onText(e){e=e.replace(this._nbsps,(e=>e.slice(1)+" "));this._current[a.$acceptWhitespace]()?this._current[a.$onText](e):this._whiteRegex.test(e)||this._current[a.$onText](e.trim())}onCdata(e){this._current[a.$onText](e)}_mkAttributes(e,t){let r=null,i=null;const n=Object.create({});for(const{name:o,value:c}of e)if("xmlns"===o)r?(0,s.warn)(`XFA - multiple namespace definition in <${t}>`):r=c;else if(o.startsWith("xmlns:")){const e=o.substring("xmlns:".length);i||(i=[]);i.push({prefix:e,value:c})}else{const e=o.indexOf(":");if(-1===e)n[o]=c;else{let t=n[a.$nsAttributes];t||(t=n[a.$nsAttributes]=Object.create(null));const[r,i]=[o.slice(0,e),o.slice(e+1)];let s=t[r];s||(s=t[r]=Object.create(null));s[i]=c}}return[r,i,n]}_getNameAndPrefix(e,t){const r=e.indexOf(":");return-1===r?[e,null]:[e.substring(r+1),t?"":e.substring(0,r)]}onBeginElement(e,t,r){const[i,n,s]=this._mkAttributes(t,e),[o,c]=this._getNameAndPrefix(e,this._builder.isNsAgnostic()),l=this._builder.build({nsPrefix:c,name:o,attributes:s,namespace:i,prefixes:n});l[a.$globalData]=this._globalData;if(r){l[a.$finalize]();this._current[a.$onChild](l)&&l[a.$setId](this._ids);l[a.$clean](this._builder)}else{this._stack.push(this._current);this._current=l}}onEndElement(e){const t=this._current;if(t[a.$isCDATAXml]()&&"string"==typeof t[a.$content]){const e=new XFAParser;e._globalData=this._globalData;const r=e.parse(t[a.$content]);t[a.$content]=null;t[a.$onChild](r)}t[a.$finalize]();this._current=this._stack.pop();this._current[a.$onChild](t)&&t[a.$setId](this._ids);t[a.$clean](this._builder)}onError(e){this._errorCode=e}}t.XFAParser=XFAParser},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.Builder=void 0;var a=r(77),i=r(75),n=r(88),s=r(80),o=r(97),c=r(2);class Root extends i.XFAObject{constructor(e){super(-1,"root",Object.create(null));this.element=null;this[i.$ids]=e}[i.$onChild](e){this.element=e;return!0}[i.$finalize](){super[i.$finalize]();if(this.element.template instanceof s.Template){this[i.$ids].set(i.$root,this.element);this.element.template[i.$resolvePrototypes](this[i.$ids]);this.element.template[i.$ids]=this[i.$ids]}}}class Empty extends i.XFAObject{constructor(){super(-1,"",Object.create(null))}[i.$onChild](e){return!1}}t.Builder=class Builder{constructor(){this._namespaceStack=[];this._nsAgnosticLevel=0;this._namespacePrefixes=new Map;this._namespaces=new Map;this._nextNsId=Math.max(...Object.values(a.NamespaceIds).map((({id:e})=>e)));this._currentNamespace=new o.UnknownNamespace(++this._nextNsId)}buildRoot(e){return new Root(e)}build({nsPrefix:e,name:t,attributes:r,namespace:s,prefixes:o}){const c=null!==s;if(c){this._namespaceStack.push(this._currentNamespace);this._currentNamespace=this._searchNamespace(s)}o&&this._addNamespacePrefix(o);if(r.hasOwnProperty(i.$nsAttributes)){const e=n.NamespaceSetUp.datasets,t=r[i.$nsAttributes];let a=null;for(const[r,i]of Object.entries(t)){if(this._getNamespaceToUse(r)===e){a={xfa:i};break}}a?r[i.$nsAttributes]=a:delete r[i.$nsAttributes]}const l=this._getNamespaceToUse(e),h=l&&l[a.$buildXFAObject](t,r)||new Empty;h[i.$isNsAgnostic]()&&this._nsAgnosticLevel++;(c||o||h[i.$isNsAgnostic]())&&(h[i.$cleanup]={hasNamespace:c,prefixes:o,nsAgnostic:h[i.$isNsAgnostic]()});return h}isNsAgnostic(){return this._nsAgnosticLevel>0}_searchNamespace(e){let t=this._namespaces.get(e);if(t)return t;for(const[r,{check:i}]of Object.entries(a.NamespaceIds))if(i(e)){t=n.NamespaceSetUp[r];if(t){this._namespaces.set(e,t);return t}break}t=new o.UnknownNamespace(++this._nextNsId);this._namespaces.set(e,t);return t}_addNamespacePrefix(e){for(const{prefix:t,value:r}of e){const e=this._searchNamespace(r);let a=this._namespacePrefixes.get(t);if(!a){a=[];this._namespacePrefixes.set(t,a)}a.push(e)}}_getNamespaceToUse(e){if(!e)return this._currentNamespace;const t=this._namespacePrefixes.get(e);if(t&&t.length>0)return t[t.length-1];(0,c.warn)(`Unknown namespace prefix: ${e}.`);return null}clean(e){const{hasNamespace:t,prefixes:r,nsAgnostic:a}=e;t&&(this._currentNamespace=this._namespaceStack.pop());r&&r.forEach((({prefix:e})=>{this._namespacePrefixes.get(e).pop()}));a&&this._nsAgnosticLevel--}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.NamespaceSetUp=void 0;var a=r(89),i=r(90),n=r(91),s=r(92),o=r(93),c=r(94),l=r(80),h=r(95),u=r(96);const d={config:a.ConfigNamespace,connection:i.ConnectionSetNamespace,datasets:n.DatasetsNamespace,localeSet:s.LocaleSetNamespace,signature:o.SignatureNamespace,stylesheet:c.StylesheetNamespace,template:l.TemplateNamespace,xdp:h.XdpNamespace,xhtml:u.XhtmlNamespace};t.NamespaceSetUp=d},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.ConfigNamespace=void 0;var a=r(77),i=r(75),n=r(76),s=r(2);const o=a.NamespaceIds.config.id;class Acrobat extends i.XFAObject{constructor(e){super(o,"acrobat",!0);this.acrobat7=null;this.autoSave=null;this.common=null;this.validate=null;this.validateApprovalSignatures=null;this.submitUrl=new i.XFAObjectArray}}class Acrobat7 extends i.XFAObject{constructor(e){super(o,"acrobat7",!0);this.dynamicRender=null}}class ADBE_JSConsole extends i.OptionObject{constructor(e){super(o,"ADBE_JSConsole",["delegate","Enable","Disable"])}}class ADBE_JSDebugger extends i.OptionObject{constructor(e){super(o,"ADBE_JSDebugger",["delegate","Enable","Disable"])}}class AddSilentPrint extends i.Option01{constructor(e){super(o,"addSilentPrint")}}class AddViewerPreferences extends i.Option01{constructor(e){super(o,"addViewerPreferences")}}class AdjustData extends i.Option10{constructor(e){super(o,"adjustData")}}class AdobeExtensionLevel extends i.IntegerObject{constructor(e){super(o,"adobeExtensionLevel",0,(e=>e>=1&&e<=8))}}class Agent extends i.XFAObject{constructor(e){super(o,"agent",!0);this.name=e.name?e.name.trim():"";this.common=new i.XFAObjectArray}}class AlwaysEmbed extends i.ContentObject{constructor(e){super(o,"alwaysEmbed")}}class Amd extends i.StringObject{constructor(e){super(o,"amd")}}class Area extends i.XFAObject{constructor(e){super(o,"area");this.level=(0,n.getInteger)({data:e.level,defaultValue:0,validate:e=>e>=1&&e<=3});this.name=(0,n.getStringOption)(e.name,["","barcode","coreinit","deviceDriver","font","general","layout","merge","script","signature","sourceSet","templateCache"])}}class Attributes extends i.OptionObject{constructor(e){super(o,"attributes",["preserve","delegate","ignore"])}}class AutoSave extends i.OptionObject{constructor(e){super(o,"autoSave",["disabled","enabled"])}}class Base extends i.StringObject{constructor(e){super(o,"base")}}class BatchOutput extends i.XFAObject{constructor(e){super(o,"batchOutput");this.format=(0,n.getStringOption)(e.format,["none","concat","zip","zipCompress"])}}class BehaviorOverride extends i.ContentObject{constructor(e){super(o,"behaviorOverride")}[i.$finalize](){this[i.$content]=new Map(this[i.$content].trim().split(/\s+/).filter((e=>e.includes(":"))).map((e=>e.split(":",2))))}}class Cache extends i.XFAObject{constructor(e){super(o,"cache",!0);this.templateCache=null}}class Change extends i.Option01{constructor(e){super(o,"change")}}class Common extends i.XFAObject{constructor(e){super(o,"common",!0);this.data=null;this.locale=null;this.localeSet=null;this.messaging=null;this.suppressBanner=null;this.template=null;this.validationMessaging=null;this.versionControl=null;this.log=new i.XFAObjectArray}}class Compress extends i.XFAObject{constructor(e){super(o,"compress");this.scope=(0,n.getStringOption)(e.scope,["imageOnly","document"])}}class CompressLogicalStructure extends i.Option01{constructor(e){super(o,"compressLogicalStructure")}}class CompressObjectStream extends i.Option10{constructor(e){super(o,"compressObjectStream")}}class Compression extends i.XFAObject{constructor(e){super(o,"compression",!0);this.compressLogicalStructure=null;this.compressObjectStream=null;this.level=null;this.type=null}}class Config extends i.XFAObject{constructor(e){super(o,"config",!0);this.acrobat=null;this.present=null;this.trace=null;this.agent=new i.XFAObjectArray}}class Conformance extends i.OptionObject{constructor(e){super(o,"conformance",["A","B"])}}class ContentCopy extends i.Option01{constructor(e){super(o,"contentCopy")}}class Copies extends i.IntegerObject{constructor(e){super(o,"copies",1,(e=>e>=1))}}class Creator extends i.StringObject{constructor(e){super(o,"creator")}}class CurrentPage extends i.IntegerObject{constructor(e){super(o,"currentPage",0,(e=>e>=0))}}class Data extends i.XFAObject{constructor(e){super(o,"data",!0);this.adjustData=null;this.attributes=null;this.incrementalLoad=null;this.outputXSL=null;this.range=null;this.record=null;this.startNode=null;this.uri=null;this.window=null;this.xsl=null;this.excludeNS=new i.XFAObjectArray;this.transform=new i.XFAObjectArray}}class Debug extends i.XFAObject{constructor(e){super(o,"debug",!0);this.uri=null}}class DefaultTypeface extends i.ContentObject{constructor(e){super(o,"defaultTypeface");this.writingScript=(0,n.getStringOption)(e.writingScript,["*","Arabic","Cyrillic","EastEuropeanRoman","Greek","Hebrew","Japanese","Korean","Roman","SimplifiedChinese","Thai","TraditionalChinese","Vietnamese"])}}class Destination extends i.OptionObject{constructor(e){super(o,"destination",["pdf","pcl","ps","webClient","zpl"])}}class DocumentAssembly extends i.Option01{constructor(e){super(o,"documentAssembly")}}class Driver extends i.XFAObject{constructor(e){super(o,"driver",!0);this.name=e.name?e.name.trim():"";this.fontInfo=null;this.xdc=null}}class DuplexOption extends i.OptionObject{constructor(e){super(o,"duplexOption",["simplex","duplexFlipLongEdge","duplexFlipShortEdge"])}}class DynamicRender extends i.OptionObject{constructor(e){super(o,"dynamicRender",["forbidden","required"])}}class Embed extends i.Option01{constructor(e){super(o,"embed")}}class Encrypt extends i.Option01{constructor(e){super(o,"encrypt")}}class Encryption extends i.XFAObject{constructor(e){super(o,"encryption",!0);this.encrypt=null;this.encryptionLevel=null;this.permissions=null}}class EncryptionLevel extends i.OptionObject{constructor(e){super(o,"encryptionLevel",["40bit","128bit"])}}class Enforce extends i.StringObject{constructor(e){super(o,"enforce")}}class Equate extends i.XFAObject{constructor(e){super(o,"equate");this.force=(0,n.getInteger)({data:e.force,defaultValue:1,validate:e=>0===e});this.from=e.from||"";this.to=e.to||""}}class EquateRange extends i.XFAObject{constructor(e){super(o,"equateRange");this.from=e.from||"";this.to=e.to||"";this._unicodeRange=e.unicodeRange||""}get unicodeRange(){const e=[],t=/U\+([0-9a-fA-F]+)/,r=this._unicodeRange;for(let a of r.split(",").map((e=>e.trim())).filter((e=>!!e))){a=a.split("-",2).map((e=>{const r=e.match(t);return r?parseInt(r[1],16):0}));1===a.length&&a.push(a[0]);e.push(a)}return(0,s.shadow)(this,"unicodeRange",e)}}class Exclude extends i.ContentObject{constructor(e){super(o,"exclude")}[i.$finalize](){this[i.$content]=this[i.$content].trim().split(/\s+/).filter((e=>e&&["calculate","close","enter","exit","initialize","ready","validate"].includes(e)))}}class ExcludeNS extends i.StringObject{constructor(e){super(o,"excludeNS")}}class FlipLabel extends i.OptionObject{constructor(e){super(o,"flipLabel",["usePrinterSetting","on","off"])}}class FontInfo extends i.XFAObject{constructor(e){super(o,"fontInfo",!0);this.embed=null;this.map=null;this.subsetBelow=null;this.alwaysEmbed=new i.XFAObjectArray;this.defaultTypeface=new i.XFAObjectArray;this.neverEmbed=new i.XFAObjectArray}}class FormFieldFilling extends i.Option01{constructor(e){super(o,"formFieldFilling")}}class GroupParent extends i.StringObject{constructor(e){super(o,"groupParent")}}class IfEmpty extends i.OptionObject{constructor(e){super(o,"ifEmpty",["dataValue","dataGroup","ignore","remove"])}}class IncludeXDPContent extends i.StringObject{constructor(e){super(o,"includeXDPContent")}}class IncrementalLoad extends i.OptionObject{constructor(e){super(o,"incrementalLoad",["none","forwardOnly"])}}class IncrementalMerge extends i.Option01{constructor(e){super(o,"incrementalMerge")}}class Interactive extends i.Option01{constructor(e){super(o,"interactive")}}class Jog extends i.OptionObject{constructor(e){super(o,"jog",["usePrinterSetting","none","pageSet"])}}class LabelPrinter extends i.XFAObject{constructor(e){super(o,"labelPrinter",!0);this.name=(0,n.getStringOption)(e.name,["zpl","dpl","ipl","tcpl"]);this.batchOutput=null;this.flipLabel=null;this.fontInfo=null;this.xdc=null}}class Layout extends i.OptionObject{constructor(e){super(o,"layout",["paginate","panel"])}}class Level extends i.IntegerObject{constructor(e){super(o,"level",0,(e=>e>0))}}class Linearized extends i.Option01{constructor(e){super(o,"linearized")}}class Locale extends i.StringObject{constructor(e){super(o,"locale")}}class LocaleSet extends i.StringObject{constructor(e){super(o,"localeSet")}}class Log extends i.XFAObject{constructor(e){super(o,"log",!0);this.mode=null;this.threshold=null;this.to=null;this.uri=null}}class MapElement extends i.XFAObject{constructor(e){super(o,"map",!0);this.equate=new i.XFAObjectArray;this.equateRange=new i.XFAObjectArray}}class MediumInfo extends i.XFAObject{constructor(e){super(o,"mediumInfo",!0);this.map=null}}class Message extends i.XFAObject{constructor(e){super(o,"message",!0);this.msgId=null;this.severity=null}}class Messaging extends i.XFAObject{constructor(e){super(o,"messaging",!0);this.message=new i.XFAObjectArray}}class Mode extends i.OptionObject{constructor(e){super(o,"mode",["append","overwrite"])}}class ModifyAnnots extends i.Option01{constructor(e){super(o,"modifyAnnots")}}class MsgId extends i.IntegerObject{constructor(e){super(o,"msgId",1,(e=>e>=1))}}class NameAttr extends i.StringObject{constructor(e){super(o,"nameAttr")}}class NeverEmbed extends i.ContentObject{constructor(e){super(o,"neverEmbed")}}class NumberOfCopies extends i.IntegerObject{constructor(e){super(o,"numberOfCopies",null,(e=>e>=2&&e<=5))}}class OpenAction extends i.XFAObject{constructor(e){super(o,"openAction",!0);this.destination=null}}class Output extends i.XFAObject{constructor(e){super(o,"output",!0);this.to=null;this.type=null;this.uri=null}}class OutputBin extends i.StringObject{constructor(e){super(o,"outputBin")}}class OutputXSL extends i.XFAObject{constructor(e){super(o,"outputXSL",!0);this.uri=null}}class Overprint extends i.OptionObject{constructor(e){super(o,"overprint",["none","both","draw","field"])}}class Packets extends i.StringObject{constructor(e){super(o,"packets")}[i.$finalize](){"*"!==this[i.$content]&&(this[i.$content]=this[i.$content].trim().split(/\s+/).filter((e=>["config","datasets","template","xfdf","xslt"].includes(e))))}}class PageOffset extends i.XFAObject{constructor(e){super(o,"pageOffset");this.x=(0,n.getInteger)({data:e.x,defaultValue:"useXDCSetting",validate:e=>!0});this.y=(0,n.getInteger)({data:e.y,defaultValue:"useXDCSetting",validate:e=>!0})}}class PageRange extends i.StringObject{constructor(e){super(o,"pageRange")}[i.$finalize](){const e=this[i.$content].trim().split(/\s+/).map((e=>parseInt(e,10))),t=[];for(let r=0,a=e.length;r!1))}}class Pcl extends i.XFAObject{constructor(e){super(o,"pcl",!0);this.name=e.name||"";this.batchOutput=null;this.fontInfo=null;this.jog=null;this.mediumInfo=null;this.outputBin=null;this.pageOffset=null;this.staple=null;this.xdc=null}}class Pdf extends i.XFAObject{constructor(e){super(o,"pdf",!0);this.name=e.name||"";this.adobeExtensionLevel=null;this.batchOutput=null;this.compression=null;this.creator=null;this.encryption=null;this.fontInfo=null;this.interactive=null;this.linearized=null;this.openAction=null;this.pdfa=null;this.producer=null;this.renderPolicy=null;this.scriptModel=null;this.silentPrint=null;this.submitFormat=null;this.tagged=null;this.version=null;this.viewerPreferences=null;this.xdc=null}}class Pdfa extends i.XFAObject{constructor(e){super(o,"pdfa",!0);this.amd=null;this.conformance=null;this.includeXDPContent=null;this.part=null}}class Permissions extends i.XFAObject{constructor(e){super(o,"permissions",!0);this.accessibleContent=null;this.change=null;this.contentCopy=null;this.documentAssembly=null;this.formFieldFilling=null;this.modifyAnnots=null;this.plaintextMetadata=null;this.print=null;this.printHighQuality=null}}class PickTrayByPDFSize extends i.Option01{constructor(e){super(o,"pickTrayByPDFSize")}}class Picture extends i.StringObject{constructor(e){super(o,"picture")}}class PlaintextMetadata extends i.Option01{constructor(e){super(o,"plaintextMetadata")}}class Presence extends i.OptionObject{constructor(e){super(o,"presence",["preserve","dissolve","dissolveStructure","ignore","remove"])}}class Present extends i.XFAObject{constructor(e){super(o,"present",!0);this.behaviorOverride=null;this.cache=null;this.common=null;this.copies=null;this.destination=null;this.incrementalMerge=null;this.layout=null;this.output=null;this.overprint=null;this.pagination=null;this.paginationOverride=null;this.script=null;this.validate=null;this.xdp=null;this.driver=new i.XFAObjectArray;this.labelPrinter=new i.XFAObjectArray;this.pcl=new i.XFAObjectArray;this.pdf=new i.XFAObjectArray;this.ps=new i.XFAObjectArray;this.submitUrl=new i.XFAObjectArray;this.webClient=new i.XFAObjectArray;this.zpl=new i.XFAObjectArray}}class Print extends i.Option01{constructor(e){super(o,"print")}}class PrintHighQuality extends i.Option01{constructor(e){super(o,"printHighQuality")}}class PrintScaling extends i.OptionObject{constructor(e){super(o,"printScaling",["appdefault","noScaling"])}}class PrinterName extends i.StringObject{constructor(e){super(o,"printerName")}}class Producer extends i.StringObject{constructor(e){super(o,"producer")}}class Ps extends i.XFAObject{constructor(e){super(o,"ps",!0);this.name=e.name||"";this.batchOutput=null;this.fontInfo=null;this.jog=null;this.mediumInfo=null;this.outputBin=null;this.staple=null;this.xdc=null}}class Range extends i.ContentObject{constructor(e){super(o,"range")}[i.$finalize](){this[i.$content]=this[i.$content].trim().split(/\s*,\s*/,2).map((e=>e.split("-").map((e=>parseInt(e.trim(),10))))).filter((e=>e.every((e=>!isNaN(e))))).map((e=>{1===e.length&&e.push(e[0]);return e}))}}class Record extends i.ContentObject{constructor(e){super(o,"record")}[i.$finalize](){this[i.$content]=this[i.$content].trim();const e=parseInt(this[i.$content],10);!isNaN(e)&&e>=0&&(this[i.$content]=e)}}class Relevant extends i.ContentObject{constructor(e){super(o,"relevant")}[i.$finalize](){this[i.$content]=this[i.$content].trim().split(/\s+/)}}class Rename extends i.ContentObject{constructor(e){super(o,"rename")}[i.$finalize](){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")}}class RenderPolicy extends i.OptionObject{constructor(e){super(o,"renderPolicy",["server","client"])}}class RunScripts extends i.OptionObject{constructor(e){super(o,"runScripts",["both","client","none","server"])}}class Script extends i.XFAObject{constructor(e){super(o,"script",!0);this.currentPage=null;this.exclude=null;this.runScripts=null}}class ScriptModel extends i.OptionObject{constructor(e){super(o,"scriptModel",["XFA","none"])}}class Severity extends i.OptionObject{constructor(e){super(o,"severity",["ignore","error","information","trace","warning"])}}class SilentPrint extends i.XFAObject{constructor(e){super(o,"silentPrint",!0);this.addSilentPrint=null;this.printerName=null}}class Staple extends i.XFAObject{constructor(e){super(o,"staple");this.mode=(0,n.getStringOption)(e.mode,["usePrinterSetting","on","off"])}}class StartNode extends i.StringObject{constructor(e){super(o,"startNode")}}class StartPage extends i.IntegerObject{constructor(e){super(o,"startPage",0,(e=>!0))}}class SubmitFormat extends i.OptionObject{constructor(e){super(o,"submitFormat",["html","delegate","fdf","xml","pdf"])}}class SubmitUrl extends i.StringObject{constructor(e){super(o,"submitUrl")}}class SubsetBelow extends i.IntegerObject{constructor(e){super(o,"subsetBelow",100,(e=>e>=0&&e<=100))}}class SuppressBanner extends i.Option01{constructor(e){super(o,"suppressBanner")}}class Tagged extends i.Option01{constructor(e){super(o,"tagged")}}class Template extends i.XFAObject{constructor(e){super(o,"template",!0);this.base=null;this.relevant=null;this.startPage=null;this.uri=null;this.xsl=null}}class Threshold extends i.OptionObject{constructor(e){super(o,"threshold",["trace","error","information","warning"])}}class To extends i.OptionObject{constructor(e){super(o,"to",["null","memory","stderr","stdout","system","uri"])}}class TemplateCache extends i.XFAObject{constructor(e){super(o,"templateCache");this.maxEntries=(0,n.getInteger)({data:e.maxEntries,defaultValue:5,validate:e=>e>=0})}}class Trace extends i.XFAObject{constructor(e){super(o,"trace",!0);this.area=new i.XFAObjectArray}}class Transform extends i.XFAObject{constructor(e){super(o,"transform",!0);this.groupParent=null;this.ifEmpty=null;this.nameAttr=null;this.picture=null;this.presence=null;this.rename=null;this.whitespace=null}}class Type extends i.OptionObject{constructor(e){super(o,"type",["none","ascii85","asciiHex","ccittfax","flate","lzw","runLength","native","xdp","mergedXDP"])}}class Uri extends i.StringObject{constructor(e){super(o,"uri")}}class Validate extends i.OptionObject{constructor(e){super(o,"validate",["preSubmit","prePrint","preExecute","preSave"])}}class ValidateApprovalSignatures extends i.ContentObject{constructor(e){super(o,"validateApprovalSignatures")}[i.$finalize](){this[i.$content]=this[i.$content].trim().split(/\s+/).filter((e=>["docReady","postSign"].includes(e)))}}class ValidationMessaging extends i.OptionObject{constructor(e){super(o,"validationMessaging",["allMessagesIndividually","allMessagesTogether","firstMessageOnly","noMessages"])}}class Version extends i.OptionObject{constructor(e){super(o,"version",["1.7","1.6","1.5","1.4","1.3","1.2"])}}class VersionControl extends i.XFAObject{constructor(e){super(o,"VersionControl");this.outputBelow=(0,n.getStringOption)(e.outputBelow,["warn","error","update"]);this.sourceAbove=(0,n.getStringOption)(e.sourceAbove,["warn","error"]);this.sourceBelow=(0,n.getStringOption)(e.sourceBelow,["update","maintain"])}}class ViewerPreferences extends i.XFAObject{constructor(e){super(o,"viewerPreferences",!0);this.ADBE_JSConsole=null;this.ADBE_JSDebugger=null;this.addViewerPreferences=null;this.duplexOption=null;this.enforce=null;this.numberOfCopies=null;this.pageRange=null;this.pickTrayByPDFSize=null;this.printScaling=null}}class WebClient extends i.XFAObject{constructor(e){super(o,"webClient",!0);this.name=e.name?e.name.trim():"";this.fontInfo=null;this.xdc=null}}class Whitespace extends i.OptionObject{constructor(e){super(o,"whitespace",["preserve","ltrim","normalize","rtrim","trim"])}}class Window extends i.ContentObject{constructor(e){super(o,"window")}[i.$finalize](){const e=this[i.$content].trim().split(/\s*,\s*/,2).map((e=>parseInt(e,10)));if(e.some((e=>isNaN(e))))this[i.$content]=[0,0];else{1===e.length&&e.push(e[0]);this[i.$content]=e}}}class Xdc extends i.XFAObject{constructor(e){super(o,"xdc",!0);this.uri=new i.XFAObjectArray;this.xsl=new i.XFAObjectArray}}class Xdp extends i.XFAObject{constructor(e){super(o,"xdp",!0);this.packets=null}}class Xsl extends i.XFAObject{constructor(e){super(o,"xsl",!0);this.debug=null;this.uri=null}}class Zpl extends i.XFAObject{constructor(e){super(o,"zpl",!0);this.name=e.name?e.name.trim():"";this.batchOutput=null;this.flipLabel=null;this.fontInfo=null;this.xdc=null}}class ConfigNamespace{static[a.$buildXFAObject](e,t){if(ConfigNamespace.hasOwnProperty(e))return ConfigNamespace[e](t)}static acrobat(e){return new Acrobat(e)}static acrobat7(e){return new Acrobat7(e)}static ADBE_JSConsole(e){return new ADBE_JSConsole(e)}static ADBE_JSDebugger(e){return new ADBE_JSDebugger(e)}static addSilentPrint(e){return new AddSilentPrint(e)}static addViewerPreferences(e){return new AddViewerPreferences(e)}static adjustData(e){return new AdjustData(e)}static adobeExtensionLevel(e){return new AdobeExtensionLevel(e)}static agent(e){return new Agent(e)}static alwaysEmbed(e){return new AlwaysEmbed(e)}static amd(e){return new Amd(e)}static area(e){return new Area(e)}static attributes(e){return new Attributes(e)}static autoSave(e){return new AutoSave(e)}static base(e){return new Base(e)}static batchOutput(e){return new BatchOutput(e)}static behaviorOverride(e){return new BehaviorOverride(e)}static cache(e){return new Cache(e)}static change(e){return new Change(e)}static common(e){return new Common(e)}static compress(e){return new Compress(e)}static compressLogicalStructure(e){return new CompressLogicalStructure(e)}static compressObjectStream(e){return new CompressObjectStream(e)}static compression(e){return new Compression(e)}static config(e){return new Config(e)}static conformance(e){return new Conformance(e)}static contentCopy(e){return new ContentCopy(e)}static copies(e){return new Copies(e)}static creator(e){return new Creator(e)}static currentPage(e){return new CurrentPage(e)}static data(e){return new Data(e)}static debug(e){return new Debug(e)}static defaultTypeface(e){return new DefaultTypeface(e)}static destination(e){return new Destination(e)}static documentAssembly(e){return new DocumentAssembly(e)}static driver(e){return new Driver(e)}static duplexOption(e){return new DuplexOption(e)}static dynamicRender(e){return new DynamicRender(e)}static embed(e){return new Embed(e)}static encrypt(e){return new Encrypt(e)}static encryption(e){return new Encryption(e)}static encryptionLevel(e){return new EncryptionLevel(e)}static enforce(e){return new Enforce(e)}static equate(e){return new Equate(e)}static equateRange(e){return new EquateRange(e)}static exclude(e){return new Exclude(e)}static excludeNS(e){return new ExcludeNS(e)}static flipLabel(e){return new FlipLabel(e)}static fontInfo(e){return new FontInfo(e)}static formFieldFilling(e){return new FormFieldFilling(e)}static groupParent(e){return new GroupParent(e)}static ifEmpty(e){return new IfEmpty(e)}static includeXDPContent(e){return new IncludeXDPContent(e)}static incrementalLoad(e){return new IncrementalLoad(e)}static incrementalMerge(e){return new IncrementalMerge(e)}static interactive(e){return new Interactive(e)}static jog(e){return new Jog(e)}static labelPrinter(e){return new LabelPrinter(e)}static layout(e){return new Layout(e)}static level(e){return new Level(e)}static linearized(e){return new Linearized(e)}static locale(e){return new Locale(e)}static localeSet(e){return new LocaleSet(e)}static log(e){return new Log(e)}static map(e){return new MapElement(e)}static mediumInfo(e){return new MediumInfo(e)}static message(e){return new Message(e)}static messaging(e){return new Messaging(e)}static mode(e){return new Mode(e)}static modifyAnnots(e){return new ModifyAnnots(e)}static msgId(e){return new MsgId(e)}static nameAttr(e){return new NameAttr(e)}static neverEmbed(e){return new NeverEmbed(e)}static numberOfCopies(e){return new NumberOfCopies(e)}static openAction(e){return new OpenAction(e)}static output(e){return new Output(e)}static outputBin(e){return new OutputBin(e)}static outputXSL(e){return new OutputXSL(e)}static overprint(e){return new Overprint(e)}static packets(e){return new Packets(e)}static pageOffset(e){return new PageOffset(e)}static pageRange(e){return new PageRange(e)}static pagination(e){return new Pagination(e)}static paginationOverride(e){return new PaginationOverride(e)}static part(e){return new Part(e)}static pcl(e){return new Pcl(e)}static pdf(e){return new Pdf(e)}static pdfa(e){return new Pdfa(e)}static permissions(e){return new Permissions(e)}static pickTrayByPDFSize(e){return new PickTrayByPDFSize(e)}static picture(e){return new Picture(e)}static plaintextMetadata(e){return new PlaintextMetadata(e)}static presence(e){return new Presence(e)}static present(e){return new Present(e)}static print(e){return new Print(e)}static printHighQuality(e){return new PrintHighQuality(e)}static printScaling(e){return new PrintScaling(e)}static printerName(e){return new PrinterName(e)}static producer(e){return new Producer(e)}static ps(e){return new Ps(e)}static range(e){return new Range(e)}static record(e){return new Record(e)}static relevant(e){return new Relevant(e)}static rename(e){return new Rename(e)}static renderPolicy(e){return new RenderPolicy(e)}static runScripts(e){return new RunScripts(e)}static script(e){return new Script(e)}static scriptModel(e){return new ScriptModel(e)}static severity(e){return new Severity(e)}static silentPrint(e){return new SilentPrint(e)}static staple(e){return new Staple(e)}static startNode(e){return new StartNode(e)}static startPage(e){return new StartPage(e)}static submitFormat(e){return new SubmitFormat(e)}static submitUrl(e){return new SubmitUrl(e)}static subsetBelow(e){return new SubsetBelow(e)}static suppressBanner(e){return new SuppressBanner(e)}static tagged(e){return new Tagged(e)}static template(e){return new Template(e)}static templateCache(e){return new TemplateCache(e)}static threshold(e){return new Threshold(e)}static to(e){return new To(e)}static trace(e){return new Trace(e)}static transform(e){return new Transform(e)}static type(e){return new Type(e)}static uri(e){return new Uri(e)}static validate(e){return new Validate(e)}static validateApprovalSignatures(e){return new ValidateApprovalSignatures(e)}static validationMessaging(e){return new ValidationMessaging(e)}static version(e){return new Version(e)}static versionControl(e){return new VersionControl(e)}static viewerPreferences(e){return new ViewerPreferences(e)}static webClient(e){return new WebClient(e)}static whitespace(e){return new Whitespace(e)}static window(e){return new Window(e)}static xdc(e){return new Xdc(e)}static xdp(e){return new Xdp(e)}static xsl(e){return new Xsl(e)}static zpl(e){return new Zpl(e)}}t.ConfigNamespace=ConfigNamespace},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.ConnectionSetNamespace=void 0;var a=r(77),i=r(75);const n=a.NamespaceIds.connectionSet.id;class ConnectionSet extends i.XFAObject{constructor(e){super(n,"connectionSet",!0);this.wsdlConnection=new i.XFAObjectArray;this.xmlConnection=new i.XFAObjectArray;this.xsdConnection=new i.XFAObjectArray}}class EffectiveInputPolicy extends i.XFAObject{constructor(e){super(n,"effectiveInputPolicy");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class EffectiveOutputPolicy extends i.XFAObject{constructor(e){super(n,"effectiveOutputPolicy");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Operation extends i.StringObject{constructor(e){super(n,"operation");this.id=e.id||"";this.input=e.input||"";this.name=e.name||"";this.output=e.output||"";this.use=e.use||"";this.usehref=e.usehref||""}}class RootElement extends i.StringObject{constructor(e){super(n,"rootElement");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class SoapAction extends i.StringObject{constructor(e){super(n,"soapAction");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class SoapAddress extends i.StringObject{constructor(e){super(n,"soapAddress");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Uri extends i.StringObject{constructor(e){super(n,"uri");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class WsdlAddress extends i.StringObject{constructor(e){super(n,"wsdlAddress");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class WsdlConnection extends i.XFAObject{constructor(e){super(n,"wsdlConnection",!0);this.dataDescription=e.dataDescription||"";this.name=e.name||"";this.effectiveInputPolicy=null;this.effectiveOutputPolicy=null;this.operation=null;this.soapAction=null;this.soapAddress=null;this.wsdlAddress=null}}class XmlConnection extends i.XFAObject{constructor(e){super(n,"xmlConnection",!0);this.dataDescription=e.dataDescription||"";this.name=e.name||"";this.uri=null}}class XsdConnection extends i.XFAObject{constructor(e){super(n,"xsdConnection",!0);this.dataDescription=e.dataDescription||"";this.name=e.name||"";this.rootElement=null;this.uri=null}}class ConnectionSetNamespace{static[a.$buildXFAObject](e,t){if(ConnectionSetNamespace.hasOwnProperty(e))return ConnectionSetNamespace[e](t)}static connectionSet(e){return new ConnectionSet(e)}static effectiveInputPolicy(e){return new EffectiveInputPolicy(e)}static effectiveOutputPolicy(e){return new EffectiveOutputPolicy(e)}static operation(e){return new Operation(e)}static rootElement(e){return new RootElement(e)}static soapAction(e){return new SoapAction(e)}static soapAddress(e){return new SoapAddress(e)}static uri(e){return new Uri(e)}static wsdlAddress(e){return new WsdlAddress(e)}static wsdlConnection(e){return new WsdlConnection(e)}static xmlConnection(e){return new XmlConnection(e)}static xsdConnection(e){return new XsdConnection(e)}}t.ConnectionSetNamespace=ConnectionSetNamespace},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.DatasetsNamespace=void 0;var a=r(75),i=r(77);const n=i.NamespaceIds.datasets.id;class Data extends a.XmlObject{constructor(e){super(n,"data",e)}[a.$isNsAgnostic](){return!0}}class Datasets extends a.XFAObject{constructor(e){super(n,"datasets",!0);this.data=null;this.Signature=null}[a.$onChild](e){const t=e[a.$nodeName];("data"===t&&e[a.$namespaceId]===n||"Signature"===t&&e[a.$namespaceId]===i.NamespaceIds.signature.id)&&(this[t]=e);this[a.$appendChild](e)}}class DatasetsNamespace{static[i.$buildXFAObject](e,t){if(DatasetsNamespace.hasOwnProperty(e))return DatasetsNamespace[e](t)}static datasets(e){return new Datasets(e)}static data(e){return new Data(e)}}t.DatasetsNamespace=DatasetsNamespace},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.LocaleSetNamespace=void 0;var a=r(77),i=r(75),n=r(76);const s=a.NamespaceIds.localeSet.id;class CalendarSymbols extends i.XFAObject{constructor(e){super(s,"calendarSymbols",!0);this.name="gregorian";this.dayNames=new i.XFAObjectArray(2);this.eraNames=null;this.meridiemNames=null;this.monthNames=new i.XFAObjectArray(2)}}class CurrencySymbol extends i.StringObject{constructor(e){super(s,"currencySymbol");this.name=(0,n.getStringOption)(e.name,["symbol","isoname","decimal"])}}class CurrencySymbols extends i.XFAObject{constructor(e){super(s,"currencySymbols",!0);this.currencySymbol=new i.XFAObjectArray(3)}}class DatePattern extends i.StringObject{constructor(e){super(s,"datePattern");this.name=(0,n.getStringOption)(e.name,["full","long","med","short"])}}class DatePatterns extends i.XFAObject{constructor(e){super(s,"datePatterns",!0);this.datePattern=new i.XFAObjectArray(4)}}class DateTimeSymbols extends i.ContentObject{constructor(e){super(s,"dateTimeSymbols")}}class Day extends i.StringObject{constructor(e){super(s,"day")}}class DayNames extends i.XFAObject{constructor(e){super(s,"dayNames",!0);this.abbr=(0,n.getInteger)({data:e.abbr,defaultValue:0,validate:e=>1===e});this.day=new i.XFAObjectArray(7)}}class Era extends i.StringObject{constructor(e){super(s,"era")}}class EraNames extends i.XFAObject{constructor(e){super(s,"eraNames",!0);this.era=new i.XFAObjectArray(2)}}class Locale extends i.XFAObject{constructor(e){super(s,"locale",!0);this.desc=e.desc||"";this.name="isoname";this.calendarSymbols=null;this.currencySymbols=null;this.datePatterns=null;this.dateTimeSymbols=null;this.numberPatterns=null;this.numberSymbols=null;this.timePatterns=null;this.typeFaces=null}}class LocaleSet extends i.XFAObject{constructor(e){super(s,"localeSet",!0);this.locale=new i.XFAObjectArray}}class Meridiem extends i.StringObject{constructor(e){super(s,"meridiem")}}class MeridiemNames extends i.XFAObject{constructor(e){super(s,"meridiemNames",!0);this.meridiem=new i.XFAObjectArray(2)}}class Month extends i.StringObject{constructor(e){super(s,"month")}}class MonthNames extends i.XFAObject{constructor(e){super(s,"monthNames",!0);this.abbr=(0,n.getInteger)({data:e.abbr,defaultValue:0,validate:e=>1===e});this.month=new i.XFAObjectArray(12)}}class NumberPattern extends i.StringObject{constructor(e){super(s,"numberPattern");this.name=(0,n.getStringOption)(e.name,["full","long","med","short"])}}class NumberPatterns extends i.XFAObject{constructor(e){super(s,"numberPatterns",!0);this.numberPattern=new i.XFAObjectArray(4)}}class NumberSymbol extends i.StringObject{constructor(e){super(s,"numberSymbol");this.name=(0,n.getStringOption)(e.name,["decimal","grouping","percent","minus","zero"])}}class NumberSymbols extends i.XFAObject{constructor(e){super(s,"numberSymbols",!0);this.numberSymbol=new i.XFAObjectArray(5)}}class TimePattern extends i.StringObject{constructor(e){super(s,"timePattern");this.name=(0,n.getStringOption)(e.name,["full","long","med","short"])}}class TimePatterns extends i.XFAObject{constructor(e){super(s,"timePatterns",!0);this.timePattern=new i.XFAObjectArray(4)}}class TypeFace extends i.XFAObject{constructor(e){super(s,"typeFace",!0);this.name=""|e.name}}class TypeFaces extends i.XFAObject{constructor(e){super(s,"typeFaces",!0);this.typeFace=new i.XFAObjectArray}}class LocaleSetNamespace{static[a.$buildXFAObject](e,t){if(LocaleSetNamespace.hasOwnProperty(e))return LocaleSetNamespace[e](t)}static calendarSymbols(e){return new CalendarSymbols(e)}static currencySymbol(e){return new CurrencySymbol(e)}static currencySymbols(e){return new CurrencySymbols(e)}static datePattern(e){return new DatePattern(e)}static datePatterns(e){return new DatePatterns(e)}static dateTimeSymbols(e){return new DateTimeSymbols(e)}static day(e){return new Day(e)}static dayNames(e){return new DayNames(e)}static era(e){return new Era(e)}static eraNames(e){return new EraNames(e)}static locale(e){return new Locale(e)}static localeSet(e){return new LocaleSet(e)}static meridiem(e){return new Meridiem(e)}static meridiemNames(e){return new MeridiemNames(e)}static month(e){return new Month(e)}static monthNames(e){return new MonthNames(e)}static numberPattern(e){return new NumberPattern(e)}static numberPatterns(e){return new NumberPatterns(e)}static numberSymbol(e){return new NumberSymbol(e)}static numberSymbols(e){return new NumberSymbols(e)}static timePattern(e){return new TimePattern(e)}static timePatterns(e){return new TimePatterns(e)}static typeFace(e){return new TypeFace(e)}static typeFaces(e){return new TypeFaces(e)}}t.LocaleSetNamespace=LocaleSetNamespace},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.SignatureNamespace=void 0;var a=r(77),i=r(75);const n=a.NamespaceIds.signature.id;class Signature extends i.XFAObject{constructor(e){super(n,"signature",!0)}}class SignatureNamespace{static[a.$buildXFAObject](e,t){if(SignatureNamespace.hasOwnProperty(e))return SignatureNamespace[e](t)}static signature(e){return new Signature(e)}}t.SignatureNamespace=SignatureNamespace},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.StylesheetNamespace=void 0;var a=r(77),i=r(75);const n=a.NamespaceIds.stylesheet.id;class Stylesheet extends i.XFAObject{constructor(e){super(n,"stylesheet",!0)}}class StylesheetNamespace{static[a.$buildXFAObject](e,t){if(StylesheetNamespace.hasOwnProperty(e))return StylesheetNamespace[e](t)}static stylesheet(e){return new Stylesheet(e)}}t.StylesheetNamespace=StylesheetNamespace},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.XdpNamespace=void 0;var a=r(77),i=r(75);const n=a.NamespaceIds.xdp.id;class Xdp extends i.XFAObject{constructor(e){super(n,"xdp",!0);this.uuid=e.uuid||"";this.timeStamp=e.timeStamp||"";this.config=null;this.connectionSet=null;this.datasets=null;this.localeSet=null;this.stylesheet=new i.XFAObjectArray;this.template=null}[i.$onChildCheck](e){const t=a.NamespaceIds[e[i.$nodeName]];return t&&e[i.$namespaceId]===t.id}}class XdpNamespace{static[a.$buildXFAObject](e,t){if(XdpNamespace.hasOwnProperty(e))return XdpNamespace[e](t)}static xdp(e){return new Xdp(e)}}t.XdpNamespace=XdpNamespace},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.XhtmlNamespace=void 0;var a=r(75),i=r(77),n=r(82),s=r(76);const o=i.NamespaceIds.xhtml.id,c=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"]),l=new Map([["page-break-after","breakAfter"],["page-break-before","breakBefore"],["page-break-inside","breakInside"],["kerning-mode",e=>"none"===e?"none":"normal"],["xfa-font-horizontal-scale",e=>`scaleX(${Math.max(0,Math.min(parseInt(e)/100)).toFixed(2)})`],["xfa-font-vertical-scale",e=>`scaleY(${Math.max(0,Math.min(parseInt(e)/100)).toFixed(2)})`],["xfa-spacerun",""],["xfa-tab-stops",""],["font-size",(e,t)=>{e=t.fontSize=(0,s.getMeasurement)(e);return(0,n.measureToString)(.99*e)}],["letter-spacing",e=>(0,n.measureToString)((0,s.getMeasurement)(e))],["line-height",e=>(0,n.measureToString)((0,s.getMeasurement)(e))],["margin",e=>(0,n.measureToString)((0,s.getMeasurement)(e))],["margin-bottom",e=>(0,n.measureToString)((0,s.getMeasurement)(e))],["margin-left",e=>(0,n.measureToString)((0,s.getMeasurement)(e))],["margin-right",e=>(0,n.measureToString)((0,s.getMeasurement)(e))],["margin-top",e=>(0,n.measureToString)((0,s.getMeasurement)(e))],["text-indent",e=>(0,n.measureToString)((0,s.getMeasurement)(e))],["font-family",e=>e]]),h=/\s+/g,u=/[\r\n]+/g;function mapStyle(e,t){const r=Object.create(null);if(!e)return r;const i=Object.create(null);for(const[t,a]of e.split(";").map((e=>e.split(":",2)))){const e=l.get(t);if(""===e)continue;let n=a;e&&(n="string"==typeof e?e:e(a,i));t.endsWith("scale")?r.transform?r.transform=`${r[t]} ${n}`:r.transform=n:r[t.replaceAll(/-([a-zA-Z])/g,((e,t)=>t.toUpperCase()))]=n}r.fontFamily&&(0,n.setFontFamily)({typeface:r.fontFamily,weight:r.fontWeight||"normal",posture:r.fontStyle||"normal",size:i.fontSize||0},t,t[a.$globalData].fontFinder,r);(0,n.fixTextIndent)(r);return r}const d=new Set(["body","html"]);class XhtmlObject extends a.XmlObject{constructor(e,t){super(o,t);this.style=e.style||""}[a.$clean](e){super[a.$clean](e);this.style=function checkStyle(e){return e.style?e.style.trim().split(/\s*;\s*/).filter((e=>!!e)).map((e=>e.split(/\s*:\s*/,2))).filter((([t,r])=>{"font-family"===t&&e[a.$globalData].usedTypefaces.add(r);return c.has(t)})).map((e=>e.join(":"))).join(";"):""}(this)}[a.$acceptWhitespace](){return!d.has(this[a.$nodeName])}[a.$onText](e){e=e.replace(u,"");this.style.includes("xfa-spacerun:yes")||(e=e.replace(h," "));e&&(this[a.$content]+=e)}[a.$pushGlyphs](e,t=!0){const r=Object.create(null),i={top:NaN,bottom:NaN,left:NaN,right:NaN};let n=null;for(const[e,t]of this.style.split(";").map((e=>e.split(":",2))))switch(e){case"font-family":r.typeface=(0,s.stripQuotes)(t);break;case"font-size":r.size=(0,s.getMeasurement)(t);break;case"font-weight":r.weight=t;break;case"font-style":r.posture=t;break;case"letter-spacing":r.letterSpacing=(0,s.getMeasurement)(t);break;case"margin":const e=t.split(/ \t/).map((e=>(0,s.getMeasurement)(e)));switch(e.length){case 1:i.top=i.bottom=i.left=i.right=e[0];break;case 2:i.top=i.bottom=e[0];i.left=i.right=e[1];break;case 3:i.top=e[0];i.bottom=e[2];i.left=i.right=e[1];break;case 4:i.top=e[0];i.left=e[1];i.bottom=e[2];i.right=e[3]}break;case"margin-top":i.top=(0,s.getMeasurement)(t);break;case"margin-bottom":i.bottom=(0,s.getMeasurement)(t);break;case"margin-left":i.left=(0,s.getMeasurement)(t);break;case"margin-right":i.right=(0,s.getMeasurement)(t);break;case"line-height":n=(0,s.getMeasurement)(t)}e.pushData(r,i,n);if(this[a.$content])e.addString(this[a.$content]);else for(const t of this[a.$getChildren]())"#text"!==t[a.$nodeName]?t[a.$pushGlyphs](e):e.addString(t[a.$content]);t&&e.popFont()}[a.$toHTML](e){const t=[];this[a.$extra]={children:t};this[a.$childrenToHTML]({});return 0!==t.length||this[a.$content]?s.HTMLResult.success({name:this[a.$nodeName],attributes:{href:this.href,style:mapStyle(this.style,this)},children:t,value:this[a.$content]||""}):s.HTMLResult.EMPTY}}class A extends XhtmlObject{constructor(e){super(e,"a");this.href=(0,n.fixURL)(e.href)||""}}class B extends XhtmlObject{constructor(e){super(e,"b")}[a.$pushGlyphs](e){e.pushFont({weight:"bold"});super[a.$pushGlyphs](e);e.popFont()}}class Body extends XhtmlObject{constructor(e){super(e,"body")}[a.$toHTML](e){const t=super[a.$toHTML](e),{html:r}=t;if(!r)return s.HTMLResult.EMPTY;r.name="div";r.attributes.class=["xfaRich"];return t}}class Br extends XhtmlObject{constructor(e){super(e,"br")}[a.$text](){return"\n"}[a.$pushGlyphs](e){e.addString("\n")}[a.$toHTML](e){return s.HTMLResult.success({name:"br"})}}class Html extends XhtmlObject{constructor(e){super(e,"html")}[a.$toHTML](e){const t=[];this[a.$extra]={children:t};this[a.$childrenToHTML]({});if(0===t.length)return s.HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:{}},value:this[a.$content]||""});if(1===t.length){const e=t[0];if(e.attributes&&e.attributes.class.includes("xfaRich"))return s.HTMLResult.success(e)}return s.HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:{}},children:t})}}class I extends XhtmlObject{constructor(e){super(e,"i")}[a.$pushGlyphs](e){e.pushFont({posture:"italic"});super[a.$pushGlyphs](e);e.popFont()}}class Li extends XhtmlObject{constructor(e){super(e,"li")}}class Ol extends XhtmlObject{constructor(e){super(e,"ol")}}class P extends XhtmlObject{constructor(e){super(e,"p")}[a.$pushGlyphs](e){super[a.$pushGlyphs](e,!1);e.addString("\n");e.addPara();e.popFont()}[a.$text](){return super[a.$text]()+"\n"}}class Span extends XhtmlObject{constructor(e){super(e,"span")}}class Sub extends XhtmlObject{constructor(e){super(e,"sub")}}class Sup extends XhtmlObject{constructor(e){super(e,"sup")}}class Ul extends XhtmlObject{constructor(e){super(e,"ul")}}class XhtmlNamespace{static[i.$buildXFAObject](e,t){if(XhtmlNamespace.hasOwnProperty(e))return XhtmlNamespace[e](t)}static a(e){return new A(e)}static b(e){return new B(e)}static body(e){return new Body(e)}static br(e){return new Br(e)}static html(e){return new Html(e)}static i(e){return new I(e)}static li(e){return new Li(e)}static ol(e){return new Ol(e)}static p(e){return new P(e)}static span(e){return new Span(e)}static sub(e){return new Sub(e)}static sup(e){return new Sup(e)}static ul(e){return new Ul(e)}}t.XhtmlNamespace=XhtmlNamespace},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.UnknownNamespace=void 0;var a=r(77),i=r(75);class UnknownNamespace{constructor(e){this.namespaceId=e}[a.$buildXFAObject](e,t){return new i.XmlObject(this.namespaceId,e,t)}}t.UnknownNamespace=UnknownNamespace},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.XRef=void 0;var a=r(2),i=r(5),n=r(27),s=r(9),o=r(72);t.XRef=class XRef{constructor(e,t){this.stream=e;this.pdfManager=t;this.entries=[];this.xrefstms=Object.create(null);this._cacheMap=new Map;this.stats={streamTypes:Object.create(null),fontTypes:Object.create(null)};this._newRefNum=null}getNewRef(){null===this._newRefNum&&(this._newRefNum=this.entries.length);return i.Ref.get(this._newRefNum++,0)}resetNewRef(){this._newRefNum=null}setStartXRef(e){this.startXRefQueue=[e]}parse(e=!1){let t,r,n;if(e){(0,a.warn)("Indexing all PDF objects");t=this.indexObjects()}else t=this.readXRef();t.assignXref(this);this.trailer=t;try{r=t.get("Encrypt")}catch(e){if(e instanceof s.MissingDataException)throw e;(0,a.warn)(`XRef.parse - Invalid "Encrypt" reference: "${e}".`)}if((0,i.isDict)(r)){const e=t.get("ID"),a=e&&e.length?e[0]:"";r.suppressEncryption=!0;this.encrypt=new o.CipherTransformFactory(r,a,this.pdfManager.password)}try{n=t.get("Root")}catch(e){if(e instanceof s.MissingDataException)throw e;(0,a.warn)(`XRef.parse - Invalid "Root" reference: "${e}".`)}if(!(0,i.isDict)(n)||!n.has("Pages")){if(!e)throw new s.XRefParseException;throw new a.FormatError("Invalid root reference")}this.root=n}processXRefTable(e){"tableState"in this||(this.tableState={entryNum:0,streamPos:e.lexer.stream.pos,parserBuf1:e.buf1,parserBuf2:e.buf2});const t=this.readXRefTable(e);if(!(0,i.isCmd)(t,"trailer"))throw new a.FormatError("Invalid XRef table: could not find trailer dictionary");let r=e.getObj();!(0,i.isDict)(r)&&r.dict&&(r=r.dict);if(!(0,i.isDict)(r))throw new a.FormatError("Invalid XRef table: could not parse trailer dictionary");delete this.tableState;return r}readXRefTable(e){const t=e.lexer.stream,r=this.tableState;t.pos=r.streamPos;e.buf1=r.parserBuf1;e.buf2=r.parserBuf2;let n;for(;;){if(!("firstEntryNum"in r)||!("entryCount"in r)){if((0,i.isCmd)(n=e.getObj(),"trailer"))break;r.firstEntryNum=n;r.entryCount=e.getObj()}let s=r.firstEntryNum;const o=r.entryCount;if(!Number.isInteger(s)||!Number.isInteger(o))throw new a.FormatError("Invalid XRef table: wrong types in subsection header");for(let n=r.entryNum;n0;){const n=l[0],h=l[1];if(!Number.isInteger(n)||!Number.isInteger(h))throw new a.FormatError(`Invalid XRef range fields: ${n}, ${h}`);if(!Number.isInteger(s)||!Number.isInteger(o)||!Number.isInteger(c))throw new a.FormatError(`Invalid XRef entry fields length: ${n}, ${h}`);for(t=i.entryNum;t=e.length);){r+=String.fromCharCode(a);a=e[t]}return r}function skipUntil(e,t,r){const a=r.length,i=e.length;let n=0;for(;t=a)break;t++;n++}return n}const e=/^(\d+)\s+(\d+)\s+obj\b/,t=/\bendobj[\b\s]$/,r=/\s+(\d+\s+\d+\s+obj[\b\s<])$/,o=new Uint8Array([116,114,97,105,108,101,114]),c=new Uint8Array([115,116,97,114,116,120,114,101,102]),l=new Uint8Array([111,98,106]),h=new Uint8Array([47,88,82,101,102]);this.entries.length=0;const u=this.stream;u.pos=0;const d=u.getBytes(),f=d.length;let g=u.start;const p=[],m=[];for(;g=f)break;i=d[g]}while(10!==i&&13!==i);continue}const b=readToken(d,g);let y;if(b.startsWith("xref")&&(4===b.length||/\s/.test(b[4]))){g+=skipUntil(d,g,o);p.push(g);g+=skipUntil(d,g,c)}else if(y=e.exec(b)){const e=0|y[1],i=0|y[2];let o,c=g+b.length,f=!1;if(this.entries[e]){if(this.entries[e].gen===i)try{new n.Parser({lexer:new n.Lexer(u.makeSubStream(c))}).getObj();f=!0}catch(e){e instanceof s.ParserEOFException?(0,a.warn)(`indexObjects -- checking object (${b}): "${e}".`):f=!0}}else f=!0;f&&(this.entries[e]={offset:g-u.start,gen:i,uncompressed:!0});for(;c{Object.defineProperty(t,"__esModule",{value:!0});t.MessageHandler=void 0;var a=r(2);const i=1,n=2,s=1,o=2,c=3,l=4,h=5,u=6,d=7,f=8;function wrapReason(e){if(!(e instanceof Error||"object"==typeof e&&null!==e)){(0,a.warn)('wrapReason: Expected "reason" to be a (possibly cloned) Error.');return e}switch(e.name){case"AbortException":return new a.AbortException(e.message);case"MissingPDFException":return new a.MissingPDFException(e.message);case"PasswordException":return new a.PasswordException(e.message,e.code);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())}}t.MessageHandler=class MessageHandler{constructor(e,t,r){this.sourceName=e;this.targetName=t;this.comObj=r;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=e=>{const t=e.data;if(t.targetName!==this.sourceName)return;if(t.stream){this._processStreamMessage(t);return}if(t.callback){const e=t.callbackId,r=this.callbackCapabilities[e];if(!r)throw new Error(`Cannot resolve callback ${e}`);delete this.callbackCapabilities[e];if(t.callback===i)r.resolve(t.data);else{if(t.callback!==n)throw new Error("Unexpected callback case");r.reject(wrapReason(t.reason))}return}const a=this.actionHandler[t.action];if(!a)throw new Error(`Unknown action from worker: ${t.action}`);if(t.callbackId){const e=this.sourceName,s=t.sourceName;new Promise((function(e){e(a(t.data))})).then((function(a){r.postMessage({sourceName:e,targetName:s,callback:i,callbackId:t.callbackId,data:a})}),(function(a){r.postMessage({sourceName:e,targetName:s,callback:n,callbackId:t.callbackId,reason:wrapReason(a)})}))}else t.streamId?this._createStreamSink(t):a(t.data)};r.addEventListener("message",this._onComObjOnMessage)}on(e,t){const r=this.actionHandler;if(r[e])throw new Error(`There is already an actionName called "${e}"`);r[e]=t}send(e,t,r){this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},r)}sendWithPromise(e,t,r){const i=this.callbackId++,n=(0,a.createPromiseCapability)();this.callbackCapabilities[i]=n;try{this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:i,data:t},r)}catch(e){n.reject(e)}return n.promise}sendWithStream(e,t,r,i){const n=this.streamId++,o=this.sourceName,c=this.targetName,l=this.comObj;return new ReadableStream({start:r=>{const s=(0,a.createPromiseCapability)();this.streamControllers[n]={controller:r,startCall:s,pullCall:null,cancelCall:null,isClosed:!1};this._postMessage({sourceName:o,targetName:c,action:e,streamId:n,data:t,desiredSize:r.desiredSize},i);return s.promise},pull:e=>{const t=(0,a.createPromiseCapability)();this.streamControllers[n].pullCall=t;l.postMessage({sourceName:o,targetName:c,stream:u,streamId:n,desiredSize:e.desiredSize});return t.promise},cancel:e=>{(0,a.assert)(e instanceof Error,"cancel must have a valid reason");const t=(0,a.createPromiseCapability)();this.streamControllers[n].cancelCall=t;this.streamControllers[n].isClosed=!0;l.postMessage({sourceName:o,targetName:c,stream:s,streamId:n,reason:wrapReason(e)});return t.promise}},r)}_createStreamSink(e){const t=e.streamId,r=this.sourceName,i=e.sourceName,n=this.comObj,s=this,o=this.actionHandler[e.action],u={enqueue(e,n=1,o){if(this.isCancelled)return;const c=this.desiredSize;this.desiredSize-=n;if(c>0&&this.desiredSize<=0){this.sinkCapability=(0,a.createPromiseCapability)();this.ready=this.sinkCapability.promise}s._postMessage({sourceName:r,targetName:i,stream:l,streamId:t,chunk:e},o)},close(){if(!this.isCancelled){this.isCancelled=!0;n.postMessage({sourceName:r,targetName:i,stream:c,streamId:t});delete s.streamSinks[t]}},error(e){(0,a.assert)(e instanceof Error,"error must have a valid reason");if(!this.isCancelled){this.isCancelled=!0;n.postMessage({sourceName:r,targetName:i,stream:h,streamId:t,reason:wrapReason(e)})}},sinkCapability:(0,a.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};u.sinkCapability.resolve();u.ready=u.sinkCapability.promise;this.streamSinks[t]=u;new Promise((function(t){t(o(e.data,u))})).then((function(){n.postMessage({sourceName:r,targetName:i,stream:f,streamId:t,success:!0})}),(function(e){n.postMessage({sourceName:r,targetName:i,stream:f,streamId:t,reason:wrapReason(e)})}))}_processStreamMessage(e){const t=e.streamId,r=this.sourceName,i=e.sourceName,n=this.comObj,g=this.streamControllers[t],p=this.streamSinks[t];switch(e.stream){case f:e.success?g.startCall.resolve():g.startCall.reject(wrapReason(e.reason));break;case d:e.success?g.pullCall.resolve():g.pullCall.reject(wrapReason(e.reason));break;case u:if(!p){n.postMessage({sourceName:r,targetName:i,stream:d,streamId:t,success:!0});break}p.desiredSize<=0&&e.desiredSize>0&&p.sinkCapability.resolve();p.desiredSize=e.desiredSize;new Promise((function(e){e(p.onPull&&p.onPull())})).then((function(){n.postMessage({sourceName:r,targetName:i,stream:d,streamId:t,success:!0})}),(function(e){n.postMessage({sourceName:r,targetName:i,stream:d,streamId:t,reason:wrapReason(e)})}));break;case l:(0,a.assert)(g,"enqueue should have stream controller");if(g.isClosed)break;g.controller.enqueue(e.chunk);break;case c:(0,a.assert)(g,"close should have stream controller");if(g.isClosed)break;g.isClosed=!0;g.controller.close();this._deleteStreamController(g,t);break;case h:(0,a.assert)(g,"error should have stream controller");g.controller.error(wrapReason(e.reason));this._deleteStreamController(g,t);break;case o:e.success?g.cancelCall.resolve():g.cancelCall.reject(wrapReason(e.reason));this._deleteStreamController(g,t);break;case s:if(!p)break;new Promise((function(t){t(p.onCancel&&p.onCancel(wrapReason(e.reason)))})).then((function(){n.postMessage({sourceName:r,targetName:i,stream:o,streamId:t,success:!0})}),(function(e){n.postMessage({sourceName:r,targetName:i,stream:o,streamId:t,reason:wrapReason(e)})}));p.sinkCapability.reject(wrapReason(e.reason));p.isCancelled=!0;delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}async _deleteStreamController(e,t){await Promise.allSettled([e.startCall&&e.startCall.promise,e.pullCall&&e.pullCall.promise,e.cancelCall&&e.cancelCall.promise]);delete this.streamControllers[t]}_postMessage(e,t){t&&this.postMessageTransfers?this.comObj.postMessage(e,t):this.comObj.postMessage(e)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});t.PDFWorkerStream=void 0;var a=r(2);t.PDFWorkerStream=class PDFWorkerStream{constructor(e){this._msgHandler=e;this._contentLength=null;this._fullRequestReader=null;this._rangeRequestReaders=[]}getFullReader(){(0,a.assert)(!this._fullRequestReader,"PDFWorkerStream.getFullReader can only be called once.");this._fullRequestReader=new PDFWorkerStreamReader(this._msgHandler);return this._fullRequestReader}getRangeReader(e,t){const r=new PDFWorkerStreamRangeReader(e,t,this._msgHandler);this._rangeRequestReaders.push(r);return r}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}};class PDFWorkerStreamReader{constructor(e){this._msgHandler=e;this.onProgress=null;this._contentLength=null;this._isRangeSupported=!1;this._isStreamingSupported=!1;const t=this._msgHandler.sendWithStream("GetReader");this._reader=t.getReader();this._headersReady=this._msgHandler.sendWithPromise("ReaderHeadersReady").then((e=>{this._isStreamingSupported=e.isStreamingSupported;this._isRangeSupported=e.isRangeSupported;this._contentLength=e.contentLength}))}get headersReady(){return this._headersReady}get contentLength(){return this._contentLength}get isStreamingSupported(){return this._isStreamingSupported}get isRangeSupported(){return this._isRangeSupported}async read(){const{value:e,done:t}=await this._reader.read();return t?{value:void 0,done:!0}:{value:e.buffer,done:!1}}cancel(e){this._reader.cancel(e)}}class PDFWorkerStreamRangeReader{constructor(e,t,r){this._msgHandler=r;this.onProgress=null;const a=this._msgHandler.sendWithStream("GetRangeReader",{begin:e,end:t});this._reader=a.getReader()}get isStreamingSupported(){return!1}async read(){const{value:e,done:t}=await this._reader.read();return t?{value:void 0,done:!0}:{value:e.buffer,done:!1}}cancel(e){this._reader.cancel(e)}}}],t={};function __w_pdfjs_require__(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={exports:{}};e[r](i,i.exports,__w_pdfjs_require__);return i.exports}__w_pdfjs_require__.d=(e,t)=>{for(var r in t)__w_pdfjs_require__.o(t,r)&&!__w_pdfjs_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})};__w_pdfjs_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);__w_pdfjs_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0});Object.defineProperty(e,"WorkerMessageHandler",{enumerable:!0,get:function(){return t.WorkerMessageHandler}});var t=__w_pdfjs_require__(1)})();return r})()})); \ No newline at end of file diff --git a/public/textVideo/pcm.js b/public/textVideo/pcm.js new file mode 100644 index 0000000..51c1efe --- /dev/null +++ b/public/textVideo/pcm.js @@ -0,0 +1,96 @@ +/* +pcm编码器+编码引擎 +https://github.com/xiangyuecn/Recorder + +编码原理:本编码器输出的pcm格式数据其实就是Recorder中的buffers原始数据(经过了重新采样),16位时为LE小端模式(Little Endian),并未经过任何编码处理 + +编码的代码和wav.js区别不大,pcm加上一个44字节wav头即成wav文件;所以要播放pcm就很简单了,直接转成wav文件来播放,已提供转换函数 Recorder.pcm2wav +*/ +(function(){ +"use strict"; + +Recorder.prototype.enc_pcm={ + stable:true + ,testmsg:"pcm为未封装的原始音频数据,pcm数据文件无法直接播放;支持位数8位、16位(填在比特率里面),采样率取值无限制" +}; +Recorder.prototype.pcm=function(res,True,False){ + var This=this,set=This.set + ,size=res.length + ,bitRate=set.bitRate==8?8:16; + + var buffer=new ArrayBuffer(size*(bitRate/8)); + var data=new DataView(buffer); + var offset=0; + + // 写入采样数据 + if(bitRate==8) { + for(var i=0;i>8)+128; + data.setInt8(offset,val,true); + }; + }else{ + for (var i=0;i=pcmSampleRate时不会进行任何处理,小于时会进行重新采样 +prevChunkInfo:{} 可选,上次调用时的返回值,用于连续转换,本次调用将从上次结束位置开始进行处理。或可自行定义一个ChunkInfo从pcmDatas指定的位置开始进行转换 +option:{ 可选,配置项 + frameSize:123456 帧大小,每帧的PCM Int16的数量,采样率转换后的pcm长度为frameSize的整数倍,用于连续转换。目前仅在mp3格式时才有用,frameSize取值为1152,这样编码出来的mp3时长和pcm的时长完全一致,否则会因为mp3最后一帧录音不够填满时添加填充数据导致mp3的时长变长。 + frameType:"" 帧类型,一般为rec.set.type,提供此参数时无需提供frameSize,会自动使用最佳的值给frameSize赋值,目前仅支持mp3=1152(MPEG1 Layer3的每帧采采样数),其他类型=1。 + 以上两个参数用于连续转换时使用,最多使用一个,不提供时不进行帧的特殊处理,提供时必须同时提供prevChunkInfo才有作用。最后一段数据处理时无需提供帧大小以便输出最后一丁点残留数据。 + } + +返回ChunkInfo:{ + //可定义,从指定位置开始转换到结尾 + index:0 pcmDatas已处理到的索引 + offset:0.0 已处理到的index对应的pcm中的偏移的下一个位置 + + //仅作为返回值 + frameNext:null||[Int16,...] 下一帧的部分数据,frameSize设置了的时候才可能会有 + sampleRate:16000 结果的采样率,<=newSampleRate + data:[Int16,...] 转换后的PCM结果;如果是连续转换,并且pcmDatas中并没有新数据时,data的长度可能为0 +} +*/ +Recorder.SampleData=function(pcmDatas,pcmSampleRate,newSampleRate,prevChunkInfo,option){ + prevChunkInfo||(prevChunkInfo={}); + var index=prevChunkInfo.index||0; + var offset=prevChunkInfo.offset||0; + + var frameNext=prevChunkInfo.frameNext||[]; + option||(option={}); + var frameSize=option.frameSize||1; + if(option.frameType){ + frameSize=option.frameType=="mp3"?1152:1; + }; + + var nLen=pcmDatas.length; + if(index>nLen+1){ + CLog("SampleData似乎传入了未重置chunk "+index+">"+nLen,3); + }; + var size=0; + for(var i=index;i1){//新采样低于录音采样,进行抽样 + size=Math.floor(size/step); + }else{//新采样高于录音采样不处理,省去了插值处理 + step=1; + newSampleRate=pcmSampleRate; + }; + + size+=frameNext.length; + var res=new Int16Array(size); + var idx=0; + //添加上一次不够一帧的剩余数据 + for(var i=0;i0){ + var u8Pos=(res.length-frameNextSize)*2; + frameNext=new Int16Array(res.buffer.slice(u8Pos)); + res=new Int16Array(res.buffer.slice(0,u8Pos)); + }; + + return { + index:index + ,offset:offset + + ,frameNext:frameNext + ,sampleRate:newSampleRate + ,data:res + }; +}; + + +/*计算音量百分比的一个方法 +pcmAbsSum: pcm Int16所有采样的绝对值的和 +pcmLength: pcm长度 +返回值:0-100,主要当做百分比用 +注意:这个不是分贝,因此没用volume当做名称*/ +Recorder.PowerLevel=function(pcmAbsSum,pcmLength){ + /*计算音量 https://blog.csdn.net/jody1989/article/details/73480259 + 更高灵敏度算法: + 限定最大感应值10000 + 线性曲线:低音量不友好 + power/10000*100 + 对数曲线:低音量友好,但需限定最低感应值 + (1+Math.log10(power/10000))*100 + */ + var power=(pcmAbsSum/pcmLength) || 0;//NaN + var level; + if(power<1251){//1250的结果10%,更小的音量采用线性取值 + level=Math.round(power/1250*10); + }else{ + level=Math.round(Math.min(100,Math.max(0,(1+Math.log(power/10000)/Math.log(10))*100))); + }; + return level; +}; + +/*计算音量,单位dBFS(满刻度相对电平) +maxSample: 为16位pcm采样的绝对值中最大的一个(计算峰值音量),或者为pcm中所有采样的绝对值的平局值 +返回值:-100~0 (最大值0dB,最小值-100代替-∞) +*/ +Recorder.PowerDBFS=function(maxSample){ + var val=Math.max(0.1, maxSample||0),Pref=0x7FFF; + val=Math.min(val,Pref); + //https://www.logiclocmusic.com/can-you-tell-the-decibel/ + //https://blog.csdn.net/qq_17256689/article/details/120442510 + val=20*Math.log(val/Pref)/Math.log(10); + return Math.max(-100,Math.round(val)); +}; + + + + +//带时间的日志输出,可设为一个空函数来屏蔽日志输出 +//CLog(msg,errOrLogMsg, logMsg...) err为数字时代表日志类型1:error 2:log默认 3:warn,否则当做内容输出,第一个参数不能是对象因为要拼接时间,后面可以接无数个输出参数 +Recorder.CLog=function(msg,err){ + var now=new Date(); + var t=("0"+now.getMinutes()).substr(-2) + +":"+("0"+now.getSeconds()).substr(-2) + +"."+("00"+now.getMilliseconds()).substr(-3); + var recID=this&&this.envIn&&this.envCheck&&this.id; + var arr=["["+t+" "+RecTxt+(recID?":"+recID:"")+"]"+msg]; + var a=arguments,console=window.console||{}; + var i=2,fn=console.log; + if(typeof(err)=="number"){ + fn=err==1?console.error:err==3?console.warn:fn; + }else{ + i=1; + }; + for(;i1?arr:""); + }else{ + fn.apply(console,arr); + }; +}; +var CLog=function(){ Recorder.CLog.apply(this,arguments); }; +var IsLoser=true;try{IsLoser=!console.log.apply;}catch(e){}; + + + + +var ID=0; +function initFn(set){ + this.id=++ID; + + //如果开启了流量统计,这里将发送一个图片请求 + Traffic(); + + + var o={ + type:"mp3" //输出类型:mp3,wav,wav输出文件尺寸超大不推荐使用,但mp3编码支持会导致js文件超大,如果不需支持mp3可以使js文件大幅减小 + ,bitRate:16 //比特率 wav:16或8位,MP3:8kbps 1k/s,8kbps 2k/s 录音文件很小 + + ,sampleRate:16000 //采样率,wav格式大小=sampleRate*时间;mp3此项对低比特率有影响,高比特率几乎无影响。 + //wav任意值,mp3取值范围:48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000 + //采样率参考https://www.cnblogs.com/devin87/p/mp3-recorder.html + + ,onProcess:NOOP //fn(buffers,powerLevel,bufferDuration,bufferSampleRate,newBufferIdx,asyncEnd) buffers=[[Int16,...],...]:缓冲的PCM数据,为从开始录音到现在的所有pcm片段;powerLevel:当前缓冲的音量级别0-100,bufferDuration:已缓冲时长,bufferSampleRate:缓冲使用的采样率(当type支持边录边转码(Worker)时,此采样率和设置的采样率相同,否则不一定相同);newBufferIdx:本次回调新增的buffer起始索引;asyncEnd:fn() 如果onProcess是异步的(返回值为true时),处理完成时需要调用此回调,如果不是异步的请忽略此参数,此方法回调时必须是真异步(不能真异步时需用setTimeout包裹)。onProcess返回值:如果返回true代表开启异步模式,在某些大量运算的场合异步是必须的,必须在异步处理完成时调用asyncEnd(不能真异步时需用setTimeout包裹),在onProcess执行后新增的buffer会全部替换成空数组,因此本回调开头应立即将newBufferIdx到本次回调结尾位置的buffer全部保存到另外一个数组内,处理完成后写回buffers中本次回调的结尾位置。 + + //*******高级设置****** + //,sourceStream:MediaStream Object + //可选直接提供一个媒体流,从这个流中录制、实时处理音频数据(当前Recorder实例独享此流);不提供时为普通的麦克风录音,由getUserMedia提供音频流(所有Recorder实例共享同一个流) + //比如:audio、video标签dom节点的captureStream方法(实验特性,不同浏览器支持程度不高)返回的流;WebRTC中的remote流;自己创建的流等 + //注意:流内必须至少存在一条音轨(Audio Track),比如audio标签必须等待到可以开始播放后才会有音轨,否则open会失败 + + //,audioTrackSet:{ deviceId:"",groupId:"", autoGainControl:true, echoCancellation:true, noiseSuppression:true } + //普通麦克风录音时getUserMedia方法的audio配置参数,比如指定设备id,回声消除、降噪开关;注意:提供的任何配置值都不一定会生效 + //由于麦克风是全局共享的,所以新配置后需要close掉以前的再重新open + //更多参考: https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints + + //,disableEnvInFix:false 内部参数,禁用设备卡顿时音频输入丢失补偿功能 + + //,takeoffEncodeChunk:NOOP //fn(chunkBytes) chunkBytes=[Uint8,...]:实时编码环境下接管编码器输出,当编码器实时编码出一块有效的二进制音频数据时实时回调此方法;参数为二进制的Uint8Array,就是编码出来的音频数据片段,所有的chunkBytes拼接在一起即为完整音频。本实现的想法最初由QQ2543775048提出 + //当提供此回调方法时,将接管编码器的数据输出,编码器内部将放弃存储生成的音频数据;环境要求比较苛刻:如果当前环境不支持实时编码处理,将在open时直接走fail逻辑 + //因此提供此回调后调用stop方法将无法获得有效的音频数据,因为编码器内没有音频数据,因此stop时返回的blob将是一个字节长度为0的blob + //目前只有mp3格式实现了实时编码,在支持实时处理的环境中将会实时的将编码出来的mp3片段通过此方法回调,所有的chunkBytes拼接到一起即为完整的mp3,此种拼接的结果比mock方法实时生成的音质更加,因为天然避免了首尾的静默 + //目前除mp3外其他格式不可以提供此回调,提供了将在open时直接走fail逻辑 + }; + + for(var k in set){ + o[k]=set[k]; + }; + this.set=o; + + this._S=9;//stop同步锁,stop可以阻止open过程中还未运行的start + this.Sync={O:9,C:9};//和Recorder.Sync一致,只不过这个是非全局的,仅用来简化代码逻辑,无实际作用 +}; +//同步锁,控制对Stream的竞争;用于close时中断异步的open;一个对象open如果变化了都要阻止close,Stream的控制权交个新的对象 +Recorder.Sync={/*open*/O:9,/*close*/C:9}; + +Recorder.prototype=initFn.prototype={ + CLog:CLog + + //流相关的数据存储在哪个对象里面;如果提供了sourceStream,数据直接存储在当前对象中,否则存储在全局 + ,_streamStore:function(){ + if(this.set.sourceStream){ + return this; + }else{ + return Recorder; + } + } + + //打开录音资源True(),False(msg,isUserNotAllow),需要调用close。注意:此方法是异步的;一般使用时打开,用完立即关闭;可重复调用,可用来测试是否能录音 + ,open:function(True,False){ + var This=this,streamStore=This._streamStore(); + True=True||NOOP; + var failCall=function(errMsg,isUserNotAllow){ + isUserNotAllow=!!isUserNotAllow; + This.CLog("录音open失败:"+errMsg+",isUserNotAllow:"+isUserNotAllow,1); + False&&False(errMsg,isUserNotAllow); + }; + + var ok=function(){ + This.CLog("open ok id:"+This.id); + True(); + + This._SO=0;//解除stop对open中的start调用的阻止 + }; + + + //同步锁 + var Lock=streamStore.Sync; + var lockOpen=++Lock.O,lockClose=Lock.C; + This._O=This._O_=lockOpen;//记住当前的open,如果变化了要阻止close,这里假定了新对象已取代当前对象并且不再使用 + This._SO=This._S;//记住open过程中的stop,中途任何stop调用后都不能继续open中的start + var lockFail=function(){ + //允许多次open,但不允许任何一次close,或者自身已经调用了关闭 + if(lockClose!=Lock.C || !This._O){ + var err="open被取消"; + if(lockOpen==Lock.O){ + //无新的open,已经调用了close进行取消,此处应让上次的close明确生效 + This.close(); + }else{ + err="open被中断"; + }; + failCall(err); + return true; + }; + }; + + //环境配置检查 + var checkMsg=This.envCheck({envName:"H5",canProcess:true}); + if(checkMsg){ + failCall("不能录音:"+checkMsg); + return; + }; + + + //***********已直接提供了音频流************ + if(This.set.sourceStream){ + if(!Recorder.GetContext()){ + failCall("不支持此浏览器从流中获取录音"); + return; + }; + + Disconnect(streamStore);//可能已open过,直接先尝试断开 + This.Stream=This.set.sourceStream; + This.Stream._call={}; + + try{ + Connect(streamStore); + }catch(e){ + failCall("从流中打开录音失败:"+e.message); + return; + } + ok(); + return; + }; + + + //***********打开麦克风得到全局的音频流************ + var codeFail=function(code,msg){ + try{//跨域的优先检测一下 + window.top.a; + }catch(e){ + failCall('无权录音(跨域,请尝试给iframe添加麦克风访问策略,如allow="camera;microphone")'); + return; + }; + + if(/Permission|Allow/i.test(code)){ + failCall("用户拒绝了录音权限",true); + }else if(window.isSecureContext===false){ + failCall("浏览器禁止不安全页面录音,可开启https解决"); + }else if(/Found/i.test(code)){//可能是非安全环境导致的没有设备 + failCall(msg+",无可用麦克风"); + }else{ + failCall(msg); + }; + }; + + + //如果已打开并且有效就不要再打开了 + if(Recorder.IsOpen()){ + ok(); + return; + }; + if(!Recorder.Support()){ + codeFail("","此浏览器不支持录音"); + return; + }; + + //请求权限,如果从未授权,一般浏览器会弹出权限请求弹框 + var f1=function(stream){ + //https://github.com/xiangyuecn/Recorder/issues/14 获取到的track.readyState!="live",刚刚回调时可能是正常的,但过一下可能就被关掉了,原因不明。延迟一下保证真异步。对正常浏览器不影响 + setTimeout(function(){ + stream._call={}; + var oldStream=Recorder.Stream; + if(oldStream){ + Disconnect(); //直接断开已存在的,旧的Connect未完成会自动终止 + stream._call=oldStream._call; + }; + Recorder.Stream=stream; + if(lockFail())return; + + if(Recorder.IsOpen()){ + if(oldStream)This.CLog("发现同时多次调用open",1); + + Connect(streamStore,1); + ok(); + }else{ + failCall("录音功能无效:无音频流"); + }; + },100); + }; + var f2=function(e){ + var code=e.name||e.message||e.code+":"+e; + This.CLog("请求录音权限错误",1,e); + + codeFail(code,"无法录音:"+code); + }; + + var trackSet={ + noiseSuppression:false //默认禁用降噪,原声录制,免得移动端表现怪异(包括系统播放声音变小) + ,echoCancellation:false //回声消除 + }; + var trackSet2=This.set.audioTrackSet; + for(var k in trackSet2)trackSet[k]=trackSet2[k]; + trackSet.sampleRate=Recorder.Ctx.sampleRate;//必须指明采样率,不然手机上MediaRecorder采样率16k + + try{ + var pro=Recorder.Scope[getUserMediaTxt]({audio:trackSet},f1,f2); + }catch(e){//不能设置trackSet就算了 + This.CLog(getUserMediaTxt,3,e); + pro=Recorder.Scope[getUserMediaTxt]({audio:true},f1,f2); + }; + if(pro&&pro.then){ + pro.then(f1)[CatchTxt](f2); //fix 关键字,保证catch压缩时保持字符串形式 + }; + } + //关闭释放录音资源 + ,close:function(call){ + call=call||NOOP; + + var This=this,streamStore=This._streamStore(); + This._stop(); + + var Lock=streamStore.Sync; + This._O=0; + if(This._O_!=Lock.O){ + //唯一资源Stream的控制权已交给新对象,这里不能关闭。此处在每次都弹权限的浏览器内可能存在泄漏,新对象被拒绝权限可能不会调用close,忽略这种不处理 + This.CLog("close被忽略(因为同时open了多个rec,只有最后一个会真正close)",3); + call(); + return; + }; + Lock.C++;//获得控制权 + + Disconnect(streamStore); + + This.CLog("close"); + call(); + } + + + + + + /*模拟一段录音数据,后面可以调用stop进行编码,需提供pcm数据[1,2,3...],pcm的采样率*/ + ,mock:function(pcmData,pcmSampleRate){ + var This=this; + This._stop();//清理掉已有的资源 + + This.isMock=1; + This.mockEnvInfo=null; + This.buffers=[pcmData]; + This.recSize=pcmData.length; + This[srcSampleRateTxt]=pcmSampleRate; + return This; + } + ,envCheck:function(envInfo){//平台环境下的可用性检查,任何时候都可以调用检查,返回errMsg:""正常,"失败原因" + //envInfo={envName:"H5",canProcess:true} + var errMsg,This=this,set=This.set; + + //检测CPU的数字字节序,TypedArray字节序是个迷,直接拒绝罕见的大端模式,因为找不到这种CPU进行测试 + var tag="CPU_BE"; + if(!errMsg && !Recorder[tag] && window.Int8Array && !new Int8Array(new Int32Array([1]).buffer)[0]){ + Traffic(tag); //如果开启了流量统计,这里将发送一个图片请求 + errMsg="不支持"+tag+"架构"; + }; + + //编码器检查环境下配置是否可用 + if(!errMsg){ + var type=set.type; + if(This[type+"_envCheck"]){//编码器已实现环境检查 + errMsg=This[type+"_envCheck"](envInfo,set); + }else{//未实现检查的手动检查配置是否有效 + if(set.takeoffEncodeChunk){ + errMsg=type+"类型"+(This[type]?"":"(未加载编码器)")+"不支持设置takeoffEncodeChunk"; + }; + }; + }; + + return errMsg||""; + } + ,envStart:function(mockEnvInfo,sampleRate){//平台环境相关的start调用 + var This=this,set=This.set; + This.isMock=mockEnvInfo?1:0;//非H5环境需要启用mock,并提供envCheck需要的环境信息 + This.mockEnvInfo=mockEnvInfo; + This.buffers=[];//数据缓冲 + This.recSize=0;//数据大小 + + This.envInLast=0;//envIn接收到最后录音内容的时间 + This.envInFirst=0;//envIn接收到的首个录音内容的录制时间 + This.envInFix=0;//补偿的总时间 + This.envInFixTs=[];//补偿计数列表 + + //engineCtx需要提前确定最终的采样率 + var setSr=set[sampleRateTxt]; + if(setSr>sampleRate){ + set[sampleRateTxt]=sampleRate; + }else{ setSr=0 } + This[srcSampleRateTxt]=sampleRate; + This.CLog(srcSampleRateTxt+": "+sampleRate+" set."+sampleRateTxt+": "+set[sampleRateTxt]+(setSr?" 忽略"+setSr:""), setSr?3:0); + + This.engineCtx=0; + //此类型有边录边转码(Worker)支持 + if(This[set.type+"_start"]){ + var engineCtx=This.engineCtx=This[set.type+"_start"](set); + if(engineCtx){ + engineCtx.pcmDatas=[]; + engineCtx.pcmSize=0; + }; + }; + } + ,envResume:function(){//和平台环境无关的恢复录音 + //重新开始计数 + this.envInFixTs=[]; + } + ,envIn:function(pcm,sum){//和平台环境无关的pcm[Int16]输入 + var This=this,set=This.set,engineCtx=This.engineCtx; + var bufferSampleRate=This[srcSampleRateTxt]; + var size=pcm.length; + var powerLevel=Recorder.PowerLevel(sum,size); + + var buffers=This.buffers; + var bufferFirstIdx=buffers.length;//之前的buffer都是经过onProcess处理好的,不允许再修改 + buffers.push(pcm); + + //有engineCtx时会被覆盖,这里保存一份 + var buffersThis=buffers; + var bufferFirstIdxThis=bufferFirstIdx; + + //卡顿丢失补偿:因为设备很卡的时候导致H5接收到的数据量不够造成播放时候变速,结果比实际的时长要短,此处保证了不会变短,但不能修复丢失的音频数据造成音质变差。当前算法采用输入时间侦测下一帧是否需要添加补偿帧,需要(6次输入||超过1秒)以上才会开始侦测,如果滑动窗口内丢失超过1/3就会进行补偿 + var now=Date.now(); + var pcmTime=Math.round(size/bufferSampleRate*1000); + This.envInLast=now; + if(This.buffers.length==1){//记下首个录音数据的录制时间 + This.envInFirst=now-pcmTime; + }; + var envInFixTs=This.envInFixTs; + envInFixTs.splice(0,0,{t:now,d:pcmTime}); + //保留3秒的计数滑动窗口,另外超过3秒的停顿不补偿 + var tsInStart=now,tsPcm=0; + for(var i=0;i3000){ + envInFixTs.length=i; + break; + }; + tsInStart=o.t; + tsPcm+=o.d; + }; + //达到需要的数据量,开始侦测是否需要补偿 + var tsInPrev=envInFixTs[1]; + var tsIn=now-tsInStart; + var lost=tsIn-tsPcm; + if( lost>tsIn/3 && (tsInPrev&&tsIn>1000 || envInFixTs.length>=6) ){ + //丢失过多,开始执行补偿 + var addTime=now-tsInPrev.t-pcmTime;//距离上次输入丢失这么多ms + if(addTime>pcmTime/5){//丢失超过本帧的1/5 + var fixOpen=!set.disableEnvInFix; + This.CLog("["+now+"]"+(fixOpen?"":"未")+"补偿"+addTime+"ms",3); + This.envInFix+=addTime; + + //用静默进行补偿 + if(fixOpen){ + var addPcm=new Int16Array(addTime*bufferSampleRate/1000); + size+=addPcm.length; + buffers.push(addPcm); + }; + }; + }; + + + var sizeOld=This.recSize,addSize=size; + var bufferSize=sizeOld+addSize; + This.recSize=bufferSize;//此值在onProcess后需要修正,可能新数据被修改 + + + //此类型有边录边转码(Worker)支持,开启实时转码 + if(engineCtx){ + //转换成set的采样率 + var chunkInfo=Recorder.SampleData(buffers,bufferSampleRate,set[sampleRateTxt],engineCtx.chunkInfo); + engineCtx.chunkInfo=chunkInfo; + + sizeOld=engineCtx.pcmSize; + addSize=chunkInfo.data.length; + bufferSize=sizeOld+addSize; + engineCtx.pcmSize=bufferSize;//此值在onProcess后需要修正,可能新数据被修改 + + buffers=engineCtx.pcmDatas; + bufferFirstIdx=buffers.length; + buffers.push(chunkInfo.data); + bufferSampleRate=chunkInfo[sampleRateTxt]; + }; + + var duration=Math.round(bufferSize/bufferSampleRate*1000); + var bufferNextIdx=buffers.length; + var bufferNextIdxThis=buffersThis.length; + + //允许异步处理buffer数据 + var asyncEnd=function(){ + //重新计算size,异步的早已减去添加的,同步的需去掉本次添加的然后重新计算 + var num=asyncBegin?0:-addSize; + var hasClear=buffers[0]==null; + for(var i=bufferFirstIdx;i10 && This.envInFirst-now>1000){ //1秒后开始onProcess性能监测 + This.CLog(procTxt+"低性能,耗时"+slowT+"ms",3); + }; + + if(asyncBegin===true){ + //开启了异步模式,onProcess已接管buffers新数据,立即清空,避免出现未处理的数据 + var hasClear=0; + for(var i=bufferFirstIdx;i"+res.length+" 花:"+(Date.now()-t1)+"ms"); + + setTimeout(function(){ + t1=Date.now(); + This[set.type](res,function(blob){ + ok(blob,duration); + },function(msg){ + err(msg); + }); + }); + } + +}; + +if(window[RecTxt]){ + CLog("重复引入"+RecTxt,3); + window[RecTxt].Destroy(); +}; +window[RecTxt]=Recorder; + + + + +//=======从WebM字节流中提取pcm数据,提取成功返回Float32Array,失败返回null||-1===== +var WebM_Extract=function(inBytes, scope){ + if(!scope.pos){ + scope.pos=[0]; scope.tracks={}; scope.bytes=[]; + }; + var tracks=scope.tracks, position=[scope.pos[0]]; + var endPos=function(){ scope.pos[0]=position[0] }; + + var sBL=scope.bytes.length; + var bytes=new Uint8Array(sBL+inBytes.length); + bytes.set(scope.bytes); bytes.set(inBytes,sBL); + scope.bytes=bytes; + + //先读取文件头和Track信息 + if(!scope._ht){ + readMatroskaVInt(bytes, position);//EBML Header + readMatroskaBlock(bytes, position);//跳过EBML Header内容 + if(!BytesEq(readMatroskaVInt(bytes, position), [0x18,0x53,0x80,0x67])){ + return;//未识别到Segment + } + readMatroskaVInt(bytes, position);//跳过Segment长度值 + while(position[0]1){//多声道,提取一个声道 + var arr2=[]; + for(var i=0;i=arr.length)return; + var b0=arr[i],b2=("0000000"+b0.toString(2)).substr(-8); + var m=/^(0*1)(\d*)$/.exec(b2); + if(!m)return; + var len=m[1].length, val=[]; + if(i+len>arr.length)return; + for(var i2=0;i2arr.length)return; + for(var i2=0;i2= chunk_size) { + sendBuf = sampleBuf.slice(0, chunk_size); + totalsend = totalsend + sampleBuf.length; + sampleBuf = sampleBuf.slice(chunk_size, sampleBuf.length); + wsconnecter.wsSend(sendBuf); + } + stop(); +} + +function stop() { + var chunk_size = new Array(5, 10, 5); + var request = { + "chunk_size": chunk_size, + "wav_name": "h5", + "is_speaking": false, + "chunk_interval": 10, + "mode": getAsrMode(), + }; + if (sampleBuf.length > 0) { + wsconnecter.wsSend(sampleBuf); + sampleBuf = new Int16Array(); + } + wsconnecter.wsSend(JSON.stringify(request)); + // 控件状态更新 + isRec = false; + if (isfilemode == false) { + //wait 3s for asr result + setTimeout(function () { + wsconnecter.wsStop(); + }, 3000); + rec.stop(function (blob, duration) { + var audioBlob = Recorder.pcm2wav(data = { sampleRate: 16000, bitRate: 16, blob: blob }, + function (theblob, duration) { + console.log(theblob); + var audio_record = document.getElementById('audio_record'); + audio_record.src = (window.URL || webkitURL).createObjectURL(theblob); + audio_record.controls = true; + }, function (msg) { + console.log(msg); + } + ); + + + + }, function (errMsg) { + console.log("errMsg: " + errMsg); + }); + } + // 停止连接 +} + +function getAsrMode() { + return 'offline'; +} +function getHotwords() { + return null +} + + +function handleWithTimestamp(tmptext, tmptime) { + + if (tmptime == null || tmptime == "undefined" || tmptext.length <= 0) { + return tmptext; + } + tmptext = tmptext.replace(/。|?|,|、|\?|\.|\ /g, ","); // in case there are a lot of "。" + var words = tmptext.split(","); // split to chinese sentence or english words + var jsontime = JSON.parse(tmptime); //JSON.parse(tmptime.replace(/\]\]\[\[/g, "],[")); // in case there are a lot segments by VAD + var char_index = 0; // index for timestamp + var text_withtime = ""; + for (var i = 0; i < words.length; i++) { + if (words[i] == "undefined" || words[i].length <= 0) { + continue; + } + if (/^[a-zA-Z]+$/.test(words[i])) { // if it is english + text_withtime = text_withtime + jsontime[char_index][0] / 1000 + ":" + words[i] + "\n"; + char_index = char_index + 1; //for english, timestamp unit is about a word + } + else { + text_withtime = text_withtime + jsontime[char_index][0] / 1000 + ":" + words[i] + "\n"; + char_index = char_index + words[i].length; //for chinese, timestamp unit is about a char + } + } + return text_withtime; + + +} +// 语音识别结果; 对jsonMsg数据解析,将识别结果附加到编辑框中 +function getJsonMessage(jsonMsg) { + var rectxt = "" + JSON.parse(jsonMsg.data)['text']; + var asrmodel = JSON.parse(jsonMsg.data)['mode']; + var is_final = JSON.parse(jsonMsg.data)['is_final']; + var timestamp = JSON.parse(jsonMsg.data)['timestamp']; + if (asrmodel == "2pass-offline" || asrmodel == "offline") { + offline_text = offline_text + handleWithTimestamp(rectxt, timestamp); //rectxt; //.replace(/ +/g,""); + rec_text = offline_text; + } else { + rec_text = rec_text + rectxt; + } + videoText = rec_text; + if (is_final == true) { + play_file(); + wsconnecter.wsStop(); + btnConnect.disabled = false; + } +} + +// 连接状态响应 +function getConnState(connState) { + if (connState === 0) start_file_send(); +} + +// 识别启动、停止、清空操作 +function start() { + var ret = wsconnecter.wsStart();//启动连接 + return ret == 1 ? 1 : 0; +} + +function recProcess(buffer, powerLevel, bufferDuration, bufferSampleRate, newBufferIdx, asyncEnd) { + if (isRec === true) { + var data_48k = buffer[buffer.length - 1]; + var array_48k = new Array(data_48k); + var data_16k = Recorder.SampleData(array_48k, bufferSampleRate, 16000).data; + sampleBuf = Int16Array.from([...sampleBuf, ...data_16k]); + var chunk_size = 960; // for asr chunk_size [5, 10, 5] + while (sampleBuf.length >= chunk_size) { + sendBuf = sampleBuf.slice(0, chunk_size); + sampleBuf = sampleBuf.slice(chunk_size, sampleBuf.length); + wsconnecter.wsSend(sendBuf); + } + } +} + +function getUseITN() { + return false; +} diff --git a/public/textVideo/wav.js b/public/textVideo/wav.js new file mode 100644 index 0000000..1123a05 --- /dev/null +++ b/public/textVideo/wav.js @@ -0,0 +1,86 @@ +/* +wav编码器+编码引擎 +https://github.com/xiangyuecn/Recorder + +当然最佳推荐使用mp3、wav格式,代码也是优先照顾这两种格式 +浏览器支持情况 +https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats + +编码原理:给pcm数据加上一个44直接的wav头即成wav文件;pcm数据就是Recorder中的buffers原始数据(重新采样),16位时为LE小端模式(Little Endian),实质上是未经过任何编码处理 +*/ +(function(){ +"use strict"; + +Recorder.prototype.enc_wav={ + stable:true + ,testmsg:"支持位数8位、16位(填在比特率里面),采样率取值无限制" +}; +Recorder.prototype.wav=function(res,True,False){ + var This=this,set=This.set + ,size=res.length + ,sampleRate=set.sampleRate + ,bitRate=set.bitRate==8?8:16; + + //编码数据 https://github.com/mattdiamond/Recorderjs https://www.cnblogs.com/blqw/p/3782420.html https://www.cnblogs.com/xiaoqi/p/6993912.html + var dataLength=size*(bitRate/8); + var buffer=new ArrayBuffer(44+dataLength); + var data=new DataView(buffer); + + var offset=0; + var writeString=function(str){ + for (var i=0;i>8)+128; + data.setInt8(offset,val,true); + }; + }else{ + for (var i=0;i