lastpass-vault
Version:
Cross Platform javascript client for handling lastpass vaults.
13 lines • 198 kB
JavaScript
!function(e,a){if("object"==typeof exports&&"object"==typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var i=a();for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}("undefined"!=typeof self?self:this,function(){return function(e){var a={};function i(n){if(a[n])return a[n].exports;var s=a[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=e,i.c=a,i.d=function(e,a,n){i.o(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,a){if(1&a&&(e=i(e)),8&a)return e;if(4&a&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&a&&"string"!=typeof e)for(var s in e)i.d(n,s,function(a){return e[a]}.bind(null,s));return n},i.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(a,"a",a),a},i.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},i.p="",i(i.s=17)}([function(e,a){e.exports=require("stream")},function(e,a){e.exports=require("zlib")},function(e,a){e.exports=require("url")},function(e,a){e.exports=require("http")},function(e,a){e.exports=require("util")},function(e,a,i){var n=i(6).isArray;e.exports={copyOptions:function(e){var a,i={};for(a in e)e.hasOwnProperty(a)&&(i[a]=e[a]);return i},ensureFlagExists:function(e,a){e in a&&"boolean"==typeof a[e]||(a[e]=!1)},ensureSpacesExists:function(e){"spaces"in e&&("number"==typeof e.spaces||"string"==typeof e.spaces)||(e.spaces=0)},ensureAlwaysArrayExists:function(e){"alwaysArray"in e&&("boolean"==typeof e.alwaysArray||n(e.alwaysArray))||(e.alwaysArray=!1)},ensureKeyExists:function(e,a){e+"Key"in a&&"string"==typeof a[e+"Key"]||(a[e+"Key"]=a.compact?"_"+e:e)},checkFnExists:function(e,a){return e+"Fn"in a}}},function(e,a){e.exports={isArray:function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}}},function(e,a){e.exports=require("https")},function(e,a){e.exports=require("path")},function(e,a,i){var n=i(10),s=i(11);e.exports=function(e,a,i,o){var t=i.keyedList?i.keyedList[i.index]:i.index;i.jobs[t]=function(e,a,i,s){var o;o=2==e.length?e(i,n(s)):e(i,a,n(s));return o}(a,t,e[t],function(e,a){t in i.jobs&&(delete i.jobs[t],e?s(i):i.results[t]=a,o(e,i.results))})}},function(e,a,i){var n=i(29);e.exports=function(e){var a=!1;return n(function(){a=!0}),function(i,s){a?e(i,s):n(function(){e(i,s)})}}},function(e,a){e.exports=function(e){Object.keys(e.jobs).forEach(function(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}.bind(e)),e.jobs={}}},function(e,a){e.exports=function(e,a){var i=!Array.isArray(e),n={index:0,keyedList:i||a?Object.keys(e):null,jobs:{},results:i?{}:[],size:i?Object.keys(e).length:e.length};a&&n.keyedList.sort(i?a:function(i,n){return a(e[i],e[n])});return n}},function(e,a,i){var n=i(11),s=i(10);e.exports=function(e){if(!Object.keys(this.jobs).length)return;this.index=this.size,n(this),s(e)(null,this.results)}},function(e,a,i){var n=i(9),s=i(12),o=i(13);function t(e,a){return e<a?-1:e>a?1:0}e.exports=function(e,a,i,t){var c=s(e,i);return n(e,a,c,function i(s,o){s?t(s,o):(c.index++,c.index<(c.keyedList||e).length?n(e,a,c,i):t(null,c.results))}),o.bind(c,t)},e.exports.ascending=t,e.exports.descending=function(e,a){return-1*t(e,a)}},function(e,a,i){var n,s,o=i(34),t=i(5),c=i(6).isArray;function r(e){var a=Number(e);if(!isNaN(a))return a;var i=e.toLowerCase();return"true"===i||"false"!==i&&e}function p(e,a){var i;if(n.compact){if(!s[n[e+"Key"]]&&(c(n.alwaysArray)?-1!==n.alwaysArray.indexOf(n[e+"Key"]):n.alwaysArray)&&(s[n[e+"Key"]]=[]),s[n[e+"Key"]]&&!c(s[n[e+"Key"]])&&(s[n[e+"Key"]]=[s[n[e+"Key"]]]),e+"Fn"in n&&"string"==typeof a&&(a=n[e+"Fn"](a,s)),"instruction"===e&&("instructionFn"in n||"instructionNameFn"in n))for(i in a)if(a.hasOwnProperty(i))if("instructionFn"in n)a[i]=n.instructionFn(a[i],i,s);else{var o=a[i];delete a[i],a[n.instructionNameFn(i,o,s)]=o}c(s[n[e+"Key"]])?s[n[e+"Key"]].push(a):s[n[e+"Key"]]=a}else{s[n.elementsKey]||(s[n.elementsKey]=[]);var t={};if(t[n.typeKey]=e,"instruction"===e){for(i in a)if(a.hasOwnProperty(i))break;t[n.nameKey]="instructionNameFn"in n?n.instructionNameFn(i,a,s):i,n.instructionHasAttributes?(t[n.attributesKey]=a[i][n.attributesKey],"instructionFn"in n&&(t[n.attributesKey]=n.instructionFn(t[n.attributesKey],i,s))):("instructionFn"in n&&(a[i]=n.instructionFn(a[i],i,s)),t[n.instructionKey]=a[i])}else e+"Fn"in n&&(a=n[e+"Fn"](a,s)),t[n[e+"Key"]]=a;n.addParent&&(t[n.parentKey]=s),s[n.elementsKey].push(t)}}function l(e){var a;if("attributesFn"in n&&e&&(e=n.attributesFn(e,s)),(n.trim||"attributeValueFn"in n||"attributeNameFn"in n||n.nativeTypeAttributes)&&e)for(a in e)if(e.hasOwnProperty(a)&&(n.trim&&(e[a]=e[a].trim()),n.nativeTypeAttributes&&(e[a]=r(e[a])),"attributeValueFn"in n&&(e[a]=n.attributeValueFn(e[a],a,s)),"attributeNameFn"in n)){var i=e[a];delete e[a],e[n.attributeNameFn(a,e[a],s)]=i}return e}function u(e){var a={};if(e.body&&("xml"===e.name.toLowerCase()||n.instructionHasAttributes)){for(var i,o=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g;null!==(i=o.exec(e.body));)a[i[1]]=i[2]||i[3]||i[4];a=l(a)}if("xml"===e.name.toLowerCase()){if(n.ignoreDeclaration)return;s[n.declarationKey]={},Object.keys(a).length&&(s[n.declarationKey][n.attributesKey]=a),n.addParent&&(s[n.declarationKey][n.parentKey]=s)}else{if(n.ignoreInstruction)return;n.trim&&(e.body=e.body.trim());var t={};n.instructionHasAttributes&&Object.keys(a).length?(t[e.name]={},t[e.name][n.attributesKey]=a):t[e.name]=e.body,p("instruction",t)}}function m(e,a){var i;if("object"==typeof e&&(a=e.attributes,e=e.name),a=l(a),"elementNameFn"in n&&(e=n.elementNameFn(e,s)),n.compact){var o;if(i={},!n.ignoreAttributes&&a&&Object.keys(a).length)for(o in i[n.attributesKey]={},a)a.hasOwnProperty(o)&&(i[n.attributesKey][o]=a[o]);e in s||(c(n.alwaysArray)?-1===n.alwaysArray.indexOf(e):!n.alwaysArray)||(s[e]=[]),s[e]&&!c(s[e])&&(s[e]=[s[e]]),c(s[e])?s[e].push(i):s[e]=i}else s[n.elementsKey]||(s[n.elementsKey]=[]),(i={})[n.typeKey]="element",i[n.nameKey]=e,!n.ignoreAttributes&&a&&Object.keys(a).length&&(i[n.attributesKey]=a),n.alwaysChildren&&(i[n.elementsKey]=[]),s[n.elementsKey].push(i);i[n.parentKey]=s,s=i}function d(e){n.ignoreText||(e.trim()||n.captureSpacesBetweenElements)&&(n.trim&&(e=e.trim()),n.nativeType&&(e=r(e)),n.sanitize&&(e=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")),p("text",e))}function x(e){n.ignoreComment||(n.trim&&(e=e.trim()),p("comment",e))}function v(e){var a=s[n.parentKey];n.addParent||delete s[n.parentKey],s=a}function f(e){n.ignoreCdata||(n.trim&&(e=e.trim()),p("cdata",e))}function h(e){n.ignoreDoctype||(e=e.replace(/^ /,""),n.trim&&(e=e.trim()),p("doctype",e))}function b(e){e.note=e}e.exports=function(e,a){var i=o.parser(!0,{}),c={};if(s=c,n=function(e){return n=t.copyOptions(e),t.ensureFlagExists("ignoreDeclaration",n),t.ensureFlagExists("ignoreInstruction",n),t.ensureFlagExists("ignoreAttributes",n),t.ensureFlagExists("ignoreText",n),t.ensureFlagExists("ignoreComment",n),t.ensureFlagExists("ignoreCdata",n),t.ensureFlagExists("ignoreDoctype",n),t.ensureFlagExists("compact",n),t.ensureFlagExists("alwaysChildren",n),t.ensureFlagExists("addParent",n),t.ensureFlagExists("trim",n),t.ensureFlagExists("nativeType",n),t.ensureFlagExists("nativeTypeAttributes",n),t.ensureFlagExists("sanitize",n),t.ensureFlagExists("instructionHasAttributes",n),t.ensureFlagExists("captureSpacesBetweenElements",n),t.ensureAlwaysArrayExists(n),t.ensureKeyExists("declaration",n),t.ensureKeyExists("instruction",n),t.ensureKeyExists("attributes",n),t.ensureKeyExists("text",n),t.ensureKeyExists("comment",n),t.ensureKeyExists("cdata",n),t.ensureKeyExists("doctype",n),t.ensureKeyExists("type",n),t.ensureKeyExists("name",n),t.ensureKeyExists("elements",n),t.ensureKeyExists("parent",n),t.checkFnExists("doctype",n),t.checkFnExists("instruction",n),t.checkFnExists("cdata",n),t.checkFnExists("comment",n),t.checkFnExists("text",n),t.checkFnExists("instructionName",n),t.checkFnExists("elementName",n),t.checkFnExists("attributeName",n),t.checkFnExists("attributeValue",n),t.checkFnExists("attributes",n),n}(a),i.opt={strictEntities:!0},i.onopentag=m,i.ontext=d,i.oncomment=x,i.onclosetag=v,i.onerror=b,i.oncdata=f,i.ondoctype=h,i.onprocessinginstruction=u,i.write(e).close(),c[n.elementsKey]){var r=c[n.elementsKey];delete c[n.elementsKey],c[n.elementsKey]=r,delete c.text}return c}},function(e,a,i){var n,s,o=i(5),t=i(6).isArray;function c(e,a,i){return(!i&&e.spaces?"\n":"")+Array(a+1).join(e.spaces)}function r(e,a,i){if(a.ignoreAttributes)return"";"attributesFn"in a&&(e=a.attributesFn(e,s,n));var o,t,r,p,l=[];for(o in e)e.hasOwnProperty(o)&&null!==e[o]&&void 0!==e[o]&&(p=a.noQuotesForNativeAttributes&&"string"!=typeof e[o]?"":'"',t=(t=""+e[o]).replace(/"/g,"""),r="attributeNameFn"in a?a.attributeNameFn(o,t,s,n):o,l.push(a.spaces&&a.indentAttributes?c(a,i+1,!1):" "),l.push(r+"="+p+("attributeValueFn"in a?a.attributeValueFn(t,o,s,n):t)+p));return e&&Object.keys(e).length&&a.spaces&&a.indentAttributes&&l.push(c(a,i,!1)),l.join("")}function p(e,a,i){return n=e,s="xml",a.ignoreDeclaration?"":"<?xml"+r(e[a.attributesKey],a,i)+"?>"}function l(e,a,i){if(a.ignoreInstruction)return"";var o;for(o in e)if(e.hasOwnProperty(o))break;var t="instructionNameFn"in a?a.instructionNameFn(o,e[o],s,n):o;if("object"==typeof e[o])return n=e,s=t,"<?"+t+r(e[o][a.attributesKey],a,i)+"?>";var c=e[o]?e[o]:"";return"instructionFn"in a&&(c=a.instructionFn(c,o,s,n)),"<?"+t+(c?" "+c:"")+"?>"}function u(e,a){return a.ignoreComment?"":"\x3c!--"+("commentFn"in a?a.commentFn(e,s,n):e)+"--\x3e"}function m(e,a){return a.ignoreCdata?"":"<![CDATA["+("cdataFn"in a?a.cdataFn(e,s,n):e.replace("]]>","]]]]><![CDATA[>"))+"]]>"}function d(e,a){return a.ignoreDoctype?"":"<!DOCTYPE "+("doctypeFn"in a?a.doctypeFn(e,s,n):e)+">"}function x(e,a){return a.ignoreText?"":(e=(e=(e=""+e).replace(/&/g,"&")).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),"textFn"in a?a.textFn(e,s,n):e)}function v(e,a,i,o){return e.reduce(function(e,t){var p=c(a,i,o&&!e);switch(t.type){case"element":return e+p+function(e,a,i){n=e,s=e.name;var o=[],t="elementNameFn"in a?a.elementNameFn(e.name,e):e.name;o.push("<"+t),e[a.attributesKey]&&o.push(r(e[a.attributesKey],a,i));var c=e[a.elementsKey]&&e[a.elementsKey].length||e[a.attributesKey]&&"preserve"===e[a.attributesKey]["xml:space"];return c||(c="fullTagEmptyElementFn"in a?a.fullTagEmptyElementFn(e.name,e):a.fullTagEmptyElement),c?(o.push(">"),e[a.elementsKey]&&e[a.elementsKey].length&&(o.push(v(e[a.elementsKey],a,i+1)),n=e,s=e.name),o.push(a.spaces&&function(e,a){var i;if(e.elements&&e.elements.length)for(i=0;i<e.elements.length;++i)switch(e.elements[i][a.typeKey]){case"text":if(a.indentText)return!0;break;case"cdata":if(a.indentCdata)return!0;break;case"instruction":if(a.indentInstruction)return!0;break;case"doctype":case"comment":case"element":default:return!0}return!1}(e,a)?"\n"+Array(i+1).join(a.spaces):""),o.push("</"+t+">")):o.push("/>"),o.join("")}(t,a,i);case"comment":return e+p+u(t[a.commentKey],a);case"doctype":return e+p+d(t[a.doctypeKey],a);case"cdata":return e+(a.indentCdata?p:"")+m(t[a.cdataKey],a);case"text":return e+(a.indentText?p:"")+x(t[a.textKey],a);case"instruction":var f={};return f[t[a.nameKey]]=t[a.attributesKey]?t:t[a.instructionKey],e+(a.indentInstruction?p:"")+l(f,a,i)}},"")}function f(e,a,i){var n;for(n in e)if(e.hasOwnProperty(n))switch(n){case a.parentKey:case a.attributesKey:break;case a.textKey:if(a.indentText||i)return!0;break;case a.cdataKey:if(a.indentCdata||i)return!0;break;case a.instructionKey:if(a.indentInstruction||i)return!0;break;case a.doctypeKey:case a.commentKey:default:return!0}return!1}function h(e,a,i,o,t){n=e,s=a;var p="elementNameFn"in i?i.elementNameFn(a,e):a;if(null==e||""===e)return"fullTagEmptyElementFn"in i&&i.fullTagEmptyElementFn(a,e)||i.fullTagEmptyElement?"<"+p+"></"+p+">":"<"+p+"/>";var l=[];if(a){if(l.push("<"+p),"object"!=typeof e)return l.push(">"+x(e,i)+"</"+p+">"),l.join("");e[i.attributesKey]&&l.push(r(e[i.attributesKey],i,o));var u=f(e,i,!0)||e[i.attributesKey]&&"preserve"===e[i.attributesKey]["xml:space"];if(u||(u="fullTagEmptyElementFn"in i?i.fullTagEmptyElementFn(a,e):i.fullTagEmptyElement),!u)return l.push("/>"),l.join("");l.push(">")}return l.push(b(e,i,o+1,!1)),n=e,s=a,a&&l.push((t?c(i,o,!1):"")+"</"+p+">"),l.join("")}function b(e,a,i,n){var s,o,r,v=[];for(o in e)if(e.hasOwnProperty(o))for(r=t(e[o])?e[o]:[e[o]],s=0;s<r.length;++s){switch(o){case a.declarationKey:v.push(p(r[s],a,i));break;case a.instructionKey:v.push((a.indentInstruction?c(a,i,n):"")+l(r[s],a,i));break;case a.attributesKey:case a.parentKey:break;case a.textKey:v.push((a.indentText?c(a,i,n):"")+x(r[s],a));break;case a.cdataKey:v.push((a.indentCdata?c(a,i,n):"")+m(r[s],a));break;case a.doctypeKey:v.push(c(a,i,n)+d(r[s],a));break;case a.commentKey:v.push(c(a,i,n)+u(r[s],a));break;default:v.push(c(a,i,n)+h(r[s],o,a,i,f(r[s],a)))}n=n&&!v.length}return v.join("")}e.exports=function(e,a){a=function(e){var a=o.copyOptions(e);return o.ensureFlagExists("ignoreDeclaration",a),o.ensureFlagExists("ignoreInstruction",a),o.ensureFlagExists("ignoreAttributes",a),o.ensureFlagExists("ignoreText",a),o.ensureFlagExists("ignoreComment",a),o.ensureFlagExists("ignoreCdata",a),o.ensureFlagExists("ignoreDoctype",a),o.ensureFlagExists("compact",a),o.ensureFlagExists("indentText",a),o.ensureFlagExists("indentCdata",a),o.ensureFlagExists("indentAttributes",a),o.ensureFlagExists("indentInstruction",a),o.ensureFlagExists("fullTagEmptyElement",a),o.ensureFlagExists("noQuotesForNativeAttributes",a),o.ensureSpacesExists(a),"number"==typeof a.spaces&&(a.spaces=Array(a.spaces+1).join(" ")),o.ensureKeyExists("declaration",a),o.ensureKeyExists("instruction",a),o.ensureKeyExists("attributes",a),o.ensureKeyExists("text",a),o.ensureKeyExists("comment",a),o.ensureKeyExists("cdata",a),o.ensureKeyExists("doctype",a),o.ensureKeyExists("type",a),o.ensureKeyExists("name",a),o.ensureKeyExists("elements",a),o.checkFnExists("doctype",a),o.checkFnExists("instruction",a),o.checkFnExists("cdata",a),o.checkFnExists("comment",a),o.checkFnExists("text",a),o.checkFnExists("instructionName",a),o.checkFnExists("elementName",a),o.checkFnExists("attributeName",a),o.checkFnExists("attributeValue",a),o.checkFnExists("attributes",a),o.checkFnExists("fullTagEmptyElement",a),a}(a);var i=[];return n=e,s="_root_",a.compact?i.push(b(e,a,0,!0)):(e[a.declarationKey]&&i.push(p(e[a.declarationKey],a,0)),e[a.elementsKey]&&e[a.elementsKey].length&&i.push(v(e[a.elementsKey],a,0,!i.length))),i.join("")}},function(e,a,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var a,i=1,n=arguments.length;i<n;i++)for(var s in a=arguments[i])Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s]);return e}).apply(this,arguments)},s=this&&this.__awaiter||function(e,a,i,n){return new(i||(i=Promise))(function(s,o){function t(e){try{r(n.next(e))}catch(e){o(e)}}function c(e){try{r(n.throw(e))}catch(e){o(e)}}function r(e){e.done?s(e.value):new i(function(a){a(e.value)}).then(t,c)}r((n=n.apply(e,a||[])).next())})},o=this&&this.__generator||function(e,a){var i,n,s,o,t={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(s=2&o[0]?n.return:o[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,o[1])).done)return s;switch(n=0,s&&(o=[2&o[0],s.value]),o[0]){case 0:case 1:s=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,n=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(!(s=(s=t.trys).length>0&&s[s.length-1])&&(6===o[0]||2===o[0])){t=0;continue}if(3===o[0]&&(!s||o[1]>s[0]&&o[1]<s[3])){t.label=o[1];break}if(6===o[0]&&t.label<s[1]){t.label=s[1],s=o;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(o);break}s[2]&&t.ops.pop(),t.trys.pop();continue}o=a.call(e,t)}catch(e){o=[6,e],n=0}finally{i=s=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}};Object.defineProperty(a,"__esModule",{value:!0});var t=i(18),c=i(19),r=function(){return function(){var e=this;this.login=function(a,i,t){return s(e,void 0,void 0,function(){var e,s,r,p;return o(this,function(o){switch(o.label){case 0:return[4,this.getIterations(a)];case 1:return e=o.sent(),this.key=this.getKey(a,i,e.toString()),s=this.getHash(this.key,i),r=n({username:a,hash:s,iterations:e},t&&{otp:t}),[4,this.request(c.LOGIN,"POST",r,{},"js")];case 2:if(!((p=o.sent())&&p.ok&&p.ok._attributes&&p.ok._attributes.sessionid))throw new Error("Bad session response.");return this.session=p.ok._attributes,[2]}})})},this.getAccounts=function(){return s(e,void 0,void 0,function(){return o(this,function(e){switch(e.label){case 0:return[4,this.decryptAccounts()];case 1:return[2,e.sent()]}})})},this.addAccount=function(a,i,n,t,r){return s(e,void 0,void 0,function(){var e;return o(this,function(s){switch(s.label){case 0:return a=this.encrypt(a),i=this.encrypt(i),t=this.encrypt(t),r&&(r=this.encrypt(r)),n=Buffer.from(n).toString("hex"),e={extjs:"1",aid:"0",folder:"none",grouping:"",username:a,password:i,url:n,name:t,otp:r},[4,this.request(c.CREATE,"POST",e,{},"js")];case 1:if("accountadded"!==s.sent().xmlresponse.result._attributes.msg)throw new Error("An unknown error occured while adding the record.");return[2]}})})},this.getHash=function(e,a){return t.pbkdf2Sync(e,Buffer.from(a),1,32,"sha256").toString("hex")},this.getIterations=function(a){return s(e,void 0,void 0,function(){var e;return o(this,function(i){switch(i.label){case 0:return[4,this.request(c.ITERATIONS,"POST",{email:a})];case 1:return e=i.sent(),[2,parseInt(e,10)]}})})},this.fetchAccounts=function(){return s(e,void 0,void 0,function(){var e;return o(this,function(a){switch(a.label){case 0:return[4,this.request(c.VAULT,"POST",!1,{},"js")];case 1:return e=a.sent().response.accounts.account,[2,Array.isArray(e)?e:[e]]}})})},this.decryptAccounts=function(){return s(e,void 0,void 0,function(){var e,a,i,n,s,t,c,r,p,l;return o(this,function(o){switch(o.label){case 0:return[4,this.fetchAccounts()];case 1:for(e=o.sent(),a=[],i=0;i<e.length;i++)n=e[i],s=n._attributes,t=s.name,c=s.url,r=s.username,p=n.login._attributes.p,l=this.decryptAccount({name:t,url:c,username:r,p:p}),a.push(l);return[2,a]}})})},this.decryptAccount=function(a){var i=a.name,n=a.p,s=a.url,o=a.username;return{name:i=e.getField(i),url:s=e.getField(s),username:o=e.getField(o),password:n=e.getField(n)}},this.getField=function(a){if(0===a.length)return"";var i="";if("!"===a.slice(0,1)){var n=a.split("|"),s=n[0],o=n[1];s&&o&&(i=e.decrypt(Buffer.from(o,"base64"),Buffer.from(s.slice(1),"base64")))}else a&&(i=Buffer.from(a,"hex").toString());return i},this.decrypt=function(a,i){var n=t.createDecipheriv("aes-256-cbc",e.key,i),s=n.update(a).toString("utf8");return s+=n.final().toString("utf8")},this.encrypt=function(a){var i=t.randomBytes(16),n=t.createCipheriv("aes-256-cbc",e.key,i),s=n.update(Buffer.from(a)).toString("base64");return s+=n.final().toString("base64"),"!"+i.toString("base64")+"|"+s},this.getKey=function(e,a,i){return t.pbkdf2Sync(Buffer.from(a),Buffer.from(e),parseInt(i),32,"sha256")},this.request=function(a,i,n,s,o){return void 0===s&&(s={}),void 0===o&&(o="text"),c.request(a,i,n,s,o,e.session)}}}();a.default=r},function(e,a){e.exports=require("crypto")},function(e,a,i){"use strict";(function(e,n){var s=this&&this.__assign||function(){return(s=Object.assign||function(e){for(var a,i=1,n=arguments.length;i<n;i++)for(var s in a=arguments[i])Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s]);return e}).apply(this,arguments)},o=this&&this.__awaiter||function(e,a,i,n){return new(i||(i=Promise))(function(s,o){function t(e){try{r(n.next(e))}catch(e){o(e)}}function c(e){try{r(n.throw(e))}catch(e){o(e)}}function r(e){e.done?s(e.value):new i(function(a){a(e.value)}).then(t,c)}r((n=n.apply(e,a||[])).next())})},t=this&&this.__generator||function(e,a){var i,n,s,o,t={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(s=2&o[0]?n.return:o[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,o[1])).done)return s;switch(n=0,s&&(o=[2&o[0],s.value]),o[0]){case 0:case 1:s=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,n=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(!(s=(s=t.trys).length>0&&s[s.length-1])&&(6===o[0]||2===o[0])){t=0;continue}if(3===o[0]&&(!s||o[1]>s[0]&&o[1]<s[3])){t.label=o[1];break}if(6===o[0]&&t.label<s[1]){t.label=s[1],s=o;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(o);break}s[2]&&t.ops.pop(),t.trys.pop();continue}o=a.call(e,t)}catch(e){o=[6,e],n=0}finally{i=s=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}},c=this;Object.defineProperty(a,"__esModule",{value:!0});var r=i(33);a.request=function(a,i,p,l,u,m){return o(c,void 0,void 0,function(){var o,c,d;return t(this,function(t){switch(t.label){case 0:return p&&((o=new e).append("method","cli"),o.append("xml","1"),o.append("imei","cli"),m&&o.append("token",m.token),Object.keys(p).map(function(e){o.append(e,p[e])})),l=s({},m&&{Cookie:"PHPSESSID="+encodeURIComponent(m.sessionid)+";"},l),[4,n(a,s({method:i},p&&{body:o},{headers:l}))];case 1:if(!(c=t.sent()).ok)throw new Error("Error requesting data.");return[4,c.text()];case 2:return d=t.sent(),"js"===u?[2,r.xml2js(d,{compact:!0})]:[2,d]}})})},a.ITERATIONS="https://lastpass.com/iterations.php",a.LOGIN="https://lastpass.com/login.php",a.VAULT="https://lastpass.com/getaccts.php",a.CREATE="https://lastpass.com/show_website.php"}).call(this,i(20),i(32).default)},function(e,a,i){var n=i(21),s=i(4),o=i(8),t=i(3),c=i(7),r=i(2).parse,p=i(23),l=i(24),u=i(27),m=i(31);function d(e){if(!(this instanceof d))return new d;for(var a in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],n.call(this),e=e||{})this[a]=e[a]}e.exports=d,s.inherits(d,n),d.LINE_BREAK="\r\n",d.DEFAULT_CONTENT_TYPE="application/octet-stream",d.prototype.append=function(e,a,i){"string"==typeof(i=i||{})&&(i={filename:i});var o=n.prototype.append.bind(this);if("number"==typeof a&&(a=""+a),s.isArray(a))this._error(new Error("Arrays are not supported."));else{var t=this._multiPartHeader(e,a,i),c=this._multiPartFooter();o(t),o(a),o(c),this._trackLength(t,a,i)}},d.prototype._trackLength=function(e,a,i){var n=0;null!=i.knownLength?n+=+i.knownLength:Buffer.isBuffer(a)?n=a.length:"string"==typeof a&&(n=Buffer.byteLength(a)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+d.LINE_BREAK.length,a&&(a.path||a.readable&&a.hasOwnProperty("httpVersion"))&&(i.knownLength||this._valuesToMeasure.push(a))},d.prototype._lengthRetriever=function(e,a){e.hasOwnProperty("fd")?null!=e.end&&e.end!=1/0&&null!=e.start?a(null,e.end+1-(e.start?e.start:0)):p.stat(e.path,function(i,n){var s;i?a(i):(s=n.size-(e.start?e.start:0),a(null,s))}):e.hasOwnProperty("httpVersion")?a(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",function(i){e.pause(),a(null,+i.headers["content-length"])}),e.resume()):a("Unknown stream")},d.prototype._multiPartHeader=function(e,a,i){if("string"==typeof i.header)return i.header;var n,s=this._getContentDisposition(a,i),o=this._getContentType(a,i),t="",c={"Content-Disposition":["form-data",'name="'+e+'"'].concat(s||[]),"Content-Type":[].concat(o||[])};for(var r in"object"==typeof i.header&&m(c,i.header),c)c.hasOwnProperty(r)&&null!=(n=c[r])&&(Array.isArray(n)||(n=[n]),n.length&&(t+=r+": "+n.join("; ")+d.LINE_BREAK));return"--"+this.getBoundary()+d.LINE_BREAK+t+d.LINE_BREAK},d.prototype._getContentDisposition=function(e,a){var i,n;return"string"==typeof a.filepath?i=o.normalize(a.filepath).replace(/\\/g,"/"):a.filename||e.name||e.path?i=o.basename(a.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(i=o.basename(e.client._httpMessage.path)),i&&(n='filename="'+i+'"'),n},d.prototype._getContentType=function(e,a){var i=a.contentType;return!i&&e.name&&(i=l.lookup(e.name)),!i&&e.path&&(i=l.lookup(e.path)),!i&&e.readable&&e.hasOwnProperty("httpVersion")&&(i=e.headers["content-type"]),i||!a.filepath&&!a.filename||(i=l.lookup(a.filepath||a.filename)),i||"object"!=typeof e||(i=d.DEFAULT_CONTENT_TYPE),i},d.prototype._multiPartFooter=function(){return function(e){var a=d.LINE_BREAK;0===this._streams.length&&(a+=this._lastBoundary()),e(a)}.bind(this)},d.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+d.LINE_BREAK},d.prototype.getHeaders=function(e){var a,i={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(a in e)e.hasOwnProperty(a)&&(i[a.toLowerCase()]=e[a]);return i},d.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},d.prototype._generateBoundary=function(){for(var e="--------------------------",a=0;a<24;a++)e+=Math.floor(10*Math.random()).toString(16);this._boundary=e},d.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e},d.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},d.prototype.getLength=function(e){var a=this._overheadLength+this._valueLength;this._streams.length&&(a+=this._lastBoundary().length),this._valuesToMeasure.length?u.parallel(this._valuesToMeasure,this._lengthRetriever,function(i,n){i?e(i):(n.forEach(function(e){a+=e}),e(null,a))}):process.nextTick(e.bind(this,null,a))},d.prototype.submit=function(e,a){var i,n,s={method:"post"};return"string"==typeof e?(e=r(e),n=m({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},s)):(n=m(e,s)).port||(n.port="https:"==n.protocol?443:80),n.headers=this.getHeaders(e.headers),i="https:"==n.protocol?c.request(n):t.request(n),this.getLength(function(e,n){e?this._error(e):(i.setHeader("Content-Length",n),this.pipe(i),a&&(i.on("error",a),i.on("response",a.bind(this,null))))}.bind(this)),i},d.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))},d.prototype.toString=function(){return"[object FormData]"}},function(e,a,i){var n=i(4),s=i(0).Stream,o=i(22);function t(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}e.exports=t,n.inherits(t,s),t.create=function(e){var a=new this;for(var i in e=e||{})a[i]=e[i];return a},t.isStreamLike=function(e){return"function"!=typeof e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e&&!Buffer.isBuffer(e)},t.prototype.append=function(e){if(t.isStreamLike(e)){if(!(e instanceof o)){var a=o.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=a}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},t.prototype.pipe=function(e,a){return s.prototype.pipe.call(this,e,a),this.resume(),e},t.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop)this._pendingNext=!0;else{this._insideLoop=!0;try{do{this._pendingNext=!1,this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=!1}}},t.prototype._realGetNext=function(){var e=this._streams.shift();void 0!==e?"function"==typeof e?e(function(e){t.isStreamLike(e)&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this)):this._pipeNext(e):this.end()},t.prototype._pipeNext=function(e){if(this._currentStream=e,t.isStreamLike(e))return e.on("end",this._getNext.bind(this)),void e.pipe(this,{end:!1});var a=e;this.write(a),this._getNext()},t.prototype._handleErrors=function(e){var a=this;e.on("error",function(e){a._emitError(e)})},t.prototype.write=function(e){this.emit("data",e)},t.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.pause&&this._currentStream.pause(),this.emit("pause"))},t.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.resume&&this._currentStream.resume(),this.emit("resume")},t.prototype.end=function(){this._reset(),this.emit("end")},t.prototype.destroy=function(){this._reset(),this.emit("close")},t.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},t.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}},t.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(a){a.dataSize&&(e.dataSize+=a.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)},t.prototype._emitError=function(e){this._reset(),this.emit("error",e)}},function(e,a,i){var n=i(0).Stream,s=i(4);function o(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}e.exports=o,s.inherits(o,n),o.create=function(e,a){var i=new this;for(var n in a=a||{})i[n]=a[n];i.source=e;var s=e.emit;return e.emit=function(){return i._handleEmit(arguments),s.apply(e,arguments)},e.on("error",function(){}),i.pauseStream&&e.pause(),i},Object.defineProperty(o.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}}),o.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)},o.prototype.resume=function(){this._released||this.release(),this.source.resume()},o.prototype.pause=function(){this.source.pause()},o.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]},o.prototype.pipe=function(){var e=n.prototype.pipe.apply(this,arguments);return this.resume(),e},o.prototype._handleEmit=function(e){this._released?this.emit.apply(this,e):("data"===e[0]&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e))},o.prototype._checkIfMaxDataSizeExceeded=function(){if(!(this._maxDataSizeExceeded||this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}},function(e,a){e.exports=require("fs")},function(e,a,i){"use strict";
/*!
* mime-types
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/var n,s,o,t=i(25),c=i(8).extname,r=/^\s*([^;\s]*)(?:;|\s|$)/,p=/^text\//i;function l(e){if(!e||"string"!=typeof e)return!1;var a=r.exec(e),i=a&&t[a[1].toLowerCase()];return i&&i.charset?i.charset:!(!a||!p.test(a[1]))&&"UTF-8"}a.charset=l,a.charsets={lookup:l},a.contentType=function(e){if(!e||"string"!=typeof e)return!1;var i=-1===e.indexOf("/")?a.lookup(e):e;if(!i)return!1;if(-1===i.indexOf("charset")){var n=a.charset(i);n&&(i+="; charset="+n.toLowerCase())}return i},a.extension=function(e){if(!e||"string"!=typeof e)return!1;var i=r.exec(e),n=i&&a.extensions[i[1].toLowerCase()];if(!n||!n.length)return!1;return n[0]},a.extensions=Object.create(null),a.lookup=function(e){if(!e||"string"!=typeof e)return!1;var i=c("x."+e).toLowerCase().substr(1);if(!i)return!1;return a.types[i]||!1},a.types=Object.create(null),n=a.extensions,s=a.types,o=["nginx","apache",void 0,"iana"],Object.keys(t).forEach(function(e){var a=t[e],i=a.extensions;if(i&&i.length){n[e]=i;for(var c=0;c<i.length;c++){var r=i[c];if(s[r]){var p=o.indexOf(t[s[r]].source),l=o.indexOf(a.source);if("application/octet-stream"!==s[r]&&(p>l||p===l&&"application/"===s[r].substr(0,12)))continue}s[r]=e}}})},function(e,a,i){
/*!
* mime-db
* Copyright(c) 2014 Jonathan Ong
* MIT Licensed
*/
e.exports=i(26)},function(e){e.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0},"application/atsc-held+xml":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/cbor":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["ecma","es"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0},"application/fhir+json":{source:"iana",compressible:!0},"application/fhir+xml":{source:"iana",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0},"application/mmt-usd+xml":{source:"iana",compressible:!0},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",compressible:!0},"application/msc-mixer+xml":{source:"iana",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana"},"application/news-groupinfo":{source:"iana"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana"},"application/nss":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p2p-overlay+xml":{source:"iana",compressible:!0},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana"},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",compressible:!0},"application/pidf-diff+xml":{source:"iana",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"a