@tallcomponents/unopdf-core
Advanced tools
Comparing version 1.2.12-e059e480 to 1.2.12-fe3b6350
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),ApiClient=require("./ApiClient-eb21273a.js"),FileService=require("./FileService-af047eef.js"),insertFonts=require("./insertFonts-9ab9bdee.js"),LIB_VERSION="1.2.12-e059e480";var re$4={exports:{}};const SEMVER_SPEC_VERSION="2.0.0",MAX_LENGTH$1=256,MAX_SAFE_INTEGER$1=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,MAX_SAFE_BUILD_LENGTH=250,RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var constants$1={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$1,RELEASE_TYPES:RELEASE_TYPES,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const debug$3="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var debug_1=debug$3;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:s}=constants$1,n=debug_1,a=(t=e.exports={}).re=[],o=t.safeRe=[],l=t.src=[],h=t.t={};let p=0;const c="[a-zA-Z0-9-]",u=[["\\s",1],["\\d",s],[c,i]],m=(e,t,r)=>{const i=(e=>{for(const[t,r]of u)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),s=p++;n(e,s,t),h[e]=s,l[s]=t,a[s]=new RegExp(t,r?"g":void 0),o[s]=new RegExp(i,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${c}*`),m("MAINVERSION",`(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${l[h.NUMERICIDENTIFIER]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${l[h.NUMERICIDENTIFIERLOOSE]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASE",`(?:-(${l[h.PRERELEASEIDENTIFIER]}(?:\\.${l[h.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${l[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[h.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${c}+`),m("BUILD",`(?:\\+(${l[h.BUILDIDENTIFIER]}(?:\\.${l[h.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${l[h.MAINVERSION]}${l[h.PRERELEASE]}?${l[h.BUILD]}?`),m("FULL",`^${l[h.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${l[h.MAINVERSIONLOOSE]}${l[h.PRERELEASELOOSE]}?${l[h.BUILD]}?`),m("LOOSE",`^${l[h.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${l[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${l[h.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:${l[h.PRERELEASE]})?${l[h.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:${l[h.PRERELEASELOOSE]})?${l[h.BUILD]}?)?)?`),m("XRANGE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),m("COERCE",`${l[h.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",l[h.COERCEPLAIN]+`(?:${l[h.PRERELEASE]})?`+`(?:${l[h.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",l[h.COERCE],!0),m("COERCERTLFULL",l[h.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${l[h.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${l[h.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${l[h.LONECARET]}${l[h.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${l[h.LONECARET]}${l[h.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${l[h.GTLT]}\\s*(${l[h.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]}|${l[h.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${l[h.XRANGEPLAIN]})\\s+-\\s+(${l[h.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${l[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[h.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(re$4,re$4.exports);const looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({}),parseOptions$3=e=>e?"object"!=typeof e?looseOption:e:emptyOpts;var parseOptions_1=parseOptions$3;const numeric=/^[0-9]+$/,compareIdentifiers$1=(e,t)=>{const r=numeric.test(e),i=numeric.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1},rcompareIdentifiers=(e,t)=>compareIdentifiers$1(t,e);var identifiers$1={compareIdentifiers:compareIdentifiers$1,rcompareIdentifiers:rcompareIdentifiers};const debug$2=debug_1,{MAX_LENGTH:MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER}=constants$1,{safeRe:re$3,t:t$3}=re$4.exports,parseOptions$2=parseOptions_1,{compareIdentifiers:compareIdentifiers}=identifiers$1;class SemVer$f{constructor(e,t){if(t=parseOptions$2(t),e instanceof SemVer$f){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug$2("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?re$3[t$3.LOOSE]:re$3[t$3.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>MAX_SAFE_INTEGER||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<MAX_SAFE_INTEGER)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(debug$2("SemVer.compare",this.version,this.options,e),!(e instanceof SemVer$f)){if("string"==typeof e&&e===this.version)return 0;e=new SemVer$f(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),compareIdentifiers(this.major,e.major)||compareIdentifiers(this.minor,e.minor)||compareIdentifiers(this.patch,e.patch)}comparePre(e){if(e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],i=e.prerelease[t];if(debug$2("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return compareIdentifiers(r,i)}while(++t)}compareBuild(e){e instanceof SemVer$f||(e=new SemVer$f(e,this.options));let t=0;do{const r=this.build[t],i=e.build[t];if(debug$2("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return compareIdentifiers(r,i)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let i=this.prerelease.length;for(;--i>=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let i=[t,e];!1===r&&(i=[t]),0===compareIdentifiers(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}var semver$1=SemVer$f;const SemVer$e=semver$1,parse$6=(e,t,r=!1)=>{if(e instanceof SemVer$e)return e;try{return new SemVer$e(e,t)}catch(e){if(!r)return null;throw e}};var parse_1=parse$6;const parse$5=parse_1,valid$2=(e,t)=>{const r=parse$5(e,t);return r?r.version:null};var valid_1=valid$2;const parse$4=parse_1,clean$1=(e,t)=>{const r=parse$4(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var clean_1=clean$1;const SemVer$d=semver$1,inc$1=(e,t,r,i,s)=>{"string"==typeof r&&(s=i,i=r,r=void 0);try{return new SemVer$d(e instanceof SemVer$d?e.version:e,r).inc(t,i,s).version}catch(e){return null}};var inc_1=inc$1;const parse$3=parse_1,diff$1=(e,t)=>{const r=parse$3(e,null,!0),i=parse$3(t,null,!0),s=r.compare(i);if(0===s)return null;const n=s>0,a=n?r:i,o=n?i:r,l=!!a.prerelease.length;if(!!o.prerelease.length&&!l)return o.patch||o.minor?a.patch?"patch":a.minor?"minor":"major":"major";const h=l?"pre":"";return r.major!==i.major?h+"major":r.minor!==i.minor?h+"minor":r.patch!==i.patch?h+"patch":"prerelease"};var diff_1=diff$1;const SemVer$c=semver$1,major$1=(e,t)=>new SemVer$c(e,t).major;var major_1=major$1;const SemVer$b=semver$1,minor$1=(e,t)=>new SemVer$b(e,t).minor;var minor_1=minor$1;const SemVer$a=semver$1,patch$1=(e,t)=>new SemVer$a(e,t).patch;var patch_1=patch$1;const parse$2=parse_1,prerelease$1=(e,t)=>{const r=parse$2(e,t);return r&&r.prerelease.length?r.prerelease:null};var prerelease_1=prerelease$1;const SemVer$9=semver$1,compare$b=(e,t,r)=>new SemVer$9(e,r).compare(new SemVer$9(t,r));var compare_1=compare$b;const compare$a=compare_1,rcompare$1=(e,t,r)=>compare$a(t,e,r);var rcompare_1=rcompare$1;const compare$9=compare_1,compareLoose$1=(e,t)=>compare$9(e,t,!0);var compareLoose_1=compareLoose$1;const SemVer$8=semver$1,compareBuild$3=(e,t,r)=>{const i=new SemVer$8(e,r),s=new SemVer$8(t,r);return i.compare(s)||i.compareBuild(s)};var compareBuild_1=compareBuild$3;const compareBuild$2=compareBuild_1,sort$1=(e,t)=>e.sort(((e,r)=>compareBuild$2(e,r,t)));var sort_1=sort$1;const compareBuild$1=compareBuild_1,rsort$1=(e,t)=>e.sort(((e,r)=>compareBuild$1(r,e,t)));var rsort_1=rsort$1;const compare$8=compare_1,gt$4=(e,t,r)=>compare$8(e,t,r)>0;var gt_1=gt$4;const compare$7=compare_1,lt$3=(e,t,r)=>compare$7(e,t,r)<0;var lt_1=lt$3;const compare$6=compare_1,eq$2=(e,t,r)=>0===compare$6(e,t,r);var eq_1=eq$2;const compare$5=compare_1,neq$2=(e,t,r)=>0!==compare$5(e,t,r);var neq_1=neq$2;const compare$4=compare_1,gte$3=(e,t,r)=>compare$4(e,t,r)>=0;var gte_1=gte$3;const compare$3=compare_1,lte$3=(e,t,r)=>compare$3(e,t,r)<=0;var lte_1=lte$3;const eq$1=eq_1,neq$1=neq_1,gt$3=gt_1,gte$2=gte_1,lt$2=lt_1,lte$2=lte_1,cmp$2=(e,t,r,i)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return eq$1(e,r,i);case"!=":return neq$1(e,r,i);case">":return gt$3(e,r,i);case">=":return gte$2(e,r,i);case"<":return lt$2(e,r,i);case"<=":return lte$2(e,r,i);default:throw new TypeError(`Invalid operator: ${t}`)}};var cmp_1=cmp$2;const SemVer$7=semver$1,parse$1=parse_1,{safeRe:re$2,t:t$2}=re$4.exports,coerce$1=(e,t)=>{if(e instanceof SemVer$7)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const i=t.includePrerelease?re$2[t$2.COERCERTLFULL]:re$2[t$2.COERCERTL];let s;for(;(s=i.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&s.index+s[0].length===r.index+r[0].length||(r=s),i.lastIndex=s.index+s[1].length+s[2].length;i.lastIndex=-1}else r=e.match(t.includePrerelease?re$2[t$2.COERCEFULL]:re$2[t$2.COERCE]);if(null===r)return null;const i=r[2],s=r[3]||"0",n=r[4]||"0",a=t.includePrerelease&&r[5]?`-${r[5]}`:"",o=t.includePrerelease&&r[6]?`+${r[6]}`:"";return parse$1(`${i}.${s}.${n}${a}${o}`,t)};var coerce_1=coerce$1,yallist=Yallist$1;function Yallist$1(e){var t=this;if(t instanceof Yallist$1||(t=new Yallist$1),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function insert(e,t,r){var i=t===e.head?new Node(r,null,t,e):new Node(r,t,t.next,e);return null===i.next&&(e.tail=i),null===i.prev&&(e.head=i),e.length++,i}function push(e,t){e.tail=new Node(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Node(e,t,r,i){if(!(this instanceof Node))return new Node(e,t,r,i);this.list=i,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}Yallist$1.Node=Node,Yallist$1.create=Yallist$1,Yallist$1.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},Yallist$1.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},Yallist$1.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},Yallist$1.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)push(this,arguments[e]);return this.length},Yallist$1.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)unshift(this,arguments[e]);return this.length},Yallist$1.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},Yallist$1.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},Yallist$1.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,i=0;null!==r;i++)e.call(t,r.value,i,this),r=r.next},Yallist$1.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,i=this.length-1;null!==r;i--)e.call(t,r.value,i,this),r=r.prev},Yallist$1.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},Yallist$1.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},Yallist$1.prototype.map=function(e,t){t=t||this;for(var r=new Yallist$1,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},Yallist$1.prototype.mapReverse=function(e,t){t=t||this;for(var r=new Yallist$1,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},Yallist$1.prototype.reduce=function(e,t){var r,i=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");i=this.head.next,r=this.head.value}for(var s=0;null!==i;s++)r=e(r,i.value,s),i=i.next;return r},Yallist$1.prototype.reduceReverse=function(e,t){var r,i=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");i=this.tail.prev,r=this.tail.value}for(var s=this.length-1;null!==i;s--)r=e(r,i.value,s),i=i.prev;return r},Yallist$1.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},Yallist$1.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},Yallist$1.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,s=this.head;null!==s&&i<e;i++)s=s.next;for(;null!==s&&i<t;i++,s=s.next)r.push(s.value);return r},Yallist$1.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,s=this.tail;null!==s&&i>t;i--)s=s.prev;for(;null!==s&&i>e;i--,s=s.prev)r.push(s.value);return r},Yallist$1.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var i=0,s=this.head;null!==s&&i<e;i++)s=s.next;var n=[];for(i=0;s&&i<t;i++)n.push(s.value),s=this.removeNode(s);null===s&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(i=0;i<r.length;i++)s=insert(this,s,r[i]);return n},Yallist$1.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var i=r.prev;r.prev=r.next,r.next=i}return this.head=t,this.tail=e,this};try{require("./iterator.js")(Yallist$1)}catch(e){}const Yallist=yallist,MAX=Symbol("max"),LENGTH=Symbol("length"),LENGTH_CALCULATOR=Symbol("lengthCalculator"),ALLOW_STALE=Symbol("allowStale"),MAX_AGE=Symbol("maxAge"),DISPOSE=Symbol("dispose"),NO_DISPOSE_ON_SET=Symbol("noDisposeOnSet"),LRU_LIST=Symbol("lruList"),CACHE=Symbol("cache"),UPDATE_AGE_ON_GET=Symbol("updateAgeOnGet"),naiveLength=()=>1;class LRUCache{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[MAX]=e.max||1/0;const t=e.length||naiveLength;if(this[LENGTH_CALCULATOR]="function"!=typeof t?naiveLength:t,this[ALLOW_STALE]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[MAX_AGE]=e.maxAge||0,this[DISPOSE]=e.dispose,this[NO_DISPOSE_ON_SET]=e.noDisposeOnSet||!1,this[UPDATE_AGE_ON_GET]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[MAX]=e||1/0,trim(this)}get max(){return this[MAX]}set allowStale(e){this[ALLOW_STALE]=!!e}get allowStale(){return this[ALLOW_STALE]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[MAX_AGE]=e,trim(this)}get maxAge(){return this[MAX_AGE]}set lengthCalculator(e){"function"!=typeof e&&(e=naiveLength),e!==this[LENGTH_CALCULATOR]&&(this[LENGTH_CALCULATOR]=e,this[LENGTH]=0,this[LRU_LIST].forEach((e=>{e.length=this[LENGTH_CALCULATOR](e.value,e.key),this[LENGTH]+=e.length}))),trim(this)}get lengthCalculator(){return this[LENGTH_CALCULATOR]}get length(){return this[LENGTH]}get itemCount(){return this[LRU_LIST].length}rforEach(e,t){t=t||this;for(let r=this[LRU_LIST].tail;null!==r;){const i=r.prev;forEachStep(this,e,r,t),r=i}}forEach(e,t){t=t||this;for(let r=this[LRU_LIST].head;null!==r;){const i=r.next;forEachStep(this,e,r,t),r=i}}keys(){return this[LRU_LIST].toArray().map((e=>e.key))}values(){return this[LRU_LIST].toArray().map((e=>e.value))}reset(){this[DISPOSE]&&this[LRU_LIST]&&this[LRU_LIST].length&&this[LRU_LIST].forEach((e=>this[DISPOSE](e.key,e.value))),this[CACHE]=new Map,this[LRU_LIST]=new Yallist,this[LENGTH]=0}dump(){return this[LRU_LIST].map((e=>!isStale(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[LRU_LIST]}set(e,t,r){if((r=r||this[MAX_AGE])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const i=r?Date.now():0,s=this[LENGTH_CALCULATOR](t,e);if(this[CACHE].has(e)){if(s>this[MAX])return del(this,this[CACHE].get(e)),!1;const n=this[CACHE].get(e).value;return this[DISPOSE]&&(this[NO_DISPOSE_ON_SET]||this[DISPOSE](e,n.value)),n.now=i,n.maxAge=r,n.value=t,this[LENGTH]+=s-n.length,n.length=s,this.get(e),trim(this),!0}const n=new Entry(e,t,s,i,r);return n.length>this[MAX]?(this[DISPOSE]&&this[DISPOSE](e,t),!1):(this[LENGTH]+=n.length,this[LRU_LIST].unshift(n),this[CACHE].set(e,this[LRU_LIST].head),trim(this),!0)}has(e){if(!this[CACHE].has(e))return!1;const t=this[CACHE].get(e).value;return!isStale(this,t)}get(e){return get(this,e,!0)}peek(e){return get(this,e,!1)}pop(){const e=this[LRU_LIST].tail;return e?(del(this,e),e.value):null}del(e){del(this,this[CACHE].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const i=e[r],s=i.e||0;if(0===s)this.set(i.k,i.v);else{const e=s-t;e>0&&this.set(i.k,i.v,e)}}}prune(){this[CACHE].forEach(((e,t)=>get(this,t,!1)))}}const get=(e,t,r)=>{const i=e[CACHE].get(t);if(i){const t=i.value;if(isStale(e,t)){if(del(e,i),!e[ALLOW_STALE])return}else r&&(e[UPDATE_AGE_ON_GET]&&(i.value.now=Date.now()),e[LRU_LIST].unshiftNode(i));return t.value}},isStale=(e,t)=>{if(!t||!t.maxAge&&!e[MAX_AGE])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[MAX_AGE]&&r>e[MAX_AGE]},trim=e=>{if(e[LENGTH]>e[MAX])for(let t=e[LRU_LIST].tail;e[LENGTH]>e[MAX]&&null!==t;){const r=t.prev;del(e,t),t=r}},del=(e,t)=>{if(t){const r=t.value;e[DISPOSE]&&e[DISPOSE](r.key,r.value),e[LENGTH]-=r.length,e[CACHE].delete(r.key),e[LRU_LIST].removeNode(t)}};class Entry{constructor(e,t,r,i,s){this.key=e,this.value=t,this.length=r,this.now=i,this.maxAge=s||0}}const forEachStep=(e,t,r,i)=>{let s=r.value;isStale(e,s)&&(del(e,r),e[ALLOW_STALE]||(s=void 0)),s&&t.call(i,s.value,s.key,e)};var lruCache=LRUCache;class Range$b{constructor(e,t){if(t=parseOptions$1(t),e instanceof Range$b)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Range$b(e.raw,t);if(e instanceof Comparator$4)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!isNullSet(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&isAny(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&FLAG_INCLUDE_PRERELEASE)|(this.options.loose&&FLAG_LOOSE))+":"+e,r=cache.get(t);if(r)return r;const i=this.options.loose,s=i?re$1[t$1.HYPHENRANGELOOSE]:re$1[t$1.HYPHENRANGE];e=e.replace(s,hyphenReplace(this.options.includePrerelease)),debug$1("hyphen replace",e),e=e.replace(re$1[t$1.COMPARATORTRIM],comparatorTrimReplace),debug$1("comparator trim",e),e=e.replace(re$1[t$1.TILDETRIM],tildeTrimReplace),debug$1("tilde trim",e),e=e.replace(re$1[t$1.CARETTRIM],caretTrimReplace),debug$1("caret trim",e);let n=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));i&&(n=n.filter((e=>(debug$1("loose invalid filter",e,this.options),!!e.match(re$1[t$1.COMPARATORLOOSE]))))),debug$1("range list",n);const a=new Map,o=n.map((e=>new Comparator$4(e,this.options)));for(const e of o){if(isNullSet(e))return[e];a.set(e.value,e)}a.size>1&&a.has("")&&a.delete("");const l=[...a.values()];return cache.set(t,l),l}intersects(e,t){if(!(e instanceof Range$b))throw new TypeError("a Range is required");return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new SemVer$6(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(testSet(this.set[t],e,this.options))return!0;return!1}}var range=Range$b;const LRU=lruCache,cache=new LRU({max:1e3}),parseOptions$1=parseOptions_1,Comparator$4=comparator,debug$1=debug_1,SemVer$6=semver$1,{safeRe:re$1,t:t$1,comparatorTrimReplace:comparatorTrimReplace,tildeTrimReplace:tildeTrimReplace,caretTrimReplace:caretTrimReplace}=re$4.exports,{FLAG_INCLUDE_PRERELEASE:FLAG_INCLUDE_PRERELEASE,FLAG_LOOSE:FLAG_LOOSE}=constants$1,isNullSet=e=>"<0.0.0-0"===e.value,isAny=e=>""===e.value,isSatisfiable=(e,t)=>{let r=!0;const i=e.slice();let s=i.pop();for(;r&&i.length;)r=i.every((e=>s.intersects(e,t))),s=i.pop();return r},parseComparator=(e,t)=>(debug$1("comp",e,t),e=replaceCarets(e,t),debug$1("caret",e),e=replaceTildes(e,t),debug$1("tildes",e),e=replaceXRanges(e,t),debug$1("xrange",e),e=replaceStars(e,t),debug$1("stars",e),e),isX=e=>!e||"x"===e.toLowerCase()||"*"===e,replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" "),replaceTilde=(e,t)=>{const r=t.loose?re$1[t$1.TILDELOOSE]:re$1[t$1.TILDE];return e.replace(r,((t,r,i,s,n)=>{let a;return debug$1("tilde",e,t,r,i,s,n),isX(r)?a="":isX(i)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:isX(s)?a=`>=${r}.${i}.0 <${r}.${+i+1}.0-0`:n?(debug$1("replaceTilde pr",n),a=`>=${r}.${i}.${s}-${n} <${r}.${+i+1}.0-0`):a=`>=${r}.${i}.${s} <${r}.${+i+1}.0-0`,debug$1("tilde return",a),a}))},replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" "),replaceCaret=(e,t)=>{debug$1("caret",e,t);const r=t.loose?re$1[t$1.CARETLOOSE]:re$1[t$1.CARET],i=t.includePrerelease?"-0":"";return e.replace(r,((t,r,s,n,a)=>{let o;return debug$1("caret",e,t,r,s,n,a),isX(r)?o="":isX(s)?o=`>=${r}.0.0${i} <${+r+1}.0.0-0`:isX(n)?o="0"===r?`>=${r}.${s}.0${i} <${r}.${+s+1}.0-0`:`>=${r}.${s}.0${i} <${+r+1}.0.0-0`:a?(debug$1("replaceCaret pr",a),o="0"===r?"0"===s?`>=${r}.${s}.${n}-${a} <${r}.${s}.${+n+1}-0`:`>=${r}.${s}.${n}-${a} <${r}.${+s+1}.0-0`:`>=${r}.${s}.${n}-${a} <${+r+1}.0.0-0`):(debug$1("no pr"),o="0"===r?"0"===s?`>=${r}.${s}.${n}${i} <${r}.${s}.${+n+1}-0`:`>=${r}.${s}.${n}${i} <${r}.${+s+1}.0-0`:`>=${r}.${s}.${n} <${+r+1}.0.0-0`),debug$1("caret return",o),o}))},replaceXRanges=(e,t)=>(debug$1("replaceXRanges",e,t),e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")),replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?re$1[t$1.XRANGELOOSE]:re$1[t$1.XRANGE];return e.replace(r,((r,i,s,n,a,o)=>{debug$1("xRange",e,r,i,s,n,a,o);const l=isX(s),h=l||isX(n),p=h||isX(a),c=p;return"="===i&&c&&(i=""),o=t.includePrerelease?"-0":"",l?r=">"===i||"<"===i?"<0.0.0-0":"*":i&&c?(h&&(n=0),a=0,">"===i?(i=">=",h?(s=+s+1,n=0,a=0):(n=+n+1,a=0)):"<="===i&&(i="<",h?s=+s+1:n=+n+1),"<"===i&&(o="-0"),r=`${i+s}.${n}.${a}${o}`):h?r=`>=${s}.0.0${o} <${+s+1}.0.0-0`:p&&(r=`>=${s}.${n}.0${o} <${s}.${+n+1}.0-0`),debug$1("xRange return",r),r}))},replaceStars=(e,t)=>(debug$1("replaceStars",e,t),e.trim().replace(re$1[t$1.STAR],"")),replaceGTE0=(e,t)=>(debug$1("replaceGTE0",e,t),e.trim().replace(re$1[t.includePrerelease?t$1.GTE0PRE:t$1.GTE0],"")),hyphenReplace=e=>(t,r,i,s,n,a,o,l,h,p,c,u,m)=>`${r=isX(i)?"":isX(s)?`>=${i}.0.0${e?"-0":""}`:isX(n)?`>=${i}.${s}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`} ${l=isX(h)?"":isX(p)?`<${+h+1}.0.0-0`:isX(c)?`<${h}.${+p+1}.0-0`:u?`<=${h}.${p}.${c}-${u}`:e?`<${h}.${p}.${+c+1}-0`:`<=${l}`}`.trim(),testSet=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(debug$1(e[r].semver),e[r].semver!==Comparator$4.ANY&&e[r].semver.prerelease.length>0){const i=e[r].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0},ANY$2=Symbol("SemVer ANY");class Comparator$3{static get ANY(){return ANY$2}constructor(e,t){if(t=parseOptions(t),e instanceof Comparator$3){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),debug("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ANY$2?this.value="":this.value=this.operator+this.semver.version,debug("comp",this)}parse(e){const r=this.options.loose?re[t.COMPARATORLOOSE]:re[t.COMPARATOR],i=e.match(r);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==i[1]?i[1]:"","="===this.operator&&(this.operator=""),i[2]?this.semver=new SemVer$5(i[2],this.options.loose):this.semver=ANY$2}toString(){return this.value}test(e){if(debug("Comparator.test",e,this.options.loose),this.semver===ANY$2||e===ANY$2)return!0;if("string"==typeof e)try{e=new SemVer$5(e,this.options)}catch(e){return!1}return cmp$1(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator$3))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new Range$a(e.value,t).test(this.value):""===e.operator?""===e.value||new Range$a(this.value,t).test(e.semver):(!(t=parseOptions(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(cmp$1(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(cmp$1(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}var comparator=Comparator$3;const parseOptions=parseOptions_1,{safeRe:re,t:t}=re$4.exports,cmp$1=cmp_1,debug=debug_1,SemVer$5=semver$1,Range$a=range,Range$9=range,satisfies$4=(e,t,r)=>{try{t=new Range$9(t,r)}catch(e){return!1}return t.test(e)};var satisfies_1=satisfies$4;const Range$8=range,toComparators$1=(e,t)=>new Range$8(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));var toComparators_1=toComparators$1;const SemVer$4=semver$1,Range$7=range,maxSatisfying$1=(e,t,r)=>{let i=null,s=null,n=null;try{n=new Range$7(t,r)}catch(e){return null}return e.forEach((e=>{n.test(e)&&(i&&-1!==s.compare(e)||(i=e,s=new SemVer$4(i,r)))})),i};var maxSatisfying_1=maxSatisfying$1;const SemVer$3=semver$1,Range$6=range,minSatisfying$1=(e,t,r)=>{let i=null,s=null,n=null;try{n=new Range$6(t,r)}catch(e){return null}return e.forEach((e=>{n.test(e)&&(i&&1!==s.compare(e)||(i=e,s=new SemVer$3(i,r)))})),i};var minSatisfying_1=minSatisfying$1;const SemVer$2=semver$1,Range$5=range,gt$2=gt_1,minVersion$1=(e,t)=>{e=new Range$5(e,t);let r=new SemVer$2("0.0.0");if(e.test(r))return r;if(r=new SemVer$2("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const i=e.set[t];let s=null;i.forEach((e=>{const t=new SemVer$2(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!gt$2(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||r&&!gt$2(r,s)||(r=s)}return r&&e.test(r)?r:null};var minVersion_1=minVersion$1;const Range$4=range,validRange$1=(e,t)=>{try{return new Range$4(e,t).range||"*"}catch(e){return null}};var valid$1=validRange$1;const SemVer$1=semver$1,Comparator$2=comparator,{ANY:ANY$1}=Comparator$2,Range$3=range,satisfies$3=satisfies_1,gt$1=gt_1,lt$1=lt_1,lte$1=lte_1,gte$1=gte_1,outside$3=(e,t,r,i)=>{let s,n,a,o,l;switch(e=new SemVer$1(e,i),t=new Range$3(t,i),r){case">":s=gt$1,n=lte$1,a=lt$1,o=">",l=">=";break;case"<":s=lt$1,n=gte$1,a=gt$1,o="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies$3(e,t,i))return!1;for(let r=0;r<t.set.length;++r){const h=t.set[r];let p=null,c=null;if(h.forEach((e=>{e.semver===ANY$1&&(e=new Comparator$2(">=0.0.0")),p=p||e,c=c||e,s(e.semver,p.semver,i)?p=e:a(e.semver,c.semver,i)&&(c=e)})),p.operator===o||p.operator===l)return!1;if((!c.operator||c.operator===o)&&n(e,c.semver))return!1;if(c.operator===l&&a(e,c.semver))return!1}return!0};var outside_1=outside$3;const outside$2=outside_1,gtr$1=(e,t,r)=>outside$2(e,t,">",r);var gtr_1=gtr$1;const outside$1=outside_1,ltr$1=(e,t,r)=>outside$1(e,t,"<",r);var ltr_1=ltr$1;const Range$2=range,intersects$1=(e,t,r)=>(e=new Range$2(e,r),t=new Range$2(t,r),e.intersects(t,r));var intersects_1=intersects$1;const satisfies$2=satisfies_1,compare$2=compare_1;var simplify=(e,t,r)=>{const i=[];let s=null,n=null;const a=e.sort(((e,t)=>compare$2(e,t,r)));for(const e of a){satisfies$2(e,t,r)?(n=e,s||(s=e)):(n&&i.push([s,n]),n=null,s=null)}s&&i.push([s,null]);const o=[];for(const[e,t]of i)e===t?o.push(e):t||e!==a[0]?t?e===a[0]?o.push(`<=${t}`):o.push(`${e} - ${t}`):o.push(`>=${e}`):o.push("*");const l=o.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return l.length<h.length?l:t};const Range$1=range,Comparator$1=comparator,{ANY:ANY}=Comparator$1,satisfies$1=satisfies_1,compare$1=compare_1,subset$1=(e,t,r={})=>{if(e===t)return!0;e=new Range$1(e,r),t=new Range$1(t,r);let i=!1;e:for(const s of e.set){for(const e of t.set){const t=simpleSubset(s,e,r);if(i=i||null!==t,t)continue e}if(i)return!1}return!0},minimumVersionWithPreRelease=[new Comparator$1(">=0.0.0-0")],minimumVersion=[new Comparator$1(">=0.0.0")],simpleSubset=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===ANY){if(1===t.length&&t[0].semver===ANY)return!0;e=r.includePrerelease?minimumVersionWithPreRelease:minimumVersion}if(1===t.length&&t[0].semver===ANY){if(r.includePrerelease)return!0;t=minimumVersion}const i=new Set;let s,n,a,o,l,h,p;for(const t of e)">"===t.operator||">="===t.operator?s=higherGT(s,t,r):"<"===t.operator||"<="===t.operator?n=lowerLT(n,t,r):i.add(t.semver);if(i.size>1)return null;if(s&&n){if(a=compare$1(s.semver,n.semver,r),a>0)return null;if(0===a&&(">="!==s.operator||"<="!==n.operator))return null}for(const e of i){if(s&&!satisfies$1(e,String(s),r))return null;if(n&&!satisfies$1(e,String(n),r))return null;for(const i of t)if(!satisfies$1(e,String(i),r))return!1;return!0}let c=!(!n||r.includePrerelease||!n.semver.prerelease.length)&&n.semver,u=!(!s||r.includePrerelease||!s.semver.prerelease.length)&&s.semver;c&&1===c.prerelease.length&&"<"===n.operator&&0===c.prerelease[0]&&(c=!1);for(const e of t){if(p=p||">"===e.operator||">="===e.operator,h=h||"<"===e.operator||"<="===e.operator,s)if(u&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===u.major&&e.semver.minor===u.minor&&e.semver.patch===u.patch&&(u=!1),">"===e.operator||">="===e.operator){if(o=higherGT(s,e,r),o===e&&o!==s)return!1}else if(">="===s.operator&&!satisfies$1(s.semver,String(e),r))return!1;if(n)if(c&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===c.major&&e.semver.minor===c.minor&&e.semver.patch===c.patch&&(c=!1),"<"===e.operator||"<="===e.operator){if(l=lowerLT(n,e,r),l===e&&l!==n)return!1}else if("<="===n.operator&&!satisfies$1(n.semver,String(e),r))return!1;if(!e.operator&&(n||s)&&0!==a)return!1}return!(s&&h&&!n&&0!==a)&&(!(n&&p&&!s&&0!==a)&&(!u&&!c))},higherGT=(e,t,r)=>{if(!e)return t;const i=compare$1(e.semver,t.semver,r);return i>0?e:i<0||">"===t.operator&&">="===e.operator?t:e},lowerLT=(e,t,r)=>{if(!e)return t;const i=compare$1(e.semver,t.semver,r);return i<0?e:i>0||"<"===t.operator&&"<="===e.operator?t:e};var subset_1=subset$1;const internalRe=re$4.exports,constants=constants$1,SemVer=semver$1,identifiers=identifiers$1,parse=parse_1,valid=valid_1,clean=clean_1,inc=inc_1,diff=diff_1,major=major_1,minor=minor_1,patch=patch_1,prerelease=prerelease_1,compare=compare_1,rcompare=rcompare_1,compareLoose=compareLoose_1,compareBuild=compareBuild_1,sort=sort_1,rsort=rsort_1,gt=gt_1,lt=lt_1,eq=eq_1,neq=neq_1,gte=gte_1,lte=lte_1,cmp=cmp_1,coerce=coerce_1,Comparator=comparator,Range=range,satisfies=satisfies_1,toComparators=toComparators_1,maxSatisfying=maxSatisfying_1,minSatisfying=minSatisfying_1,minVersion=minVersion_1,validRange=valid$1,outside=outside_1,gtr=gtr_1,ltr=ltr_1,intersects=intersects_1,simplifyRange=simplify,subset=subset_1;var semver={parse:parse,valid:valid,clean:clean,inc:inc,diff:diff,major:major,minor:minor,patch:patch,prerelease:prerelease,compare:compare,rcompare:rcompare,compareLoose:compareLoose,compareBuild:compareBuild,sort:sort,rsort:rsort,gt:gt,lt:lt,eq:eq,neq:neq,gte:gte,lte:lte,cmp:cmp,coerce:coerce,Comparator:Comparator,Range:Range,satisfies:satisfies,toComparators:toComparators,maxSatisfying:maxSatisfying,minSatisfying:minSatisfying,minVersion:minVersion,validRange:validRange,outside:outside,gtr:gtr,ltr:ltr,intersects:intersects,simplifyRange:simplifyRange,subset:subset,SemVer:SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants.SEMVER_SPEC_VERSION,RELEASE_TYPES:constants.RELEASE_TYPES,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers},preload=semver;const pdfApplicationCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{display:block}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.m-4{margin:1rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfApplicationStyle0=pdfApplicationCss,PdfApplication=class{constructor(e){index.registerInstance(this,e),this.apiError=index.createEvent(this,"apiError",7),this.sessionService=new ApiClient.SessionService,this.fileService=new FileService.FileService,this.logger=ApiClient.createLogger("PdfApplication"),this.apiErrorHandler=e=>{this.apiError?this.apiError.emit(e):console.error("Unhandled API error",e)},this.authenticated=new ApiClient.ApiLoading,this.versionInfo=new ApiClient.ApiLoading,this.publickey=void 0,this.privatekey=void 0,this.apiBaseUrl=void 0,this.sessionsurl=void 0}async getAbout(){var e,t,r;this.logger.debug("Get diagnostics");const i=null!==(e=this.versionInfo)&&void 0!==e?e:await this.sessionService.getVersion();return{npmVersion:LIB_VERSION,apiBaseUrl:ApiClient.state.apiBaseUrl,publicKey:ApiClient.state.publicKey,apiVersion:i.error?`error: ${i.error.code} - ${i.error.message}`:null!==(r=null===(t=i.value)||void 0===t?void 0:t.apiVersion)&&void 0!==r?r:"error: could not read api version"}}async getDocuments(){this.logger.debug("Get documents");return(await this.fileService.getDocuments()).value||[]}async deleteDocument(e){this.logger.debug("Delete single document"),await this.fileService.deleteDocuments([e])}async deleteDocuments(e){this.logger.debug("Delete multiple document"),await this.fileService.deleteDocuments(e)}async createDocument(e,t,r){return this.logger.debug("Create new document"),await this.fileService.createDocument(e,t,null!=r?r:null)}async componentWillLoad(){this.logger.debug("Starting..."),this.configure(),await this.versionCheck(),await this.login(),this.authenticated.value&&await this.loadStandardFonts()}componentDidLoad(){this.logger.debug("Started")}disconnectedCallback(){this.sessionService.onUnmounted()}configure(){ApiClient.state.apiBaseUrl=this.apiBaseUrl||index.Env.API_BASE_URL,this.logger.debug(`apiBaseURL: ${ApiClient.state.apiBaseUrl}`),ApiClient.state.publicKey=this.publickey||index.Env.API_PUBLIC_KEY,ApiClient.state.privateKey=this.privatekey||index.Env.API_PRIVATE_KEY,this.sessionsurl&&(ApiClient.state.sessionsUrl=this.sessionsurl),ApiClient.state.apiErrorHandler=this.apiErrorHandler,this.sessionService.onMounted((e=>this.authenticated=e.map((e=>e>0))))}async versionCheck(){this.versionInfo=await this.sessionService.getVersion()}async login(){this.authenticated=(await this.sessionService.login()).map((e=>e>0))}async logout(){this.authenticated=await this.sessionService.logout()}async loadStandardFonts(){var e;this.logger.debug("Setting standard fonts");null===(e=(await this.fileService.getStandardFonts()).value)||void 0===e||e.forEach((async e=>{await insertFonts.addFontFace(e.fontId,e.fontData,document)}))}render(){if(this.authenticated.loading||this.versionInfo.loading)return index.h(index.Host,null,index.h("div",{class:"m-4"},"Loading..."));if(this.versionInfo.error)return index.h(index.Host,null,index.h("div",{class:"m-4"},index.h("h2",{class:"text-xl font-bold text-red-600"},"Api unavailable:"),index.h("div",{class:"text-red-600"},this.versionInfo.error.code," - ",this.versionInfo.error.message)));if(this.versionInfo.value&&(preload.lt(this.versionInfo.value.apiVersion,index.Env.API_MINIMUM_VERSION)||preload.lt(LIB_VERSION,this.versionInfo.value.minimumNpmPackageVersion))){let e=preload.lt(this.versionInfo.value.apiVersion,index.Env.API_MINIMUM_VERSION),t=preload.lt(LIB_VERSION,this.versionInfo.value.minimumNpmPackageVersion);return this.logger.error(e?`Api version ${this.versionInfo.value.apiVersion} is too low. Must be at least ${index.Env.API_MINIMUM_VERSION}.`:`Package version ${LIB_VERSION} is too low. Must be at least ${this.versionInfo.value.minimumNpmPackageVersion}.`),index.h(index.Host,null,index.h("div",{class:"m-4"},index.h("h2",{class:"text-xl font-bold text-red-600"},"Api and npm package version mismatch:"),index.h("div",{class:"text-red-600"},e&&index.h("span",null,"The version of the Api used is not supported. Current Api version: ",this.versionInfo.value.apiVersion,". Current version of this package requires at least version ",index.Env.API_MINIMUM_VERSION," of the Api."),t&&index.h("span",null,"This version of the npm package is no longer supported by the Api. You current version: ",LIB_VERSION,". Please upgrade to ",this.versionInfo.value.minimumNpmPackageVersion," or above."))))}return this.authenticated.error?index.h(index.Host,null,index.h("div",{class:"m-4"},index.h("h2",{class:"text-xl font-bold text-red-600"},"Error logging in:"),index.h("div",{class:"text-red-600"},this.authenticated.error.code," - ",this.authenticated.error.message))):void 0}};PdfApplication.style=PdfApplicationStyle0,exports.pdf_application=PdfApplication; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),ApiClient=require("./ApiClient-eb21273a.js"),FileService=require("./FileService-af047eef.js"),insertFonts=require("./insertFonts-9ab9bdee.js"),LIB_VERSION="1.2.12-fe3b6350";var re$4={exports:{}};const SEMVER_SPEC_VERSION="2.0.0",MAX_LENGTH$1=256,MAX_SAFE_INTEGER$1=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,MAX_SAFE_BUILD_LENGTH=250,RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var constants$1={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$1,RELEASE_TYPES:RELEASE_TYPES,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const debug$3="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var debug_1=debug$3;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:s}=constants$1,n=debug_1,a=(t=e.exports={}).re=[],o=t.safeRe=[],l=t.src=[],h=t.t={};let p=0;const c="[a-zA-Z0-9-]",u=[["\\s",1],["\\d",s],[c,i]],m=(e,t,r)=>{const i=(e=>{for(const[t,r]of u)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),s=p++;n(e,s,t),h[e]=s,l[s]=t,a[s]=new RegExp(t,r?"g":void 0),o[s]=new RegExp(i,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${c}*`),m("MAINVERSION",`(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${l[h.NUMERICIDENTIFIER]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${l[h.NUMERICIDENTIFIERLOOSE]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASE",`(?:-(${l[h.PRERELEASEIDENTIFIER]}(?:\\.${l[h.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${l[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[h.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${c}+`),m("BUILD",`(?:\\+(${l[h.BUILDIDENTIFIER]}(?:\\.${l[h.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${l[h.MAINVERSION]}${l[h.PRERELEASE]}?${l[h.BUILD]}?`),m("FULL",`^${l[h.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${l[h.MAINVERSIONLOOSE]}${l[h.PRERELEASELOOSE]}?${l[h.BUILD]}?`),m("LOOSE",`^${l[h.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${l[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${l[h.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:${l[h.PRERELEASE]})?${l[h.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:${l[h.PRERELEASELOOSE]})?${l[h.BUILD]}?)?)?`),m("XRANGE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),m("COERCE",`${l[h.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",l[h.COERCEPLAIN]+`(?:${l[h.PRERELEASE]})?`+`(?:${l[h.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",l[h.COERCE],!0),m("COERCERTLFULL",l[h.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${l[h.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${l[h.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${l[h.LONECARET]}${l[h.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${l[h.LONECARET]}${l[h.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${l[h.GTLT]}\\s*(${l[h.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]}|${l[h.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${l[h.XRANGEPLAIN]})\\s+-\\s+(${l[h.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${l[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[h.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(re$4,re$4.exports);const looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({}),parseOptions$3=e=>e?"object"!=typeof e?looseOption:e:emptyOpts;var parseOptions_1=parseOptions$3;const numeric=/^[0-9]+$/,compareIdentifiers$1=(e,t)=>{const r=numeric.test(e),i=numeric.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1},rcompareIdentifiers=(e,t)=>compareIdentifiers$1(t,e);var identifiers$1={compareIdentifiers:compareIdentifiers$1,rcompareIdentifiers:rcompareIdentifiers};const debug$2=debug_1,{MAX_LENGTH:MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER}=constants$1,{safeRe:re$3,t:t$3}=re$4.exports,parseOptions$2=parseOptions_1,{compareIdentifiers:compareIdentifiers}=identifiers$1;class SemVer$f{constructor(e,t){if(t=parseOptions$2(t),e instanceof SemVer$f){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug$2("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?re$3[t$3.LOOSE]:re$3[t$3.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>MAX_SAFE_INTEGER||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<MAX_SAFE_INTEGER)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(debug$2("SemVer.compare",this.version,this.options,e),!(e instanceof SemVer$f)){if("string"==typeof e&&e===this.version)return 0;e=new SemVer$f(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),compareIdentifiers(this.major,e.major)||compareIdentifiers(this.minor,e.minor)||compareIdentifiers(this.patch,e.patch)}comparePre(e){if(e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],i=e.prerelease[t];if(debug$2("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return compareIdentifiers(r,i)}while(++t)}compareBuild(e){e instanceof SemVer$f||(e=new SemVer$f(e,this.options));let t=0;do{const r=this.build[t],i=e.build[t];if(debug$2("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return compareIdentifiers(r,i)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let i=this.prerelease.length;for(;--i>=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let i=[t,e];!1===r&&(i=[t]),0===compareIdentifiers(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}var semver$1=SemVer$f;const SemVer$e=semver$1,parse$6=(e,t,r=!1)=>{if(e instanceof SemVer$e)return e;try{return new SemVer$e(e,t)}catch(e){if(!r)return null;throw e}};var parse_1=parse$6;const parse$5=parse_1,valid$2=(e,t)=>{const r=parse$5(e,t);return r?r.version:null};var valid_1=valid$2;const parse$4=parse_1,clean$1=(e,t)=>{const r=parse$4(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var clean_1=clean$1;const SemVer$d=semver$1,inc$1=(e,t,r,i,s)=>{"string"==typeof r&&(s=i,i=r,r=void 0);try{return new SemVer$d(e instanceof SemVer$d?e.version:e,r).inc(t,i,s).version}catch(e){return null}};var inc_1=inc$1;const parse$3=parse_1,diff$1=(e,t)=>{const r=parse$3(e,null,!0),i=parse$3(t,null,!0),s=r.compare(i);if(0===s)return null;const n=s>0,a=n?r:i,o=n?i:r,l=!!a.prerelease.length;if(!!o.prerelease.length&&!l)return o.patch||o.minor?a.patch?"patch":a.minor?"minor":"major":"major";const h=l?"pre":"";return r.major!==i.major?h+"major":r.minor!==i.minor?h+"minor":r.patch!==i.patch?h+"patch":"prerelease"};var diff_1=diff$1;const SemVer$c=semver$1,major$1=(e,t)=>new SemVer$c(e,t).major;var major_1=major$1;const SemVer$b=semver$1,minor$1=(e,t)=>new SemVer$b(e,t).minor;var minor_1=minor$1;const SemVer$a=semver$1,patch$1=(e,t)=>new SemVer$a(e,t).patch;var patch_1=patch$1;const parse$2=parse_1,prerelease$1=(e,t)=>{const r=parse$2(e,t);return r&&r.prerelease.length?r.prerelease:null};var prerelease_1=prerelease$1;const SemVer$9=semver$1,compare$b=(e,t,r)=>new SemVer$9(e,r).compare(new SemVer$9(t,r));var compare_1=compare$b;const compare$a=compare_1,rcompare$1=(e,t,r)=>compare$a(t,e,r);var rcompare_1=rcompare$1;const compare$9=compare_1,compareLoose$1=(e,t)=>compare$9(e,t,!0);var compareLoose_1=compareLoose$1;const SemVer$8=semver$1,compareBuild$3=(e,t,r)=>{const i=new SemVer$8(e,r),s=new SemVer$8(t,r);return i.compare(s)||i.compareBuild(s)};var compareBuild_1=compareBuild$3;const compareBuild$2=compareBuild_1,sort$1=(e,t)=>e.sort(((e,r)=>compareBuild$2(e,r,t)));var sort_1=sort$1;const compareBuild$1=compareBuild_1,rsort$1=(e,t)=>e.sort(((e,r)=>compareBuild$1(r,e,t)));var rsort_1=rsort$1;const compare$8=compare_1,gt$4=(e,t,r)=>compare$8(e,t,r)>0;var gt_1=gt$4;const compare$7=compare_1,lt$3=(e,t,r)=>compare$7(e,t,r)<0;var lt_1=lt$3;const compare$6=compare_1,eq$2=(e,t,r)=>0===compare$6(e,t,r);var eq_1=eq$2;const compare$5=compare_1,neq$2=(e,t,r)=>0!==compare$5(e,t,r);var neq_1=neq$2;const compare$4=compare_1,gte$3=(e,t,r)=>compare$4(e,t,r)>=0;var gte_1=gte$3;const compare$3=compare_1,lte$3=(e,t,r)=>compare$3(e,t,r)<=0;var lte_1=lte$3;const eq$1=eq_1,neq$1=neq_1,gt$3=gt_1,gte$2=gte_1,lt$2=lt_1,lte$2=lte_1,cmp$2=(e,t,r,i)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return eq$1(e,r,i);case"!=":return neq$1(e,r,i);case">":return gt$3(e,r,i);case">=":return gte$2(e,r,i);case"<":return lt$2(e,r,i);case"<=":return lte$2(e,r,i);default:throw new TypeError(`Invalid operator: ${t}`)}};var cmp_1=cmp$2;const SemVer$7=semver$1,parse$1=parse_1,{safeRe:re$2,t:t$2}=re$4.exports,coerce$1=(e,t)=>{if(e instanceof SemVer$7)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const i=t.includePrerelease?re$2[t$2.COERCERTLFULL]:re$2[t$2.COERCERTL];let s;for(;(s=i.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&s.index+s[0].length===r.index+r[0].length||(r=s),i.lastIndex=s.index+s[1].length+s[2].length;i.lastIndex=-1}else r=e.match(t.includePrerelease?re$2[t$2.COERCEFULL]:re$2[t$2.COERCE]);if(null===r)return null;const i=r[2],s=r[3]||"0",n=r[4]||"0",a=t.includePrerelease&&r[5]?`-${r[5]}`:"",o=t.includePrerelease&&r[6]?`+${r[6]}`:"";return parse$1(`${i}.${s}.${n}${a}${o}`,t)};var coerce_1=coerce$1,yallist=Yallist$1;function Yallist$1(e){var t=this;if(t instanceof Yallist$1||(t=new Yallist$1),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function insert(e,t,r){var i=t===e.head?new Node(r,null,t,e):new Node(r,t,t.next,e);return null===i.next&&(e.tail=i),null===i.prev&&(e.head=i),e.length++,i}function push(e,t){e.tail=new Node(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Node(e,t,r,i){if(!(this instanceof Node))return new Node(e,t,r,i);this.list=i,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}Yallist$1.Node=Node,Yallist$1.create=Yallist$1,Yallist$1.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},Yallist$1.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},Yallist$1.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},Yallist$1.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)push(this,arguments[e]);return this.length},Yallist$1.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)unshift(this,arguments[e]);return this.length},Yallist$1.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},Yallist$1.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},Yallist$1.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,i=0;null!==r;i++)e.call(t,r.value,i,this),r=r.next},Yallist$1.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,i=this.length-1;null!==r;i--)e.call(t,r.value,i,this),r=r.prev},Yallist$1.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},Yallist$1.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},Yallist$1.prototype.map=function(e,t){t=t||this;for(var r=new Yallist$1,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},Yallist$1.prototype.mapReverse=function(e,t){t=t||this;for(var r=new Yallist$1,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},Yallist$1.prototype.reduce=function(e,t){var r,i=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");i=this.head.next,r=this.head.value}for(var s=0;null!==i;s++)r=e(r,i.value,s),i=i.next;return r},Yallist$1.prototype.reduceReverse=function(e,t){var r,i=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");i=this.tail.prev,r=this.tail.value}for(var s=this.length-1;null!==i;s--)r=e(r,i.value,s),i=i.prev;return r},Yallist$1.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},Yallist$1.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},Yallist$1.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,s=this.head;null!==s&&i<e;i++)s=s.next;for(;null!==s&&i<t;i++,s=s.next)r.push(s.value);return r},Yallist$1.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,s=this.tail;null!==s&&i>t;i--)s=s.prev;for(;null!==s&&i>e;i--,s=s.prev)r.push(s.value);return r},Yallist$1.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var i=0,s=this.head;null!==s&&i<e;i++)s=s.next;var n=[];for(i=0;s&&i<t;i++)n.push(s.value),s=this.removeNode(s);null===s&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(i=0;i<r.length;i++)s=insert(this,s,r[i]);return n},Yallist$1.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var i=r.prev;r.prev=r.next,r.next=i}return this.head=t,this.tail=e,this};try{require("./iterator.js")(Yallist$1)}catch(e){}const Yallist=yallist,MAX=Symbol("max"),LENGTH=Symbol("length"),LENGTH_CALCULATOR=Symbol("lengthCalculator"),ALLOW_STALE=Symbol("allowStale"),MAX_AGE=Symbol("maxAge"),DISPOSE=Symbol("dispose"),NO_DISPOSE_ON_SET=Symbol("noDisposeOnSet"),LRU_LIST=Symbol("lruList"),CACHE=Symbol("cache"),UPDATE_AGE_ON_GET=Symbol("updateAgeOnGet"),naiveLength=()=>1;class LRUCache{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[MAX]=e.max||1/0;const t=e.length||naiveLength;if(this[LENGTH_CALCULATOR]="function"!=typeof t?naiveLength:t,this[ALLOW_STALE]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[MAX_AGE]=e.maxAge||0,this[DISPOSE]=e.dispose,this[NO_DISPOSE_ON_SET]=e.noDisposeOnSet||!1,this[UPDATE_AGE_ON_GET]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[MAX]=e||1/0,trim(this)}get max(){return this[MAX]}set allowStale(e){this[ALLOW_STALE]=!!e}get allowStale(){return this[ALLOW_STALE]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[MAX_AGE]=e,trim(this)}get maxAge(){return this[MAX_AGE]}set lengthCalculator(e){"function"!=typeof e&&(e=naiveLength),e!==this[LENGTH_CALCULATOR]&&(this[LENGTH_CALCULATOR]=e,this[LENGTH]=0,this[LRU_LIST].forEach((e=>{e.length=this[LENGTH_CALCULATOR](e.value,e.key),this[LENGTH]+=e.length}))),trim(this)}get lengthCalculator(){return this[LENGTH_CALCULATOR]}get length(){return this[LENGTH]}get itemCount(){return this[LRU_LIST].length}rforEach(e,t){t=t||this;for(let r=this[LRU_LIST].tail;null!==r;){const i=r.prev;forEachStep(this,e,r,t),r=i}}forEach(e,t){t=t||this;for(let r=this[LRU_LIST].head;null!==r;){const i=r.next;forEachStep(this,e,r,t),r=i}}keys(){return this[LRU_LIST].toArray().map((e=>e.key))}values(){return this[LRU_LIST].toArray().map((e=>e.value))}reset(){this[DISPOSE]&&this[LRU_LIST]&&this[LRU_LIST].length&&this[LRU_LIST].forEach((e=>this[DISPOSE](e.key,e.value))),this[CACHE]=new Map,this[LRU_LIST]=new Yallist,this[LENGTH]=0}dump(){return this[LRU_LIST].map((e=>!isStale(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[LRU_LIST]}set(e,t,r){if((r=r||this[MAX_AGE])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const i=r?Date.now():0,s=this[LENGTH_CALCULATOR](t,e);if(this[CACHE].has(e)){if(s>this[MAX])return del(this,this[CACHE].get(e)),!1;const n=this[CACHE].get(e).value;return this[DISPOSE]&&(this[NO_DISPOSE_ON_SET]||this[DISPOSE](e,n.value)),n.now=i,n.maxAge=r,n.value=t,this[LENGTH]+=s-n.length,n.length=s,this.get(e),trim(this),!0}const n=new Entry(e,t,s,i,r);return n.length>this[MAX]?(this[DISPOSE]&&this[DISPOSE](e,t),!1):(this[LENGTH]+=n.length,this[LRU_LIST].unshift(n),this[CACHE].set(e,this[LRU_LIST].head),trim(this),!0)}has(e){if(!this[CACHE].has(e))return!1;const t=this[CACHE].get(e).value;return!isStale(this,t)}get(e){return get(this,e,!0)}peek(e){return get(this,e,!1)}pop(){const e=this[LRU_LIST].tail;return e?(del(this,e),e.value):null}del(e){del(this,this[CACHE].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const i=e[r],s=i.e||0;if(0===s)this.set(i.k,i.v);else{const e=s-t;e>0&&this.set(i.k,i.v,e)}}}prune(){this[CACHE].forEach(((e,t)=>get(this,t,!1)))}}const get=(e,t,r)=>{const i=e[CACHE].get(t);if(i){const t=i.value;if(isStale(e,t)){if(del(e,i),!e[ALLOW_STALE])return}else r&&(e[UPDATE_AGE_ON_GET]&&(i.value.now=Date.now()),e[LRU_LIST].unshiftNode(i));return t.value}},isStale=(e,t)=>{if(!t||!t.maxAge&&!e[MAX_AGE])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[MAX_AGE]&&r>e[MAX_AGE]},trim=e=>{if(e[LENGTH]>e[MAX])for(let t=e[LRU_LIST].tail;e[LENGTH]>e[MAX]&&null!==t;){const r=t.prev;del(e,t),t=r}},del=(e,t)=>{if(t){const r=t.value;e[DISPOSE]&&e[DISPOSE](r.key,r.value),e[LENGTH]-=r.length,e[CACHE].delete(r.key),e[LRU_LIST].removeNode(t)}};class Entry{constructor(e,t,r,i,s){this.key=e,this.value=t,this.length=r,this.now=i,this.maxAge=s||0}}const forEachStep=(e,t,r,i)=>{let s=r.value;isStale(e,s)&&(del(e,r),e[ALLOW_STALE]||(s=void 0)),s&&t.call(i,s.value,s.key,e)};var lruCache=LRUCache;class Range$b{constructor(e,t){if(t=parseOptions$1(t),e instanceof Range$b)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Range$b(e.raw,t);if(e instanceof Comparator$4)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!isNullSet(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&isAny(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&FLAG_INCLUDE_PRERELEASE)|(this.options.loose&&FLAG_LOOSE))+":"+e,r=cache.get(t);if(r)return r;const i=this.options.loose,s=i?re$1[t$1.HYPHENRANGELOOSE]:re$1[t$1.HYPHENRANGE];e=e.replace(s,hyphenReplace(this.options.includePrerelease)),debug$1("hyphen replace",e),e=e.replace(re$1[t$1.COMPARATORTRIM],comparatorTrimReplace),debug$1("comparator trim",e),e=e.replace(re$1[t$1.TILDETRIM],tildeTrimReplace),debug$1("tilde trim",e),e=e.replace(re$1[t$1.CARETTRIM],caretTrimReplace),debug$1("caret trim",e);let n=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));i&&(n=n.filter((e=>(debug$1("loose invalid filter",e,this.options),!!e.match(re$1[t$1.COMPARATORLOOSE]))))),debug$1("range list",n);const a=new Map,o=n.map((e=>new Comparator$4(e,this.options)));for(const e of o){if(isNullSet(e))return[e];a.set(e.value,e)}a.size>1&&a.has("")&&a.delete("");const l=[...a.values()];return cache.set(t,l),l}intersects(e,t){if(!(e instanceof Range$b))throw new TypeError("a Range is required");return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new SemVer$6(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(testSet(this.set[t],e,this.options))return!0;return!1}}var range=Range$b;const LRU=lruCache,cache=new LRU({max:1e3}),parseOptions$1=parseOptions_1,Comparator$4=comparator,debug$1=debug_1,SemVer$6=semver$1,{safeRe:re$1,t:t$1,comparatorTrimReplace:comparatorTrimReplace,tildeTrimReplace:tildeTrimReplace,caretTrimReplace:caretTrimReplace}=re$4.exports,{FLAG_INCLUDE_PRERELEASE:FLAG_INCLUDE_PRERELEASE,FLAG_LOOSE:FLAG_LOOSE}=constants$1,isNullSet=e=>"<0.0.0-0"===e.value,isAny=e=>""===e.value,isSatisfiable=(e,t)=>{let r=!0;const i=e.slice();let s=i.pop();for(;r&&i.length;)r=i.every((e=>s.intersects(e,t))),s=i.pop();return r},parseComparator=(e,t)=>(debug$1("comp",e,t),e=replaceCarets(e,t),debug$1("caret",e),e=replaceTildes(e,t),debug$1("tildes",e),e=replaceXRanges(e,t),debug$1("xrange",e),e=replaceStars(e,t),debug$1("stars",e),e),isX=e=>!e||"x"===e.toLowerCase()||"*"===e,replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" "),replaceTilde=(e,t)=>{const r=t.loose?re$1[t$1.TILDELOOSE]:re$1[t$1.TILDE];return e.replace(r,((t,r,i,s,n)=>{let a;return debug$1("tilde",e,t,r,i,s,n),isX(r)?a="":isX(i)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:isX(s)?a=`>=${r}.${i}.0 <${r}.${+i+1}.0-0`:n?(debug$1("replaceTilde pr",n),a=`>=${r}.${i}.${s}-${n} <${r}.${+i+1}.0-0`):a=`>=${r}.${i}.${s} <${r}.${+i+1}.0-0`,debug$1("tilde return",a),a}))},replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" "),replaceCaret=(e,t)=>{debug$1("caret",e,t);const r=t.loose?re$1[t$1.CARETLOOSE]:re$1[t$1.CARET],i=t.includePrerelease?"-0":"";return e.replace(r,((t,r,s,n,a)=>{let o;return debug$1("caret",e,t,r,s,n,a),isX(r)?o="":isX(s)?o=`>=${r}.0.0${i} <${+r+1}.0.0-0`:isX(n)?o="0"===r?`>=${r}.${s}.0${i} <${r}.${+s+1}.0-0`:`>=${r}.${s}.0${i} <${+r+1}.0.0-0`:a?(debug$1("replaceCaret pr",a),o="0"===r?"0"===s?`>=${r}.${s}.${n}-${a} <${r}.${s}.${+n+1}-0`:`>=${r}.${s}.${n}-${a} <${r}.${+s+1}.0-0`:`>=${r}.${s}.${n}-${a} <${+r+1}.0.0-0`):(debug$1("no pr"),o="0"===r?"0"===s?`>=${r}.${s}.${n}${i} <${r}.${s}.${+n+1}-0`:`>=${r}.${s}.${n}${i} <${r}.${+s+1}.0-0`:`>=${r}.${s}.${n} <${+r+1}.0.0-0`),debug$1("caret return",o),o}))},replaceXRanges=(e,t)=>(debug$1("replaceXRanges",e,t),e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")),replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?re$1[t$1.XRANGELOOSE]:re$1[t$1.XRANGE];return e.replace(r,((r,i,s,n,a,o)=>{debug$1("xRange",e,r,i,s,n,a,o);const l=isX(s),h=l||isX(n),p=h||isX(a),c=p;return"="===i&&c&&(i=""),o=t.includePrerelease?"-0":"",l?r=">"===i||"<"===i?"<0.0.0-0":"*":i&&c?(h&&(n=0),a=0,">"===i?(i=">=",h?(s=+s+1,n=0,a=0):(n=+n+1,a=0)):"<="===i&&(i="<",h?s=+s+1:n=+n+1),"<"===i&&(o="-0"),r=`${i+s}.${n}.${a}${o}`):h?r=`>=${s}.0.0${o} <${+s+1}.0.0-0`:p&&(r=`>=${s}.${n}.0${o} <${s}.${+n+1}.0-0`),debug$1("xRange return",r),r}))},replaceStars=(e,t)=>(debug$1("replaceStars",e,t),e.trim().replace(re$1[t$1.STAR],"")),replaceGTE0=(e,t)=>(debug$1("replaceGTE0",e,t),e.trim().replace(re$1[t.includePrerelease?t$1.GTE0PRE:t$1.GTE0],"")),hyphenReplace=e=>(t,r,i,s,n,a,o,l,h,p,c,u,m)=>`${r=isX(i)?"":isX(s)?`>=${i}.0.0${e?"-0":""}`:isX(n)?`>=${i}.${s}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`} ${l=isX(h)?"":isX(p)?`<${+h+1}.0.0-0`:isX(c)?`<${h}.${+p+1}.0-0`:u?`<=${h}.${p}.${c}-${u}`:e?`<${h}.${p}.${+c+1}-0`:`<=${l}`}`.trim(),testSet=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(debug$1(e[r].semver),e[r].semver!==Comparator$4.ANY&&e[r].semver.prerelease.length>0){const i=e[r].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0},ANY$2=Symbol("SemVer ANY");class Comparator$3{static get ANY(){return ANY$2}constructor(e,t){if(t=parseOptions(t),e instanceof Comparator$3){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),debug("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ANY$2?this.value="":this.value=this.operator+this.semver.version,debug("comp",this)}parse(e){const r=this.options.loose?re[t.COMPARATORLOOSE]:re[t.COMPARATOR],i=e.match(r);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==i[1]?i[1]:"","="===this.operator&&(this.operator=""),i[2]?this.semver=new SemVer$5(i[2],this.options.loose):this.semver=ANY$2}toString(){return this.value}test(e){if(debug("Comparator.test",e,this.options.loose),this.semver===ANY$2||e===ANY$2)return!0;if("string"==typeof e)try{e=new SemVer$5(e,this.options)}catch(e){return!1}return cmp$1(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator$3))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new Range$a(e.value,t).test(this.value):""===e.operator?""===e.value||new Range$a(this.value,t).test(e.semver):(!(t=parseOptions(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(cmp$1(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(cmp$1(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}var comparator=Comparator$3;const parseOptions=parseOptions_1,{safeRe:re,t:t}=re$4.exports,cmp$1=cmp_1,debug=debug_1,SemVer$5=semver$1,Range$a=range,Range$9=range,satisfies$4=(e,t,r)=>{try{t=new Range$9(t,r)}catch(e){return!1}return t.test(e)};var satisfies_1=satisfies$4;const Range$8=range,toComparators$1=(e,t)=>new Range$8(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));var toComparators_1=toComparators$1;const SemVer$4=semver$1,Range$7=range,maxSatisfying$1=(e,t,r)=>{let i=null,s=null,n=null;try{n=new Range$7(t,r)}catch(e){return null}return e.forEach((e=>{n.test(e)&&(i&&-1!==s.compare(e)||(i=e,s=new SemVer$4(i,r)))})),i};var maxSatisfying_1=maxSatisfying$1;const SemVer$3=semver$1,Range$6=range,minSatisfying$1=(e,t,r)=>{let i=null,s=null,n=null;try{n=new Range$6(t,r)}catch(e){return null}return e.forEach((e=>{n.test(e)&&(i&&1!==s.compare(e)||(i=e,s=new SemVer$3(i,r)))})),i};var minSatisfying_1=minSatisfying$1;const SemVer$2=semver$1,Range$5=range,gt$2=gt_1,minVersion$1=(e,t)=>{e=new Range$5(e,t);let r=new SemVer$2("0.0.0");if(e.test(r))return r;if(r=new SemVer$2("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const i=e.set[t];let s=null;i.forEach((e=>{const t=new SemVer$2(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!gt$2(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||r&&!gt$2(r,s)||(r=s)}return r&&e.test(r)?r:null};var minVersion_1=minVersion$1;const Range$4=range,validRange$1=(e,t)=>{try{return new Range$4(e,t).range||"*"}catch(e){return null}};var valid$1=validRange$1;const SemVer$1=semver$1,Comparator$2=comparator,{ANY:ANY$1}=Comparator$2,Range$3=range,satisfies$3=satisfies_1,gt$1=gt_1,lt$1=lt_1,lte$1=lte_1,gte$1=gte_1,outside$3=(e,t,r,i)=>{let s,n,a,o,l;switch(e=new SemVer$1(e,i),t=new Range$3(t,i),r){case">":s=gt$1,n=lte$1,a=lt$1,o=">",l=">=";break;case"<":s=lt$1,n=gte$1,a=gt$1,o="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies$3(e,t,i))return!1;for(let r=0;r<t.set.length;++r){const h=t.set[r];let p=null,c=null;if(h.forEach((e=>{e.semver===ANY$1&&(e=new Comparator$2(">=0.0.0")),p=p||e,c=c||e,s(e.semver,p.semver,i)?p=e:a(e.semver,c.semver,i)&&(c=e)})),p.operator===o||p.operator===l)return!1;if((!c.operator||c.operator===o)&&n(e,c.semver))return!1;if(c.operator===l&&a(e,c.semver))return!1}return!0};var outside_1=outside$3;const outside$2=outside_1,gtr$1=(e,t,r)=>outside$2(e,t,">",r);var gtr_1=gtr$1;const outside$1=outside_1,ltr$1=(e,t,r)=>outside$1(e,t,"<",r);var ltr_1=ltr$1;const Range$2=range,intersects$1=(e,t,r)=>(e=new Range$2(e,r),t=new Range$2(t,r),e.intersects(t,r));var intersects_1=intersects$1;const satisfies$2=satisfies_1,compare$2=compare_1;var simplify=(e,t,r)=>{const i=[];let s=null,n=null;const a=e.sort(((e,t)=>compare$2(e,t,r)));for(const e of a){satisfies$2(e,t,r)?(n=e,s||(s=e)):(n&&i.push([s,n]),n=null,s=null)}s&&i.push([s,null]);const o=[];for(const[e,t]of i)e===t?o.push(e):t||e!==a[0]?t?e===a[0]?o.push(`<=${t}`):o.push(`${e} - ${t}`):o.push(`>=${e}`):o.push("*");const l=o.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return l.length<h.length?l:t};const Range$1=range,Comparator$1=comparator,{ANY:ANY}=Comparator$1,satisfies$1=satisfies_1,compare$1=compare_1,subset$1=(e,t,r={})=>{if(e===t)return!0;e=new Range$1(e,r),t=new Range$1(t,r);let i=!1;e:for(const s of e.set){for(const e of t.set){const t=simpleSubset(s,e,r);if(i=i||null!==t,t)continue e}if(i)return!1}return!0},minimumVersionWithPreRelease=[new Comparator$1(">=0.0.0-0")],minimumVersion=[new Comparator$1(">=0.0.0")],simpleSubset=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===ANY){if(1===t.length&&t[0].semver===ANY)return!0;e=r.includePrerelease?minimumVersionWithPreRelease:minimumVersion}if(1===t.length&&t[0].semver===ANY){if(r.includePrerelease)return!0;t=minimumVersion}const i=new Set;let s,n,a,o,l,h,p;for(const t of e)">"===t.operator||">="===t.operator?s=higherGT(s,t,r):"<"===t.operator||"<="===t.operator?n=lowerLT(n,t,r):i.add(t.semver);if(i.size>1)return null;if(s&&n){if(a=compare$1(s.semver,n.semver,r),a>0)return null;if(0===a&&(">="!==s.operator||"<="!==n.operator))return null}for(const e of i){if(s&&!satisfies$1(e,String(s),r))return null;if(n&&!satisfies$1(e,String(n),r))return null;for(const i of t)if(!satisfies$1(e,String(i),r))return!1;return!0}let c=!(!n||r.includePrerelease||!n.semver.prerelease.length)&&n.semver,u=!(!s||r.includePrerelease||!s.semver.prerelease.length)&&s.semver;c&&1===c.prerelease.length&&"<"===n.operator&&0===c.prerelease[0]&&(c=!1);for(const e of t){if(p=p||">"===e.operator||">="===e.operator,h=h||"<"===e.operator||"<="===e.operator,s)if(u&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===u.major&&e.semver.minor===u.minor&&e.semver.patch===u.patch&&(u=!1),">"===e.operator||">="===e.operator){if(o=higherGT(s,e,r),o===e&&o!==s)return!1}else if(">="===s.operator&&!satisfies$1(s.semver,String(e),r))return!1;if(n)if(c&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===c.major&&e.semver.minor===c.minor&&e.semver.patch===c.patch&&(c=!1),"<"===e.operator||"<="===e.operator){if(l=lowerLT(n,e,r),l===e&&l!==n)return!1}else if("<="===n.operator&&!satisfies$1(n.semver,String(e),r))return!1;if(!e.operator&&(n||s)&&0!==a)return!1}return!(s&&h&&!n&&0!==a)&&(!(n&&p&&!s&&0!==a)&&(!u&&!c))},higherGT=(e,t,r)=>{if(!e)return t;const i=compare$1(e.semver,t.semver,r);return i>0?e:i<0||">"===t.operator&&">="===e.operator?t:e},lowerLT=(e,t,r)=>{if(!e)return t;const i=compare$1(e.semver,t.semver,r);return i<0?e:i>0||"<"===t.operator&&"<="===e.operator?t:e};var subset_1=subset$1;const internalRe=re$4.exports,constants=constants$1,SemVer=semver$1,identifiers=identifiers$1,parse=parse_1,valid=valid_1,clean=clean_1,inc=inc_1,diff=diff_1,major=major_1,minor=minor_1,patch=patch_1,prerelease=prerelease_1,compare=compare_1,rcompare=rcompare_1,compareLoose=compareLoose_1,compareBuild=compareBuild_1,sort=sort_1,rsort=rsort_1,gt=gt_1,lt=lt_1,eq=eq_1,neq=neq_1,gte=gte_1,lte=lte_1,cmp=cmp_1,coerce=coerce_1,Comparator=comparator,Range=range,satisfies=satisfies_1,toComparators=toComparators_1,maxSatisfying=maxSatisfying_1,minSatisfying=minSatisfying_1,minVersion=minVersion_1,validRange=valid$1,outside=outside_1,gtr=gtr_1,ltr=ltr_1,intersects=intersects_1,simplifyRange=simplify,subset=subset_1;var semver={parse:parse,valid:valid,clean:clean,inc:inc,diff:diff,major:major,minor:minor,patch:patch,prerelease:prerelease,compare:compare,rcompare:rcompare,compareLoose:compareLoose,compareBuild:compareBuild,sort:sort,rsort:rsort,gt:gt,lt:lt,eq:eq,neq:neq,gte:gte,lte:lte,cmp:cmp,coerce:coerce,Comparator:Comparator,Range:Range,satisfies:satisfies,toComparators:toComparators,maxSatisfying:maxSatisfying,minSatisfying:minSatisfying,minVersion:minVersion,validRange:validRange,outside:outside,gtr:gtr,ltr:ltr,intersects:intersects,simplifyRange:simplifyRange,subset:subset,SemVer:SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants.SEMVER_SPEC_VERSION,RELEASE_TYPES:constants.RELEASE_TYPES,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers},preload=semver;const pdfApplicationCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{display:block}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.m-4{margin:1rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfApplicationStyle0=pdfApplicationCss,PdfApplication=class{constructor(e){index.registerInstance(this,e),this.apiError=index.createEvent(this,"apiError",7),this.sessionService=new ApiClient.SessionService,this.fileService=new FileService.FileService,this.logger=ApiClient.createLogger("PdfApplication"),this.apiErrorHandler=e=>{this.apiError?this.apiError.emit(e):console.error("Unhandled API error",e)},this.authenticated=new ApiClient.ApiLoading,this.versionInfo=new ApiClient.ApiLoading,this.publickey=void 0,this.privatekey=void 0,this.apiBaseUrl=void 0,this.sessionsurl=void 0}async getAbout(){var e,t,r;this.logger.debug("Get diagnostics");const i=null!==(e=this.versionInfo)&&void 0!==e?e:await this.sessionService.getVersion();return{npmVersion:LIB_VERSION,apiBaseUrl:ApiClient.state.apiBaseUrl,publicKey:ApiClient.state.publicKey,apiVersion:i.error?`error: ${i.error.code} - ${i.error.message}`:null!==(r=null===(t=i.value)||void 0===t?void 0:t.apiVersion)&&void 0!==r?r:"error: could not read api version"}}async getDocuments(){this.logger.debug("Get documents");return(await this.fileService.getDocuments()).value||[]}async deleteDocument(e){this.logger.debug("Delete single document"),await this.fileService.deleteDocuments([e])}async deleteDocuments(e){this.logger.debug("Delete multiple document"),await this.fileService.deleteDocuments(e)}async createDocument(e,t,r){return this.logger.debug("Create new document"),await this.fileService.createDocument(e,t,null!=r?r:null)}async componentWillLoad(){this.logger.debug("Starting..."),this.configure(),await this.versionCheck(),await this.login(),this.authenticated.value&&await this.loadStandardFonts()}componentDidLoad(){this.logger.debug("Started")}disconnectedCallback(){this.sessionService.onUnmounted()}configure(){ApiClient.state.apiBaseUrl=this.apiBaseUrl||index.Env.API_BASE_URL,this.logger.debug(`apiBaseURL: ${ApiClient.state.apiBaseUrl}`),ApiClient.state.publicKey=this.publickey||index.Env.API_PUBLIC_KEY,ApiClient.state.privateKey=this.privatekey||index.Env.API_PRIVATE_KEY,this.sessionsurl&&(ApiClient.state.sessionsUrl=this.sessionsurl),ApiClient.state.apiErrorHandler=this.apiErrorHandler,this.sessionService.onMounted((e=>this.authenticated=e.map((e=>e>0))))}async versionCheck(){this.versionInfo=await this.sessionService.getVersion()}async login(){this.authenticated=(await this.sessionService.login()).map((e=>e>0))}async logout(){this.authenticated=await this.sessionService.logout()}async loadStandardFonts(){var e;this.logger.debug("Setting standard fonts");null===(e=(await this.fileService.getStandardFonts()).value)||void 0===e||e.forEach((async e=>{await insertFonts.addFontFace(e.fontId,e.fontData,document)}))}render(){if(this.authenticated.loading||this.versionInfo.loading)return index.h(index.Host,null,index.h("div",{class:"m-4"},"Loading..."));if(this.versionInfo.error)return index.h(index.Host,null,index.h("div",{class:"m-4"},index.h("h2",{class:"text-xl font-bold text-red-600"},"Api unavailable:"),index.h("div",{class:"text-red-600"},this.versionInfo.error.code," - ",this.versionInfo.error.message)));if(this.versionInfo.value&&(preload.lt(this.versionInfo.value.apiVersion,index.Env.API_MINIMUM_VERSION)||preload.lt(LIB_VERSION,this.versionInfo.value.minimumNpmPackageVersion))){let e=preload.lt(this.versionInfo.value.apiVersion,index.Env.API_MINIMUM_VERSION),t=preload.lt(LIB_VERSION,this.versionInfo.value.minimumNpmPackageVersion);return this.logger.error(e?`Api version ${this.versionInfo.value.apiVersion} is too low. Must be at least ${index.Env.API_MINIMUM_VERSION}.`:`Package version ${LIB_VERSION} is too low. Must be at least ${this.versionInfo.value.minimumNpmPackageVersion}.`),index.h(index.Host,null,index.h("div",{class:"m-4"},index.h("h2",{class:"text-xl font-bold text-red-600"},"Api and npm package version mismatch:"),index.h("div",{class:"text-red-600"},e&&index.h("span",null,"The version of the Api used is not supported. Current Api version: ",this.versionInfo.value.apiVersion,". Current version of this package requires at least version ",index.Env.API_MINIMUM_VERSION," of the Api."),t&&index.h("span",null,"This version of the npm package is no longer supported by the Api. You current version: ",LIB_VERSION,". Please upgrade to ",this.versionInfo.value.minimumNpmPackageVersion," or above."))))}return this.authenticated.error?index.h(index.Host,null,index.h("div",{class:"m-4"},index.h("h2",{class:"text-xl font-bold text-red-600"},"Error logging in:"),index.h("div",{class:"text-red-600"},this.authenticated.error.code," - ",this.authenticated.error.message))):void 0}};PdfApplication.style=PdfApplicationStyle0,exports.pdf_application=PdfApplication; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),documentStore=require("./documentStore-3ad3569b.js");require("./ApiClient-eb21273a.js"),require("./IPdfField-d920c3b2.js"),require("./FileService-af047eef.js");const pdfStoreWrapperCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.visible{visibility:visible}.max-h-\\[40rem\\]{max-height:40rem}.overflow-y-auto{overflow-y:auto}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.m-1{margin:.25rem}.ml-4{margin-left:1rem}.mt-4{margin-top:1rem}.table{display:table}.table-auto{table-layout:auto}.-translate-y-3{--tw-translate-y:-0.75rem}.-translate-y-3,.scale-150{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x:1.5;--tw-scale-y:1.5}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.font-bold{font-weight:700}.outline{outline-style:solid}.mb-4{margin-bottom:1rem}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.m-8{margin:2rem}.mb-2{margin-bottom:.5rem}.hidden{display:none}.rounded-xl{border-radius:.75rem}.border-4{border-width:4px}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.px-24{padding-left:6rem;padding-right:6rem}.py-12{padding-bottom:3rem;padding-top:3rem}.text-center{text-align:center}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.\\!bg-blue-700{--tw-bg-opacity:1!important;background-color:rgb(29 78 216/var(--tw-bg-opacity))!important}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.-mr-4{margin-right:-1rem}.ml-1{margin-left:.25rem}.mt-1{margin-top:.25rem}.h-16{height:4rem}.h-24{height:6rem}.w-0{width:0}.w-16{width:4rem}.cursor-move{cursor:move}.rounded{border-radius:.25rem}.pr-4{padding-right:1rem}.text-xs{font-size:.75rem;line-height:1rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}',PdfStoreWrapperStyle0=pdfStoreWrapperCss,PdfStoreWrapper=class{constructor(t){index.registerInstance(this,t),this.documentStore=null,this.viewerStore=null,this.setDocumentStore=()=>{this.documentStore||(this.documentStore=documentStore.ensureStore(this.pdfdoc)||null,this.documentStore&&this.documentStoreLoaded&&this.documentStoreLoaded(this.documentStore))},this.pdfdoc="default",this.pdfviewer="default",this.pageindex=-1,this.documentStoreLoaded=void 0,this.viewerStoreLoaded=void 0}componentDidLoad(){this.setDocumentStore(),this.setViewerStore(),documentStore.onChange("pdfReferences",(()=>{this.setDocumentStore()})),documentStore.onChange$1("stores",(()=>{this.setViewerStore()}))}setViewerStore(){this.viewerStore||(this.viewerStore=documentStore.ensureStore$1(this.pdfdoc,this.pdfviewer),this.viewerStore&&this.viewerStoreLoaded&&this.viewerStoreLoaded(this.viewerStore))}render(){return index.h(index.Host,{key:"6586487a8b82ea87152f7662d6c0d43beca31d10"},index.h("slot",{key:"f9603b68cf8d8ebd1c6204b6f9a4d835b7eb955d"}))}get el(){return index.getElement(this)}};PdfStoreWrapper.style=PdfStoreWrapperStyle0,exports.pdf_store_wrapper=PdfStoreWrapper; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),documentStore=require("./documentStore-3ad3569b.js");require("./ApiClient-eb21273a.js"),require("./IPdfField-d920c3b2.js"),require("./FileService-af047eef.js");const pdfStoreWrapperCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.visible{visibility:visible}.max-h-\\[40rem\\]{max-height:40rem}.overflow-y-auto{overflow-y:auto}.m-1{margin:.25rem}.ml-4{margin-left:1rem}.mt-4{margin-top:1rem}.table{display:table}.table-auto{table-layout:auto}.-translate-y-3{--tw-translate-y:-0.75rem}.-translate-y-3,.scale-150{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x:1.5;--tw-scale-y:1.5}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.font-bold{font-weight:700}.outline{outline-style:solid}.mb-4{margin-bottom:1rem}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.m-8{margin:2rem}.mb-2{margin-bottom:.5rem}.hidden{display:none}.rounded-xl{border-radius:.75rem}.border-4{border-width:4px}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.px-24{padding-left:6rem;padding-right:6rem}.py-12{padding-bottom:3rem;padding-top:3rem}.text-center{text-align:center}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.\\!bg-blue-700{--tw-bg-opacity:1!important;background-color:rgb(29 78 216/var(--tw-bg-opacity))!important}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.-mr-4{margin-right:-1rem}.ml-1{margin-left:.25rem}.mt-1{margin-top:.25rem}.h-16{height:4rem}.h-24{height:6rem}.w-0{width:0}.w-16{width:4rem}.cursor-move{cursor:move}.rounded{border-radius:.25rem}.pr-4{padding-right:1rem}.text-xs{font-size:.75rem;line-height:1rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}',PdfStoreWrapperStyle0=pdfStoreWrapperCss,PdfStoreWrapper=class{constructor(t){index.registerInstance(this,t),this.documentStore=null,this.viewerStore=null,this.setDocumentStore=()=>{this.documentStore||(this.documentStore=documentStore.ensureStore(this.pdfdoc)||null,this.documentStore&&this.documentStoreLoaded&&this.documentStoreLoaded(this.documentStore))},this.pdfdoc="default",this.pdfviewer="default",this.pageindex=-1,this.documentStoreLoaded=void 0,this.viewerStoreLoaded=void 0}componentDidLoad(){this.setDocumentStore(),this.setViewerStore(),documentStore.onChange("pdfReferences",(()=>{this.setDocumentStore()})),documentStore.onChange$1("stores",(()=>{this.setViewerStore()}))}setViewerStore(){this.viewerStore||(this.viewerStore=documentStore.ensureStore$1(this.pdfdoc,this.pdfviewer),this.viewerStore&&this.viewerStoreLoaded&&this.viewerStoreLoaded(this.viewerStore))}render(){return index.h(index.Host,{key:"6586487a8b82ea87152f7662d6c0d43beca31d10"},index.h("slot",{key:"f9603b68cf8d8ebd1c6204b6f9a4d835b7eb955d"}))}get el(){return index.getElement(this)}};PdfStoreWrapper.style=PdfStoreWrapperStyle0,exports.pdf_store_wrapper=PdfStoreWrapper; |
@@ -1,1 +0,1 @@ | ||
export const LIB_VERSION="1.2.12-e059e480"; | ||
export const LIB_VERSION="1.2.12-fe3b6350"; |
@@ -1,1 +0,1 @@ | ||
import{proxyCustomElement,HTMLElement,createEvent,Env,h,Host}from"@stencil/core/internal/client";import{S as SessionService,n as createLogger,a as ApiLoading,s as state}from"./ApiClient.js";import{F as FileService}from"./FileService.js";import{a as addFontFace}from"./insertFonts.js";const LIB_VERSION="1.2.12-e059e480";var re$4={exports:{}};const SEMVER_SPEC_VERSION="2.0.0",MAX_LENGTH$1=256,MAX_SAFE_INTEGER$1=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,MAX_SAFE_BUILD_LENGTH=250,RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var constants$1={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$1,RELEASE_TYPES:RELEASE_TYPES,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const debug$3="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var debug_1=debug$3;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:i}=constants$1,a=debug_1,o=(t=e.exports={}).re=[],n=t.safeRe=[],l=t.src=[],h=t.t={};let p=0;const c="[a-zA-Z0-9-]",u=[["\\s",1],["\\d",i],[c,s]],m=(e,t,r)=>{const s=(e=>{for(const[t,r]of u)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),i=p++;a(e,i,t),h[e]=i,l[i]=t,o[i]=new RegExp(t,r?"g":void 0),n[i]=new RegExp(s,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${c}*`),m("MAINVERSION",`(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${l[h.NUMERICIDENTIFIER]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${l[h.NUMERICIDENTIFIERLOOSE]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASE",`(?:-(${l[h.PRERELEASEIDENTIFIER]}(?:\\.${l[h.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${l[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[h.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${c}+`),m("BUILD",`(?:\\+(${l[h.BUILDIDENTIFIER]}(?:\\.${l[h.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${l[h.MAINVERSION]}${l[h.PRERELEASE]}?${l[h.BUILD]}?`),m("FULL",`^${l[h.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${l[h.MAINVERSIONLOOSE]}${l[h.PRERELEASELOOSE]}?${l[h.BUILD]}?`),m("LOOSE",`^${l[h.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${l[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${l[h.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:${l[h.PRERELEASE]})?${l[h.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:${l[h.PRERELEASELOOSE]})?${l[h.BUILD]}?)?)?`),m("XRANGE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),m("COERCE",`${l[h.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",l[h.COERCEPLAIN]+`(?:${l[h.PRERELEASE]})?`+`(?:${l[h.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",l[h.COERCE],!0),m("COERCERTLFULL",l[h.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${l[h.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${l[h.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${l[h.LONECARET]}${l[h.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${l[h.LONECARET]}${l[h.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${l[h.GTLT]}\\s*(${l[h.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]}|${l[h.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${l[h.XRANGEPLAIN]})\\s+-\\s+(${l[h.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${l[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[h.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(re$4,re$4.exports);const looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({}),parseOptions$3=e=>e?"object"!=typeof e?looseOption:e:emptyOpts;var parseOptions_1=parseOptions$3;const numeric=/^[0-9]+$/,compareIdentifiers$1=(e,t)=>{const r=numeric.test(e),s=numeric.test(t);return r&&s&&(e=+e,t=+t),e===t?0:r&&!s?-1:s&&!r?1:e<t?-1:1},rcompareIdentifiers=(e,t)=>compareIdentifiers$1(t,e);var identifiers$1={compareIdentifiers:compareIdentifiers$1,rcompareIdentifiers:rcompareIdentifiers};const debug$2=debug_1,{MAX_LENGTH:MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER}=constants$1,{safeRe:re$3,t:t$3}=re$4.exports,parseOptions$2=parseOptions_1,{compareIdentifiers:compareIdentifiers}=identifiers$1;class SemVer$f{constructor(e,t){if(t=parseOptions$2(t),e instanceof SemVer$f){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug$2("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?re$3[t$3.LOOSE]:re$3[t$3.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>MAX_SAFE_INTEGER||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<MAX_SAFE_INTEGER)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(debug$2("SemVer.compare",this.version,this.options,e),!(e instanceof SemVer$f)){if("string"==typeof e&&e===this.version)return 0;e=new SemVer$f(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),compareIdentifiers(this.major,e.major)||compareIdentifiers(this.minor,e.minor)||compareIdentifiers(this.patch,e.patch)}comparePre(e){if(e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],s=e.prerelease[t];if(debug$2("prerelease compare",t,r,s),void 0===r&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===r)return-1;if(r!==s)return compareIdentifiers(r,s)}while(++t)}compareBuild(e){e instanceof SemVer$f||(e=new SemVer$f(e,this.options));let t=0;do{const r=this.build[t],s=e.build[t];if(debug$2("prerelease compare",t,r,s),void 0===r&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===r)return-1;if(r!==s)return compareIdentifiers(r,s)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let s=this.prerelease.length;for(;--s>=0;)"number"==typeof this.prerelease[s]&&(this.prerelease[s]++,s=-2);if(-1===s){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let s=[t,e];!1===r&&(s=[t]),0===compareIdentifiers(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}var semver$1=SemVer$f;const SemVer$e=semver$1,parse$6=(e,t,r=!1)=>{if(e instanceof SemVer$e)return e;try{return new SemVer$e(e,t)}catch(e){if(!r)return null;throw e}};var parse_1=parse$6;const parse$5=parse_1,valid$2=(e,t)=>{const r=parse$5(e,t);return r?r.version:null};var valid_1=valid$2;const parse$4=parse_1,clean$1=(e,t)=>{const r=parse$4(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var clean_1=clean$1;const SemVer$d=semver$1,inc$1=(e,t,r,s,i)=>{"string"==typeof r&&(i=s,s=r,r=void 0);try{return new SemVer$d(e instanceof SemVer$d?e.version:e,r).inc(t,s,i).version}catch(e){return null}};var inc_1=inc$1;const parse$3=parse_1,diff$1=(e,t)=>{const r=parse$3(e,null,!0),s=parse$3(t,null,!0),i=r.compare(s);if(0===i)return null;const a=i>0,o=a?r:s,n=a?s:r,l=!!o.prerelease.length;if(!!n.prerelease.length&&!l)return n.patch||n.minor?o.patch?"patch":o.minor?"minor":"major":"major";const h=l?"pre":"";return r.major!==s.major?h+"major":r.minor!==s.minor?h+"minor":r.patch!==s.patch?h+"patch":"prerelease"};var diff_1=diff$1;const SemVer$c=semver$1,major$1=(e,t)=>new SemVer$c(e,t).major;var major_1=major$1;const SemVer$b=semver$1,minor$1=(e,t)=>new SemVer$b(e,t).minor;var minor_1=minor$1;const SemVer$a=semver$1,patch$1=(e,t)=>new SemVer$a(e,t).patch;var patch_1=patch$1;const parse$2=parse_1,prerelease$1=(e,t)=>{const r=parse$2(e,t);return r&&r.prerelease.length?r.prerelease:null};var prerelease_1=prerelease$1;const SemVer$9=semver$1,compare$b=(e,t,r)=>new SemVer$9(e,r).compare(new SemVer$9(t,r));var compare_1=compare$b;const compare$a=compare_1,rcompare$1=(e,t,r)=>compare$a(t,e,r);var rcompare_1=rcompare$1;const compare$9=compare_1,compareLoose$1=(e,t)=>compare$9(e,t,!0);var compareLoose_1=compareLoose$1;const SemVer$8=semver$1,compareBuild$3=(e,t,r)=>{const s=new SemVer$8(e,r),i=new SemVer$8(t,r);return s.compare(i)||s.compareBuild(i)};var compareBuild_1=compareBuild$3;const compareBuild$2=compareBuild_1,sort$1=(e,t)=>e.sort(((e,r)=>compareBuild$2(e,r,t)));var sort_1=sort$1;const compareBuild$1=compareBuild_1,rsort$1=(e,t)=>e.sort(((e,r)=>compareBuild$1(r,e,t)));var rsort_1=rsort$1;const compare$8=compare_1,gt$4=(e,t,r)=>compare$8(e,t,r)>0;var gt_1=gt$4;const compare$7=compare_1,lt$3=(e,t,r)=>compare$7(e,t,r)<0;var lt_1=lt$3;const compare$6=compare_1,eq$2=(e,t,r)=>0===compare$6(e,t,r);var eq_1=eq$2;const compare$5=compare_1,neq$2=(e,t,r)=>0!==compare$5(e,t,r);var neq_1=neq$2;const compare$4=compare_1,gte$3=(e,t,r)=>compare$4(e,t,r)>=0;var gte_1=gte$3;const compare$3=compare_1,lte$3=(e,t,r)=>compare$3(e,t,r)<=0;var lte_1=lte$3;const eq$1=eq_1,neq$1=neq_1,gt$3=gt_1,gte$2=gte_1,lt$2=lt_1,lte$2=lte_1,cmp$2=(e,t,r,s)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return eq$1(e,r,s);case"!=":return neq$1(e,r,s);case">":return gt$3(e,r,s);case">=":return gte$2(e,r,s);case"<":return lt$2(e,r,s);case"<=":return lte$2(e,r,s);default:throw new TypeError(`Invalid operator: ${t}`)}};var cmp_1=cmp$2;const SemVer$7=semver$1,parse$1=parse_1,{safeRe:re$2,t:t$2}=re$4.exports,coerce$1=(e,t)=>{if(e instanceof SemVer$7)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const s=t.includePrerelease?re$2[t$2.COERCERTLFULL]:re$2[t$2.COERCERTL];let i;for(;(i=s.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),s.lastIndex=i.index+i[1].length+i[2].length;s.lastIndex=-1}else r=e.match(t.includePrerelease?re$2[t$2.COERCEFULL]:re$2[t$2.COERCE]);if(null===r)return null;const s=r[2],i=r[3]||"0",a=r[4]||"0",o=t.includePrerelease&&r[5]?`-${r[5]}`:"",n=t.includePrerelease&&r[6]?`+${r[6]}`:"";return parse$1(`${s}.${i}.${a}${o}${n}`,t)};var coerce_1=coerce$1,yallist=Yallist$1;function Yallist$1(e){var t=this;if(t instanceof Yallist$1||(t=new Yallist$1),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)t.push(arguments[r]);return t}function insert(e,t,r){var s=t===e.head?new Node(r,null,t,e):new Node(r,t,t.next,e);return null===s.next&&(e.tail=s),null===s.prev&&(e.head=s),e.length++,s}function push(e,t){e.tail=new Node(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Node(e,t,r,s){if(!(this instanceof Node))return new Node(e,t,r,s);this.list=s,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}Yallist$1.Node=Node,Yallist$1.create=Yallist$1,Yallist$1.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},Yallist$1.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},Yallist$1.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},Yallist$1.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)push(this,arguments[e]);return this.length},Yallist$1.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)unshift(this,arguments[e]);return this.length},Yallist$1.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},Yallist$1.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},Yallist$1.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,s=0;null!==r;s++)e.call(t,r.value,s,this),r=r.next},Yallist$1.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,s=this.length-1;null!==r;s--)e.call(t,r.value,s,this),r=r.prev},Yallist$1.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},Yallist$1.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},Yallist$1.prototype.map=function(e,t){t=t||this;for(var r=new Yallist$1,s=this.head;null!==s;)r.push(e.call(t,s.value,this)),s=s.next;return r},Yallist$1.prototype.mapReverse=function(e,t){t=t||this;for(var r=new Yallist$1,s=this.tail;null!==s;)r.push(e.call(t,s.value,this)),s=s.prev;return r},Yallist$1.prototype.reduce=function(e,t){var r,s=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");s=this.head.next,r=this.head.value}for(var i=0;null!==s;i++)r=e(r,s.value,i),s=s.next;return r},Yallist$1.prototype.reduceReverse=function(e,t){var r,s=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");s=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==s;i--)r=e(r,s.value,i),s=s.prev;return r},Yallist$1.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},Yallist$1.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},Yallist$1.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;for(;null!==i&&s<t;s++,i=i.next)r.push(i.value);return r},Yallist$1.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=this.length,i=this.tail;null!==i&&s>t;s--)i=i.prev;for(;null!==i&&s>e;s--,i=i.prev)r.push(i.value);return r},Yallist$1.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;var a=[];for(s=0;i&&s<t;s++)a.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(s=0;s<r.length;s++)i=insert(this,i,r[s]);return a},Yallist$1.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var s=r.prev;r.prev=r.next,r.next=s}return this.head=t,this.tail=e,this};try{require("./iterator.js")(Yallist$1)}catch(e){}const Yallist=yallist,MAX=Symbol("max"),LENGTH=Symbol("length"),LENGTH_CALCULATOR=Symbol("lengthCalculator"),ALLOW_STALE=Symbol("allowStale"),MAX_AGE=Symbol("maxAge"),DISPOSE=Symbol("dispose"),NO_DISPOSE_ON_SET=Symbol("noDisposeOnSet"),LRU_LIST=Symbol("lruList"),CACHE=Symbol("cache"),UPDATE_AGE_ON_GET=Symbol("updateAgeOnGet"),naiveLength=()=>1;class LRUCache{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[MAX]=e.max||1/0;const t=e.length||naiveLength;if(this[LENGTH_CALCULATOR]="function"!=typeof t?naiveLength:t,this[ALLOW_STALE]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[MAX_AGE]=e.maxAge||0,this[DISPOSE]=e.dispose,this[NO_DISPOSE_ON_SET]=e.noDisposeOnSet||!1,this[UPDATE_AGE_ON_GET]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[MAX]=e||1/0,trim(this)}get max(){return this[MAX]}set allowStale(e){this[ALLOW_STALE]=!!e}get allowStale(){return this[ALLOW_STALE]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[MAX_AGE]=e,trim(this)}get maxAge(){return this[MAX_AGE]}set lengthCalculator(e){"function"!=typeof e&&(e=naiveLength),e!==this[LENGTH_CALCULATOR]&&(this[LENGTH_CALCULATOR]=e,this[LENGTH]=0,this[LRU_LIST].forEach((e=>{e.length=this[LENGTH_CALCULATOR](e.value,e.key),this[LENGTH]+=e.length}))),trim(this)}get lengthCalculator(){return this[LENGTH_CALCULATOR]}get length(){return this[LENGTH]}get itemCount(){return this[LRU_LIST].length}rforEach(e,t){t=t||this;for(let r=this[LRU_LIST].tail;null!==r;){const s=r.prev;forEachStep(this,e,r,t),r=s}}forEach(e,t){t=t||this;for(let r=this[LRU_LIST].head;null!==r;){const s=r.next;forEachStep(this,e,r,t),r=s}}keys(){return this[LRU_LIST].toArray().map((e=>e.key))}values(){return this[LRU_LIST].toArray().map((e=>e.value))}reset(){this[DISPOSE]&&this[LRU_LIST]&&this[LRU_LIST].length&&this[LRU_LIST].forEach((e=>this[DISPOSE](e.key,e.value))),this[CACHE]=new Map,this[LRU_LIST]=new Yallist,this[LENGTH]=0}dump(){return this[LRU_LIST].map((e=>!isStale(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[LRU_LIST]}set(e,t,r){if((r=r||this[MAX_AGE])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const s=r?Date.now():0,i=this[LENGTH_CALCULATOR](t,e);if(this[CACHE].has(e)){if(i>this[MAX])return del(this,this[CACHE].get(e)),!1;const a=this[CACHE].get(e).value;return this[DISPOSE]&&(this[NO_DISPOSE_ON_SET]||this[DISPOSE](e,a.value)),a.now=s,a.maxAge=r,a.value=t,this[LENGTH]+=i-a.length,a.length=i,this.get(e),trim(this),!0}const a=new Entry(e,t,i,s,r);return a.length>this[MAX]?(this[DISPOSE]&&this[DISPOSE](e,t),!1):(this[LENGTH]+=a.length,this[LRU_LIST].unshift(a),this[CACHE].set(e,this[LRU_LIST].head),trim(this),!0)}has(e){if(!this[CACHE].has(e))return!1;const t=this[CACHE].get(e).value;return!isStale(this,t)}get(e){return get(this,e,!0)}peek(e){return get(this,e,!1)}pop(){const e=this[LRU_LIST].tail;return e?(del(this,e),e.value):null}del(e){del(this,this[CACHE].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r],i=s.e||0;if(0===i)this.set(s.k,s.v);else{const e=i-t;e>0&&this.set(s.k,s.v,e)}}}prune(){this[CACHE].forEach(((e,t)=>get(this,t,!1)))}}const get=(e,t,r)=>{const s=e[CACHE].get(t);if(s){const t=s.value;if(isStale(e,t)){if(del(e,s),!e[ALLOW_STALE])return}else r&&(e[UPDATE_AGE_ON_GET]&&(s.value.now=Date.now()),e[LRU_LIST].unshiftNode(s));return t.value}},isStale=(e,t)=>{if(!t||!t.maxAge&&!e[MAX_AGE])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[MAX_AGE]&&r>e[MAX_AGE]},trim=e=>{if(e[LENGTH]>e[MAX])for(let t=e[LRU_LIST].tail;e[LENGTH]>e[MAX]&&null!==t;){const r=t.prev;del(e,t),t=r}},del=(e,t)=>{if(t){const r=t.value;e[DISPOSE]&&e[DISPOSE](r.key,r.value),e[LENGTH]-=r.length,e[CACHE].delete(r.key),e[LRU_LIST].removeNode(t)}};class Entry{constructor(e,t,r,s,i){this.key=e,this.value=t,this.length=r,this.now=s,this.maxAge=i||0}}const forEachStep=(e,t,r,s)=>{let i=r.value;isStale(e,i)&&(del(e,r),e[ALLOW_STALE]||(i=void 0)),i&&t.call(s,i.value,i.key,e)};var lruCache=LRUCache;class Range$b{constructor(e,t){if(t=parseOptions$1(t),e instanceof Range$b)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Range$b(e.raw,t);if(e instanceof Comparator$4)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!isNullSet(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&isAny(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&FLAG_INCLUDE_PRERELEASE)|(this.options.loose&&FLAG_LOOSE))+":"+e,r=cache.get(t);if(r)return r;const s=this.options.loose,i=s?re$1[t$1.HYPHENRANGELOOSE]:re$1[t$1.HYPHENRANGE];e=e.replace(i,hyphenReplace(this.options.includePrerelease)),debug$1("hyphen replace",e),e=e.replace(re$1[t$1.COMPARATORTRIM],comparatorTrimReplace),debug$1("comparator trim",e),e=e.replace(re$1[t$1.TILDETRIM],tildeTrimReplace),debug$1("tilde trim",e),e=e.replace(re$1[t$1.CARETTRIM],caretTrimReplace),debug$1("caret trim",e);let a=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));s&&(a=a.filter((e=>(debug$1("loose invalid filter",e,this.options),!!e.match(re$1[t$1.COMPARATORLOOSE]))))),debug$1("range list",a);const o=new Map,n=a.map((e=>new Comparator$4(e,this.options)));for(const e of n){if(isNullSet(e))return[e];o.set(e.value,e)}o.size>1&&o.has("")&&o.delete("");const l=[...o.values()];return cache.set(t,l),l}intersects(e,t){if(!(e instanceof Range$b))throw new TypeError("a Range is required");return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new SemVer$6(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(testSet(this.set[t],e,this.options))return!0;return!1}}var range=Range$b;const LRU=lruCache,cache=new LRU({max:1e3}),parseOptions$1=parseOptions_1,Comparator$4=comparator,debug$1=debug_1,SemVer$6=semver$1,{safeRe:re$1,t:t$1,comparatorTrimReplace:comparatorTrimReplace,tildeTrimReplace:tildeTrimReplace,caretTrimReplace:caretTrimReplace}=re$4.exports,{FLAG_INCLUDE_PRERELEASE:FLAG_INCLUDE_PRERELEASE,FLAG_LOOSE:FLAG_LOOSE}=constants$1,isNullSet=e=>"<0.0.0-0"===e.value,isAny=e=>""===e.value,isSatisfiable=(e,t)=>{let r=!0;const s=e.slice();let i=s.pop();for(;r&&s.length;)r=s.every((e=>i.intersects(e,t))),i=s.pop();return r},parseComparator=(e,t)=>(debug$1("comp",e,t),e=replaceCarets(e,t),debug$1("caret",e),e=replaceTildes(e,t),debug$1("tildes",e),e=replaceXRanges(e,t),debug$1("xrange",e),e=replaceStars(e,t),debug$1("stars",e),e),isX=e=>!e||"x"===e.toLowerCase()||"*"===e,replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" "),replaceTilde=(e,t)=>{const r=t.loose?re$1[t$1.TILDELOOSE]:re$1[t$1.TILDE];return e.replace(r,((t,r,s,i,a)=>{let o;return debug$1("tilde",e,t,r,s,i,a),isX(r)?o="":isX(s)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:isX(i)?o=`>=${r}.${s}.0 <${r}.${+s+1}.0-0`:a?(debug$1("replaceTilde pr",a),o=`>=${r}.${s}.${i}-${a} <${r}.${+s+1}.0-0`):o=`>=${r}.${s}.${i} <${r}.${+s+1}.0-0`,debug$1("tilde return",o),o}))},replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" "),replaceCaret=(e,t)=>{debug$1("caret",e,t);const r=t.loose?re$1[t$1.CARETLOOSE]:re$1[t$1.CARET],s=t.includePrerelease?"-0":"";return e.replace(r,((t,r,i,a,o)=>{let n;return debug$1("caret",e,t,r,i,a,o),isX(r)?n="":isX(i)?n=`>=${r}.0.0${s} <${+r+1}.0.0-0`:isX(a)?n="0"===r?`>=${r}.${i}.0${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${s} <${+r+1}.0.0-0`:o?(debug$1("replaceCaret pr",o),n="0"===r?"0"===i?`>=${r}.${i}.${a}-${o} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}-${o} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a}-${o} <${+r+1}.0.0-0`):(debug$1("no pr"),n="0"===r?"0"===i?`>=${r}.${i}.${a}${s} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a} <${+r+1}.0.0-0`),debug$1("caret return",n),n}))},replaceXRanges=(e,t)=>(debug$1("replaceXRanges",e,t),e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")),replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?re$1[t$1.XRANGELOOSE]:re$1[t$1.XRANGE];return e.replace(r,((r,s,i,a,o,n)=>{debug$1("xRange",e,r,s,i,a,o,n);const l=isX(i),h=l||isX(a),p=h||isX(o),c=p;return"="===s&&c&&(s=""),n=t.includePrerelease?"-0":"",l?r=">"===s||"<"===s?"<0.0.0-0":"*":s&&c?(h&&(a=0),o=0,">"===s?(s=">=",h?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===s&&(s="<",h?i=+i+1:a=+a+1),"<"===s&&(n="-0"),r=`${s+i}.${a}.${o}${n}`):h?r=`>=${i}.0.0${n} <${+i+1}.0.0-0`:p&&(r=`>=${i}.${a}.0${n} <${i}.${+a+1}.0-0`),debug$1("xRange return",r),r}))},replaceStars=(e,t)=>(debug$1("replaceStars",e,t),e.trim().replace(re$1[t$1.STAR],"")),replaceGTE0=(e,t)=>(debug$1("replaceGTE0",e,t),e.trim().replace(re$1[t.includePrerelease?t$1.GTE0PRE:t$1.GTE0],"")),hyphenReplace=e=>(t,r,s,i,a,o,n,l,h,p,c,u,m)=>`${r=isX(s)?"":isX(i)?`>=${s}.0.0${e?"-0":""}`:isX(a)?`>=${s}.${i}.0${e?"-0":""}`:o?`>=${r}`:`>=${r}${e?"-0":""}`} ${l=isX(h)?"":isX(p)?`<${+h+1}.0.0-0`:isX(c)?`<${h}.${+p+1}.0-0`:u?`<=${h}.${p}.${c}-${u}`:e?`<${h}.${p}.${+c+1}-0`:`<=${l}`}`.trim(),testSet=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(debug$1(e[r].semver),e[r].semver!==Comparator$4.ANY&&e[r].semver.prerelease.length>0){const s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0},ANY$2=Symbol("SemVer ANY");class Comparator$3{static get ANY(){return ANY$2}constructor(e,t){if(t=parseOptions(t),e instanceof Comparator$3){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),debug("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ANY$2?this.value="":this.value=this.operator+this.semver.version,debug("comp",this)}parse(e){const r=this.options.loose?re[t.COMPARATORLOOSE]:re[t.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==s[1]?s[1]:"","="===this.operator&&(this.operator=""),s[2]?this.semver=new SemVer$5(s[2],this.options.loose):this.semver=ANY$2}toString(){return this.value}test(e){if(debug("Comparator.test",e,this.options.loose),this.semver===ANY$2||e===ANY$2)return!0;if("string"==typeof e)try{e=new SemVer$5(e,this.options)}catch(e){return!1}return cmp$1(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator$3))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new Range$a(e.value,t).test(this.value):""===e.operator?""===e.value||new Range$a(this.value,t).test(e.semver):(!(t=parseOptions(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(cmp$1(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(cmp$1(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}var comparator=Comparator$3;const parseOptions=parseOptions_1,{safeRe:re,t:t}=re$4.exports,cmp$1=cmp_1,debug=debug_1,SemVer$5=semver$1,Range$a=range,Range$9=range,satisfies$4=(e,t,r)=>{try{t=new Range$9(t,r)}catch(e){return!1}return t.test(e)};var satisfies_1=satisfies$4;const Range$8=range,toComparators$1=(e,t)=>new Range$8(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));var toComparators_1=toComparators$1;const SemVer$4=semver$1,Range$7=range,maxSatisfying$1=(e,t,r)=>{let s=null,i=null,a=null;try{a=new Range$7(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&-1!==i.compare(e)||(s=e,i=new SemVer$4(s,r)))})),s};var maxSatisfying_1=maxSatisfying$1;const SemVer$3=semver$1,Range$6=range,minSatisfying$1=(e,t,r)=>{let s=null,i=null,a=null;try{a=new Range$6(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&1!==i.compare(e)||(s=e,i=new SemVer$3(s,r)))})),s};var minSatisfying_1=minSatisfying$1;const SemVer$2=semver$1,Range$5=range,gt$2=gt_1,minVersion$1=(e,t)=>{e=new Range$5(e,t);let r=new SemVer$2("0.0.0");if(e.test(r))return r;if(r=new SemVer$2("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const s=e.set[t];let i=null;s.forEach((e=>{const t=new SemVer$2(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!gt$2(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||r&&!gt$2(r,i)||(r=i)}return r&&e.test(r)?r:null};var minVersion_1=minVersion$1;const Range$4=range,validRange$1=(e,t)=>{try{return new Range$4(e,t).range||"*"}catch(e){return null}};var valid$1=validRange$1;const SemVer$1=semver$1,Comparator$2=comparator,{ANY:ANY$1}=Comparator$2,Range$3=range,satisfies$3=satisfies_1,gt$1=gt_1,lt$1=lt_1,lte$1=lte_1,gte$1=gte_1,outside$3=(e,t,r,s)=>{let i,a,o,n,l;switch(e=new SemVer$1(e,s),t=new Range$3(t,s),r){case">":i=gt$1,a=lte$1,o=lt$1,n=">",l=">=";break;case"<":i=lt$1,a=gte$1,o=gt$1,n="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies$3(e,t,s))return!1;for(let r=0;r<t.set.length;++r){const h=t.set[r];let p=null,c=null;if(h.forEach((e=>{e.semver===ANY$1&&(e=new Comparator$2(">=0.0.0")),p=p||e,c=c||e,i(e.semver,p.semver,s)?p=e:o(e.semver,c.semver,s)&&(c=e)})),p.operator===n||p.operator===l)return!1;if((!c.operator||c.operator===n)&&a(e,c.semver))return!1;if(c.operator===l&&o(e,c.semver))return!1}return!0};var outside_1=outside$3;const outside$2=outside_1,gtr$1=(e,t,r)=>outside$2(e,t,">",r);var gtr_1=gtr$1;const outside$1=outside_1,ltr$1=(e,t,r)=>outside$1(e,t,"<",r);var ltr_1=ltr$1;const Range$2=range,intersects$1=(e,t,r)=>(e=new Range$2(e,r),t=new Range$2(t,r),e.intersects(t,r));var intersects_1=intersects$1;const satisfies$2=satisfies_1,compare$2=compare_1;var simplify=(e,t,r)=>{const s=[];let i=null,a=null;const o=e.sort(((e,t)=>compare$2(e,t,r)));for(const e of o){satisfies$2(e,t,r)?(a=e,i||(i=e)):(a&&s.push([i,a]),a=null,i=null)}i&&s.push([i,null]);const n=[];for(const[e,t]of s)e===t?n.push(e):t||e!==o[0]?t?e===o[0]?n.push(`<=${t}`):n.push(`${e} - ${t}`):n.push(`>=${e}`):n.push("*");const l=n.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return l.length<h.length?l:t};const Range$1=range,Comparator$1=comparator,{ANY:ANY}=Comparator$1,satisfies$1=satisfies_1,compare$1=compare_1,subset$1=(e,t,r={})=>{if(e===t)return!0;e=new Range$1(e,r),t=new Range$1(t,r);let s=!1;e:for(const i of e.set){for(const e of t.set){const t=simpleSubset(i,e,r);if(s=s||null!==t,t)continue e}if(s)return!1}return!0},minimumVersionWithPreRelease=[new Comparator$1(">=0.0.0-0")],minimumVersion=[new Comparator$1(">=0.0.0")],simpleSubset=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===ANY){if(1===t.length&&t[0].semver===ANY)return!0;e=r.includePrerelease?minimumVersionWithPreRelease:minimumVersion}if(1===t.length&&t[0].semver===ANY){if(r.includePrerelease)return!0;t=minimumVersion}const s=new Set;let i,a,o,n,l,h,p;for(const t of e)">"===t.operator||">="===t.operator?i=higherGT(i,t,r):"<"===t.operator||"<="===t.operator?a=lowerLT(a,t,r):s.add(t.semver);if(s.size>1)return null;if(i&&a){if(o=compare$1(i.semver,a.semver,r),o>0)return null;if(0===o&&(">="!==i.operator||"<="!==a.operator))return null}for(const e of s){if(i&&!satisfies$1(e,String(i),r))return null;if(a&&!satisfies$1(e,String(a),r))return null;for(const s of t)if(!satisfies$1(e,String(s),r))return!1;return!0}let c=!(!a||r.includePrerelease||!a.semver.prerelease.length)&&a.semver,u=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;c&&1===c.prerelease.length&&"<"===a.operator&&0===c.prerelease[0]&&(c=!1);for(const e of t){if(p=p||">"===e.operator||">="===e.operator,h=h||"<"===e.operator||"<="===e.operator,i)if(u&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===u.major&&e.semver.minor===u.minor&&e.semver.patch===u.patch&&(u=!1),">"===e.operator||">="===e.operator){if(n=higherGT(i,e,r),n===e&&n!==i)return!1}else if(">="===i.operator&&!satisfies$1(i.semver,String(e),r))return!1;if(a)if(c&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===c.major&&e.semver.minor===c.minor&&e.semver.patch===c.patch&&(c=!1),"<"===e.operator||"<="===e.operator){if(l=lowerLT(a,e,r),l===e&&l!==a)return!1}else if("<="===a.operator&&!satisfies$1(a.semver,String(e),r))return!1;if(!e.operator&&(a||i)&&0!==o)return!1}return!(i&&h&&!a&&0!==o)&&(!(a&&p&&!i&&0!==o)&&(!u&&!c))},higherGT=(e,t,r)=>{if(!e)return t;const s=compare$1(e.semver,t.semver,r);return s>0?e:s<0||">"===t.operator&&">="===e.operator?t:e},lowerLT=(e,t,r)=>{if(!e)return t;const s=compare$1(e.semver,t.semver,r);return s<0?e:s>0||"<"===t.operator&&"<="===e.operator?t:e};var subset_1=subset$1;const internalRe=re$4.exports,constants=constants$1,SemVer=semver$1,identifiers=identifiers$1,parse=parse_1,valid=valid_1,clean=clean_1,inc=inc_1,diff=diff_1,major=major_1,minor=minor_1,patch=patch_1,prerelease=prerelease_1,compare=compare_1,rcompare=rcompare_1,compareLoose=compareLoose_1,compareBuild=compareBuild_1,sort=sort_1,rsort=rsort_1,gt=gt_1,lt=lt_1,eq=eq_1,neq=neq_1,gte=gte_1,lte=lte_1,cmp=cmp_1,coerce=coerce_1,Comparator=comparator,Range=range,satisfies=satisfies_1,toComparators=toComparators_1,maxSatisfying=maxSatisfying_1,minSatisfying=minSatisfying_1,minVersion=minVersion_1,validRange=valid$1,outside=outside_1,gtr=gtr_1,ltr=ltr_1,intersects=intersects_1,simplifyRange=simplify,subset=subset_1;var semver={parse:parse,valid:valid,clean:clean,inc:inc,diff:diff,major:major,minor:minor,patch:patch,prerelease:prerelease,compare:compare,rcompare:rcompare,compareLoose:compareLoose,compareBuild:compareBuild,sort:sort,rsort:rsort,gt:gt,lt:lt,eq:eq,neq:neq,gte:gte,lte:lte,cmp:cmp,coerce:coerce,Comparator:Comparator,Range:Range,satisfies:satisfies,toComparators:toComparators,maxSatisfying:maxSatisfying,minSatisfying:minSatisfying,minVersion:minVersion,validRange:validRange,outside:outside,gtr:gtr,ltr:ltr,intersects:intersects,simplifyRange:simplifyRange,subset:subset,SemVer:SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants.SEMVER_SPEC_VERSION,RELEASE_TYPES:constants.RELEASE_TYPES,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers},preload=semver;const pdfApplicationCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{display:block}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.m-4{margin:1rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfApplicationStyle0=pdfApplicationCss,PdfApplication$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.apiError=createEvent(this,"apiError",7),this.sessionService=new SessionService,this.fileService=new FileService,this.logger=createLogger("PdfApplication"),this.apiErrorHandler=e=>{this.apiError?this.apiError.emit(e):console.error("Unhandled API error",e)},this.authenticated=new ApiLoading,this.versionInfo=new ApiLoading,this.publickey=void 0,this.privatekey=void 0,this.apiBaseUrl=void 0,this.sessionsurl=void 0}async getAbout(){var e,t,r;this.logger.debug("Get diagnostics");const s=null!==(e=this.versionInfo)&&void 0!==e?e:await this.sessionService.getVersion();return{npmVersion:LIB_VERSION,apiBaseUrl:state.apiBaseUrl,publicKey:state.publicKey,apiVersion:s.error?`error: ${s.error.code} - ${s.error.message}`:null!==(r=null===(t=s.value)||void 0===t?void 0:t.apiVersion)&&void 0!==r?r:"error: could not read api version"}}async getDocuments(){this.logger.debug("Get documents");return(await this.fileService.getDocuments()).value||[]}async deleteDocument(e){this.logger.debug("Delete single document"),await this.fileService.deleteDocuments([e])}async deleteDocuments(e){this.logger.debug("Delete multiple document"),await this.fileService.deleteDocuments(e)}async createDocument(e,t,r){return this.logger.debug("Create new document"),await this.fileService.createDocument(e,t,null!=r?r:null)}async componentWillLoad(){this.logger.debug("Starting..."),this.configure(),await this.versionCheck(),await this.login(),this.authenticated.value&&await this.loadStandardFonts()}componentDidLoad(){this.logger.debug("Started")}disconnectedCallback(){this.sessionService.onUnmounted()}configure(){state.apiBaseUrl=this.apiBaseUrl||Env.API_BASE_URL,this.logger.debug(`apiBaseURL: ${state.apiBaseUrl}`),state.publicKey=this.publickey||Env.API_PUBLIC_KEY,state.privateKey=this.privatekey||Env.API_PRIVATE_KEY,this.sessionsurl&&(state.sessionsUrl=this.sessionsurl),state.apiErrorHandler=this.apiErrorHandler,this.sessionService.onMounted((e=>this.authenticated=e.map((e=>e>0))))}async versionCheck(){this.versionInfo=await this.sessionService.getVersion()}async login(){this.authenticated=(await this.sessionService.login()).map((e=>e>0))}async logout(){this.authenticated=await this.sessionService.logout()}async loadStandardFonts(){var e;this.logger.debug("Setting standard fonts");null===(e=(await this.fileService.getStandardFonts()).value)||void 0===e||e.forEach((async e=>{await addFontFace(e.fontId,e.fontData,document)}))}render(){if(this.authenticated.loading||this.versionInfo.loading)return h(Host,null,h("div",{class:"m-4"},"Loading..."));if(this.versionInfo.error)return h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Api unavailable:"),h("div",{class:"text-red-600"},this.versionInfo.error.code," - ",this.versionInfo.error.message)));if(this.versionInfo.value&&(preload.lt(this.versionInfo.value.apiVersion,Env.API_MINIMUM_VERSION)||preload.lt(LIB_VERSION,this.versionInfo.value.minimumNpmPackageVersion))){let e=preload.lt(this.versionInfo.value.apiVersion,Env.API_MINIMUM_VERSION),t=preload.lt(LIB_VERSION,this.versionInfo.value.minimumNpmPackageVersion);return this.logger.error(e?`Api version ${this.versionInfo.value.apiVersion} is too low. Must be at least ${Env.API_MINIMUM_VERSION}.`:`Package version ${LIB_VERSION} is too low. Must be at least ${this.versionInfo.value.minimumNpmPackageVersion}.`),h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Api and npm package version mismatch:"),h("div",{class:"text-red-600"},e&&h("span",null,"The version of the Api used is not supported. Current Api version: ",this.versionInfo.value.apiVersion,". Current version of this package requires at least version ",Env.API_MINIMUM_VERSION," of the Api."),t&&h("span",null,"This version of the npm package is no longer supported by the Api. You current version: ",LIB_VERSION,". Please upgrade to ",this.versionInfo.value.minimumNpmPackageVersion," or above."))))}return this.authenticated.error?h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Error logging in:"),h("div",{class:"text-red-600"},this.authenticated.error.code," - ",this.authenticated.error.message))):void 0}static get style(){return PdfApplicationStyle0}},[1,"pdf-application",{publickey:[1],privatekey:[1],apiBaseUrl:[1,"api-base-url"],sessionsurl:[1],authenticated:[32],versionInfo:[32],getAbout:[64],getDocuments:[64],deleteDocument:[64],deleteDocuments:[64],createDocument:[64]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["pdf-application"].forEach((e=>{if("pdf-application"===e)customElements.get(e)||customElements.define(e,PdfApplication$1)}))}const PdfApplication=PdfApplication$1,defineCustomElement=defineCustomElement$1;export{PdfApplication,defineCustomElement}; | ||
import{proxyCustomElement,HTMLElement,createEvent,Env,h,Host}from"@stencil/core/internal/client";import{S as SessionService,n as createLogger,a as ApiLoading,s as state}from"./ApiClient.js";import{F as FileService}from"./FileService.js";import{a as addFontFace}from"./insertFonts.js";const LIB_VERSION="1.2.12-fe3b6350";var re$4={exports:{}};const SEMVER_SPEC_VERSION="2.0.0",MAX_LENGTH$1=256,MAX_SAFE_INTEGER$1=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,MAX_SAFE_BUILD_LENGTH=250,RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var constants$1={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$1,RELEASE_TYPES:RELEASE_TYPES,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const debug$3="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var debug_1=debug$3;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:i}=constants$1,a=debug_1,o=(t=e.exports={}).re=[],n=t.safeRe=[],l=t.src=[],h=t.t={};let p=0;const c="[a-zA-Z0-9-]",u=[["\\s",1],["\\d",i],[c,s]],m=(e,t,r)=>{const s=(e=>{for(const[t,r]of u)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),i=p++;a(e,i,t),h[e]=i,l[i]=t,o[i]=new RegExp(t,r?"g":void 0),n[i]=new RegExp(s,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${c}*`),m("MAINVERSION",`(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${l[h.NUMERICIDENTIFIER]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${l[h.NUMERICIDENTIFIERLOOSE]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASE",`(?:-(${l[h.PRERELEASEIDENTIFIER]}(?:\\.${l[h.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${l[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[h.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${c}+`),m("BUILD",`(?:\\+(${l[h.BUILDIDENTIFIER]}(?:\\.${l[h.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${l[h.MAINVERSION]}${l[h.PRERELEASE]}?${l[h.BUILD]}?`),m("FULL",`^${l[h.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${l[h.MAINVERSIONLOOSE]}${l[h.PRERELEASELOOSE]}?${l[h.BUILD]}?`),m("LOOSE",`^${l[h.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${l[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${l[h.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:${l[h.PRERELEASE]})?${l[h.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:${l[h.PRERELEASELOOSE]})?${l[h.BUILD]}?)?)?`),m("XRANGE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),m("COERCE",`${l[h.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",l[h.COERCEPLAIN]+`(?:${l[h.PRERELEASE]})?`+`(?:${l[h.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",l[h.COERCE],!0),m("COERCERTLFULL",l[h.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${l[h.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${l[h.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${l[h.LONECARET]}${l[h.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${l[h.LONECARET]}${l[h.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${l[h.GTLT]}\\s*(${l[h.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]}|${l[h.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${l[h.XRANGEPLAIN]})\\s+-\\s+(${l[h.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${l[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[h.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(re$4,re$4.exports);const looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({}),parseOptions$3=e=>e?"object"!=typeof e?looseOption:e:emptyOpts;var parseOptions_1=parseOptions$3;const numeric=/^[0-9]+$/,compareIdentifiers$1=(e,t)=>{const r=numeric.test(e),s=numeric.test(t);return r&&s&&(e=+e,t=+t),e===t?0:r&&!s?-1:s&&!r?1:e<t?-1:1},rcompareIdentifiers=(e,t)=>compareIdentifiers$1(t,e);var identifiers$1={compareIdentifiers:compareIdentifiers$1,rcompareIdentifiers:rcompareIdentifiers};const debug$2=debug_1,{MAX_LENGTH:MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER}=constants$1,{safeRe:re$3,t:t$3}=re$4.exports,parseOptions$2=parseOptions_1,{compareIdentifiers:compareIdentifiers}=identifiers$1;class SemVer$f{constructor(e,t){if(t=parseOptions$2(t),e instanceof SemVer$f){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug$2("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?re$3[t$3.LOOSE]:re$3[t$3.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>MAX_SAFE_INTEGER||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<MAX_SAFE_INTEGER)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(debug$2("SemVer.compare",this.version,this.options,e),!(e instanceof SemVer$f)){if("string"==typeof e&&e===this.version)return 0;e=new SemVer$f(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),compareIdentifiers(this.major,e.major)||compareIdentifiers(this.minor,e.minor)||compareIdentifiers(this.patch,e.patch)}comparePre(e){if(e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],s=e.prerelease[t];if(debug$2("prerelease compare",t,r,s),void 0===r&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===r)return-1;if(r!==s)return compareIdentifiers(r,s)}while(++t)}compareBuild(e){e instanceof SemVer$f||(e=new SemVer$f(e,this.options));let t=0;do{const r=this.build[t],s=e.build[t];if(debug$2("prerelease compare",t,r,s),void 0===r&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===r)return-1;if(r!==s)return compareIdentifiers(r,s)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let s=this.prerelease.length;for(;--s>=0;)"number"==typeof this.prerelease[s]&&(this.prerelease[s]++,s=-2);if(-1===s){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let s=[t,e];!1===r&&(s=[t]),0===compareIdentifiers(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}var semver$1=SemVer$f;const SemVer$e=semver$1,parse$6=(e,t,r=!1)=>{if(e instanceof SemVer$e)return e;try{return new SemVer$e(e,t)}catch(e){if(!r)return null;throw e}};var parse_1=parse$6;const parse$5=parse_1,valid$2=(e,t)=>{const r=parse$5(e,t);return r?r.version:null};var valid_1=valid$2;const parse$4=parse_1,clean$1=(e,t)=>{const r=parse$4(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var clean_1=clean$1;const SemVer$d=semver$1,inc$1=(e,t,r,s,i)=>{"string"==typeof r&&(i=s,s=r,r=void 0);try{return new SemVer$d(e instanceof SemVer$d?e.version:e,r).inc(t,s,i).version}catch(e){return null}};var inc_1=inc$1;const parse$3=parse_1,diff$1=(e,t)=>{const r=parse$3(e,null,!0),s=parse$3(t,null,!0),i=r.compare(s);if(0===i)return null;const a=i>0,o=a?r:s,n=a?s:r,l=!!o.prerelease.length;if(!!n.prerelease.length&&!l)return n.patch||n.minor?o.patch?"patch":o.minor?"minor":"major":"major";const h=l?"pre":"";return r.major!==s.major?h+"major":r.minor!==s.minor?h+"minor":r.patch!==s.patch?h+"patch":"prerelease"};var diff_1=diff$1;const SemVer$c=semver$1,major$1=(e,t)=>new SemVer$c(e,t).major;var major_1=major$1;const SemVer$b=semver$1,minor$1=(e,t)=>new SemVer$b(e,t).minor;var minor_1=minor$1;const SemVer$a=semver$1,patch$1=(e,t)=>new SemVer$a(e,t).patch;var patch_1=patch$1;const parse$2=parse_1,prerelease$1=(e,t)=>{const r=parse$2(e,t);return r&&r.prerelease.length?r.prerelease:null};var prerelease_1=prerelease$1;const SemVer$9=semver$1,compare$b=(e,t,r)=>new SemVer$9(e,r).compare(new SemVer$9(t,r));var compare_1=compare$b;const compare$a=compare_1,rcompare$1=(e,t,r)=>compare$a(t,e,r);var rcompare_1=rcompare$1;const compare$9=compare_1,compareLoose$1=(e,t)=>compare$9(e,t,!0);var compareLoose_1=compareLoose$1;const SemVer$8=semver$1,compareBuild$3=(e,t,r)=>{const s=new SemVer$8(e,r),i=new SemVer$8(t,r);return s.compare(i)||s.compareBuild(i)};var compareBuild_1=compareBuild$3;const compareBuild$2=compareBuild_1,sort$1=(e,t)=>e.sort(((e,r)=>compareBuild$2(e,r,t)));var sort_1=sort$1;const compareBuild$1=compareBuild_1,rsort$1=(e,t)=>e.sort(((e,r)=>compareBuild$1(r,e,t)));var rsort_1=rsort$1;const compare$8=compare_1,gt$4=(e,t,r)=>compare$8(e,t,r)>0;var gt_1=gt$4;const compare$7=compare_1,lt$3=(e,t,r)=>compare$7(e,t,r)<0;var lt_1=lt$3;const compare$6=compare_1,eq$2=(e,t,r)=>0===compare$6(e,t,r);var eq_1=eq$2;const compare$5=compare_1,neq$2=(e,t,r)=>0!==compare$5(e,t,r);var neq_1=neq$2;const compare$4=compare_1,gte$3=(e,t,r)=>compare$4(e,t,r)>=0;var gte_1=gte$3;const compare$3=compare_1,lte$3=(e,t,r)=>compare$3(e,t,r)<=0;var lte_1=lte$3;const eq$1=eq_1,neq$1=neq_1,gt$3=gt_1,gte$2=gte_1,lt$2=lt_1,lte$2=lte_1,cmp$2=(e,t,r,s)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return eq$1(e,r,s);case"!=":return neq$1(e,r,s);case">":return gt$3(e,r,s);case">=":return gte$2(e,r,s);case"<":return lt$2(e,r,s);case"<=":return lte$2(e,r,s);default:throw new TypeError(`Invalid operator: ${t}`)}};var cmp_1=cmp$2;const SemVer$7=semver$1,parse$1=parse_1,{safeRe:re$2,t:t$2}=re$4.exports,coerce$1=(e,t)=>{if(e instanceof SemVer$7)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const s=t.includePrerelease?re$2[t$2.COERCERTLFULL]:re$2[t$2.COERCERTL];let i;for(;(i=s.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),s.lastIndex=i.index+i[1].length+i[2].length;s.lastIndex=-1}else r=e.match(t.includePrerelease?re$2[t$2.COERCEFULL]:re$2[t$2.COERCE]);if(null===r)return null;const s=r[2],i=r[3]||"0",a=r[4]||"0",o=t.includePrerelease&&r[5]?`-${r[5]}`:"",n=t.includePrerelease&&r[6]?`+${r[6]}`:"";return parse$1(`${s}.${i}.${a}${o}${n}`,t)};var coerce_1=coerce$1,yallist=Yallist$1;function Yallist$1(e){var t=this;if(t instanceof Yallist$1||(t=new Yallist$1),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)t.push(arguments[r]);return t}function insert(e,t,r){var s=t===e.head?new Node(r,null,t,e):new Node(r,t,t.next,e);return null===s.next&&(e.tail=s),null===s.prev&&(e.head=s),e.length++,s}function push(e,t){e.tail=new Node(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Node(e,t,r,s){if(!(this instanceof Node))return new Node(e,t,r,s);this.list=s,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}Yallist$1.Node=Node,Yallist$1.create=Yallist$1,Yallist$1.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},Yallist$1.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},Yallist$1.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},Yallist$1.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)push(this,arguments[e]);return this.length},Yallist$1.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)unshift(this,arguments[e]);return this.length},Yallist$1.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},Yallist$1.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},Yallist$1.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,s=0;null!==r;s++)e.call(t,r.value,s,this),r=r.next},Yallist$1.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,s=this.length-1;null!==r;s--)e.call(t,r.value,s,this),r=r.prev},Yallist$1.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},Yallist$1.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},Yallist$1.prototype.map=function(e,t){t=t||this;for(var r=new Yallist$1,s=this.head;null!==s;)r.push(e.call(t,s.value,this)),s=s.next;return r},Yallist$1.prototype.mapReverse=function(e,t){t=t||this;for(var r=new Yallist$1,s=this.tail;null!==s;)r.push(e.call(t,s.value,this)),s=s.prev;return r},Yallist$1.prototype.reduce=function(e,t){var r,s=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");s=this.head.next,r=this.head.value}for(var i=0;null!==s;i++)r=e(r,s.value,i),s=s.next;return r},Yallist$1.prototype.reduceReverse=function(e,t){var r,s=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");s=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==s;i--)r=e(r,s.value,i),s=s.prev;return r},Yallist$1.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},Yallist$1.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},Yallist$1.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;for(;null!==i&&s<t;s++,i=i.next)r.push(i.value);return r},Yallist$1.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=this.length,i=this.tail;null!==i&&s>t;s--)i=i.prev;for(;null!==i&&s>e;s--,i=i.prev)r.push(i.value);return r},Yallist$1.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;var a=[];for(s=0;i&&s<t;s++)a.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(s=0;s<r.length;s++)i=insert(this,i,r[s]);return a},Yallist$1.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var s=r.prev;r.prev=r.next,r.next=s}return this.head=t,this.tail=e,this};try{require("./iterator.js")(Yallist$1)}catch(e){}const Yallist=yallist,MAX=Symbol("max"),LENGTH=Symbol("length"),LENGTH_CALCULATOR=Symbol("lengthCalculator"),ALLOW_STALE=Symbol("allowStale"),MAX_AGE=Symbol("maxAge"),DISPOSE=Symbol("dispose"),NO_DISPOSE_ON_SET=Symbol("noDisposeOnSet"),LRU_LIST=Symbol("lruList"),CACHE=Symbol("cache"),UPDATE_AGE_ON_GET=Symbol("updateAgeOnGet"),naiveLength=()=>1;class LRUCache{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[MAX]=e.max||1/0;const t=e.length||naiveLength;if(this[LENGTH_CALCULATOR]="function"!=typeof t?naiveLength:t,this[ALLOW_STALE]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[MAX_AGE]=e.maxAge||0,this[DISPOSE]=e.dispose,this[NO_DISPOSE_ON_SET]=e.noDisposeOnSet||!1,this[UPDATE_AGE_ON_GET]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[MAX]=e||1/0,trim(this)}get max(){return this[MAX]}set allowStale(e){this[ALLOW_STALE]=!!e}get allowStale(){return this[ALLOW_STALE]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[MAX_AGE]=e,trim(this)}get maxAge(){return this[MAX_AGE]}set lengthCalculator(e){"function"!=typeof e&&(e=naiveLength),e!==this[LENGTH_CALCULATOR]&&(this[LENGTH_CALCULATOR]=e,this[LENGTH]=0,this[LRU_LIST].forEach((e=>{e.length=this[LENGTH_CALCULATOR](e.value,e.key),this[LENGTH]+=e.length}))),trim(this)}get lengthCalculator(){return this[LENGTH_CALCULATOR]}get length(){return this[LENGTH]}get itemCount(){return this[LRU_LIST].length}rforEach(e,t){t=t||this;for(let r=this[LRU_LIST].tail;null!==r;){const s=r.prev;forEachStep(this,e,r,t),r=s}}forEach(e,t){t=t||this;for(let r=this[LRU_LIST].head;null!==r;){const s=r.next;forEachStep(this,e,r,t),r=s}}keys(){return this[LRU_LIST].toArray().map((e=>e.key))}values(){return this[LRU_LIST].toArray().map((e=>e.value))}reset(){this[DISPOSE]&&this[LRU_LIST]&&this[LRU_LIST].length&&this[LRU_LIST].forEach((e=>this[DISPOSE](e.key,e.value))),this[CACHE]=new Map,this[LRU_LIST]=new Yallist,this[LENGTH]=0}dump(){return this[LRU_LIST].map((e=>!isStale(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[LRU_LIST]}set(e,t,r){if((r=r||this[MAX_AGE])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const s=r?Date.now():0,i=this[LENGTH_CALCULATOR](t,e);if(this[CACHE].has(e)){if(i>this[MAX])return del(this,this[CACHE].get(e)),!1;const a=this[CACHE].get(e).value;return this[DISPOSE]&&(this[NO_DISPOSE_ON_SET]||this[DISPOSE](e,a.value)),a.now=s,a.maxAge=r,a.value=t,this[LENGTH]+=i-a.length,a.length=i,this.get(e),trim(this),!0}const a=new Entry(e,t,i,s,r);return a.length>this[MAX]?(this[DISPOSE]&&this[DISPOSE](e,t),!1):(this[LENGTH]+=a.length,this[LRU_LIST].unshift(a),this[CACHE].set(e,this[LRU_LIST].head),trim(this),!0)}has(e){if(!this[CACHE].has(e))return!1;const t=this[CACHE].get(e).value;return!isStale(this,t)}get(e){return get(this,e,!0)}peek(e){return get(this,e,!1)}pop(){const e=this[LRU_LIST].tail;return e?(del(this,e),e.value):null}del(e){del(this,this[CACHE].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r],i=s.e||0;if(0===i)this.set(s.k,s.v);else{const e=i-t;e>0&&this.set(s.k,s.v,e)}}}prune(){this[CACHE].forEach(((e,t)=>get(this,t,!1)))}}const get=(e,t,r)=>{const s=e[CACHE].get(t);if(s){const t=s.value;if(isStale(e,t)){if(del(e,s),!e[ALLOW_STALE])return}else r&&(e[UPDATE_AGE_ON_GET]&&(s.value.now=Date.now()),e[LRU_LIST].unshiftNode(s));return t.value}},isStale=(e,t)=>{if(!t||!t.maxAge&&!e[MAX_AGE])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[MAX_AGE]&&r>e[MAX_AGE]},trim=e=>{if(e[LENGTH]>e[MAX])for(let t=e[LRU_LIST].tail;e[LENGTH]>e[MAX]&&null!==t;){const r=t.prev;del(e,t),t=r}},del=(e,t)=>{if(t){const r=t.value;e[DISPOSE]&&e[DISPOSE](r.key,r.value),e[LENGTH]-=r.length,e[CACHE].delete(r.key),e[LRU_LIST].removeNode(t)}};class Entry{constructor(e,t,r,s,i){this.key=e,this.value=t,this.length=r,this.now=s,this.maxAge=i||0}}const forEachStep=(e,t,r,s)=>{let i=r.value;isStale(e,i)&&(del(e,r),e[ALLOW_STALE]||(i=void 0)),i&&t.call(s,i.value,i.key,e)};var lruCache=LRUCache;class Range$b{constructor(e,t){if(t=parseOptions$1(t),e instanceof Range$b)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Range$b(e.raw,t);if(e instanceof Comparator$4)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!isNullSet(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&isAny(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&FLAG_INCLUDE_PRERELEASE)|(this.options.loose&&FLAG_LOOSE))+":"+e,r=cache.get(t);if(r)return r;const s=this.options.loose,i=s?re$1[t$1.HYPHENRANGELOOSE]:re$1[t$1.HYPHENRANGE];e=e.replace(i,hyphenReplace(this.options.includePrerelease)),debug$1("hyphen replace",e),e=e.replace(re$1[t$1.COMPARATORTRIM],comparatorTrimReplace),debug$1("comparator trim",e),e=e.replace(re$1[t$1.TILDETRIM],tildeTrimReplace),debug$1("tilde trim",e),e=e.replace(re$1[t$1.CARETTRIM],caretTrimReplace),debug$1("caret trim",e);let a=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));s&&(a=a.filter((e=>(debug$1("loose invalid filter",e,this.options),!!e.match(re$1[t$1.COMPARATORLOOSE]))))),debug$1("range list",a);const o=new Map,n=a.map((e=>new Comparator$4(e,this.options)));for(const e of n){if(isNullSet(e))return[e];o.set(e.value,e)}o.size>1&&o.has("")&&o.delete("");const l=[...o.values()];return cache.set(t,l),l}intersects(e,t){if(!(e instanceof Range$b))throw new TypeError("a Range is required");return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new SemVer$6(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(testSet(this.set[t],e,this.options))return!0;return!1}}var range=Range$b;const LRU=lruCache,cache=new LRU({max:1e3}),parseOptions$1=parseOptions_1,Comparator$4=comparator,debug$1=debug_1,SemVer$6=semver$1,{safeRe:re$1,t:t$1,comparatorTrimReplace:comparatorTrimReplace,tildeTrimReplace:tildeTrimReplace,caretTrimReplace:caretTrimReplace}=re$4.exports,{FLAG_INCLUDE_PRERELEASE:FLAG_INCLUDE_PRERELEASE,FLAG_LOOSE:FLAG_LOOSE}=constants$1,isNullSet=e=>"<0.0.0-0"===e.value,isAny=e=>""===e.value,isSatisfiable=(e,t)=>{let r=!0;const s=e.slice();let i=s.pop();for(;r&&s.length;)r=s.every((e=>i.intersects(e,t))),i=s.pop();return r},parseComparator=(e,t)=>(debug$1("comp",e,t),e=replaceCarets(e,t),debug$1("caret",e),e=replaceTildes(e,t),debug$1("tildes",e),e=replaceXRanges(e,t),debug$1("xrange",e),e=replaceStars(e,t),debug$1("stars",e),e),isX=e=>!e||"x"===e.toLowerCase()||"*"===e,replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" "),replaceTilde=(e,t)=>{const r=t.loose?re$1[t$1.TILDELOOSE]:re$1[t$1.TILDE];return e.replace(r,((t,r,s,i,a)=>{let o;return debug$1("tilde",e,t,r,s,i,a),isX(r)?o="":isX(s)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:isX(i)?o=`>=${r}.${s}.0 <${r}.${+s+1}.0-0`:a?(debug$1("replaceTilde pr",a),o=`>=${r}.${s}.${i}-${a} <${r}.${+s+1}.0-0`):o=`>=${r}.${s}.${i} <${r}.${+s+1}.0-0`,debug$1("tilde return",o),o}))},replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" "),replaceCaret=(e,t)=>{debug$1("caret",e,t);const r=t.loose?re$1[t$1.CARETLOOSE]:re$1[t$1.CARET],s=t.includePrerelease?"-0":"";return e.replace(r,((t,r,i,a,o)=>{let n;return debug$1("caret",e,t,r,i,a,o),isX(r)?n="":isX(i)?n=`>=${r}.0.0${s} <${+r+1}.0.0-0`:isX(a)?n="0"===r?`>=${r}.${i}.0${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${s} <${+r+1}.0.0-0`:o?(debug$1("replaceCaret pr",o),n="0"===r?"0"===i?`>=${r}.${i}.${a}-${o} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}-${o} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a}-${o} <${+r+1}.0.0-0`):(debug$1("no pr"),n="0"===r?"0"===i?`>=${r}.${i}.${a}${s} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a} <${+r+1}.0.0-0`),debug$1("caret return",n),n}))},replaceXRanges=(e,t)=>(debug$1("replaceXRanges",e,t),e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")),replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?re$1[t$1.XRANGELOOSE]:re$1[t$1.XRANGE];return e.replace(r,((r,s,i,a,o,n)=>{debug$1("xRange",e,r,s,i,a,o,n);const l=isX(i),h=l||isX(a),p=h||isX(o),c=p;return"="===s&&c&&(s=""),n=t.includePrerelease?"-0":"",l?r=">"===s||"<"===s?"<0.0.0-0":"*":s&&c?(h&&(a=0),o=0,">"===s?(s=">=",h?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===s&&(s="<",h?i=+i+1:a=+a+1),"<"===s&&(n="-0"),r=`${s+i}.${a}.${o}${n}`):h?r=`>=${i}.0.0${n} <${+i+1}.0.0-0`:p&&(r=`>=${i}.${a}.0${n} <${i}.${+a+1}.0-0`),debug$1("xRange return",r),r}))},replaceStars=(e,t)=>(debug$1("replaceStars",e,t),e.trim().replace(re$1[t$1.STAR],"")),replaceGTE0=(e,t)=>(debug$1("replaceGTE0",e,t),e.trim().replace(re$1[t.includePrerelease?t$1.GTE0PRE:t$1.GTE0],"")),hyphenReplace=e=>(t,r,s,i,a,o,n,l,h,p,c,u,m)=>`${r=isX(s)?"":isX(i)?`>=${s}.0.0${e?"-0":""}`:isX(a)?`>=${s}.${i}.0${e?"-0":""}`:o?`>=${r}`:`>=${r}${e?"-0":""}`} ${l=isX(h)?"":isX(p)?`<${+h+1}.0.0-0`:isX(c)?`<${h}.${+p+1}.0-0`:u?`<=${h}.${p}.${c}-${u}`:e?`<${h}.${p}.${+c+1}-0`:`<=${l}`}`.trim(),testSet=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(debug$1(e[r].semver),e[r].semver!==Comparator$4.ANY&&e[r].semver.prerelease.length>0){const s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0},ANY$2=Symbol("SemVer ANY");class Comparator$3{static get ANY(){return ANY$2}constructor(e,t){if(t=parseOptions(t),e instanceof Comparator$3){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),debug("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ANY$2?this.value="":this.value=this.operator+this.semver.version,debug("comp",this)}parse(e){const r=this.options.loose?re[t.COMPARATORLOOSE]:re[t.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==s[1]?s[1]:"","="===this.operator&&(this.operator=""),s[2]?this.semver=new SemVer$5(s[2],this.options.loose):this.semver=ANY$2}toString(){return this.value}test(e){if(debug("Comparator.test",e,this.options.loose),this.semver===ANY$2||e===ANY$2)return!0;if("string"==typeof e)try{e=new SemVer$5(e,this.options)}catch(e){return!1}return cmp$1(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator$3))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new Range$a(e.value,t).test(this.value):""===e.operator?""===e.value||new Range$a(this.value,t).test(e.semver):(!(t=parseOptions(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(cmp$1(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(cmp$1(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}var comparator=Comparator$3;const parseOptions=parseOptions_1,{safeRe:re,t:t}=re$4.exports,cmp$1=cmp_1,debug=debug_1,SemVer$5=semver$1,Range$a=range,Range$9=range,satisfies$4=(e,t,r)=>{try{t=new Range$9(t,r)}catch(e){return!1}return t.test(e)};var satisfies_1=satisfies$4;const Range$8=range,toComparators$1=(e,t)=>new Range$8(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));var toComparators_1=toComparators$1;const SemVer$4=semver$1,Range$7=range,maxSatisfying$1=(e,t,r)=>{let s=null,i=null,a=null;try{a=new Range$7(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&-1!==i.compare(e)||(s=e,i=new SemVer$4(s,r)))})),s};var maxSatisfying_1=maxSatisfying$1;const SemVer$3=semver$1,Range$6=range,minSatisfying$1=(e,t,r)=>{let s=null,i=null,a=null;try{a=new Range$6(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&1!==i.compare(e)||(s=e,i=new SemVer$3(s,r)))})),s};var minSatisfying_1=minSatisfying$1;const SemVer$2=semver$1,Range$5=range,gt$2=gt_1,minVersion$1=(e,t)=>{e=new Range$5(e,t);let r=new SemVer$2("0.0.0");if(e.test(r))return r;if(r=new SemVer$2("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const s=e.set[t];let i=null;s.forEach((e=>{const t=new SemVer$2(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!gt$2(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||r&&!gt$2(r,i)||(r=i)}return r&&e.test(r)?r:null};var minVersion_1=minVersion$1;const Range$4=range,validRange$1=(e,t)=>{try{return new Range$4(e,t).range||"*"}catch(e){return null}};var valid$1=validRange$1;const SemVer$1=semver$1,Comparator$2=comparator,{ANY:ANY$1}=Comparator$2,Range$3=range,satisfies$3=satisfies_1,gt$1=gt_1,lt$1=lt_1,lte$1=lte_1,gte$1=gte_1,outside$3=(e,t,r,s)=>{let i,a,o,n,l;switch(e=new SemVer$1(e,s),t=new Range$3(t,s),r){case">":i=gt$1,a=lte$1,o=lt$1,n=">",l=">=";break;case"<":i=lt$1,a=gte$1,o=gt$1,n="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies$3(e,t,s))return!1;for(let r=0;r<t.set.length;++r){const h=t.set[r];let p=null,c=null;if(h.forEach((e=>{e.semver===ANY$1&&(e=new Comparator$2(">=0.0.0")),p=p||e,c=c||e,i(e.semver,p.semver,s)?p=e:o(e.semver,c.semver,s)&&(c=e)})),p.operator===n||p.operator===l)return!1;if((!c.operator||c.operator===n)&&a(e,c.semver))return!1;if(c.operator===l&&o(e,c.semver))return!1}return!0};var outside_1=outside$3;const outside$2=outside_1,gtr$1=(e,t,r)=>outside$2(e,t,">",r);var gtr_1=gtr$1;const outside$1=outside_1,ltr$1=(e,t,r)=>outside$1(e,t,"<",r);var ltr_1=ltr$1;const Range$2=range,intersects$1=(e,t,r)=>(e=new Range$2(e,r),t=new Range$2(t,r),e.intersects(t,r));var intersects_1=intersects$1;const satisfies$2=satisfies_1,compare$2=compare_1;var simplify=(e,t,r)=>{const s=[];let i=null,a=null;const o=e.sort(((e,t)=>compare$2(e,t,r)));for(const e of o){satisfies$2(e,t,r)?(a=e,i||(i=e)):(a&&s.push([i,a]),a=null,i=null)}i&&s.push([i,null]);const n=[];for(const[e,t]of s)e===t?n.push(e):t||e!==o[0]?t?e===o[0]?n.push(`<=${t}`):n.push(`${e} - ${t}`):n.push(`>=${e}`):n.push("*");const l=n.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return l.length<h.length?l:t};const Range$1=range,Comparator$1=comparator,{ANY:ANY}=Comparator$1,satisfies$1=satisfies_1,compare$1=compare_1,subset$1=(e,t,r={})=>{if(e===t)return!0;e=new Range$1(e,r),t=new Range$1(t,r);let s=!1;e:for(const i of e.set){for(const e of t.set){const t=simpleSubset(i,e,r);if(s=s||null!==t,t)continue e}if(s)return!1}return!0},minimumVersionWithPreRelease=[new Comparator$1(">=0.0.0-0")],minimumVersion=[new Comparator$1(">=0.0.0")],simpleSubset=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===ANY){if(1===t.length&&t[0].semver===ANY)return!0;e=r.includePrerelease?minimumVersionWithPreRelease:minimumVersion}if(1===t.length&&t[0].semver===ANY){if(r.includePrerelease)return!0;t=minimumVersion}const s=new Set;let i,a,o,n,l,h,p;for(const t of e)">"===t.operator||">="===t.operator?i=higherGT(i,t,r):"<"===t.operator||"<="===t.operator?a=lowerLT(a,t,r):s.add(t.semver);if(s.size>1)return null;if(i&&a){if(o=compare$1(i.semver,a.semver,r),o>0)return null;if(0===o&&(">="!==i.operator||"<="!==a.operator))return null}for(const e of s){if(i&&!satisfies$1(e,String(i),r))return null;if(a&&!satisfies$1(e,String(a),r))return null;for(const s of t)if(!satisfies$1(e,String(s),r))return!1;return!0}let c=!(!a||r.includePrerelease||!a.semver.prerelease.length)&&a.semver,u=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;c&&1===c.prerelease.length&&"<"===a.operator&&0===c.prerelease[0]&&(c=!1);for(const e of t){if(p=p||">"===e.operator||">="===e.operator,h=h||"<"===e.operator||"<="===e.operator,i)if(u&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===u.major&&e.semver.minor===u.minor&&e.semver.patch===u.patch&&(u=!1),">"===e.operator||">="===e.operator){if(n=higherGT(i,e,r),n===e&&n!==i)return!1}else if(">="===i.operator&&!satisfies$1(i.semver,String(e),r))return!1;if(a)if(c&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===c.major&&e.semver.minor===c.minor&&e.semver.patch===c.patch&&(c=!1),"<"===e.operator||"<="===e.operator){if(l=lowerLT(a,e,r),l===e&&l!==a)return!1}else if("<="===a.operator&&!satisfies$1(a.semver,String(e),r))return!1;if(!e.operator&&(a||i)&&0!==o)return!1}return!(i&&h&&!a&&0!==o)&&(!(a&&p&&!i&&0!==o)&&(!u&&!c))},higherGT=(e,t,r)=>{if(!e)return t;const s=compare$1(e.semver,t.semver,r);return s>0?e:s<0||">"===t.operator&&">="===e.operator?t:e},lowerLT=(e,t,r)=>{if(!e)return t;const s=compare$1(e.semver,t.semver,r);return s<0?e:s>0||"<"===t.operator&&"<="===e.operator?t:e};var subset_1=subset$1;const internalRe=re$4.exports,constants=constants$1,SemVer=semver$1,identifiers=identifiers$1,parse=parse_1,valid=valid_1,clean=clean_1,inc=inc_1,diff=diff_1,major=major_1,minor=minor_1,patch=patch_1,prerelease=prerelease_1,compare=compare_1,rcompare=rcompare_1,compareLoose=compareLoose_1,compareBuild=compareBuild_1,sort=sort_1,rsort=rsort_1,gt=gt_1,lt=lt_1,eq=eq_1,neq=neq_1,gte=gte_1,lte=lte_1,cmp=cmp_1,coerce=coerce_1,Comparator=comparator,Range=range,satisfies=satisfies_1,toComparators=toComparators_1,maxSatisfying=maxSatisfying_1,minSatisfying=minSatisfying_1,minVersion=minVersion_1,validRange=valid$1,outside=outside_1,gtr=gtr_1,ltr=ltr_1,intersects=intersects_1,simplifyRange=simplify,subset=subset_1;var semver={parse:parse,valid:valid,clean:clean,inc:inc,diff:diff,major:major,minor:minor,patch:patch,prerelease:prerelease,compare:compare,rcompare:rcompare,compareLoose:compareLoose,compareBuild:compareBuild,sort:sort,rsort:rsort,gt:gt,lt:lt,eq:eq,neq:neq,gte:gte,lte:lte,cmp:cmp,coerce:coerce,Comparator:Comparator,Range:Range,satisfies:satisfies,toComparators:toComparators,maxSatisfying:maxSatisfying,minSatisfying:minSatisfying,minVersion:minVersion,validRange:validRange,outside:outside,gtr:gtr,ltr:ltr,intersects:intersects,simplifyRange:simplifyRange,subset:subset,SemVer:SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants.SEMVER_SPEC_VERSION,RELEASE_TYPES:constants.RELEASE_TYPES,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers},preload=semver;const pdfApplicationCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{display:block}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.m-4{margin:1rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfApplicationStyle0=pdfApplicationCss,PdfApplication$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.apiError=createEvent(this,"apiError",7),this.sessionService=new SessionService,this.fileService=new FileService,this.logger=createLogger("PdfApplication"),this.apiErrorHandler=e=>{this.apiError?this.apiError.emit(e):console.error("Unhandled API error",e)},this.authenticated=new ApiLoading,this.versionInfo=new ApiLoading,this.publickey=void 0,this.privatekey=void 0,this.apiBaseUrl=void 0,this.sessionsurl=void 0}async getAbout(){var e,t,r;this.logger.debug("Get diagnostics");const s=null!==(e=this.versionInfo)&&void 0!==e?e:await this.sessionService.getVersion();return{npmVersion:LIB_VERSION,apiBaseUrl:state.apiBaseUrl,publicKey:state.publicKey,apiVersion:s.error?`error: ${s.error.code} - ${s.error.message}`:null!==(r=null===(t=s.value)||void 0===t?void 0:t.apiVersion)&&void 0!==r?r:"error: could not read api version"}}async getDocuments(){this.logger.debug("Get documents");return(await this.fileService.getDocuments()).value||[]}async deleteDocument(e){this.logger.debug("Delete single document"),await this.fileService.deleteDocuments([e])}async deleteDocuments(e){this.logger.debug("Delete multiple document"),await this.fileService.deleteDocuments(e)}async createDocument(e,t,r){return this.logger.debug("Create new document"),await this.fileService.createDocument(e,t,null!=r?r:null)}async componentWillLoad(){this.logger.debug("Starting..."),this.configure(),await this.versionCheck(),await this.login(),this.authenticated.value&&await this.loadStandardFonts()}componentDidLoad(){this.logger.debug("Started")}disconnectedCallback(){this.sessionService.onUnmounted()}configure(){state.apiBaseUrl=this.apiBaseUrl||Env.API_BASE_URL,this.logger.debug(`apiBaseURL: ${state.apiBaseUrl}`),state.publicKey=this.publickey||Env.API_PUBLIC_KEY,state.privateKey=this.privatekey||Env.API_PRIVATE_KEY,this.sessionsurl&&(state.sessionsUrl=this.sessionsurl),state.apiErrorHandler=this.apiErrorHandler,this.sessionService.onMounted((e=>this.authenticated=e.map((e=>e>0))))}async versionCheck(){this.versionInfo=await this.sessionService.getVersion()}async login(){this.authenticated=(await this.sessionService.login()).map((e=>e>0))}async logout(){this.authenticated=await this.sessionService.logout()}async loadStandardFonts(){var e;this.logger.debug("Setting standard fonts");null===(e=(await this.fileService.getStandardFonts()).value)||void 0===e||e.forEach((async e=>{await addFontFace(e.fontId,e.fontData,document)}))}render(){if(this.authenticated.loading||this.versionInfo.loading)return h(Host,null,h("div",{class:"m-4"},"Loading..."));if(this.versionInfo.error)return h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Api unavailable:"),h("div",{class:"text-red-600"},this.versionInfo.error.code," - ",this.versionInfo.error.message)));if(this.versionInfo.value&&(preload.lt(this.versionInfo.value.apiVersion,Env.API_MINIMUM_VERSION)||preload.lt(LIB_VERSION,this.versionInfo.value.minimumNpmPackageVersion))){let e=preload.lt(this.versionInfo.value.apiVersion,Env.API_MINIMUM_VERSION),t=preload.lt(LIB_VERSION,this.versionInfo.value.minimumNpmPackageVersion);return this.logger.error(e?`Api version ${this.versionInfo.value.apiVersion} is too low. Must be at least ${Env.API_MINIMUM_VERSION}.`:`Package version ${LIB_VERSION} is too low. Must be at least ${this.versionInfo.value.minimumNpmPackageVersion}.`),h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Api and npm package version mismatch:"),h("div",{class:"text-red-600"},e&&h("span",null,"The version of the Api used is not supported. Current Api version: ",this.versionInfo.value.apiVersion,". Current version of this package requires at least version ",Env.API_MINIMUM_VERSION," of the Api."),t&&h("span",null,"This version of the npm package is no longer supported by the Api. You current version: ",LIB_VERSION,". Please upgrade to ",this.versionInfo.value.minimumNpmPackageVersion," or above."))))}return this.authenticated.error?h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Error logging in:"),h("div",{class:"text-red-600"},this.authenticated.error.code," - ",this.authenticated.error.message))):void 0}static get style(){return PdfApplicationStyle0}},[1,"pdf-application",{publickey:[1],privatekey:[1],apiBaseUrl:[1,"api-base-url"],sessionsurl:[1],authenticated:[32],versionInfo:[32],getAbout:[64],getDocuments:[64],deleteDocument:[64],deleteDocuments:[64],createDocument:[64]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["pdf-application"].forEach((e=>{if("pdf-application"===e)customElements.get(e)||customElements.define(e,PdfApplication$1)}))}const PdfApplication=PdfApplication$1,defineCustomElement=defineCustomElement$1;export{PdfApplication,defineCustomElement}; |
@@ -1,1 +0,1 @@ | ||
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{e as ensureStore,o as onChange,a as onChange$1,b as ensureStore$1}from"./documentStore.js";const pdfStoreWrapperCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.visible{visibility:visible}.max-h-\\[40rem\\]{max-height:40rem}.overflow-y-auto{overflow-y:auto}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.m-1{margin:.25rem}.ml-4{margin-left:1rem}.mt-4{margin-top:1rem}.table{display:table}.table-auto{table-layout:auto}.-translate-y-3{--tw-translate-y:-0.75rem}.-translate-y-3,.scale-150{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x:1.5;--tw-scale-y:1.5}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.font-bold{font-weight:700}.outline{outline-style:solid}.mb-4{margin-bottom:1rem}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.m-8{margin:2rem}.mb-2{margin-bottom:.5rem}.hidden{display:none}.rounded-xl{border-radius:.75rem}.border-4{border-width:4px}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.px-24{padding-left:6rem;padding-right:6rem}.py-12{padding-bottom:3rem;padding-top:3rem}.text-center{text-align:center}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.\\!bg-blue-700{--tw-bg-opacity:1!important;background-color:rgb(29 78 216/var(--tw-bg-opacity))!important}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.-mr-4{margin-right:-1rem}.ml-1{margin-left:.25rem}.mt-1{margin-top:.25rem}.h-16{height:4rem}.h-24{height:6rem}.w-0{width:0}.w-16{width:4rem}.cursor-move{cursor:move}.rounded{border-radius:.25rem}.pr-4{padding-right:1rem}.text-xs{font-size:.75rem;line-height:1rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}',PdfStoreWrapperStyle0=pdfStoreWrapperCss,PdfStoreWrapper=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.documentStore=null,this.viewerStore=null,this.setDocumentStore=()=>{this.documentStore||(this.documentStore=ensureStore(this.pdfdoc)||null,this.documentStore&&this.documentStoreLoaded&&this.documentStoreLoaded(this.documentStore))},this.pdfdoc="default",this.pdfviewer="default",this.pageindex=-1,this.documentStoreLoaded=void 0,this.viewerStoreLoaded=void 0}componentDidLoad(){this.setDocumentStore(),this.setViewerStore(),onChange("pdfReferences",(()=>{this.setDocumentStore()})),onChange$1("stores",(()=>{this.setViewerStore()}))}setViewerStore(){this.viewerStore||(this.viewerStore=ensureStore$1(this.pdfdoc,this.pdfviewer),this.viewerStore&&this.viewerStoreLoaded&&this.viewerStoreLoaded(this.viewerStore))}render(){return h(Host,{key:"6586487a8b82ea87152f7662d6c0d43beca31d10"},h("slot",{key:"f9603b68cf8d8ebd1c6204b6f9a4d835b7eb955d"}))}get el(){return this}static get style(){return PdfStoreWrapperStyle0}},[1,"pdf-store-wrapper",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],documentStoreLoaded:[16],viewerStoreLoaded:[16]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["pdf-store-wrapper"].forEach((t=>{if("pdf-store-wrapper"===t)customElements.get(t)||customElements.define(t,PdfStoreWrapper)}))}export{PdfStoreWrapper as P,defineCustomElement as d}; | ||
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{e as ensureStore,o as onChange,a as onChange$1,b as ensureStore$1}from"./documentStore.js";const pdfStoreWrapperCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.visible{visibility:visible}.max-h-\\[40rem\\]{max-height:40rem}.overflow-y-auto{overflow-y:auto}.m-1{margin:.25rem}.ml-4{margin-left:1rem}.mt-4{margin-top:1rem}.table{display:table}.table-auto{table-layout:auto}.-translate-y-3{--tw-translate-y:-0.75rem}.-translate-y-3,.scale-150{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x:1.5;--tw-scale-y:1.5}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.font-bold{font-weight:700}.outline{outline-style:solid}.mb-4{margin-bottom:1rem}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.m-8{margin:2rem}.mb-2{margin-bottom:.5rem}.hidden{display:none}.rounded-xl{border-radius:.75rem}.border-4{border-width:4px}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.px-24{padding-left:6rem;padding-right:6rem}.py-12{padding-bottom:3rem;padding-top:3rem}.text-center{text-align:center}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.\\!bg-blue-700{--tw-bg-opacity:1!important;background-color:rgb(29 78 216/var(--tw-bg-opacity))!important}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.-mr-4{margin-right:-1rem}.ml-1{margin-left:.25rem}.mt-1{margin-top:.25rem}.h-16{height:4rem}.h-24{height:6rem}.w-0{width:0}.w-16{width:4rem}.cursor-move{cursor:move}.rounded{border-radius:.25rem}.pr-4{padding-right:1rem}.text-xs{font-size:.75rem;line-height:1rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}',PdfStoreWrapperStyle0=pdfStoreWrapperCss,PdfStoreWrapper=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.documentStore=null,this.viewerStore=null,this.setDocumentStore=()=>{this.documentStore||(this.documentStore=ensureStore(this.pdfdoc)||null,this.documentStore&&this.documentStoreLoaded&&this.documentStoreLoaded(this.documentStore))},this.pdfdoc="default",this.pdfviewer="default",this.pageindex=-1,this.documentStoreLoaded=void 0,this.viewerStoreLoaded=void 0}componentDidLoad(){this.setDocumentStore(),this.setViewerStore(),onChange("pdfReferences",(()=>{this.setDocumentStore()})),onChange$1("stores",(()=>{this.setViewerStore()}))}setViewerStore(){this.viewerStore||(this.viewerStore=ensureStore$1(this.pdfdoc,this.pdfviewer),this.viewerStore&&this.viewerStoreLoaded&&this.viewerStoreLoaded(this.viewerStore))}render(){return h(Host,{key:"6586487a8b82ea87152f7662d6c0d43beca31d10"},h("slot",{key:"f9603b68cf8d8ebd1c6204b6f9a4d835b7eb955d"}))}get el(){return this}static get style(){return PdfStoreWrapperStyle0}},[1,"pdf-store-wrapper",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],documentStoreLoaded:[16],viewerStoreLoaded:[16]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["pdf-store-wrapper"].forEach((t=>{if("pdf-store-wrapper"===t)customElements.get(t)||customElements.define(t,PdfStoreWrapper)}))}export{PdfStoreWrapper as P,defineCustomElement as d}; |
@@ -1,1 +0,1 @@ | ||
import{r as registerInstance,c as createEvent,E as Env,h,H as Host}from"./index-ad2fce19.js";import{S as SessionService,n as createLogger,a as ApiLoading,s as state}from"./ApiClient-c838e5e9.js";import{F as FileService}from"./FileService-7bd3d04f.js";import{a as addFontFace}from"./insertFonts-93b7c521.js";const LIB_VERSION="1.2.12-e059e480";var re$4={exports:{}};const SEMVER_SPEC_VERSION="2.0.0",MAX_LENGTH$1=256,MAX_SAFE_INTEGER$1=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,MAX_SAFE_BUILD_LENGTH=250,RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var constants$1={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$1,RELEASE_TYPES:RELEASE_TYPES,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const debug$3="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var debug_1=debug$3;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:i}=constants$1,a=debug_1,o=(t=e.exports={}).re=[],n=t.safeRe=[],l=t.src=[],h=t.t={};let p=0;const c="[a-zA-Z0-9-]",u=[["\\s",1],["\\d",i],[c,s]],m=(e,t,r)=>{const s=(e=>{for(const[t,r]of u)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),i=p++;a(e,i,t),h[e]=i,l[i]=t,o[i]=new RegExp(t,r?"g":void 0),n[i]=new RegExp(s,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${c}*`),m("MAINVERSION",`(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${l[h.NUMERICIDENTIFIER]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${l[h.NUMERICIDENTIFIERLOOSE]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASE",`(?:-(${l[h.PRERELEASEIDENTIFIER]}(?:\\.${l[h.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${l[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[h.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${c}+`),m("BUILD",`(?:\\+(${l[h.BUILDIDENTIFIER]}(?:\\.${l[h.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${l[h.MAINVERSION]}${l[h.PRERELEASE]}?${l[h.BUILD]}?`),m("FULL",`^${l[h.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${l[h.MAINVERSIONLOOSE]}${l[h.PRERELEASELOOSE]}?${l[h.BUILD]}?`),m("LOOSE",`^${l[h.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${l[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${l[h.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:${l[h.PRERELEASE]})?${l[h.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:${l[h.PRERELEASELOOSE]})?${l[h.BUILD]}?)?)?`),m("XRANGE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),m("COERCE",`${l[h.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",l[h.COERCEPLAIN]+`(?:${l[h.PRERELEASE]})?`+`(?:${l[h.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",l[h.COERCE],!0),m("COERCERTLFULL",l[h.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${l[h.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${l[h.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${l[h.LONECARET]}${l[h.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${l[h.LONECARET]}${l[h.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${l[h.GTLT]}\\s*(${l[h.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]}|${l[h.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${l[h.XRANGEPLAIN]})\\s+-\\s+(${l[h.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${l[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[h.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(re$4,re$4.exports);const looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({}),parseOptions$3=e=>e?"object"!=typeof e?looseOption:e:emptyOpts;var parseOptions_1=parseOptions$3;const numeric=/^[0-9]+$/,compareIdentifiers$1=(e,t)=>{const r=numeric.test(e),s=numeric.test(t);return r&&s&&(e=+e,t=+t),e===t?0:r&&!s?-1:s&&!r?1:e<t?-1:1},rcompareIdentifiers=(e,t)=>compareIdentifiers$1(t,e);var identifiers$1={compareIdentifiers:compareIdentifiers$1,rcompareIdentifiers:rcompareIdentifiers};const debug$2=debug_1,{MAX_LENGTH:MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER}=constants$1,{safeRe:re$3,t:t$3}=re$4.exports,parseOptions$2=parseOptions_1,{compareIdentifiers:compareIdentifiers}=identifiers$1;class SemVer$f{constructor(e,t){if(t=parseOptions$2(t),e instanceof SemVer$f){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug$2("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?re$3[t$3.LOOSE]:re$3[t$3.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>MAX_SAFE_INTEGER||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<MAX_SAFE_INTEGER)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(debug$2("SemVer.compare",this.version,this.options,e),!(e instanceof SemVer$f)){if("string"==typeof e&&e===this.version)return 0;e=new SemVer$f(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),compareIdentifiers(this.major,e.major)||compareIdentifiers(this.minor,e.minor)||compareIdentifiers(this.patch,e.patch)}comparePre(e){if(e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],s=e.prerelease[t];if(debug$2("prerelease compare",t,r,s),void 0===r&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===r)return-1;if(r!==s)return compareIdentifiers(r,s)}while(++t)}compareBuild(e){e instanceof SemVer$f||(e=new SemVer$f(e,this.options));let t=0;do{const r=this.build[t],s=e.build[t];if(debug$2("prerelease compare",t,r,s),void 0===r&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===r)return-1;if(r!==s)return compareIdentifiers(r,s)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let s=this.prerelease.length;for(;--s>=0;)"number"==typeof this.prerelease[s]&&(this.prerelease[s]++,s=-2);if(-1===s){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let s=[t,e];!1===r&&(s=[t]),0===compareIdentifiers(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}var semver$1=SemVer$f;const SemVer$e=semver$1,parse$6=(e,t,r=!1)=>{if(e instanceof SemVer$e)return e;try{return new SemVer$e(e,t)}catch(e){if(!r)return null;throw e}};var parse_1=parse$6;const parse$5=parse_1,valid$2=(e,t)=>{const r=parse$5(e,t);return r?r.version:null};var valid_1=valid$2;const parse$4=parse_1,clean$1=(e,t)=>{const r=parse$4(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var clean_1=clean$1;const SemVer$d=semver$1,inc$1=(e,t,r,s,i)=>{"string"==typeof r&&(i=s,s=r,r=void 0);try{return new SemVer$d(e instanceof SemVer$d?e.version:e,r).inc(t,s,i).version}catch(e){return null}};var inc_1=inc$1;const parse$3=parse_1,diff$1=(e,t)=>{const r=parse$3(e,null,!0),s=parse$3(t,null,!0),i=r.compare(s);if(0===i)return null;const a=i>0,o=a?r:s,n=a?s:r,l=!!o.prerelease.length;if(!!n.prerelease.length&&!l)return n.patch||n.minor?o.patch?"patch":o.minor?"minor":"major":"major";const h=l?"pre":"";return r.major!==s.major?h+"major":r.minor!==s.minor?h+"minor":r.patch!==s.patch?h+"patch":"prerelease"};var diff_1=diff$1;const SemVer$c=semver$1,major$1=(e,t)=>new SemVer$c(e,t).major;var major_1=major$1;const SemVer$b=semver$1,minor$1=(e,t)=>new SemVer$b(e,t).minor;var minor_1=minor$1;const SemVer$a=semver$1,patch$1=(e,t)=>new SemVer$a(e,t).patch;var patch_1=patch$1;const parse$2=parse_1,prerelease$1=(e,t)=>{const r=parse$2(e,t);return r&&r.prerelease.length?r.prerelease:null};var prerelease_1=prerelease$1;const SemVer$9=semver$1,compare$b=(e,t,r)=>new SemVer$9(e,r).compare(new SemVer$9(t,r));var compare_1=compare$b;const compare$a=compare_1,rcompare$1=(e,t,r)=>compare$a(t,e,r);var rcompare_1=rcompare$1;const compare$9=compare_1,compareLoose$1=(e,t)=>compare$9(e,t,!0);var compareLoose_1=compareLoose$1;const SemVer$8=semver$1,compareBuild$3=(e,t,r)=>{const s=new SemVer$8(e,r),i=new SemVer$8(t,r);return s.compare(i)||s.compareBuild(i)};var compareBuild_1=compareBuild$3;const compareBuild$2=compareBuild_1,sort$1=(e,t)=>e.sort(((e,r)=>compareBuild$2(e,r,t)));var sort_1=sort$1;const compareBuild$1=compareBuild_1,rsort$1=(e,t)=>e.sort(((e,r)=>compareBuild$1(r,e,t)));var rsort_1=rsort$1;const compare$8=compare_1,gt$4=(e,t,r)=>compare$8(e,t,r)>0;var gt_1=gt$4;const compare$7=compare_1,lt$3=(e,t,r)=>compare$7(e,t,r)<0;var lt_1=lt$3;const compare$6=compare_1,eq$2=(e,t,r)=>0===compare$6(e,t,r);var eq_1=eq$2;const compare$5=compare_1,neq$2=(e,t,r)=>0!==compare$5(e,t,r);var neq_1=neq$2;const compare$4=compare_1,gte$3=(e,t,r)=>compare$4(e,t,r)>=0;var gte_1=gte$3;const compare$3=compare_1,lte$3=(e,t,r)=>compare$3(e,t,r)<=0;var lte_1=lte$3;const eq$1=eq_1,neq$1=neq_1,gt$3=gt_1,gte$2=gte_1,lt$2=lt_1,lte$2=lte_1,cmp$2=(e,t,r,s)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return eq$1(e,r,s);case"!=":return neq$1(e,r,s);case">":return gt$3(e,r,s);case">=":return gte$2(e,r,s);case"<":return lt$2(e,r,s);case"<=":return lte$2(e,r,s);default:throw new TypeError(`Invalid operator: ${t}`)}};var cmp_1=cmp$2;const SemVer$7=semver$1,parse$1=parse_1,{safeRe:re$2,t:t$2}=re$4.exports,coerce$1=(e,t)=>{if(e instanceof SemVer$7)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const s=t.includePrerelease?re$2[t$2.COERCERTLFULL]:re$2[t$2.COERCERTL];let i;for(;(i=s.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),s.lastIndex=i.index+i[1].length+i[2].length;s.lastIndex=-1}else r=e.match(t.includePrerelease?re$2[t$2.COERCEFULL]:re$2[t$2.COERCE]);if(null===r)return null;const s=r[2],i=r[3]||"0",a=r[4]||"0",o=t.includePrerelease&&r[5]?`-${r[5]}`:"",n=t.includePrerelease&&r[6]?`+${r[6]}`:"";return parse$1(`${s}.${i}.${a}${o}${n}`,t)};var coerce_1=coerce$1,yallist=Yallist$1;function Yallist$1(e){var t=this;if(t instanceof Yallist$1||(t=new Yallist$1),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)t.push(arguments[r]);return t}function insert(e,t,r){var s=t===e.head?new Node(r,null,t,e):new Node(r,t,t.next,e);return null===s.next&&(e.tail=s),null===s.prev&&(e.head=s),e.length++,s}function push(e,t){e.tail=new Node(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Node(e,t,r,s){if(!(this instanceof Node))return new Node(e,t,r,s);this.list=s,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}Yallist$1.Node=Node,Yallist$1.create=Yallist$1,Yallist$1.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},Yallist$1.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},Yallist$1.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},Yallist$1.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)push(this,arguments[e]);return this.length},Yallist$1.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)unshift(this,arguments[e]);return this.length},Yallist$1.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},Yallist$1.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},Yallist$1.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,s=0;null!==r;s++)e.call(t,r.value,s,this),r=r.next},Yallist$1.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,s=this.length-1;null!==r;s--)e.call(t,r.value,s,this),r=r.prev},Yallist$1.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},Yallist$1.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},Yallist$1.prototype.map=function(e,t){t=t||this;for(var r=new Yallist$1,s=this.head;null!==s;)r.push(e.call(t,s.value,this)),s=s.next;return r},Yallist$1.prototype.mapReverse=function(e,t){t=t||this;for(var r=new Yallist$1,s=this.tail;null!==s;)r.push(e.call(t,s.value,this)),s=s.prev;return r},Yallist$1.prototype.reduce=function(e,t){var r,s=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");s=this.head.next,r=this.head.value}for(var i=0;null!==s;i++)r=e(r,s.value,i),s=s.next;return r},Yallist$1.prototype.reduceReverse=function(e,t){var r,s=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");s=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==s;i--)r=e(r,s.value,i),s=s.prev;return r},Yallist$1.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},Yallist$1.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},Yallist$1.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;for(;null!==i&&s<t;s++,i=i.next)r.push(i.value);return r},Yallist$1.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=this.length,i=this.tail;null!==i&&s>t;s--)i=i.prev;for(;null!==i&&s>e;s--,i=i.prev)r.push(i.value);return r},Yallist$1.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;var a=[];for(s=0;i&&s<t;s++)a.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(s=0;s<r.length;s++)i=insert(this,i,r[s]);return a},Yallist$1.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var s=r.prev;r.prev=r.next,r.next=s}return this.head=t,this.tail=e,this};try{require("./iterator.js")(Yallist$1)}catch(e){}const Yallist=yallist,MAX=Symbol("max"),LENGTH=Symbol("length"),LENGTH_CALCULATOR=Symbol("lengthCalculator"),ALLOW_STALE=Symbol("allowStale"),MAX_AGE=Symbol("maxAge"),DISPOSE=Symbol("dispose"),NO_DISPOSE_ON_SET=Symbol("noDisposeOnSet"),LRU_LIST=Symbol("lruList"),CACHE=Symbol("cache"),UPDATE_AGE_ON_GET=Symbol("updateAgeOnGet"),naiveLength=()=>1;class LRUCache{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[MAX]=e.max||1/0;const t=e.length||naiveLength;if(this[LENGTH_CALCULATOR]="function"!=typeof t?naiveLength:t,this[ALLOW_STALE]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[MAX_AGE]=e.maxAge||0,this[DISPOSE]=e.dispose,this[NO_DISPOSE_ON_SET]=e.noDisposeOnSet||!1,this[UPDATE_AGE_ON_GET]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[MAX]=e||1/0,trim(this)}get max(){return this[MAX]}set allowStale(e){this[ALLOW_STALE]=!!e}get allowStale(){return this[ALLOW_STALE]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[MAX_AGE]=e,trim(this)}get maxAge(){return this[MAX_AGE]}set lengthCalculator(e){"function"!=typeof e&&(e=naiveLength),e!==this[LENGTH_CALCULATOR]&&(this[LENGTH_CALCULATOR]=e,this[LENGTH]=0,this[LRU_LIST].forEach((e=>{e.length=this[LENGTH_CALCULATOR](e.value,e.key),this[LENGTH]+=e.length}))),trim(this)}get lengthCalculator(){return this[LENGTH_CALCULATOR]}get length(){return this[LENGTH]}get itemCount(){return this[LRU_LIST].length}rforEach(e,t){t=t||this;for(let r=this[LRU_LIST].tail;null!==r;){const s=r.prev;forEachStep(this,e,r,t),r=s}}forEach(e,t){t=t||this;for(let r=this[LRU_LIST].head;null!==r;){const s=r.next;forEachStep(this,e,r,t),r=s}}keys(){return this[LRU_LIST].toArray().map((e=>e.key))}values(){return this[LRU_LIST].toArray().map((e=>e.value))}reset(){this[DISPOSE]&&this[LRU_LIST]&&this[LRU_LIST].length&&this[LRU_LIST].forEach((e=>this[DISPOSE](e.key,e.value))),this[CACHE]=new Map,this[LRU_LIST]=new Yallist,this[LENGTH]=0}dump(){return this[LRU_LIST].map((e=>!isStale(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[LRU_LIST]}set(e,t,r){if((r=r||this[MAX_AGE])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const s=r?Date.now():0,i=this[LENGTH_CALCULATOR](t,e);if(this[CACHE].has(e)){if(i>this[MAX])return del(this,this[CACHE].get(e)),!1;const a=this[CACHE].get(e).value;return this[DISPOSE]&&(this[NO_DISPOSE_ON_SET]||this[DISPOSE](e,a.value)),a.now=s,a.maxAge=r,a.value=t,this[LENGTH]+=i-a.length,a.length=i,this.get(e),trim(this),!0}const a=new Entry(e,t,i,s,r);return a.length>this[MAX]?(this[DISPOSE]&&this[DISPOSE](e,t),!1):(this[LENGTH]+=a.length,this[LRU_LIST].unshift(a),this[CACHE].set(e,this[LRU_LIST].head),trim(this),!0)}has(e){if(!this[CACHE].has(e))return!1;const t=this[CACHE].get(e).value;return!isStale(this,t)}get(e){return get(this,e,!0)}peek(e){return get(this,e,!1)}pop(){const e=this[LRU_LIST].tail;return e?(del(this,e),e.value):null}del(e){del(this,this[CACHE].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r],i=s.e||0;if(0===i)this.set(s.k,s.v);else{const e=i-t;e>0&&this.set(s.k,s.v,e)}}}prune(){this[CACHE].forEach(((e,t)=>get(this,t,!1)))}}const get=(e,t,r)=>{const s=e[CACHE].get(t);if(s){const t=s.value;if(isStale(e,t)){if(del(e,s),!e[ALLOW_STALE])return}else r&&(e[UPDATE_AGE_ON_GET]&&(s.value.now=Date.now()),e[LRU_LIST].unshiftNode(s));return t.value}},isStale=(e,t)=>{if(!t||!t.maxAge&&!e[MAX_AGE])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[MAX_AGE]&&r>e[MAX_AGE]},trim=e=>{if(e[LENGTH]>e[MAX])for(let t=e[LRU_LIST].tail;e[LENGTH]>e[MAX]&&null!==t;){const r=t.prev;del(e,t),t=r}},del=(e,t)=>{if(t){const r=t.value;e[DISPOSE]&&e[DISPOSE](r.key,r.value),e[LENGTH]-=r.length,e[CACHE].delete(r.key),e[LRU_LIST].removeNode(t)}};class Entry{constructor(e,t,r,s,i){this.key=e,this.value=t,this.length=r,this.now=s,this.maxAge=i||0}}const forEachStep=(e,t,r,s)=>{let i=r.value;isStale(e,i)&&(del(e,r),e[ALLOW_STALE]||(i=void 0)),i&&t.call(s,i.value,i.key,e)};var lruCache=LRUCache;class Range$b{constructor(e,t){if(t=parseOptions$1(t),e instanceof Range$b)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Range$b(e.raw,t);if(e instanceof Comparator$4)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!isNullSet(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&isAny(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&FLAG_INCLUDE_PRERELEASE)|(this.options.loose&&FLAG_LOOSE))+":"+e,r=cache.get(t);if(r)return r;const s=this.options.loose,i=s?re$1[t$1.HYPHENRANGELOOSE]:re$1[t$1.HYPHENRANGE];e=e.replace(i,hyphenReplace(this.options.includePrerelease)),debug$1("hyphen replace",e),e=e.replace(re$1[t$1.COMPARATORTRIM],comparatorTrimReplace),debug$1("comparator trim",e),e=e.replace(re$1[t$1.TILDETRIM],tildeTrimReplace),debug$1("tilde trim",e),e=e.replace(re$1[t$1.CARETTRIM],caretTrimReplace),debug$1("caret trim",e);let a=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));s&&(a=a.filter((e=>(debug$1("loose invalid filter",e,this.options),!!e.match(re$1[t$1.COMPARATORLOOSE]))))),debug$1("range list",a);const o=new Map,n=a.map((e=>new Comparator$4(e,this.options)));for(const e of n){if(isNullSet(e))return[e];o.set(e.value,e)}o.size>1&&o.has("")&&o.delete("");const l=[...o.values()];return cache.set(t,l),l}intersects(e,t){if(!(e instanceof Range$b))throw new TypeError("a Range is required");return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new SemVer$6(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(testSet(this.set[t],e,this.options))return!0;return!1}}var range=Range$b;const LRU=lruCache,cache=new LRU({max:1e3}),parseOptions$1=parseOptions_1,Comparator$4=comparator,debug$1=debug_1,SemVer$6=semver$1,{safeRe:re$1,t:t$1,comparatorTrimReplace:comparatorTrimReplace,tildeTrimReplace:tildeTrimReplace,caretTrimReplace:caretTrimReplace}=re$4.exports,{FLAG_INCLUDE_PRERELEASE:FLAG_INCLUDE_PRERELEASE,FLAG_LOOSE:FLAG_LOOSE}=constants$1,isNullSet=e=>"<0.0.0-0"===e.value,isAny=e=>""===e.value,isSatisfiable=(e,t)=>{let r=!0;const s=e.slice();let i=s.pop();for(;r&&s.length;)r=s.every((e=>i.intersects(e,t))),i=s.pop();return r},parseComparator=(e,t)=>(debug$1("comp",e,t),e=replaceCarets(e,t),debug$1("caret",e),e=replaceTildes(e,t),debug$1("tildes",e),e=replaceXRanges(e,t),debug$1("xrange",e),e=replaceStars(e,t),debug$1("stars",e),e),isX=e=>!e||"x"===e.toLowerCase()||"*"===e,replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" "),replaceTilde=(e,t)=>{const r=t.loose?re$1[t$1.TILDELOOSE]:re$1[t$1.TILDE];return e.replace(r,((t,r,s,i,a)=>{let o;return debug$1("tilde",e,t,r,s,i,a),isX(r)?o="":isX(s)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:isX(i)?o=`>=${r}.${s}.0 <${r}.${+s+1}.0-0`:a?(debug$1("replaceTilde pr",a),o=`>=${r}.${s}.${i}-${a} <${r}.${+s+1}.0-0`):o=`>=${r}.${s}.${i} <${r}.${+s+1}.0-0`,debug$1("tilde return",o),o}))},replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" "),replaceCaret=(e,t)=>{debug$1("caret",e,t);const r=t.loose?re$1[t$1.CARETLOOSE]:re$1[t$1.CARET],s=t.includePrerelease?"-0":"";return e.replace(r,((t,r,i,a,o)=>{let n;return debug$1("caret",e,t,r,i,a,o),isX(r)?n="":isX(i)?n=`>=${r}.0.0${s} <${+r+1}.0.0-0`:isX(a)?n="0"===r?`>=${r}.${i}.0${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${s} <${+r+1}.0.0-0`:o?(debug$1("replaceCaret pr",o),n="0"===r?"0"===i?`>=${r}.${i}.${a}-${o} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}-${o} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a}-${o} <${+r+1}.0.0-0`):(debug$1("no pr"),n="0"===r?"0"===i?`>=${r}.${i}.${a}${s} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a} <${+r+1}.0.0-0`),debug$1("caret return",n),n}))},replaceXRanges=(e,t)=>(debug$1("replaceXRanges",e,t),e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")),replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?re$1[t$1.XRANGELOOSE]:re$1[t$1.XRANGE];return e.replace(r,((r,s,i,a,o,n)=>{debug$1("xRange",e,r,s,i,a,o,n);const l=isX(i),h=l||isX(a),p=h||isX(o),c=p;return"="===s&&c&&(s=""),n=t.includePrerelease?"-0":"",l?r=">"===s||"<"===s?"<0.0.0-0":"*":s&&c?(h&&(a=0),o=0,">"===s?(s=">=",h?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===s&&(s="<",h?i=+i+1:a=+a+1),"<"===s&&(n="-0"),r=`${s+i}.${a}.${o}${n}`):h?r=`>=${i}.0.0${n} <${+i+1}.0.0-0`:p&&(r=`>=${i}.${a}.0${n} <${i}.${+a+1}.0-0`),debug$1("xRange return",r),r}))},replaceStars=(e,t)=>(debug$1("replaceStars",e,t),e.trim().replace(re$1[t$1.STAR],"")),replaceGTE0=(e,t)=>(debug$1("replaceGTE0",e,t),e.trim().replace(re$1[t.includePrerelease?t$1.GTE0PRE:t$1.GTE0],"")),hyphenReplace=e=>(t,r,s,i,a,o,n,l,h,p,c,u,m)=>`${r=isX(s)?"":isX(i)?`>=${s}.0.0${e?"-0":""}`:isX(a)?`>=${s}.${i}.0${e?"-0":""}`:o?`>=${r}`:`>=${r}${e?"-0":""}`} ${l=isX(h)?"":isX(p)?`<${+h+1}.0.0-0`:isX(c)?`<${h}.${+p+1}.0-0`:u?`<=${h}.${p}.${c}-${u}`:e?`<${h}.${p}.${+c+1}-0`:`<=${l}`}`.trim(),testSet=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(debug$1(e[r].semver),e[r].semver!==Comparator$4.ANY&&e[r].semver.prerelease.length>0){const s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0},ANY$2=Symbol("SemVer ANY");class Comparator$3{static get ANY(){return ANY$2}constructor(e,t){if(t=parseOptions(t),e instanceof Comparator$3){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),debug("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ANY$2?this.value="":this.value=this.operator+this.semver.version,debug("comp",this)}parse(e){const r=this.options.loose?re[t.COMPARATORLOOSE]:re[t.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==s[1]?s[1]:"","="===this.operator&&(this.operator=""),s[2]?this.semver=new SemVer$5(s[2],this.options.loose):this.semver=ANY$2}toString(){return this.value}test(e){if(debug("Comparator.test",e,this.options.loose),this.semver===ANY$2||e===ANY$2)return!0;if("string"==typeof e)try{e=new SemVer$5(e,this.options)}catch(e){return!1}return cmp$1(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator$3))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new Range$a(e.value,t).test(this.value):""===e.operator?""===e.value||new Range$a(this.value,t).test(e.semver):(!(t=parseOptions(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(cmp$1(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(cmp$1(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}var comparator=Comparator$3;const parseOptions=parseOptions_1,{safeRe:re,t:t}=re$4.exports,cmp$1=cmp_1,debug=debug_1,SemVer$5=semver$1,Range$a=range,Range$9=range,satisfies$4=(e,t,r)=>{try{t=new Range$9(t,r)}catch(e){return!1}return t.test(e)};var satisfies_1=satisfies$4;const Range$8=range,toComparators$1=(e,t)=>new Range$8(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));var toComparators_1=toComparators$1;const SemVer$4=semver$1,Range$7=range,maxSatisfying$1=(e,t,r)=>{let s=null,i=null,a=null;try{a=new Range$7(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&-1!==i.compare(e)||(s=e,i=new SemVer$4(s,r)))})),s};var maxSatisfying_1=maxSatisfying$1;const SemVer$3=semver$1,Range$6=range,minSatisfying$1=(e,t,r)=>{let s=null,i=null,a=null;try{a=new Range$6(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&1!==i.compare(e)||(s=e,i=new SemVer$3(s,r)))})),s};var minSatisfying_1=minSatisfying$1;const SemVer$2=semver$1,Range$5=range,gt$2=gt_1,minVersion$1=(e,t)=>{e=new Range$5(e,t);let r=new SemVer$2("0.0.0");if(e.test(r))return r;if(r=new SemVer$2("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const s=e.set[t];let i=null;s.forEach((e=>{const t=new SemVer$2(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!gt$2(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||r&&!gt$2(r,i)||(r=i)}return r&&e.test(r)?r:null};var minVersion_1=minVersion$1;const Range$4=range,validRange$1=(e,t)=>{try{return new Range$4(e,t).range||"*"}catch(e){return null}};var valid$1=validRange$1;const SemVer$1=semver$1,Comparator$2=comparator,{ANY:ANY$1}=Comparator$2,Range$3=range,satisfies$3=satisfies_1,gt$1=gt_1,lt$1=lt_1,lte$1=lte_1,gte$1=gte_1,outside$3=(e,t,r,s)=>{let i,a,o,n,l;switch(e=new SemVer$1(e,s),t=new Range$3(t,s),r){case">":i=gt$1,a=lte$1,o=lt$1,n=">",l=">=";break;case"<":i=lt$1,a=gte$1,o=gt$1,n="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies$3(e,t,s))return!1;for(let r=0;r<t.set.length;++r){const h=t.set[r];let p=null,c=null;if(h.forEach((e=>{e.semver===ANY$1&&(e=new Comparator$2(">=0.0.0")),p=p||e,c=c||e,i(e.semver,p.semver,s)?p=e:o(e.semver,c.semver,s)&&(c=e)})),p.operator===n||p.operator===l)return!1;if((!c.operator||c.operator===n)&&a(e,c.semver))return!1;if(c.operator===l&&o(e,c.semver))return!1}return!0};var outside_1=outside$3;const outside$2=outside_1,gtr$1=(e,t,r)=>outside$2(e,t,">",r);var gtr_1=gtr$1;const outside$1=outside_1,ltr$1=(e,t,r)=>outside$1(e,t,"<",r);var ltr_1=ltr$1;const Range$2=range,intersects$1=(e,t,r)=>(e=new Range$2(e,r),t=new Range$2(t,r),e.intersects(t,r));var intersects_1=intersects$1;const satisfies$2=satisfies_1,compare$2=compare_1;var simplify=(e,t,r)=>{const s=[];let i=null,a=null;const o=e.sort(((e,t)=>compare$2(e,t,r)));for(const e of o){satisfies$2(e,t,r)?(a=e,i||(i=e)):(a&&s.push([i,a]),a=null,i=null)}i&&s.push([i,null]);const n=[];for(const[e,t]of s)e===t?n.push(e):t||e!==o[0]?t?e===o[0]?n.push(`<=${t}`):n.push(`${e} - ${t}`):n.push(`>=${e}`):n.push("*");const l=n.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return l.length<h.length?l:t};const Range$1=range,Comparator$1=comparator,{ANY:ANY}=Comparator$1,satisfies$1=satisfies_1,compare$1=compare_1,subset$1=(e,t,r={})=>{if(e===t)return!0;e=new Range$1(e,r),t=new Range$1(t,r);let s=!1;e:for(const i of e.set){for(const e of t.set){const t=simpleSubset(i,e,r);if(s=s||null!==t,t)continue e}if(s)return!1}return!0},minimumVersionWithPreRelease=[new Comparator$1(">=0.0.0-0")],minimumVersion=[new Comparator$1(">=0.0.0")],simpleSubset=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===ANY){if(1===t.length&&t[0].semver===ANY)return!0;e=r.includePrerelease?minimumVersionWithPreRelease:minimumVersion}if(1===t.length&&t[0].semver===ANY){if(r.includePrerelease)return!0;t=minimumVersion}const s=new Set;let i,a,o,n,l,h,p;for(const t of e)">"===t.operator||">="===t.operator?i=higherGT(i,t,r):"<"===t.operator||"<="===t.operator?a=lowerLT(a,t,r):s.add(t.semver);if(s.size>1)return null;if(i&&a){if(o=compare$1(i.semver,a.semver,r),o>0)return null;if(0===o&&(">="!==i.operator||"<="!==a.operator))return null}for(const e of s){if(i&&!satisfies$1(e,String(i),r))return null;if(a&&!satisfies$1(e,String(a),r))return null;for(const s of t)if(!satisfies$1(e,String(s),r))return!1;return!0}let c=!(!a||r.includePrerelease||!a.semver.prerelease.length)&&a.semver,u=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;c&&1===c.prerelease.length&&"<"===a.operator&&0===c.prerelease[0]&&(c=!1);for(const e of t){if(p=p||">"===e.operator||">="===e.operator,h=h||"<"===e.operator||"<="===e.operator,i)if(u&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===u.major&&e.semver.minor===u.minor&&e.semver.patch===u.patch&&(u=!1),">"===e.operator||">="===e.operator){if(n=higherGT(i,e,r),n===e&&n!==i)return!1}else if(">="===i.operator&&!satisfies$1(i.semver,String(e),r))return!1;if(a)if(c&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===c.major&&e.semver.minor===c.minor&&e.semver.patch===c.patch&&(c=!1),"<"===e.operator||"<="===e.operator){if(l=lowerLT(a,e,r),l===e&&l!==a)return!1}else if("<="===a.operator&&!satisfies$1(a.semver,String(e),r))return!1;if(!e.operator&&(a||i)&&0!==o)return!1}return!(i&&h&&!a&&0!==o)&&(!(a&&p&&!i&&0!==o)&&(!u&&!c))},higherGT=(e,t,r)=>{if(!e)return t;const s=compare$1(e.semver,t.semver,r);return s>0?e:s<0||">"===t.operator&&">="===e.operator?t:e},lowerLT=(e,t,r)=>{if(!e)return t;const s=compare$1(e.semver,t.semver,r);return s<0?e:s>0||"<"===t.operator&&"<="===e.operator?t:e};var subset_1=subset$1;const internalRe=re$4.exports,constants=constants$1,SemVer=semver$1,identifiers=identifiers$1,parse=parse_1,valid=valid_1,clean=clean_1,inc=inc_1,diff=diff_1,major=major_1,minor=minor_1,patch=patch_1,prerelease=prerelease_1,compare=compare_1,rcompare=rcompare_1,compareLoose=compareLoose_1,compareBuild=compareBuild_1,sort=sort_1,rsort=rsort_1,gt=gt_1,lt=lt_1,eq=eq_1,neq=neq_1,gte=gte_1,lte=lte_1,cmp=cmp_1,coerce=coerce_1,Comparator=comparator,Range=range,satisfies=satisfies_1,toComparators=toComparators_1,maxSatisfying=maxSatisfying_1,minSatisfying=minSatisfying_1,minVersion=minVersion_1,validRange=valid$1,outside=outside_1,gtr=gtr_1,ltr=ltr_1,intersects=intersects_1,simplifyRange=simplify,subset=subset_1;var semver={parse:parse,valid:valid,clean:clean,inc:inc,diff:diff,major:major,minor:minor,patch:patch,prerelease:prerelease,compare:compare,rcompare:rcompare,compareLoose:compareLoose,compareBuild:compareBuild,sort:sort,rsort:rsort,gt:gt,lt:lt,eq:eq,neq:neq,gte:gte,lte:lte,cmp:cmp,coerce:coerce,Comparator:Comparator,Range:Range,satisfies:satisfies,toComparators:toComparators,maxSatisfying:maxSatisfying,minSatisfying:minSatisfying,minVersion:minVersion,validRange:validRange,outside:outside,gtr:gtr,ltr:ltr,intersects:intersects,simplifyRange:simplifyRange,subset:subset,SemVer:SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants.SEMVER_SPEC_VERSION,RELEASE_TYPES:constants.RELEASE_TYPES,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers},preload=semver;const pdfApplicationCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{display:block}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.m-4{margin:1rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfApplicationStyle0=pdfApplicationCss,PdfApplication=class{constructor(e){registerInstance(this,e),this.apiError=createEvent(this,"apiError",7),this.sessionService=new SessionService,this.fileService=new FileService,this.logger=createLogger("PdfApplication"),this.apiErrorHandler=e=>{this.apiError?this.apiError.emit(e):console.error("Unhandled API error",e)},this.authenticated=new ApiLoading,this.versionInfo=new ApiLoading,this.publickey=void 0,this.privatekey=void 0,this.apiBaseUrl=void 0,this.sessionsurl=void 0}async getAbout(){var e,t,r;this.logger.debug("Get diagnostics");const s=null!==(e=this.versionInfo)&&void 0!==e?e:await this.sessionService.getVersion();return{npmVersion:LIB_VERSION,apiBaseUrl:state.apiBaseUrl,publicKey:state.publicKey,apiVersion:s.error?`error: ${s.error.code} - ${s.error.message}`:null!==(r=null===(t=s.value)||void 0===t?void 0:t.apiVersion)&&void 0!==r?r:"error: could not read api version"}}async getDocuments(){this.logger.debug("Get documents");return(await this.fileService.getDocuments()).value||[]}async deleteDocument(e){this.logger.debug("Delete single document"),await this.fileService.deleteDocuments([e])}async deleteDocuments(e){this.logger.debug("Delete multiple document"),await this.fileService.deleteDocuments(e)}async createDocument(e,t,r){return this.logger.debug("Create new document"),await this.fileService.createDocument(e,t,null!=r?r:null)}async componentWillLoad(){this.logger.debug("Starting..."),this.configure(),await this.versionCheck(),await this.login(),this.authenticated.value&&await this.loadStandardFonts()}componentDidLoad(){this.logger.debug("Started")}disconnectedCallback(){this.sessionService.onUnmounted()}configure(){state.apiBaseUrl=this.apiBaseUrl||Env.API_BASE_URL,this.logger.debug(`apiBaseURL: ${state.apiBaseUrl}`),state.publicKey=this.publickey||Env.API_PUBLIC_KEY,state.privateKey=this.privatekey||Env.API_PRIVATE_KEY,this.sessionsurl&&(state.sessionsUrl=this.sessionsurl),state.apiErrorHandler=this.apiErrorHandler,this.sessionService.onMounted((e=>this.authenticated=e.map((e=>e>0))))}async versionCheck(){this.versionInfo=await this.sessionService.getVersion()}async login(){this.authenticated=(await this.sessionService.login()).map((e=>e>0))}async logout(){this.authenticated=await this.sessionService.logout()}async loadStandardFonts(){var e;this.logger.debug("Setting standard fonts");null===(e=(await this.fileService.getStandardFonts()).value)||void 0===e||e.forEach((async e=>{await addFontFace(e.fontId,e.fontData,document)}))}render(){if(this.authenticated.loading||this.versionInfo.loading)return h(Host,null,h("div",{class:"m-4"},"Loading..."));if(this.versionInfo.error)return h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Api unavailable:"),h("div",{class:"text-red-600"},this.versionInfo.error.code," - ",this.versionInfo.error.message)));if(this.versionInfo.value&&(preload.lt(this.versionInfo.value.apiVersion,Env.API_MINIMUM_VERSION)||preload.lt(LIB_VERSION,this.versionInfo.value.minimumNpmPackageVersion))){let e=preload.lt(this.versionInfo.value.apiVersion,Env.API_MINIMUM_VERSION),t=preload.lt(LIB_VERSION,this.versionInfo.value.minimumNpmPackageVersion);return this.logger.error(e?`Api version ${this.versionInfo.value.apiVersion} is too low. Must be at least ${Env.API_MINIMUM_VERSION}.`:`Package version ${LIB_VERSION} is too low. Must be at least ${this.versionInfo.value.minimumNpmPackageVersion}.`),h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Api and npm package version mismatch:"),h("div",{class:"text-red-600"},e&&h("span",null,"The version of the Api used is not supported. Current Api version: ",this.versionInfo.value.apiVersion,". Current version of this package requires at least version ",Env.API_MINIMUM_VERSION," of the Api."),t&&h("span",null,"This version of the npm package is no longer supported by the Api. You current version: ",LIB_VERSION,". Please upgrade to ",this.versionInfo.value.minimumNpmPackageVersion," or above."))))}return this.authenticated.error?h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Error logging in:"),h("div",{class:"text-red-600"},this.authenticated.error.code," - ",this.authenticated.error.message))):void 0}};PdfApplication.style=PdfApplicationStyle0;export{PdfApplication as pdf_application}; | ||
import{r as registerInstance,c as createEvent,E as Env,h,H as Host}from"./index-ad2fce19.js";import{S as SessionService,n as createLogger,a as ApiLoading,s as state}from"./ApiClient-c838e5e9.js";import{F as FileService}from"./FileService-7bd3d04f.js";import{a as addFontFace}from"./insertFonts-93b7c521.js";const LIB_VERSION="1.2.12-fe3b6350";var re$4={exports:{}};const SEMVER_SPEC_VERSION="2.0.0",MAX_LENGTH$1=256,MAX_SAFE_INTEGER$1=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,MAX_SAFE_BUILD_LENGTH=250,RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var constants$1={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$1,RELEASE_TYPES:RELEASE_TYPES,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const debug$3="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var debug_1=debug$3;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:i}=constants$1,a=debug_1,o=(t=e.exports={}).re=[],n=t.safeRe=[],l=t.src=[],h=t.t={};let p=0;const c="[a-zA-Z0-9-]",u=[["\\s",1],["\\d",i],[c,s]],m=(e,t,r)=>{const s=(e=>{for(const[t,r]of u)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),i=p++;a(e,i,t),h[e]=i,l[i]=t,o[i]=new RegExp(t,r?"g":void 0),n[i]=new RegExp(s,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${c}*`),m("MAINVERSION",`(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${l[h.NUMERICIDENTIFIER]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${l[h.NUMERICIDENTIFIERLOOSE]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASE",`(?:-(${l[h.PRERELEASEIDENTIFIER]}(?:\\.${l[h.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${l[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[h.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${c}+`),m("BUILD",`(?:\\+(${l[h.BUILDIDENTIFIER]}(?:\\.${l[h.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${l[h.MAINVERSION]}${l[h.PRERELEASE]}?${l[h.BUILD]}?`),m("FULL",`^${l[h.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${l[h.MAINVERSIONLOOSE]}${l[h.PRERELEASELOOSE]}?${l[h.BUILD]}?`),m("LOOSE",`^${l[h.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${l[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${l[h.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:${l[h.PRERELEASE]})?${l[h.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:${l[h.PRERELEASELOOSE]})?${l[h.BUILD]}?)?)?`),m("XRANGE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),m("COERCE",`${l[h.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",l[h.COERCEPLAIN]+`(?:${l[h.PRERELEASE]})?`+`(?:${l[h.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",l[h.COERCE],!0),m("COERCERTLFULL",l[h.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${l[h.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${l[h.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${l[h.LONECARET]}${l[h.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${l[h.LONECARET]}${l[h.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${l[h.GTLT]}\\s*(${l[h.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]}|${l[h.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${l[h.XRANGEPLAIN]})\\s+-\\s+(${l[h.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${l[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[h.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(re$4,re$4.exports);const looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({}),parseOptions$3=e=>e?"object"!=typeof e?looseOption:e:emptyOpts;var parseOptions_1=parseOptions$3;const numeric=/^[0-9]+$/,compareIdentifiers$1=(e,t)=>{const r=numeric.test(e),s=numeric.test(t);return r&&s&&(e=+e,t=+t),e===t?0:r&&!s?-1:s&&!r?1:e<t?-1:1},rcompareIdentifiers=(e,t)=>compareIdentifiers$1(t,e);var identifiers$1={compareIdentifiers:compareIdentifiers$1,rcompareIdentifiers:rcompareIdentifiers};const debug$2=debug_1,{MAX_LENGTH:MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER}=constants$1,{safeRe:re$3,t:t$3}=re$4.exports,parseOptions$2=parseOptions_1,{compareIdentifiers:compareIdentifiers}=identifiers$1;class SemVer$f{constructor(e,t){if(t=parseOptions$2(t),e instanceof SemVer$f){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug$2("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?re$3[t$3.LOOSE]:re$3[t$3.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>MAX_SAFE_INTEGER||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<MAX_SAFE_INTEGER)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(debug$2("SemVer.compare",this.version,this.options,e),!(e instanceof SemVer$f)){if("string"==typeof e&&e===this.version)return 0;e=new SemVer$f(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),compareIdentifiers(this.major,e.major)||compareIdentifiers(this.minor,e.minor)||compareIdentifiers(this.patch,e.patch)}comparePre(e){if(e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],s=e.prerelease[t];if(debug$2("prerelease compare",t,r,s),void 0===r&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===r)return-1;if(r!==s)return compareIdentifiers(r,s)}while(++t)}compareBuild(e){e instanceof SemVer$f||(e=new SemVer$f(e,this.options));let t=0;do{const r=this.build[t],s=e.build[t];if(debug$2("prerelease compare",t,r,s),void 0===r&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===r)return-1;if(r!==s)return compareIdentifiers(r,s)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let s=this.prerelease.length;for(;--s>=0;)"number"==typeof this.prerelease[s]&&(this.prerelease[s]++,s=-2);if(-1===s){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let s=[t,e];!1===r&&(s=[t]),0===compareIdentifiers(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}var semver$1=SemVer$f;const SemVer$e=semver$1,parse$6=(e,t,r=!1)=>{if(e instanceof SemVer$e)return e;try{return new SemVer$e(e,t)}catch(e){if(!r)return null;throw e}};var parse_1=parse$6;const parse$5=parse_1,valid$2=(e,t)=>{const r=parse$5(e,t);return r?r.version:null};var valid_1=valid$2;const parse$4=parse_1,clean$1=(e,t)=>{const r=parse$4(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var clean_1=clean$1;const SemVer$d=semver$1,inc$1=(e,t,r,s,i)=>{"string"==typeof r&&(i=s,s=r,r=void 0);try{return new SemVer$d(e instanceof SemVer$d?e.version:e,r).inc(t,s,i).version}catch(e){return null}};var inc_1=inc$1;const parse$3=parse_1,diff$1=(e,t)=>{const r=parse$3(e,null,!0),s=parse$3(t,null,!0),i=r.compare(s);if(0===i)return null;const a=i>0,o=a?r:s,n=a?s:r,l=!!o.prerelease.length;if(!!n.prerelease.length&&!l)return n.patch||n.minor?o.patch?"patch":o.minor?"minor":"major":"major";const h=l?"pre":"";return r.major!==s.major?h+"major":r.minor!==s.minor?h+"minor":r.patch!==s.patch?h+"patch":"prerelease"};var diff_1=diff$1;const SemVer$c=semver$1,major$1=(e,t)=>new SemVer$c(e,t).major;var major_1=major$1;const SemVer$b=semver$1,minor$1=(e,t)=>new SemVer$b(e,t).minor;var minor_1=minor$1;const SemVer$a=semver$1,patch$1=(e,t)=>new SemVer$a(e,t).patch;var patch_1=patch$1;const parse$2=parse_1,prerelease$1=(e,t)=>{const r=parse$2(e,t);return r&&r.prerelease.length?r.prerelease:null};var prerelease_1=prerelease$1;const SemVer$9=semver$1,compare$b=(e,t,r)=>new SemVer$9(e,r).compare(new SemVer$9(t,r));var compare_1=compare$b;const compare$a=compare_1,rcompare$1=(e,t,r)=>compare$a(t,e,r);var rcompare_1=rcompare$1;const compare$9=compare_1,compareLoose$1=(e,t)=>compare$9(e,t,!0);var compareLoose_1=compareLoose$1;const SemVer$8=semver$1,compareBuild$3=(e,t,r)=>{const s=new SemVer$8(e,r),i=new SemVer$8(t,r);return s.compare(i)||s.compareBuild(i)};var compareBuild_1=compareBuild$3;const compareBuild$2=compareBuild_1,sort$1=(e,t)=>e.sort(((e,r)=>compareBuild$2(e,r,t)));var sort_1=sort$1;const compareBuild$1=compareBuild_1,rsort$1=(e,t)=>e.sort(((e,r)=>compareBuild$1(r,e,t)));var rsort_1=rsort$1;const compare$8=compare_1,gt$4=(e,t,r)=>compare$8(e,t,r)>0;var gt_1=gt$4;const compare$7=compare_1,lt$3=(e,t,r)=>compare$7(e,t,r)<0;var lt_1=lt$3;const compare$6=compare_1,eq$2=(e,t,r)=>0===compare$6(e,t,r);var eq_1=eq$2;const compare$5=compare_1,neq$2=(e,t,r)=>0!==compare$5(e,t,r);var neq_1=neq$2;const compare$4=compare_1,gte$3=(e,t,r)=>compare$4(e,t,r)>=0;var gte_1=gte$3;const compare$3=compare_1,lte$3=(e,t,r)=>compare$3(e,t,r)<=0;var lte_1=lte$3;const eq$1=eq_1,neq$1=neq_1,gt$3=gt_1,gte$2=gte_1,lt$2=lt_1,lte$2=lte_1,cmp$2=(e,t,r,s)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return eq$1(e,r,s);case"!=":return neq$1(e,r,s);case">":return gt$3(e,r,s);case">=":return gte$2(e,r,s);case"<":return lt$2(e,r,s);case"<=":return lte$2(e,r,s);default:throw new TypeError(`Invalid operator: ${t}`)}};var cmp_1=cmp$2;const SemVer$7=semver$1,parse$1=parse_1,{safeRe:re$2,t:t$2}=re$4.exports,coerce$1=(e,t)=>{if(e instanceof SemVer$7)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const s=t.includePrerelease?re$2[t$2.COERCERTLFULL]:re$2[t$2.COERCERTL];let i;for(;(i=s.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),s.lastIndex=i.index+i[1].length+i[2].length;s.lastIndex=-1}else r=e.match(t.includePrerelease?re$2[t$2.COERCEFULL]:re$2[t$2.COERCE]);if(null===r)return null;const s=r[2],i=r[3]||"0",a=r[4]||"0",o=t.includePrerelease&&r[5]?`-${r[5]}`:"",n=t.includePrerelease&&r[6]?`+${r[6]}`:"";return parse$1(`${s}.${i}.${a}${o}${n}`,t)};var coerce_1=coerce$1,yallist=Yallist$1;function Yallist$1(e){var t=this;if(t instanceof Yallist$1||(t=new Yallist$1),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)t.push(arguments[r]);return t}function insert(e,t,r){var s=t===e.head?new Node(r,null,t,e):new Node(r,t,t.next,e);return null===s.next&&(e.tail=s),null===s.prev&&(e.head=s),e.length++,s}function push(e,t){e.tail=new Node(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Node(e,t,r,s){if(!(this instanceof Node))return new Node(e,t,r,s);this.list=s,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}Yallist$1.Node=Node,Yallist$1.create=Yallist$1,Yallist$1.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},Yallist$1.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},Yallist$1.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},Yallist$1.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)push(this,arguments[e]);return this.length},Yallist$1.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)unshift(this,arguments[e]);return this.length},Yallist$1.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},Yallist$1.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},Yallist$1.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,s=0;null!==r;s++)e.call(t,r.value,s,this),r=r.next},Yallist$1.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,s=this.length-1;null!==r;s--)e.call(t,r.value,s,this),r=r.prev},Yallist$1.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},Yallist$1.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},Yallist$1.prototype.map=function(e,t){t=t||this;for(var r=new Yallist$1,s=this.head;null!==s;)r.push(e.call(t,s.value,this)),s=s.next;return r},Yallist$1.prototype.mapReverse=function(e,t){t=t||this;for(var r=new Yallist$1,s=this.tail;null!==s;)r.push(e.call(t,s.value,this)),s=s.prev;return r},Yallist$1.prototype.reduce=function(e,t){var r,s=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");s=this.head.next,r=this.head.value}for(var i=0;null!==s;i++)r=e(r,s.value,i),s=s.next;return r},Yallist$1.prototype.reduceReverse=function(e,t){var r,s=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");s=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==s;i--)r=e(r,s.value,i),s=s.prev;return r},Yallist$1.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},Yallist$1.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},Yallist$1.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;for(;null!==i&&s<t;s++,i=i.next)r.push(i.value);return r},Yallist$1.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=this.length,i=this.tail;null!==i&&s>t;s--)i=i.prev;for(;null!==i&&s>e;s--,i=i.prev)r.push(i.value);return r},Yallist$1.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;var a=[];for(s=0;i&&s<t;s++)a.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(s=0;s<r.length;s++)i=insert(this,i,r[s]);return a},Yallist$1.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var s=r.prev;r.prev=r.next,r.next=s}return this.head=t,this.tail=e,this};try{require("./iterator.js")(Yallist$1)}catch(e){}const Yallist=yallist,MAX=Symbol("max"),LENGTH=Symbol("length"),LENGTH_CALCULATOR=Symbol("lengthCalculator"),ALLOW_STALE=Symbol("allowStale"),MAX_AGE=Symbol("maxAge"),DISPOSE=Symbol("dispose"),NO_DISPOSE_ON_SET=Symbol("noDisposeOnSet"),LRU_LIST=Symbol("lruList"),CACHE=Symbol("cache"),UPDATE_AGE_ON_GET=Symbol("updateAgeOnGet"),naiveLength=()=>1;class LRUCache{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[MAX]=e.max||1/0;const t=e.length||naiveLength;if(this[LENGTH_CALCULATOR]="function"!=typeof t?naiveLength:t,this[ALLOW_STALE]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[MAX_AGE]=e.maxAge||0,this[DISPOSE]=e.dispose,this[NO_DISPOSE_ON_SET]=e.noDisposeOnSet||!1,this[UPDATE_AGE_ON_GET]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[MAX]=e||1/0,trim(this)}get max(){return this[MAX]}set allowStale(e){this[ALLOW_STALE]=!!e}get allowStale(){return this[ALLOW_STALE]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[MAX_AGE]=e,trim(this)}get maxAge(){return this[MAX_AGE]}set lengthCalculator(e){"function"!=typeof e&&(e=naiveLength),e!==this[LENGTH_CALCULATOR]&&(this[LENGTH_CALCULATOR]=e,this[LENGTH]=0,this[LRU_LIST].forEach((e=>{e.length=this[LENGTH_CALCULATOR](e.value,e.key),this[LENGTH]+=e.length}))),trim(this)}get lengthCalculator(){return this[LENGTH_CALCULATOR]}get length(){return this[LENGTH]}get itemCount(){return this[LRU_LIST].length}rforEach(e,t){t=t||this;for(let r=this[LRU_LIST].tail;null!==r;){const s=r.prev;forEachStep(this,e,r,t),r=s}}forEach(e,t){t=t||this;for(let r=this[LRU_LIST].head;null!==r;){const s=r.next;forEachStep(this,e,r,t),r=s}}keys(){return this[LRU_LIST].toArray().map((e=>e.key))}values(){return this[LRU_LIST].toArray().map((e=>e.value))}reset(){this[DISPOSE]&&this[LRU_LIST]&&this[LRU_LIST].length&&this[LRU_LIST].forEach((e=>this[DISPOSE](e.key,e.value))),this[CACHE]=new Map,this[LRU_LIST]=new Yallist,this[LENGTH]=0}dump(){return this[LRU_LIST].map((e=>!isStale(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[LRU_LIST]}set(e,t,r){if((r=r||this[MAX_AGE])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const s=r?Date.now():0,i=this[LENGTH_CALCULATOR](t,e);if(this[CACHE].has(e)){if(i>this[MAX])return del(this,this[CACHE].get(e)),!1;const a=this[CACHE].get(e).value;return this[DISPOSE]&&(this[NO_DISPOSE_ON_SET]||this[DISPOSE](e,a.value)),a.now=s,a.maxAge=r,a.value=t,this[LENGTH]+=i-a.length,a.length=i,this.get(e),trim(this),!0}const a=new Entry(e,t,i,s,r);return a.length>this[MAX]?(this[DISPOSE]&&this[DISPOSE](e,t),!1):(this[LENGTH]+=a.length,this[LRU_LIST].unshift(a),this[CACHE].set(e,this[LRU_LIST].head),trim(this),!0)}has(e){if(!this[CACHE].has(e))return!1;const t=this[CACHE].get(e).value;return!isStale(this,t)}get(e){return get(this,e,!0)}peek(e){return get(this,e,!1)}pop(){const e=this[LRU_LIST].tail;return e?(del(this,e),e.value):null}del(e){del(this,this[CACHE].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r],i=s.e||0;if(0===i)this.set(s.k,s.v);else{const e=i-t;e>0&&this.set(s.k,s.v,e)}}}prune(){this[CACHE].forEach(((e,t)=>get(this,t,!1)))}}const get=(e,t,r)=>{const s=e[CACHE].get(t);if(s){const t=s.value;if(isStale(e,t)){if(del(e,s),!e[ALLOW_STALE])return}else r&&(e[UPDATE_AGE_ON_GET]&&(s.value.now=Date.now()),e[LRU_LIST].unshiftNode(s));return t.value}},isStale=(e,t)=>{if(!t||!t.maxAge&&!e[MAX_AGE])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[MAX_AGE]&&r>e[MAX_AGE]},trim=e=>{if(e[LENGTH]>e[MAX])for(let t=e[LRU_LIST].tail;e[LENGTH]>e[MAX]&&null!==t;){const r=t.prev;del(e,t),t=r}},del=(e,t)=>{if(t){const r=t.value;e[DISPOSE]&&e[DISPOSE](r.key,r.value),e[LENGTH]-=r.length,e[CACHE].delete(r.key),e[LRU_LIST].removeNode(t)}};class Entry{constructor(e,t,r,s,i){this.key=e,this.value=t,this.length=r,this.now=s,this.maxAge=i||0}}const forEachStep=(e,t,r,s)=>{let i=r.value;isStale(e,i)&&(del(e,r),e[ALLOW_STALE]||(i=void 0)),i&&t.call(s,i.value,i.key,e)};var lruCache=LRUCache;class Range$b{constructor(e,t){if(t=parseOptions$1(t),e instanceof Range$b)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Range$b(e.raw,t);if(e instanceof Comparator$4)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!isNullSet(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&isAny(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&FLAG_INCLUDE_PRERELEASE)|(this.options.loose&&FLAG_LOOSE))+":"+e,r=cache.get(t);if(r)return r;const s=this.options.loose,i=s?re$1[t$1.HYPHENRANGELOOSE]:re$1[t$1.HYPHENRANGE];e=e.replace(i,hyphenReplace(this.options.includePrerelease)),debug$1("hyphen replace",e),e=e.replace(re$1[t$1.COMPARATORTRIM],comparatorTrimReplace),debug$1("comparator trim",e),e=e.replace(re$1[t$1.TILDETRIM],tildeTrimReplace),debug$1("tilde trim",e),e=e.replace(re$1[t$1.CARETTRIM],caretTrimReplace),debug$1("caret trim",e);let a=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));s&&(a=a.filter((e=>(debug$1("loose invalid filter",e,this.options),!!e.match(re$1[t$1.COMPARATORLOOSE]))))),debug$1("range list",a);const o=new Map,n=a.map((e=>new Comparator$4(e,this.options)));for(const e of n){if(isNullSet(e))return[e];o.set(e.value,e)}o.size>1&&o.has("")&&o.delete("");const l=[...o.values()];return cache.set(t,l),l}intersects(e,t){if(!(e instanceof Range$b))throw new TypeError("a Range is required");return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new SemVer$6(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(testSet(this.set[t],e,this.options))return!0;return!1}}var range=Range$b;const LRU=lruCache,cache=new LRU({max:1e3}),parseOptions$1=parseOptions_1,Comparator$4=comparator,debug$1=debug_1,SemVer$6=semver$1,{safeRe:re$1,t:t$1,comparatorTrimReplace:comparatorTrimReplace,tildeTrimReplace:tildeTrimReplace,caretTrimReplace:caretTrimReplace}=re$4.exports,{FLAG_INCLUDE_PRERELEASE:FLAG_INCLUDE_PRERELEASE,FLAG_LOOSE:FLAG_LOOSE}=constants$1,isNullSet=e=>"<0.0.0-0"===e.value,isAny=e=>""===e.value,isSatisfiable=(e,t)=>{let r=!0;const s=e.slice();let i=s.pop();for(;r&&s.length;)r=s.every((e=>i.intersects(e,t))),i=s.pop();return r},parseComparator=(e,t)=>(debug$1("comp",e,t),e=replaceCarets(e,t),debug$1("caret",e),e=replaceTildes(e,t),debug$1("tildes",e),e=replaceXRanges(e,t),debug$1("xrange",e),e=replaceStars(e,t),debug$1("stars",e),e),isX=e=>!e||"x"===e.toLowerCase()||"*"===e,replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" "),replaceTilde=(e,t)=>{const r=t.loose?re$1[t$1.TILDELOOSE]:re$1[t$1.TILDE];return e.replace(r,((t,r,s,i,a)=>{let o;return debug$1("tilde",e,t,r,s,i,a),isX(r)?o="":isX(s)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:isX(i)?o=`>=${r}.${s}.0 <${r}.${+s+1}.0-0`:a?(debug$1("replaceTilde pr",a),o=`>=${r}.${s}.${i}-${a} <${r}.${+s+1}.0-0`):o=`>=${r}.${s}.${i} <${r}.${+s+1}.0-0`,debug$1("tilde return",o),o}))},replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" "),replaceCaret=(e,t)=>{debug$1("caret",e,t);const r=t.loose?re$1[t$1.CARETLOOSE]:re$1[t$1.CARET],s=t.includePrerelease?"-0":"";return e.replace(r,((t,r,i,a,o)=>{let n;return debug$1("caret",e,t,r,i,a,o),isX(r)?n="":isX(i)?n=`>=${r}.0.0${s} <${+r+1}.0.0-0`:isX(a)?n="0"===r?`>=${r}.${i}.0${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${s} <${+r+1}.0.0-0`:o?(debug$1("replaceCaret pr",o),n="0"===r?"0"===i?`>=${r}.${i}.${a}-${o} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}-${o} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a}-${o} <${+r+1}.0.0-0`):(debug$1("no pr"),n="0"===r?"0"===i?`>=${r}.${i}.${a}${s} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a} <${+r+1}.0.0-0`),debug$1("caret return",n),n}))},replaceXRanges=(e,t)=>(debug$1("replaceXRanges",e,t),e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")),replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?re$1[t$1.XRANGELOOSE]:re$1[t$1.XRANGE];return e.replace(r,((r,s,i,a,o,n)=>{debug$1("xRange",e,r,s,i,a,o,n);const l=isX(i),h=l||isX(a),p=h||isX(o),c=p;return"="===s&&c&&(s=""),n=t.includePrerelease?"-0":"",l?r=">"===s||"<"===s?"<0.0.0-0":"*":s&&c?(h&&(a=0),o=0,">"===s?(s=">=",h?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===s&&(s="<",h?i=+i+1:a=+a+1),"<"===s&&(n="-0"),r=`${s+i}.${a}.${o}${n}`):h?r=`>=${i}.0.0${n} <${+i+1}.0.0-0`:p&&(r=`>=${i}.${a}.0${n} <${i}.${+a+1}.0-0`),debug$1("xRange return",r),r}))},replaceStars=(e,t)=>(debug$1("replaceStars",e,t),e.trim().replace(re$1[t$1.STAR],"")),replaceGTE0=(e,t)=>(debug$1("replaceGTE0",e,t),e.trim().replace(re$1[t.includePrerelease?t$1.GTE0PRE:t$1.GTE0],"")),hyphenReplace=e=>(t,r,s,i,a,o,n,l,h,p,c,u,m)=>`${r=isX(s)?"":isX(i)?`>=${s}.0.0${e?"-0":""}`:isX(a)?`>=${s}.${i}.0${e?"-0":""}`:o?`>=${r}`:`>=${r}${e?"-0":""}`} ${l=isX(h)?"":isX(p)?`<${+h+1}.0.0-0`:isX(c)?`<${h}.${+p+1}.0-0`:u?`<=${h}.${p}.${c}-${u}`:e?`<${h}.${p}.${+c+1}-0`:`<=${l}`}`.trim(),testSet=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(debug$1(e[r].semver),e[r].semver!==Comparator$4.ANY&&e[r].semver.prerelease.length>0){const s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0},ANY$2=Symbol("SemVer ANY");class Comparator$3{static get ANY(){return ANY$2}constructor(e,t){if(t=parseOptions(t),e instanceof Comparator$3){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),debug("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ANY$2?this.value="":this.value=this.operator+this.semver.version,debug("comp",this)}parse(e){const r=this.options.loose?re[t.COMPARATORLOOSE]:re[t.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==s[1]?s[1]:"","="===this.operator&&(this.operator=""),s[2]?this.semver=new SemVer$5(s[2],this.options.loose):this.semver=ANY$2}toString(){return this.value}test(e){if(debug("Comparator.test",e,this.options.loose),this.semver===ANY$2||e===ANY$2)return!0;if("string"==typeof e)try{e=new SemVer$5(e,this.options)}catch(e){return!1}return cmp$1(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator$3))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new Range$a(e.value,t).test(this.value):""===e.operator?""===e.value||new Range$a(this.value,t).test(e.semver):(!(t=parseOptions(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(cmp$1(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(cmp$1(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}var comparator=Comparator$3;const parseOptions=parseOptions_1,{safeRe:re,t:t}=re$4.exports,cmp$1=cmp_1,debug=debug_1,SemVer$5=semver$1,Range$a=range,Range$9=range,satisfies$4=(e,t,r)=>{try{t=new Range$9(t,r)}catch(e){return!1}return t.test(e)};var satisfies_1=satisfies$4;const Range$8=range,toComparators$1=(e,t)=>new Range$8(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));var toComparators_1=toComparators$1;const SemVer$4=semver$1,Range$7=range,maxSatisfying$1=(e,t,r)=>{let s=null,i=null,a=null;try{a=new Range$7(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&-1!==i.compare(e)||(s=e,i=new SemVer$4(s,r)))})),s};var maxSatisfying_1=maxSatisfying$1;const SemVer$3=semver$1,Range$6=range,minSatisfying$1=(e,t,r)=>{let s=null,i=null,a=null;try{a=new Range$6(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&1!==i.compare(e)||(s=e,i=new SemVer$3(s,r)))})),s};var minSatisfying_1=minSatisfying$1;const SemVer$2=semver$1,Range$5=range,gt$2=gt_1,minVersion$1=(e,t)=>{e=new Range$5(e,t);let r=new SemVer$2("0.0.0");if(e.test(r))return r;if(r=new SemVer$2("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const s=e.set[t];let i=null;s.forEach((e=>{const t=new SemVer$2(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!gt$2(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||r&&!gt$2(r,i)||(r=i)}return r&&e.test(r)?r:null};var minVersion_1=minVersion$1;const Range$4=range,validRange$1=(e,t)=>{try{return new Range$4(e,t).range||"*"}catch(e){return null}};var valid$1=validRange$1;const SemVer$1=semver$1,Comparator$2=comparator,{ANY:ANY$1}=Comparator$2,Range$3=range,satisfies$3=satisfies_1,gt$1=gt_1,lt$1=lt_1,lte$1=lte_1,gte$1=gte_1,outside$3=(e,t,r,s)=>{let i,a,o,n,l;switch(e=new SemVer$1(e,s),t=new Range$3(t,s),r){case">":i=gt$1,a=lte$1,o=lt$1,n=">",l=">=";break;case"<":i=lt$1,a=gte$1,o=gt$1,n="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies$3(e,t,s))return!1;for(let r=0;r<t.set.length;++r){const h=t.set[r];let p=null,c=null;if(h.forEach((e=>{e.semver===ANY$1&&(e=new Comparator$2(">=0.0.0")),p=p||e,c=c||e,i(e.semver,p.semver,s)?p=e:o(e.semver,c.semver,s)&&(c=e)})),p.operator===n||p.operator===l)return!1;if((!c.operator||c.operator===n)&&a(e,c.semver))return!1;if(c.operator===l&&o(e,c.semver))return!1}return!0};var outside_1=outside$3;const outside$2=outside_1,gtr$1=(e,t,r)=>outside$2(e,t,">",r);var gtr_1=gtr$1;const outside$1=outside_1,ltr$1=(e,t,r)=>outside$1(e,t,"<",r);var ltr_1=ltr$1;const Range$2=range,intersects$1=(e,t,r)=>(e=new Range$2(e,r),t=new Range$2(t,r),e.intersects(t,r));var intersects_1=intersects$1;const satisfies$2=satisfies_1,compare$2=compare_1;var simplify=(e,t,r)=>{const s=[];let i=null,a=null;const o=e.sort(((e,t)=>compare$2(e,t,r)));for(const e of o){satisfies$2(e,t,r)?(a=e,i||(i=e)):(a&&s.push([i,a]),a=null,i=null)}i&&s.push([i,null]);const n=[];for(const[e,t]of s)e===t?n.push(e):t||e!==o[0]?t?e===o[0]?n.push(`<=${t}`):n.push(`${e} - ${t}`):n.push(`>=${e}`):n.push("*");const l=n.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return l.length<h.length?l:t};const Range$1=range,Comparator$1=comparator,{ANY:ANY}=Comparator$1,satisfies$1=satisfies_1,compare$1=compare_1,subset$1=(e,t,r={})=>{if(e===t)return!0;e=new Range$1(e,r),t=new Range$1(t,r);let s=!1;e:for(const i of e.set){for(const e of t.set){const t=simpleSubset(i,e,r);if(s=s||null!==t,t)continue e}if(s)return!1}return!0},minimumVersionWithPreRelease=[new Comparator$1(">=0.0.0-0")],minimumVersion=[new Comparator$1(">=0.0.0")],simpleSubset=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===ANY){if(1===t.length&&t[0].semver===ANY)return!0;e=r.includePrerelease?minimumVersionWithPreRelease:minimumVersion}if(1===t.length&&t[0].semver===ANY){if(r.includePrerelease)return!0;t=minimumVersion}const s=new Set;let i,a,o,n,l,h,p;for(const t of e)">"===t.operator||">="===t.operator?i=higherGT(i,t,r):"<"===t.operator||"<="===t.operator?a=lowerLT(a,t,r):s.add(t.semver);if(s.size>1)return null;if(i&&a){if(o=compare$1(i.semver,a.semver,r),o>0)return null;if(0===o&&(">="!==i.operator||"<="!==a.operator))return null}for(const e of s){if(i&&!satisfies$1(e,String(i),r))return null;if(a&&!satisfies$1(e,String(a),r))return null;for(const s of t)if(!satisfies$1(e,String(s),r))return!1;return!0}let c=!(!a||r.includePrerelease||!a.semver.prerelease.length)&&a.semver,u=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;c&&1===c.prerelease.length&&"<"===a.operator&&0===c.prerelease[0]&&(c=!1);for(const e of t){if(p=p||">"===e.operator||">="===e.operator,h=h||"<"===e.operator||"<="===e.operator,i)if(u&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===u.major&&e.semver.minor===u.minor&&e.semver.patch===u.patch&&(u=!1),">"===e.operator||">="===e.operator){if(n=higherGT(i,e,r),n===e&&n!==i)return!1}else if(">="===i.operator&&!satisfies$1(i.semver,String(e),r))return!1;if(a)if(c&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===c.major&&e.semver.minor===c.minor&&e.semver.patch===c.patch&&(c=!1),"<"===e.operator||"<="===e.operator){if(l=lowerLT(a,e,r),l===e&&l!==a)return!1}else if("<="===a.operator&&!satisfies$1(a.semver,String(e),r))return!1;if(!e.operator&&(a||i)&&0!==o)return!1}return!(i&&h&&!a&&0!==o)&&(!(a&&p&&!i&&0!==o)&&(!u&&!c))},higherGT=(e,t,r)=>{if(!e)return t;const s=compare$1(e.semver,t.semver,r);return s>0?e:s<0||">"===t.operator&&">="===e.operator?t:e},lowerLT=(e,t,r)=>{if(!e)return t;const s=compare$1(e.semver,t.semver,r);return s<0?e:s>0||"<"===t.operator&&"<="===e.operator?t:e};var subset_1=subset$1;const internalRe=re$4.exports,constants=constants$1,SemVer=semver$1,identifiers=identifiers$1,parse=parse_1,valid=valid_1,clean=clean_1,inc=inc_1,diff=diff_1,major=major_1,minor=minor_1,patch=patch_1,prerelease=prerelease_1,compare=compare_1,rcompare=rcompare_1,compareLoose=compareLoose_1,compareBuild=compareBuild_1,sort=sort_1,rsort=rsort_1,gt=gt_1,lt=lt_1,eq=eq_1,neq=neq_1,gte=gte_1,lte=lte_1,cmp=cmp_1,coerce=coerce_1,Comparator=comparator,Range=range,satisfies=satisfies_1,toComparators=toComparators_1,maxSatisfying=maxSatisfying_1,minSatisfying=minSatisfying_1,minVersion=minVersion_1,validRange=valid$1,outside=outside_1,gtr=gtr_1,ltr=ltr_1,intersects=intersects_1,simplifyRange=simplify,subset=subset_1;var semver={parse:parse,valid:valid,clean:clean,inc:inc,diff:diff,major:major,minor:minor,patch:patch,prerelease:prerelease,compare:compare,rcompare:rcompare,compareLoose:compareLoose,compareBuild:compareBuild,sort:sort,rsort:rsort,gt:gt,lt:lt,eq:eq,neq:neq,gte:gte,lte:lte,cmp:cmp,coerce:coerce,Comparator:Comparator,Range:Range,satisfies:satisfies,toComparators:toComparators,maxSatisfying:maxSatisfying,minSatisfying:minSatisfying,minVersion:minVersion,validRange:validRange,outside:outside,gtr:gtr,ltr:ltr,intersects:intersects,simplifyRange:simplifyRange,subset:subset,SemVer:SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants.SEMVER_SPEC_VERSION,RELEASE_TYPES:constants.RELEASE_TYPES,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers},preload=semver;const pdfApplicationCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{display:block}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.m-4{margin:1rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfApplicationStyle0=pdfApplicationCss,PdfApplication=class{constructor(e){registerInstance(this,e),this.apiError=createEvent(this,"apiError",7),this.sessionService=new SessionService,this.fileService=new FileService,this.logger=createLogger("PdfApplication"),this.apiErrorHandler=e=>{this.apiError?this.apiError.emit(e):console.error("Unhandled API error",e)},this.authenticated=new ApiLoading,this.versionInfo=new ApiLoading,this.publickey=void 0,this.privatekey=void 0,this.apiBaseUrl=void 0,this.sessionsurl=void 0}async getAbout(){var e,t,r;this.logger.debug("Get diagnostics");const s=null!==(e=this.versionInfo)&&void 0!==e?e:await this.sessionService.getVersion();return{npmVersion:LIB_VERSION,apiBaseUrl:state.apiBaseUrl,publicKey:state.publicKey,apiVersion:s.error?`error: ${s.error.code} - ${s.error.message}`:null!==(r=null===(t=s.value)||void 0===t?void 0:t.apiVersion)&&void 0!==r?r:"error: could not read api version"}}async getDocuments(){this.logger.debug("Get documents");return(await this.fileService.getDocuments()).value||[]}async deleteDocument(e){this.logger.debug("Delete single document"),await this.fileService.deleteDocuments([e])}async deleteDocuments(e){this.logger.debug("Delete multiple document"),await this.fileService.deleteDocuments(e)}async createDocument(e,t,r){return this.logger.debug("Create new document"),await this.fileService.createDocument(e,t,null!=r?r:null)}async componentWillLoad(){this.logger.debug("Starting..."),this.configure(),await this.versionCheck(),await this.login(),this.authenticated.value&&await this.loadStandardFonts()}componentDidLoad(){this.logger.debug("Started")}disconnectedCallback(){this.sessionService.onUnmounted()}configure(){state.apiBaseUrl=this.apiBaseUrl||Env.API_BASE_URL,this.logger.debug(`apiBaseURL: ${state.apiBaseUrl}`),state.publicKey=this.publickey||Env.API_PUBLIC_KEY,state.privateKey=this.privatekey||Env.API_PRIVATE_KEY,this.sessionsurl&&(state.sessionsUrl=this.sessionsurl),state.apiErrorHandler=this.apiErrorHandler,this.sessionService.onMounted((e=>this.authenticated=e.map((e=>e>0))))}async versionCheck(){this.versionInfo=await this.sessionService.getVersion()}async login(){this.authenticated=(await this.sessionService.login()).map((e=>e>0))}async logout(){this.authenticated=await this.sessionService.logout()}async loadStandardFonts(){var e;this.logger.debug("Setting standard fonts");null===(e=(await this.fileService.getStandardFonts()).value)||void 0===e||e.forEach((async e=>{await addFontFace(e.fontId,e.fontData,document)}))}render(){if(this.authenticated.loading||this.versionInfo.loading)return h(Host,null,h("div",{class:"m-4"},"Loading..."));if(this.versionInfo.error)return h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Api unavailable:"),h("div",{class:"text-red-600"},this.versionInfo.error.code," - ",this.versionInfo.error.message)));if(this.versionInfo.value&&(preload.lt(this.versionInfo.value.apiVersion,Env.API_MINIMUM_VERSION)||preload.lt(LIB_VERSION,this.versionInfo.value.minimumNpmPackageVersion))){let e=preload.lt(this.versionInfo.value.apiVersion,Env.API_MINIMUM_VERSION),t=preload.lt(LIB_VERSION,this.versionInfo.value.minimumNpmPackageVersion);return this.logger.error(e?`Api version ${this.versionInfo.value.apiVersion} is too low. Must be at least ${Env.API_MINIMUM_VERSION}.`:`Package version ${LIB_VERSION} is too low. Must be at least ${this.versionInfo.value.minimumNpmPackageVersion}.`),h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Api and npm package version mismatch:"),h("div",{class:"text-red-600"},e&&h("span",null,"The version of the Api used is not supported. Current Api version: ",this.versionInfo.value.apiVersion,". Current version of this package requires at least version ",Env.API_MINIMUM_VERSION," of the Api."),t&&h("span",null,"This version of the npm package is no longer supported by the Api. You current version: ",LIB_VERSION,". Please upgrade to ",this.versionInfo.value.minimumNpmPackageVersion," or above."))))}return this.authenticated.error?h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Error logging in:"),h("div",{class:"text-red-600"},this.authenticated.error.code," - ",this.authenticated.error.message))):void 0}};PdfApplication.style=PdfApplicationStyle0;export{PdfApplication as pdf_application}; |
@@ -1,1 +0,1 @@ | ||
import{r as registerInstance,h,H as Host,a as getElement}from"./index-ad2fce19.js";import{e as ensureStore,o as onChange,a as onChange$1,b as ensureStore$1}from"./documentStore-c4eea1c1.js";import"./ApiClient-c838e5e9.js";import"./IPdfField-1a3e882c.js";import"./FileService-7bd3d04f.js";const pdfStoreWrapperCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.visible{visibility:visible}.max-h-\\[40rem\\]{max-height:40rem}.overflow-y-auto{overflow-y:auto}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.m-1{margin:.25rem}.ml-4{margin-left:1rem}.mt-4{margin-top:1rem}.table{display:table}.table-auto{table-layout:auto}.-translate-y-3{--tw-translate-y:-0.75rem}.-translate-y-3,.scale-150{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x:1.5;--tw-scale-y:1.5}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.font-bold{font-weight:700}.outline{outline-style:solid}.mb-4{margin-bottom:1rem}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.m-8{margin:2rem}.mb-2{margin-bottom:.5rem}.hidden{display:none}.rounded-xl{border-radius:.75rem}.border-4{border-width:4px}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.px-24{padding-left:6rem;padding-right:6rem}.py-12{padding-bottom:3rem;padding-top:3rem}.text-center{text-align:center}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.\\!bg-blue-700{--tw-bg-opacity:1!important;background-color:rgb(29 78 216/var(--tw-bg-opacity))!important}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.-mr-4{margin-right:-1rem}.ml-1{margin-left:.25rem}.mt-1{margin-top:.25rem}.h-16{height:4rem}.h-24{height:6rem}.w-0{width:0}.w-16{width:4rem}.cursor-move{cursor:move}.rounded{border-radius:.25rem}.pr-4{padding-right:1rem}.text-xs{font-size:.75rem;line-height:1rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}',PdfStoreWrapperStyle0=pdfStoreWrapperCss,PdfStoreWrapper=class{constructor(t){registerInstance(this,t),this.documentStore=null,this.viewerStore=null,this.setDocumentStore=()=>{this.documentStore||(this.documentStore=ensureStore(this.pdfdoc)||null,this.documentStore&&this.documentStoreLoaded&&this.documentStoreLoaded(this.documentStore))},this.pdfdoc="default",this.pdfviewer="default",this.pageindex=-1,this.documentStoreLoaded=void 0,this.viewerStoreLoaded=void 0}componentDidLoad(){this.setDocumentStore(),this.setViewerStore(),onChange("pdfReferences",(()=>{this.setDocumentStore()})),onChange$1("stores",(()=>{this.setViewerStore()}))}setViewerStore(){this.viewerStore||(this.viewerStore=ensureStore$1(this.pdfdoc,this.pdfviewer),this.viewerStore&&this.viewerStoreLoaded&&this.viewerStoreLoaded(this.viewerStore))}render(){return h(Host,{key:"6586487a8b82ea87152f7662d6c0d43beca31d10"},h("slot",{key:"f9603b68cf8d8ebd1c6204b6f9a4d835b7eb955d"}))}get el(){return getElement(this)}};PdfStoreWrapper.style=PdfStoreWrapperStyle0;export{PdfStoreWrapper as pdf_store_wrapper}; | ||
import{r as registerInstance,h,H as Host,a as getElement}from"./index-ad2fce19.js";import{e as ensureStore,o as onChange,a as onChange$1,b as ensureStore$1}from"./documentStore-c4eea1c1.js";import"./ApiClient-c838e5e9.js";import"./IPdfField-1a3e882c.js";import"./FileService-7bd3d04f.js";const pdfStoreWrapperCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.visible{visibility:visible}.max-h-\\[40rem\\]{max-height:40rem}.overflow-y-auto{overflow-y:auto}.m-1{margin:.25rem}.ml-4{margin-left:1rem}.mt-4{margin-top:1rem}.table{display:table}.table-auto{table-layout:auto}.-translate-y-3{--tw-translate-y:-0.75rem}.-translate-y-3,.scale-150{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x:1.5;--tw-scale-y:1.5}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.font-bold{font-weight:700}.outline{outline-style:solid}.mb-4{margin-bottom:1rem}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.m-8{margin:2rem}.mb-2{margin-bottom:.5rem}.hidden{display:none}.rounded-xl{border-radius:.75rem}.border-4{border-width:4px}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.px-24{padding-left:6rem;padding-right:6rem}.py-12{padding-bottom:3rem;padding-top:3rem}.text-center{text-align:center}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.\\!bg-blue-700{--tw-bg-opacity:1!important;background-color:rgb(29 78 216/var(--tw-bg-opacity))!important}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.-mr-4{margin-right:-1rem}.ml-1{margin-left:.25rem}.mt-1{margin-top:.25rem}.h-16{height:4rem}.h-24{height:6rem}.w-0{width:0}.w-16{width:4rem}.cursor-move{cursor:move}.rounded{border-radius:.25rem}.pr-4{padding-right:1rem}.text-xs{font-size:.75rem;line-height:1rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}',PdfStoreWrapperStyle0=pdfStoreWrapperCss,PdfStoreWrapper=class{constructor(t){registerInstance(this,t),this.documentStore=null,this.viewerStore=null,this.setDocumentStore=()=>{this.documentStore||(this.documentStore=ensureStore(this.pdfdoc)||null,this.documentStore&&this.documentStoreLoaded&&this.documentStoreLoaded(this.documentStore))},this.pdfdoc="default",this.pdfviewer="default",this.pageindex=-1,this.documentStoreLoaded=void 0,this.viewerStoreLoaded=void 0}componentDidLoad(){this.setDocumentStore(),this.setViewerStore(),onChange("pdfReferences",(()=>{this.setDocumentStore()})),onChange$1("stores",(()=>{this.setViewerStore()}))}setViewerStore(){this.viewerStore||(this.viewerStore=ensureStore$1(this.pdfdoc,this.pdfviewer),this.viewerStore&&this.viewerStoreLoaded&&this.viewerStoreLoaded(this.viewerStore))}render(){return h(Host,{key:"6586487a8b82ea87152f7662d6c0d43beca31d10"},h("slot",{key:"f9603b68cf8d8ebd1c6204b6f9a4d835b7eb955d"}))}get el(){return getElement(this)}};PdfStoreWrapper.style=PdfStoreWrapperStyle0;export{PdfStoreWrapper as pdf_store_wrapper}; |
@@ -1,1 +0,1 @@ | ||
export declare const LIB_VERSION = "1.2.12-e059e480"; | ||
export declare const LIB_VERSION = "1.2.12-fe3b6350"; |
@@ -1,1 +0,1 @@ | ||
import{p as e,b as d}from"./p-f5d373a7.js";export{s as setNonce}from"./p-f5d373a7.js";import{g as o}from"./p-e1255160.js";const t=()=>{const d=import.meta.url,o={};return""!==d&&(o.resourcesUrl=new URL(".",d).href),e(o)};t().then((async e=>(await o(),d([["p-89e13601",[[1,"pdf-store-wrapper",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],documentStoreLoaded:[16],viewerStoreLoaded:[16]}]]],["p-80b1e5c9",[[1,"pdf-pages",{document:[1],name:[1],pageMode:[1,"page-mode"],debugUserMode:[4,"debug-user-mode"],showCustomWidget:[16],focusWidget:[16],documentStore:[32],viewerStore:[32],zoom:[64],gotoPage:[64],setPageMode:[64],getPageMode:[64],getZoomFactor:[64],getPageIndex:[64],setHighlightFields:[64],toggleLayer:[64],setUserMode:[64],getUserMode:[64],addImage:[64],addText:[64],getFocusWidget:[64]}]]],["p-e0b6c5da",[[1,"pdf-thumbnails",{document:[1],pagesviewer:[1],direction:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["p-7ed1ae15",[[1,"pdf-bookmarks",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["p-f080272e",[[1,"pdf-layers",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["p-f30495c6",[[1,"pdf-sidebar",{document:[1],documentStore:[32],viewerStore:[32]}]]],["p-1167a2bf",[[1,"pdf-uploader",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["p-59bf0356",[[1,"pdf-zoom-button",{pdfdoc:[1],pdfviewer:[1],zoom:[2],viewerStore:[32]}]]],["p-381a3564",[[1,"pdf-zoom-control",{pdfdoc:[1],pdfviewer:[1],viewerStore:[32]}]]],["p-0cab8cdc",[[1,"pdf-application",{publickey:[1],privatekey:[1],apiBaseUrl:[1,"api-base-url"],sessionsurl:[1],authenticated:[32],versionInfo:[32],getAbout:[64],getDocuments:[64],deleteDocument:[64],deleteDocuments:[64],createDocument:[64]}]]],["p-d146a709",[[1,"pdf-document",{name:[1],pdfid:[1],open:[64],openFile:[64],download:[64],downloadAs:[64],getSummary:[64],getFields:[64],getFormData:[64],setFormData:[64],setOptions:[64],new:[64],close:[64],save:[64]}]]],["p-f314f0ab",[[1,"pdf-spinner",{showText:[4,"show-text"]}]]],["p-d04e1157",[[1,"pdf-widget-base",{viewerStore:[16],pageIndex:[2,"page-index"],documentStore:[16],pdfWidget:[16],widgetDivStyles:[16],pdfPage:[16],field:[32],hasFocus:[32],isDragged:[32],widgetsRevision:[32]},[[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mouseover","mouseOverHandler"],[1,"mouseout","mouseOutHandler"],[1,"dragstart","dragStartHandler"],[1,"dragend","dragEndHandler"]]]]],["p-68dedbbb",[[1,"pdf-page",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentId:[1,"document-id"],pdfPage:[16],rectangleSelect:[16],showCustomWidget:[16],setFocusWidget:[16],documentStore:[32],viewerStore:[32],inView:[32],debugShouldLoad:[32],layerRevision:[32],htmlContent:[32]}]]],["p-4dfd6d19",[[1,"pdf-thumbnail",{documentId:[1,"document-id"],pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentStore:[32],viewerStore:[32],isDraggingOver:[32],isDragged:[32],inView:[32],debugShouldLoad:[32],thumbnailData:[32],loadFailed:[32]}]]],["p-29865889",[[1,"pdf-widgets",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],pdfPage:[16],showCustomWidget:[16],setFocusWidget:[16],viewerStore:[32],documentStore:[32],widgets:[32],selectedPdfWidget:[32],focusWidgetIndex:[32],renderCustomWidget:[32]},[[0,"click","onClickHandler"]]],[1,"pdf-overlay",{images:[16],texts:[16],pageInfo:[16],pageIndex:[2,"page-index"],width:[2],height:[2],userMode:[1,"user-mode"],origin:[16],p:[16],rectangleSelect:[16]},[[1,"mousedown","onMouseDownHandler"],[1,"mousemove","onMouseMoveHandler"],[1,"mouseup","onMouseUpHandler"],[0,"keydown","onKeyDownHandler"]]],[1,"pdf-widget-checkbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-listbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],size:[2],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],fieldValue:[32]}],[1,"pdf-widget-multilinetextbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}],[1,"pdf-widget-radiobutton",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-signature",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-textbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}]]]],e)))); | ||
import{p as e,b as d}from"./p-f5d373a7.js";export{s as setNonce}from"./p-f5d373a7.js";import{g as o}from"./p-e1255160.js";const t=()=>{const d=import.meta.url,o={};return""!==d&&(o.resourcesUrl=new URL(".",d).href),e(o)};t().then((async e=>(await o(),d([["p-21ad9b4a",[[1,"pdf-store-wrapper",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],documentStoreLoaded:[16],viewerStoreLoaded:[16]}]]],["p-80b1e5c9",[[1,"pdf-pages",{document:[1],name:[1],pageMode:[1,"page-mode"],debugUserMode:[4,"debug-user-mode"],showCustomWidget:[16],focusWidget:[16],documentStore:[32],viewerStore:[32],zoom:[64],gotoPage:[64],setPageMode:[64],getPageMode:[64],getZoomFactor:[64],getPageIndex:[64],setHighlightFields:[64],toggleLayer:[64],setUserMode:[64],getUserMode:[64],addImage:[64],addText:[64],getFocusWidget:[64]}]]],["p-e0b6c5da",[[1,"pdf-thumbnails",{document:[1],pagesviewer:[1],direction:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["p-7ed1ae15",[[1,"pdf-bookmarks",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["p-f080272e",[[1,"pdf-layers",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["p-f30495c6",[[1,"pdf-sidebar",{document:[1],documentStore:[32],viewerStore:[32]}]]],["p-1167a2bf",[[1,"pdf-uploader",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["p-59bf0356",[[1,"pdf-zoom-button",{pdfdoc:[1],pdfviewer:[1],zoom:[2],viewerStore:[32]}]]],["p-381a3564",[[1,"pdf-zoom-control",{pdfdoc:[1],pdfviewer:[1],viewerStore:[32]}]]],["p-5fc10f7f",[[1,"pdf-application",{publickey:[1],privatekey:[1],apiBaseUrl:[1,"api-base-url"],sessionsurl:[1],authenticated:[32],versionInfo:[32],getAbout:[64],getDocuments:[64],deleteDocument:[64],deleteDocuments:[64],createDocument:[64]}]]],["p-d146a709",[[1,"pdf-document",{name:[1],pdfid:[1],open:[64],openFile:[64],download:[64],downloadAs:[64],getSummary:[64],getFields:[64],getFormData:[64],setFormData:[64],setOptions:[64],new:[64],close:[64],save:[64]}]]],["p-f314f0ab",[[1,"pdf-spinner",{showText:[4,"show-text"]}]]],["p-d04e1157",[[1,"pdf-widget-base",{viewerStore:[16],pageIndex:[2,"page-index"],documentStore:[16],pdfWidget:[16],widgetDivStyles:[16],pdfPage:[16],field:[32],hasFocus:[32],isDragged:[32],widgetsRevision:[32]},[[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mouseover","mouseOverHandler"],[1,"mouseout","mouseOutHandler"],[1,"dragstart","dragStartHandler"],[1,"dragend","dragEndHandler"]]]]],["p-68dedbbb",[[1,"pdf-page",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentId:[1,"document-id"],pdfPage:[16],rectangleSelect:[16],showCustomWidget:[16],setFocusWidget:[16],documentStore:[32],viewerStore:[32],inView:[32],debugShouldLoad:[32],layerRevision:[32],htmlContent:[32]}]]],["p-4dfd6d19",[[1,"pdf-thumbnail",{documentId:[1,"document-id"],pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentStore:[32],viewerStore:[32],isDraggingOver:[32],isDragged:[32],inView:[32],debugShouldLoad:[32],thumbnailData:[32],loadFailed:[32]}]]],["p-29865889",[[1,"pdf-widgets",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],pdfPage:[16],showCustomWidget:[16],setFocusWidget:[16],viewerStore:[32],documentStore:[32],widgets:[32],selectedPdfWidget:[32],focusWidgetIndex:[32],renderCustomWidget:[32]},[[0,"click","onClickHandler"]]],[1,"pdf-overlay",{images:[16],texts:[16],pageInfo:[16],pageIndex:[2,"page-index"],width:[2],height:[2],userMode:[1,"user-mode"],origin:[16],p:[16],rectangleSelect:[16]},[[1,"mousedown","onMouseDownHandler"],[1,"mousemove","onMouseMoveHandler"],[1,"mouseup","onMouseUpHandler"],[0,"keydown","onKeyDownHandler"]]],[1,"pdf-widget-checkbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-listbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],size:[2],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],fieldValue:[32]}],[1,"pdf-widget-multilinetextbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}],[1,"pdf-widget-radiobutton",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-signature",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-textbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}]]]],e)))); |
{ | ||
"name": "@tallcomponents/unopdf-core", | ||
"//": "below 'version' is set automatically using the bump-versions ci workflow", | ||
"version": "1.2.12-e059e480", | ||
"version": "1.2.12-fe3b6350", | ||
"author": "TallComponents <info@tallcomponents.com>", | ||
@@ -6,0 +6,0 @@ "homepage": "https://unopdf.tallcomponents.com", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package