@truebit/cli 1.120.0-beta.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/README.md +82 -0
  2. package/build/definitions/registration.d.mts +18 -0
  3. package/build/definitions/registration.d.mts.map +1 -0
  4. package/build/handlers/apiAuth.d.mts +3 -0
  5. package/build/handlers/apiAuth.d.mts.map +1 -0
  6. package/build/handlers/apiKeyRegistration.d.mts +8 -0
  7. package/build/handlers/apiKeyRegistration.d.mts.map +1 -0
  8. package/build/handlers/authorizationGrant.d.mts +4 -0
  9. package/build/handlers/authorizationGrant.d.mts.map +1 -0
  10. package/build/handlers/buildCommand/api.d.mts +5 -0
  11. package/build/handlers/buildCommand/api.d.mts.map +1 -0
  12. package/build/handlers/buildCommand/baseBuild.d.mts +5 -0
  13. package/build/handlers/buildCommand/baseBuild.d.mts.map +1 -0
  14. package/build/handlers/buildCommand/c.d.mts +5 -0
  15. package/build/handlers/buildCommand/c.d.mts.map +1 -0
  16. package/build/handlers/buildCommand/factory.d.mts +6 -0
  17. package/build/handlers/buildCommand/factory.d.mts.map +1 -0
  18. package/build/handlers/buildCommand/handler.d.mts +3 -0
  19. package/build/handlers/buildCommand/handler.d.mts.map +1 -0
  20. package/build/handlers/buildCommand/handlerAPI.d.mts +3 -0
  21. package/build/handlers/buildCommand/handlerAPI.d.mts.map +1 -0
  22. package/build/handlers/buildCommand/index.d.mts +9 -0
  23. package/build/handlers/buildCommand/index.d.mts.map +1 -0
  24. package/build/handlers/buildCommand/js.d.mts +5 -0
  25. package/build/handlers/buildCommand/js.d.mts.map +1 -0
  26. package/build/handlers/buildCommand/py.d.mts +5 -0
  27. package/build/handlers/buildCommand/py.d.mts.map +1 -0
  28. package/build/handlers/buildCommand/rs.d.mts +5 -0
  29. package/build/handlers/buildCommand/rs.d.mts.map +1 -0
  30. package/build/handlers/cli.init.d.mts +2 -0
  31. package/build/handlers/cli.init.d.mts.map +1 -0
  32. package/build/handlers/deploy.d.mts +3 -0
  33. package/build/handlers/deploy.d.mts.map +1 -0
  34. package/build/handlers/executeTask.d.mts +3 -0
  35. package/build/handlers/executeTask.d.mts.map +1 -0
  36. package/build/handlers/index.d.mts +7 -0
  37. package/build/handlers/index.d.mts.map +1 -0
  38. package/build/handlers/instrument.d.mts +2 -0
  39. package/build/handlers/instrument.d.mts.map +1 -0
  40. package/build/handlers/introduction.d.mts +5 -0
  41. package/build/handlers/introduction.d.mts.map +1 -0
  42. package/build/handlers/push.d.mts +6 -0
  43. package/build/handlers/push.d.mts.map +1 -0
  44. package/build/handlers/registration.d.mts +5 -0
  45. package/build/handlers/registration.d.mts.map +1 -0
  46. package/build/handlers/setup.d.mts +5 -0
  47. package/build/handlers/setup.d.mts.map +1 -0
  48. package/build/handlers/status.d.mts +2 -0
  49. package/build/handlers/status.d.mts.map +1 -0
  50. package/build/handlers/taskRegistry.d.mts +5 -0
  51. package/build/handlers/taskRegistry.d.mts.map +1 -0
  52. package/build/index.d.mts +3 -0
  53. package/build/index.d.mts.map +1 -0
  54. package/build/index.mjs +12 -0
  55. package/build/index.mjs.map +1 -0
  56. package/build/ledgerConfigurations.d.mts +6 -0
  57. package/build/ledgerConfigurations.d.mts.map +1 -0
  58. package/build/services/user.relayer.service.d.mts +6 -0
  59. package/build/services/user.relayer.service.d.mts.map +1 -0
  60. package/build/utils/axios.d.mts +4 -0
  61. package/build/utils/axios.d.mts.map +1 -0
  62. package/build/utils/cli.messages.d.mts +19 -0
  63. package/build/utils/cli.messages.d.mts.map +1 -0
  64. package/build/utils/crypto.d.mts +5 -0
  65. package/build/utils/crypto.d.mts.map +1 -0
  66. package/build/utils/deploy.d.mts +6 -0
  67. package/build/utils/deploy.d.mts.map +1 -0
  68. package/build/utils/hook.preactions.d.mts +2 -0
  69. package/build/utils/hook.preactions.d.mts.map +1 -0
  70. package/build/utils/registration.d.mts +13 -0
  71. package/build/utils/registration.d.mts.map +1 -0
  72. package/build/utils/secret.d.mts +43 -0
  73. package/build/utils/secret.d.mts.map +1 -0
  74. package/build/utils/sign.message.d.mts +6 -0
  75. package/build/utils/sign.message.d.mts.map +1 -0
  76. package/build/utils/util.d.mts +8 -0
  77. package/build/utils/util.d.mts.map +1 -0
  78. package/build/utils/validations.d.mts +5 -0
  79. package/build/utils/validations.d.mts.map +1 -0
  80. package/package.json +66 -0
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env -S node --no-warnings
2
+ import e from"colors";import*as t from"fs";import n,{readFileSync as r}from"fs";import*as i from"path";import a from"path";import s,{inspect as o}from"util";import*as c from"os";import u from"os";import l from"stream";import p from"buffer";import d from"events";import f from"zlib";import h from"tty";import m from"string_decoder";import g,{Agent as b}from"http";import y,{Agent as v}from"https";import*as x from"crypto";import w,{randomBytes as _}from"crypto";import{v4 as S}from"uuid";import E from"axios";import k from"assert";import{Command as M,Option as T}from"commander";import A from"figlet";import{exec as R}from"child_process";import O from"openapi-enforcer";import I from"url";import N from"chalk";import{ethers as P,Wallet as j}from"ethers";import D from"aws4";import L from"dotenv";import*as C from"readline";import $ from"ora";import{createRequire as B}from"node:module";import{createInterface as z}from"node:readline/promises";import{setDefaultAutoSelectFamily as U}from"node:net";var F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function q(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function H(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var Y,V,G={},K={};function W(){if(V)return Y;V=1;class e extends Error{constructor(t){super(`Format functions must be synchronous taking a two arguments: (info, opts)\nFound: ${t.toString().split("\n")[0]}\n`),Error.captureStackTrace(this,e)}}return Y=t=>{if(t.length>2)throw new e(t);function n(e={}){this.options=e}function r(e){return new n(e)}return n.prototype.transform=t,r.Format=n,r}}var Z,J,X,Q,ee,te={exports:{}},ne={exports:{}},re={exports:{}},ie={exports:{}};function ae(){return Z||(Z=1,function(e){var t={};e.exports=t;var n={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(n).forEach((function(e){var r=n[e],i=t[e]=[];i.open="["+r[0]+"m",i.close="["+r[1]+"m"}))}(ie)),ie.exports}function se(){return X?J:(X=1,J=function(e,t){var n=(t=t||process.argv||[]).indexOf("--"),r=/^-{1,2}/.test(e)?"":"--",i=t.indexOf(r+e);return-1!==i&&(-1===n||i<n)})}function oe(){if(ee)return Q;ee=1;var e=u,t=se(),n=process.env,r=void 0;function i(i){var a=function(i){if(!1===r)return 0;if(t("color=16m")||t("color=full")||t("color=truecolor"))return 3;if(t("color=256"))return 2;if(i&&!i.isTTY&&!0!==r)return 0;var a=r?1:0;if("win32"===process.platform){var s=e.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in n)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((function(e){return e in n}))||"codeship"===n.CI_NAME?1:a;if("TEAMCITY_VERSION"in n)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(n.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in n){var o=parseInt((n.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(n.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(n.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(n.TERM)||"COLORTERM"in n?1:(n.TERM,a)}(i);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(a)}return t("no-color")||t("no-colors")||t("color=false")?r=!1:(t("color")||t("colors")||t("color=true")||t("color=always"))&&(r=!0),"FORCE_COLOR"in n&&(r=0===n.FORCE_COLOR.length||0!==parseInt(n.FORCE_COLOR,10)),Q={supportsColor:i,stdout:i(process.stdout),stderr:i(process.stderr)}}var ce,ue={exports:{}};var le,pe={exports:{}};var de,fe={exports:{}};var he,me={exports:{}};var ge,be={exports:{}};var ye,ve,xe,we={exports:{}};function _e(){return ve||(ve=1,function(e){var t={};e.exports=t,t.themes={};var n=s,r=t.styles=ae(),i=Object.defineProperties,a=new RegExp(/[\r\n]+/g);t.supportsColor=oe().supportsColor,void 0===t.enabled&&(t.enabled=!1!==t.supportsColor()),t.enable=function(){t.enabled=!0},t.disable=function(){t.enabled=!1},t.stripColors=t.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")},t.stylize=function(e,n){if(!t.enabled)return e+"";var i=r[n];return!i&&n in t?t[n](e):i.open+e+i.close};var o=/[|\\{}()[\]^$+*?.]/g;function c(e){var t=function e(){return d.apply(e,arguments)};return t._styles=e,t.__proto__=p,t}var u,l=(u={},r.grey=r.gray,Object.keys(r).forEach((function(e){r[e].closeRe=new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(o,"\\$&")}(r[e].close),"g"),u[e]={get:function(){return c(this._styles.concat(e))}}})),u),p=i((function(){}),l);function d(){var e=Array.prototype.slice.call(arguments).map((function(e){return null!=e&&e.constructor===String?e:n.inspect(e)})).join(" ");if(!t.enabled||!e)return e;for(var i=-1!=e.indexOf("\n"),s=this._styles,o=s.length;o--;){var c=r[s[o]];e=c.open+e.replace(c.closeRe,c.open)+c.close,i&&(e=e.replace(a,(function(e){return c.close+e+c.open})))}return e}t.setTheme=function(e){if("string"!=typeof e)for(var n in e)!function(n){t[n]=function(r){if("object"==typeof e[n]){var i=r;for(var a in e[n])i=t[e[n][a]](i);return i}return t[e[n]](r)}}(n);else console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));")};var f=function(e,t){var n=t.split("");return(n=n.map(e)).join("")};for(var h in t.trap=(ce||(ce=1,ue.exports=function(e,t){var n="";e=(e=e||"Run the trap, drop the bass").split("");var r={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","۝","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};return e.forEach((function(e){e=e.toLowerCase();var t=r[e]||[" "],i=Math.floor(Math.random()*t.length);n+=void 0!==r[e]?r[e][i]:e})),n}),ue.exports),t.zalgo=(le||(le=1,pe.exports=function(e,t){e=e||" he is here ";var n={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},r=[].concat(n.up,n.down,n.mid);function i(e){return Math.floor(Math.random()*e)}function a(e){var t=!1;return r.filter((function(n){t=n===e})),t}return function(e,t){var r,s,o="";for(s in(t=t||{}).up=void 0===t.up||t.up,t.mid=void 0===t.mid||t.mid,t.down=void 0===t.down||t.down,t.size=void 0!==t.size?t.size:"maxi",e=e.split(""))if(!a(s)){switch(o+=e[s],r={up:0,down:0,mid:0},t.size){case"mini":r.up=i(8),r.mid=i(2),r.down=i(8);break;case"maxi":r.up=i(16)+3,r.mid=i(4)+1,r.down=i(64)+3;break;default:r.up=i(8)+1,r.mid=i(6)/2,r.down=i(8)+1}var c=["up","mid","down"];for(var u in c)for(var l=c[u],p=0;p<=r[l];p++)t[l]&&(o+=n[l][i(n[l].length)])}return o}(e,t)}),pe.exports),t.maps={},t.maps.america=(de||(de=1,fe.exports=function(e){return function(t,n,r){if(" "===t)return t;switch(n%3){case 0:return e.red(t);case 1:return e.white(t);case 2:return e.blue(t)}}}),fe.exports)(t),t.maps.zebra=(he||(he=1,me.exports=function(e){return function(t,n,r){return n%2==0?t:e.inverse(t)}}),me.exports)(t),t.maps.rainbow=(ge||(ge=1,be.exports=function(e){var t=["red","yellow","green","blue","magenta"];return function(n,r,i){return" "===n?n:e[t[r++%t.length]](n)}}),be.exports)(t),t.maps.random=(ye||(ye=1,we.exports=function(e){var t=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(n,r,i){return" "===n?n:e[t[Math.round(Math.random()*(t.length-2))]](n)}}),we.exports)(t),t.maps)!function(e){t[e]=function(n){return f(t.maps[e],n)}}(h);i(t,function(){var e={};return Object.keys(l).forEach((function(t){e[t]={get:function(){return c([t])}}})),e}())}(re)),re.exports}function Se(){return xe||(xe=1,function(e){var t=_e();e.exports=t}(ne)),ne.exports}var Ee,ke={},Me={},Te={};var Ae,Re={};var Oe,Ie,Ne,Pe,je,De,Le,Ce,$e,Be,ze={};function Ue(){return Ie||(Ie=1,e=Me,Object.defineProperty(e,"cli",{value:(Ee||(Ee=1,Te.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9},Te.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}),Te)}),Object.defineProperty(e,"npm",{value:(Ae||(Ae=1,Re.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6},Re.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}),Re)}),Object.defineProperty(e,"syslog",{value:(Oe||(Oe=1,ze.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7},ze.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}),ze)})),Me;var e}function Fe(){return Ne||(Ne=1,e=ke,Object.defineProperty(e,"LEVEL",{value:Symbol.for("level")}),Object.defineProperty(e,"MESSAGE",{value:Symbol.for("message")}),Object.defineProperty(e,"SPLAT",{value:Symbol.for("splat")}),Object.defineProperty(e,"configs",{value:Ue()})),ke;var e}function qe(){if(Pe)return te.exports;Pe=1;const e=Se(),{LEVEL:t,MESSAGE:n}=Fe();e.enabled=!0;const r=/\s+/;class i{constructor(e={}){e.colors&&this.addColors(e.colors),this.options=e}static addColors(e){const t=Object.keys(e).reduce(((t,n)=>(t[n]=r.test(e[n])?e[n].split(r):e[n],t)),{});return i.allColors=Object.assign({},i.allColors||{},t),i.allColors}addColors(e){return i.addColors(e)}colorize(t,n,r){if(void 0===r&&(r=n),!Array.isArray(i.allColors[t]))return e[i.allColors[t]](r);for(let n=0,a=i.allColors[t].length;n<a;n++)r=e[i.allColors[t][n]](r);return r}transform(e,r){return r.all&&"string"==typeof e[n]&&(e[n]=this.colorize(e[t],e.level,e[n])),(r.level||r.all||!r.message)&&(e.level=this.colorize(e[t],e.level)),(r.all||r.message)&&(e.message=this.colorize(e[t],e.level,e.message)),e}}return te.exports=e=>new i(e),te.exports.Colorizer=te.exports.Format=i,te.exports}var He,Ye,Ve={exports:{}},Ge={exports:{}};function Ke(){if(He)return Ge.exports;He=1;const{configs:e,LEVEL:t,MESSAGE:n}=Fe();class r{constructor(t={levels:e.npm.levels}){this.paddings=r.paddingForLevels(t.levels,t.filler),this.options=t}static getLongestLevel(e){const t=Object.keys(e).map((e=>e.length));return Math.max(...t)}static paddingForLevel(e,t,n){const r=n+1-e.length,i=Math.floor(r/t.length);return`${t}${t.repeat(i)}`.slice(0,r)}static paddingForLevels(e,t=" "){const n=r.getLongestLevel(e);return Object.keys(e).reduce(((e,i)=>(e[i]=r.paddingForLevel(i,t,n),e)),{})}transform(e,r){return e.message=`${this.paddings[e[t]]}${e.message}`,e[n]&&(e[n]=`${this.paddings[e[t]]}${e[n]}`),e}}return Ge.exports=e=>new r(e),Ge.exports.Padder=Ge.exports.Format=r,Ge.exports}var We,Ze={exports:{}};var Je,Xe,Qe,et,tt,nt,rt,it,at,st,ot,ct,ut,lt,pt,dt={exports:{}};function ft(){return Je||(Je=1,function(e,t){const{hasOwnProperty:n}=Object.prototype,r=d();r.configure=d,r.stringify=r,r.default=r,t.stringify=r,t.configure=d,e.exports=r;const i=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function a(e){return e.length<5e3&&!i.test(e)?`"${e}"`:JSON.stringify(e)}function s(e,t){if(e.length>200||t)return e.sort(t);for(let t=1;t<e.length;t++){const n=e[t];let r=t;for(;0!==r&&e[r-1]>n;)e[r]=e[r-1],r--;e[r]=n}return e}const o=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function c(e){return void 0!==o.call(e)&&0!==e.length}function u(e,t,n){e.length<n&&(n=e.length);const r=","===t?"":" ";let i=`"0":${r}${e[0]}`;for(let a=1;a<n;a++)i+=`${t}"${a}":${r}${e[a]}`;return i}function l(e,t){let r;if(n.call(e,t)){if(r=e[t],"number"!=typeof r)throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${t}" argument must be an integer`);if(r<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return void 0===r?1/0:r}function p(e){return 1===e?"1 item":`${e} items`}function d(e){const t=function(e){if(n.call(e,"strict")){const t=e.strict;if("boolean"!=typeof t)throw new TypeError('The "strict" argument must be of type boolean');if(t)return e=>{let t="Object can not safely be stringified. Received type "+typeof e;throw"function"!=typeof e&&(t+=` (${e.toString()})`),new Error(t)}}}(e={...e});t&&(void 0===e.bigint&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));const r=function(e){if(n.call(e,"circularValue")){const t=e.circularValue;if("string"==typeof t)return`"${t}"`;if(null==t)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}(e),i=function(e,t){let r;if(n.call(e,t)&&(r=e[t],"boolean"!=typeof r))throw new TypeError(`The "${t}" argument must be of type boolean`);return void 0===r||r}(e,"bigint"),o=function(e){let t;if(n.call(e,"deterministic")&&(t=e.deterministic,"boolean"!=typeof t&&"function"!=typeof t))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return void 0===t||t}(e),d="function"==typeof o?o:void 0,f=l(e,"maximumDepth"),h=l(e,"maximumBreadth");function m(e,n,u,l,g,b){let y=n[e];switch("object"==typeof y&&null!==y&&"function"==typeof y.toJSON&&(y=y.toJSON(e)),y=l.call(n,e,y),typeof y){case"string":return a(y);case"object":{if(null===y)return"null";if(-1!==u.indexOf(y))return r;let e="",t=",";const n=b;if(Array.isArray(y)){if(0===y.length)return"[]";if(f<u.length+1)return'"[Array]"';u.push(y),""!==g&&(e+=`\n${b+=g}`,t=`,\n${b}`);const r=Math.min(y.length,h);let i=0;for(;i<r-1;i++){const n=m(String(i),y,u,l,g,b);e+=void 0!==n?n:"null",e+=t}const a=m(String(i),y,u,l,g,b);if(e+=void 0!==a?a:"null",y.length-1>h){e+=`${t}"... ${p(y.length-h-1)} not stringified"`}return""!==g&&(e+=`\n${n}`),u.pop(),`[${e}]`}let i=Object.keys(y);const v=i.length;if(0===v)return"{}";if(f<u.length+1)return'"[Object]"';let x="",w="";""!==g&&(t=`,\n${b+=g}`,x=" ");const _=Math.min(v,h);o&&!c(y)&&(i=s(i,d)),u.push(y);for(let n=0;n<_;n++){const r=i[n],s=m(r,y,u,l,g,b);void 0!==s&&(e+=`${w}${a(r)}:${x}${s}`,w=t)}if(v>h){e+=`${w}"...":${x}"${p(v-h)} not stringified"`,w=t}return""!==g&&w.length>1&&(e=`\n${b}${e}\n${n}`),u.pop(),`{${e}}`}case"number":return isFinite(y)?String(y):t?t(y):"null";case"boolean":return!0===y?"true":"false";case"undefined":return;case"bigint":if(i)return String(y);default:return t?t(y):void 0}}function g(e,n,s,o,c,u){switch("object"==typeof n&&null!==n&&"function"==typeof n.toJSON&&(n=n.toJSON(e)),typeof n){case"string":return a(n);case"object":{if(null===n)return"null";if(-1!==s.indexOf(n))return r;const e=u;let t="",i=",";if(Array.isArray(n)){if(0===n.length)return"[]";if(f<s.length+1)return'"[Array]"';s.push(n),""!==c&&(t+=`\n${u+=c}`,i=`,\n${u}`);const r=Math.min(n.length,h);let a=0;for(;a<r-1;a++){const e=g(String(a),n[a],s,o,c,u);t+=void 0!==e?e:"null",t+=i}const l=g(String(a),n[a],s,o,c,u);if(t+=void 0!==l?l:"null",n.length-1>h){t+=`${i}"... ${p(n.length-h-1)} not stringified"`}return""!==c&&(t+=`\n${e}`),s.pop(),`[${t}]`}s.push(n);let l="";""!==c&&(i=`,\n${u+=c}`,l=" ");let d="";for(const e of o){const r=g(e,n[e],s,o,c,u);void 0!==r&&(t+=`${d}${a(e)}:${l}${r}`,d=i)}return""!==c&&d.length>1&&(t=`\n${u}${t}\n${e}`),s.pop(),`{${t}}`}case"number":return isFinite(n)?String(n):t?t(n):"null";case"boolean":return!0===n?"true":"false";case"undefined":return;case"bigint":if(i)return String(n);default:return t?t(n):void 0}}function b(e,n,l,m,g){switch(typeof n){case"string":return a(n);case"object":{if(null===n)return"null";if("function"==typeof n.toJSON){if("object"!=typeof(n=n.toJSON(e)))return b(e,n,l,m,g);if(null===n)return"null"}if(-1!==l.indexOf(n))return r;const t=g;if(Array.isArray(n)){if(0===n.length)return"[]";if(f<l.length+1)return'"[Array]"';l.push(n);let e=`\n${g+=m}`;const r=`,\n${g}`,i=Math.min(n.length,h);let a=0;for(;a<i-1;a++){const t=b(String(a),n[a],l,m,g);e+=void 0!==t?t:"null",e+=r}const s=b(String(a),n[a],l,m,g);if(e+=void 0!==s?s:"null",n.length-1>h){e+=`${r}"... ${p(n.length-h-1)} not stringified"`}return e+=`\n${t}`,l.pop(),`[${e}]`}let i=Object.keys(n);const y=i.length;if(0===y)return"{}";if(f<l.length+1)return'"[Object]"';const v=`,\n${g+=m}`;let x="",w="",_=Math.min(y,h);c(n)&&(x+=u(n,v,h),i=i.slice(n.length),_-=n.length,w=v),o&&(i=s(i,d)),l.push(n);for(let e=0;e<_;e++){const t=i[e],r=b(t,n[t],l,m,g);void 0!==r&&(x+=`${w}${a(t)}: ${r}`,w=v)}if(y>h){x+=`${w}"...": "${p(y-h)} not stringified"`,w=v}return""!==w&&(x=`\n${g}${x}\n${t}`),l.pop(),`{${x}}`}case"number":return isFinite(n)?String(n):t?t(n):"null";case"boolean":return!0===n?"true":"false";case"undefined":return;case"bigint":if(i)return String(n);default:return t?t(n):void 0}}function y(e,n,l){switch(typeof n){case"string":return a(n);case"object":{if(null===n)return"null";if("function"==typeof n.toJSON){if("object"!=typeof(n=n.toJSON(e)))return y(e,n,l);if(null===n)return"null"}if(-1!==l.indexOf(n))return r;let t="";const i=void 0!==n.length;if(i&&Array.isArray(n)){if(0===n.length)return"[]";if(f<l.length+1)return'"[Array]"';l.push(n);const e=Math.min(n.length,h);let r=0;for(;r<e-1;r++){const e=y(String(r),n[r],l);t+=void 0!==e?e:"null",t+=","}const i=y(String(r),n[r],l);if(t+=void 0!==i?i:"null",n.length-1>h){t+=`,"... ${p(n.length-h-1)} not stringified"`}return l.pop(),`[${t}]`}let m=Object.keys(n);const g=m.length;if(0===g)return"{}";if(f<l.length+1)return'"[Object]"';let b="",v=Math.min(g,h);i&&c(n)&&(t+=u(n,",",h),m=m.slice(n.length),v-=n.length,b=","),o&&(m=s(m,d)),l.push(n);for(let e=0;e<v;e++){const r=m[e],i=y(r,n[r],l);void 0!==i&&(t+=`${b}${a(r)}:${i}`,b=",")}if(g>h){t+=`${b}"...":"${p(g-h)} not stringified"`}return l.pop(),`{${t}}`}case"number":return isFinite(n)?String(n):t?t(n):"null";case"boolean":return!0===n?"true":"false";case"undefined":return;case"bigint":if(i)return String(n);default:return t?t(n):void 0}}return function(e,t,n){if(arguments.length>1){let r="";if("number"==typeof n?r=" ".repeat(Math.min(n,10)):"string"==typeof n&&(r=n.slice(0,10)),null!=t){if("function"==typeof t)return m("",{"":e},[],t,r,"");if(Array.isArray(t))return g("",e,[],function(e){const t=new Set;for(const n of e)"string"!=typeof n&&"number"!=typeof n||t.add(String(n));return t}(t),r,"")}if(0!==r.length)return b("",e,[],r,"")}return y("",e,[])}}}(dt,dt.exports)),dt.exports}function ht(){if(Qe)return Xe;Qe=1;const e=W(),{MESSAGE:t}=Fe(),n=ft();function r(e,t){return"bigint"==typeof t?t.toString():t}return Xe=e(((e,i)=>{const a=n.configure(i);return e[t]=a(e,i.replacer||r,i.space),e}))}function mt(){if(at)return it;at=1;const e=W();return it=e(((e,t={})=>{let n="metadata";t.key&&(n=t.key);let r=[];return t.fillExcept||t.fillWith||(r.push("level"),r.push("message")),t.fillExcept&&(r=t.fillExcept),r.length>0?function(e,t,n){const r=t.reduce(((t,n)=>(t[n]=e[n],delete e[n],t)),{}),i=Object.keys(e).reduce(((t,n)=>(t[n]=e[n],delete e[n],t)),{});return Object.assign(e,r,{[n]:i}),e}(e,r,n):t.fillWith?function(e,t,n){return e[n]=t.reduce(((t,n)=>(t[n]=e[n],delete e[n],t)),{}),e}(e,t.fillWith,n):e})),it}function gt(){if(ot)return st;ot=1;var e=1e3,t=60*e,n=60*t,r=24*n,i=7*r,a=365.25*r;function s(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return st=function(o,c){c=c||{};var u=typeof o;if("string"===u&&o.length>0)return function(s){if((s=String(s)).length>100)return;var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(!o)return;var c=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*a;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*r;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(o);if("number"===u&&isFinite(o))return c.long?function(i){var a=Math.abs(i);if(a>=r)return s(i,a,r,"day");if(a>=n)return s(i,a,n,"hour");if(a>=t)return s(i,a,t,"minute");if(a>=e)return s(i,a,e,"second");return i+" ms"}(o):function(i){var a=Math.abs(i);if(a>=r)return Math.round(i/r)+"d";if(a>=n)return Math.round(i/n)+"h";if(a>=t)return Math.round(i/t)+"m";if(a>=e)return Math.round(i/e)+"s";return i+"ms"}(o);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))},st}var bt,yt,vt,xt,wt,_t={exports:{}};var St=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Et="\\d\\d?",kt="\\d\\d",Mt="[^\\s]+",Tt=/\[([^]*?)\]/gm;function At(e,t){for(var n=[],r=0,i=e.length;r<i;r++)n.push(e[r].substr(0,t));return n}var Rt=function(e){return function(t,n){var r=n[e].map((function(e){return e.toLowerCase()})),i=r.indexOf(t.toLowerCase());return i>-1?i:null}};function Ot(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,i=t;r<i.length;r++){var a=i[r];for(var s in a)e[s]=a[s]}return e}var It=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Nt=["January","February","March","April","May","June","July","August","September","October","November","December"],Pt=At(Nt,3),jt={dayNamesShort:At(It,3),dayNames:It,monthNamesShort:Pt,monthNames:Nt,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!=10?1:0)*e%10]}},Dt=Ot({},jt),Lt=function(e){return Dt=Ot(Dt,e)},Ct=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},$t=function(e,t){for(void 0===t&&(t=2),e=String(e);e.length<t;)e="0"+e;return e},Bt={D:function(e){return String(e.getDate())},DD:function(e){return $t(e.getDate())},Do:function(e,t){return t.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return $t(e.getDay())},ddd:function(e,t){return t.dayNamesShort[e.getDay()]},dddd:function(e,t){return t.dayNames[e.getDay()]},M:function(e){return String(e.getMonth()+1)},MM:function(e){return $t(e.getMonth()+1)},MMM:function(e,t){return t.monthNamesShort[e.getMonth()]},MMMM:function(e,t){return t.monthNames[e.getMonth()]},YY:function(e){return $t(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return $t(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return $t(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return $t(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return $t(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return $t(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return $t(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return $t(e.getMilliseconds(),3)},a:function(e,t){return e.getHours()<12?t.amPm[0]:t.amPm[1]},A:function(e,t){return e.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+$t(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+$t(Math.floor(Math.abs(t)/60),2)+":"+$t(Math.abs(t)%60,2)}},zt=function(e){return+e-1},Ut=[null,Et],Ft=[null,Mt],qt=["isPm",Mt,function(e,t){var n=e.toLowerCase();return n===t.amPm[0]?0:n===t.amPm[1]?1:null}],Ht=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var t=(e+"").match(/([+-]|\d\d)/gi);if(t){var n=60*+t[1]+parseInt(t[2],10);return"+"===t[0]?n:-n}return 0}],Yt={D:["day",Et],DD:["day",kt],Do:["day",Et+Mt,function(e){return parseInt(e,10)}],M:["month",Et,zt],MM:["month",kt,zt],YY:["year",kt,function(e){var t=+(""+(new Date).getFullYear()).substr(0,2);return+(""+(+e>68?t-1:t)+e)}],h:["hour",Et,void 0,"isPm"],hh:["hour",kt,void 0,"isPm"],H:["hour",Et],HH:["hour",kt],m:["minute",Et],mm:["minute",kt],s:["second",Et],ss:["second",kt],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(e){return 100*+e}],SS:["millisecond",kt,function(e){return 10*+e}],SSS:["millisecond","\\d{3}"],d:Ut,dd:Ut,ddd:Ft,dddd:Ft,MMM:["month",Mt,Rt("monthNamesShort")],MMMM:["month",Mt,Rt("monthNames")],a:qt,A:qt,ZZ:Ht,Z:Ht},Vt={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},Gt=function(e){return Ot(Vt,e)},Kt=function(e,t,n){if(void 0===t&&(t=Vt.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var r=[];t=(t=Vt[t]||t).replace(Tt,(function(e,t){return r.push(t),"@@@"}));var i=Ot(Ot({},Dt),n);return(t=t.replace(St,(function(t){return Bt[t](e,i)}))).replace(/@@@/g,(function(){return r.shift()}))};function Wt(e,t,n){if(void 0===n&&(n={}),"string"!=typeof t)throw new Error("Invalid format in fecha parse");if(t=Vt[t]||t,e.length>1e3)return null;var r={year:(new Date).getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},i=[],a=[],s=t.replace(Tt,(function(e,t){return a.push(Ct(t)),"@@@"})),o={},c={};s=Ct(s).replace(St,(function(e){var t=Yt[e],n=t[0],r=t[1],a=t[3];if(o[n])throw new Error("Invalid format. "+n+" specified twice in format");return o[n]=!0,a&&(c[a]=!0),i.push(t),"("+r+")"})),Object.keys(c).forEach((function(e){if(!o[e])throw new Error("Invalid format. "+e+" is required in specified format")})),s=s.replace(/@@@/g,(function(){return a.shift()}));var u=e.match(new RegExp(s,"i"));if(!u)return null;for(var l,p=Ot(Ot({},Dt),n),d=1;d<u.length;d++){var f=i[d-1],h=f[0],m=f[2],g=m?m(u[d],p):+u[d];if(null==g)return null;r[h]=g}if(1===r.isPm&&null!=r.hour&&12!=+r.hour?r.hour=+r.hour+12:0===r.isPm&&12==+r.hour&&(r.hour=0),null==r.timezoneOffset){l=new Date(r.year,r.month,r.day,r.hour,r.minute,r.second,r.millisecond);for(var b=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],y=(d=0,b.length);d<y;d++)if(o[b[d][0]]&&r[b[d][0]]!==l[b[d][1]]())return null}else if(l=new Date(Date.UTC(r.year,r.month,r.day,r.hour,r.minute-r.timezoneOffset,r.second,r.millisecond)),r.month>11||r.month<0||r.day>31||r.day<1||r.hour>23||r.hour<0||r.minute>59||r.minute<0||r.second>59||r.second<0)return null;return l}var Zt,Jt,Xt,Qt,en,tn={format:Kt,parse:Wt,defaultI18n:jt,setGlobalDateI18n:Lt,setGlobalDateMasks:Gt},nn=H(Object.freeze({__proto__:null,assign:Ot,default:tn,defaultI18n:jt,format:Kt,parse:Wt,setGlobalDateI18n:Lt,setGlobalDateMasks:Gt}));function rn(){if(en)return K;en=1;const e=K.format=W();function t(t,n){Object.defineProperty(e,t,{get:()=>n(),configurable:!0})}return K.levels=function(){if(De)return je;De=1;const{Colorizer:e}=qe();return je=t=>(e.addColors(t.colors||t),t),je}(),t("align",(function(){return function(){if(Ce)return Le;Ce=1;const e=W();return Le=e((e=>(e.message=`\t${e.message}`,e)))}()})),t("errors",(function(){return function(){if(Be)return $e;Be=1;const e=W(),{LEVEL:t,MESSAGE:n}=Fe();return $e=e(((e,{stack:r,cause:i})=>{if(e instanceof Error){const a=Object.assign({},e,{level:e.level,[t]:e[t]||e.level,message:e.message,[n]:e[n]||e.message});return r&&(a.stack=e.stack),i&&(a.cause=e.cause),a}if(!(e.message instanceof Error))return e;const a=e.message;return Object.assign(e,a),e.message=a.message,e[n]=a.message,r&&(e.stack=a.stack),i&&(e.cause=a.cause),e}))}()})),t("cli",(function(){return function(){if(Ye)return Ve.exports;Ye=1;const{Colorizer:e}=qe(),{Padder:t}=Ke(),{configs:n,MESSAGE:r}=Fe();class i{constructor(r={}){r.levels||(r.levels=n.cli.levels),this.colorizer=new e(r),this.padder=new t(r),this.options=r}transform(e,t){return this.colorizer.transform(this.padder.transform(e,t),t),e[r]=`${e.level}:${e.message}`,e}}return Ve.exports=e=>new i(e),Ve.exports.Format=i,Ve.exports}()})),t("combine",(function(){return function(){if(We)return Ze.exports;We=1;const e=W();function t(e){if(e.every(n))return t=>{let n=t;for(let t=0;t<e.length;t++)if(n=e[t].transform(n,e[t].options),!n)return!1;return n}}function n(e){if("function"!=typeof e.transform)throw new Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join("\n"));return!0}return Ze.exports=(...n)=>{const r=e(t(n)),i=r();return i.Format=r.Format,i},Ze.exports.cascade=t,Ze.exports}()})),t("colorize",(function(){return qe()})),t("json",(function(){return ht()})),t("label",(function(){return function(){if(tt)return et;tt=1;const e=W();return et=e(((e,t)=>t.message?(e.message=`[${t.label}] ${e.message}`,e):(e.label=t.label,e)))}()})),t("logstash",(function(){return function(){if(rt)return nt;rt=1;const e=W(),{MESSAGE:t}=Fe(),n=ft();return nt=e((e=>{const r={};return e.message&&(r["@message"]=e.message,delete e.message),e.timestamp&&(r["@timestamp"]=e.timestamp,delete e.timestamp),r["@fields"]=e,e[t]=n(r),e}))}()})),t("metadata",(function(){return mt()})),t("ms",(function(){return function(){if(ut)return ct;ut=1;const e=W(),t=gt();return ct=e((e=>{const n=+new Date;return this.diff=n-(this.prevTime||n),this.prevTime=n,e.ms=`+${t(this.diff)}`,e}))}()})),t("padLevels",(function(){return Ke()})),t("prettyPrint",(function(){return function(){if(pt)return lt;pt=1;const e=s.inspect,t=W(),{LEVEL:n,MESSAGE:r,SPLAT:i}=Fe();return lt=t(((t,a={})=>{const s=Object.assign({},t);return delete s[n],delete s[r],delete s[i],t[r]=e(s,!1,a.depth||null,a.colorize),t}))}()})),t("printf",(function(){return function(){if(bt)return _t.exports;bt=1;const{MESSAGE:e}=Fe();class t{constructor(e){this.template=e}transform(t){return t[e]=this.template(t),t}}return _t.exports=e=>new t(e),_t.exports.Printf=_t.exports.Format=t,_t.exports}()})),t("simple",(function(){return function(){if(vt)return yt;vt=1;const e=W(),{MESSAGE:t}=Fe(),n=ft();return yt=e((e=>{const r=n(Object.assign({},e,{level:void 0,message:void 0,splat:void 0})),i=e.padding&&e.padding[e.level]||"";return e[t]="{}"!==r?`${e.level}:${i} ${e.message} ${r}`:`${e.level}:${i} ${e.message}`,e}))}()})),t("splat",(function(){return function(){if(wt)return xt;wt=1;const e=s,{SPLAT:t}=Fe(),n=/%[scdjifoO%]/g,r=/%%/g;class i{constructor(e){this.options=e}_splat(n,i){const a=n.message,s=n[t]||n.splat||[],o=a.match(r),c=o&&o.length||0,u=i.length-c-s.length,l=u<0?s.splice(u,-1*u):[],p=l.length;if(p)for(let e=0;e<p;e++)Object.assign(n,l[e]);return n.message=e.format(a,...s),n}transform(e){const r=e.message,i=e[t]||e.splat;if(!i||!i.length)return e;const a=r&&r.match&&r.match(n);if(!a&&(i||i.length)){const t=i.length>1?i.splice(0):i,n=t.length;if(n)for(let r=0;r<n;r++)Object.assign(e,t[r]);return e}return a?this._splat(e,a):e}}return xt=e=>new i(e)}()})),t("timestamp",(function(){return function(){if(Jt)return Zt;Jt=1;const e=nn,t=W();return Zt=t(((t,n={})=>(n.format&&(t.timestamp="function"==typeof n.format?n.format():e.format(new Date,n.format)),t.timestamp||(t.timestamp=(new Date).toISOString()),n.alias&&(t[n.alias]=t.timestamp),t)))}()})),t("uncolorize",(function(){return function(){if(Qt)return Xt;Qt=1;const e=Se(),t=W(),{MESSAGE:n}=Fe();return Xt=t(((t,r)=>(!1!==r.level&&(t.level=e.strip(t.level)),!1!==r.message&&(t.message=e.strip(String(t.message))),!1!==r.raw&&t[n]&&(t[n]=e.strip(String(t[n]))),t)))}()})),K}var an,sn={};function on(){return an||(an=1,function(e){const{format:t}=s;e.warn={deprecated:e=>()=>{throw new Error(t("{ %s } was removed in winston@3.0.0.",e))},useFormat:e=>()=>{throw new Error([t("{ %s } was removed in winston@3.0.0.",e),"Use a custom winston.format = winston.format(function) instead."].join("\n"))},forFunctions(t,n,r){r.forEach((r=>{t[r]=e.warn[n](r)}))},forProperties(t,n,r){r.forEach((r=>{const i=e.warn[n](r);Object.defineProperty(t,r,{get:i,set:i})}))}}}(sn)),sn}var cn,un,ln,pn,dn,fn,hn="3.17.0",mn={},gn={exports:{}},bn={exports:{}};function yn(){return pn?ln:(pn=1,ln=l)}function vn(){if(fn)return dn;function e(e,r){n(e,r),t(e)}function t(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}return fn=1,dn={destroy:function(r,i){var a=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(i?i(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,r)):process.nextTick(n,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,(function(n){!i&&n?a._writableState?a._writableState.errorEmitted?process.nextTick(t,a):(a._writableState.errorEmitted=!0,process.nextTick(e,a,n)):process.nextTick(e,a,n):i?(process.nextTick(t,a),i(n)):process.nextTick(t,a)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}},dn}var xn,wn,_n,Sn={};function En(){if(xn)return Sn;xn=1;const e={};function t(t,n,r){r||(r=Error);class i extends r{constructor(e,t,r){super(function(e,t,r){return"string"==typeof n?n:n(e,t,r)}(e,t,r))}}i.prototype.name=r.name,i.prototype.code=t,e[t]=i}function n(e,t){if(Array.isArray(e)){const n=e.length;return e=e.map((e=>String(e))),n>2?`one of ${t} ${e.slice(0,n-1).join(", ")}, or `+e[n-1]:2===n?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}return`of ${t} ${String(e)}`}return t("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),t("ERR_INVALID_ARG_TYPE",(function(e,t,r){let i;var a;let s;if("string"==typeof t&&(a="not ",t.substr(0,a.length)===a)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s=`The ${e} ${i} ${n(t,"type")}`;else{const r=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s=`The "${e}" ${r} ${i} ${n(t,"type")}`}return s+=". Received type "+typeof r,s}),TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Sn.codes=e,Sn}function kn(){if(_n)return wn;_n=1;var e=En().codes.ERR_INVALID_OPT_VALUE;return wn={getHighWaterMark:function(t,n,r,i){var a=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(n,i,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new e(i?r:"highWaterMark",a);return Math.floor(a)}return t.objectMode?16:16384}}}var Mn,Tn,An,Rn,On={exports:{}},In={exports:{}};function Nn(){if(Tn)return On.exports;Tn=1;try{var e=require("util");if("function"!=typeof e.inherits)throw"";On.exports=e.inherits}catch(e){On.exports=(Mn||(Mn=1,"function"==typeof Object.create?In.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:In.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),In.exports)}return On.exports}function Pn(){if(Rn)return An;function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function n(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}Rn=1;var a=p.Buffer,o=s.inspect,c=o&&o.custom||"inspect";return An=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return r(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,n,r,i=a.allocUnsafe(e>>>0),s=this.head,o=0;s;)t=s.data,n=i,r=o,a.prototype.copy.call(t,n,r),o+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,a=e>i.length?i.length:e;if(a===i.length?r+=i:r+=i.slice(0,e),0===(e-=a)){a===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0===(e-=s)){s===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(s));break}++r}return this.length-=r,t}},{key:c,value:function(e,n){return o(this,t(t({},n),{},{depth:0,customInspect:!1}))}}]),e}()}var jn,Dn,Ln,Cn,$n,Bn,zn,Un,Fn,qn,Hn,Yn,Vn,Gn,Kn,Wn={},Zn={exports:{}};function Jn(){if(Dn)return Wn;Dn=1;var e=(jn||(jn=1,function(e,t){var n=p,r=n.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return r(e,t,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=a),a.prototype=Object.create(r.prototype),i(r,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=r(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}(Zn,Zn.exports)),Zn.exports).Buffer,t=e.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function n(n){var r;switch(this.encoding=function(n){var r=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(n);if("string"!=typeof r&&(e.isEncoding===t||!t(n)))throw new Error("Unknown encoding: "+n);return r||n}(n),this.encoding){case"utf16le":this.text=a,this.end=s,r=4;break;case"utf8":this.fillLast=i,r=4;break;case"base64":this.text=o,this.end=c,r=3;break;default:return this.write=u,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(r)}function r(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function i(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function a(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function s(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function o(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function l(e){return e&&e.length?this.write(e):""}return Wn.StringDecoder=n,n.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},n.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},n.prototype.text=function(e,t){var n=function(e,t,n){var i=t.length-1;if(i<n)return 0;var a=r(t[i]);if(a>=0)return a>0&&(e.lastNeed=a-1),a;if(--i<n||-2===a)return 0;if(a=r(t[i]),a>=0)return a>0&&(e.lastNeed=a-2),a;if(--i<n||-2===a)return 0;if(a=r(t[i]),a>=0)return a>0&&(2===a?a=0:e.lastNeed=a-3),a;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var i=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},n.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},Wn}function Xn(){if(Cn)return Ln;Cn=1;var e=En().codes.ERR_STREAM_PREMATURE_CLOSE;function t(){}return Ln=function n(r,i,a){if("function"==typeof i)return n(r,null,i);i||(i={}),a=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(a||t);var s=i.readable||!1!==i.readable&&r.readable,o=i.writable||!1!==i.writable&&r.writable,c=function(){r.writable||l()},u=r._writableState&&r._writableState.finished,l=function(){o=!1,u=!0,s||a.call(r)},p=r._readableState&&r._readableState.endEmitted,d=function(){s=!1,p=!0,o||a.call(r)},f=function(e){a.call(r,e)},h=function(){var t;return s&&!p?(r._readableState&&r._readableState.ended||(t=new e),a.call(r,t)):o&&!u?(r._writableState&&r._writableState.ended||(t=new e),a.call(r,t)):void 0},m=function(){r.req.on("finish",l)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(r)?o&&!r._writableState&&(r.on("end",c),r.on("close",c)):(r.on("complete",l),r.on("abort",h),r.req?m():r.on("request",m)),r.on("end",d),r.on("finish",l),!1!==i.error&&r.on("error",f),r.on("close",h),function(){r.removeListener("complete",l),r.removeListener("abort",h),r.removeListener("request",m),r.req&&r.req.removeListener("finish",l),r.removeListener("end",c),r.removeListener("close",c),r.removeListener("finish",l),r.removeListener("end",d),r.removeListener("error",f),r.removeListener("close",h)}},Ln}function Qn(){if(Bn)return $n;var e;function t(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Bn=1;var n=Xn(),r=Symbol("lastResolve"),i=Symbol("lastReject"),a=Symbol("error"),s=Symbol("ended"),o=Symbol("lastPromise"),c=Symbol("handlePromise"),u=Symbol("stream");function l(e,t){return{value:e,done:t}}function p(e){var t=e[r];if(null!==t){var n=e[u].read();null!==n&&(e[o]=null,e[r]=null,e[i]=null,t(l(n,!1)))}}function d(e){process.nextTick(p,e)}var f=Object.getPrototypeOf((function(){})),h=Object.setPrototypeOf((t(e={get stream(){return this[u]},next:function(){var e=this,t=this[a];if(null!==t)return Promise.reject(t);if(this[s])return Promise.resolve(l(void 0,!0));if(this[u].destroyed)return new Promise((function(t,n){process.nextTick((function(){e[a]?n(e[a]):t(l(void 0,!0))}))}));var n,r=this[o];if(r)n=new Promise(function(e,t){return function(n,r){e.then((function(){t[s]?n(l(void 0,!0)):t[c](n,r)}),r)}}(r,this));else{var i=this[u].read();if(null!==i)return Promise.resolve(l(i,!1));n=new Promise(this[c])}return this[o]=n,n}},Symbol.asyncIterator,(function(){return this})),t(e,"return",(function(){var e=this;return new Promise((function(t,n){e[u].destroy(null,(function(e){e?n(e):t(l(void 0,!0))}))}))})),e),f);return $n=function(e){var p,f=Object.create(h,(t(p={},u,{value:e,writable:!0}),t(p,r,{value:null,writable:!0}),t(p,i,{value:null,writable:!0}),t(p,a,{value:null,writable:!0}),t(p,s,{value:e._readableState.endEmitted,writable:!0}),t(p,c,{value:function(e,t){var n=f[u].read();n?(f[o]=null,f[r]=null,f[i]=null,e(l(n,!1))):(f[r]=e,f[i]=t)},writable:!0}),p));return f[o]=null,n(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=f[i];return null!==t&&(f[o]=null,f[r]=null,f[i]=null,t(e)),void(f[a]=e)}var n=f[r];null!==n&&(f[o]=null,f[r]=null,f[i]=null,n(l(void 0,!0))),f[s]=!0})),e.on("readable",d.bind(null,f)),f},$n}function er(){if(Un)return zn;function e(e,t,n,r,i,a,s){try{var o=e[a](s),c=o.value}catch(e){return void n(e)}o.done?t(c):Promise.resolve(c).then(r,i)}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Un=1;var r=En().codes.ERR_INVALID_ARG_TYPE;return zn=function(i,a,s){var o;if(a&&"function"==typeof a.next)o=a;else if(a&&a[Symbol.asyncIterator])o=a[Symbol.asyncIterator]();else{if(!a||!a[Symbol.iterator])throw new r("iterable",["Iterable"],a);o=a[Symbol.iterator]()}var c=new i(function(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?t(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({objectMode:!0},s)),u=!1;function l(){return p.apply(this,arguments)}function p(){var t;return t=function*(){try{var e=yield o.next(),t=e.value;e.done?c.push(null):c.push(yield t)?l():u=!1}catch(e){c.destroy(e)}},p=function(){var n=this,r=arguments;return new Promise((function(i,a){var s=t.apply(n,r);function o(t){e(s,i,a,o,c,"next",t)}function c(t){e(s,i,a,o,c,"throw",t)}o(void 0)}))},p.apply(this,arguments)}return c._read=function(){u||(u=!0,l())},c},zn}function tr(){if(qn)return Fn;var e;qn=1,Fn=E,E.ReadableState=S,d.EventEmitter;var t=function(e,t){return e.listeners(t).length},n=yn(),r=p.Buffer,i=(void 0!==F?F:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var a,o=s;a=o&&o.debuglog?o.debuglog("stream"):function(){};var c,u,l,f=Pn(),h=vn(),m=kn().getHighWaterMark,g=En().codes,b=g.ERR_INVALID_ARG_TYPE,y=g.ERR_STREAM_PUSH_AFTER_EOF,v=g.ERR_METHOD_NOT_IMPLEMENTED,x=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;Nn()(E,n);var w=h.errorOrDestroy,_=["error","close","destroy","pause","resume"];function S(t,n,r){e=e||nr(),t=t||{},"boolean"!=typeof r&&(r=n instanceof e),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",r),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(c||(c=Jn().StringDecoder),this.decoder=new c(t.encoding),this.encoding=t.encoding)}function E(t){if(e=e||nr(),!(this instanceof E))return new E(t);var r=this instanceof e;this._readableState=new S(t,this,r),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),n.call(this)}function k(e,t,n,s,o){a("readableAddChunk",t);var c,u=e._readableState;if(null===t)u.reading=!1,function(e,t){if(a("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?R(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,O(e)))}(e,u);else if(o||(c=function(e,t){var n;a=t,r.isBuffer(a)||a instanceof i||"string"==typeof t||void 0===t||e.objectMode||(n=new b("chunk",["string","Buffer","Uint8Array"],t));var a;return n}(u,t)),c)w(e,c);else if(u.objectMode||t&&t.length>0)if("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===r.prototype||(t=function(e){return r.from(e)}(t)),s)u.endEmitted?w(e,new x):M(e,u,t,!0);else if(u.ended)w(e,new y);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!n?(t=u.decoder.write(t),u.objectMode||0!==t.length?M(e,u,t,!1):I(e,u)):M(e,u,t,!1)}else s||(u.reading=!1,I(e,u));return!u.ended&&(u.length<u.highWaterMark||0===u.length)}function M(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&R(e)),I(e,t)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=h.destroy,E.prototype._undestroy=h.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var n,i=this._readableState;return i.objectMode?n=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=r.from(e,t),t=""),n=!0),k(this,e,t,!1,n)},E.prototype.unshift=function(e){return k(this,e,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(e){c||(c=Jn().StringDecoder);var t=new c(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,r="";null!==n;)r+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==r&&this._readableState.buffer.push(r),this._readableState.length=r.length,this};var T=1073741824;function A(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=T?e=T:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function R(e){var t=e._readableState;a("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(a("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(O,e))}function O(e){var t=e._readableState;a("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function I(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(N,e,t))}function N(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(a("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function P(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function j(e){a("readable nexttick read 0"),e.read(0)}function D(e,t){a("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(a("flow",t.flowing);t.flowing&&null!==e.read(););}function C(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function $(e){var t=e._readableState;a("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(B,t,e))}function B(e,t){if(a("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function z(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}return E.prototype.read=function(e){a("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return a("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?$(this):R(this),null;if(0===(e=A(e,t))&&t.ended)return 0===t.length&&$(this),null;var r,i=t.needReadable;return a("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&a("length less than watermark",i=!0),t.ended||t.reading?a("reading or ended",i=!1):i&&(a("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=A(n,t))),null===(r=e>0?C(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&$(this)),null!==r&&this.emit("data",r),r},E.prototype._read=function(e){w(this,new v("_read()"))},E.prototype.pipe=function(e,n){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,a("pipe count=%d opts=%j",i.pipesCount,n);var s=(!n||!1!==n.end)&&e!==process.stdout&&e!==process.stderr?c:m;function o(t,n){a("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,a("cleanup"),e.removeListener("close",f),e.removeListener("finish",h),e.removeListener("drain",u),e.removeListener("error",d),e.removeListener("unpipe",o),r.removeListener("end",c),r.removeListener("end",m),r.removeListener("data",p),l=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function c(){a("onend"),e.end()}i.endEmitted?process.nextTick(s):r.once("end",s),e.on("unpipe",o);var u=function(e){return function(){var n=e._readableState;a("pipeOnDrain",n.awaitDrain),n.awaitDrain&&n.awaitDrain--,0===n.awaitDrain&&t(e,"data")&&(n.flowing=!0,L(e))}}(r);e.on("drain",u);var l=!1;function p(t){a("ondata");var n=e.write(t);a("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==z(i.pipes,e))&&!l&&(a("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(n){a("onerror",n),m(),e.removeListener("error",d),0===t(e,"error")&&w(e,n)}function f(){e.removeListener("finish",h),m()}function h(){a("onfinish"),e.removeListener("close",f),m()}function m(){a("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",d),e.once("close",f),e.once("finish",h),e.emit("pipe",r),i.flowing||(a("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)r[a].emit("unpipe",this,{hasUnpiped:!1});return this}var s=z(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},E.prototype.on=function(e,t){var r=n.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,a("on readable",i.length,i.reading),i.length?R(this):i.reading||process.nextTick(j,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var r=n.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(P,this),r},E.prototype.removeAllListeners=function(e){var t=n.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(P,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(a("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(D,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(a("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(a("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<_.length;s++)e.on(_[s],this.emit.bind(this,_[s]));return this._read=function(t){a("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===u&&(u=Qn()),u(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=C,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(e,t){return void 0===l&&(l=er()),l(E,e,t)}),Fn}function nr(){if(Yn)return Hn;Yn=1;var e=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};Hn=s;var t=tr(),n=rr();Nn()(s,t);for(var r=e(n.prototype),i=0;i<r.length;i++){var a=r[i];s.prototype[a]||(s.prototype[a]=n.prototype[a])}function s(e){if(!(this instanceof s))return new s(e);t.call(this,e),n.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",o)))}function o(){this._writableState.ended||process.nextTick(c,this)}function c(e){e.end()}return Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(s.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(s.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),Hn}function rr(){if(Gn)return Vn;function e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var t;Gn=1,Vn=S,S.WritableState=_;var n={deprecate:un?cn:(un=1,cn=s.deprecate)},r=yn(),i=p.Buffer,a=(void 0!==F?F:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var o,c=vn(),u=kn().getHighWaterMark,l=En().codes,d=l.ERR_INVALID_ARG_TYPE,f=l.ERR_METHOD_NOT_IMPLEMENTED,h=l.ERR_MULTIPLE_CALLBACK,m=l.ERR_STREAM_CANNOT_PIPE,g=l.ERR_STREAM_DESTROYED,b=l.ERR_STREAM_NULL_VALUES,y=l.ERR_STREAM_WRITE_AFTER_END,v=l.ERR_UNKNOWN_ENCODING,x=c.errorOrDestroy;function w(){}function _(n,r,i){t=t||nr(),n=n||{},"boolean"!=typeof i&&(i=r instanceof t),this.objectMode=!!n.objectMode,i&&(this.objectMode=this.objectMode||!!n.writableObjectMode),this.highWaterMark=u(this,n,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===n.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=n.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if("function"!=typeof i)throw new h;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(process.nextTick(i,r),process.nextTick(R,e,t),e._writableState.errorEmitted=!0,x(e,r)):(i(r),e._writableState.errorEmitted=!0,x(e,r),R(e,t))}(e,n,r,t,i);else{var a=T(n)||e.destroyed;a||n.corked||n.bufferProcessing||!n.bufferedRequest||M(e,n),r?process.nextTick(k,e,n,a,i):k(e,n,a,i)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==n.emitClose,this.autoDestroy=!!n.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function S(e){var n=this instanceof(t=t||nr());if(!n&&!o.call(S,this))return new S(e);this._writableState=new _(e,this,n),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),r.call(this)}function E(e,t,n,r,i,a,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new g("write")):n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function k(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),R(e,t)}function M(t,n){n.bufferProcessing=!0;var r=n.bufferedRequest;if(t._writev&&r&&r.next){var i=n.bufferedRequestCount,a=new Array(i),s=n.corkedRequestsFree;s.entry=r;for(var o=0,c=!0;r;)a[o]=r,r.isBuf||(c=!1),r=r.next,o+=1;a.allBuffers=c,E(t,n,!0,n.length,a,"",s.finish),n.pendingcb++,n.lastBufferedRequest=null,s.next?(n.corkedRequestsFree=s.next,s.next=null):n.corkedRequestsFree=new e(n),n.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,p=r.callback;if(E(t,n,!1,n.objectMode?1:u.length,u,l,p),r=r.next,n.bufferedRequestCount--,n.writing)break}null===r&&(n.lastBufferedRequest=null)}n.bufferedRequest=r,n.bufferProcessing=!1}function T(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function A(e,t){e._final((function(n){t.pendingcb--,n&&x(e,n),t.prefinished=!0,e.emit("prefinish"),R(e,t)}))}function R(e,t){var n=T(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(A,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}return Nn()(S,r),_.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(_.prototype,"buffer",{get:n.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(e){return!!o.call(this,e)||this===S&&(e&&e._writableState instanceof _)}})):o=function(e){return e instanceof this},S.prototype.pipe=function(){x(this,new m)},S.prototype.write=function(e,t,n){var r,s=this._writableState,o=!1,c=!s.objectMode&&(r=e,i.isBuffer(r)||r instanceof a);return c&&!i.isBuffer(e)&&(e=function(e){return i.from(e)}(e)),"function"==typeof t&&(n=t,t=null),c?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof n&&(n=w),s.ending?function(e,t){var n=new y;x(e,n),process.nextTick(t,n)}(this,n):(c||function(e,t,n,r){var i;return null===n?i=new b:"string"==typeof n||t.objectMode||(i=new d("chunk",["string","Buffer"],n)),!i||(x(e,i),process.nextTick(r,i),!1)}(this,s,e,n))&&(s.pendingcb++,o=function(e,t,n,r,a,s){if(!n){var o=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=i.from(t,n));return t}(t,r,a);r!==o&&(n=!0,a="buffer",r=o)}var c=t.objectMode?1:r.length;t.length+=c;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:a,isBuf:n,callback:s,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else E(e,t,!1,c,r,a,s);return u}(this,s,c,e,t,n)),o},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||M(this,e))},S.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(e,t,n){n(new f("_write()"))},S.prototype._writev=null,S.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,R(e,t),n&&(t.finished?process.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),S.prototype.destroy=c.destroy,S.prototype._undestroy=c.undestroy,S.prototype._destroy=function(e,t){t(e)},Vn}function ir(){if(Kn)return bn.exports;Kn=1;const e=s,t=rr(),{LEVEL:n}=Fe(),r=bn.exports=function(e={}){t.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this.format=e.format,this.level=e.level,this.handleExceptions=e.handleExceptions,this.handleRejections=e.handleRejections,this.silent=e.silent,e.log&&(this.log=e.log),e.logv&&(this.logv=e.logv),e.close&&(this.close=e.close),this.once("pipe",(e=>{this.levels=e.levels,this.parent=e})),this.once("unpipe",(e=>{e===this.parent&&(this.parent=null,this.close&&this.close())}))};return e.inherits(r,t),r.prototype._write=function(e,t,r){if(this.silent||!0===e.exception&&!this.handleExceptions)return r(null);const i=this.level||this.parent&&this.parent.level;if(!i||this.levels[i]>=this.levels[e[n]]){if(e&&!this.format)return this.log(e,r);let t,n;try{n=this.format.transform(Object.assign({},e),this.format.options)}catch(e){t=e}if(t||!n){if(r(),t)throw t;return}return this.log(n,r)}return this._writableState.sync=!1,r(null)},r.prototype._writev=function(e,t){if(this.logv){const n=e.filter(this._accept,this);return n.length?this.logv(n,t):t(null)}for(let n=0;n<e.length;n++){if(!this._accept(e[n]))continue;if(e[n].chunk&&!this.format){this.log(e[n].chunk,e[n].callback);continue}let r,i;try{i=this.format.transform(Object.assign({},e[n].chunk),this.format.options)}catch(e){r=e}if(r||!i){if(e[n].callback(),r)throw t(null),r}else this.log(i,e[n].callback)}return t(null)},r.prototype._accept=function(e){const t=e.chunk;if(this.silent)return!1;const r=this.level||this.parent&&this.parent.level;return!(!0!==t.exception&&r&&!(this.levels[r]>=this.levels[t[n]])||!this.handleExceptions&&!0===t.exception)},r.prototype._nop=function(){},bn.exports}var ar,sr,or,cr,ur={exports:{}};function lr(){if(ar)return ur.exports;ar=1;const e=s,{LEVEL:t}=Fe(),n=ir(),r=ur.exports=function(e={}){if(n.call(this,e),!e.transport||"function"!=typeof e.transport.log)throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=function(e){this.emit("error",e,this.transport)}.bind(this),this.transport.on("error",this.transport.__winstonError))};return e.inherits(r,n),r.prototype._write=function(e,n,r){if(this.silent||!0===e.exception&&!this.handleExceptions)return r(null);(!this.level||this.levels[this.level]>=this.levels[e[t]])&&this.transport.log(e[t],e.message,e,this._nop),r(null)},r.prototype._writev=function(e,n){for(let n=0;n<e.length;n++)this._accept(e[n])&&(this.transport.log(e[n].chunk[t],e[n].chunk.message,e[n].chunk,this._nop),e[n].callback());return n(null)},r.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join("\n"))},r.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)},ur.exports}function pr(){return sr||(sr=1,gn.exports=ir(),gn.exports.LegacyTransportStream=lr()),gn.exports}var dr,fr={exports:{}},hr={exports:{}},mr={exports:{}};function gr(){return dr||(dr=1,e=mr,t=mr.exports,Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0},e.exports=t.default),mr.exports;var e,t}var br,yr={},vr={exports:{}},xr={exports:{}};var wr,_r,Sr,Er={};function kr(){return _r||(_r=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,a.isAsync)(e))return function(...t){const n=t.pop();return o(e.apply(this,t),n)};return(0,r.default)((function(t,n){var r;try{r=e.apply(this,t)}catch(e){return n(e)}if(r&&"function"==typeof r.then)return o(r,n);n(null,r)}))};var n=function(){return br||(br=1,e=xr,t=xr.exports,Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(...t){var n=t.pop();return e.call(this,t,n)}},e.exports=t.default),xr.exports;var e,t}(),r=s(n),i=s(function(){if(wr)return Er;wr=1,Object.defineProperty(Er,"__esModule",{value:!0}),Er.fallback=i,Er.wrap=a;var e,t=Er.hasQueueMicrotask="function"==typeof queueMicrotask&&queueMicrotask,n=Er.hasSetImmediate="function"==typeof setImmediate&&setImmediate,r=Er.hasNextTick="object"==typeof process&&"function"==typeof process.nextTick;function i(e){setTimeout(e,0)}function a(e){return(t,...n)=>e((()=>t(...n)))}return e=t?queueMicrotask:n?setImmediate:r?process.nextTick:i,Er.default=a(e),Er}()),a=Mr();function s(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return e.then((e=>{c(t,null,e)}),(e=>{c(t,e&&(e instanceof Error||e.message)?e:new Error(e))}))}function c(e,t,n){try{e(t,n)}catch(e){(0,i.default)((e=>{throw e}),e)}}e.exports=t.default}(vr,vr.exports)),vr.exports}function Mr(){if(Sr)return yr;Sr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.isAsyncIterable=yr.isAsyncGenerator=yr.isAsync=void 0;var e,t=kr(),n=(e=t)&&e.__esModule?e:{default:e};function r(e){return"AsyncFunction"===e[Symbol.toStringTag]}return yr.default=function(e){if("function"!=typeof e)throw new Error("expected a function");return r(e)?(0,n.default)(e):e},yr.isAsync=r,yr.isAsyncGenerator=function(e){return"AsyncGenerator"===e[Symbol.toStringTag]},yr.isAsyncIterable=function(e){return"function"==typeof e[Symbol.asyncIterator]},yr}var Tr,Ar,Rr={exports:{}};function Or(){return Tr||(Tr=1,e=Rr,t=Rr.exports,Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(t||(t=e.length),!t)throw new Error("arity is undefined");return function(...n){return"function"==typeof n[t-1]?e.apply(this,n):new Promise(((r,i)=>{n[t-1]=(e,...t)=>{if(e)return i(e);r(t.length>1?t:t[0])},e.apply(this,n)}))}},e.exports=t.default),Rr.exports;var e,t}var Ir,Nr={exports:{}},Pr={exports:{}},jr={exports:{}},Dr={exports:{}};function Lr(){return Ir||(Ir=1,e=Dr,t=Dr.exports,Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t},e.exports=t.default),Dr.exports;var e,t}var Cr,$r,Br={exports:{}},zr={exports:{}};function Ur(){return $r||($r=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,n.default)(e))return function(e){var t=-1,n=e.length;return function(){return++t<n?{value:e[t],key:t}:null}}(e);var t=(0,i.default)(e);return t?function(e){var t=-1;return function(){var n=e.next();return n.done?null:(t++,{value:n.value,key:t})}}(t):(r=e,a=r?Object.keys(r):[],s=-1,o=a.length,function e(){var t=a[++s];return"__proto__"===t?e():s<o?{value:r[t],key:t}:null});var r,a,s,o};var n=a(gr()),r=function(){return Cr||(Cr=1,e=zr,t=zr.exports,Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()},e.exports=t.default),zr.exports;var e,t}(),i=a(r);function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default}(Br,Br.exports)),Br.exports}var Fr,qr={exports:{}};function Hr(){return Fr||(Fr=1,e=qr,t=qr.exports,Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}},e.exports=t.default),qr.exports;var e,t}var Yr,Vr,Gr,Kr,Wr,Zr,Jr={exports:{}},Xr={exports:{}};function Qr(){return Yr||(Yr=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});t.default={},e.exports=t.default}(Xr,Xr.exports)),Xr.exports}function ei(){return Gr||(Gr=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=u(Lr()),r=u(Ur()),i=u(Hr()),a=Mr(),s=(Vr||(Vr=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,i){let a=!1,s=!1,o=!1,c=0,u=0;function l(){c>=t||o||a||(o=!0,e.next().then((({value:e,done:t})=>{if(!s&&!a){if(o=!1,t)return a=!0,void(c<=0&&i(null));c++,n(e,u,p),u++,l()}})).catch(d))}function p(e,t){if(c-=1,!s)return e?d(e):!1===e?(a=!0,void(s=!0)):t===r.default||a&&c<=0?(a=!0,i(null)):void l()}function d(e){s||(o=!1,a=!0,i(e))}l()};var n,r=(n=Qr())&&n.__esModule?n:{default:n};e.exports=t.default}(Jr,Jr.exports)),Jr.exports),o=u(s),c=u(Qr());function u(e){return e&&e.__esModule?e:{default:e}}t.default=e=>(t,s,u)=>{if(u=(0,n.default)(u),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return u(null);if((0,a.isAsyncGenerator)(t))return(0,o.default)(t,e,s,u);if((0,a.isAsyncIterable)(t))return(0,o.default)(t[Symbol.asyncIterator](),e,s,u);var l=(0,r.default)(t),p=!1,d=!1,f=0,h=!1;function m(e,t){if(!d)if(f-=1,e)p=!0,u(e);else if(!1===e)p=!0,d=!0;else{if(t===c.default||p&&f<=0)return p=!0,u(null);h||g()}}function g(){for(h=!0;f<e&&!p;){var t=l();if(null===t)return p=!0,void(f<=0&&u(null));f+=1,s(t.value,t.key,(0,i.default)(m))}h=!1}g()},e.exports=t.default}(jr,jr.exports)),jr.exports}function ti(){return Kr||(Kr=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=a(ei()),r=a(Mr()),i=a(Or());function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)((function(e,t,i,a){return(0,n.default)(t)(e,(0,r.default)(i),a)}),4),e.exports=t.default}(Pr,Pr.exports)),Pr.exports}function ni(){return Zr||(Zr=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,r.default)(a.default,e,t)};var n=(Ar||(Ar=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=a(gr()),r=a(Mr()),i=a(Or());function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)(((e,t,i)=>{var a=(0,n.default)(t)?[]:{};e(t,((e,t,n)=>{(0,r.default)(e)(((e,...r)=>{r.length<2&&([r]=r),a[t]=r,n(e)}))}),(e=>i(e,a)))}),3),e.exports=t.default}(hr,hr.exports)),hr.exports),r=s(n),i=(Wr||(Wr=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=i(ti()),r=i(Or());function i(e){return e&&e.__esModule?e:{default:e}}t.default=(0,r.default)((function(e,t,r){return(0,n.default)(e,1,t,r)}),3),e.exports=t.default}(Nr,Nr.exports)),Nr.exports),a=s(i);function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default}(fr,fr.exports)),fr.exports}var ri,ii,ai,si,oi,ci,ui,li={exports:{}};function pi(){if(ii)return ri;ii=1,ri=o;var e=En().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,n=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=e.ERR_TRANSFORM_WITH_LENGTH_0,a=nr();function s(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(null===i)return this.emit("error",new n);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),i(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);a.call(this,e),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",c)}function c(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?u(this,null,null):this._flush((function(t,n){u(e,t,n)}))}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new i;if(e._transformState.transforming)throw new r;return e.push(null)}return Nn()(o,a),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,a.prototype.push.call(this,e,t)},o.prototype._transform=function(e,n,r){r(new t("_transform()"))},o.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},o.prototype._destroy=function(e,t){a.prototype._destroy.call(this,e,(function(e){t(e)}))},ri}function di(){if(ci)return oi;var e;ci=1;var t=En().codes,n=t.ERR_MISSING_ARGS,r=t.ERR_STREAM_DESTROYED;function i(e){if(e)throw e}function a(e){e()}function s(e,t){return e.pipe(t)}return oi=function(){for(var t=arguments.length,o=new Array(t),c=0;c<t;c++)o[c]=arguments[c];var u,l=function(e){return e.length?"function"!=typeof e[e.length-1]?i:e.pop():i}(o);if(Array.isArray(o[0])&&(o=o[0]),o.length<2)throw new n("streams");var p=o.map((function(t,n){var i=n<o.length-1;return function(t,n,i,a){a=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(a);var s=!1;t.on("close",(function(){s=!0})),void 0===e&&(e=Xn()),e(t,{readable:n,writable:i},(function(e){if(e)return a(e);s=!0,a()}));var o=!1;return function(e){if(!s&&!o)return o=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void a(e||new r("pipe"))}}(t,i,n>0,(function(e){u||(u=e),e&&p.forEach(a),i||(p.forEach(a),l(u))}))}));return o.reduce(s)},oi}function fi(){return ui||(ui=1,e=li,t=li.exports,n=l,"disable"===process.env.READABLE_STREAM&&n?(e.exports=n.Readable,Object.assign(e.exports,n),e.exports.Stream=n):((t=e.exports=tr()).Stream=n||t,t.Readable=t,t.Writable=rr(),t.Duplex=nr(),t.Transform=pi(),t.PassThrough=function(){if(si)return ai;si=1,ai=t;var e=pi();function t(n){if(!(this instanceof t))return new t(n);e.call(this,n)}return Nn()(t,e),t.prototype._transform=function(e,t,n){n(null,e)},ai}(),t.finished=Xn(),t.pipeline=di())),li.exports;var e,t,n}var hi,mi,gi,bi,yi={exports:{}};function vi(){if(mi)return hi;mi=1;var e=[],t=[],n=function(){};function r(t){return!~e.indexOf(t)&&(e.push(t),!0)}function i(e){n=e}function a(t){for(var n=[],r=0;r<e.length;r++)if(e[r].async)n.push(e[r]);else if(e[r](t))return!0;return!!n.length&&new Promise((function(e){Promise.all(n.map((function(e){return e(t)}))).then((function(t){e(t.some(Boolean))}))}))}function s(e){return!~t.indexOf(e)&&(t.push(e),!0)}function o(){n.apply(n,arguments)}function c(e){for(var n=0;n<t.length;n++)e=t[n].apply(t[n],arguments);return e}function u(e,t){var n=Object.prototype.hasOwnProperty;for(var r in t)n.call(t,r)&&(e[r]=t[r]);return e}function l(e){return e.enabled=!1,e.modify=s,e.set=i,e.use=r,u((function(){return!1}),e)}function p(e){return e.enabled=!0,e.modify=s,e.set=i,e.use=r,u((function(){var t=Array.prototype.slice.call(arguments,0);return o.call(o,e,c(t,e)),!0}),e)}return hi=function(e){return e.introduce=u,e.enabled=a,e.process=c,e.modify=s,e.write=o,e.nope=l,e.yep=p,e.set=i,e.use=r,e}}var xi,wi,_i={exports:{}};function Si(){return wi?xi:(wi=1,xi={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]})}var Ei,ki,Mi,Ti,Ai={exports:{}};function Ri(){return ki?Ei:(ki=1,Ei=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))})}function Oi(){if(Ti)return _i.exports;Ti=1;var e=Si(),t=function(){if(Mi)return Ai.exports;Mi=1;var e=Ri(),t=Array.prototype.concat,n=Array.prototype.slice,r=Ai.exports=function(r){for(var i=[],a=0,s=r.length;a<s;a++){var o=r[a];e(o)?i=t.call(i,n.call(o)):i.push(o)}return i};return r.wrap=function(e){return function(){return e(r(arguments))}},Ai.exports}(),n=Object.hasOwnProperty,r=Object.create(null);for(var i in e)n.call(e,i)&&(r[e[i]]=i);var a=_i.exports={to:{},get:{}};function s(e,t,n){return Math.min(Math.max(t,e),n)}function o(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}return a.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case"hsl":t=a.get.hsl(e),n="hsl";break;case"hwb":t=a.get.hwb(e),n="hwb";break;default:t=a.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},a.get.rgb=function(t){if(!t)return null;var r,i,a,o=[0,0,0,1];if(r=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(a=r[2],r=r[1],i=0;i<3;i++){var c=2*i;o[i]=parseInt(r.slice(c,c+2),16)}a&&(o[3]=parseInt(a,16)/255)}else if(r=t.match(/^#([a-f0-9]{3,4})$/i)){for(a=(r=r[1])[3],i=0;i<3;i++)o[i]=parseInt(r[i]+r[i],16);a&&(o[3]=parseInt(a+a,16)/255)}else if(r=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(i=0;i<3;i++)o[i]=parseInt(r[i+1],0);r[4]&&(r[5]?o[3]=.01*parseFloat(r[4]):o[3]=parseFloat(r[4]))}else{if(!(r=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(r=t.match(/^(\w+)$/))?"transparent"===r[1]?[0,0,0,0]:n.call(e,r[1])?((o=e[r[1]])[3]=1,o):null:null;for(i=0;i<3;i++)o[i]=Math.round(2.55*parseFloat(r[i+1]));r[4]&&(r[5]?o[3]=.01*parseFloat(r[4]):o[3]=parseFloat(r[4]))}for(i=0;i<3;i++)o[i]=s(o[i],0,255);return o[3]=s(o[3],0,1),o},a.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,s(parseFloat(t[2]),0,100),s(parseFloat(t[3]),0,100),s(isNaN(n)?1:n,0,1)]}return null},a.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,s(parseFloat(t[2]),0,100),s(parseFloat(t[3]),0,100),s(isNaN(n)?1:n,0,1)]}return null},a.to.hex=function(){var e=t(arguments);return"#"+o(e[0])+o(e[1])+o(e[2])+(e[3]<1?o(Math.round(255*e[3])):"")},a.to.rgb=function(){var e=t(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},a.to.rgb.percent=function(){var e=t(arguments),n=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+n+"%, "+r+"%, "+i+"%)":"rgba("+n+"%, "+r+"%, "+i+"%, "+e[3]+")"},a.to.hsl=function(){var e=t(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},a.to.hwb=function(){var e=t(arguments),n="";return e.length>=4&&1!==e[3]&&(n=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+n+")"},a.to.keyword=function(e){return r[e.slice(0,3)]},_i.exports}var Ii,Ni,Pi,ji,Di,Li,Ci,$i,Bi,zi,Ui,Fi,qi,Hi,Yi,Vi,Gi,Ki,Wi,Zi,Ji,Xi,Qi,ea,ta,na,ra,ia,aa,sa,oa={exports:{}};function ca(){if(Ii)return oa.exports;Ii=1;var e=Si(),t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);var r=oa.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var i in r)if(r.hasOwnProperty(i)){if(!("channels"in r[i]))throw new Error("missing channels property: "+i);if(!("labels"in r[i]))throw new Error("missing channel labels property: "+i);if(r[i].labels.length!==r[i].channels)throw new Error("channel and label counts mismatch: "+i);var a=r[i].channels,s=r[i].labels;delete r[i].channels,delete r[i].labels,Object.defineProperty(r[i],"channels",{value:a}),Object.defineProperty(r[i],"labels",{value:s})}return r.rgb.hsl=function(e){var t,n,r=e[0]/255,i=e[1]/255,a=e[2]/255,s=Math.min(r,i,a),o=Math.max(r,i,a),c=o-s;return o===s?t=0:r===o?t=(i-a)/c:i===o?t=2+(a-r)/c:a===o&&(t=4+(r-i)/c),(t=Math.min(60*t,360))<0&&(t+=360),n=(s+o)/2,[t,100*(o===s?0:n<=.5?c/(o+s):c/(2-o-s)),100*n]},r.rgb.hsv=function(e){var t,n,r,i,a,s=e[0]/255,o=e[1]/255,c=e[2]/255,u=Math.max(s,o,c),l=u-Math.min(s,o,c),p=function(e){return(u-e)/6/l+.5};return 0===l?i=a=0:(a=l/u,t=p(s),n=p(o),r=p(c),s===u?i=r-n:o===u?i=1/3+t-r:c===u&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*a,100*u]},r.rgb.hwb=function(e){var t=e[0],n=e[1],i=e[2];return[r.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(n,i))),100*(i=1-1/255*Math.max(t,Math.max(n,i)))]},r.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-i)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-i-t)/(1-t)||0),100*t]},r.rgb.keyword=function(n){var r=t[n];if(r)return r;var i,a,s,o=1/0;for(var c in e)if(e.hasOwnProperty(c)){var u=e[c],l=(a=n,s=u,Math.pow(a[0]-s[0],2)+Math.pow(a[1]-s[1],2)+Math.pow(a[2]-s[2],2));l<o&&(o=l,i=c)}return i},r.keyword.rgb=function(t){return e[t]},r.rgb.xyz=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},r.rgb.lab=function(e){var t=r.rgb.xyz(e),n=t[0],i=t[1],a=t[2];return i/=100,a/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]},r.hsl.rgb=function(e){var t,n,r,i,a,s=e[0]/360,o=e[1]/100,c=e[2]/100;if(0===o)return[a=255*c,a,a];t=2*c-(n=c<.5?c*(1+o):c+o-c*o),i=[0,0,0];for(var u=0;u<3;u++)(r=s+1/3*-(u-1))<0&&r++,r>1&&r--,a=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,i[u]=255*a;return i},r.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,i=n,a=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,i*=a<=1?a:2-a,[t,100*(0===r?2*i/(a+i):2*n/(r+n)),100*((r+n)/2)]},r.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),o=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,c,s];case 1:return[o,r,s];case 2:return[s,r,c];case 3:return[s,o,r];case 4:return[c,s,r];case 5:return[r,s,o]}},r.hsv.hsl=function(e){var t,n,r,i=e[0],a=e[1]/100,s=e[2]/100,o=Math.max(s,.01);return r=(2-a)*s,n=a*o,[i,100*(n=(n/=(t=(2-a)*o)<=1?t:2-t)||0),100*(r/=2)]},r.hwb.rgb=function(e){var t,n,r,i,a,s,o,c=e[0]/360,u=e[1]/100,l=e[2]/100,p=u+l;switch(p>1&&(u/=p,l/=p),r=6*c-(t=Math.floor(6*c)),1&t&&(r=1-r),i=u+r*((n=1-l)-u),t){default:case 6:case 0:a=n,s=i,o=u;break;case 1:a=i,s=n,o=u;break;case 2:a=u,s=n,o=i;break;case 3:a=u,s=i,o=n;break;case 4:a=i,s=u,o=n;break;case 5:a=n,s=u,o=i}return[255*a,255*s,255*o]},r.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},r.xyz.rgb=function(e){var t,n,r,i=e[0]/100,a=e[1]/100,s=e[2]/100;return n=-.9689*i+1.8758*a+.0415*s,r=.0557*i+-.204*a+1.057*s,t=(t=3.2406*i+-1.5372*a+-.4986*s)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},r.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},r.lab.xyz=function(e){var t,n,r,i=e[0];t=e[1]/500+(n=(i+16)/116),r=n-e[2]/200;var a=Math.pow(n,3),s=Math.pow(t,3),o=Math.pow(r,3);return n=a>.008856?a:(n-16/116)/7.787,t=s>.008856?s:(t-16/116)/7.787,r=o>.008856?o:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},r.lab.lch=function(e){var t,n=e[0],r=e[1],i=e[2];return(t=360*Math.atan2(i,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+i*i),t]},r.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},r.rgb.ansi16=function(e){var t=e[0],n=e[1],i=e[2],a=1 in arguments?arguments[1]:r.rgb.hsv(e)[2];if(0===(a=Math.round(a/50)))return 30;var s=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===a&&(s+=60),s},r.hsv.ansi16=function(e){return r.rgb.ansi16(r.hsv.rgb(e),e[2])},r.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},r.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},r.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},r.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},r.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},r.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255,a=Math.max(Math.max(n,r),i),s=Math.min(Math.min(n,r),i),o=a-s;return t=o<=0?0:a===n?(r-i)/o%6:a===r?2+(i-n)/o:4+(n-r)/o+4,t/=6,[360*(t%=1),100*o,100*(o<1?s/(1-o):0)]},r.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,i=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},r.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},r.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var i,a=[0,0,0],s=t%1*6,o=s%1,c=1-o;switch(Math.floor(s)){case 0:a[0]=1,a[1]=o,a[2]=0;break;case 1:a[0]=c,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=o;break;case 3:a[0]=0,a[1]=c,a[2]=1;break;case 4:a[0]=o,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=c}return i=(1-n)*r,[255*(n*a[0]+i),255*(n*a[1]+i),255*(n*a[2]+i)]},r.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},r.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},r.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},r.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},r.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},r.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},r.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},r.gray.hsl=r.gray.hsv=function(e){return[0,0,e[0]]},r.gray.hwb=function(e){return[0,100,e[0]]},r.gray.cmyk=function(e){return[0,0,0,e[0]]},r.gray.lab=function(e){return[e[0],0,0]},r.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},r.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},oa.exports}function ua(){if(Pi)return Ni;Pi=1;var e=ca();function t(t){var n=function(){for(var t={},n=Object.keys(e),r=n.length,i=0;i<r;i++)t[n[i]]={distance:-1,parent:null};return t}(),r=[t];for(n[t].distance=0;r.length;)for(var i=r.pop(),a=Object.keys(e[i]),s=a.length,o=0;o<s;o++){var c=a[o],u=n[c];-1===u.distance&&(u.distance=n[i].distance+1,u.parent=i,r.unshift(c))}return n}function n(e,t){return function(n){return t(e(n))}}function r(t,r){for(var i=[r[t].parent,t],a=e[r[t].parent][t],s=r[t].parent;r[s].parent;)i.unshift(r[s].parent),a=n(e[r[s].parent][s],a),s=r[s].parent;return a.conversion=i,a}return Ni=function(e){for(var n=t(e),i={},a=Object.keys(n),s=a.length,o=0;o<s;o++){var c=a[o];null!==n[c].parent&&(i[c]=r(c,n))}return i}}function la(){if(Di)return ji;Di=1;var e=ca(),t=ua(),n={};return Object.keys(e).forEach((function(r){n[r]={},Object.defineProperty(n[r],"channels",{value:e[r].channels}),Object.defineProperty(n[r],"labels",{value:e[r].labels});var i=t(r);Object.keys(i).forEach((function(e){var t=i[e];n[r][e]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var r=n.length,i=0;i<r;i++)n[i]=Math.round(n[i]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[r][e].raw=function(e){var t=function(t){return null==t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)}))})),ji=n}function pa(){if(Ci)return Li;Ci=1;var e=Oi(),t=la(),n=[].slice,r=["keyword","gray","hex"],i={};Object.keys(t).forEach((function(e){i[n.call(t[e].labels).sort().join("")]=e}));var a={};function s(o,c){if(!(this instanceof s))return new s(o,c);if(c&&c in r&&(c=null),c&&!(c in t))throw new Error("Unknown model: "+c);var l,p;if(null==o)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(o instanceof s)this.model=o.model,this.color=o.color.slice(),this.valpha=o.valpha;else if("string"==typeof o){var d=e.get(o);if(null===d)throw new Error("Unable to parse color from string: "+o);this.model=d.model,p=t[this.model].channels,this.color=d.value.slice(0,p),this.valpha="number"==typeof d.value[p]?d.value[p]:1}else if(o.length){this.model=c||"rgb",p=t[this.model].channels;var f=n.call(o,0,p);this.color=u(f,p),this.valpha="number"==typeof o[p]?o[p]:1}else if("number"==typeof o)o&=16777215,this.model="rgb",this.color=[o>>16&255,o>>8&255,255&o],this.valpha=1;else{this.valpha=1;var h=Object.keys(o);"alpha"in o&&(h.splice(h.indexOf("alpha"),1),this.valpha="number"==typeof o.alpha?o.alpha:0);var m=h.sort().join("");if(!(m in i))throw new Error("Unable to parse color from object: "+JSON.stringify(o));this.model=i[m];var g=t[this.model].labels,b=[];for(l=0;l<g.length;l++)b.push(o[g[l]]);this.color=u(b)}if(a[this.model])for(p=t[this.model].channels,l=0;l<p;l++){var y=a[this.model][l];y&&(this.color[l]=y(this.color[l]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}function o(e,t,n){return(e=Array.isArray(e)?e:[e]).forEach((function(e){(a[e]||(a[e]=[]))[t]=n})),e=e[0],function(r){var i;return arguments.length?(n&&(r=n(r)),(i=this[e]()).color[t]=r,i):(i=this[e]().color[t],n&&(i=n(i)),i)}}function c(e){return function(t){return Math.max(0,Math.min(e,t))}}function u(e,t){for(var n=0;n<t;n++)"number"!=typeof e[n]&&(e[n]=0);return e}return s.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(t){var n=this.model in e.to?this:this.rgb(),r=1===(n=n.round("number"==typeof t?t:1)).valpha?n.color:n.color.concat(this.valpha);return e.to[n.model](r)},percentString:function(t){var n=this.rgb().round("number"==typeof t?t:1),r=1===n.valpha?n.color:n.color.concat(this.valpha);return e.to.rgb.percent(r)},array:function(){return 1===this.valpha?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var e={},n=t[this.model].channels,r=t[this.model].labels,i=0;i<n;i++)e[r[i]]=this.color[i];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray:function(){var e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject:function(){var e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round:function(e){return e=Math.max(e||0,0),new s(this.color.map(function(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}(e)).concat(this.valpha),this.model)},alpha:function(e){return arguments.length?new s(this.color.concat(Math.max(0,Math.min(1,e))),this.model):this.valpha},red:o("rgb",0,c(255)),green:o("rgb",1,c(255)),blue:o("rgb",2,c(255)),hue:o(["hsl","hsv","hsl","hwb","hcg"],0,(function(e){return(e%360+360)%360})),saturationl:o("hsl",1,c(100)),lightness:o("hsl",2,c(100)),saturationv:o("hsv",1,c(100)),value:o("hsv",2,c(100)),chroma:o("hcg",1,c(100)),gray:o("hcg",2,c(100)),white:o("hwb",1,c(100)),wblack:o("hwb",2,c(100)),cyan:o("cmyk",0,c(100)),magenta:o("cmyk",1,c(100)),yellow:o("cmyk",2,c(100)),black:o("cmyk",3,c(100)),x:o("xyz",0,c(100)),y:o("xyz",1,c(100)),z:o("xyz",2,c(100)),l:o("lab",0,c(100)),a:o("lab",1),b:o("lab",2),keyword:function(e){return arguments.length?new s(e):t[this.model].keyword(this.color)},hex:function(t){return arguments.length?new s(t):e.to.hex(this.rgb().round().color)},rgbNumber:function(){var e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity:function(){for(var e=this.rgb().color,t=[],n=0;n<e.length;n++){var r=e[n]/255;t[n]=r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},isDark:function(){var e=this.rgb().color;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var e=this.rgb(),t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten:function(e){var t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken:function(e){var t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate:function(e){var t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate:function(e){var t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten:function(e){var t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken:function(e){var t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale:function(){var e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return s.rgb(t,t,t)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var t=this.hsl(),n=t.color[0];return n=(n=(n+e)%360)<0?360+n:n,t.color[0]=n,t},mix:function(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);var n=e.rgb(),r=this.rgb(),i=void 0===t?.5:t,a=2*i-1,o=n.alpha()-r.alpha(),c=((a*o==-1?a:(a+o)/(1+a*o))+1)/2,u=1-c;return s.rgb(c*n.red()+u*r.red(),c*n.green()+u*r.green(),c*n.blue()+u*r.blue(),n.alpha()*i+r.alpha()*(1-i))}},Object.keys(t).forEach((function(e){if(-1===r.indexOf(e)){var i=t[e].channels;s.prototype[e]=function(){if(this.model===e)return new s(this);if(arguments.length)return new s(arguments,e);var n,r="number"==typeof arguments[i]?i:this.valpha;return new s((n=t[this.model][e].raw(this.color),Array.isArray(n)?n:[n]).concat(r),e)},s[e]=function(t){return"number"==typeof t&&(t=u(n.call(arguments),i)),new s(t,e)}}})),Li=s}function da(){if(Ui)return zi;Ui=1;var e=pa(),t=(Bi||(Bi=1,$i=function(e){for(var t=0,n=0;t<e.length;n=e.charCodeAt(t++)+((n<<5)-n));var r=Math.floor(Math.abs(1e4*Math.sin(n)%1*16777216)).toString(16);return"#"+Array(6-r.length+1).join("0")+r}),$i);return zi=function(n,r){var i=n.split(r||":"),a=t(i[0]);if(!i.length)return a;for(var s=0,o=i.length-1;s<o;s++)a=e(a).mix(e(t(i[s+1]))).saturate(1).hex();return a},zi}function fa(){if(qi)return Fi;function e(t,n){return n?new e(t).style(n):this instanceof e?void(this.text=t):new e(t)}return qi=1,e.prototype.prefix="[",e.prototype.suffix="m",e.prototype.hex=function(e){3===(e="#"===e[0]?e.substring(1):e).length&&((e=e.split(""))[5]=e[2],e[4]=e[2],e[3]=e[1],e[2]=e[1],e[1]=e[0],e=e.join(""));var t=e.substring(0,2),n=e.substring(2,4),r=e.substring(4,6);return[parseInt(t,16),parseInt(n,16),parseInt(r,16)]},e.prototype.rgb=function(e,t,n){var r=e/255*5,i=t/255*5,a=n/255*5;return this.ansi(r,i,a)},e.prototype.ansi=function(e,t,n){return 16+36*Math.round(e)+6*Math.round(t)+Math.round(n)},e.prototype.reset=function(){return this.prefix+"39;49"+this.suffix},e.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()},Fi=e}function ha(){return Gi?Vi:(Gi=1,Vi=function(e,t){if(!t)return!1;for(var n=t.split(/[\s,]+/),r=0;r<n.length;r++)if("-"!==(t=n[r].replace("*",".*?")).charAt(0)){if(new RegExp("^"+t+"$").test(e))return!0}else if(new RegExp("^"+t.substr(1)+"$").test(e))return!1;return!1})}function ma(){if(Ji)return Zi;Ji=1;var e=function(){if(Wi)return Ki;Wi=1;var e=ha();return Ki=function(t){return function(n){try{return e(n,t())}catch(e){}return!1}}}();return Zi=e((function(){return process.env.DEBUG||process.env.DIAGNOSTICS}))}function ga(){if(ta)return ea;ta=1;var e=vi(),t=h.isatty(1),n=e((function e(n,r){return(r=r||{}).colors="colors"in r?r.colors:t,r.namespace=n,r.prod=!1,r.dev=!0,e.enabled(n)||r.force||e.force?e.yep(r):e.nope(r)}));return n.modify(function(){if(Yi)return Hi;Yi=1;var e=da(),t=fa();return Hi=function(n,r){var i=r.namespace,a=!1!==r.colors?t(i+":",e(i)):i+":";return n[0]=a+" "+n[0],n}}()),n.use(ma()),n.set(Qi?Xi:(Qi=1,Xi=function(e,t){try{Function.prototype.apply.call(console.log,console,t)}catch(e){}})),ea=n}function ba(){return na||(na=1,"production"===process.env.NODE_ENV?yi.exports=function(){if(bi)return gi;bi=1;var e=vi()((function e(t,n){return(n=n||{}).namespace=t,n.prod=!0,n.dev=!1,n.force||e.force?e.yep(n):e.nope(n)}));return gi=e}():yi.exports=ga()),yi.exports}function ya(){if(ia)return ra;ia=1;const e=n,{StringDecoder:t}=m,{Stream:r}=fi();function i(){}return ra=(n,a)=>{const s=Buffer.alloc(65536),o=new t("utf8"),c=new r;let u="",l=0,p=0;return-1===n.start&&delete n.start,c.readable=!0,c.destroy=()=>{c.destroyed=!0,c.emit("end"),c.emit("close")},e.open(n.file,"a+","0644",((t,r)=>{if(t)return a?a(t):c.emit("error",t),void c.destroy();!function t(){if(!c.destroyed)return e.read(r,s,0,s.length,l,((e,r)=>{if(e)return a?a(e):c.emit("error",e),void c.destroy();if(!r)return u&&((null==n.start||p>n.start)&&(a?a(null,u):c.emit("line",u)),p++,u=""),setTimeout(t,1e3);let i=o.write(s.slice(0,r));a||c.emit("data",i),i=(u+i).split(/\n+/);const d=i.length-1;let f=0;for(;f<d;f++)(null==n.start||p>n.start)&&(a?a(null,i[f]):c.emit("line",i[f])),p++;return u=i[d],l+=r,t()}));e.close(r,i)}()})),a?c.destroy:c},ra}function va(){if(sa)return aa;sa=1;const e=n,t=a,r=ni(),i=f,{MESSAGE:s}=Fe(),{Stream:o,PassThrough:c}=fi(),l=pr(),p=ba()("winston:file"),d=u,h=ya();return aa=class extends l{constructor(e={}){function n(t,...n){n.slice(1).forEach((n=>{if(e[n])throw new Error(`Cannot set ${n} and ${t} together`)}))}if(super(e),this.name=e.name||"file",this._stream=new c,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),e.filename||e.dirname)n("filename or dirname","stream"),this._basename=this.filename=e.filename?t.basename(e.filename):"winston.log",this.dirname=e.dirname||t.dirname(e.filename),this.options=e.options||{flags:"a"};else{if(!e.stream)throw new Error("Cannot log to file without filename or stream.");console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),n("stream","filename","maxsize"),this._dest=this._stream.pipe(this._setupStream(e.stream)),this.dirname=t.dirname(this._dest.path)}this.maxsize=e.maxsize||null,this.rotationFormat=e.rotationFormat||!1,this.zippedArchive=e.zippedArchive||!1,this.maxFiles=e.maxFiles||null,this.eol="string"==typeof e.eol?e.eol:d.EOL,this.tailable=e.tailable||!1,this.lazy=e.lazy||!1,this._size=0,this._pendingSize=0,this._created=0,this._drain=!1,this._opening=!1,this._ending=!1,this._fileExist=!1,this.dirname&&this._createLogDirIfNotExist(this.dirname),this.lazy||this.open()}finishIfEnding(){this._ending&&(this._opening?this.once("open",(()=>{this._stream.once("finish",(()=>this.emit("finish"))),setImmediate((()=>this._stream.end()))})):(this._stream.once("finish",(()=>this.emit("finish"))),setImmediate((()=>this._stream.end()))))}log(e,t=()=>{}){if(this.silent)return t(),!0;if(this._drain)return void this._stream.once("drain",(()=>{this._drain=!1,this.log(e,t)}));if(this._rotate)return void this._stream.once("rotate",(()=>{this._rotate=!1,this.log(e,t)}));if(this.lazy){if(!this._fileExist)return this._opening||this.open(),void this.once("open",(()=>{this._fileExist=!0,this.log(e,t)}));if(this._needsNewFile(this._pendingSize))return void this._dest.once("close",(()=>{this._opening||this.open(),this.once("open",(()=>{this.log(e,t)}))}))}const n=`${e[s]}${this.eol}`,r=Buffer.byteLength(n);this._pendingSize+=r,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);const i=this._stream.write(n,function(){this._size+=r,this._pendingSize-=r,p("logged %s %s",this._size,n),this.emit("logged",e),this._rotate||this._opening||this._needsNewFile()&&(this.lazy?this._endStream((()=>{this.emit("fileclosed")})):(this._rotate=!0,this._endStream((()=>this._rotateFile()))))}.bind(this));return i?t():(this._drain=!0,this._stream.once("drain",(()=>{this._drain=!1,t()}))),p("written",i,this._drain),this.finishIfEnding(),i}query(n,r){"function"==typeof n&&(r=n,n={}),n=function(e){e=e||{},e.rows=e.rows||e.limit||10,e.start=e.start||0,e.until=e.until||new Date,"object"!=typeof e.until&&(e.until=new Date(e.until));e.from=e.from||e.until-864e5,"object"!=typeof e.from&&(e.from=new Date(e.from));return e.order=e.order||"desc",e}(n);const i=t.join(this.dirname,this.filename);let a="",s=[],o=0;const c=e.createReadStream(i,{encoding:"utf8"});function u(e,t){try{const t=JSON.parse(e);(function(e){if(!e)return;if("object"!=typeof e)return;const t=new Date(e.timestamp);if(n.from&&t<n.from||n.until&&t>n.until||n.level&&n.level!==e.level)return;return!0})(t)&&function(e){if(n.rows&&s.length>=n.rows&&"desc"!==n.order)return void(c.readable&&c.destroy());n.fields&&(e=n.fields.reduce(((t,n)=>(t[n]=e[n],t)),{}));"desc"===n.order&&s.length>=n.rows&&s.shift();s.push(e)}(t)}catch(e){t||c.emit("error",e)}}c.on("error",(e=>{if(c.readable&&c.destroy(),r)return"ENOENT"!==e.code?r(e):r(null,s)})),c.on("data",(e=>{const t=(e=(a+e).split(/\n+/)).length-1;let r=0;for(;r<t;r++)(!n.start||o>=n.start)&&u(e[r]),o++;a=e[t]})),c.on("close",(()=>{a&&u(a,!0),"desc"===n.order&&(s=s.reverse()),r&&r(null,s)}))}stream(e={}){const n=t.join(this.dirname,this.filename),r=new o,i={file:n,start:e.start};return r.destroy=h(i,((e,t)=>{if(e)return r.emit("error",e);try{r.emit("data",t),t=JSON.parse(t),r.emit("log",t)}catch(e){r.emit("error",e)}})),r}open(){this.filename&&(this._opening||(this._opening=!0,this.stat(((e,t)=>{if(e)return this.emit("error",e);p("stat done: %s { size: %s }",this.filename,t),this._size=t,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",(()=>{this._stream.emit("rotate")||(this._rotate=!1)}))}))))}stat(n){const r=this._getFile(),i=t.join(this.dirname,r);e.stat(i,((e,t)=>e&&"ENOENT"===e.code?(p("ENOENT ok",i),this.filename=r,n(null,0)):e?(p(`err ${e.code} ${i}`),n(e)):!t||this._needsNewFile(t.size)?this._incFile((()=>this.stat(n))):(this.filename=r,void n(null,t.size))))}close(e){this._stream&&this._stream.end((()=>{e&&e(),this.emit("flush"),this.emit("closed")}))}_needsNewFile(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}_onError(e){this.emit("error",e)}_setupStream(e){return e.on("error",this._onError),e}_cleanupStream(e){return e.removeListener("error",this._onError),e.destroy(),e}_rotateFile(){this._incFile((()=>this.open()))}_endStream(e=()=>{}){this._dest?(this._stream.unpipe(this._dest),this._dest.end((()=>{this._cleanupStream(this._dest),e()}))):e()}_createStream(n){const r=t.join(this.dirname,this.filename);p("create stream start",r,this.options);const i=e.createWriteStream(r,this.options).on("error",(e=>p(e))).on("close",(()=>p("close",i.path,i.bytesWritten))).on("open",(()=>{p("file open ok",r),this.emit("open",r),n.pipe(i),this.rotatedWhileOpening&&(this._stream=new c,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(i),n.end())}));return p("create stream ok",r),i}_incFile(e){p("_incFile",this.filename);const n=t.extname(this._basename),i=t.basename(this._basename,n),a=[];this.zippedArchive&&a.push(function(e){const r=this._created>0&&!this.tailable?this._created:"";this._compressFile(t.join(this.dirname,`${i}${r}${n}`),t.join(this.dirname,`${i}${r}${n}.gz`),e)}.bind(this)),a.push(function(e){this.tailable?this._checkMaxFilesTailable(n,i,e):(this._created+=1,this._checkMaxFilesIncrementing(n,i,e))}.bind(this)),r(a,e)}_getFile(){const e=t.extname(this._basename),n=t.basename(this._basename,e),r=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${n}${r}${e}`:`${n}${e}`}_checkMaxFilesIncrementing(n,r,i){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(i);const a=this._created-this.maxFiles,s=`${r}${0!==a?a:""}${n}${this.zippedArchive?".gz":""}`,o=t.join(this.dirname,s);e.unlink(o,i)}_checkMaxFilesTailable(n,i,a){const s=[];if(!this.maxFiles)return;const o=this.zippedArchive?".gz":"";for(let r=this.maxFiles-1;r>1;r--)s.push(function(r,a){let s=`${i}${r-1}${n}${o}`;const c=t.join(this.dirname,s);e.exists(c,(u=>{if(!u)return a(null);s=`${i}${r}${n}${o}`,e.rename(c,t.join(this.dirname,s),a)}))}.bind(this,r));r(s,(()=>{e.rename(t.join(this.dirname,`${i}${n}${o}`),t.join(this.dirname,`${i}1${n}${o}`),a)}))}_compressFile(t,n,r){e.access(t,e.F_OK,(a=>{if(a)return r();var s=i.createGzip(),o=e.createReadStream(t),c=e.createWriteStream(n);c.on("finish",(()=>{e.unlink(t,r)})),o.pipe(s).pipe(c)}))}_createLogDirIfNotExist(t){e.existsSync(t)||e.mkdirSync(t,{recursive:!0})}},aa}var xa,wa,_a,Sa,Ea,ka,Ma,Ta,Aa={exports:{}};function Ra(){return xa||(xa=1,function(e,t){const{hasOwnProperty:n}=Object.prototype,r=d();r.configure=d,r.stringify=r,r.default=r,t.stringify=r,t.configure=d,e.exports=r;const i=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function a(e){return e.length<5e3&&!i.test(e)?`"${e}"`:JSON.stringify(e)}function s(e,t){if(e.length>200||t)return e.sort(t);for(let t=1;t<e.length;t++){const n=e[t];let r=t;for(;0!==r&&e[r-1]>n;)e[r]=e[r-1],r--;e[r]=n}return e}const o=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function c(e){return void 0!==o.call(e)&&0!==e.length}function u(e,t,n){e.length<n&&(n=e.length);const r=","===t?"":" ";let i=`"0":${r}${e[0]}`;for(let a=1;a<n;a++)i+=`${t}"${a}":${r}${e[a]}`;return i}function l(e,t){let r;if(n.call(e,t)){if(r=e[t],"number"!=typeof r)throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${t}" argument must be an integer`);if(r<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return void 0===r?1/0:r}function p(e){return 1===e?"1 item":`${e} items`}function d(e){const t=function(e){if(n.call(e,"strict")){const t=e.strict;if("boolean"!=typeof t)throw new TypeError('The "strict" argument must be of type boolean');if(t)return e=>{let t="Object can not safely be stringified. Received type "+typeof e;throw"function"!=typeof e&&(t+=` (${e.toString()})`),new Error(t)}}}(e={...e});t&&(void 0===e.bigint&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));const r=function(e){if(n.call(e,"circularValue")){const t=e.circularValue;if("string"==typeof t)return`"${t}"`;if(null==t)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}(e),i=function(e,t){let r;if(n.call(e,t)&&(r=e[t],"boolean"!=typeof r))throw new TypeError(`The "${t}" argument must be of type boolean`);return void 0===r||r}(e,"bigint"),o=function(e){let t;if(n.call(e,"deterministic")&&(t=e.deterministic,"boolean"!=typeof t&&"function"!=typeof t))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return void 0===t||t}(e),d="function"==typeof o?o:void 0,f=l(e,"maximumDepth"),h=l(e,"maximumBreadth");function m(e,n,u,l,g,b){let y=n[e];switch("object"==typeof y&&null!==y&&"function"==typeof y.toJSON&&(y=y.toJSON(e)),y=l.call(n,e,y),typeof y){case"string":return a(y);case"object":{if(null===y)return"null";if(-1!==u.indexOf(y))return r;let e="",t=",";const n=b;if(Array.isArray(y)){if(0===y.length)return"[]";if(f<u.length+1)return'"[Array]"';u.push(y),""!==g&&(e+=`\n${b+=g}`,t=`,\n${b}`);const r=Math.min(y.length,h);let i=0;for(;i<r-1;i++){const n=m(String(i),y,u,l,g,b);e+=void 0!==n?n:"null",e+=t}const a=m(String(i),y,u,l,g,b);if(e+=void 0!==a?a:"null",y.length-1>h){e+=`${t}"... ${p(y.length-h-1)} not stringified"`}return""!==g&&(e+=`\n${n}`),u.pop(),`[${e}]`}let i=Object.keys(y);const v=i.length;if(0===v)return"{}";if(f<u.length+1)return'"[Object]"';let x="",w="";""!==g&&(t=`,\n${b+=g}`,x=" ");const _=Math.min(v,h);o&&!c(y)&&(i=s(i,d)),u.push(y);for(let n=0;n<_;n++){const r=i[n],s=m(r,y,u,l,g,b);void 0!==s&&(e+=`${w}${a(r)}:${x}${s}`,w=t)}if(v>h){e+=`${w}"...":${x}"${p(v-h)} not stringified"`,w=t}return""!==g&&w.length>1&&(e=`\n${b}${e}\n${n}`),u.pop(),`{${e}}`}case"number":return isFinite(y)?String(y):t?t(y):"null";case"boolean":return!0===y?"true":"false";case"undefined":return;case"bigint":if(i)return String(y);default:return t?t(y):void 0}}function g(e,n,s,o,c,u){switch("object"==typeof n&&null!==n&&"function"==typeof n.toJSON&&(n=n.toJSON(e)),typeof n){case"string":return a(n);case"object":{if(null===n)return"null";if(-1!==s.indexOf(n))return r;const e=u;let t="",i=",";if(Array.isArray(n)){if(0===n.length)return"[]";if(f<s.length+1)return'"[Array]"';s.push(n),""!==c&&(t+=`\n${u+=c}`,i=`,\n${u}`);const r=Math.min(n.length,h);let a=0;for(;a<r-1;a++){const e=g(String(a),n[a],s,o,c,u);t+=void 0!==e?e:"null",t+=i}const l=g(String(a),n[a],s,o,c,u);if(t+=void 0!==l?l:"null",n.length-1>h){t+=`${i}"... ${p(n.length-h-1)} not stringified"`}return""!==c&&(t+=`\n${e}`),s.pop(),`[${t}]`}s.push(n);let l="";""!==c&&(i=`,\n${u+=c}`,l=" ");let d="";for(const e of o){const r=g(e,n[e],s,o,c,u);void 0!==r&&(t+=`${d}${a(e)}:${l}${r}`,d=i)}return""!==c&&d.length>1&&(t=`\n${u}${t}\n${e}`),s.pop(),`{${t}}`}case"number":return isFinite(n)?String(n):t?t(n):"null";case"boolean":return!0===n?"true":"false";case"undefined":return;case"bigint":if(i)return String(n);default:return t?t(n):void 0}}function b(e,n,l,m,g){switch(typeof n){case"string":return a(n);case"object":{if(null===n)return"null";if("function"==typeof n.toJSON){if("object"!=typeof(n=n.toJSON(e)))return b(e,n,l,m,g);if(null===n)return"null"}if(-1!==l.indexOf(n))return r;const t=g;if(Array.isArray(n)){if(0===n.length)return"[]";if(f<l.length+1)return'"[Array]"';l.push(n);let e=`\n${g+=m}`;const r=`,\n${g}`,i=Math.min(n.length,h);let a=0;for(;a<i-1;a++){const t=b(String(a),n[a],l,m,g);e+=void 0!==t?t:"null",e+=r}const s=b(String(a),n[a],l,m,g);if(e+=void 0!==s?s:"null",n.length-1>h){e+=`${r}"... ${p(n.length-h-1)} not stringified"`}return e+=`\n${t}`,l.pop(),`[${e}]`}let i=Object.keys(n);const y=i.length;if(0===y)return"{}";if(f<l.length+1)return'"[Object]"';const v=`,\n${g+=m}`;let x="",w="",_=Math.min(y,h);c(n)&&(x+=u(n,v,h),i=i.slice(n.length),_-=n.length,w=v),o&&(i=s(i,d)),l.push(n);for(let e=0;e<_;e++){const t=i[e],r=b(t,n[t],l,m,g);void 0!==r&&(x+=`${w}${a(t)}: ${r}`,w=v)}if(y>h){x+=`${w}"...": "${p(y-h)} not stringified"`,w=v}return""!==w&&(x=`\n${g}${x}\n${t}`),l.pop(),`{${x}}`}case"number":return isFinite(n)?String(n):t?t(n):"null";case"boolean":return!0===n?"true":"false";case"undefined":return;case"bigint":if(i)return String(n);default:return t?t(n):void 0}}function y(e,n,l){switch(typeof n){case"string":return a(n);case"object":{if(null===n)return"null";if("function"==typeof n.toJSON){if("object"!=typeof(n=n.toJSON(e)))return y(e,n,l);if(null===n)return"null"}if(-1!==l.indexOf(n))return r;let t="";const i=void 0!==n.length;if(i&&Array.isArray(n)){if(0===n.length)return"[]";if(f<l.length+1)return'"[Array]"';l.push(n);const e=Math.min(n.length,h);let r=0;for(;r<e-1;r++){const e=y(String(r),n[r],l);t+=void 0!==e?e:"null",t+=","}const i=y(String(r),n[r],l);if(t+=void 0!==i?i:"null",n.length-1>h){t+=`,"... ${p(n.length-h-1)} not stringified"`}return l.pop(),`[${t}]`}let m=Object.keys(n);const g=m.length;if(0===g)return"{}";if(f<l.length+1)return'"[Object]"';let b="",v=Math.min(g,h);i&&c(n)&&(t+=u(n,",",h),m=m.slice(n.length),v-=n.length,b=","),o&&(m=s(m,d)),l.push(n);for(let e=0;e<v;e++){const r=m[e],i=y(r,n[r],l);void 0!==i&&(t+=`${b}${a(r)}:${i}`,b=",")}if(g>h){t+=`${b}"...":"${p(g-h)} not stringified"`}return l.pop(),`{${t}}`}case"number":return isFinite(n)?String(n):t?t(n):"null";case"boolean":return!0===n?"true":"false";case"undefined":return;case"bigint":if(i)return String(n);default:return t?t(n):void 0}}return function(e,t,n){if(arguments.length>1){let r="";if("number"==typeof n?r=" ".repeat(Math.min(n,10)):"string"==typeof n&&(r=n.slice(0,10)),null!=t){if("function"==typeof t)return m("",{"":e},[],t,r,"");if(Array.isArray(t))return g("",e,[],function(e){const t=new Set;for(const n of e)"string"!=typeof n&&"number"!=typeof n||t.add(String(n));return t}(t),r,"")}if(0!==r.length)return b("",e,[],r,"")}return y("",e,[])}}}(Aa,Aa.exports)),Aa.exports}function Oa(){if(Ea)return Sa;Ea=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,Sa=e}function Ia(){return Ta||(Ta=1,e=mn,Object.defineProperty(e,"Console",{configurable:!0,enumerable:!0,get:()=>function(){if(cr)return or;cr=1;const e=u,{LEVEL:t,MESSAGE:n}=Fe(),r=pr();return or=class extends r{constructor(t={}){super(t),this.name=t.name||"console",this.stderrLevels=this._stringArrayToSet(t.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(t.consoleWarnLevels),this.eol="string"==typeof t.eol?t.eol:e.EOL,this.forceConsole=t.forceConsole||!1,this._consoleLog=console.log.bind(console),this._consoleWarn=console.warn.bind(console),this._consoleError=console.error.bind(console),this.setMaxListeners(30)}log(e,r){return setImmediate((()=>this.emit("logged",e))),this.stderrLevels[e[t]]?(console._stderr&&!this.forceConsole?console._stderr.write(`${e[n]}${this.eol}`):this._consoleError(e[n]),void(r&&r())):this.consoleWarnLevels[e[t]]?(console._stderr&&!this.forceConsole?console._stderr.write(`${e[n]}${this.eol}`):this._consoleWarn(e[n]),void(r&&r())):(console._stdout&&!this.forceConsole?console._stdout.write(`${e[n]}${this.eol}`):this._consoleLog(e[n]),void(r&&r()))}_stringArrayToSet(e,t){if(!e)return{};if(t=t||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(t);return e.reduce(((e,n)=>{if("string"!=typeof n)throw new Error(t);return e[n]=!0,e}),{})}},or}()}),Object.defineProperty(e,"File",{configurable:!0,enumerable:!0,get:()=>va()}),Object.defineProperty(e,"Http",{configurable:!0,enumerable:!0,get:()=>function(){if(_a)return wa;_a=1;const e=g,t=y,{Stream:n}=fi(),r=pr(),{configure:i}=Ra();return wa=class extends r{constructor(e={}){super(e),this.options=e,this.name=e.name||"http",this.ssl=!!e.ssl,this.host=e.host||"localhost",this.port=e.port,this.auth=e.auth,this.path=e.path||"",this.maximumDepth=e.maximumDepth,this.agent=e.agent,this.headers=e.headers||{},this.headers["content-type"]="application/json",this.batch=e.batch||!1,this.batchInterval=e.batchInterval||5e3,this.batchCount=e.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},this.port||(this.port=this.ssl?443:80)}log(e,t){this._request(e,null,null,((t,n)=>{n&&200!==n.statusCode&&(t=new Error(`Invalid HTTP Status Code: ${n.statusCode}`)),t?this.emit("warn",t):this.emit("logged",e)})),t&&setImmediate(t)}query(e,t){"function"==typeof e&&(t=e,e={});const n=(e={method:"query",params:this.normalizeQuery(e)}).params.auth||null;delete e.params.auth;const r=e.params.path||null;delete e.params.path,this._request(e,n,r,((e,n,r)=>{if(n&&200!==n.statusCode&&(e=new Error(`Invalid HTTP Status Code: ${n.statusCode}`)),e)return t(e);if("string"==typeof r)try{r=JSON.parse(r)}catch(e){return t(e)}t(null,r)}))}stream(e={}){const t=new n,r=(e={method:"stream",params:e}).params.path||null;delete e.params.path;const i=e.params.auth||null;delete e.params.auth;let a="";const s=this._request(e,i,r);return t.destroy=()=>s.destroy(),s.on("data",(e=>{const n=(e=(a+e).split(/\n+/)).length-1;let r=0;for(;r<n;r++)try{t.emit("log",JSON.parse(e[r]))}catch(e){t.emit("error",e)}a=e[n]})),s.on("error",(e=>t.emit("error",e))),t}_request(e,t,n,r){e=e||{},t=t||this.auth,n=n||this.path||"",this.batch?this._doBatch(e,r,t,n):this._doRequest(e,r,t,n)}_doBatch(e,t,n,r){if(this.batchOptions.push(e),1===this.batchOptions.length){const e=this;this.batchCallback=t,this.batchTimeoutID=setTimeout((function(){e.batchTimeoutID=-1,e._doBatchRequest(e.batchCallback,n,r)}),this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,n,r)}_doBatchRequest(e,t,n){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);const r=this.batchOptions.slice();this.batchOptions=[],this._doRequest(r,e,t,n)}_doRequest(n,r,a,s){const o=Object.assign({},this.headers);a&&a.bearer&&(o.Authorization=`Bearer ${a.bearer}`);const c=(this.ssl?t:e).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${s.replace(/^\//,"")}`,headers:o,auth:a&&a.username&&a.password?`${a.username}:${a.password}`:"",agent:this.agent});c.on("error",r),c.on("response",(e=>e.on("end",(()=>r(null,e))).resume()));const u=i({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});c.end(Buffer.from(u(n,this.options.replacer),"utf8"))}},wa}()}),Object.defineProperty(e,"Stream",{configurable:!0,enumerable:!0,get:()=>function(){if(Ma)return ka;Ma=1;const e=Oa(),{MESSAGE:t}=Fe(),n=u,r=pr();return ka=class extends r{constructor(t={}){if(super(t),!t.stream||!e(t.stream))throw new Error("options.stream is required.");this._stream=t.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=t.stream._writableState.objectMode,this.eol="string"==typeof t.eol?t.eol:n.EOL}log(e,n){if(setImmediate((()=>this.emit("logged",e))),this.isObjectMode)return this._stream.write(e),void(n&&n());this._stream.write(`${e[t]}${this.eol}`),n&&n()}}}()})),mn;var e}var Na,Pa={};function ja(){if(Na)return Pa;Na=1;const e=rn(),{configs:t}=Fe();return Pa.cli=e.levels(t.cli),Pa.npm=e.levels(t.npm),Pa.syslog=e.levels(t.syslog),Pa.addColors=e.levels,Pa}var Da,La={exports:{}},Ca={exports:{}};var $a,Ba,za,Ua,Fa,qa,Ha={exports:{}};function Ya(){return Ba||(Ba=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=(Da||(Da=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=u(gr()),r=u(Qr()),i=u(ti()),a=u(Lr()),s=u(Hr()),o=u(Mr()),c=u(Or());function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n){n=(0,a.default)(n);var i=0,o=0,{length:c}=e,u=!1;function l(e,t){!1===e&&(u=!0),!0!==u&&(e?n(e):++o!==c&&t!==r.default||n(null))}for(0===c&&n(null);i<c;i++)t(e[i],i,(0,s.default)(l))}function p(e,t,n){return(0,i.default)(e,1/0,t,n)}t.default=(0,c.default)((function(e,t,r){return((0,n.default)(e)?l:p)(e,(0,o.default)(t),r)}),3),e.exports=t.default}(Ca,Ca.exports)),Ca.exports),r=c(n),i=function(){return $a||($a=1,e=Ha,t=Ha.exports,Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(t,n,r)=>e(t,r)},e.exports=t.default),Ha.exports;var e,t}(),a=c(i),s=c(Mr()),o=c(Or());function c(e){return e&&e.__esModule?e:{default:e}}t.default=(0,o.default)((function(e,t,n){return(0,r.default)(e,(0,a.default)((0,s.default)(t)),n)}),3),e.exports=t.default}(La,La.exports)),La.exports}function Va(){if(qa)return Fa;qa=1;var e=function(){if(Ua)return za;Ua=1;var e=Object.prototype.toString;return za=function(t){if("string"==typeof t.displayName&&t.constructor.name)return t.displayName;if("string"==typeof t.name&&t.name)return t.name;if("object"==typeof t&&t.constructor&&"string"==typeof t.constructor.name)return t.constructor.name;var n=t.toString(),r=e.call(t).slice(8,-1);return(n="Function"===r?n.substring(n.indexOf("(")+1,n.indexOf(")")):r)||"anonymous"},za}();return Fa=function(t){var n,r=0;function i(){return r||(r=1,n=t.apply(this,arguments),t=null),n}return i.displayName=e(t),i},Fa}var Ga,Ka,Wa,Za,Ja,Xa,Qa,es,ts,ns,rs,is,as,ss,os,cs,us,ls,ps={};function ds(){return Ga||(Ga=1,function(e){function t(e){for(var t in e)this[t]=e[t]}e.get=function(t){var n=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},i=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t},Error.captureStackTrace(r,t||e.get);var a=r.stack;return Error.prepareStackTrace=i,Error.stackTraceLimit=n,a},e.parse=function(e){if(!e.stack)return[];var t=this;return e.stack.split("\n").slice(1).map((function(e){if(e.match(/^\s*[-]{4,}$/))return t._createParsedCallSite({fileName:e,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var n=e.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(n){var r=null,i=null,a=null,s=null,o=null,c="native"===n[5];if(n[1]){var u=(a=n[1]).lastIndexOf(".");if("."==a[u-1]&&u--,u>0){r=a.substr(0,u),i=a.substr(u+1);var l=r.indexOf(".Module");l>0&&(a=a.substr(l+1),r=r.substr(0,l))}s=null}i&&(s=r,o=i),"<anonymous>"===i&&(o=null,a=null);var p={fileName:n[2]||null,lineNumber:parseInt(n[3],10)||null,functionName:a,typeName:s,methodName:o,columnNumber:parseInt(n[4],10)||null,native:c};return t._createParsedCallSite(p)}})).filter((function(e){return!!e}))};["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"].forEach((function(e){t.prototype[e]=null,t.prototype["get"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}})),["topLevel","eval","native","constructor"].forEach((function(e){t.prototype[e]=!1,t.prototype["is"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}})),e._createParsedCallSite=function(e){return new t(e)}}(ps)),ps}function fs(){if(Ja)return Za;Ja=1;const e=u,t=Ya(),n=ba()("winston:exception"),r=Va(),i=ds(),a=function(){if(Wa)return Ka;Wa=1;const{Writable:e}=fi();return Ka=class extends e{constructor(e){if(super({objectMode:!0}),!e)throw new Error("ExceptionStream requires a TransportStream instance.");this.handleExceptions=!0,this.transport=e}_write(e,t,n){return e.exception?this.transport.log(e,n):(n(),!0)}}}();return Za=class{constructor(e){if(!e)throw new Error("Logger is required to handle exceptions");this.logger=e,this.handlers=new Map}handle(...e){e.forEach((e=>{if(Array.isArray(e))return e.forEach((e=>this._addHandler(e)));this._addHandler(e)})),this.catcher||(this.catcher=this._uncaughtException.bind(this),process.on("uncaughtException",this.catcher))}unhandle(){this.catcher&&(process.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((e=>this.logger.unpipe(e))))}getAllInfo(e){let t=null;return e&&(t="string"==typeof e?e:e.message),{error:e,level:"error",message:[`uncaughtException: ${t||"(no error message)"}`,e&&e.stack||" No stack trace"].join("\n"),stack:e&&e.stack,exception:!0,date:(new Date).toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:e.loadavg(),uptime:e.uptime()}}getTrace(e){return(e?i.parse(e):i.get()).map((e=>({column:e.getColumnNumber(),file:e.getFileName(),function:e.getFunctionName(),line:e.getLineNumber(),method:e.getMethodName(),native:e.isNative()})))}_addHandler(e){if(!this.handlers.has(e)){e.handleExceptions=!0;const t=new a(e);this.handlers.set(e,t),this.logger.pipe(t)}}_uncaughtException(e){const i=this.getAllInfo(e),a=this._getExceptionHandlers();let s,o="function"==typeof this.logger.exitOnError?this.logger.exitOnError(e):this.logger.exitOnError;function c(){n("doExit",o),n("process._exiting",process._exiting),o&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!a.length&&o&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),o=!1),!a||0===a.length)return process.nextTick(c);t(a,((e,t)=>{const i=r(t),a=e.transport||e;function s(e){return()=>{n(e),i()}}a._ending=!0,a.once("finish",s("finished")),a.once("error",s("error"))}),(()=>o&&c())),this.logger.log(i),o&&(s=setTimeout(c,3e3))}_getExceptionHandlers(){return this.logger.transports.filter((e=>(e.transport||e).handleExceptions))}},Za}function hs(){if(ts)return es;ts=1;const e=u,t=Ya(),n=ba()("winston:rejection"),r=Va(),i=ds(),a=function(){if(Qa)return Xa;Qa=1;const{Writable:e}=fi();return Xa=class extends e{constructor(e){if(super({objectMode:!0}),!e)throw new Error("RejectionStream requires a TransportStream instance.");this.handleRejections=!0,this.transport=e}_write(e,t,n){return e.rejection?this.transport.log(e,n):(n(),!0)}}}();return es=class{constructor(e){if(!e)throw new Error("Logger is required to handle rejections");this.logger=e,this.handlers=new Map}handle(...e){e.forEach((e=>{if(Array.isArray(e))return e.forEach((e=>this._addHandler(e)));this._addHandler(e)})),this.catcher||(this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher))}unhandle(){this.catcher&&(process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((e=>this.logger.unpipe(e))))}getAllInfo(e){let t=null;return e&&(t="string"==typeof e?e:e.message),{error:e,level:"error",message:[`unhandledRejection: ${t||"(no error message)"}`,e&&e.stack||" No stack trace"].join("\n"),stack:e&&e.stack,rejection:!0,date:(new Date).toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:e.loadavg(),uptime:e.uptime()}}getTrace(e){return(e?i.parse(e):i.get()).map((e=>({column:e.getColumnNumber(),file:e.getFileName(),function:e.getFunctionName(),line:e.getLineNumber(),method:e.getMethodName(),native:e.isNative()})))}_addHandler(e){if(!this.handlers.has(e)){e.handleRejections=!0;const t=new a(e);this.handlers.set(e,t),this.logger.pipe(t)}}_unhandledRejection(e){const i=this.getAllInfo(e),a=this._getRejectionHandlers();let s,o="function"==typeof this.logger.exitOnError?this.logger.exitOnError(e):this.logger.exitOnError;function c(){n("doExit",o),n("process._exiting",process._exiting),o&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!a.length&&o&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),o=!1),!a||0===a.length)return process.nextTick(c);t(a,((e,t)=>{const i=r(t),a=e.transport||e;function s(e){return()=>{n(e),i()}}a._ending=!0,a.once("finish",s("finished")),a.once("error",s("error"))}),(()=>o&&c())),this.logger.log(i),o&&(s=setTimeout(c,3e3))}_getRejectionHandlers(){return this.logger.transports.filter((e=>(e.transport||e).handleRejections))}},es}function ms(){if(as)return is;as=1;const{Stream:e,Transform:t}=fi(),n=Ya(),{LEVEL:r,SPLAT:i}=Fe(),a=Oa(),s=fs(),o=hs(),c=lr(),u=(rs||(rs=1,ns=class{constructor(e){const t=ms();if("object"!=typeof e||Array.isArray(e)||!(e instanceof t))throw new Error("Logger is required for profiling");this.logger=e,this.start=Date.now()}done(...e){"function"==typeof e[e.length-1]&&(console.warn("Callback function no longer supported as of winston@3.0.0"),e.pop());const t="object"==typeof e[e.length-1]?e.pop():{};return t.level=t.level||"info",t.durationMs=Date.now()-this.start,this.logger.write(t)}}),ns),{warn:l}=on(),p=ja(),d=/%[scdjifoO%]/g;class f extends t{constructor(e){super({objectMode:!0}),this.configure(e)}child(e){const t=this;return Object.create(t,{write:{value:function(n){const r=Object.assign({},e,n);n instanceof Error&&(r.stack=n.stack,r.message=n.message),t.write(r)}}})}configure({silent:e,format:t,defaultMeta:n,levels:r,level:i="info",exitOnError:a=!0,transports:c,colors:u,emitErrs:l,formatters:d,padLevels:f,rewriters:h,stripColors:m,exceptionHandlers:g,rejectionHandlers:b}={}){if(this.transports.length&&this.clear(),this.silent=e,this.format=t||this.format||ht()(),this.defaultMeta=n||null,this.levels=r||this.levels||p.npm.levels,this.level=i,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new s(this),this.rejections=new o(this),this.profilers={},this.exitOnError=a,c&&(c=Array.isArray(c)?c:[c]).forEach((e=>this.add(e))),u||l||d||f||h||m)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join("\n"));g&&this.exceptions.handle(g),b&&this.rejections.handle(b)}isLevelEnabled(e){const t=h(this.levels,e);if(null===t)return!1;const n=h(this.levels,this.level);if(null===n)return!1;if(!this.transports||0===this.transports.length)return n>=t;return-1!==this.transports.findIndex((e=>{let r=h(this.levels,e.level);return null===r&&(r=n),r>=t}))}log(e,t,...n){if(1===arguments.length)return e[r]=e.level,this._addDefaultMeta(e),this.write(e),this;if(2===arguments.length)return t&&"object"==typeof t?(t[r]=t.level=e,this._addDefaultMeta(t),this.write(t),this):(t={[r]:e,level:e,message:t},this._addDefaultMeta(t),this.write(t),this);const[a]=n;if("object"==typeof a&&null!==a){if(!(t&&t.match&&t.match(d))){const s=Object.assign({},this.defaultMeta,a,{[r]:e,[i]:n,level:e,message:t});return a.message&&(s.message=`${s.message} ${a.message}`),a.stack&&(s.stack=a.stack),a.cause&&(s.cause=a.cause),this.write(s),this}}return this.write(Object.assign({},this.defaultMeta,{[r]:e,[i]:n,level:e,message:t})),this}_transform(e,t,n){if(this.silent)return n();e[r]||(e[r]=e.level),this.levels[e[r]]||0===this.levels[e[r]]||console.error("[winston] Unknown logger level: %s",e[r]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e);try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=!1,n()}}_final(e){const t=this.transports.slice();n(t,((e,t)=>{if(!e||e.finished)return setImmediate(t);e.once("finish",t),e.end()}),e)}add(e){const t=!a(e)||e.log.length>2?new c({transport:e}):e;if(!t._writableState||!t._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",t),this._onEvent("warn",t),this.pipe(t),e.handleExceptions&&this.exceptions.handle(),e.handleRejections&&this.rejections.handle(),this}remove(e){if(!e)return this;let t=e;return(!a(e)||e.log.length>2)&&(t=this.transports.filter((t=>t.transport===e))[0]),t&&this.unpipe(t),this}clear(){return this.unpipe(),this}close(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}setLevels(){l.deprecated("setLevels")}query(e,t){"function"==typeof e&&(t=e,e={}),e=e||{};const r={},i=Object.assign({},e.query||{});n(this.transports.filter((e=>!!e.query)),(function(t,n){!function(t,n){e.query&&"function"==typeof t.formatQuery&&(e.query=t.formatQuery(i)),t.query(e,((r,i)=>{if(r)return n(r);"function"==typeof t.formatResults&&(i=t.formatResults(i,e.format)),n(null,i)}))}(t,((e,i)=>{n&&((i=e||i)&&(r[t.name]=i),n()),n=null}))}),(()=>t(null,r)))}stream(t={}){const n=new e,r=[];return n._streams=r,n.destroy=()=>{let e=r.length;for(;e--;)r[e].destroy()},this.transports.filter((e=>!!e.stream)).forEach((e=>{const i=e.stream(t);i&&(r.push(i),i.on("log",(t=>{t.transport=t.transport||[],t.transport.push(e.name),n.emit("log",t)})),i.on("error",(t=>{t.transport=t.transport||[],t.transport.push(e.name),n.emit("error",t)})))})),n}startTimer(){return new u(this)}profile(e,...t){const n=Date.now();if(this.profilers[e]){const r=this.profilers[e];delete this.profilers[e],"function"==typeof t[t.length-2]&&(console.warn("Callback function no longer supported as of winston@3.0.0"),t.pop());const i="object"==typeof t[t.length-1]?t.pop():{};return i.level=i.level||"info",i.durationMs=n-r,i.message=i.message||e,this.write(i)}return this.profilers[e]=n,this}handleExceptions(...e){console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),this.exceptions.handle(...e)}unhandleExceptions(...e){console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),this.exceptions.unhandle(...e)}cli(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join("\n"))}_onEvent(e,t){t["__winston"+e]||(t["__winston"+e]=function(n){"error"!==e||this.transports.includes(t)||this.add(t),this.emit(e,n,t)}.bind(this),t.on(e,t["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}}function h(e,t){const n=e[t];return n||0===n?n:null}return Object.defineProperty(f.prototype,"transports",{configurable:!1,enumerable:!0,get(){const{pipes:e}=this._readableState;return Array.isArray(e)?e:[e].filter(Boolean)}}),is=f}function gs(){if(os)return ss;os=1;const{LEVEL:e}=Fe(),t=ja(),n=ms(),r=ba()("winston:create-logger");return ss=function(i={}){i.levels=i.levels||t.npm.levels;class a extends n{constructor(e){super(e)}}const s=new a(i);return Object.keys(i.levels).forEach((function(t){r('Define prototype method for "%s"',t),"log"!==t?(a.prototype[t]=function(...n){const r=this||s;if(1===n.length){const[i]=n,a=i&&i.message&&i||{message:i};return a.level=a[e]=t,r._addDefaultMeta(a),r.write(a),this||s}return 0===n.length?(r.log(t,""),r):r.log(t,...n)},a.prototype[function(e){return"is"+e.charAt(0).toUpperCase()+e.slice(1)+"Enabled"}(t)]=function(){return(this||s).isLevelEnabled(t)}):console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.')})),s},ss}function bs(){return ls||(ls=1,function(e){const t=rn(),{warn:n}=on();e.version=hn,e.transports=Ia(),e.config=ja(),e.addColors=t.levels,e.format=t.format,e.createLogger=gs(),e.Logger=ms(),e.ExceptionHandler=fs(),e.RejectionHandler=hs(),e.Container=function(){if(us)return cs;us=1;const e=gs();return cs=class{constructor(e={}){this.loggers=new Map,this.options=e}add(t,n){if(!this.loggers.has(t)){const r=(n=Object.assign({},n||this.options)).transports||this.options.transports;n.transports=r?Array.isArray(r)?r.slice():[r]:[];const i=e(n);i.on("close",(()=>this._delete(t))),this.loggers.set(t,i)}return this.loggers.get(t)}get(e,t){return this.add(e,t)}has(e){return!!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach(((e,t)=>this._removeLogger(t)))}_removeLogger(e){this.loggers.has(e)&&(this.loggers.get(e).close(),this._delete(e))}_delete(e){this.loggers.delete(e)}},cs}(),e.Transport=pr(),e.loggers=new e.Container;const r=e.createLogger();Object.keys(e.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach((t=>e[t]=(...e)=>r[t](...e))),Object.defineProperty(e,"level",{get:()=>r.level,set(e){r.level=e}}),Object.defineProperty(e,"exceptions",{get:()=>r.exceptions}),Object.defineProperty(e,"rejections",{get:()=>r.rejections}),["exitOnError"].forEach((t=>{Object.defineProperty(e,t,{get:()=>r[t],set(e){r[t]=e}})})),Object.defineProperty(e,"default",{get:()=>({exceptionHandlers:r.exceptionHandlers,rejectionHandlers:r.rejectionHandlers,transports:r.transports})}),n.deprecated(e,"setLevels"),n.forFunctions(e,"useFormat",["cli"]),n.forProperties(e,"useFormat",["padLevels","stripColors"]),n.forFunctions(e,"deprecated",["addRewriter","addFilter","clone","extend"]),n.forProperties(e,"deprecated",["emitErrs","levelLength"])}(G)),G}bs();var ys,vs={exports:{}};function xs(){return ys||(ys=1,function(e,t){var n=w;function r(e,t){return function(e,t){var r;r="passthrough"!==t.algorithm?n.createHash(t.algorithm):new u;void 0===r.write&&(r.write=r.update,r.end=r.update);var i=c(t,r);i.dispatch(e),r.update||r.end("");if(r.digest)return r.digest("buffer"===t.encoding?void 0:t.encoding);var a=r.read();if("buffer"===t.encoding)return a;return a.toString(t.encoding)}(e,t=s(e,t))}(t=e.exports=r).sha1=function(e){return r(e)},t.keys=function(e){return r(e,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},t.MD5=function(e){return r(e,{algorithm:"md5",encoding:"hex"})},t.keysMD5=function(e){return r(e,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var i=n.getHashes?n.getHashes().slice():["sha1","md5"];i.push("passthrough");var a=["buffer","hex","binary","base64"];function s(e,t){t=t||{};var n={};if(n.algorithm=t.algorithm||"sha1",n.encoding=t.encoding||"hex",n.excludeValues=!!t.excludeValues,n.algorithm=n.algorithm.toLowerCase(),n.encoding=n.encoding.toLowerCase(),n.ignoreUnknown=!0===t.ignoreUnknown,n.respectType=!1!==t.respectType,n.respectFunctionNames=!1!==t.respectFunctionNames,n.respectFunctionProperties=!1!==t.respectFunctionProperties,n.unorderedArrays=!0===t.unorderedArrays,n.unorderedSets=!1!==t.unorderedSets,n.unorderedObjects=!1!==t.unorderedObjects,n.replacer=t.replacer||void 0,n.excludeKeys=t.excludeKeys||void 0,void 0===e)throw new Error("Object argument required.");for(var r=0;r<i.length;++r)i[r].toLowerCase()===n.algorithm.toLowerCase()&&(n.algorithm=i[r]);if(-1===i.indexOf(n.algorithm))throw new Error('Algorithm "'+n.algorithm+'" not supported. supported values: '+i.join(", "));if(-1===a.indexOf(n.encoding)&&"passthrough"!==n.algorithm)throw new Error('Encoding "'+n.encoding+'" not supported. supported values: '+a.join(", "));return n}function o(e){if("function"!=typeof e)return!1;return null!=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(e))}function c(e,t,n){n=n||[];var r=function(e){return t.update?t.update(e,"utf8"):t.write(e,"utf8")};return{dispatch:function(t){e.replacer&&(t=e.replacer(t));var n=typeof t;return null===t&&(n="null"),this["_"+n](t)},_object:function(t){var i=Object.prototype.toString.call(t),a=/\[object (.*)\]/i.exec(i);a=(a=a?a[1]:"unknown:["+i+"]").toLowerCase();var s;if((s=n.indexOf(t))>=0)return this.dispatch("[CIRCULAR:"+s+"]");if(n.push(t),"undefined"!=typeof Buffer&&Buffer.isBuffer&&Buffer.isBuffer(t))return r("buffer:"),r(t);if("object"===a||"function"===a||"asyncfunction"===a){var c=Object.keys(t);e.unorderedObjects&&(c=c.sort()),!1===e.respectType||o(t)||c.splice(0,0,"prototype","__proto__","constructor"),e.excludeKeys&&(c=c.filter((function(t){return!e.excludeKeys(t)}))),r("object:"+c.length+":");var u=this;return c.forEach((function(n){u.dispatch(n),r(":"),e.excludeValues||u.dispatch(t[n]),r(",")}))}if(!this["_"+a]){if(e.ignoreUnknown)return r("["+a+"]");throw new Error('Unknown object type "'+a+'"')}this["_"+a](t)},_array:function(t,i){i=void 0!==i?i:!1!==e.unorderedArrays;var a=this;if(r("array:"+t.length+":"),!i||t.length<=1)return t.forEach((function(e){return a.dispatch(e)}));var s=[],o=t.map((function(t){var r=new u,i=n.slice();return c(e,r,i).dispatch(t),s=s.concat(i.slice(n.length)),r.read().toString()}));return n=n.concat(s),o.sort(),this._array(o,!1)},_date:function(e){return r("date:"+e.toJSON())},_symbol:function(e){return r("symbol:"+e.toString())},_error:function(e){return r("error:"+e.toString())},_boolean:function(e){return r("bool:"+e.toString())},_string:function(e){r("string:"+e.length+":"),r(e.toString())},_function:function(t){r("fn:"),o(t)?this.dispatch("[native]"):this.dispatch(t.toString()),!1!==e.respectFunctionNames&&this.dispatch("function-name:"+String(t.name)),e.respectFunctionProperties&&this._object(t)},_number:function(e){return r("number:"+e.toString())},_xml:function(e){return r("xml:"+e.toString())},_null:function(){return r("Null")},_undefined:function(){return r("Undefined")},_regexp:function(e){return r("regex:"+e.toString())},_uint8array:function(e){return r("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint8clampedarray:function(e){return r("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(e))},_int8array:function(e){return r("int8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint16array:function(e){return r("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_int16array:function(e){return r("int16array:"),this.dispatch(Array.prototype.slice.call(e))},_uint32array:function(e){return r("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_int32array:function(e){return r("int32array:"),this.dispatch(Array.prototype.slice.call(e))},_float32array:function(e){return r("float32array:"),this.dispatch(Array.prototype.slice.call(e))},_float64array:function(e){return r("float64array:"),this.dispatch(Array.prototype.slice.call(e))},_arraybuffer:function(e){return r("arraybuffer:"),this.dispatch(new Uint8Array(e))},_url:function(e){return r("url:"+e.toString())},_map:function(t){r("map:");var n=Array.from(t);return this._array(n,!1!==e.unorderedSets)},_set:function(t){r("set:");var n=Array.from(t);return this._array(n,!1!==e.unorderedSets)},_file:function(e){return r("file:"),this.dispatch([e.name,e.size,e.type,e.lastModfied])},_blob:function(){if(e.ignoreUnknown)return r("[blob]");throw Error('Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse "options.replacer" or "options.ignoreUnknown"\n')},_domwindow:function(){return r("domwindow")},_bigint:function(e){return r("bigint:"+e.toString())},_process:function(){return r("process")},_timer:function(){return r("timer")},_pipe:function(){return r("pipe")},_tcp:function(){return r("tcp")},_udp:function(){return r("udp")},_tty:function(){return r("tty")},_statwatcher:function(){return r("statwatcher")},_securecontext:function(){return r("securecontext")},_connection:function(){return r("connection")},_zlib:function(){return r("zlib")},_context:function(){return r("context")},_nodescript:function(){return r("nodescript")},_httpparser:function(){return r("httpparser")},_dataview:function(){return r("dataview")},_signal:function(){return r("signal")},_fsevent:function(){return r("fsevent")},_tlswrap:function(){return r("tlswrap")}}}function u(){return{buf:"",write:function(e){this.buf+=e},end:function(e){this.buf+=e},read:function(){return this.buf}}}t.writeToStream=function(e,t,n){return void 0===n&&(n=t,t={}),c(t=s(e,t),n).dispatch(e)}}(vs,vs.exports)),vs.exports}function ws(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var _s,Ss,Es,ks,Ms,Ts,As,Rs,Os,Is,Ns,Ps={exports:{}};function js(){return _s||(_s=1,(e=Ps).exports=function(){var t,n;function r(){return t.apply(null,arguments)}function i(e){t=e}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(o(e,t))return!1;return!0}function u(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function p(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,r=[],i=e.length;for(n=0;n<i;++n)r.push(t(e[n],n));return r}function f(e,t){for(var n in t)o(t,n)&&(e[n]=t[n]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function h(e,t,n,r){return Kn(e,t,n,r,!0).utc()}function m(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(e){return null==e._pf&&(e._pf=m()),e._pf}function b(e){var t=null,r=!1,i=e._d&&!isNaN(e._d.getTime());return i&&(t=g(e),r=n.call(t.parsedDateParts,(function(e){return null!=e})),i=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?i:(e._isValid=i,e._isValid)}function y(e){var t=h(NaN);return null!=e?f(g(t),e):g(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var v=r.momentProperties=[],x=!1;function w(e,t){var n,r,i,a=v.length;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=g(t)),u(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)u(i=t[r=v[n]])||(e[r]=i);return e}function _(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===x&&(x=!0,r.updateOffset(this),x=!1)}function S(e){return e instanceof _||null!=e&&null!=e._isAMomentObject}function E(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function k(e,t){var n=!0;return f((function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var i,a,s,c=[],u=arguments.length;for(a=0;a<u;a++){if(i="","object"==typeof arguments[a]){for(s in i+="\n["+a+"] ",arguments[0])o(arguments[0],s)&&(i+=s+": "+arguments[0][s]+", ");i=i.slice(0,-2)}else i=arguments[a];c.push(i)}E(e+"\nArguments: "+Array.prototype.slice.call(c).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var M,T={};function A(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),T[e]||(E(t),T[e]=!0)}function R(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function O(e){var t,n;for(n in e)o(e,n)&&(R(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function I(e,t){var n,r=f({},e);for(n in t)o(t,n)&&(s(e[n])&&s(t[n])?(r[n]={},f(r[n],e[n]),f(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)o(e,n)&&!o(t,n)&&s(e[n])&&(r[n]=f({},r[n]));return r}function N(e){null!=e&&this.set(e)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,M=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)o(e,t)&&n.push(t);return n};var P={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function j(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return R(r)?r.call(t,n):r}function D(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var L=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,C=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,$={},B={};function z(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(B[e]=i),t&&(B[t[0]]=function(){return D(i.apply(this,arguments),t[1],t[2])}),n&&(B[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function U(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function F(e){var t,n,r=e.match(L);for(t=0,n=r.length;t<n;t++)B[r[t]]?r[t]=B[r[t]]:r[t]=U(r[t]);return function(t){var i,a="";for(i=0;i<n;i++)a+=R(r[i])?r[i].call(t,e):r[i];return a}}function q(e,t){return e.isValid()?(t=H(t,e.localeData()),$[t]=$[t]||F(t),$[t](e)):e.localeData().invalidDate()}function H(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(C.lastIndex=0;n>=0&&C.test(e);)e=e.replace(C,r),C.lastIndex=0,n-=1;return e}var Y={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function V(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(L).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var G="Invalid date";function K(){return this._invalidDate}var W="%d",Z=/\d{1,2}/;function J(e){return this._ordinal.replace("%d",e)}var X={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Q(e,t,n,r){var i=this._relativeTime[n];return R(i)?i(e,t,n,r):i.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return R(n)?n(t):n.replace(/%s/i,t)}var te={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ne(e){return"string"==typeof e?te[e]||te[e.toLowerCase()]:void 0}function re(e){var t,n,r={};for(n in e)o(e,n)&&(t=ne(n))&&(r[t]=e[n]);return r}var ie={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ae(e){var t,n=[];for(t in e)o(e,t)&&n.push({unit:t,priority:ie[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}var se,oe=/\d/,ce=/\d\d/,ue=/\d{3}/,le=/\d{4}/,pe=/[+-]?\d{6}/,de=/\d\d?/,fe=/\d\d\d\d?/,he=/\d\d\d\d\d\d?/,me=/\d{1,3}/,ge=/\d{1,4}/,be=/[+-]?\d{1,6}/,ye=/\d+/,ve=/[+-]?\d+/,xe=/Z|[+-]\d\d:?\d\d/gi,we=/Z|[+-]\d\d(?::?\d\d)?/gi,_e=/[+-]?\d+(\.\d{1,3})?/,Se=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Ee=/^[1-9]\d?/,ke=/^([1-9]\d|\d)/;function Me(e,t,n){se[e]=R(t)?t:function(e,r){return e&&n?n:t}}function Te(e,t){return o(se,e)?se[e](t._strict,t._locale):new RegExp(Ae(e))}function Ae(e){return Re(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i})))}function Re(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Oe(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Ie(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=Oe(t)),n}se={};var Ne={};function Pe(e,t){var n,r,i=t;for("string"==typeof e&&(e=[e]),l(t)&&(i=function(e,n){n[t]=Ie(e)}),r=e.length,n=0;n<r;n++)Ne[e[n]]=i}function je(e,t){Pe(e,(function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)}))}function De(e,t,n){null!=t&&o(Ne,e)&&Ne[e](t,n._a,n,e)}function Le(e){return e%4==0&&e%100!=0||e%400==0}var Ce=0,$e=1,Be=2,ze=3,Ue=4,Fe=5,qe=6,He=7,Ye=8;function Ve(e){return Le(e)?366:365}z("Y",0,0,(function(){var e=this.year();return e<=9999?D(e,4):"+"+e})),z(0,["YY",2],0,(function(){return this.year()%100})),z(0,["YYYY",4],0,"year"),z(0,["YYYYY",5],0,"year"),z(0,["YYYYYY",6,!0],0,"year"),Me("Y",ve),Me("YY",de,ce),Me("YYYY",ge,le),Me("YYYYY",be,pe),Me("YYYYYY",be,pe),Pe(["YYYYY","YYYYYY"],Ce),Pe("YYYY",(function(e,t){t[Ce]=2===e.length?r.parseTwoDigitYear(e):Ie(e)})),Pe("YY",(function(e,t){t[Ce]=r.parseTwoDigitYear(e)})),Pe("Y",(function(e,t){t[Ce]=parseInt(e,10)})),r.parseTwoDigitYear=function(e){return Ie(e)+(Ie(e)>68?1900:2e3)};var Ge,Ke=Ze("FullYear",!0);function We(){return Le(this.year())}function Ze(e,t){return function(n){return null!=n?(Xe(this,e,n),r.updateOffset(this,t),this):Je(this,e)}}function Je(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Xe(e,t,n){var r,i,a,s,o;if(e.isValid()&&!isNaN(n)){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}a=n,s=e.month(),o=29!==(o=e.date())||1!==s||Le(a)?o:28,i?r.setUTCFullYear(a,s,o):r.setFullYear(a,s,o)}}function Qe(e){return R(this[e=ne(e)])?this[e]():this}function et(e,t){if("object"==typeof e){var n,r=ae(e=re(e)),i=r.length;for(n=0;n<i;n++)this[r[n].unit](e[r[n].unit])}else if(R(this[e=ne(e)]))return this[e](t);return this}function tt(e,t){return(e%t+t)%t}function nt(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=tt(t,12);return e+=(t-n)/12,1===n?Le(e)?29:28:31-n%7%2}Ge=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},z("M",["MM",2],"Mo",(function(){return this.month()+1})),z("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),z("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),Me("M",de,Ee),Me("MM",de,ce),Me("MMM",(function(e,t){return t.monthsShortRegex(e)})),Me("MMMM",(function(e,t){return t.monthsRegex(e)})),Pe(["M","MM"],(function(e,t){t[$e]=Ie(e)-1})),Pe(["MMM","MMMM"],(function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[$e]=i:g(n).invalidMonth=e}));var rt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),it="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),at=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,st=Se,ot=Se;function ct(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||at).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone}function ut(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[at.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function lt(e,t,n){var r,i,a,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=h([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Ge.call(this._shortMonthsParse,s))?i:null:-1!==(i=Ge.call(this._longMonthsParse,s))?i:null:"MMM"===t?-1!==(i=Ge.call(this._shortMonthsParse,s))||-1!==(i=Ge.call(this._longMonthsParse,s))?i:null:-1!==(i=Ge.call(this._longMonthsParse,s))||-1!==(i=Ge.call(this._shortMonthsParse,s))?i:null}function pt(e,t,n){var r,i,a;if(this._monthsParseExact)return lt.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function dt(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=Ie(t);else if(!l(t=e.localeData().monthsParse(t)))return e;var n=t,r=e.date();return r=r<29?r:Math.min(r,nt(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function ft(e){return null!=e?(dt(this,e),r.updateOffset(this,!0),this):Je(this,"Month")}function ht(){return nt(this.year(),this.month())}function mt(e){return this._monthsParseExact?(o(this,"_monthsRegex")||bt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=st),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function gt(e){return this._monthsParseExact?(o(this,"_monthsRegex")||bt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=ot),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function bt(){function e(e,t){return t.length-e.length}var t,n,r,i,a=[],s=[],o=[];for(t=0;t<12;t++)n=h([2e3,t]),r=Re(this.monthsShort(n,"")),i=Re(this.months(n,"")),a.push(r),s.push(i),o.push(i),o.push(r);a.sort(e),s.sort(e),o.sort(e),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+a.join("|")+")","i")}function yt(e,t,n,r,i,a,s){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,r,i,a,s),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,a,s),o}function vt(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function xt(e,t,n){var r=7+t-n;return-(7+vt(e,0,r).getUTCDay()-t)%7+r-1}function wt(e,t,n,r,i){var a,s,o=1+7*(t-1)+(7+n-r)%7+xt(e,r,i);return o<=0?s=Ve(a=e-1)+o:o>Ve(e)?(a=e+1,s=o-Ve(e)):(a=e,s=o),{year:a,dayOfYear:s}}function _t(e,t,n){var r,i,a=xt(e.year(),t,n),s=Math.floor((e.dayOfYear()-a-1)/7)+1;return s<1?r=s+St(i=e.year()-1,t,n):s>St(e.year(),t,n)?(r=s-St(e.year(),t,n),i=e.year()+1):(i=e.year(),r=s),{week:r,year:i}}function St(e,t,n){var r=xt(e,t,n),i=xt(e+1,t,n);return(Ve(e)-r+i)/7}function Et(e){return _t(e,this._week.dow,this._week.doy).week}z("w",["ww",2],"wo","week"),z("W",["WW",2],"Wo","isoWeek"),Me("w",de,Ee),Me("ww",de,ce),Me("W",de,Ee),Me("WW",de,ce),je(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=Ie(e)}));var kt={dow:0,doy:6};function Mt(){return this._week.dow}function Tt(){return this._week.doy}function At(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Rt(e){var t=_t(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Ot(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function It(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Nt(e,t){return e.slice(t,7).concat(e.slice(0,t))}z("d",0,"do","day"),z("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),z("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),z("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),z("e",0,0,"weekday"),z("E",0,0,"isoWeekday"),Me("d",de),Me("e",de),Me("E",de),Me("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Me("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Me("dddd",(function(e,t){return t.weekdaysRegex(e)})),je(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e})),je(["d","e","E"],(function(e,t,n,r){t[r]=Ie(e)}));var Pt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),jt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Dt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Lt=Se,Ct=Se,$t=Se;function Bt(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Nt(n,this._week.dow):e?n[e.day()]:n}function zt(e){return!0===e?Nt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ut(e){return!0===e?Nt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ft(e,t,n){var r,i,a,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Ge.call(this._weekdaysParse,s))?i:null:"ddd"===t?-1!==(i=Ge.call(this._shortWeekdaysParse,s))?i:null:-1!==(i=Ge.call(this._minWeekdaysParse,s))?i:null:"dddd"===t?-1!==(i=Ge.call(this._weekdaysParse,s))||-1!==(i=Ge.call(this._shortWeekdaysParse,s))||-1!==(i=Ge.call(this._minWeekdaysParse,s))?i:null:"ddd"===t?-1!==(i=Ge.call(this._shortWeekdaysParse,s))||-1!==(i=Ge.call(this._weekdaysParse,s))||-1!==(i=Ge.call(this._minWeekdaysParse,s))?i:null:-1!==(i=Ge.call(this._minWeekdaysParse,s))||-1!==(i=Ge.call(this._weekdaysParse,s))||-1!==(i=Ge.call(this._shortWeekdaysParse,s))?i:null}function qt(e,t,n){var r,i,a;if(this._weekdaysParseExact)return Ft.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Ht(e){if(!this.isValid())return null!=e?this:NaN;var t=Je(this,"Day");return null!=e?(e=Ot(e,this.localeData()),this.add(e-t,"d")):t}function Yt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Vt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=It(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Gt(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Zt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Lt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Kt(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Zt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ct),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Wt(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Zt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$t),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Zt(){function e(e,t){return t.length-e.length}var t,n,r,i,a,s=[],o=[],c=[],u=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=Re(this.weekdaysMin(n,"")),i=Re(this.weekdaysShort(n,"")),a=Re(this.weekdays(n,"")),s.push(r),o.push(i),c.push(a),u.push(r),u.push(i),u.push(a);s.sort(e),o.sort(e),c.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Jt(){return this.hours()%12||12}function Xt(){return this.hours()||24}function Qt(e,t){z(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function en(e,t){return t._meridiemParse}function tn(e){return"p"===(e+"").toLowerCase().charAt(0)}z("H",["HH",2],0,"hour"),z("h",["hh",2],0,Jt),z("k",["kk",2],0,Xt),z("hmm",0,0,(function(){return""+Jt.apply(this)+D(this.minutes(),2)})),z("hmmss",0,0,(function(){return""+Jt.apply(this)+D(this.minutes(),2)+D(this.seconds(),2)})),z("Hmm",0,0,(function(){return""+this.hours()+D(this.minutes(),2)})),z("Hmmss",0,0,(function(){return""+this.hours()+D(this.minutes(),2)+D(this.seconds(),2)})),Qt("a",!0),Qt("A",!1),Me("a",en),Me("A",en),Me("H",de,ke),Me("h",de,Ee),Me("k",de,Ee),Me("HH",de,ce),Me("hh",de,ce),Me("kk",de,ce),Me("hmm",fe),Me("hmmss",he),Me("Hmm",fe),Me("Hmmss",he),Pe(["H","HH"],ze),Pe(["k","kk"],(function(e,t,n){var r=Ie(e);t[ze]=24===r?0:r})),Pe(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),Pe(["h","hh"],(function(e,t,n){t[ze]=Ie(e),g(n).bigHour=!0})),Pe("hmm",(function(e,t,n){var r=e.length-2;t[ze]=Ie(e.substr(0,r)),t[Ue]=Ie(e.substr(r)),g(n).bigHour=!0})),Pe("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[ze]=Ie(e.substr(0,r)),t[Ue]=Ie(e.substr(r,2)),t[Fe]=Ie(e.substr(i)),g(n).bigHour=!0})),Pe("Hmm",(function(e,t,n){var r=e.length-2;t[ze]=Ie(e.substr(0,r)),t[Ue]=Ie(e.substr(r))})),Pe("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[ze]=Ie(e.substr(0,r)),t[Ue]=Ie(e.substr(r,2)),t[Fe]=Ie(e.substr(i))}));var nn=/[ap]\.?m?\.?/i,rn=Ze("Hours",!0);function an(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var sn,on={calendar:P,longDateFormat:Y,invalidDate:G,ordinal:W,dayOfMonthOrdinalParse:Z,relativeTime:X,months:rt,monthsShort:it,week:kt,weekdays:Pt,weekdaysMin:Dt,weekdaysShort:jt,meridiemParse:nn},cn={},un={};function ln(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function pn(e){return e?e.toLowerCase().replace("_","-"):e}function dn(e){for(var t,n,r,i,a=0;a<e.length;){for(t=(i=pn(e[a]).split("-")).length,n=(n=pn(e[a+1]))?n.split("-"):null;t>0;){if(r=hn(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&ln(i,n)>=t-1)break;t--}a++}return sn}function fn(e){return!(!e||!e.match("^[^/\\\\]*$"))}function hn(t){var n=null;if(void 0===cn[t]&&e&&e.exports&&fn(t))try{n=sn._abbr,ws("./locale/"+t),mn(n)}catch(e){cn[t]=null}return cn[t]}function mn(e,t){var n;return e&&((n=u(t)?yn(e):gn(e,t))?sn=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),sn._abbr}function gn(e,t){if(null!==t){var n,r=on;if(t.abbr=e,null!=cn[e])A("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=cn[e]._config;else if(null!=t.parentLocale)if(null!=cn[t.parentLocale])r=cn[t.parentLocale]._config;else{if(null==(n=hn(t.parentLocale)))return un[t.parentLocale]||(un[t.parentLocale]=[]),un[t.parentLocale].push({name:e,config:t}),null;r=n._config}return cn[e]=new N(I(r,t)),un[e]&&un[e].forEach((function(e){gn(e.name,e.config)})),mn(e),cn[e]}return delete cn[e],null}function bn(e,t){if(null!=t){var n,r,i=on;null!=cn[e]&&null!=cn[e].parentLocale?cn[e].set(I(cn[e]._config,t)):(null!=(r=hn(e))&&(i=r._config),t=I(i,t),null==r&&(t.abbr=e),(n=new N(t)).parentLocale=cn[e],cn[e]=n),mn(e)}else null!=cn[e]&&(null!=cn[e].parentLocale?(cn[e]=cn[e].parentLocale,e===mn()&&mn(e)):null!=cn[e]&&delete cn[e]);return cn[e]}function yn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return sn;if(!a(e)){if(t=hn(e))return t;e=[e]}return dn(e)}function vn(){return M(cn)}function xn(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[$e]<0||n[$e]>11?$e:n[Be]<1||n[Be]>nt(n[Ce],n[$e])?Be:n[ze]<0||n[ze]>24||24===n[ze]&&(0!==n[Ue]||0!==n[Fe]||0!==n[qe])?ze:n[Ue]<0||n[Ue]>59?Ue:n[Fe]<0||n[Fe]>59?Fe:n[qe]<0||n[qe]>999?qe:-1,g(e)._overflowDayOfYear&&(t<Ce||t>Be)&&(t=Be),g(e)._overflowWeeks&&-1===t&&(t=He),g(e)._overflowWeekday&&-1===t&&(t=Ye),g(e).overflow=t),e}var wn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_n=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Sn=/Z|[+-]\d\d(?::?\d\d)?/,En=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],kn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Mn=/^\/?Date\((-?\d+)/i,Tn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,An={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Rn(e){var t,n,r,i,a,s,o=e._i,c=wn.exec(o)||_n.exec(o),u=En.length,l=kn.length;if(c){for(g(e).iso=!0,t=0,n=u;t<n;t++)if(En[t][1].exec(c[1])){i=En[t][0],r=!1!==En[t][2];break}if(null==i)return void(e._isValid=!1);if(c[3]){for(t=0,n=l;t<n;t++)if(kn[t][1].exec(c[3])){a=(c[2]||" ")+kn[t][0];break}if(null==a)return void(e._isValid=!1)}if(!r&&null!=a)return void(e._isValid=!1);if(c[4]){if(!Sn.exec(c[4]))return void(e._isValid=!1);s="Z"}e._f=i+(a||"")+(s||""),Un(e)}else e._isValid=!1}function On(e,t,n,r,i,a){var s=[In(e),it.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&s.push(parseInt(a,10)),s}function In(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Nn(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Pn(e,t,n){return!e||jt.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(g(n).weekdayMismatch=!0,n._isValid=!1,!1)}function jn(e,t,n){if(e)return An[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}function Dn(e){var t,n=Tn.exec(Nn(e._i));if(n){if(t=On(n[4],n[3],n[2],n[5],n[6],n[7]),!Pn(n[1],t,e))return;e._a=t,e._tzm=jn(n[8],n[9],n[10]),e._d=vt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function Ln(e){var t=Mn.exec(e._i);null===t?(Rn(e),!1===e._isValid&&(delete e._isValid,Dn(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Cn(e,t,n){return null!=e?e:null!=t?t:n}function $n(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Bn(e){var t,n,r,i,a,s=[];if(!e._d){for(r=$n(e),e._w&&null==e._a[Be]&&null==e._a[$e]&&zn(e),null!=e._dayOfYear&&(a=Cn(e._a[Ce],r[Ce]),(e._dayOfYear>Ve(a)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=vt(a,0,e._dayOfYear),e._a[$e]=n.getUTCMonth(),e._a[Be]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ze]&&0===e._a[Ue]&&0===e._a[Fe]&&0===e._a[qe]&&(e._nextDay=!0,e._a[ze]=0),e._d=(e._useUTC?vt:yt).apply(null,s),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ze]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}function zn(e){var t,n,r,i,a,s,o,c,u;null!=(t=e._w).GG||null!=t.W||null!=t.E?(a=1,s=4,n=Cn(t.GG,e._a[Ce],_t(Wn(),1,4).year),r=Cn(t.W,1),((i=Cn(t.E,1))<1||i>7)&&(c=!0)):(a=e._locale._week.dow,s=e._locale._week.doy,u=_t(Wn(),a,s),n=Cn(t.gg,e._a[Ce],u.year),r=Cn(t.w,u.week),null!=t.d?((i=t.d)<0||i>6)&&(c=!0):null!=t.e?(i=t.e+a,(t.e<0||t.e>6)&&(c=!0)):i=a),r<1||r>St(n,a,s)?g(e)._overflowWeeks=!0:null!=c?g(e)._overflowWeekday=!0:(o=wt(n,r,i,a,s),e._a[Ce]=o.year,e._dayOfYear=o.dayOfYear)}function Un(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],g(e).empty=!0;var t,n,i,a,s,o,c,u=""+e._i,l=u.length,p=0;for(c=(i=H(e._f,e._locale).match(L)||[]).length,t=0;t<c;t++)a=i[t],(n=(u.match(Te(a,e))||[])[0])&&((s=u.substr(0,u.indexOf(n))).length>0&&g(e).unusedInput.push(s),u=u.slice(u.indexOf(n)+n.length),p+=n.length),B[a]?(n?g(e).empty=!1:g(e).unusedTokens.push(a),De(a,n,e)):e._strict&&!n&&g(e).unusedTokens.push(a);g(e).charsLeftOver=l-p,u.length>0&&g(e).unusedInput.push(u),e._a[ze]<=12&&!0===g(e).bigHour&&e._a[ze]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[ze]=Fn(e._locale,e._a[ze],e._meridiem),null!==(o=g(e).era)&&(e._a[Ce]=e._locale.erasConvertYear(o,e._a[Ce])),Bn(e),xn(e)}else Dn(e);else Rn(e)}function Fn(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function qn(e){var t,n,r,i,a,s,o=!1,c=e._f.length;if(0===c)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<c;i++)a=0,s=!1,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Un(t),b(t)&&(s=!0),a+=g(t).charsLeftOver,a+=10*g(t).unusedTokens.length,g(t).score=a,o?a<r&&(r=a,n=t):(null==r||a<r||s)&&(r=a,n=t,s&&(o=!0));f(e,n||t)}function Hn(e){if(!e._d){var t=re(e._i),n=void 0===t.day?t.date:t.day;e._a=d([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Bn(e)}}function Yn(e){var t=new _(xn(Vn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Vn(e){var t=e._i,n=e._f;return e._locale=e._locale||yn(e._l),null===t||void 0===n&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),S(t)?new _(xn(t)):(p(t)?e._d=t:a(n)?qn(e):n?Un(e):Gn(e),b(e)||(e._d=null),e))}function Gn(e){var t=e._i;u(t)?e._d=new Date(r.now()):p(t)?e._d=new Date(t.valueOf()):"string"==typeof t?Ln(e):a(t)?(e._a=d(t.slice(0),(function(e){return parseInt(e,10)})),Bn(e)):s(t)?Hn(e):l(t)?e._d=new Date(t):r.createFromInputFallback(e)}function Kn(e,t,n,r,i){var o={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(s(e)&&c(e)||a(e)&&0===e.length)&&(e=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=i,o._l=n,o._i=e,o._f=t,o._strict=r,Yn(o)}function Wn(e,t,n,r){return Kn(e,t,n,r,!1)}r.createFromInputFallback=k("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),r.ISO_8601=function(){},r.RFC_2822=function(){};var Zn=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Wn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()})),Jn=k("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Wn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()}));function Xn(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Wn();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}function Qn(){return Xn("isBefore",[].slice.call(arguments,0))}function er(){return Xn("isAfter",[].slice.call(arguments,0))}var tr=function(){return Date.now?Date.now():+new Date},nr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function rr(e){var t,n,r=!1,i=nr.length;for(t in e)if(o(e,t)&&(-1===Ge.call(nr,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[nr[n]]){if(r)return!1;parseFloat(e[nr[n]])!==Ie(e[nr[n]])&&(r=!0)}return!0}function ir(){return this._isValid}function ar(){return Ar(NaN)}function sr(e){var t=re(e),n=t.year||0,r=t.quarter||0,i=t.month||0,a=t.week||t.isoWeek||0,s=t.day||0,o=t.hour||0,c=t.minute||0,u=t.second||0,l=t.millisecond||0;this._isValid=rr(t),this._milliseconds=+l+1e3*u+6e4*c+1e3*o*60*60,this._days=+s+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=yn(),this._bubble()}function or(e){return e instanceof sr}function cr(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function ur(e,t,n){var r,i=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),s=0;for(r=0;r<i;r++)Ie(e[r])!==Ie(t[r])&&s++;return s+a}function lr(e,t){z(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+D(~~(e/60),2)+t+D(~~e%60,2)}))}lr("Z",":"),lr("ZZ",""),Me("Z",we),Me("ZZ",we),Pe(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=dr(we,e)}));var pr=/([\+\-]|\d\d)/gi;function dr(e,t){var n,r,i=(t||"").match(e);return null===i?null:0===(r=60*(n=((i[i.length-1]||[])+"").match(pr)||["-",0,0])[1]+Ie(n[2]))?0:"+"===n[0]?r:-r}function fr(e,t){var n,i;return t._isUTC?(n=t.clone(),i=(S(e)||p(e)?e.valueOf():Wn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):Wn(e).local()}function hr(e){return-Math.round(e._d.getTimezoneOffset())}function mr(e,t,n){var i,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=dr(we,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=hr(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),a!==e&&(!t||this._changeInProgress?Pr(this,Ar(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:hr(this)}function gr(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function br(e){return this.utcOffset(0,e)}function yr(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(hr(this),"m")),this}function vr(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=dr(xe,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function xr(e){return!!this.isValid()&&(e=e?Wn(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function wr(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function _r(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=Vn(t))._a?(e=t._isUTC?h(t._a):Wn(t._a),this._isDSTShifted=this.isValid()&&ur(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Sr(){return!!this.isValid()&&!this._isUTC}function Er(){return!!this.isValid()&&this._isUTC}function kr(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Mr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Tr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ar(e,t){var n,r,i,a=e,s=null;return or(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:l(e)||!isNaN(+e)?(a={},t?a[t]=+e:a.milliseconds=+e):(s=Mr.exec(e))?(n="-"===s[1]?-1:1,a={y:0,d:Ie(s[Be])*n,h:Ie(s[ze])*n,m:Ie(s[Ue])*n,s:Ie(s[Fe])*n,ms:Ie(cr(1e3*s[qe]))*n}):(s=Tr.exec(e))?(n="-"===s[1]?-1:1,a={y:Rr(s[2],n),M:Rr(s[3],n),w:Rr(s[4],n),d:Rr(s[5],n),h:Rr(s[6],n),m:Rr(s[7],n),s:Rr(s[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=Ir(Wn(a.from),Wn(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new sr(a),or(e)&&o(e,"_locale")&&(r._locale=e._locale),or(e)&&o(e,"_isValid")&&(r._isValid=e._isValid),r}function Rr(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Or(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Ir(e,t){var n;return e.isValid()&&t.isValid()?(t=fr(t,e),e.isBefore(t)?n=Or(e,t):((n=Or(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Nr(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(A(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Pr(this,Ar(n,r),e),this}}function Pr(e,t,n,i){var a=t._milliseconds,s=cr(t._days),o=cr(t._months);e.isValid()&&(i=null==i||i,o&&dt(e,Je(e,"Month")+o*n),s&&Xe(e,"Date",Je(e,"Date")+s*n),a&&e._d.setTime(e._d.valueOf()+a*n),i&&r.updateOffset(e,s||o))}Ar.fn=sr.prototype,Ar.invalid=ar;var jr=Nr(1,"add"),Dr=Nr(-1,"subtract");function Lr(e){return"string"==typeof e||e instanceof String}function Cr(e){return S(e)||p(e)||Lr(e)||l(e)||Br(e)||$r(e)||null==e}function $r(e){var t,n,r=s(e)&&!c(e),i=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],u=a.length;for(t=0;t<u;t+=1)n=a[t],i=i||o(e,n);return r&&i}function Br(e){var t=a(e),n=!1;return t&&(n=0===e.filter((function(t){return!l(t)&&Lr(e)})).length),t&&n}function zr(e){var t,n,r=s(e)&&!c(e),i=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<a.length;t+=1)n=a[t],i=i||o(e,n);return r&&i}function Ur(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Fr(e,t){1===arguments.length&&(arguments[0]?Cr(arguments[0])?(e=arguments[0],t=void 0):zr(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Wn(),i=fr(n,this).startOf("day"),a=r.calendarFormat(this,i)||"sameElse",s=t&&(R(t[a])?t[a].call(this,n):t[a]);return this.format(s||this.localeData().calendar(a,this,Wn(n)))}function qr(){return new _(this)}function Hr(e,t){var n=S(e)?e:Wn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Yr(e,t){var n=S(e)?e:Wn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Vr(e,t,n,r){var i=S(e)?e:Wn(e),a=S(t)?t:Wn(t);return!!(this.isValid()&&i.isValid()&&a.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n))}function Gr(e,t){var n,r=S(e)?e:Wn(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function Kr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Wr(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Zr(e,t,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=fr(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=ne(t)){case"year":a=Jr(this,r)/12;break;case"month":a=Jr(this,r);break;case"quarter":a=Jr(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:Oe(a)}function Jr(e,t){if(e.date()<t.date())return-Jr(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Xr(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Qr(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?q(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):R(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",q(n,"Z")):q(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ei(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,i="moment",a="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=a+'[")]',this.format(e+t+n+r)}function ti(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=q(this,e);return this.localeData().postformat(t)}function ni(e,t){return this.isValid()&&(S(e)&&e.isValid()||Wn(e).isValid())?Ar({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ri(e){return this.from(Wn(),e)}function ii(e,t){return this.isValid()&&(S(e)&&e.isValid()||Wn(e).isValid())?Ar({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ai(e){return this.to(Wn(),e)}function si(e){var t;return void 0===e?this._locale._abbr:(null!=(t=yn(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var oi=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function ci(){return this._locale}var ui=1e3,li=60*ui,pi=60*li,di=3506328*pi;function fi(e,t){return(e%t+t)%t}function hi(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-di:new Date(e,t,n).valueOf()}function mi(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-di:Date.UTC(e,t,n)}function gi(e){var t,n;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?mi:hi,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=fi(t+(this._isUTC?0:this.utcOffset()*li),pi);break;case"minute":t=this._d.valueOf(),t-=fi(t,li);break;case"second":t=this._d.valueOf(),t-=fi(t,ui)}return this._d.setTime(t),r.updateOffset(this,!0),this}function bi(e){var t,n;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?mi:hi,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=pi-fi(t+(this._isUTC?0:this.utcOffset()*li),pi)-1;break;case"minute":t=this._d.valueOf(),t+=li-fi(t,li)-1;break;case"second":t=this._d.valueOf(),t+=ui-fi(t,ui)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function yi(){return this._d.valueOf()-6e4*(this._offset||0)}function vi(){return Math.floor(this.valueOf()/1e3)}function xi(){return new Date(this.valueOf())}function wi(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function _i(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Si(){return this.isValid()?this.toISOString():null}function Ei(){return b(this)}function ki(){return f({},g(this))}function Mi(){return g(this).overflow}function Ti(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ai(e,t){var n,i,a,s=this._eras||yn("en")._eras;for(n=0,i=s.length;n<i;++n)switch("string"==typeof s[n].since&&(a=r(s[n].since).startOf("day"),s[n].since=a.valueOf()),typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":a=r(s[n].until).startOf("day").valueOf(),s[n].until=a.valueOf()}return s}function Ri(e,t,n){var r,i,a,s,o,c=this.eras();for(e=e.toUpperCase(),r=0,i=c.length;r<i;++r)if(a=c[r].name.toUpperCase(),s=c[r].abbr.toUpperCase(),o=c[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(s===e)return c[r];break;case"NNNN":if(a===e)return c[r];break;case"NNNNN":if(o===e)return c[r]}else if([a,s,o].indexOf(e)>=0)return c[r]}function Oi(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function Ii(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""}function Ni(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""}function Pi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""}function ji(){var e,t,n,i,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=a[e].since<=a[e].until?1:-1,i=this.clone().startOf("day").valueOf(),a[e].since<=i&&i<=a[e].until||a[e].until<=i&&i<=a[e].since)return(this.year()-r(a[e].since).year())*n+a[e].offset;return this.year()}function Di(e){return o(this,"_erasNameRegex")||Fi.call(this),e?this._erasNameRegex:this._erasRegex}function Li(e){return o(this,"_erasAbbrRegex")||Fi.call(this),e?this._erasAbbrRegex:this._erasRegex}function Ci(e){return o(this,"_erasNarrowRegex")||Fi.call(this),e?this._erasNarrowRegex:this._erasRegex}function $i(e,t){return t.erasAbbrRegex(e)}function Bi(e,t){return t.erasNameRegex(e)}function zi(e,t){return t.erasNarrowRegex(e)}function Ui(e,t){return t._eraYearOrdinalRegex||ye}function Fi(){var e,t,n,r,i,a=[],s=[],o=[],c=[],u=this.eras();for(e=0,t=u.length;e<t;++e)n=Re(u[e].name),r=Re(u[e].abbr),i=Re(u[e].narrow),s.push(n),a.push(r),o.push(i),c.push(n),c.push(r),c.push(i);this._erasRegex=new RegExp("^("+c.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+s.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function qi(e,t){z(0,[e,e.length],0,t)}function Hi(e){return Zi.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Yi(e){return Zi.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Vi(){return St(this.year(),1,4)}function Gi(){return St(this.isoWeekYear(),1,4)}function Ki(){var e=this.localeData()._week;return St(this.year(),e.dow,e.doy)}function Wi(){var e=this.localeData()._week;return St(this.weekYear(),e.dow,e.doy)}function Zi(e,t,n,r,i){var a;return null==e?_t(this,r,i).year:(t>(a=St(e,r,i))&&(t=a),Ji.call(this,e,t,n,r,i))}function Ji(e,t,n,r,i){var a=wt(e,t,n,r,i),s=vt(a.year,0,a.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function Xi(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}z("N",0,0,"eraAbbr"),z("NN",0,0,"eraAbbr"),z("NNN",0,0,"eraAbbr"),z("NNNN",0,0,"eraName"),z("NNNNN",0,0,"eraNarrow"),z("y",["y",1],"yo","eraYear"),z("y",["yy",2],0,"eraYear"),z("y",["yyy",3],0,"eraYear"),z("y",["yyyy",4],0,"eraYear"),Me("N",$i),Me("NN",$i),Me("NNN",$i),Me("NNNN",Bi),Me("NNNNN",zi),Pe(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?g(n).era=i:g(n).invalidEra=e})),Me("y",ye),Me("yy",ye),Me("yyy",ye),Me("yyyy",ye),Me("yo",Ui),Pe(["y","yy","yyy","yyyy"],Ce),Pe(["yo"],(function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ce]=n._locale.eraYearOrdinalParse(e,i):t[Ce]=parseInt(e,10)})),z(0,["gg",2],0,(function(){return this.weekYear()%100})),z(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),qi("gggg","weekYear"),qi("ggggg","weekYear"),qi("GGGG","isoWeekYear"),qi("GGGGG","isoWeekYear"),Me("G",ve),Me("g",ve),Me("GG",de,ce),Me("gg",de,ce),Me("GGGG",ge,le),Me("gggg",ge,le),Me("GGGGG",be,pe),Me("ggggg",be,pe),je(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=Ie(e)})),je(["gg","GG"],(function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)})),z("Q",0,"Qo","quarter"),Me("Q",oe),Pe("Q",(function(e,t){t[$e]=3*(Ie(e)-1)})),z("D",["DD",2],"Do","date"),Me("D",de,Ee),Me("DD",de,ce),Me("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Pe(["D","DD"],Be),Pe("Do",(function(e,t){t[Be]=Ie(e.match(de)[0])}));var Qi=Ze("Date",!0);function ea(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}z("DDD",["DDDD",3],"DDDo","dayOfYear"),Me("DDD",me),Me("DDDD",ue),Pe(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=Ie(e)})),z("m",["mm",2],0,"minute"),Me("m",de,ke),Me("mm",de,ce),Pe(["m","mm"],Ue);var ta=Ze("Minutes",!1);z("s",["ss",2],0,"second"),Me("s",de,ke),Me("ss",de,ce),Pe(["s","ss"],Fe);var na,ra,ia=Ze("Seconds",!1);for(z("S",0,0,(function(){return~~(this.millisecond()/100)})),z(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),z(0,["SSS",3],0,"millisecond"),z(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),z(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),z(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),z(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),z(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),z(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),Me("S",me,oe),Me("SS",me,ce),Me("SSS",me,ue),na="SSSS";na.length<=9;na+="S")Me(na,ye);function aa(e,t){t[qe]=Ie(1e3*("0."+e))}for(na="S";na.length<=9;na+="S")Pe(na,aa);function sa(){return this._isUTC?"UTC":""}function oa(){return this._isUTC?"Coordinated Universal Time":""}ra=Ze("Milliseconds",!1),z("z",0,0,"zoneAbbr"),z("zz",0,0,"zoneName");var ca=_.prototype;function ua(e){return Wn(1e3*e)}function la(){return Wn.apply(null,arguments).parseZone()}function pa(e){return e}ca.add=jr,ca.calendar=Fr,ca.clone=qr,ca.diff=Zr,ca.endOf=bi,ca.format=ti,ca.from=ni,ca.fromNow=ri,ca.to=ii,ca.toNow=ai,ca.get=Qe,ca.invalidAt=Mi,ca.isAfter=Hr,ca.isBefore=Yr,ca.isBetween=Vr,ca.isSame=Gr,ca.isSameOrAfter=Kr,ca.isSameOrBefore=Wr,ca.isValid=Ei,ca.lang=oi,ca.locale=si,ca.localeData=ci,ca.max=Jn,ca.min=Zn,ca.parsingFlags=ki,ca.set=et,ca.startOf=gi,ca.subtract=Dr,ca.toArray=wi,ca.toObject=_i,ca.toDate=xi,ca.toISOString=Qr,ca.inspect=ei,"undefined"!=typeof Symbol&&null!=Symbol.for&&(ca[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ca.toJSON=Si,ca.toString=Xr,ca.unix=vi,ca.valueOf=yi,ca.creationData=Ti,ca.eraName=Ii,ca.eraNarrow=Ni,ca.eraAbbr=Pi,ca.eraYear=ji,ca.year=Ke,ca.isLeapYear=We,ca.weekYear=Hi,ca.isoWeekYear=Yi,ca.quarter=ca.quarters=Xi,ca.month=ft,ca.daysInMonth=ht,ca.week=ca.weeks=At,ca.isoWeek=ca.isoWeeks=Rt,ca.weeksInYear=Ki,ca.weeksInWeekYear=Wi,ca.isoWeeksInYear=Vi,ca.isoWeeksInISOWeekYear=Gi,ca.date=Qi,ca.day=ca.days=Ht,ca.weekday=Yt,ca.isoWeekday=Vt,ca.dayOfYear=ea,ca.hour=ca.hours=rn,ca.minute=ca.minutes=ta,ca.second=ca.seconds=ia,ca.millisecond=ca.milliseconds=ra,ca.utcOffset=mr,ca.utc=br,ca.local=yr,ca.parseZone=vr,ca.hasAlignedHourOffset=xr,ca.isDST=wr,ca.isLocal=Sr,ca.isUtcOffset=Er,ca.isUtc=kr,ca.isUTC=kr,ca.zoneAbbr=sa,ca.zoneName=oa,ca.dates=k("dates accessor is deprecated. Use date instead.",Qi),ca.months=k("months accessor is deprecated. Use month instead",ft),ca.years=k("years accessor is deprecated. Use year instead",Ke),ca.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gr),ca.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",_r);var da=N.prototype;function fa(e,t,n,r){var i=yn(),a=h().set(r,t);return i[n](a,e)}function ha(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return fa(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=fa(e,r,n,"month");return i}function ma(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var i,a=yn(),s=e?a._week.dow:0,o=[];if(null!=n)return fa(t,(n+s)%7,r,"day");for(i=0;i<7;i++)o[i]=fa(t,(i+s)%7,r,"day");return o}function ga(e,t){return ha(e,t,"months")}function ba(e,t){return ha(e,t,"monthsShort")}function ya(e,t,n){return ma(e,t,n,"weekdays")}function va(e,t,n){return ma(e,t,n,"weekdaysShort")}function xa(e,t,n){return ma(e,t,n,"weekdaysMin")}da.calendar=j,da.longDateFormat=V,da.invalidDate=K,da.ordinal=J,da.preparse=pa,da.postformat=pa,da.relativeTime=Q,da.pastFuture=ee,da.set=O,da.eras=Ai,da.erasParse=Ri,da.erasConvertYear=Oi,da.erasAbbrRegex=Li,da.erasNameRegex=Di,da.erasNarrowRegex=Ci,da.months=ct,da.monthsShort=ut,da.monthsParse=pt,da.monthsRegex=gt,da.monthsShortRegex=mt,da.week=Et,da.firstDayOfYear=Tt,da.firstDayOfWeek=Mt,da.weekdays=Bt,da.weekdaysMin=Ut,da.weekdaysShort=zt,da.weekdaysParse=qt,da.weekdaysRegex=Gt,da.weekdaysShortRegex=Kt,da.weekdaysMinRegex=Wt,da.isPM=tn,da.meridiem=an,mn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===Ie(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=k("moment.lang is deprecated. Use moment.locale instead.",mn),r.langData=k("moment.langData is deprecated. Use moment.localeData instead.",yn);var wa=Math.abs;function _a(){var e=this._data;return this._milliseconds=wa(this._milliseconds),this._days=wa(this._days),this._months=wa(this._months),e.milliseconds=wa(e.milliseconds),e.seconds=wa(e.seconds),e.minutes=wa(e.minutes),e.hours=wa(e.hours),e.months=wa(e.months),e.years=wa(e.years),this}function Sa(e,t,n,r){var i=Ar(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Ea(e,t){return Sa(this,e,t,1)}function ka(e,t){return Sa(this,e,t,-1)}function Ma(e){return e<0?Math.floor(e):Math.ceil(e)}function Ta(){var e,t,n,r,i,a=this._milliseconds,s=this._days,o=this._months,c=this._data;return a>=0&&s>=0&&o>=0||a<=0&&s<=0&&o<=0||(a+=864e5*Ma(Ra(o)+s),s=0,o=0),c.milliseconds=a%1e3,e=Oe(a/1e3),c.seconds=e%60,t=Oe(e/60),c.minutes=t%60,n=Oe(t/60),c.hours=n%24,s+=Oe(n/24),o+=i=Oe(Aa(s)),s-=Ma(Ra(i)),r=Oe(o/12),o%=12,c.days=s,c.months=o,c.years=r,this}function Aa(e){return 4800*e/146097}function Ra(e){return 146097*e/4800}function Oa(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=ne(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Aa(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Ra(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function Ia(e){return function(){return this.as(e)}}var Na=Ia("ms"),Pa=Ia("s"),ja=Ia("m"),Da=Ia("h"),La=Ia("d"),Ca=Ia("w"),$a=Ia("M"),Ba=Ia("Q"),za=Ia("y"),Ua=Na;function Fa(){return Ar(this)}function qa(e){return e=ne(e),this.isValid()?this[e+"s"]():NaN}function Ha(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ya=Ha("milliseconds"),Va=Ha("seconds"),Ga=Ha("minutes"),Ka=Ha("hours"),Wa=Ha("days"),Za=Ha("months"),Ja=Ha("years");function Xa(){return Oe(this.days()/7)}var Qa=Math.round,es={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ts(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function ns(e,t,n,r){var i=Ar(e).abs(),a=Qa(i.as("s")),s=Qa(i.as("m")),o=Qa(i.as("h")),c=Qa(i.as("d")),u=Qa(i.as("M")),l=Qa(i.as("w")),p=Qa(i.as("y")),d=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||s<=1&&["m"]||s<n.m&&["mm",s]||o<=1&&["h"]||o<n.h&&["hh",o]||c<=1&&["d"]||c<n.d&&["dd",c];return null!=n.w&&(d=d||l<=1&&["w"]||l<n.w&&["ww",l]),(d=d||u<=1&&["M"]||u<n.M&&["MM",u]||p<=1&&["y"]||["yy",p])[2]=t,d[3]=+e>0,d[4]=r,ts.apply(null,d)}function rs(e){return void 0===e?Qa:"function"==typeof e&&(Qa=e,!0)}function is(e,t){return void 0!==es[e]&&(void 0===t?es[e]:(es[e]=t,"s"===e&&(es.ss=t-1),!0))}function as(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,a=es;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(a=Object.assign({},es,t),null!=t.s&&null==t.ss&&(a.ss=t.s-1)),r=ns(this,!i,a,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)}var ss=Math.abs;function os(e){return(e>0)-(e<0)||+e}function cs(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,a,s,o,c=ss(this._milliseconds)/1e3,u=ss(this._days),l=ss(this._months),p=this.asSeconds();return p?(e=Oe(c/60),t=Oe(e/60),c%=60,e%=60,n=Oe(l/12),l%=12,r=c?c.toFixed(3).replace(/\.?0+$/,""):"",i=p<0?"-":"",a=os(this._months)!==os(p)?"-":"",s=os(this._days)!==os(p)?"-":"",o=os(this._milliseconds)!==os(p)?"-":"",i+"P"+(n?a+n+"Y":"")+(l?a+l+"M":"")+(u?s+u+"D":"")+(t||e||c?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(c?o+r+"S":"")):"P0D"}var us=sr.prototype;return us.isValid=ir,us.abs=_a,us.add=Ea,us.subtract=ka,us.as=Oa,us.asMilliseconds=Na,us.asSeconds=Pa,us.asMinutes=ja,us.asHours=Da,us.asDays=La,us.asWeeks=Ca,us.asMonths=$a,us.asQuarters=Ba,us.asYears=za,us.valueOf=Ua,us._bubble=Ta,us.clone=Fa,us.get=qa,us.milliseconds=Ya,us.seconds=Va,us.minutes=Ga,us.hours=Ka,us.days=Wa,us.weeks=Xa,us.months=Za,us.years=Ja,us.humanize=as,us.toISOString=cs,us.toString=cs,us.toJSON=cs,us.locale=si,us.localeData=ci,us.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",cs),us.lang=oi,z("X",0,0,"unix"),z("x",0,0,"valueOf"),Me("x",ve),Me("X",_e),Pe("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),Pe("x",(function(e,t,n){n._d=new Date(Ie(e))})),
3
+ //! moment.js
4
+ r.version="2.30.1",i(Wn),r.fn=ca,r.min=Qn,r.max=er,r.now=tr,r.utc=h,r.unix=ua,r.months=ga,r.isDate=p,r.locale=mn,r.invalid=y,r.duration=Ar,r.isMoment=S,r.weekdays=ya,r.parseZone=la,r.localeData=yn,r.isDuration=or,r.monthsShort=ba,r.weekdaysMin=xa,r.defineLocale=gn,r.updateLocale=bn,r.locales=vn,r.weekdaysShort=va,r.normalizeUnits=ne,r.relativeTimeRounding=rs,r.relativeTimeThreshold=is,r.calendarFormat=Ur,r.prototype=ca,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()),Ps.exports;var e}function Ds(){if(Es)return Ss;Es=1;
5
+ /*!
6
+ * FileStreamRotator
7
+ * Copyright(c) 2012-2017 Holiday Extras.
8
+ * Copyright(c) 2017 Roger C.
9
+ * MIT Licensed
10
+ */
11
+ var e=n,t=a,r=js(),i=w,o=d,c={};Ss=c;var u=["daily","test","m","h","custom"],l="YYYYMMDDHHmm";function p(t,n){if(t.hash===i.createHash(t.hashType).update(t.name+"LOG_FILE"+t.date).digest("hex"))try{e.existsSync(t.name)&&e.unlinkSync(t.name)}catch(e){n&&console.error(new Date,"[FileStreamRotator] Could not remove old log file: ",t.name)}}c.getFrequency=function(e){var t=e.toLowerCase().match(/^(\d+)([mh])$/);if(t)return function(e,t){if("number"==typeof t){switch(e){case"m":if(t<0||t>60)return!1;break;case"h":if(t<0||t>24)return!1}return{type:e,digit:t}}}(t[2],parseInt(t[1]));var n=function(e){switch(e){case"custom":case"daily":return{type:e,digit:void 0};case"test":return{type:e,digit:0}}return!1}(e);return n||!1},c.parseFileSize=function(e){if(e&&"string"==typeof e){var t=e.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/);if(t)switch(t[2]){case"k":return 1024*t[1];case"m":return 1024*t[1]*1024;case"g":return 1024*t[1]*1024*1024}}return null},c.getDate=function(e,t,n){t=t||l;let i=n?r.utc():r().local();if(e&&-1!==u.indexOf(e.type))switch(e.type){case"m":var a=Math.floor(i.minutes()/e.digit)*e.digit;return i.minutes(a).format(t);case"h":var s=Math.floor(i.hour()/e.digit)*e.digit;return i.hour(s).format(t);case"daily":case"custom":case"test":return i.format(t)}return i.format(t)},c.setAuditLog=function(n,r,i){var a=null;if(n){var s=n.toString().substr(-1),o=n.toString().match(/^(\d+)/);if(Number(o[1])>0){var c=t.dirname(i.replace(/%DATE%.+/,"_filename"));try{if(r){var u=t.resolve(r);a=JSON.parse(e.readFileSync(u,{encoding:"utf-8"}))}else{u=t.resolve(c+"/.audit.json");a=JSON.parse(e.readFileSync(u,{encoding:"utf-8"}))}}catch(e){if("ENOENT"!==e.code)return null;a={keep:{days:!1,amount:Number(o[1])},auditLog:r||c+"/.audit.json",files:[]}}a.keep={days:"d"===s,amount:Number(o[1])}}}return a},c.writeAuditLog=function(t,n){try{f(t.auditLog),e.writeFileSync(t.auditLog,JSON.stringify(t,null,4))}catch(e){n&&console.error(new Date,"[FileStreamRotator] Failed to store log audit at:",t.auditLog,"Error:",e)}},c.addLogToAudit=function(e,t,n,a){if(t&&t.files){var s=t.files.findIndex((function(t){return t.name===e}));if(-1!==s)return t;var o=Date.now();if(t.files.push({date:o,name:e,hash:i.createHash(t.hashType).update(e+"LOG_FILE"+o).digest("hex")}),t.keep.days){var u=r().subtract(t.keep.amount,"days").valueOf(),l=t.files.filter((function(e){return e.date>u||(e.hashType=t.hashType,p(e,a),n.emit("logRemoved",e),!1)}));t.files=l}else{var d=t.files.splice(-t.keep.amount);t.files.length>0&&t.files.filter((function(e){return e.hashType=t.hashType,p(e,a),n.emit("logRemoved",e),!1})),t.files=d}c.writeAuditLog(t,a)}return t},c.getStream=function(n){var i=null,a=null,p=this;if(!n.filename)return console.error(new Date,"[FileStreamRotator] No filename supplied. Defaulting to STDOUT"),process.stdout;n.frequency&&(i=p.getFrequency(n.frequency));let d=p.setAuditLog(n.max_logs,n.audit_file,n.filename);null!=d&&(d.hashType=void 0!==n.audit_hash_type?n.audit_hash_type:"md5"),p.verbose=void 0===n.verbose||n.verbose;var m=null,g=0,b=0;n.size&&(m=c.parseFileSize(n.size));var y=n.date_format||l;i&&"daily"==i.type&&(n.date_format||(y="YYYY-MM-DD"),r().format(y)==r().endOf("day").format(y)&&r().format(y)!=r().add(1,"day").format(y)||(p.verbose&&console.log(new Date,"[FileStreamRotator] Changing type to custom as date format changes more often than once a day or not every day"),i.type="custom")),i&&(a=n.frequency?p.getDate(i,y,n.utc):""),n.create_symlink=n.create_symlink||!1,n.extension=n.extension||"";var v=n.filename,x=null,w=v+(a?"."+a:"");if(v.match(/%DATE%/)&&(w=v.replace(/%DATE%/g,a||p.getDate(null,y,n.utc))),m){var _=null,S=w;if(d&&d.files&&d.files instanceof Array&&d.files.length>0){var E=d.files[d.files.length-1].name;if(E.match(S)){var k=E.match(S+"\\.(\\d+)");k&&(S=E,g=k[1])}}for(0==g&&S==w&&(S+=n.extension);e.existsSync(S);)_=S,g++,S=w+"."+g+n.extension;if(_){var M=e.statSync(_);M.size<m&&(S=_,g--,b=M.size)}w=S}else w+=n.extension;p.verbose&&console.log(new Date,"[FileStreamRotator] Logging to: ",w),f(w);var T=n.file_options||{flags:"a"},A=e.createWriteStream(w,T);if(a&&i&&u.indexOf(i.type)>-1||m>0){p.verbose&&console.log(new Date,"[FileStreamRotator] Rotating file: ",i?i.type:"",m?"size: "+m:"");var R,O=new o;return O.auditLog=d,O.end=function(){A.end.apply(A,arguments)},h(A,O),O.on("close",(function(){R&&R.close()})),O.on("new",(function(r){O.auditLog=p.addLogToAudit(r,O.auditLog,O,p.verbose),n.create_symlink&&function(n,r,i){let a=r||"current.log",s=t.dirname(n),o=t.basename(n),c=s+"/"+a;try{e.lstatSync(c).isSymbolicLink()&&(e.unlinkSync(c),e.symlinkSync(o,c))}catch(t){if(t&&"ENOENT"==t.code)try{e.symlinkSync(o,c)}catch(e){i&&console.error(new Date,"[FileStreamRotator] Could not create symlink file: ",c," -> ",o)}}}(r,n.symlink_name,p.verbose),n.watch_log&&O.emit("addWatcher",r)})),O.on("addWatcher",(function(t){R&&R.close(),n.watch_log&&(R=function(t,n,r){if(!t)return null;try{return e.lstatSync(t),e.watch(t,(function(n,i){if("rename"==n)try{e.lstatSync(t)}catch(e){r(e,t)}}))}catch(e){n&&console.log(new Date,"[FileStreamRotator] Could not add watcher for "+t)}}(t,p.verbose,(function(e,t){O.emit("createLog",t)})))})),O.on("createLog",(function(t){try{e.lstatSync(t)}catch(n){A&&"function"==A.end&&A.end(),A=e.createWriteStream(t,T),O.emit("new",t),h(A,O)}})),O.write=function(t,r){var o=i?this.getDate(i,y,n.utc):a;if(o!=a||m&&b>m){var c=v+(a&&i?"."+o:"");v.match(/%DATE%/)&&a&&(c=v.replace(/%DATE%/g,o)),m&&b>m?c+="."+ ++g+n.extension:(g=0,c+=n.extension),b=0,p.verbose&&console.log(new Date,s.format("[FileStreamRotator] Changing logs from %s to %s",w,c)),a=o,x=w,w=c,!0===n.end_stream?A.end():A.destroy(),f(w),A=e.createWriteStream(c,T),O.emit("new",c),O.emit("rotate",x,c),h(A,O)}A.write(t,r),b+=Buffer.byteLength(t,r)}.bind(this),process.nextTick((function(){O.emit("new",w)})),O.emit("new",w),O}return p.verbose&&console.log(new Date,"[FileStreamRotator] File won't be rotated: ",n.frequency,n.size),process.nextTick((function(){A.emit("new",w)})),A};var f=function(n){t.dirname(n).split(t.sep).reduce((function(n,r){if(n+=r+t.sep,!e.existsSync(n))try{e.mkdirSync(n)}catch(e){if("EEXIST"!==e.code)throw e}return n}),"")},h=function(e,t){e.on("close",(function(){t.emit("close")})),e.on("finish",(function(){t.emit("finish")})),e.on("error",(function(e){t.emit("error",e)})),e.on("open",(function(e){t.emit("open",e)}))};return Ss}!function(){if(As)return Ts;As=1;const e=bs(),t=function(){if(Ms)return ks;Ms=1;const e=n,t=u,r=a,i=s,o=f,c=xs(),p=Fe().MESSAGE,d=l.PassThrough,h=pr(),m={json:!1,colorize:!1,eol:t.EOL,logstash:null,prettyPrint:!1,label:null,stringify:!1,depth:null,showLevel:!0,timestamp:()=>(new Date).toISOString()},g=function(t){if(t=t||{},h.call(this,t),this.options=Object.assign({},m,t),t.stream)!function(e){Array.prototype.slice.call(arguments,1).forEach((n=>{if(t[n])throw new Error("Cannot set "+n+" and "+e+" together")}))}("stream","filename","maxsize"),this.logStream=new d,this.logStream.pipe(t.stream);else{if(this.filename=t.filename?r.basename(t.filename):"winston.log",this.dirname=t.dirname||r.dirname(t.filename),i=this.filename,/["<>|:*?\\/\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(i)||(n=this.dirname,/["<>|\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(n)))throw new Error("Your path or filename contain an invalid character.");this.logStream=Ds().getStream({filename:r.join(this.dirname,this.filename),frequency:t.frequency?t.frequency:"custom",date_format:t.datePattern?t.datePattern:"YYYY-MM-DD",verbose:!1,size:function(e){if(e&&"string"==typeof e){if(e.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/))return e}else if(e&&Number.isInteger(e)){const t=Math.round(e/1024);return 0===t?"1k":t+"k"}return null}(t.maxSize),max_logs:t.maxFiles,end_stream:!0,audit_file:t.auditFile?t.auditFile:r.join(this.dirname,"."+c(t)+"-audit.json"),file_options:t.options?t.options:{flags:"a"},utc:!!t.utc&&t.utc,extension:t.extension?t.extension:"",create_symlink:!!t.createSymlink&&t.createSymlink,symlink_name:t.symlinkName?t.symlinkName:"current.log",watch_log:!!t.watchLog&&t.watchLog,audit_hash_type:t.auditHashType?t.auditHashType:"sha256"}),this.logStream.on("new",(e=>{this.emit("new",e)})),this.logStream.on("rotate",((e,t)=>{this.emit("rotate",e,t)})),this.logStream.on("logRemoved",(n=>{if(t.zippedArchive){const t=n.name+".gz";try{e.unlinkSync(t)}catch(e){if("ENOENT"!==e.code)return e.message=`Error occurred while removing ${t}: ${e.message}`,void this.emit("error",e)}this.emit("logRemoved",t)}else this.emit("logRemoved",n.name)})),t.zippedArchive&&this.logStream.on("rotate",(t=>{try{if(!e.existsSync(t))return}catch(e){return e.message=`Error occurred while checking existence of ${t}: ${e.message}`,void this.emit("error",e)}try{if(e.existsSync(`${t}.gz`))return}catch(e){return e.message=`Error occurred while checking existence of ${t}.gz: ${e.message}`,void this.emit("error",e)}const n=o.createGzip(),r=e.createReadStream(t);r.on("error",(e=>{e.message=`Error occurred while reading ${t}: ${e.message}`,this.emit("error",e)}));const i=e.createWriteStream(t+".gz");i.on("error",(e=>{e.message=`Error occurred while writing ${t}.gz: ${e.message}`,this.emit("error",e)})),r.pipe(n).pipe(i).on("finish",(()=>{try{e.unlinkSync(t)}catch(e){if("ENOENT"!==e.code)return e.message=`Error occurred while removing ${t}: ${e.message}`,void this.emit("error",e)}this.emit("archive",t+".gz")}))})),t.watchLog&&this.logStream.on("addWatcher",(e=>{this.emit("addWatcher",e)}))}var n,i};ks=g,i.inherits(g,h),g.prototype.name="dailyRotateFile";const b=function(){};return g.prototype.log=function(e,t){t=t||b,this.logStream.write(e[p]+this.options.eol),this.emit("logged",e),t(null,!0)},g.prototype.close=function(){this.logStream&&this.logStream.end((()=>{this.emit("finish")}))},g.prototype.query=function(t,n){if("function"==typeof t&&(n=t,t={}),!this.options.json)throw new Error("query() may not be used without the json option being set to true");if(!this.filename)throw new Error("query() may not be used when initializing with a stream");let i=[];(t=t||{}).rows=t.rows||t.limit||10,t.start=t.start||0,t.until=t.until||new Date,"object"!=typeof t.until&&(t.until=new Date(t.until)),t.from=t.from||t.until-864e5,"object"!=typeof t.from&&(t.from=new Date(t.from)),t.order=t.order||"desc";const a=(()=>{const t=new RegExp(this.filename.replace("%DATE%",".*"),"i");return e.readdirSync(this.dirname).filter((e=>r.basename(e).match(t)))})();0===a.length&&n&&n(null,i);const s=c=>{if(!c)return;const u=r.join(this.dirname,c);let l,p="";if(c.endsWith(".gz")){l=new d;const t=e.createReadStream(u);t.on("error",(e=>{e.message=`Error occurred while reading ${u}: ${e.message}`,l.emit("error",e)})),t.pipe(o.createGunzip()).pipe(l)}else l=e.createReadStream(u,{encoding:"utf8"});function f(e,n){try{const n=JSON.parse(e);if(!n||"object"!=typeof n)return;const r=new Date(n.timestamp);if(t.from&&r<t.from||t.until&&r>t.until||t.level&&t.level!==n.level)return;i.push(n)}catch(e){n||l.emit("error",e)}}l.on("error",(e=>{if(l.readable&&l.destroy(),n)return"ENOENT"===e.code?n(null,i):n(e)})),l.on("data",(e=>{const t=(e=(p+e).split(/\n+/)).length-1;for(let n=0;n<t;n++)f(e[n]);p=e[t]})),l.on("end",(()=>{if(p&&f(p,!0),a.length)s(a.shift());else if(n){i.sort(((e,t)=>{const n=new Date(e.timestamp).getTime(),r=new Date(t.timestamp).getTime();return n>r?1:n<r?-1:0})),"desc"===t.order&&(i=i.reverse());const e=t.start||0,r=t.limit||i.length;i=i.slice(e,e+r),t.fields&&(i=i.map((e=>{const n={};return t.fields.forEach((t=>{n[t]=e[t]})),n}))),n(null,i)}}))};s(a.shift())},ks}();e.transports.DailyRotateFile=t,Ts=t}(),function(e){e.RUST="rs",e.C="c",e.JS="js",e.API="api",e.PYTHON="py"}(Rs||(Rs={})),function(e){e.API="api"}(Os||(Os={})),Object.values(Rs),function(e){e.JSON="application/json",e.WASM="application/wasm",e.PLAIN_TXT="text/plain",e.JS="application/x-javascript",e.TAR="application/x-tar"}(Is||(Is={})),function(e){e.JSON="json",e.WASM="wasm",e.PLAIN_TXT="txt",e.JS="js",e.DTA="dta",e.PY="py",e.TAR="tar"}(Ns||(Ns={}));var Ls,Cs,$s,Bs,zs,Us,Fs,qs,Hs,Ys,Vs,Gs,Ks,Ws,Zs,Js,Xs,Qs,eo,to,no,ro,io,ao,so,oo,co,uo,lo,po,fo,ho,mo,go,bo,yo,vo,xo,wo,_o,So,Eo,ko,Mo,To,Ao,Ro,Oo,Io,No,Po,jo,Do,Lo,Co,$o,Bo,zo,Uo,Fo,qo,Ho,Yo,Vo,Go,Ko,Wo,Zo,Jo,Xo,Qo,ec,tc,nc,rc,ic,ac,sc,oc,cc,uc,lc,pc,dc,fc,hc,mc,gc,bc,yc={exports:{}};function vc(){if(Cs)return Ls;Cs=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return Ls={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}function xc(){if(Bs)return $s;Bs=1;const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return $s=e}function wc(){return zs||(zs=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=vc(),a=xc(),s=(t=e.exports={}).re=[],o=t.safeRe=[],c=t.src=[],u=t.safeSrc=[],l=t.t={};let p=0;const d="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",i],[d,r]],h=(e,t,n)=>{const r=(e=>{for(const[t,n]of f)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=p++;a(e,i,t),l[e]=i,c[i]=t,u[i]=r,s[i]=new RegExp(t,n?"g":void 0),o[i]=new RegExp(r,n?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),h("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${d}+`),h("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),h("FULL",`^${c[l.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),h("LOOSE",`^${c[l.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),h("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?`+`(?:${c[l.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",c[l.COERCE],!0),h("COERCERTLFULL",c[l.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(yc,yc.exports)),yc.exports}function _c(){if(Fs)return Us;Fs=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return Us=n=>n?"object"!=typeof n?e:n:t}function Sc(){if(Hs)return qs;Hs=1;const e=/^[0-9]+$/,t=(t,n)=>{const r=e.test(t),i=e.test(n);return r&&i&&(t=+t,n=+n),t===n?0:r&&!i?-1:i&&!r?1:t<n?-1:1};return qs={compareIdentifiers:t,rcompareIdentifiers:(e,n)=>t(n,e)}}function Ec(){if(Vs)return Ys;Vs=1;const e=xc(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=vc(),{safeRe:r,safeSrc:i,t:a}=wc(),s=_c(),{compareIdentifiers:o}=Sc();class c{constructor(i,o){if(o=s(o),i instanceof c){if(i.loose===!!o.loose&&i.includePrerelease===!!o.includePrerelease)return i;i=i.version}else if("string"!=typeof i)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof i}".`);if(i.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",i,o),this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease;const u=i.trim().match(o.loose?r[a.LOOSE]:r[a.FULL]);if(!u)throw new TypeError(`Invalid Version: ${i}`);if(this.raw=i,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<n)return t}return e})):this.prerelease=[],this.build=u[5]?u[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(t){if(e("SemVer.compare",this.version,this.options,t),!(t instanceof c)){if("string"==typeof t&&t===this.version)return 0;t=new c(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof c||(e=new c(e,this.options)),o(this.major,e.major)||o(this.minor,e.minor)||o(this.patch,e.patch)}comparePre(t){if(t instanceof c||(t=new c(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],i=t.prerelease[n];if(e("prerelease compare",n,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 o(r,i)}while(++n)}compareBuild(t){t instanceof c||(t=new c(t,this.options));let n=0;do{const r=this.build[n],i=t.build[n];if(e("build compare",n,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 o(r,i)}while(++n)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=new RegExp(`^${this.options.loose?i[a.PRERELEASELOOSE]:i[a.PRERELEASE]}$`),n=`-${t}`.match(e);if(!n||n[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;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(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===o(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Ys=c}function kc(){if(Ks)return Gs;Ks=1;const e=Ec();return Gs=(t,n,r=!1)=>{if(t instanceof e)return t;try{return new e(t,n)}catch(e){if(!r)return null;throw e}},Gs}function Mc(){if(fo)return po;fo=1;const e=Ec();return po=(t,n,r)=>new e(t,r).compare(new e(n,r))}function Tc(){if(vo)return yo;vo=1;const e=Ec();return yo=(t,n,r)=>{const i=new e(t,r),a=new e(n,r);return i.compare(a)||i.compareBuild(a)}}function Ac(){if(ko)return Eo;ko=1;const e=Mc();return Eo=(t,n,r)=>e(t,n,r)>0}function Rc(){if(To)return Mo;To=1;const e=Mc();return Mo=(t,n,r)=>e(t,n,r)<0}function Oc(){if(Ro)return Ao;Ro=1;const e=Mc();return Ao=(t,n,r)=>0===e(t,n,r)}function Ic(){if(Io)return Oo;Io=1;const e=Mc();return Oo=(t,n,r)=>0!==e(t,n,r)}function Nc(){if(Po)return No;Po=1;const e=Mc();return No=(t,n,r)=>e(t,n,r)>=0}function Pc(){if(Do)return jo;Do=1;const e=Mc();return jo=(t,n,r)=>e(t,n,r)<=0}function jc(){if(Co)return Lo;Co=1;const e=Oc(),t=Ic(),n=Ac(),r=Nc(),i=Rc(),a=Pc();return Lo=(s,o,c,u)=>{switch(o){case"===":return"object"==typeof s&&(s=s.version),"object"==typeof c&&(c=c.version),s===c;case"!==":return"object"==typeof s&&(s=s.version),"object"==typeof c&&(c=c.version),s!==c;case"":case"=":case"==":return e(s,c,u);case"!=":return t(s,c,u);case">":return n(s,c,u);case">=":return r(s,c,u);case"<":return i(s,c,u);case"<=":return a(s,c,u);default:throw new TypeError(`Invalid operator: ${o}`)}}}function Dc(){if(qo)return Fo;qo=1;const e=/\s+/g;class t{constructor(n,r){if(r=i(r),n instanceof t)return n.loose===!!r.loose&&n.includePrerelease===!!r.includePrerelease?n:new t(n.raw,r);if(n instanceof a)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=n.trim().replace(e," "),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=>!m(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&&g(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&h))+":"+e,n=r.get(t);if(n)return n;const i=this.options.loose,o=i?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(o,A(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(c[u.COMPARATORTRIM],l),s("comparator trim",e),e=e.replace(c[u.TILDETRIM],p),s("tilde trim",e),e=e.replace(c[u.CARETTRIM],d),s("caret trim",e);let g=e.split(" ").map((e=>y(e,this.options))).join(" ").split(/\s+/).map((e=>T(e,this.options)));i&&(g=g.filter((e=>(s("loose invalid filter",e,this.options),!!e.match(c[u.COMPARATORLOOSE]))))),s("range list",g);const b=new Map,v=g.map((e=>new a(e,this.options)));for(const e of v){if(m(e))return[e];b.set(e.value,e)}b.size>1&&b.has("")&&b.delete("");const x=[...b.values()];return r.set(t,x),x}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>b(t,n)&&e.set.some((e=>b(e,n)&&t.every((t=>e.every((e=>t.intersects(e,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new o(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}Fo=t;const n=(Uo||(Uo=1,zo=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}),zo),r=new n,i=_c(),a=Lc(),s=xc(),o=Ec(),{safeRe:c,t:u,comparatorTrimReplace:l,tildeTrimReplace:p,caretTrimReplace:d}=wc(),{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:h}=vc(),m=e=>"<0.0.0-0"===e.value,g=e=>""===e.value,b=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},y=(e,t)=>(s("comp",e,t),e=_(e,t),s("caret",e),e=x(e,t),s("tildes",e),e=E(e,t),s("xrange",e),e=M(e,t),s("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,x=(e,t)=>e.trim().split(/\s+/).map((e=>w(e,t))).join(" "),w=(e,t)=>{const n=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(n,((t,n,r,i,a)=>{let o;return s("tilde",e,t,n,r,i,a),v(n)?o="":v(r)?o=`>=${n}.0.0 <${+n+1}.0.0-0`:v(i)?o=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(s("replaceTilde pr",a),o=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):o=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,s("tilde return",o),o}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(e,t)=>{s("caret",e,t);const n=t.loose?c[u.CARETLOOSE]:c[u.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,a,o)=>{let c;return s("caret",e,t,n,i,a,o),v(n)?c="":v(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:v(a)?c="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:o?(s("replaceCaret pr",o),c="0"===n?"0"===i?`>=${n}.${i}.${a}-${o} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${o} <${+n+1}.0.0-0`):(s("no pr"),c="0"===n?"0"===i?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),s("caret return",c),c}))},E=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map((e=>k(e,t))).join(" ")),k=(e,t)=>{e=e.trim();const n=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(n,((n,r,i,a,o,c)=>{s("xRange",e,n,r,i,a,o,c);const u=v(i),l=u||v(a),p=l||v(o),d=p;return"="===r&&d&&(r=""),c=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(l&&(a=0),o=0,">"===r?(r=">=",l?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===r&&(r="<",l?i=+i+1:a=+a+1),"<"===r&&(c="-0"),n=`${r+i}.${a}.${o}${c}`):l?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:p&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),s("xRange return",n),n}))},M=(e,t)=>(s("replaceStars",e,t),e.trim().replace(c[u.STAR],"")),T=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),A=e=>(t,n,r,i,a,s,o,c,u,l,p,d)=>`${n=v(r)?"":v(i)?`>=${r}.0.0${e?"-0":""}`:v(a)?`>=${r}.${i}.0${e?"-0":""}`:s?`>=${n}`:`>=${n}${e?"-0":""}`} ${c=v(u)?"":v(l)?`<${+u+1}.0.0-0`:v(p)?`<${u}.${+l+1}.0-0`:d?`<=${u}.${l}.${p}-${d}`:e?`<${u}.${l}.${+p+1}-0`:`<=${c}`}`.trim(),R=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(s(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return Fo}function Lc(){if(Yo)return Ho;Yo=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,i){if(i=n(i),r instanceof t){if(r.loose===!!i.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),s("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(t){const n=this.options.loose?r[i.COMPARATORLOOSE]:r[i.COMPARATOR],a=t.match(n);if(!a)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==a[1]?a[1]:"","="===this.operator&&(this.operator=""),a[2]?this.semver=new o(a[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(s("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new o(t,this.options)}catch(e){return!1}return a(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new c(e.value,r).test(this.value):""===e.operator?""===e.value||new c(this.value,r).test(e.semver):(!(r=n(r)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!r.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("="))||(!!(a(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(a(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}Ho=t;const n=_c(),{safeRe:r,t:i}=wc(),a=jc(),s=xc(),o=Ec(),c=Dc();return Ho}function Cc(){if(Go)return Vo;Go=1;const e=Dc();return Vo=(t,n,r)=>{try{n=new e(n,r)}catch(e){return!1}return n.test(t)},Vo}function $c(){if(rc)return nc;rc=1;const e=Dc();return nc=(t,n)=>{try{return new e(t,n).range||"*"}catch(e){return null}},nc}function Bc(){if(ac)return ic;ac=1;const e=Ec(),t=Lc(),{ANY:n}=t,r=Dc(),i=Cc(),a=Ac(),s=Rc(),o=Pc(),c=Nc();return ic=(u,l,p,d)=>{let f,h,m,g,b;switch(u=new e(u,d),l=new r(l,d),p){case">":f=a,h=o,m=s,g=">",b=">=";break;case"<":f=s,h=c,m=a,g="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(u,l,d))return!1;for(let e=0;e<l.set.length;++e){const r=l.set[e];let i=null,a=null;if(r.forEach((e=>{e.semver===n&&(e=new t(">=0.0.0")),i=i||e,a=a||e,f(e.semver,i.semver,d)?i=e:m(e.semver,a.semver,d)&&(a=e)})),i.operator===g||i.operator===b)return!1;if((!a.operator||a.operator===g)&&h(u,a.semver))return!1;if(a.operator===b&&m(u,a.semver))return!1}return!0},ic}var zc,Uc,Fc,qc=function(){if(bc)return gc;bc=1;const e=wc(),t=vc(),n=Ec(),r=Sc(),i=kc(),a=function(){if(Zs)return Ws;Zs=1;const e=kc();return Ws=(t,n)=>{const r=e(t,n);return r?r.version:null},Ws}(),s=function(){if(Xs)return Js;Xs=1;const e=kc();return Js=(t,n)=>{const r=e(t.trim().replace(/^[=v]+/,""),n);return r?r.version:null},Js}(),o=function(){if(eo)return Qs;eo=1;const e=Ec();return Qs=(t,n,r,i,a)=>{"string"==typeof r&&(a=i,i=r,r=void 0);try{return new e(t instanceof e?t.version:t,r).inc(n,i,a).version}catch(e){return null}},Qs}(),c=function(){if(no)return to;no=1;const e=kc();return to=(t,n)=>{const r=e(t,null,!0),i=e(n,null,!0),a=r.compare(i);if(0===a)return null;const s=a>0,o=s?r:i,c=s?i:r,u=!!o.prerelease.length;if(c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(0===c.compareMain(o))return c.minor&&!c.patch?"minor":"patch"}const l=u?"pre":"";return r.major!==i.major?l+"major":r.minor!==i.minor?l+"minor":r.patch!==i.patch?l+"patch":"prerelease"}}(),u=function(){if(io)return ro;io=1;const e=Ec();return ro=(t,n)=>new e(t,n).major}(),l=function(){if(so)return ao;so=1;const e=Ec();return ao=(t,n)=>new e(t,n).minor}(),p=function(){if(co)return oo;co=1;const e=Ec();return oo=(t,n)=>new e(t,n).patch}(),d=function(){if(lo)return uo;lo=1;const e=kc();return uo=(t,n)=>{const r=e(t,n);return r&&r.prerelease.length?r.prerelease:null},uo}(),f=Mc(),h=function(){if(mo)return ho;mo=1;const e=Mc();return ho=(t,n,r)=>e(n,t,r)}(),m=function(){if(bo)return go;bo=1;const e=Mc();return go=(t,n)=>e(t,n,!0)}(),g=Tc(),b=function(){if(wo)return xo;wo=1;const e=Tc();return xo=(t,n)=>t.sort(((t,r)=>e(t,r,n)))}(),y=function(){if(So)return _o;So=1;const e=Tc();return _o=(t,n)=>t.sort(((t,r)=>e(r,t,n)))}(),v=Ac(),x=Rc(),w=Oc(),_=Ic(),S=Nc(),E=Pc(),k=jc(),M=function(){if(Bo)return $o;Bo=1;const e=Ec(),t=kc(),{safeRe:n,t:r}=wc();return $o=(i,a)=>{if(i instanceof e)return i;if("number"==typeof i&&(i=String(i)),"string"!=typeof i)return null;let s=null;if((a=a||{}).rtl){const e=a.includePrerelease?n[r.COERCERTLFULL]:n[r.COERCERTL];let t;for(;(t=e.exec(i))&&(!s||s.index+s[0].length!==i.length);)s&&t.index+t[0].length===s.index+s[0].length||(s=t),e.lastIndex=t.index+t[1].length+t[2].length;e.lastIndex=-1}else s=i.match(a.includePrerelease?n[r.COERCEFULL]:n[r.COERCE]);if(null===s)return null;const o=s[2],c=s[3]||"0",u=s[4]||"0",l=a.includePrerelease&&s[5]?`-${s[5]}`:"",p=a.includePrerelease&&s[6]?`+${s[6]}`:"";return t(`${o}.${c}.${u}${l}${p}`,a)},$o}(),T=Lc(),A=Dc(),R=Cc(),O=function(){if(Wo)return Ko;Wo=1;const e=Dc();return Ko=(t,n)=>new e(t,n).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" "))),Ko}(),I=function(){if(Jo)return Zo;Jo=1;const e=Ec(),t=Dc();return Zo=(n,r,i)=>{let a=null,s=null,o=null;try{o=new t(r,i)}catch(e){return null}return n.forEach((t=>{o.test(t)&&(a&&-1!==s.compare(t)||(a=t,s=new e(a,i)))})),a},Zo}(),N=function(){if(Qo)return Xo;Qo=1;const e=Ec(),t=Dc();return Xo=(n,r,i)=>{let a=null,s=null,o=null;try{o=new t(r,i)}catch(e){return null}return n.forEach((t=>{o.test(t)&&(a&&1!==s.compare(t)||(a=t,s=new e(a,i)))})),a},Xo}(),P=function(){if(tc)return ec;tc=1;const e=Ec(),t=Dc(),n=Ac();return ec=(r,i)=>{r=new t(r,i);let a=new e("0.0.0");if(r.test(a))return a;if(a=new e("0.0.0-0"),r.test(a))return a;a=null;for(let t=0;t<r.set.length;++t){const i=r.set[t];let s=null;i.forEach((t=>{const r=new e(t.semver.version);switch(t.operator){case">":0===r.prerelease.length?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":s&&!n(r,s)||(s=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}})),!s||a&&!n(a,s)||(a=s)}return a&&r.test(a)?a:null},ec}(),j=$c(),D=Bc(),L=function(){if(oc)return sc;oc=1;const e=Bc();return sc=(t,n,r)=>e(t,n,">",r),sc}(),C=function(){if(uc)return cc;uc=1;const e=Bc();return cc=(t,n,r)=>e(t,n,"<",r),cc}(),$=function(){if(pc)return lc;pc=1;const e=Dc();return lc=(t,n,r)=>(t=new e(t,r),n=new e(n,r),t.intersects(n,r))}(),B=function(){if(fc)return dc;fc=1;const e=Cc(),t=Mc();return dc=(n,r,i)=>{const a=[];let s=null,o=null;const c=n.sort(((e,n)=>t(e,n,i)));for(const t of c)e(t,r,i)?(o=t,s||(s=t)):(o&&a.push([s,o]),o=null,s=null);s&&a.push([s,null]);const u=[];for(const[e,t]of a)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");const l=u.join(" || "),p="string"==typeof r.raw?r.raw:String(r);return l.length<p.length?l:r},dc}(),z=function(){if(mc)return hc;mc=1;const e=Dc(),t=Lc(),{ANY:n}=t,r=Cc(),i=Mc(),a=[new t(">=0.0.0-0")],s=[new t(">=0.0.0")],o=(e,t,o)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===n){if(1===t.length&&t[0].semver===n)return!0;e=o.includePrerelease?a:s}if(1===t.length&&t[0].semver===n){if(o.includePrerelease)return!0;t=s}const l=new Set;let p,d,f,h,m,g,b;for(const t of e)">"===t.operator||">="===t.operator?p=c(p,t,o):"<"===t.operator||"<="===t.operator?d=u(d,t,o):l.add(t.semver);if(l.size>1)return null;if(p&&d){if(f=i(p.semver,d.semver,o),f>0)return null;if(0===f&&(">="!==p.operator||"<="!==d.operator))return null}for(const e of l){if(p&&!r(e,String(p),o))return null;if(d&&!r(e,String(d),o))return null;for(const n of t)if(!r(e,String(n),o))return!1;return!0}let y=!(!d||o.includePrerelease||!d.semver.prerelease.length)&&d.semver,v=!(!p||o.includePrerelease||!p.semver.prerelease.length)&&p.semver;y&&1===y.prerelease.length&&"<"===d.operator&&0===y.prerelease[0]&&(y=!1);for(const e of t){if(b=b||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,p)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(h=c(p,e,o),h===e&&h!==p)return!1}else if(">="===p.operator&&!r(p.semver,String(e),o))return!1;if(d)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),"<"===e.operator||"<="===e.operator){if(m=u(d,e,o),m===e&&m!==d)return!1}else if("<="===d.operator&&!r(d.semver,String(e),o))return!1;if(!e.operator&&(d||p)&&0!==f)return!1}return!(p&&g&&!d&&0!==f||d&&b&&!p&&0!==f||v||y)},c=(e,t,n)=>{if(!e)return t;const r=i(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,n)=>{if(!e)return t;const r=i(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};return hc=(t,n,r={})=>{if(t===n)return!0;t=new e(t,r),n=new e(n,r);let i=!1;e:for(const e of t.set){for(const t of n.set){const n=o(e,t,r);if(i=i||null!==n,n)continue e}if(i)return!1}return!0}}();return gc={parse:i,valid:a,clean:s,inc:o,diff:c,major:u,minor:l,patch:p,prerelease:d,compare:f,rcompare:h,compareLoose:m,compareBuild:g,sort:b,rsort:y,gt:v,lt:x,eq:w,neq:_,gte:S,lte:E,cmp:k,coerce:M,Comparator:T,Range:A,satisfies:R,toComparators:O,maxSatisfying:I,minSatisfying:N,minVersion:P,validRange:j,outside:D,gtr:L,ltr:C,intersects:$,simplifyRange:B,subset:z,SemVer:n,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers}}();!function(e){e.LEDGER="ledger",e.HTTP_ADAPTER="http-adapter",e.EVENTS_ADAPTER="events-adapter",e.FILESYSTEM_ADAPTER="filesystem-adapter",e.WASM_CHECKPOINTER="wasm-checkpointer",e.WASM_INSTRUMENTER="wasm-instrumenter",e.WASM_RUNNER="wasm-runner"}(zc||(zc={})),function(e){e.FAILED="failed",e.SUCCEED="succeed",e.RUNNING="running"}(Uc||(Uc={})),function(e){e.BINDLE="bindle",e.S3="s3"}(Fc||(Fc={}));var Hc,Yc,Vc,Gc,Kc,Wc,Zc,Jc;!function(e){e.TASK_CREATED="task_created",e.TASK_SOLVED="task_solved",e.FILE_SYSTEM="file_system",e.DISPATCH_TASK="dispatch_task",e.DISPATCH_API_TASK="dispatch_api_task",e.MESSAGE_SAVED="message_saved",e.COMPUTED_OUTCOME="computed_outcome",e.API_FETCH="api_fetch",e.API_OUTCOME="api_outcome",e.API_SOLVED="api_solved",e.READY_TO_SHUTDOWN="ready_to_shutdown",e.INVOICE="invoice",e.ENTITLEMENT="entitlement",e.HEALTH_CHECK="health_check",e.RUNNER_TASK_EXECUTED="runner_task_executed",e.DEPLOYER_EXECUTE_TASK="deployer_execute_task",e.DEPLOYER_TASK_EXECUTED="deployer_task_executed",e.HTTP_ADAPTER_TASK_EXECUTED="http_adapter_task_executed",e.HTTP_ADAPTER_TASK_INSTRUMENTED="http_adapter_task_instrumented",e.HTTP_ADAPTER_TASK_PUSHED="http_adapter_task_pushed",e.HTTP_ADAPTER_TASK_PULLED="http_adapter_task_pulled",e.HTTP_ADAPTER_TASK_CHECKPOINTED="http_adapter_task_checkpointed",e.HTTP_ADAPTER_TASK_CHECKPOINTS_LISTED="http_adapter_task_checkpoints_listed",e.HTTP_ADAPTER_READY_TO_SHUTDOWN="http_adapter_ready_to_shutdown",e.EVENTS_ADAPTER_TASK_EXECUTED="events_adapter_task_executed",e.EVENTS_ADAPTER_TASK_INSTRUMENTED="events_adapter_task_instrumented",e.EVENTS_ADAPTER_TASK_PUSHED="events_adapter_task_pushed",e.EVENTS_ADAPTER_TASK_PULLED="events_adapter_task_pulled",e.EVENTS_ADAPTER_TASK_CHECKPOINTED="events_adapter_task_checkpointed",e.EVENTS_ADAPTER_TASK_CHECKPOINTS_LISTED="events_adapter_task_checkpoints_listed",e.EVENTS_ADAPTER_COMPUTED_OUTCOME="events_adapter_compute_outcome",e.EVENTS_ADAPTER_TASK_CREATED="events_adapter_task_created",e.EVENTS_ADAPTER_NODE_DEREGISTERED="events_adapter_node_deregistered",e.EVENTS_ADAPTER_SERVICE_STARTED_CHECK="events_adapter_service_started_check",e.DISPATCHER_TASK_SOLVED_CLEAR="dispatcher_task_solved_clear",e.DISPATCHER_TASK_CREATED="dispatcher_task_created",e.WASM_INSTRUMENTER_INSTRUMENT_TASK="wasm_instrumenter_instrument_task",e.WASM_INSTRUMENTER_TASK_INSTRUMENTED="wasm_instrumenter_task_instrumented",e.FILESYSTEM_ADAPTER_PUSH_TASK="filesystem_adapter_push_task",e.FILESYSTEM_ADAPTER_TASK_PUSHED="filesystem_adapter_task_pushed",e.FILESYSTEM_ADAPTER_PULL_TASK="filesystem_adapter_pull_task",e.FILESYSTEM_ADAPTER_TASK_PULLED="filesystem_adapter_task_pulled",e.FILESYSTEM_ADAPTER_SERVICE_STARTED_CHECK="filesystem_adapter_service_started_check",e.WASM_CHECKPOINTER_CHECKPOINT_TASK="wasm_checkpointer_checkpoint_task",e.WASM_CHECKPOINTER_LIST_TASK_CHECKPOINTS="wasm_checkpointer_list_task_checkpoints",e.TRANSCRIPT_WRITER_SAVE_MESSAGE="transcript_writer_save_message",e.TRANSCRIPT_WRITER_INVOICE="transcript_writer_save_invoice",e.SEQUENCER_MESSAGE_SAVED="sequencer_message_saved",e.VERIFICATION_MESSAGE_SAVED="verification_message_saved",e.VERIFICATION_VALIDATE_MESSAGE="verification_validate_message",e.VERIFICATION_REVEAL_SOLUTION="verification_reveal_solution",e.VERIFICATION_ERRORS="verification_errors",e.LEDGER_SHUTDOWN="ledger_shutdown",e.LEDGER_SERVICE_STARTED="ledger_service_started"}(Hc||(Hc={})),function(e){e.TASK_INSTRUMENTED="task_instrumented",e.TASK_CREATED="task_created",e.API_TASK_CREATED="api_task_created",e.TASK_EXECUTED="task_executed",e.TASK_PUSHED="task_pushed",e.TASK_PULLED="task_pulled",e.TASK_CHECKPOINTED="task_checkpointed",e.TASK_CHECKPOINTS_LISTED="task_checkpoints_listed",e.COMPUTED_OUTCOME="computed_outcome",e.MESSAGE_SAVED="message_saved",e.TASK_SOLVED="task_solved",e.TASK_SOLVED_CLEAR="task_solved_clear",e.NODE_OUTCOME="node_outcome",e.PLATFORM_ERRORS="errors",e.REVEAL_SOLUTIONS="reveal_solutions",e.SOLUTIONS_REVEALED="solutions_revealed",e.API_FETCHER_OUTCOME="api_fetcher_outcome",e.API_SOLVED="api_solved",e.API_OUTCOME="api_outcome",e.NODE_DEREGISTERED="node_deregistered",e.READY_TO_SHUTDOWN="ready_to_shutdown",e.EXECUTION_COMPLETED="execution_completed",e.SERVICE_STARTED="service_started",e.INVOICE="invoice",e.ENTITLEMENT_REQ="entitlement_req",e.ENTITLEMENT_RES="entitlement_res",e.HEALTH_CHECK="health_check",e.EXECUTION_METADATA="execution_metadata"}(Yc||(Yc={})),function(e){e.SHUTDOWN="shutdown",e.LIST_TASK_CHECKPOINTS="list_task_checkpoints",e.EXECUTE_TASK="execute_task",e.CHECKPOINT_TASK="checkpoint_task",e.INSTRUMENT_TASK="instrument_task",e.PUSH_TASK="push_task",e.PULL_TASK="pull_task",e.DISPATCH_TASK="dispatch_task",e.DISPATCH_API_TASK="dispatch_api_task",e.SAVE_MESSAGE="save_message",e.REVEAL_SOLUTION="reveal_solution",e.VALIDATE_MESSAGE="validate_message",e.API_FETCH="api_fetch",e.ENTITLEMENT="entitlement",e.HEALTH_CHECK="health_check"}(Vc||(Vc={})),function(e){e.ERRORS="errors",e.TASK_INSTRUMENTED="task_instrumented",e.TASK_CREATED="task_created",e.API_TASK_CREATED="api_task_created",e.TASK_EXECUTED="task_executed",e.TASK_PUSHED="task_pushed",e.TASK_SOLVED="task_solved",e.TASK_SOLVED_CLEAR="task_solved_clear",e.TASK_PULLED="task_pulled",e.TASK_CHECKPOINTED="task_checkpointed",e.TASK_CHECKPOINTS_LISTED="task_checkpoints_listed",e.COMPUTED_OUTCOME="computed_outcome",e.MESSAGE_SAVED="message_saved",e.API_FETCHER_OUTCOME="api_fetcher_outcome",e.API_SOLVED="api_solved",e.API_OUTCOME="api_outcome",e.NODE_DEREGISTERED="node_deregistered",e.READY_TO_SHUTDOWN="ready_to_shutdown",e.SERVICE_STARTED="service_started",e.INVOICES="invoice",e.ENTITLEMENTS_REQ="entitlement_req",e.ENTITLEMENTS_RES="entitlement_res",e.HEALTH_CHECK="health_check",e.SHUTDOWN="shutdown",e.LIST_TASK_CHECKPOINTS="list_task_checkpoints",e.EXECUTE_TASK="execute_task",e.CHECKPOINT_TASK="checkpoint_task",e.INSTRUMENT_TASK="instrument_task",e.PUSH_TASK="push_task",e.PULL_TASK="pull_task",e.DISPATCH_TASK="dispatch_task",e.DISPATCH_API_TASK="dispatch_api_task",e.SAVE_MESSAGE="save_message",e.REVEAL_SOLUTION="reveal_solution",e.VALIDATE_MESSAGE="validate_message",e.API_FETCH="api_fetch",e.DUMMY="DUMMY"}(Gc||(Gc={})),function(e){e.VALIDATION_ERROR="validation_error"}(Kc||(Kc={})),function(e){e.GAME_PENDING="GamePending",e.READY_FOR_INVOICE="ReadyForInvoice",e.ERROR="Error"}(Wc||(Wc={})),function(e){!function(e){e.Pay="pay",e.Charge="charge"}(e.Operation||(e.Operation={})),(e.EntitlementOperation||(e.EntitlementOperation={})).IS_USER_REGISTER="isUserRegister"}(Zc||(Zc={})),function(e){e.Pay="pay",e.Charge="charge"}(Jc||(Jc={})),Yc.TASK_SOLVED,Yc.TASK_CREATED,Yc.API_TASK_CREATED,Yc.NODE_OUTCOME,Yc.SOLUTIONS_REVEALED,Yc.REVEAL_SOLUTIONS,Yc.API_OUTCOME,Yc.EXECUTION_COMPLETED,Yc.EXECUTION_METADATA;var Xc=function(e){this.groups=[],this.each=!1,this.context=void 0,this.type=e.type,this.name=e.name,this.target=e.target,this.propertyName=e.propertyName,this.constraints=null==e?void 0:e.constraints,this.constraintCls=e.constraintCls,this.validationTypeOptions=e.validationTypeOptions,e.validationOptions&&(this.message=e.validationOptions.message,this.groups=e.validationOptions.groups,this.always=e.validationOptions.always,this.each=e.validationOptions.each,this.context=e.validationOptions.context)},Qc=function(){function e(){}return e.prototype.transform=function(e){var t=[];return Object.keys(e.properties).forEach((function(n){e.properties[n].forEach((function(r){var i={message:r.message,groups:r.groups,always:r.always,each:r.each},a={type:r.type,name:r.name,target:e.name,propertyName:n,constraints:r.constraints,validationTypeOptions:r.options,validationOptions:i};t.push(new Xc(a))}))})),t},e}();function eu(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0}var tu=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},nu=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return s},ru=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},iu=function(){function e(){this.validationMetadatas=new Map,this.constraintMetadatas=new Map}return Object.defineProperty(e.prototype,"hasValidationMetaData",{get:function(){return!!this.validationMetadatas.size},enumerable:!1,configurable:!0}),e.prototype.addValidationSchema=function(e){var t=this;(new Qc).transform(e).forEach((function(e){return t.addValidationMetadata(e)}))},e.prototype.addValidationMetadata=function(e){var t=this.validationMetadatas.get(e.target);t?t.push(e):this.validationMetadatas.set(e.target,[e])},e.prototype.addConstraintMetadata=function(e){var t=this.constraintMetadatas.get(e.target);t?t.push(e):this.constraintMetadatas.set(e.target,[e])},e.prototype.groupByPropertyName=function(e){var t={};return e.forEach((function(e){t[e.propertyName]||(t[e.propertyName]=[]),t[e.propertyName].push(e)})),t},e.prototype.getTargetValidationMetadatas=function(e,t,n,r,i){var a,s,o=function(e){return void 0!==e.always?e.always:(!e.groups||!e.groups.length)&&n},c=function(e){return!(!r||i&&i.length||!e.groups||!e.groups.length)},u=(this.validationMetadatas.get(e)||[]).filter((function(n){return(n.target===e||n.target===t)&&(!!o(n)||!c(n)&&(!(i&&i.length>0)||n.groups&&!!n.groups.find((function(e){return-1!==i.indexOf(e)}))))})),l=[];try{for(var p=tu(this.validationMetadatas.entries()),d=p.next();!d.done;d=p.next()){var f=nu(d.value,2),h=f[0],m=f[1];e.prototype instanceof h&&l.push.apply(l,ru([],nu(m),!1))}}catch(e){a={error:e}}finally{try{d&&!d.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}var g=l.filter((function(t){return"string"!=typeof t.target&&(t.target!==e&&((!(t.target instanceof Function)||e.prototype instanceof t.target)&&(!!o(t)||!c(t)&&(!(i&&i.length>0)||t.groups&&!!t.groups.find((function(e){return-1!==i.indexOf(e)}))))))})),b=g.filter((function(e){return!u.find((function(t){return t.propertyName===e.propertyName&&t.type===e.type}))}));return u.concat(b)},e.prototype.getTargetValidatorConstraints=function(e){return this.constraintMetadatas.get(e)||[]},e}();function au(){var e=eu();return e.classValidatorMetadataStorage||(e.classValidatorMetadataStorage=new iu),e.classValidatorMetadataStorage}var su=function(){function e(){}return e.isValid=function(e){var t=this;return"isValid"!==e&&"getMessage"!==e&&-1!==Object.keys(this).map((function(e){return t[e]})).indexOf(e)},e.CUSTOM_VALIDATION="customValidation",e.NESTED_VALIDATION="nestedValidation",e.PROMISE_VALIDATION="promiseValidation",e.CONDITIONAL_VALIDATION="conditionalValidation",e.WHITELIST="whitelistValidation",e.IS_DEFINED="isDefined",e}(),ou=new(function(){function e(){this.instances=[]}return e.prototype.get=function(e){var t=this.instances.find((function(t){return t.type===e}));return t||(t={type:e,object:new e},this.instances.push(t)),t.object},e}());function cu(e){return ou.get(e)}function uu(e){return function(t,n){var r={type:su.WHITELIST,target:t.constructor,propertyName:n,validationOptions:e};au().addValidationMetadata(new Xc(r))}}var lu=function(){function e(e,t,n){void 0===n&&(n=!1),this.target=e,this.name=t,this.async=n}return Object.defineProperty(e.prototype,"instance",{get:function(){return cu(this.target)},enumerable:!1,configurable:!0}),e}();function pu(e){var t;if(e.validator instanceof Function){if(t=e.validator,cu(iu).getTargetValidatorConstraints(e.validator).length>1)throw"More than one implementation of ValidatorConstraintInterface found for validator on: ".concat(e.target.name,":").concat(e.propertyName)}else{var n=e.validator;t=function(){function e(){}return e.prototype.validate=function(e,t){return n.validate(e,t)},e.prototype.defaultMessage=function(e){return n.defaultMessage?n.defaultMessage(e):""},e}(),au().addConstraintMetadata(new lu(t,e.name,e.async))}var r={type:e.name&&su.isValid(e.name)?e.name:su.CUSTOM_VALIDATION,name:e.name,target:e.target,propertyName:e.propertyName,validationOptions:e.options,constraintCls:t,constraints:e.constraints};au().addValidationMetadata(new Xc(r))}function du(e,t){return function(n){var r=t&&t.each?"each value in ":"";return e(r,n)}}function fu(e,t){return function(n,r){pu({name:e.name,target:n.constructor,propertyName:r,options:t,constraints:e.constraints,validator:e.validator})}}function hu(e){return function(t,n){var r={type:su.CONDITIONAL_VALIDATION,target:t.constructor,propertyName:n,constraints:[function(e,t){return null!==e[n]&&void 0!==e[n]}],validationOptions:e};au().addValidationMetadata(new Xc(r))}}var mu=function(){return mu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},mu.apply(this,arguments)};function gu(e){var t=mu({},e),n=t.each?"each value in ":"";return t.message=t.message||n+"nested property $property must be either object or array",function(e,n){var r={type:su.NESTED_VALIDATION,target:e.constructor,propertyName:n,validationOptions:t};au().addValidationMetadata(new Xc(r))}}var bu,yu={exports:{}};function vu(){return bu||(bu=1,function(e,t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t="string"==typeof e||e instanceof String;if(!t){var r=n(e);throw null===e?r="null":"object"===r&&(r=e.constructor.name),new TypeError("Expected a string but received a ".concat(r))}},e.exports=t.default,e.exports.default=t.default}(yu,yu.exports)),yu.exports}function xu(e){return fu({name:"isNotEmpty",validator:{validate:function(e,t){return function(e){return""!==e&&null!=e}(e)},defaultMessage:du((function(e){return e+"$property should not be empty"}),e)}},e)}function wu(e,t){return fu({name:"min",constraints:[e],validator:{validate:function(e,t){return function(e,t){return"number"==typeof e&&"number"==typeof t&&e>=t}(e,null==t?void 0:t.constraints[0])},defaultMessage:du((function(e){return e+"$property must not be less than $constraint1"}),t)}},t)}var _u,Su={exports:{}};function Eu(){return _u||(_u=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e);var n=i[[void 0,null].includes(t)?"all":t];return!!n&&n.test(e)};var n,r=(n=vu())&&n.__esModule?n:{default:n};var i={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,7:/^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};e.exports=t.default,e.exports.default=t.default}(Su,Su.exports)),Su.exports}var ku=q(Eu());function Mu(e,t){return fu({name:"isUuid",constraints:[e],validator:{validate:function(e,t){return function(e,t){return"string"==typeof e&&ku(e,t)}(e,null==t?void 0:t.constraints[0])},defaultMessage:du((function(e){return e+"$property must be a UUID"}),t)}},t)}var Tu,Au={exports:{}};function Ru(){return Tu||(Tu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e);var n=new RegExp("^[a-fA-F0-9]{".concat(i[t],"}$"));return n.test(e)};var n,r=(n=vu())&&n.__esModule?n:{default:n};var i={md5:32,md4:32,sha1:40,sha256:64,sha384:96,sha512:128,ripemd128:32,ripemd160:40,tiger128:32,tiger160:40,tiger192:48,crc32:8,crc32b:8};e.exports=t.default,e.exports.default=t.default}(Au,Au.exports)),Au.exports}var Ou=q(Ru());function Iu(e,t){return fu({name:"isHash",constraints:[e],validator:{validate:function(e,t){return function(e,t){return"string"==typeof e&&Ou(e,t)}(e,null==t?void 0:t.constraints[0])},defaultMessage:du((function(e){return e+"$property must be a hash of type $constraint1"}),t)}},t)}var Nu,Pu={exports:{}};function ju(){return Nu||(Nu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(e),i.test(e)};var n,r=(n=vu())&&n.__esModule?n:{default:n};var i=/^(0x)[0-9a-f]{40}$/i;e.exports=t.default,e.exports.default=t.default}(Pu,Pu.exports)),Pu.exports}var Du=q(ju());function Lu(e){return fu({name:"isEthereumAddress",validator:{validate:function(e,t){return function(e){return"string"==typeof e&&Du(e)}(e)},defaultMessage:du((function(e){return e+"$property must be an Ethereum address"}),e)}},e)}function Cu(e,t){return void 0===e&&(e={}),fu({name:"isNumber",constraints:[e],validator:{validate:function(e,t){return function(e,t){if(void 0===t&&(t={}),"number"!=typeof e)return!1;if(e===1/0||e===-1/0)return!!t.allowInfinity;if(Number.isNaN(e))return!!t.allowNaN;if(void 0!==t.maxDecimalPlaces){var n=0;if(e%1!=0&&(n=e.toString().split(".")[1].length),n>t.maxDecimalPlaces)return!1}return Number.isFinite(e)}(e,null==t?void 0:t.constraints[0])},defaultMessage:du((function(e){return e+"$property must be a number conforming to the specified constraints"}),t)}},t)}var $u=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return s};function Bu(e){return Object.entries(e).filter((function(e){var t=$u(e,2),n=t[0];return t[1],isNaN(parseInt(n))})).map((function(e){var t=$u(e,2);return t[0],t[1]}))}function zu(e,t){return fu({name:"isEnum",constraints:[e,Bu(e)],validator:{validate:function(e,t){return function(e,t){return Object.keys(t).map((function(e){return t[e]})).includes(e)}(e,null==t?void 0:t.constraints[0])},defaultMessage:du((function(e){return e+"$property must be one of the following values: $constraint2"}),t)}},t)}function Uu(e){return fu({name:"isString",validator:{validate:function(e,t){return function(e){return e instanceof String||"string"==typeof e}(e)},defaultMessage:du((function(e){return e+"$property must be a string"}),e)}},e)}function Fu(){return function(e,t){pu({name:"IsUnixTimestamp",target:e.constructor,propertyName:t,validator:{validate(e){const t=e,n=new Date(t);return!isNaN(n.getTime())&&t>16725312e5}}})}}function qu(){return function(e,t){pu({name:"IsUnixTimestamp",target:e.constructor,propertyName:t,validator:{validate(e){const t=e,n=new Date(t);return!isNaN(n.getTime())&&t>1672531200}}})}}var Hu,Yu,Vu,Gu=function(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},Ku=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};!function(e){e.FAILED="failed",e.SUCCEED="succeed",e.RUNNING="running"}(Hu||(Hu={}));class Wu{iv;ephemPublicKey;ciphertext;mac;constructor(e,t,n,r){this.iv=e,this.ephemPublicKey=t,this.ciphertext=n,this.mac=r}}Gu([xu(),Uu(),Ku("design:type",String)],Wu.prototype,"iv",void 0),Gu([xu(),Uu(),Ku("design:type",String)],Wu.prototype,"ephemPublicKey",void 0),Gu([xu(),Uu(),Ku("design:type",String)],Wu.prototype,"ciphertext",void 0),Gu([xu(),Uu(),Ku("design:type",String)],Wu.prototype,"mac",void 0);class Zu{v;r;s;constructor(e,t,n){this.v=e,this.r=t,this.s=n}}Gu([xu(),Cu(),Ku("design:type",Number)],Zu.prototype,"v",void 0),Gu([xu(),Uu(),Ku("design:type",String)],Zu.prototype,"r",void 0),Gu([xu(),Uu(),Ku("design:type",String)],Zu.prototype,"s",void 0);class Ju{memoryGrowDelta;call;frame;steps;constructor(e,t,n,r){this.call=e,this.frame=t,this.steps=n,this.memoryGrowDelta=r}}Gu([Cu(),hu(),Ku("design:type",Number)],Ju.prototype,"memoryGrowDelta",void 0),Gu([Cu(),xu(),Ku("design:type",Number)],Ju.prototype,"call",void 0),Gu([Cu(),xu(),Ku("design:type",Number)],Ju.prototype,"frame",void 0),Gu([Cu(),xu(),Ku("design:type",Number)],Ju.prototype,"steps",void 0);class Xu{call;frame;gas;memory;constructor(e,t,n,r){this.call=e,this.frame=t,this.gas=n,this.memory=r}}Gu([Cu(),xu(),Ku("design:type",Number)],Xu.prototype,"call",void 0),Gu([Cu(),xu(),Ku("design:type",Number)],Xu.prototype,"frame",void 0),Gu([Cu(),xu(),Ku("design:type",Number)],Xu.prototype,"gas",void 0),Gu([Cu(),xu(),Ku("design:type",Number)],Xu.prototype,"memory",void 0);class Qu{call;frame;memory;constructor(e,t,n){this.call=e,this.frame=t,this.memory=n}}Gu([Cu(),xu(),Ku("design:type",Number)],Qu.prototype,"call",void 0),Gu([Cu(),xu(),Ku("design:type",Number)],Qu.prototype,"frame",void 0),Gu([Cu(),xu(),Ku("design:type",Number)],Qu.prototype,"memory",void 0);class el{protocol;constructor(e){this.protocol=e}}Gu([Uu(),xu(),Ku("design:type",String)],el.prototype,"protocol",void 0);class tl{last;limits;peak;versions;constructor(e,t,n,r){this.last=e,this.limits=t,this.peak=n,this.versions=r}}Gu([gu(),Ku("design:type",Ju)],tl.prototype,"last",void 0),Gu([gu(),Ku("design:type",Xu)],tl.prototype,"limits",void 0),Gu([gu(),Ku("design:type",Qu)],tl.prototype,"peak",void 0),Gu([hu(),gu(),Ku("design:type",el)],tl.prototype,"versions",void 0);class nl{senderAddress;status;output;metering;constructor(e,t,n,r){this.senderAddress=e,this.status=t,this.output=n,this.metering=r}}Gu([xu(),Lu(),Ku("design:type",String)],nl.prototype,"senderAddress",void 0),Gu([xu(),zu(Hu),Ku("design:type",String)],nl.prototype,"status",void 0),Gu([hu(),Uu(),Ku("design:type",String)],nl.prototype,"output",void 0),Gu([hu(),gu(),Ku("design:type",tl)],nl.prototype,"metering",void 0);class rl{signature;clearTextSolution;constructor(e,t){this.signature=e,this.clearTextSolution=t}}Gu([gu(),Ku("design:type",Zu)],rl.prototype,"signature",void 0),Gu([gu(),Ku("design:type",nl)],rl.prototype,"clearTextSolution",void 0);class il{blockNumber;selectionStrategy;setNodes;constructor(e,t,n){this.blockNumber=e,this.selectionStrategy=t,this.setNodes=Array.from(n)}}Gu([xu(),wu(0),Ku("design:type",Number)],il.prototype,"blockNumber",void 0),Gu([xu(),Uu(),Ku("design:type",String)],il.prototype,"selectionStrategy",void 0),Gu([fu({name:"arrayNotEmpty",validator:{validate:function(e,t){return n=e,Array.isArray(n)&&n.length>0;var n},defaultMessage:du((function(e){return e+"$property should not be empty"}),Yu)}},Yu),xu({each:!0}),Lu({each:!0}),Ku("design:type",Array)],il.prototype,"setNodes",void 0);class al{gas;call;frame;memory;constructor(e,t,n,r){this.gas=e,this.call=t,this.frame=n,this.memory=r}}Gu([xu(),Uu(),Ku("design:type",String)],al.prototype,"gas",void 0),Gu([xu(),Uu(),Ku("design:type",String)],al.prototype,"call",void 0),Gu([xu(),Uu(),Ku("design:type",String)],al.prototype,"frame",void 0),Gu([xu(),Uu(),Ku("design:type",String)],al.prototype,"memory",void 0);class sl{reward;requiredSolutions;totalSolutions;executionTimeout;constructor(e,t,n,r){this.reward=e,this.requiredSolutions=t,this.totalSolutions=n,this.executionTimeout=r}}Gu([xu(),Uu(),Ku("design:type",String)],sl.prototype,"reward",void 0),Gu([wu(1),xu(),Cu(),Ku("design:type",Number)],sl.prototype,"requiredSolutions",void 0),Gu([wu(1),xu(),Cu(),Ku("design:type",Number)],sl.prototype,"totalSolutions",void 0),Gu([wu(1),xu(),Cu(),Ku("design:type",Number)],sl.prototype,"executionTimeout",void 0);class ol{request;response;constructor(e,t){this.request=e,this.response=t}}Gu([xu(),Cu(),Ku("design:type",Number)],ol.prototype,"request",void 0),Gu([xu(),Cu(),Ku("design:type",Number)],ol.prototype,"response",void 0),function(e){e.BINDLE="bindle",e.S3="s3"}(Vu||(Vu={}));var cl,ul=function(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},ll=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class pl{msgType;messageId;payload;msgTimestamp=Date.now();traceCarrier;constructor(e,t,n){this.msgType=this.constructor.name,this.traceCarrier=n,this.messageId=t||S(),this.payload=e}}ul([xu(),Uu(),ll("design:type",String)],pl.prototype,"msgType",void 0),ul([hu(),Mu(),ll("design:type",String)],pl.prototype,"messageId",void 0),ul([gu(),ll("design:type",Object)],pl.prototype,"payload",void 0),ul([Fu(),ll("design:type",Number)],pl.prototype,"msgTimestamp",void 0),ul([hu(),ll("design:type",Object)],pl.prototype,"traceCarrier",void 0);ul([xu(),Uu(),ll("design:type",String)],class extends pl{error;constructor(e,t,n,r){super(t,n,r),this.error=e}}.prototype,"error",void 0);ul([xu(),Uu(),ll("design:type",String)],class extends pl{error;constructor(e,t,n,r){super(t,n,r),this.error=e}}.prototype,"error",void 0),function(e){e.EVM="evm",e.AVALANCHE="avalanche"}(cl||(cl={}));var dl,fl=function(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},hl=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};!function(e){e.TASK_CREATED="task_created",e.API_TASK_CREATED="api_task_created",e.NODE_OUTCOME="node_outcome",e.TASK_SOLVED="task_solved",e.API_OUTCOME="api_outcome",e.SOLUTIONS_REVEALED="solutions_revealed",e.EXECUTION_COMPLETED="execution_completed"}(dl||(dl={}));class ml{type;executionId;message;msgHash;signature;sequencerAddress;timestamp;constructor(e,t,n,r,i,a,s){this.type=e,this.executionId=t,this.message=r,this.msgHash=n,this.signature=new Zu(i.v,i.r,i.s),this.timestamp=s,this.sequencerAddress=a}}fl([xu(),zu(dl),hl("design:type",String)],ml.prototype,"type",void 0),fl([Mu(),xu(),hl("design:type",String)],ml.prototype,"executionId",void 0),fl([gu(),hl("design:type",Object)],ml.prototype,"message",void 0),fl([xu(),Iu("sha256"),hl("design:type",String)],ml.prototype,"msgHash",void 0),fl([gu(),hl("design:type",Zu)],ml.prototype,"signature",void 0),fl([xu(),Lu(),hl("design:type",String)],ml.prototype,"sequencerAddress",void 0),fl([Fu(),xu(),hl("design:type",Number)],ml.prototype,"timestamp",void 0);class gl{type="dispatch_task";taskId;executionId;msgHash;signature;limits;econParams;workers;dispatcherTimestamp;taskRequesterTimestamp;ledgerName;blockHash;blockNumber;chainId;nodeRegistryContractAddress;taskRegistryContractAddress;taskAuthorizationContractAddress;taskRequesterAddress;taskPath;taskVersion;signedRequestBody;senderAddress;input;constructor(e,t,n,r,i,a,s,o,c,u,l,p,d,f,h,m,g,b,y,v,x,w){this.taskId=e,this.executionId=t,this.msgHash=n,this.signature=new Zu(r.v,r.r,r.s),this.limits=new al(i.gas,i.call,i.frame,i.memory),this.econParams=new sl(a.reward,a.requiredSolutions,a.totalSolutions,a.executionTimeout),this.workers=new il(s.blockNumber,s.selectionStrategy,s.setNodes),this.dispatcherTimestamp=o,this.taskRequesterTimestamp=c,this.ledgerName=u,this.blockHash=l,this.blockNumber=p,this.chainId=d,this.nodeRegistryContractAddress=f,this.taskRegistryContractAddress=h,this.taskAuthorizationContractAddress=m,this.taskRequesterAddress=g,this.taskPath=b,this.taskVersion=y,this.signedRequestBody=w,this.senderAddress=v,this.input=x}}fl([xu(),Uu(),hl("design:type",String)],gl.prototype,"taskId",void 0),fl([xu(),Mu(),hl("design:type",String)],gl.prototype,"executionId",void 0),fl([xu(),Iu("sha256"),hl("design:type",String)],gl.prototype,"msgHash",void 0),fl([gu(),hl("design:type",Zu)],gl.prototype,"signature",void 0),fl([gu(),hl("design:type",al)],gl.prototype,"limits",void 0),fl([gu(),hl("design:type",sl)],gl.prototype,"econParams",void 0),fl([gu(),hl("design:type",il)],gl.prototype,"workers",void 0),fl([xu(),qu(),hl("design:type",Number)],gl.prototype,"dispatcherTimestamp",void 0),fl([xu(),qu(),hl("design:type",Number)],gl.prototype,"taskRequesterTimestamp",void 0),fl([xu(),zu(cl),hl("design:type",String)],gl.prototype,"ledgerName",void 0),fl([xu(),hl("design:type",String)],gl.prototype,"blockHash",void 0),fl([xu(),wu(0),hl("design:type",Number)],gl.prototype,"blockNumber",void 0),fl([xu(),Uu(),hl("design:type",String)],gl.prototype,"chainId",void 0),fl([xu(),Lu(),hl("design:type",String)],gl.prototype,"nodeRegistryContractAddress",void 0),fl([xu(),Lu(),hl("design:type",String)],gl.prototype,"taskRegistryContractAddress",void 0),fl([xu(),Lu(),hl("design:type",String)],gl.prototype,"taskAuthorizationContractAddress",void 0),fl([xu(),Lu(),hl("design:type",String)],gl.prototype,"taskRequesterAddress",void 0),fl([hu(),hl("design:type",String)],gl.prototype,"taskPath",void 0),fl([hu(),wu(0),hl("design:type",Number)],gl.prototype,"taskVersion",void 0),fl([hu(),hl("design:type",Object)],gl.prototype,"signedRequestBody",void 0),fl([xu(),Lu(),hl("design:type",String)],gl.prototype,"senderAddress",void 0),fl([hu(),uu(),hl("design:type",String)],gl.prototype,"input",void 0);class bl{type="dispatch_task";taskId;executionId;msgHash;signature;ledgerName;blockHash;blockNumber;chainId;taskRegistryContractAddress;taskAuthorizationContractAddress;taskRequesterAddress;taskPath;taskVersion;senderAddress;executionTimeout;input;constructor(e,t,n,r,i,a,s,o,c,u,l,p,d,f,h,m){this.taskId=e,this.executionId=t,this.msgHash=n,this.signature=new Zu(r.v,r.r,r.s),this.executionTimeout=h,this.ledgerName=a,this.blockHash=s,this.blockNumber=o,this.chainId=c,this.taskRegistryContractAddress=u,this.taskAuthorizationContractAddress=l,this.taskRequesterAddress=p,this.taskPath=d,this.taskVersion=f,this.senderAddress=i,this.input=m}}fl([xu(),Uu(),hl("design:type",String)],bl.prototype,"taskId",void 0),fl([xu(),Mu(),hl("design:type",String)],bl.prototype,"executionId",void 0),fl([xu(),Iu("sha256"),hl("design:type",String)],bl.prototype,"msgHash",void 0),fl([gu(),hl("design:type",Zu)],bl.prototype,"signature",void 0),fl([xu(),zu(cl),hl("design:type",String)],bl.prototype,"ledgerName",void 0),fl([xu(),hl("design:type",String)],bl.prototype,"blockHash",void 0),fl([xu(),wu(0),hl("design:type",Number)],bl.prototype,"blockNumber",void 0),fl([xu(),Uu(),hl("design:type",String)],bl.prototype,"chainId",void 0),fl([xu(),Lu(),hl("design:type",String)],bl.prototype,"taskRegistryContractAddress",void 0),fl([xu(),Lu(),hl("design:type",String)],bl.prototype,"taskAuthorizationContractAddress",void 0),fl([xu(),Lu(),hl("design:type",String)],bl.prototype,"taskRequesterAddress",void 0),fl([hu(),hl("design:type",String)],bl.prototype,"taskPath",void 0),fl([hu(),wu(0),hl("design:type",Number)],bl.prototype,"taskVersion",void 0),fl([xu(),Lu(),hl("design:type",String)],bl.prototype,"senderAddress",void 0),fl([Cu(),hl("design:type",Number)],bl.prototype,"executionTimeout",void 0),fl([hu(),uu(),hl("design:type",String)],bl.prototype,"input",void 0);class yl{executionId;senderAddress;encryptedSolution;msgHash;signature;constructor(e,t,n,r,i){this.executionId=e,this.signature=new Zu(i.v,i.r,i.s),this.encryptedSolution=new Wu(n.iv,n.ephemPublicKey,n.ciphertext,n.mac),this.senderAddress=t,this.msgHash=r}}fl([Mu(),xu(),hl("design:type",String)],yl.prototype,"executionId",void 0),fl([xu(),Lu(),hl("design:type",String)],yl.prototype,"senderAddress",void 0),fl([gu(),hl("design:type",Wu)],yl.prototype,"encryptedSolution",void 0),fl([xu(),Iu("sha256"),hl("design:type",String)],yl.prototype,"msgHash",void 0),fl([gu(),hl("design:type",Zu)],yl.prototype,"signature",void 0);class vl{executionId;senderAddress;bodyResponse;msgHash;signature;tlsHandshakeHash;status;totalTransferredBytes;constructor(e,t,n,r,i,a,s,o){this.executionId=e,this.signature=new Zu(i.v,i.r,i.s),this.bodyResponse=n,this.tlsHandshakeHash=a,this.senderAddress=t,this.msgHash=r,this.status=s,this.totalTransferredBytes=new ol(o.request,o.response)}}fl([Mu(),xu(),hl("design:type",String)],vl.prototype,"executionId",void 0),fl([xu(),Lu(),hl("design:type",String)],vl.prototype,"senderAddress",void 0),fl([xu(),Iu("sha256"),hl("design:type",String)],vl.prototype,"msgHash",void 0),fl([gu(),hl("design:type",Zu)],vl.prototype,"signature",void 0),fl([xu(),Uu(),hl("design:type",String)],vl.prototype,"tlsHandshakeHash",void 0),fl([xu(),Uu(),hl("design:type",String)],vl.prototype,"status",void 0),fl([gu(),hl("design:type",ol)],vl.prototype,"totalTransferredBytes",void 0);var xl=function(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},wl=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class _l{executionId;msgHash;signature;limits;econParams;workers;senderAddress;input;constructor(e,t,n,r,i,a,s,o){this.executionId=e,this.msgHash=t,this.signature=new Zu(n.v,n.r,n.s),this.limits=new al(r.gas,r.call,r.frame,r.memory),this.econParams=new sl(i.reward,i.requiredSolutions,i.totalSolutions,i.executionTimeout),this.workers=new il(a.blockNumber,a.selectionStrategy,a.setNodes),this.senderAddress=s,this.input=o}}xl([Mu(),xu(),wl("design:type",String)],_l.prototype,"executionId",void 0),xl([xu(),Iu("sha256"),wl("design:type",String)],_l.prototype,"msgHash",void 0),xl([gu(),wl("design:type",Zu)],_l.prototype,"signature",void 0),xl([gu(),wl("design:type",al)],_l.prototype,"limits",void 0),xl([gu(),wl("design:type",sl)],_l.prototype,"econParams",void 0),xl([gu(),wl("design:type",il)],_l.prototype,"workers",void 0),xl([xu(),Uu(),wl("design:type",String)],_l.prototype,"senderAddress",void 0),xl([xu(),Uu(),wl("design:type",String)],_l.prototype,"input",void 0);class Sl{executionId;limits;econParams;workers;input;constructor(e,t,n,r,i){this.executionId=e,this.limits=new al(t.gas,t.call,t.frame,t.memory),this.econParams=new sl(n.reward,n.requiredSolutions,n.totalSolutions,n.executionTimeout),this.workers=new il(r.blockNumber,r.selectionStrategy,r.setNodes),this.input=i}}xl([Mu(),xu(),wl("design:type",String)],Sl.prototype,"executionId",void 0),xl([gu(),wl("design:type",al)],Sl.prototype,"limits",void 0),xl([gu(),wl("design:type",sl)],Sl.prototype,"econParams",void 0),xl([gu(),wl("design:type",il)],Sl.prototype,"workers",void 0);xl([gu(),wl("design:type",yl)],class extends ml{message;constructor(e,t,n,r,i,a){super(dl.NODE_OUTCOME,e,t,n,r,i,a),this.message=n,this.executionId=e,this.msgHash=t,this.signature=new Zu(r.v,r.r,r.s),this.timestamp=a,this.sequencerAddress=i,this.message=n}}.prototype,"message",void 0);xl([gu(),wl("design:type",vl)],class extends ml{message;constructor(e,t,n,r,i,a){super(dl.API_OUTCOME,e,t,n,r,i,a),this.message=n,this.executionId=e,this.msgHash=t,this.signature=new Zu(r.v,r.r,r.s),this.timestamp=a,this.sequencerAddress=i}}.prototype,"message",void 0);class El{type;executionId;transcriptHash;status;signature;signerAddress;timestamp;constructor(e,t,n,r,i,a){this.type=dl.EXECUTION_COMPLETED,this.executionId=e,this.transcriptHash=t,this.status=n,this.signature=new Zu(r.v,r.r,r.s),this.signerAddress=i,this.timestamp=a}}xl([xu(),Uu(),wl("design:type",String)],El.prototype,"type",void 0),xl([Mu(),xu(),wl("design:type",String)],El.prototype,"executionId",void 0),xl([xu(),Iu("sha256"),wl("design:type",String)],El.prototype,"transcriptHash",void 0),xl([xu(),zu(Wc),wl("design:type",String)],El.prototype,"status",void 0),xl([gu(),wl("design:type",Zu)],El.prototype,"signature",void 0),xl([xu(),Uu(),wl("design:type",String)],El.prototype,"signerAddress",void 0),xl([Fu(),xu(),wl("design:type",Number)],El.prototype,"timestamp",void 0);class kl{type;executionId;signature;clearTextSolutions;sequencerAddress;msgHash;timestamp;constructor(e,t,n,r,i,a){this.type=dl.SOLUTIONS_REVEALED,this.executionId=e,this.signature=new Zu(t.v,t.r,t.s),this.clearTextSolutions=n,this.sequencerAddress=r,this.msgHash=i,this.timestamp=a}}xl([Mu(),xu(),wl("design:type",String)],kl.prototype,"executionId",void 0),xl([gu(),wl("design:type",Zu)],kl.prototype,"signature",void 0),xl([gu(),wl("design:type",Array)],kl.prototype,"clearTextSolutions",void 0),xl([xu(),Lu(),wl("design:type",String)],kl.prototype,"sequencerAddress",void 0),xl([xu(),Iu("sha256"),wl("design:type",String)],kl.prototype,"msgHash",void 0),xl([Fu(),xu(),wl("design:type",Number)],kl.prototype,"timestamp",void 0);class Ml extends ml{executionId;msgHash;message;signature;publicKey;sequencerAddress;timestamp;constructor(e,t,n,r,i,a,s){super(dl.TASK_CREATED,e,t,n,r,a,s),this.message=n,this.executionId=e,this.msgHash=t,this.signature=new Zu(r.v,r.r,r.s),this.timestamp=s,this.sequencerAddress=a,this.publicKey=i,this.message=n}}xl([xu(),Mu(),wl("design:type",String)],Ml.prototype,"executionId",void 0),xl([xu(),Iu("sha256"),wl("design:type",String)],Ml.prototype,"msgHash",void 0),xl([gu(),wl("design:type",gl)],Ml.prototype,"message",void 0),xl([gu(),wl("design:type",Zu)],Ml.prototype,"signature",void 0),xl([xu(),Uu(),wl("design:type",String)],Ml.prototype,"publicKey",void 0),xl([xu(),Lu(),wl("design:type",String)],Ml.prototype,"sequencerAddress",void 0),xl([Fu(),xu(),wl("design:type",Number)],Ml.prototype,"timestamp",void 0);class Tl extends ml{executionId;msgHash;message;signature;publicKey;sequencerAddress;timestamp;constructor(e,t,n,r,i,a,s){super(dl.API_TASK_CREATED,e,t,n,r,a,s),this.message=n,this.executionId=e,this.msgHash=t,this.signature=new Zu(r.v,r.r,r.s),this.timestamp=s,this.sequencerAddress=a,this.publicKey=i,this.message=n}}xl([xu(),Mu(),wl("design:type",String)],Tl.prototype,"executionId",void 0),xl([xu(),Iu("sha256"),wl("design:type",String)],Tl.prototype,"msgHash",void 0),xl([gu(),wl("design:type",bl)],Tl.prototype,"message",void 0),xl([gu(),wl("design:type",Zu)],Tl.prototype,"signature",void 0),xl([xu(),Uu(),wl("design:type",String)],Tl.prototype,"publicKey",void 0),xl([xu(),Lu(),wl("design:type",String)],Tl.prototype,"sequencerAddress",void 0),xl([Fu(),xu(),wl("design:type",Number)],Tl.prototype,"timestamp",void 0);var Al=function(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},Rl=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class Ol{executionId;msgHash;signature;senderAddress;encryptedSolution;constructor(e,t,n,r,i){this.executionId=e,this.msgHash=t,this.signature=new Zu(n.v,n.r,n.s),this.senderAddress=r,this.encryptedSolution=new Wu(i.iv,i.ephemPublicKey,i.ciphertext,i.mac)}}Al([Mu(),xu(),Rl("design:type",String)],Ol.prototype,"executionId",void 0),Al([xu(),Iu("sha256"),Rl("design:type",String)],Ol.prototype,"msgHash",void 0),Al([gu(),Rl("design:type",Zu)],Ol.prototype,"signature",void 0),Al([xu(),Lu(),Rl("design:type",String)],Ol.prototype,"senderAddress",void 0),Al([gu(),Rl("design:type",Wu)],Ol.prototype,"encryptedSolution",void 0);var Il=function(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},Nl=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Il([xu(),Uu(),Nl("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);Il([xu(),Uu(),Nl("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);class Pl{input;checkpoint;taskId;constructor(e,t,n){this.taskId=e,this.checkpoint=t,this.input=n}}Il([xu(),Uu(),Nl("design:type",String)],Pl.prototype,"input",void 0),Il([xu(),Nl("design:type",Object)],Pl.prototype,"checkpoint",void 0),Il([xu(),Uu(),Nl("design:type",String)],Pl.prototype,"taskId",void 0);class jl{input;taskId;constructor(e,t){this.taskId=e,this.input=t}}Il([xu(),Uu(),Nl("design:type",String)],jl.prototype,"input",void 0),Il([xu(),Uu(),Nl("design:type",String)],jl.prototype,"taskId",void 0);class Dl{executionId;input;taskId;constructor(e,t,n){this.taskId=e,this.executionId=t,this.input=n}}Il([xu(),Mu(),Nl("design:type",String)],Dl.prototype,"executionId",void 0),Il([xu(),Uu(),Nl("design:type",String)],Dl.prototype,"input",void 0),Il([xu(),Uu(),Nl("design:type",String)],Dl.prototype,"taskId",void 0);class Ll{instrumentationId;taskId;constructor(e,t){this.taskId=e,this.instrumentationId=t}}Il([xu(),Mu(),Nl("design:type",String)],Ll.prototype,"instrumentationId",void 0),Il([xu(),Uu(),Nl("design:type",String)],Ll.prototype,"taskId",void 0);Il([xu(),Uu(),Nl("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);Il([xu(),Uu(),Nl("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);Il([xu(),Uu(),Nl("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);class Cl{checkpointHash;taskId;constructor(e,t){this.taskId=e,this.checkpointHash=t}}Il([xu(),Uu(),Nl("design:type",String)],Cl.prototype,"checkpointHash",void 0),Il([xu(),Uu(),Nl("design:type",String)],Cl.prototype,"taskId",void 0);Il([xu(),Uu(),Nl("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);class $l{checkpointCount;taskId;constructor(e,t){this.taskId=e,this.checkpointCount=t}}Il([xu(),Cu(),Nl("design:type",Number)],$l.prototype,"checkpointCount",void 0),Il([xu(),Uu(),Nl("design:type",String)],$l.prototype,"taskId",void 0);Il([xu(),Uu(),Nl("design:type",String)],class{taskId;constructor(e,t){this.taskId=t}}.prototype,"taskId",void 0);class Bl{executionId;output;taskId;constructor(e,t,n){this.taskId=e,this.executionId=t,this.output=n}}Il([xu(),Mu(),Nl("design:type",String)],Bl.prototype,"executionId",void 0),Il([hu(),Uu(),Nl("design:type",String)],Bl.prototype,"output",void 0),Il([xu(),Uu(),Nl("design:type",String)],Bl.prototype,"taskId",void 0);class zl{executionId;taskId;constructor(e,t,n){this.taskId=t,this.executionId=n}}Il([xu(),Mu(),Nl("design:type",String)],zl.prototype,"executionId",void 0),Il([xu(),Uu(),Nl("design:type",String)],zl.prototype,"taskId",void 0);class Ul{instrumentationId;output;taskId;instrumentedTaskId;constructor(e,t,n,r){this.taskId=e,this.instrumentationId=t,this.output=r,this.instrumentedTaskId=n}}Il([xu(),Mu(),Nl("design:type",String)],Ul.prototype,"instrumentationId",void 0),Il([xu(),Uu(),Nl("design:type",String)],Ul.prototype,"output",void 0),Il([xu(),Uu(),Nl("design:type",String)],Ul.prototype,"taskId",void 0),Il([xu(),Uu(),Nl("design:type",String)],Ul.prototype,"instrumentedTaskId",void 0);class Fl{instrumentationId;taskId;constructor(e,t,n){this.taskId=t,this.instrumentationId=n}}Il([xu(),Mu(),Nl("design:type",String)],Fl.prototype,"instrumentationId",void 0),Il([xu(),Uu(),Nl("design:type",String)],Fl.prototype,"taskId",void 0);var ql,Hl,Yl,Vl={},Gl="6.6.1",Kl={},Wl={exports:{}},Zl=Wl.exports;function Jl(){return ql||(ql=1,function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:require("buffer").Buffer}catch(e){}function s(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function o(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,n,r){for(var i=0,a=Math.min(e.length,n),s=t;s<a;s++){var o=e.charCodeAt(s)-48;i*=r,i+=o>=49?o-49+10:o>=17?o-17+10:o}return i}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,s,o=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,a=0,s=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=o(e,t,r)<<a,this.words[s]|=67108863&i,a>=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=o(e,t,r)<<a,this.words[s]|=67108863&i,a>=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;this.strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var a=e.length-n,s=a%r,o=Math.min(a,a-s)+n,u=0,l=n;l<o;l+=r)u=c(e,l,l+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var p=1;for(u=c(e,l,e.length,t),l=0;l<s;l++)p*=t;this.imuln(p),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],a=0|t.words[0],s=i*a,o=67108863&s,c=s/67108864|0;n.words[0]=o;for(var u=1;u<r;u++){for(var l=c>>>26,p=67108863&c,d=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=d;f++){var h=u-f|0;l+=(s=(i=0|e.words[h])*(a=0|t.words[f])+p)/67108864|0,p=67108863&s}n.words[u]=0|p,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n.strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,a=0,s=0;s<this.length;s++){var o=this.words[s],c=(16777215&(o<<i|a)).toString(16);a=o>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==a||s!==this.length-1?u[6-c.length]+c+r:c+r}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=l[e],f=p[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modn(f).toString(e);r=(h=h.idivn(f)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==a),this.toArrayLike(a,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var s,o,c="le"===t,u=new e(a),l=this.clone();if(c){for(o=0;!l.isZero();o++)s=l.andln(255),l.iushrn(8),u[o]=s;for(;o<a;o++)u[o]=0}else{for(o=0;o<a-i;o++)u[o]=0;for(o=0;!l.isZero();o++)s=l.andln(255),l.iushrn(8),u[a-o-1]=s}return u},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return n(!(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return n(!(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return n(!(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a<r.length;a++)t=(0|n.words[a])+(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<n.length;a++)t=(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var a=0,s=0;s<r.length;s++)a=(t=(0|n.words[s])-(0|r.words[s])+a)>>26,this.words[s]=67108863&t;for(;0!==a&&s<n.length;s++)a=(t=(0|n.words[s])+a)>>26,this.words[s]=67108863&t;if(0===a&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,n){var r,i,a,s=e.words,o=t.words,c=n.words,u=0,l=0|s[0],p=8191&l,d=l>>>13,f=0|s[1],h=8191&f,m=f>>>13,g=0|s[2],b=8191&g,y=g>>>13,v=0|s[3],x=8191&v,w=v>>>13,_=0|s[4],S=8191&_,E=_>>>13,k=0|s[5],M=8191&k,T=k>>>13,A=0|s[6],R=8191&A,O=A>>>13,I=0|s[7],N=8191&I,P=I>>>13,j=0|s[8],D=8191&j,L=j>>>13,C=0|s[9],$=8191&C,B=C>>>13,z=0|o[0],U=8191&z,F=z>>>13,q=0|o[1],H=8191&q,Y=q>>>13,V=0|o[2],G=8191&V,K=V>>>13,W=0|o[3],Z=8191&W,J=W>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ie=0|o[6],ae=8191&ie,se=ie>>>13,oe=0|o[7],ce=8191&oe,ue=oe>>>13,le=0|o[8],pe=8191&le,de=le>>>13,fe=0|o[9],he=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(p,U))|0)+((8191&(i=(i=Math.imul(p,F))+Math.imul(d,U)|0))<<13)|0;u=((a=Math.imul(d,F))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(h,U),i=(i=Math.imul(h,F))+Math.imul(m,U)|0,a=Math.imul(m,F);var be=(u+(r=r+Math.imul(p,H)|0)|0)+((8191&(i=(i=i+Math.imul(p,Y)|0)+Math.imul(d,H)|0))<<13)|0;u=((a=a+Math.imul(d,Y)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,U),i=(i=Math.imul(b,F))+Math.imul(y,U)|0,a=Math.imul(y,F),r=r+Math.imul(h,H)|0,i=(i=i+Math.imul(h,Y)|0)+Math.imul(m,H)|0,a=a+Math.imul(m,Y)|0;var ye=(u+(r=r+Math.imul(p,G)|0)|0)+((8191&(i=(i=i+Math.imul(p,K)|0)+Math.imul(d,G)|0))<<13)|0;u=((a=a+Math.imul(d,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(x,U),i=(i=Math.imul(x,F))+Math.imul(w,U)|0,a=Math.imul(w,F),r=r+Math.imul(b,H)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(y,H)|0,a=a+Math.imul(y,Y)|0,r=r+Math.imul(h,G)|0,i=(i=i+Math.imul(h,K)|0)+Math.imul(m,G)|0,a=a+Math.imul(m,K)|0;var ve=(u+(r=r+Math.imul(p,Z)|0)|0)+((8191&(i=(i=i+Math.imul(p,J)|0)+Math.imul(d,Z)|0))<<13)|0;u=((a=a+Math.imul(d,J)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(S,U),i=(i=Math.imul(S,F))+Math.imul(E,U)|0,a=Math.imul(E,F),r=r+Math.imul(x,H)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(w,H)|0,a=a+Math.imul(w,Y)|0,r=r+Math.imul(b,G)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(y,G)|0,a=a+Math.imul(y,K)|0,r=r+Math.imul(h,Z)|0,i=(i=i+Math.imul(h,J)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,J)|0;var xe=(u+(r=r+Math.imul(p,Q)|0)|0)+((8191&(i=(i=i+Math.imul(p,ee)|0)+Math.imul(d,Q)|0))<<13)|0;u=((a=a+Math.imul(d,ee)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(M,U),i=(i=Math.imul(M,F))+Math.imul(T,U)|0,a=Math.imul(T,F),r=r+Math.imul(S,H)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(E,H)|0,a=a+Math.imul(E,Y)|0,r=r+Math.imul(x,G)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(w,G)|0,a=a+Math.imul(w,K)|0,r=r+Math.imul(b,Z)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(y,Z)|0,a=a+Math.imul(y,J)|0,r=r+Math.imul(h,Q)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0;var we=(u+(r=r+Math.imul(p,ne)|0)|0)+((8191&(i=(i=i+Math.imul(p,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((a=a+Math.imul(d,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(R,U),i=(i=Math.imul(R,F))+Math.imul(O,U)|0,a=Math.imul(O,F),r=r+Math.imul(M,H)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(T,H)|0,a=a+Math.imul(T,Y)|0,r=r+Math.imul(S,G)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(E,G)|0,a=a+Math.imul(E,K)|0,r=r+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(w,Z)|0,a=a+Math.imul(w,J)|0,r=r+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,r=r+Math.imul(h,ne)|0,i=(i=i+Math.imul(h,re)|0)+Math.imul(m,ne)|0,a=a+Math.imul(m,re)|0;var _e=(u+(r=r+Math.imul(p,ae)|0)|0)+((8191&(i=(i=i+Math.imul(p,se)|0)+Math.imul(d,ae)|0))<<13)|0;u=((a=a+Math.imul(d,se)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(N,U),i=(i=Math.imul(N,F))+Math.imul(P,U)|0,a=Math.imul(P,F),r=r+Math.imul(R,H)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(O,H)|0,a=a+Math.imul(O,Y)|0,r=r+Math.imul(M,G)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(T,G)|0,a=a+Math.imul(T,K)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,J)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(w,Q)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(y,ne)|0,a=a+Math.imul(y,re)|0,r=r+Math.imul(h,ae)|0,i=(i=i+Math.imul(h,se)|0)+Math.imul(m,ae)|0,a=a+Math.imul(m,se)|0;var Se=(u+(r=r+Math.imul(p,ce)|0)|0)+((8191&(i=(i=i+Math.imul(p,ue)|0)+Math.imul(d,ce)|0))<<13)|0;u=((a=a+Math.imul(d,ue)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(D,U),i=(i=Math.imul(D,F))+Math.imul(L,U)|0,a=Math.imul(L,F),r=r+Math.imul(N,H)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(P,H)|0,a=a+Math.imul(P,Y)|0,r=r+Math.imul(R,G)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(O,G)|0,a=a+Math.imul(O,K)|0,r=r+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(T,Z)|0,a=a+Math.imul(T,J)|0,r=r+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(E,Q)|0,a=a+Math.imul(E,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(w,ne)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,i=(i=i+Math.imul(b,se)|0)+Math.imul(y,ae)|0,a=a+Math.imul(y,se)|0,r=r+Math.imul(h,ce)|0,i=(i=i+Math.imul(h,ue)|0)+Math.imul(m,ce)|0,a=a+Math.imul(m,ue)|0;var Ee=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,de)|0)+Math.imul(d,pe)|0))<<13)|0;u=((a=a+Math.imul(d,de)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul($,U),i=(i=Math.imul($,F))+Math.imul(B,U)|0,a=Math.imul(B,F),r=r+Math.imul(D,H)|0,i=(i=i+Math.imul(D,Y)|0)+Math.imul(L,H)|0,a=a+Math.imul(L,Y)|0,r=r+Math.imul(N,G)|0,i=(i=i+Math.imul(N,K)|0)+Math.imul(P,G)|0,a=a+Math.imul(P,K)|0,r=r+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,J)|0)+Math.imul(O,Z)|0,a=a+Math.imul(O,J)|0,r=r+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(T,Q)|0,a=a+Math.imul(T,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(E,ne)|0,a=a+Math.imul(E,re)|0,r=r+Math.imul(x,ae)|0,i=(i=i+Math.imul(x,se)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,se)|0,r=r+Math.imul(b,ce)|0,i=(i=i+Math.imul(b,ue)|0)+Math.imul(y,ce)|0,a=a+Math.imul(y,ue)|0,r=r+Math.imul(h,pe)|0,i=(i=i+Math.imul(h,de)|0)+Math.imul(m,pe)|0,a=a+Math.imul(m,de)|0;var ke=(u+(r=r+Math.imul(p,he)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(d,he)|0))<<13)|0;u=((a=a+Math.imul(d,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul($,H),i=(i=Math.imul($,Y))+Math.imul(B,H)|0,a=Math.imul(B,Y),r=r+Math.imul(D,G)|0,i=(i=i+Math.imul(D,K)|0)+Math.imul(L,G)|0,a=a+Math.imul(L,K)|0,r=r+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,J)|0)+Math.imul(P,Z)|0,a=a+Math.imul(P,J)|0,r=r+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(O,Q)|0,a=a+Math.imul(O,ee)|0,r=r+Math.imul(M,ne)|0,i=(i=i+Math.imul(M,re)|0)+Math.imul(T,ne)|0,a=a+Math.imul(T,re)|0,r=r+Math.imul(S,ae)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,se)|0,r=r+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(w,ce)|0,a=a+Math.imul(w,ue)|0,r=r+Math.imul(b,pe)|0,i=(i=i+Math.imul(b,de)|0)+Math.imul(y,pe)|0,a=a+Math.imul(y,de)|0;var Me=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(m,he)|0))<<13)|0;u=((a=a+Math.imul(m,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul($,G),i=(i=Math.imul($,K))+Math.imul(B,G)|0,a=Math.imul(B,K),r=r+Math.imul(D,Z)|0,i=(i=i+Math.imul(D,J)|0)+Math.imul(L,Z)|0,a=a+Math.imul(L,J)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(P,Q)|0,a=a+Math.imul(P,ee)|0,r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(O,ne)|0,a=a+Math.imul(O,re)|0,r=r+Math.imul(M,ae)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(T,ae)|0,a=a+Math.imul(T,se)|0,r=r+Math.imul(S,ce)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(E,ce)|0,a=a+Math.imul(E,ue)|0,r=r+Math.imul(x,pe)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(w,pe)|0,a=a+Math.imul(w,de)|0;var Te=(u+(r=r+Math.imul(b,he)|0)|0)+((8191&(i=(i=i+Math.imul(b,me)|0)+Math.imul(y,he)|0))<<13)|0;u=((a=a+Math.imul(y,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul($,Z),i=(i=Math.imul($,J))+Math.imul(B,Z)|0,a=Math.imul(B,J),r=r+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(P,ne)|0,a=a+Math.imul(P,re)|0,r=r+Math.imul(R,ae)|0,i=(i=i+Math.imul(R,se)|0)+Math.imul(O,ae)|0,a=a+Math.imul(O,se)|0,r=r+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(T,ce)|0,a=a+Math.imul(T,ue)|0,r=r+Math.imul(S,pe)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(E,pe)|0,a=a+Math.imul(E,de)|0;var Ae=(u+(r=r+Math.imul(x,he)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(w,he)|0))<<13)|0;u=((a=a+Math.imul(w,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul($,Q),i=(i=Math.imul($,ee))+Math.imul(B,Q)|0,a=Math.imul(B,ee),r=r+Math.imul(D,ne)|0,i=(i=i+Math.imul(D,re)|0)+Math.imul(L,ne)|0,a=a+Math.imul(L,re)|0,r=r+Math.imul(N,ae)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(P,ae)|0,a=a+Math.imul(P,se)|0,r=r+Math.imul(R,ce)|0,i=(i=i+Math.imul(R,ue)|0)+Math.imul(O,ce)|0,a=a+Math.imul(O,ue)|0,r=r+Math.imul(M,pe)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(T,pe)|0,a=a+Math.imul(T,de)|0;var Re=(u+(r=r+Math.imul(S,he)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(E,he)|0))<<13)|0;u=((a=a+Math.imul(E,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul($,ne),i=(i=Math.imul($,re))+Math.imul(B,ne)|0,a=Math.imul(B,re),r=r+Math.imul(D,ae)|0,i=(i=i+Math.imul(D,se)|0)+Math.imul(L,ae)|0,a=a+Math.imul(L,se)|0,r=r+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(P,ce)|0,a=a+Math.imul(P,ue)|0,r=r+Math.imul(R,pe)|0,i=(i=i+Math.imul(R,de)|0)+Math.imul(O,pe)|0,a=a+Math.imul(O,de)|0;var Oe=(u+(r=r+Math.imul(M,he)|0)|0)+((8191&(i=(i=i+Math.imul(M,me)|0)+Math.imul(T,he)|0))<<13)|0;u=((a=a+Math.imul(T,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul($,ae),i=(i=Math.imul($,se))+Math.imul(B,ae)|0,a=Math.imul(B,se),r=r+Math.imul(D,ce)|0,i=(i=i+Math.imul(D,ue)|0)+Math.imul(L,ce)|0,a=a+Math.imul(L,ue)|0,r=r+Math.imul(N,pe)|0,i=(i=i+Math.imul(N,de)|0)+Math.imul(P,pe)|0,a=a+Math.imul(P,de)|0;var Ie=(u+(r=r+Math.imul(R,he)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(O,he)|0))<<13)|0;u=((a=a+Math.imul(O,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul($,ce),i=(i=Math.imul($,ue))+Math.imul(B,ce)|0,a=Math.imul(B,ue),r=r+Math.imul(D,pe)|0,i=(i=i+Math.imul(D,de)|0)+Math.imul(L,pe)|0,a=a+Math.imul(L,de)|0;var Ne=(u+(r=r+Math.imul(N,he)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(P,he)|0))<<13)|0;u=((a=a+Math.imul(P,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul($,pe),i=(i=Math.imul($,de))+Math.imul(B,pe)|0,a=Math.imul(B,de);var Pe=(u+(r=r+Math.imul(D,he)|0)|0)+((8191&(i=(i=i+Math.imul(D,me)|0)+Math.imul(L,he)|0))<<13)|0;u=((a=a+Math.imul(L,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var je=(u+(r=Math.imul($,he))|0)+((8191&(i=(i=Math.imul($,me))+Math.imul(B,he)|0))<<13)|0;return u=((a=Math.imul(B,me))+(i>>>13)|0)+(je>>>26)|0,je&=67108863,c[0]=ge,c[1]=be,c[2]=ye,c[3]=ve,c[4]=xe,c[5]=we,c[6]=_e,c[7]=Se,c[8]=Ee,c[9]=ke,c[10]=Me,c[11]=Te,c[12]=Ae,c[13]=Re,c[14]=Oe,c[15]=Ie,c[16]=Ne,c[17]=Pe,c[18]=je,0!==u&&(c[19]=u,n.length++),n};function h(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(f=d),i.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?f(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,a=0;a<n.length-1;a++){var s=i;i=0;for(var o=67108863&r,c=Math.min(a,t.length-1),u=Math.max(0,a-e.length+1);u<=c;u++){var l=a-u,p=(0|e.words[l])*(0|t.words[u]),d=67108863&p;o=67108863&(d=d+o|0),i+=(s=(s=s+(p/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[a]=o,r=s,s=i}return 0!==r?n.words[a]=r:n.length--,n.strip()}(this,e,t):h(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},m.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},m.prototype.permute=function(e,t,n,r,i,a){for(var s=0;s<a;s++)r[s]=t[e[s]],i[s]=n[e[s]]},m.prototype.transform=function(e,t,n,r,i,a){this.permute(a,e,t,n,r,i);for(var s=1;s<i;s<<=1)for(var o=s<<1,c=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),l=0;l<i;l+=o)for(var p=c,d=u,f=0;f<s;f++){var h=n[l+f],m=r[l+f],g=n[l+f+s],b=r[l+f+s],y=p*g-d*b;b=p*b+d*g,g=y,n[l+f]=h+g,r[l+f]=m+b,n[l+f+s]=h-g,r[l+f+s]=m-b,f!==o&&(y=c*p-u*d,d=c*d+u*p,p=y)}},m.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},m.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},m.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,r,i){for(var a=0,s=0;s<t;s++)a+=0|e[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===a),n(!(-8192&a))},m.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},m.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),a=this.stub(r),s=new Array(r),o=new Array(r),c=new Array(r),u=new Array(r),l=new Array(r),p=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,u,r),this.transform(s,a,o,c,r,i),this.transform(u,a,l,p,r,i);for(var f=0;f<r;f++){var h=o[f]*l[f]-c[f]*p[f];c[f]=o[f]*p[f]+c[f]*l[f],o[f]=h}return this.conjugate(o,c,r),this.transform(o,c,d,a,r,i),this.conjugate(d,a,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),h(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var a=n.sqr();r<t.length;r++,a=a.sqr())0!==t[r]&&(n=n.mul(a));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var o=this.words[t]&a,c=(0|this.words[t])-o<<r;this.words[t]=c|s,s=o>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<<a,c=r;if(i-=s,i=Math.max(0,i),c){for(var u=0;u<s;u++)c.words[u]=this.words[u];c.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=i);u--){var p=0|this.words[u];this.words[u]=l<<26-a|p>>>a,l=p&o}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,a,s=e.length+r;this._expand(s);var o=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+o;var c=(0|e.words[i])*t;o=((a-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)o=(a=(0|this.words[i+r])+o)>>26,this.words[i+r]=67108863&a;if(0===o)return this.strip();for(n(-1===o),o=0,i=0;i<this.length;i++)o=(a=-(0|this.words[i])+o)>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),a=e,s=0|a.words[a.length-1];0!=(n=26-this._countBits(s))&&(a=a.ushln(n),r.iushln(n),s=0|a.words[a.length-1]);var o,c=r.length-a.length;if("mod"!==t){(o=new i(null)).length=c+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var l=r.clone()._ishlnsubmul(a,1,c);0===l.negative&&(r=l,o&&(o.words[c]=1));for(var p=c-1;p>=0;p--){var d=67108864*(0|r.words[a.length+p])+(0|r.words[a.length+p-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(a,d,p);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(a,1,p),r.isZero()||(r.negative^=1);o&&(o.words[p]=d)}return o&&o.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(a=o.div.neg()),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:a,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(a=o.div.neg()),{div:a,mod:o.mod}):this.negative&e.negative?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var a,s,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),a=n.cmp(r);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new i(1),s=new i(0),o=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),p=t.clone();!t.isZero();){for(var d=0,f=1;!(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(l),s.isub(p)),a.iushrn(1),s.iushrn(1);for(var h=0,m=1;!(r.words[0]&m)&&h<26;++h,m<<=1);if(h>0)for(r.iushrn(h);h-- >0;)(o.isOdd()||c.isOdd())&&(o.iadd(l),c.isub(p)),o.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(o),s.isub(c)):(r.isub(t),o.isub(a),c.isub(s))}return{a:o,b:c,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,s=new i(1),o=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,l=1;!(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var p=0,d=1;!(r.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(r.iushrn(p);p-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(o)):(r.isub(t),o.isub(s))}return(a=0===t.cmpn(1)?s:o).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var a=t;t=n,n=a}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new _(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},r(y,b),y.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&n,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&n)<<4|a>>>22,a=s}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(v,b),r(x,b),r(w,b),w.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new v;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return g[e]=t,t},_.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){n(!(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},_.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),s=0;!a.isZero()&&0===a.andln(1);)s++,a.iushrn(1);n(!a.isZero());var o=new i(1).toRed(this),c=o.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var p=this.pow(l,a),d=this.pow(e,a.addn(1).iushrn(1)),f=this.pow(e,a),h=s;0!==f.cmp(o);){for(var m=f,g=0;0!==m.cmp(o);g++)m=m.redSqr();n(g<h);var b=this.pow(p,new i(1).iushln(h-g-1));d=d.redMul(b),p=b.redSqr(),f=f.redMul(p),h=g}return d},_.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},_.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var a=n[0],s=0,o=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],l=c-1;l>=0;l--){var p=u>>l&1;a!==n[0]&&(a=this.sqr(a)),0!==p||0!==s?(s<<=1,s|=p,(4==++o||0===r&&0===l)&&(a=this.mul(a,n[s]),o=0,s=0)):o=0}c=26}return a},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new S(e)},r(S,_),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=n.isub(r).iushrn(this.shift),s=a;return a.cmp(this.m)>=0?s=a.isub(this.m):a.cmpn(0)<0&&(s=a.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(Wl,Zl)),Wl.exports}function Xl(){if(Yl)return Hl;function e(e,t){if(!e)throw new Error(t||"Assertion failed")}return Yl=1,Hl=e,e.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)},Hl}var Ql,ep,tp={};function np(){return Ql||(Ql=1,function(){var e=tp;function t(e){return 1===e.length?"0"+e:e}function n(e){for(var n="",r=0;r<e.length;r++)n+=t(e[r].toString(16));return n}e.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16))}else for(r=0;r<e.length;r++){var i=e.charCodeAt(r),a=i>>8,s=255&i;a?n.push(a,s):n.push(s)}return n},e.zero2=t,e.toHex=n,e.encode=function(e,t){return"hex"===t?n(e):e}}()),tp}function rp(){return ep||(ep=1,function(){var e=Kl,t=Jl(),n=Xl(),r=np();e.assert=n,e.toArray=r.toArray,e.zero2=r.zero2,e.toHex=r.toHex,e.encode=r.encode,e.getNAF=function(e,t,n){var r,i=new Array(Math.max(e.bitLength(),n)+1);for(r=0;r<i.length;r+=1)i[r]=0;var a=1<<t+1,s=e.clone();for(r=0;r<i.length;r++){var o,c=s.andln(a-1);s.isOdd()?(o=c>(a>>1)-1?(a>>1)-c:c,s.isubn(o)):o=0,i[r]=o,s.iushrn(1)}return i},e.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,i=0,a=0;e.cmpn(-i)>0||t.cmpn(-a)>0;){var s,o,c=e.andln(3)+i&3,u=t.andln(3)+a&3;3===c&&(c=-1),3===u&&(u=-1),s=1&c?3!==(r=e.andln(7)+i&7)&&5!==r||2!==u?c:-c:0,n[0].push(s),o=1&u?3!==(r=t.andln(7)+a&7)&&5!==r||2!==c?u:-u:0,n[1].push(o),2*i===s+1&&(i=1-i),2*a===o+1&&(a=1-a),e.iushrn(1),t.iushrn(1)}return n},e.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},e.parseBytes=function(t){return"string"==typeof t?e.toArray(t,"hex"):t},e.intFromLE=function(e){return new t(e,"hex","le")}}()),Kl}var ip,ap={exports:{}};function sp(){if(ip)return ap.exports;var e;function t(e){this.rand=e}if(ip=1,ap.exports=function(n){return e||(e=new t(null)),e.generate(n)},ap.exports.Rand=t,t.prototype.generate=function(e){return this._rand(e)},t.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?t.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?t.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(t.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var n=require("crypto");if("function"!=typeof n.randomBytes)throw new Error("Not supported");t.prototype._rand=function(e){return n.randomBytes(e)}}catch(e){}return ap.exports}var op,cp,up,lp,pp,dp,fp,hp,mp,gp={};function bp(){if(cp)return op;cp=1;var e=Jl(),t=rp(),n=t.getNAF,r=t.getJSF,i=t.assert;function a(t,n){this.type=t,this.p=new e(n.p,16),this.red=n.prime?e.red(n.prime):e.mont(this.p),this.zero=new e(0).toRed(this.red),this.one=new e(1).toRed(this.red),this.two=new e(2).toRed(this.red),this.n=n.n&&new e(n.n,16),this.g=n.g&&this.pointFromJSON(n.g,n.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function s(e,t){this.curve=e,this.type=t,this.precomputed=null}return op=a,a.prototype.point=function(){throw new Error("Not implemented")},a.prototype.validate=function(){throw new Error("Not implemented")},a.prototype._fixedNafMul=function(e,t){i(e.precomputed);var r=e._getDoubles(),a=n(t,1,this._bitLength),s=(1<<r.step+1)-(r.step%2==0?2:1);s/=3;var o,c,u=[];for(o=0;o<a.length;o+=r.step){c=0;for(var l=o+r.step-1;l>=o;l--)c=(c<<1)+a[l];u.push(c)}for(var p=this.jpoint(null,null,null),d=this.jpoint(null,null,null),f=s;f>0;f--){for(o=0;o<u.length;o++)(c=u[o])===f?d=d.mixedAdd(r.points[o]):c===-f&&(d=d.mixedAdd(r.points[o].neg()));p=p.add(d)}return p.toP()},a.prototype._wnafMul=function(e,t){var r=4,a=e._getNAFPoints(r);r=a.wnd;for(var s=a.points,o=n(t,r,this._bitLength),c=this.jpoint(null,null,null),u=o.length-1;u>=0;u--){for(var l=0;u>=0&&0===o[u];u--)l++;if(u>=0&&l++,c=c.dblp(l),u<0)break;var p=o[u];i(0!==p),c="affine"===e.type?p>0?c.mixedAdd(s[p-1>>1]):c.mixedAdd(s[-p-1>>1].neg()):p>0?c.add(s[p-1>>1]):c.add(s[-p-1>>1].neg())}return"affine"===e.type?c.toP():c},a.prototype._wnafMulAdd=function(e,t,i,a,s){var o,c,u,l=this._wnafT1,p=this._wnafT2,d=this._wnafT3,f=0;for(o=0;o<a;o++){var h=(u=t[o])._getNAFPoints(e);l[o]=h.wnd,p[o]=h.points}for(o=a-1;o>=1;o-=2){var m=o-1,g=o;if(1===l[m]&&1===l[g]){var b=[t[m],null,null,t[g]];0===t[m].y.cmp(t[g].y)?(b[1]=t[m].add(t[g]),b[2]=t[m].toJ().mixedAdd(t[g].neg())):0===t[m].y.cmp(t[g].y.redNeg())?(b[1]=t[m].toJ().mixedAdd(t[g]),b[2]=t[m].add(t[g].neg())):(b[1]=t[m].toJ().mixedAdd(t[g]),b[2]=t[m].toJ().mixedAdd(t[g].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],v=r(i[m],i[g]);for(f=Math.max(v[0].length,f),d[m]=new Array(f),d[g]=new Array(f),c=0;c<f;c++){var x=0|v[0][c],w=0|v[1][c];d[m][c]=y[3*(x+1)+(w+1)],d[g][c]=0,p[m]=b}}else d[m]=n(i[m],l[m],this._bitLength),d[g]=n(i[g],l[g],this._bitLength),f=Math.max(d[m].length,f),f=Math.max(d[g].length,f)}var _=this.jpoint(null,null,null),S=this._wnafT4;for(o=f;o>=0;o--){for(var E=0;o>=0;){var k=!0;for(c=0;c<a;c++)S[c]=0|d[c][o],0!==S[c]&&(k=!1);if(!k)break;E++,o--}if(o>=0&&E++,_=_.dblp(E),o<0)break;for(c=0;c<a;c++){var M=S[c];0!==M&&(M>0?u=p[c][M-1>>1]:M<0&&(u=p[c][-M-1>>1].neg()),_="affine"===u.type?_.mixedAdd(u):_.add(u))}}for(o=0;o<a;o++)p[o]=null;return s?_:_.toP()},a.BasePoint=s,s.prototype.eq=function(){throw new Error("Not implemented")},s.prototype.validate=function(){return this.curve.validate(this)},a.prototype.decodePoint=function(e,n){e=t.toArray(e,n);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?i(e[e.length-1]%2==0):7===e[0]&&i(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},s.prototype.encodeCompressed=function(e){return this.encode(e,!0)},s.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},s.prototype.encode=function(e,n){return t.encode(this._encode(n),e)},s.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},s.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},s.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<t;i+=e){for(var a=0;a<e;a++)r=r.dbl();n.push(r)}return{step:e,points:n}},s.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)t[i]=t[i-1].add(r);return{wnd:e,points:t}},s.prototype._getBeta=function(){return null},s.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t},op}function yp(){return mp||(mp=1,function(e){var t=e;t.base=bp(),t.short=function(){if(lp)return up;lp=1;var e=rp(),t=Jl(),n=Nn(),r=bp(),i=e.assert;function a(e){r.call(this,"short",e),this.a=new t(e.a,16).toRed(this.red),this.b=new t(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function s(e,n,i,a){r.BasePoint.call(this,e,"affine"),null===n&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new t(n,16),this.y=new t(i,16),a&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function o(e,n,i,a){r.BasePoint.call(this,e,"jacobian"),null===n&&null===i&&null===a?(this.x=this.curve.one,this.y=this.curve.one,this.z=new t(0)):(this.x=new t(n,16),this.y=new t(i,16),this.z=new t(a,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}return n(a,r),up=a,a.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var n,r;if(e.beta)n=new t(e.beta,16).toRed(this.red);else{var a=this._getEndoRoots(this.p);n=(n=a[0].cmp(a[1])<0?a[0]:a[1]).toRed(this.red)}if(e.lambda)r=new t(e.lambda,16);else{var s=this._getEndoRoots(this.n);0===this.g.mul(s[0]).x.cmp(this.g.x.redMul(n))?r=s[0]:(r=s[1],i(0===this.g.mul(r).x.cmp(this.g.x.redMul(n))))}return{beta:n,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new t(e.a,16),b:new t(e.b,16)}})):this._getEndoBasis(r)}}},a.prototype._getEndoRoots=function(e){var n=e===this.p?this.red:t.mont(e),r=new t(2).toRed(n).redInvm(),i=r.redNeg(),a=new t(3).toRed(n).redNeg().redSqrt().redMul(r);return[i.redAdd(a).fromRed(),i.redSub(a).fromRed()]},a.prototype._getEndoBasis=function(e){for(var n,r,i,a,s,o,c,u,l,p=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,f=this.n.clone(),h=new t(1),m=new t(0),g=new t(0),b=new t(1),y=0;0!==d.cmpn(0);){var v=f.div(d);u=f.sub(v.mul(d)),l=g.sub(v.mul(h));var x=b.sub(v.mul(m));if(!i&&u.cmp(p)<0)n=c.neg(),r=h,i=u.neg(),a=l;else if(i&&2==++y)break;c=u,f=d,d=u,g=h,h=l,b=m,m=x}s=u.neg(),o=l;var w=i.sqr().add(a.sqr());return s.sqr().add(o.sqr()).cmp(w)>=0&&(s=n,o=r),i.negative&&(i=i.neg(),a=a.neg()),s.negative&&(s=s.neg(),o=o.neg()),[{a:i,b:a},{a:s,b:o}]},a.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],i=r.b.mul(e).divRound(this.n),a=n.b.neg().mul(e).divRound(this.n),s=i.mul(n.a),o=a.mul(r.a),c=i.mul(n.b),u=a.mul(r.b);return{k1:e.sub(s).sub(o),k2:c.add(u).neg()}},a.prototype.pointFromX=function(e,n){(e=new t(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var a=i.fromRed().isOdd();return(n&&!a||!n&&a)&&(i=i.redNeg()),this.point(e,i)},a.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},a.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,a=0;a<e.length;a++){var s=this._endoSplit(t[a]),o=e[a],c=o._getBeta();s.k1.negative&&(s.k1.ineg(),o=o.neg(!0)),s.k2.negative&&(s.k2.ineg(),c=c.neg(!0)),r[2*a]=o,r[2*a+1]=c,i[2*a]=s.k1,i[2*a+1]=s.k2}for(var u=this._wnafMulAdd(1,r,i,2*a,n),l=0;l<2*a;l++)r[l]=null,i[l]=null;return u},n(s,r.BasePoint),a.prototype.point=function(e,t,n){return new s(this,e,t,n)},a.prototype.pointFromJSON=function(e,t){return s.fromJSON(this,e,t)},s.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},s.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},s.fromJSON=function(e,t,n){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);if(!t[2])return r;function i(t){return e.point(t[0],t[1],n)}var a=t[2];return r.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[r].concat(a.doubles.points.map(i))},naf:a.naf&&{wnd:a.naf.wnd,points:[r].concat(a.naf.points.map(i))}},r},s.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},s.prototype.isInfinity=function(){return this.inf},s.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},s.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),a=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)},s.prototype.getX=function(){return this.x.fromRed()},s.prototype.getY=function(){return this.y.fromRed()},s.prototype.mul=function(e){return e=new t(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},s.prototype.mulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},s.prototype.jmulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},s.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},s.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},s.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},n(o,r.BasePoint),a.prototype.jpoint=function(e,t,n){return new o(this,e,t,n)},o.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},o.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},o.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),i=e.x.redMul(n),a=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(n.redMul(this.z)),o=r.redSub(i),c=a.redSub(s);if(0===o.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=o.redSqr(),l=u.redMul(o),p=r.redMul(u),d=c.redSqr().redIAdd(l).redISub(p).redISub(p),f=c.redMul(p.redISub(d)).redISub(a.redMul(l)),h=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(d,f,h)},o.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),i=this.y,a=e.y.redMul(t).redMul(this.z),s=n.redSub(r),o=i.redSub(a);if(0===s.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),l=n.redMul(c),p=o.redSqr().redIAdd(u).redISub(l).redISub(l),d=o.redMul(l.redISub(p)).redISub(i.redMul(u)),f=this.z.redMul(s);return this.curve.jpoint(p,d,f)},o.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t<e;t++)n=n.dbl();return n}var r=this.curve.a,i=this.curve.tinv,a=this.x,s=this.y,o=this.z,c=o.redSqr().redSqr(),u=s.redAdd(s);for(t=0;t<e;t++){var l=a.redSqr(),p=u.redSqr(),d=p.redSqr(),f=l.redAdd(l).redIAdd(l).redIAdd(r.redMul(c)),h=a.redMul(p),m=f.redSqr().redISub(h.redAdd(h)),g=h.redISub(m),b=f.redMul(g);b=b.redIAdd(b).redISub(d);var y=u.redMul(o);t+1<e&&(c=c.redMul(d)),a=m,o=y,u=b}return this.curve.jpoint(a,u.redMul(i),o)},o.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},o.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(r).redISub(a);s=s.redIAdd(s);var o=r.redAdd(r).redIAdd(r),c=o.redSqr().redISub(s).redISub(s),u=a.redIAdd(a);u=(u=u.redIAdd(u)).redIAdd(u),e=c,t=o.redMul(s.redISub(c)).redISub(u),n=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),p=this.y.redSqr(),d=p.redSqr(),f=this.x.redAdd(p).redSqr().redISub(l).redISub(d);f=f.redIAdd(f);var h=l.redAdd(l).redIAdd(l),m=h.redSqr(),g=d.redIAdd(d);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(f).redISub(f),t=h.redMul(f.redISub(e)).redISub(g),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(e,t,n)},o.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(r).redISub(a);s=s.redIAdd(s);var o=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),c=o.redSqr().redISub(s).redISub(s);e=c;var u=a.redIAdd(a);u=(u=u.redIAdd(u)).redIAdd(u),t=o.redMul(s.redISub(c)).redISub(u),n=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),p=this.y.redSqr(),d=this.x.redMul(p),f=this.x.redSub(l).redMul(this.x.redAdd(l));f=f.redAdd(f).redIAdd(f);var h=d.redIAdd(d),m=(h=h.redIAdd(h)).redAdd(h);e=f.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(p).redISub(l);var g=p.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=f.redMul(h.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,n)},o.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),a=t.redSqr(),s=n.redSqr(),o=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(i)),c=t.redAdd(t),u=(c=c.redIAdd(c)).redMul(s),l=o.redSqr().redISub(u.redAdd(u)),p=u.redISub(l),d=s.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var f=o.redMul(p).redISub(d),h=n.redAdd(n).redMul(r);return this.curve.jpoint(l,f,h)},o.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),i=e.redAdd(e).redIAdd(e),a=i.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(r),o=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(a)).redSqr(),c=r.redIAdd(r);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var u=i.redIAdd(s).redSqr().redISub(a).redISub(o).redISub(c),l=t.redMul(u);l=(l=l.redIAdd(l)).redIAdd(l);var p=this.x.redMul(o).redISub(l);p=(p=p.redIAdd(p)).redIAdd(p);var d=this.y.redMul(u.redMul(c.redISub(u)).redISub(s.redMul(o)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var f=this.z.redAdd(s).redSqr().redISub(n).redISub(o);return this.curve.jpoint(p,d,f)},o.prototype.mul=function(e,n){return e=new t(e,n),this.curve._wnafMul(this,e)},o.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),n=e.z.redSqr();if(0!==this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),i=n.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(r)).cmpn(0)},o.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(n))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},o.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},o.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},up}(),t.mont=function(){if(dp)return pp;dp=1;var e=Jl(),t=Nn(),n=bp(),r=rp();function i(t){n.call(this,"mont",t),this.a=new e(t.a,16).toRed(this.red),this.b=new e(t.b,16).toRed(this.red),this.i4=new e(4).toRed(this.red).redInvm(),this.two=new e(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function a(t,r,i){n.BasePoint.call(this,t,"projective"),null===r&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new e(r,16),this.z=new e(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return t(i,n),pp=i,i.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),r=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},t(a,n.BasePoint),i.prototype.decodePoint=function(e,t){return this.point(r.toArray(e,t),1)},i.prototype.point=function(e,t){return new a(this,e,t)},i.prototype.pointFromJSON=function(e){return a.fromJSON(this,e)},a.prototype.precompute=function(){},a.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},a.fromJSON=function(e,t){return new a(e,t[0],t[1]||e.one)},a.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},a.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},a.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),r=e.redMul(t),i=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},a.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(n),s=i.redMul(r),o=t.z.redMul(a.redAdd(s).redSqr()),c=t.x.redMul(a.redISub(s).redSqr());return this.curve.point(o,c)},a.prototype.mul=function(e){for(var t=e.clone(),n=this,r=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var a=i.length-1;a>=0;a--)0===i[a]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},a.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},a.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},a.prototype.getX=function(){return this.normalize(),this.x.fromRed()},pp}(),t.edwards=function(){if(hp)return fp;hp=1;var e=rp(),t=Jl(),n=Nn(),r=bp(),i=e.assert;function a(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,r.call(this,"edwards",e),this.a=new t(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new t(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new t(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),i(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function s(e,n,i,a,s){r.BasePoint.call(this,e,"projective"),null===n&&null===i&&null===a?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new t(n,16),this.y=new t(i,16),this.z=a?new t(a,16):this.curve.one,this.t=s&&new t(s,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}return n(a,r),fp=a,a.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},a.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},a.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},a.prototype.pointFromX=function(e,n){(e=new t(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=this.c2.redSub(this.a.redMul(r)),a=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=i.redMul(a.redInvm()),o=s.redSqrt();if(0!==o.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var c=o.fromRed().isOdd();return(n&&!c||!n&&c)&&(o=o.redNeg()),this.point(e,o)},a.prototype.pointFromY=function(e,n){(e=new t(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=r.redSub(this.c2),a=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=i.redMul(a.redInvm());if(0===s.cmp(this.zero)){if(n)throw new Error("invalid point");return this.point(this.zero,e)}var o=s.redSqrt();if(0!==o.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return o.fromRed().isOdd()!==n&&(o=o.redNeg()),this.point(o,e)},a.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),r=t.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return 0===r.cmp(i)},n(s,r.BasePoint),a.prototype.pointFromJSON=function(e){return s.fromJSON(this,e)},a.prototype.point=function(e,t,n,r){return new s(this,e,t,n,r)},s.fromJSON=function(e,t){return new s(e,t[0],t[1],t[2])},s.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},s.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},s.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=r.redAdd(t),s=a.redSub(n),o=r.redSub(t),c=i.redMul(s),u=a.redMul(o),l=i.redMul(o),p=s.redMul(a);return this.curve.point(c,u,p,l)},s.prototype._projDbl=function(){var e,t,n,r,i,a,s=this.x.redAdd(this.y).redSqr(),o=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var u=(r=this.curve._mulA(o)).redAdd(c);this.zOne?(e=s.redSub(o).redSub(c).redMul(u.redSub(this.curve.two)),t=u.redMul(r.redSub(c)),n=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),a=u.redSub(i).redISub(i),e=s.redSub(o).redISub(c).redMul(a),t=u.redMul(r.redSub(c)),n=u.redMul(a))}else r=o.redAdd(c),i=this.curve._mulC(this.z).redSqr(),a=r.redSub(i).redSub(i),e=this.curve._mulC(s.redISub(r)).redMul(a),t=this.curve._mulC(r).redMul(o.redISub(c)),n=r.redMul(a);return this.curve.point(e,t,n)},s.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},s.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),a=n.redSub(t),s=i.redSub(r),o=i.redAdd(r),c=n.redAdd(t),u=a.redMul(s),l=o.redMul(c),p=a.redMul(c),d=s.redMul(o);return this.curve.point(u,l,d,p)},s.prototype._projAdd=function(e){var t,n,r=this.z.redMul(e.z),i=r.redSqr(),a=this.x.redMul(e.x),s=this.y.redMul(e.y),o=this.curve.d.redMul(a).redMul(s),c=i.redSub(o),u=i.redAdd(o),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(s),p=r.redMul(c).redMul(l);return this.curve.twisted?(t=r.redMul(u).redMul(s.redSub(this.curve._mulA(a))),n=c.redMul(u)):(t=r.redMul(u).redMul(s.redSub(a)),n=this.curve._mulC(c).redMul(u)),this.curve.point(p,t,n)},s.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},s.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},s.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},s.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},s.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},s.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()},s.prototype.getY=function(){return this.normalize(),this.y.fromRed()},s.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},s.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},s.prototype.toP=s.prototype.normalize,s.prototype.mixedAdd=s.prototype.add,fp}()}(gp)),gp}var vp,xp={},wp={},_p={};function Sp(){if(vp)return _p;vp=1;var e=Xl(),t=Nn();function n(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function r(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function i(e){return 1===e.length?"0"+e:e}function a(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}return _p.inherits=t,_p.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),a=0;a<e.length;a+=2)r.push(parseInt(e[a]+e[a+1],16))}else for(var i=0,a=0;a<e.length;a++){var s=e.charCodeAt(a);s<128?r[i++]=s:s<2048?(r[i++]=s>>6|192,r[i++]=63&s|128):n(e,a)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++a)),r[i++]=s>>18|240,r[i++]=s>>12&63|128,r[i++]=s>>6&63|128,r[i++]=63&s|128):(r[i++]=s>>12|224,r[i++]=s>>6&63|128,r[i++]=63&s|128)}else for(a=0;a<e.length;a++)r[a]=0|e[a];return r},_p.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=i(e[n].toString(16));return t},_p.htonl=r,_p.toHex32=function(e,t){for(var n="",i=0;i<e.length;i++){var s=e[i];"little"===t&&(s=r(s)),n+=a(s.toString(16))}return n},_p.zero2=i,_p.zero8=a,_p.join32=function(t,n,r,i){var a=r-n;e(a%4==0);for(var s=new Array(a/4),o=0,c=n;o<s.length;o++,c+=4){var u;u="big"===i?t[c]<<24|t[c+1]<<16|t[c+2]<<8|t[c+3]:t[c+3]<<24|t[c+2]<<16|t[c+1]<<8|t[c],s[o]=u>>>0}return s},_p.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var a=e[r];"big"===t?(n[i]=a>>>24,n[i+1]=a>>>16&255,n[i+2]=a>>>8&255,n[i+3]=255&a):(n[i+3]=a>>>24,n[i+2]=a>>>16&255,n[i+1]=a>>>8&255,n[i]=255&a)}return n},_p.rotr32=function(e,t){return e>>>t|e<<32-t},_p.rotl32=function(e,t){return e<<t|e>>>32-t},_p.sum32=function(e,t){return e+t>>>0},_p.sum32_3=function(e,t,n){return e+t+n>>>0},_p.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},_p.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},_p.sum64=function(e,t,n,r){var i=e[t],a=r+e[t+1]>>>0,s=(a<r?1:0)+n+i;e[t]=s>>>0,e[t+1]=a},_p.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},_p.sum64_lo=function(e,t,n,r){return t+r>>>0},_p.sum64_4_hi=function(e,t,n,r,i,a,s,o){var c=0,u=t;return c+=(u=u+r>>>0)<t?1:0,c+=(u=u+a>>>0)<a?1:0,e+n+i+s+(c+=(u=u+o>>>0)<o?1:0)>>>0},_p.sum64_4_lo=function(e,t,n,r,i,a,s,o){return t+r+a+o>>>0},_p.sum64_5_hi=function(e,t,n,r,i,a,s,o,c,u){var l=0,p=t;return l+=(p=p+r>>>0)<t?1:0,l+=(p=p+a>>>0)<a?1:0,l+=(p=p+o>>>0)<o?1:0,e+n+i+s+c+(l+=(p=p+u>>>0)<u?1:0)>>>0},_p.sum64_5_lo=function(e,t,n,r,i,a,s,o,c,u){return t+r+a+o+u>>>0},_p.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},_p.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},_p.shr64_hi=function(e,t,n){return e>>>n},_p.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},_p}var Ep,kp={};function Mp(){if(Ep)return kp;Ep=1;var e=Sp(),t=Xl();function n(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return kp.BlockHash=n,n.prototype.update=function(t,n){if(t=e.toArray(t,n),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=e.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},n.prototype.digest=function(e){return this.update(this._pad()),t(null===this.pending),this._digest(e)},n.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,a=8;a<this.padLength;a++)r[i++]=0;return r},kp}var Tp,Ap,Rp,Op,Ip,Np,Pp,jp,Dp,Lp,Cp,$p,Bp={},zp={};function Up(){if(Tp)return zp;Tp=1;var e=Sp().rotr32;function t(e,t,n){return e&t^~e&n}function n(e,t,n){return e&t^e&n^t&n}function r(e,t,n){return e^t^n}return zp.ft_1=function(e,i,a,s){return 0===e?t(i,a,s):1===e||3===e?r(i,a,s):2===e?n(i,a,s):void 0},zp.ch32=t,zp.maj32=n,zp.p32=r,zp.s0_256=function(t){return e(t,2)^e(t,13)^e(t,22)},zp.s1_256=function(t){return e(t,6)^e(t,11)^e(t,25)},zp.g0_256=function(t){return e(t,7)^e(t,18)^t>>>3},zp.g1_256=function(t){return e(t,17)^e(t,19)^t>>>10},zp}function Fp(){if(Ip)return Op;Ip=1;var e=Sp(),t=Mp(),n=Up(),r=Xl(),i=e.sum32,a=e.sum32_4,s=e.sum32_5,o=n.ch32,c=n.maj32,u=n.s0_256,l=n.s1_256,p=n.g0_256,d=n.g1_256,f=t.BlockHash,h=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function m(){if(!(this instanceof m))return new m;f.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=h,this.W=new Array(64)}return e.inherits(m,f),Op=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(e,t){for(var n=this.W,f=0;f<16;f++)n[f]=e[t+f];for(;f<n.length;f++)n[f]=a(d(n[f-2]),n[f-7],p(n[f-15]),n[f-16]);var h=this.h[0],m=this.h[1],g=this.h[2],b=this.h[3],y=this.h[4],v=this.h[5],x=this.h[6],w=this.h[7];for(r(this.k.length===n.length),f=0;f<n.length;f++){var _=s(w,l(y),o(y,v,x),this.k[f],n[f]),S=i(u(h),c(h,m,g));w=x,x=v,v=y,y=i(b,_),b=g,g=m,m=h,h=i(_,S)}this.h[0]=i(this.h[0],h),this.h[1]=i(this.h[1],m),this.h[2]=i(this.h[2],g),this.h[3]=i(this.h[3],b),this.h[4]=i(this.h[4],y),this.h[5]=i(this.h[5],v),this.h[6]=i(this.h[6],x),this.h[7]=i(this.h[7],w)},m.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},Op}function qp(){if(Dp)return jp;Dp=1;var e=Sp(),t=Mp(),n=Xl(),r=e.rotr64_hi,i=e.rotr64_lo,a=e.shr64_hi,s=e.shr64_lo,o=e.sum64,c=e.sum64_hi,u=e.sum64_lo,l=e.sum64_4_hi,p=e.sum64_4_lo,d=e.sum64_5_hi,f=e.sum64_5_lo,h=t.BlockHash,m=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function g(){if(!(this instanceof g))return new g;h.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=m,this.W=new Array(160)}function b(e,t,n,r,i){var a=e&n^~e&i;return a<0&&(a+=4294967296),a}function y(e,t,n,r,i,a){var s=t&r^~t&a;return s<0&&(s+=4294967296),s}function v(e,t,n,r,i){var a=e&n^e&i^n&i;return a<0&&(a+=4294967296),a}function x(e,t,n,r,i,a){var s=t&r^t&a^r&a;return s<0&&(s+=4294967296),s}function w(e,t){var n=r(e,t,28)^r(t,e,2)^r(t,e,7);return n<0&&(n+=4294967296),n}function _(e,t){var n=i(e,t,28)^i(t,e,2)^i(t,e,7);return n<0&&(n+=4294967296),n}function S(e,t){var n=r(e,t,14)^r(e,t,18)^r(t,e,9);return n<0&&(n+=4294967296),n}function E(e,t){var n=i(e,t,14)^i(e,t,18)^i(t,e,9);return n<0&&(n+=4294967296),n}function k(e,t){var n=r(e,t,1)^r(e,t,8)^a(e,t,7);return n<0&&(n+=4294967296),n}function M(e,t){var n=i(e,t,1)^i(e,t,8)^s(e,t,7);return n<0&&(n+=4294967296),n}function T(e,t){var n=r(e,t,19)^r(t,e,29)^a(e,t,6);return n<0&&(n+=4294967296),n}function A(e,t){var n=i(e,t,19)^i(t,e,29)^s(e,t,6);return n<0&&(n+=4294967296),n}return e.inherits(g,h),jp=g,g.blockSize=1024,g.outSize=512,g.hmacStrength=192,g.padLength=128,g.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var i=T(n[r-4],n[r-3]),a=A(n[r-4],n[r-3]),s=n[r-14],o=n[r-13],c=k(n[r-30],n[r-29]),u=M(n[r-30],n[r-29]),d=n[r-32],f=n[r-31];n[r]=l(i,a,s,o,c,u,d,f),n[r+1]=p(i,a,s,o,c,u,d,f)}},g.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,i=this.h[0],a=this.h[1],s=this.h[2],l=this.h[3],p=this.h[4],h=this.h[5],m=this.h[6],g=this.h[7],k=this.h[8],M=this.h[9],T=this.h[10],A=this.h[11],R=this.h[12],O=this.h[13],I=this.h[14],N=this.h[15];n(this.k.length===r.length);for(var P=0;P<r.length;P+=2){var j=I,D=N,L=S(k,M),C=E(k,M),$=b(k,M,T,A,R),B=y(k,M,T,A,R,O),z=this.k[P],U=this.k[P+1],F=r[P],q=r[P+1],H=d(j,D,L,C,$,B,z,U,F,q),Y=f(j,D,L,C,$,B,z,U,F,q);j=w(i,a),D=_(i,a),L=v(i,a,s,l,p),C=x(i,a,s,l,p,h);var V=c(j,D,L,C),G=u(j,D,L,C);I=R,N=O,R=T,O=A,T=k,A=M,k=c(m,g,H,Y),M=u(g,g,H,Y),m=p,g=h,p=s,h=l,s=i,l=a,i=c(H,Y,V,G),a=u(H,Y,V,G)}o(this.h,0,i,a),o(this.h,2,s,l),o(this.h,4,p,h),o(this.h,6,m,g),o(this.h,8,k,M),o(this.h,10,T,A),o(this.h,12,R,O),o(this.h,14,I,N)},g.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},jp}function Hp(){return $p||($p=1,Bp.sha1=function(){if(Rp)return Ap;Rp=1;var e=Sp(),t=Mp(),n=Up(),r=e.rotl32,i=e.sum32,a=e.sum32_5,s=n.ft_1,o=t.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function u(){if(!(this instanceof u))return new u;o.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return e.inherits(u,o),Ap=u,u.blockSize=512,u.outSize=160,u.hmacStrength=80,u.padLength=64,u.prototype._update=function(e,t){for(var n=this.W,o=0;o<16;o++)n[o]=e[t+o];for(;o<n.length;o++)n[o]=r(n[o-3]^n[o-8]^n[o-14]^n[o-16],1);var u=this.h[0],l=this.h[1],p=this.h[2],d=this.h[3],f=this.h[4];for(o=0;o<n.length;o++){var h=~~(o/20),m=a(r(u,5),s(h,l,p,d),f,n[o],c[h]);f=d,d=p,p=r(l,30),l=u,u=m}this.h[0]=i(this.h[0],u),this.h[1]=i(this.h[1],l),this.h[2]=i(this.h[2],p),this.h[3]=i(this.h[3],d),this.h[4]=i(this.h[4],f)},u.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},Ap}(),Bp.sha224=function(){if(Pp)return Np;Pp=1;var e=Sp(),t=Fp();function n(){if(!(this instanceof n))return new n;t.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return e.inherits(n,t),Np=n,n.blockSize=512,n.outSize=224,n.hmacStrength=192,n.padLength=64,n.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h.slice(0,7),"big"):e.split32(this.h.slice(0,7),"big")},Np}(),Bp.sha256=Fp(),Bp.sha384=function(){if(Cp)return Lp;Cp=1;var e=Sp(),t=qp();function n(){if(!(this instanceof n))return new n;t.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return e.inherits(n,t),Lp=n,n.blockSize=1024,n.outSize=384,n.hmacStrength=192,n.padLength=128,n.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h.slice(0,12),"big"):e.split32(this.h.slice(0,12),"big")},Lp}(),Bp.sha512=qp()),Bp}var Yp,Vp,Gp,Kp,Wp,Zp,Jp,Xp,Qp,ed,td,nd,rd,id,ad,sd,od,cd,ud,ld,pd,dd,fd={};function hd(){return Kp||(Kp=1,function(){var e=wp;e.utils=Sp(),e.common=Mp(),e.sha=Hp(),e.ripemd=function(){if(Yp)return fd;Yp=1;var e=Sp(),t=Mp(),n=e.rotl32,r=e.sum32,i=e.sum32_3,a=e.sum32_4,s=t.BlockHash;function o(){if(!(this instanceof o))return new o;s.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function c(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function u(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function l(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}e.inherits(o,s),fd.ripemd160=o,o.blockSize=512,o.outSize=160,o.hmacStrength=192,o.padLength=64,o.prototype._update=function(e,t){for(var s=this.h[0],o=this.h[1],m=this.h[2],g=this.h[3],b=this.h[4],y=s,v=o,x=m,w=g,_=b,S=0;S<80;S++){var E=r(n(a(s,c(S,o,m,g),e[p[S]+t],u(S)),f[S]),b);s=b,b=g,g=n(m,10),m=o,o=E,E=r(n(a(y,c(79-S,v,x,w),e[d[S]+t],l(S)),h[S]),_),y=_,_=w,w=n(x,10),x=v,v=E}E=i(this.h[1],m,w),this.h[1]=i(this.h[2],g,_),this.h[2]=i(this.h[3],b,y),this.h[3]=i(this.h[4],s,v),this.h[4]=i(this.h[0],o,x),this.h[0]=E},o.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"little"):e.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],d=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],h=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];return fd}(),e.hmac=function(){if(Gp)return Vp;Gp=1;var e=Sp(),t=Xl();function n(t,r,i){if(!(this instanceof n))return new n(t,r,i);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(e.toArray(r,i))}return Vp=n,n.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),t(e.length<=this.blockSize);for(var n=e.length;n<this.blockSize;n++)e.push(0);for(n=0;n<e.length;n++)e[n]^=54;for(this.inner=(new this.Hash).update(e),n=0;n<e.length;n++)e[n]^=106;this.outer=(new this.Hash).update(e)},n.prototype.update=function(e,t){return this.inner.update(e,t),this},n.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},Vp}(),e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160}()),wp}function md(){return Jp||(Jp=1,function(e){var t,n=e,r=hd(),i=yp(),a=rp().assert;function s(e){"short"===e.type?this.curve=new i.short(e):"edwards"===e.type?this.curve=new i.edwards(e):this.curve=new i.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function o(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new s(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=s,o("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),o("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),o("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),o("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),o("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),o("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),o("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{t=Zp?Wp:(Zp=1,Wp={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}})}catch(e){t=void 0}o("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",t]})}(xp)),xp}function gd(){if(ad)return id;ad=1;var e=Jl(),t=function(){if(Qp)return Xp;Qp=1;var e=hd(),t=np(),n=Xl();function r(e){if(!(this instanceof r))return new r(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var i=t.toArray(e.entropy,e.entropyEnc||"hex"),a=t.toArray(e.nonce,e.nonceEnc||"hex"),s=t.toArray(e.pers,e.persEnc||"hex");n(i.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(i,a,s)}return Xp=r,r.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},r.prototype._hmac=function(){return new e.hmac(this.hash,this.K)},r.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},r.prototype.reseed=function(e,r,i,a){"string"!=typeof r&&(a=i,i=r,r=null),e=t.toArray(e,r),i=t.toArray(i,a),n(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1},r.prototype.generate=function(e,n,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof n&&(i=r,r=n,n=null),r&&(r=t.toArray(r,i||"hex"),this._update(r));for(var a=[];a.length<e;)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);var s=a.slice(0,e);return this._update(r),this._reseed++,t.encode(s,n)},Xp}(),n=rp(),r=md(),i=sp(),a=n.assert,s=function(){if(td)return ed;td=1;var e=Jl(),t=rp().assert;function n(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}return ed=n,n.fromPublic=function(e,t,r){return t instanceof n?t:new n(e,{pub:t,pubEnc:r})},n.fromPrivate=function(e,t,r){return t instanceof n?t:new n(e,{priv:t,privEnc:r})},n.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},n.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},n.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},n.prototype._importPrivate=function(t,n){this.priv=new e(t,n||16),this.priv=this.priv.umod(this.ec.curve.n)},n.prototype._importPublic=function(e,n){if(e.x||e.y)return"mont"===this.ec.curve.type?t(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||t(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,n)},n.prototype.derive=function(e){return e.validate()||t(e.validate(),"public point not validated"),e.mul(this.priv).getX()},n.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},n.prototype.verify=function(e,t,n){return this.ec.verify(e,t,this,void 0,n)},n.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},ed}(),o=function(){if(rd)return nd;rd=1;var e=Jl(),t=rp(),n=t.assert;function r(t,i){if(t instanceof r)return t;this._importDER(t,i)||(n(t.r&&t.s,"Signature without r or s"),this.r=new e(t.r,16),this.s=new e(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function i(){this.place=0}function a(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;if(0===e[t.place])return!1;for(var i=0,a=0,s=t.place;a<r;a++,s++)i<<=8,i|=e[s],i>>>=0;return!(i<=127)&&(t.place=s,i)}function s(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function o(e,t){if(t<128)e.push(t);else{var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}return nd=r,r.prototype._importDER=function(n,r){n=t.toArray(n,r);var s=new i;if(48!==n[s.place++])return!1;var o=a(n,s);if(!1===o)return!1;if(o+s.place!==n.length)return!1;if(2!==n[s.place++])return!1;var c=a(n,s);if(!1===c)return!1;if(128&n[s.place])return!1;var u=n.slice(s.place,c+s.place);if(s.place+=c,2!==n[s.place++])return!1;var l=a(n,s);if(!1===l)return!1;if(n.length!==l+s.place)return!1;if(128&n[s.place])return!1;var p=n.slice(s.place,l+s.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===p[0]){if(!(128&p[1]))return!1;p=p.slice(1)}return this.r=new e(u),this.s=new e(p),this.recoveryParam=null,!0},r.prototype.toDER=function(e){var n=this.r.toArray(),r=this.s.toArray();for(128&n[0]&&(n=[0].concat(n)),128&r[0]&&(r=[0].concat(r)),n=s(n),r=s(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];o(i,n.length),(i=i.concat(n)).push(2),o(i,r.length);var a=i.concat(r),c=[48];return o(c,a.length),c=c.concat(a),t.encode(c,e)},nd}();function c(e){if(!(this instanceof c))return new c(e);"string"==typeof e&&(a(Object.prototype.hasOwnProperty.call(r,e),"Unknown curve "+e),e=r[e]),e instanceof r.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}return id=c,c.prototype.keyPair=function(e){return new s(this,e)},c.prototype.keyFromPrivate=function(e,t){return s.fromPrivate(this,e,t)},c.prototype.keyFromPublic=function(e,t){return s.fromPublic(this,e,t)},c.prototype.genKeyPair=function(n){n||(n={});for(var r=new t({hash:this.hash,pers:n.pers,persEnc:n.persEnc||"utf8",entropy:n.entropy||i(this.hash.hmacStrength),entropyEnc:n.entropy&&n.entropyEnc||"utf8",nonce:this.n.toArray()}),a=this.n.byteLength(),s=this.n.sub(new e(2));;){var o=new e(r.generate(a));if(!(o.cmp(s)>0))return o.iaddn(1),this.keyFromPrivate(o)}},c.prototype._truncateToN=function(t,n,r){var i;if(e.isBN(t)||"number"==typeof t)i=(t=new e(t,16)).byteLength();else if("object"==typeof t)i=t.length,t=new e(t,16);else{var a=t.toString();i=a.length+1>>>1,t=new e(a,16)}"number"!=typeof r&&(r=8*i);var s=r-this.n.bitLength();return s>0&&(t=t.ushrn(s)),!n&&t.cmp(this.n)>=0?t.sub(this.n):t},c.prototype.sign=function(n,r,i,s){if("object"==typeof i&&(s=i,i=null),s||(s={}),"string"!=typeof n&&"number"!=typeof n&&!e.isBN(n)){a("object"==typeof n&&n&&"number"==typeof n.length,"Expected message to be an array-like, a hex string, or a BN instance"),a(n.length>>>0===n.length);for(var c=0;c<n.length;c++)a((255&n[c])===n[c])}r=this.keyFromPrivate(r,i),n=this._truncateToN(n,!1,s.msgBitLength),a(!n.isNeg(),"Can not sign a negative message");var u=this.n.byteLength(),l=r.getPrivate().toArray("be",u),p=n.toArray("be",u);a(new e(p).eq(n),"Can not sign message");for(var d=new t({hash:this.hash,entropy:l,nonce:p,pers:s.pers,persEnc:s.persEnc||"utf8"}),f=this.n.sub(new e(1)),h=0;;h++){var m=s.k?s.k(h):new e(d.generate(this.n.byteLength()));if(!((m=this._truncateToN(m,!0)).cmpn(1)<=0||m.cmp(f)>=0)){var g=this.g.mul(m);if(!g.isInfinity()){var b=g.getX(),y=b.umod(this.n);if(0!==y.cmpn(0)){var v=m.invm(this.n).mul(y.mul(r.getPrivate()).iadd(n));if(0!==(v=v.umod(this.n)).cmpn(0)){var x=(g.getY().isOdd()?1:0)|(0!==b.cmp(y)?2:0);return s.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),x^=1),new o({r:y,s:v,recoveryParam:x})}}}}}},c.prototype.verify=function(e,t,n,r,i){i||(i={}),e=this._truncateToN(e,!1,i.msgBitLength),n=this.keyFromPublic(n,r);var a=(t=new o(t,"hex")).r,s=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var c,u=s.invm(this.n),l=u.mul(e).umod(this.n),p=u.mul(a).umod(this.n);return this.curve._maxwellTrick?!(c=this.g.jmulAdd(l,n.getPublic(),p)).isInfinity()&&c.eqXToP(a):!(c=this.g.mulAdd(l,n.getPublic(),p)).isInfinity()&&0===c.getX().umod(this.n).cmp(a)},c.prototype.recoverPubKey=function(t,n,r,i){a((3&r)===r,"The recovery param is more than two bits"),n=new o(n,i);var s=this.n,c=new e(t),u=n.r,l=n.s,p=1&r,d=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");u=d?this.curve.pointFromX(u.add(this.curve.n),p):this.curve.pointFromX(u,p);var f=n.r.invm(s),h=s.sub(c).mul(f).umod(s),m=l.mul(f).umod(s);return this.g.mulAdd(h,u,m)},c.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new o(t,r)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(e,t,i)}catch(e){continue}if(a.eq(n))return i}throw new Error("Unable to find valid recovery factor")},id}function bd(){if(pd)return ld;pd=1;var e=hd(),t=md(),n=rp(),r=n.assert,i=n.parseBytes,a=function(){if(od)return sd;od=1;var e=rp(),t=e.assert,n=e.parseBytes,r=e.cachedProperty;function i(e,t){this.eddsa=e,this._secret=n(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=n(t.pub)}return i.fromPublic=function(e,t){return t instanceof i?t:new i(e,{pub:t})},i.fromSecret=function(e,t){return t instanceof i?t:new i(e,{secret:t})},i.prototype.secret=function(){return this._secret},r(i,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),r(i,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),r(i,"privBytes",(function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r})),r(i,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),r(i,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),r(i,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),i.prototype.sign=function(e){return t(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},i.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},i.prototype.getSecret=function(n){return t(this._secret,"KeyPair is public only"),e.encode(this.secret(),n)},i.prototype.getPublic=function(t){return e.encode(this.pubBytes(),t)},sd=i}(),s=function(){if(ud)return cd;ud=1;var e=Jl(),t=rp(),n=t.assert,r=t.cachedProperty,i=t.parseBytes;function a(t,r){this.eddsa=t,"object"!=typeof r&&(r=i(r)),Array.isArray(r)&&(n(r.length===2*t.encodingLength,"Signature has invalid size"),r={R:r.slice(0,t.encodingLength),S:r.slice(t.encodingLength)}),n(r.R&&r.S,"Signature without R or S"),t.isPoint(r.R)&&(this._R=r.R),r.S instanceof e&&(this._S=r.S),this._Rencoded=Array.isArray(r.R)?r.R:r.Rencoded,this._Sencoded=Array.isArray(r.S)?r.S:r.Sencoded}return r(a,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),r(a,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),r(a,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),r(a,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),a.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},a.prototype.toHex=function(){return t.encode(this.toBytes(),"hex").toUpperCase()},cd=a}();function o(n){if(r("ed25519"===n,"only tested with ed25519 so far"),!(this instanceof o))return new o(n);n=t[n].curve,this.curve=n,this.g=n.g,this.g.precompute(n.n.bitLength()+1),this.pointClass=n.point().constructor,this.encodingLength=Math.ceil(n.n.bitLength()/8),this.hash=e.sha512}return ld=o,o.prototype.sign=function(e,t){e=i(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),a=this.g.mul(r),s=this.encodePoint(a),o=this.hashInt(s,n.pubBytes(),e).mul(n.priv()),c=r.add(o).umod(this.curve.n);return this.makeSignature({R:a,S:c,Rencoded:s})},o.prototype.verify=function(e,t,n){if(e=i(e),(t=this.makeSignature(t)).S().gte(t.eddsa.curve.n)||t.S().isNeg())return!1;var r=this.keyFromPublic(n),a=this.hashInt(t.Rencoded(),r.pubBytes(),e),s=this.g.mul(t.S());return t.R().add(r.pub().mul(a)).eq(s)},o.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return n.intFromLE(e.digest()).umod(this.curve.n)},o.prototype.keyFromPublic=function(e){return a.fromPublic(this,e)},o.prototype.keyFromSecret=function(e){return a.fromSecret(this,e)},o.prototype.makeSignature=function(e){return e instanceof s?e:new s(this,e)},o.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},o.prototype.decodePoint=function(e){var t=(e=n.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),i=!!(128&e[t]),a=n.intFromLE(r);return this.curve.pointFromY(a,i)},o.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},o.prototype.decodeInt=function(e){return n.intFromLE(e)},o.prototype.isPoint=function(e){return e instanceof this.pointClass},ld}function yd(){return dd||(dd=1,function(){var e=Vl;e.version=Gl,e.utils=rp(),e.rand=sp(),e.curve=yp(),e.curves=md(),e.ec=gd(),e.eddsa=bd()}()),Vl}const vd=new(yd().ec)("secp256k1"),xd=globalThis.crypto||globalThis.msCrypto||{};xd.subtle||xd.webkitSubtle;const wd=Buffer.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),_d=Buffer.alloc(32,0);function Sd(e,t){if(!e)throw new Error(t)}function Ed(e){return t=e,!(!Buffer.isBuffer(t)||32!==t.length)&&(e.compare(_d)>0&&e.compare(wd)<0);var t}function kd(e){if(void 0===xd.getRandomValues)return Buffer.from(xd.randomBytes(e));const t=new Uint8Array(e);return xd.getRandomValues(t),Buffer.from(t)}var Md,Td={},Ad={},Rd={},Od={exports:{}},Id=Od.exports;function Nd(){return Md||(Md=1,function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:require("buffer").Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function o(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,r,i){for(var a=0,s=0,o=Math.min(e.length,r),c=t;c<o;c++){var u=e.charCodeAt(c)-48;a*=i,s=u>=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&s<i,"Invalid character"),a+=s}return a}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,s,o=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this._strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,a=0,s=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=o(e,t,r)<<a,this.words[s]|=67108863&i,a>=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=o(e,t,r)<<a,this.words[s]|=67108863&i,a>=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;this._strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var a=e.length-n,s=a%r,o=Math.min(a,a-s)+n,u=0,l=n;l<o;l+=r)u=c(e,l,l+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var p=1;for(u=c(e,l,e.length,t),l=0;l<s;l++)p*=t;this.imuln(p),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype._move=function(e){u(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(e){i.prototype.inspect=l}else i.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var p=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],a=0|t.words[0],s=i*a,o=67108863&s,c=s/67108864|0;n.words[0]=o;for(var u=1;u<r;u++){for(var l=c>>>26,p=67108863&c,d=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=d;f++){var h=u-f|0;l+=(s=(i=0|e.words[h])*(a=0|t.words[f])+p)/67108864|0,p=67108863&s}n.words[u]=0|p,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n._strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,a=0,s=0;s<this.length;s++){var o=this.words[s],c=(16777215&(o<<i|a)).toString(16);a=o>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==a||s!==this.length-1?p[6-c.length]+c+r:c+r}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=d[e],l=f[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modrn(l).toString(e);r=(h=h.idivn(l)).isZero()?m+r:p[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,a);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},i.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,a=0;i<this.length;i++){var s=this.words[i]<<a|r;e[n++]=255&s,n<e.length&&(e[n++]=s>>8&255),n<e.length&&(e[n++]=s>>16&255),6===a?(n<e.length&&(e[n++]=s>>24&255),r=0,a=0):(r=s>>>24,a+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},i.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,a=0;i<this.length;i++){var s=this.words[i]<<a|r;e[n--]=255&s,n>=0&&(e[n--]=s>>8&255),n>=0&&(e[n--]=s>>16&255),6===a?(n>=0&&(e[n--]=s>>24&255),r=0,a=0):(r=s>>>24,a+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},i.prototype.ior=function(e){return n(!(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},i.prototype.iand=function(e){return n(!(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},i.prototype.ixor=function(e){return n(!(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a<r.length;a++)t=(0|n.words[a])+(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<n.length;a++)t=(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var a=0,s=0;s<r.length;s++)a=(t=(0|n.words[s])-(0|r.words[s])+a)>>26,this.words[s]=67108863&t;for(;0!==a&&s<n.length;s++)a=(t=(0|n.words[s])+a)>>26,this.words[s]=67108863&t;if(0===a&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,n){var r,i,a,s=e.words,o=t.words,c=n.words,u=0,l=0|s[0],p=8191&l,d=l>>>13,f=0|s[1],h=8191&f,m=f>>>13,g=0|s[2],b=8191&g,y=g>>>13,v=0|s[3],x=8191&v,w=v>>>13,_=0|s[4],S=8191&_,E=_>>>13,k=0|s[5],M=8191&k,T=k>>>13,A=0|s[6],R=8191&A,O=A>>>13,I=0|s[7],N=8191&I,P=I>>>13,j=0|s[8],D=8191&j,L=j>>>13,C=0|s[9],$=8191&C,B=C>>>13,z=0|o[0],U=8191&z,F=z>>>13,q=0|o[1],H=8191&q,Y=q>>>13,V=0|o[2],G=8191&V,K=V>>>13,W=0|o[3],Z=8191&W,J=W>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ie=0|o[6],ae=8191&ie,se=ie>>>13,oe=0|o[7],ce=8191&oe,ue=oe>>>13,le=0|o[8],pe=8191&le,de=le>>>13,fe=0|o[9],he=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(p,U))|0)+((8191&(i=(i=Math.imul(p,F))+Math.imul(d,U)|0))<<13)|0;u=((a=Math.imul(d,F))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(h,U),i=(i=Math.imul(h,F))+Math.imul(m,U)|0,a=Math.imul(m,F);var be=(u+(r=r+Math.imul(p,H)|0)|0)+((8191&(i=(i=i+Math.imul(p,Y)|0)+Math.imul(d,H)|0))<<13)|0;u=((a=a+Math.imul(d,Y)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,U),i=(i=Math.imul(b,F))+Math.imul(y,U)|0,a=Math.imul(y,F),r=r+Math.imul(h,H)|0,i=(i=i+Math.imul(h,Y)|0)+Math.imul(m,H)|0,a=a+Math.imul(m,Y)|0;var ye=(u+(r=r+Math.imul(p,G)|0)|0)+((8191&(i=(i=i+Math.imul(p,K)|0)+Math.imul(d,G)|0))<<13)|0;u=((a=a+Math.imul(d,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(x,U),i=(i=Math.imul(x,F))+Math.imul(w,U)|0,a=Math.imul(w,F),r=r+Math.imul(b,H)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(y,H)|0,a=a+Math.imul(y,Y)|0,r=r+Math.imul(h,G)|0,i=(i=i+Math.imul(h,K)|0)+Math.imul(m,G)|0,a=a+Math.imul(m,K)|0;var ve=(u+(r=r+Math.imul(p,Z)|0)|0)+((8191&(i=(i=i+Math.imul(p,J)|0)+Math.imul(d,Z)|0))<<13)|0;u=((a=a+Math.imul(d,J)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(S,U),i=(i=Math.imul(S,F))+Math.imul(E,U)|0,a=Math.imul(E,F),r=r+Math.imul(x,H)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(w,H)|0,a=a+Math.imul(w,Y)|0,r=r+Math.imul(b,G)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(y,G)|0,a=a+Math.imul(y,K)|0,r=r+Math.imul(h,Z)|0,i=(i=i+Math.imul(h,J)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,J)|0;var xe=(u+(r=r+Math.imul(p,Q)|0)|0)+((8191&(i=(i=i+Math.imul(p,ee)|0)+Math.imul(d,Q)|0))<<13)|0;u=((a=a+Math.imul(d,ee)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(M,U),i=(i=Math.imul(M,F))+Math.imul(T,U)|0,a=Math.imul(T,F),r=r+Math.imul(S,H)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(E,H)|0,a=a+Math.imul(E,Y)|0,r=r+Math.imul(x,G)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(w,G)|0,a=a+Math.imul(w,K)|0,r=r+Math.imul(b,Z)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(y,Z)|0,a=a+Math.imul(y,J)|0,r=r+Math.imul(h,Q)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0;var we=(u+(r=r+Math.imul(p,ne)|0)|0)+((8191&(i=(i=i+Math.imul(p,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((a=a+Math.imul(d,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(R,U),i=(i=Math.imul(R,F))+Math.imul(O,U)|0,a=Math.imul(O,F),r=r+Math.imul(M,H)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(T,H)|0,a=a+Math.imul(T,Y)|0,r=r+Math.imul(S,G)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(E,G)|0,a=a+Math.imul(E,K)|0,r=r+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(w,Z)|0,a=a+Math.imul(w,J)|0,r=r+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,r=r+Math.imul(h,ne)|0,i=(i=i+Math.imul(h,re)|0)+Math.imul(m,ne)|0,a=a+Math.imul(m,re)|0;var _e=(u+(r=r+Math.imul(p,ae)|0)|0)+((8191&(i=(i=i+Math.imul(p,se)|0)+Math.imul(d,ae)|0))<<13)|0;u=((a=a+Math.imul(d,se)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(N,U),i=(i=Math.imul(N,F))+Math.imul(P,U)|0,a=Math.imul(P,F),r=r+Math.imul(R,H)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(O,H)|0,a=a+Math.imul(O,Y)|0,r=r+Math.imul(M,G)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(T,G)|0,a=a+Math.imul(T,K)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,J)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(w,Q)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(y,ne)|0,a=a+Math.imul(y,re)|0,r=r+Math.imul(h,ae)|0,i=(i=i+Math.imul(h,se)|0)+Math.imul(m,ae)|0,a=a+Math.imul(m,se)|0;var Se=(u+(r=r+Math.imul(p,ce)|0)|0)+((8191&(i=(i=i+Math.imul(p,ue)|0)+Math.imul(d,ce)|0))<<13)|0;u=((a=a+Math.imul(d,ue)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(D,U),i=(i=Math.imul(D,F))+Math.imul(L,U)|0,a=Math.imul(L,F),r=r+Math.imul(N,H)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(P,H)|0,a=a+Math.imul(P,Y)|0,r=r+Math.imul(R,G)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(O,G)|0,a=a+Math.imul(O,K)|0,r=r+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(T,Z)|0,a=a+Math.imul(T,J)|0,r=r+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(E,Q)|0,a=a+Math.imul(E,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(w,ne)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,i=(i=i+Math.imul(b,se)|0)+Math.imul(y,ae)|0,a=a+Math.imul(y,se)|0,r=r+Math.imul(h,ce)|0,i=(i=i+Math.imul(h,ue)|0)+Math.imul(m,ce)|0,a=a+Math.imul(m,ue)|0;var Ee=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,de)|0)+Math.imul(d,pe)|0))<<13)|0;u=((a=a+Math.imul(d,de)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul($,U),i=(i=Math.imul($,F))+Math.imul(B,U)|0,a=Math.imul(B,F),r=r+Math.imul(D,H)|0,i=(i=i+Math.imul(D,Y)|0)+Math.imul(L,H)|0,a=a+Math.imul(L,Y)|0,r=r+Math.imul(N,G)|0,i=(i=i+Math.imul(N,K)|0)+Math.imul(P,G)|0,a=a+Math.imul(P,K)|0,r=r+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,J)|0)+Math.imul(O,Z)|0,a=a+Math.imul(O,J)|0,r=r+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(T,Q)|0,a=a+Math.imul(T,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(E,ne)|0,a=a+Math.imul(E,re)|0,r=r+Math.imul(x,ae)|0,i=(i=i+Math.imul(x,se)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,se)|0,r=r+Math.imul(b,ce)|0,i=(i=i+Math.imul(b,ue)|0)+Math.imul(y,ce)|0,a=a+Math.imul(y,ue)|0,r=r+Math.imul(h,pe)|0,i=(i=i+Math.imul(h,de)|0)+Math.imul(m,pe)|0,a=a+Math.imul(m,de)|0;var ke=(u+(r=r+Math.imul(p,he)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(d,he)|0))<<13)|0;u=((a=a+Math.imul(d,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul($,H),i=(i=Math.imul($,Y))+Math.imul(B,H)|0,a=Math.imul(B,Y),r=r+Math.imul(D,G)|0,i=(i=i+Math.imul(D,K)|0)+Math.imul(L,G)|0,a=a+Math.imul(L,K)|0,r=r+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,J)|0)+Math.imul(P,Z)|0,a=a+Math.imul(P,J)|0,r=r+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(O,Q)|0,a=a+Math.imul(O,ee)|0,r=r+Math.imul(M,ne)|0,i=(i=i+Math.imul(M,re)|0)+Math.imul(T,ne)|0,a=a+Math.imul(T,re)|0,r=r+Math.imul(S,ae)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,se)|0,r=r+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(w,ce)|0,a=a+Math.imul(w,ue)|0,r=r+Math.imul(b,pe)|0,i=(i=i+Math.imul(b,de)|0)+Math.imul(y,pe)|0,a=a+Math.imul(y,de)|0;var Me=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(m,he)|0))<<13)|0;u=((a=a+Math.imul(m,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul($,G),i=(i=Math.imul($,K))+Math.imul(B,G)|0,a=Math.imul(B,K),r=r+Math.imul(D,Z)|0,i=(i=i+Math.imul(D,J)|0)+Math.imul(L,Z)|0,a=a+Math.imul(L,J)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(P,Q)|0,a=a+Math.imul(P,ee)|0,r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(O,ne)|0,a=a+Math.imul(O,re)|0,r=r+Math.imul(M,ae)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(T,ae)|0,a=a+Math.imul(T,se)|0,r=r+Math.imul(S,ce)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(E,ce)|0,a=a+Math.imul(E,ue)|0,r=r+Math.imul(x,pe)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(w,pe)|0,a=a+Math.imul(w,de)|0;var Te=(u+(r=r+Math.imul(b,he)|0)|0)+((8191&(i=(i=i+Math.imul(b,me)|0)+Math.imul(y,he)|0))<<13)|0;u=((a=a+Math.imul(y,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul($,Z),i=(i=Math.imul($,J))+Math.imul(B,Z)|0,a=Math.imul(B,J),r=r+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(P,ne)|0,a=a+Math.imul(P,re)|0,r=r+Math.imul(R,ae)|0,i=(i=i+Math.imul(R,se)|0)+Math.imul(O,ae)|0,a=a+Math.imul(O,se)|0,r=r+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(T,ce)|0,a=a+Math.imul(T,ue)|0,r=r+Math.imul(S,pe)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(E,pe)|0,a=a+Math.imul(E,de)|0;var Ae=(u+(r=r+Math.imul(x,he)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(w,he)|0))<<13)|0;u=((a=a+Math.imul(w,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul($,Q),i=(i=Math.imul($,ee))+Math.imul(B,Q)|0,a=Math.imul(B,ee),r=r+Math.imul(D,ne)|0,i=(i=i+Math.imul(D,re)|0)+Math.imul(L,ne)|0,a=a+Math.imul(L,re)|0,r=r+Math.imul(N,ae)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(P,ae)|0,a=a+Math.imul(P,se)|0,r=r+Math.imul(R,ce)|0,i=(i=i+Math.imul(R,ue)|0)+Math.imul(O,ce)|0,a=a+Math.imul(O,ue)|0,r=r+Math.imul(M,pe)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(T,pe)|0,a=a+Math.imul(T,de)|0;var Re=(u+(r=r+Math.imul(S,he)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(E,he)|0))<<13)|0;u=((a=a+Math.imul(E,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul($,ne),i=(i=Math.imul($,re))+Math.imul(B,ne)|0,a=Math.imul(B,re),r=r+Math.imul(D,ae)|0,i=(i=i+Math.imul(D,se)|0)+Math.imul(L,ae)|0,a=a+Math.imul(L,se)|0,r=r+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(P,ce)|0,a=a+Math.imul(P,ue)|0,r=r+Math.imul(R,pe)|0,i=(i=i+Math.imul(R,de)|0)+Math.imul(O,pe)|0,a=a+Math.imul(O,de)|0;var Oe=(u+(r=r+Math.imul(M,he)|0)|0)+((8191&(i=(i=i+Math.imul(M,me)|0)+Math.imul(T,he)|0))<<13)|0;u=((a=a+Math.imul(T,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul($,ae),i=(i=Math.imul($,se))+Math.imul(B,ae)|0,a=Math.imul(B,se),r=r+Math.imul(D,ce)|0,i=(i=i+Math.imul(D,ue)|0)+Math.imul(L,ce)|0,a=a+Math.imul(L,ue)|0,r=r+Math.imul(N,pe)|0,i=(i=i+Math.imul(N,de)|0)+Math.imul(P,pe)|0,a=a+Math.imul(P,de)|0;var Ie=(u+(r=r+Math.imul(R,he)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(O,he)|0))<<13)|0;u=((a=a+Math.imul(O,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul($,ce),i=(i=Math.imul($,ue))+Math.imul(B,ce)|0,a=Math.imul(B,ue),r=r+Math.imul(D,pe)|0,i=(i=i+Math.imul(D,de)|0)+Math.imul(L,pe)|0,a=a+Math.imul(L,de)|0;var Ne=(u+(r=r+Math.imul(N,he)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(P,he)|0))<<13)|0;u=((a=a+Math.imul(P,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul($,pe),i=(i=Math.imul($,de))+Math.imul(B,pe)|0,a=Math.imul(B,de);var Pe=(u+(r=r+Math.imul(D,he)|0)|0)+((8191&(i=(i=i+Math.imul(D,me)|0)+Math.imul(L,he)|0))<<13)|0;u=((a=a+Math.imul(L,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var je=(u+(r=Math.imul($,he))|0)+((8191&(i=(i=Math.imul($,me))+Math.imul(B,he)|0))<<13)|0;return u=((a=Math.imul(B,me))+(i>>>13)|0)+(je>>>26)|0,je&=67108863,c[0]=ge,c[1]=be,c[2]=ye,c[3]=ve,c[4]=xe,c[5]=we,c[6]=_e,c[7]=Se,c[8]=Ee,c[9]=ke,c[10]=Me,c[11]=Te,c[12]=Ae,c[13]=Re,c[14]=Oe,c[15]=Ie,c[16]=Ne,c[17]=Pe,c[18]=je,0!==u&&(c[19]=u,n.length++),n};function g(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,a=0;a<n.length-1;a++){var s=i;i=0;for(var o=67108863&r,c=Math.min(a,t.length-1),u=Math.max(0,a-e.length+1);u<=c;u++){var l=a-u,p=(0|e.words[l])*(0|t.words[u]),d=67108863&p;o=67108863&(d=d+o|0),i+=(s=(s=s+(p/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[a]=o,r=s,s=i}return 0!==r?n.words[a]=r:n.length--,n._strip()}function b(e,t,n){return g(e,t,n)}Math.imul||(m=h),i.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?h(this,e,t):n<1024?g(this,e,t):b(this,e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),b(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var a=(0|this.words[i])*e,s=(67108863&a)+(67108863&r);r>>=26,r+=a/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var a=n.sqr();r<t.length;r++,a=a.sqr())0!==t[r]&&(n=n.mul(a));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var o=this.words[t]&a,c=(0|this.words[t])-o<<r;this.words[t]=c|s,s=o>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<<a,c=r;if(i-=s,i=Math.max(0,i),c){for(var u=0;u<s;u++)c.words[u]=this.words[u];c.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=i);u--){var p=0|this.words[u];this.words[u]=l<<26-a|p>>>a,l=p&o}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,a,s=e.length+r;this._expand(s);var o=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+o;var c=(0|e.words[i])*t;o=((a-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)o=(a=(0|this.words[i+r])+o)>>26,this.words[i+r]=67108863&a;if(0===o)return this._strip();for(n(-1===o),o=0,i=0;i<this.length;i++)o=(a=-(0|this.words[i])+o)>>26,this.words[i]=67108863&a;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),a=e,s=0|a.words[a.length-1];0!=(n=26-this._countBits(s))&&(a=a.ushln(n),r.iushln(n),s=0|a.words[a.length-1]);var o,c=r.length-a.length;if("mod"!==t){(o=new i(null)).length=c+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var l=r.clone()._ishlnsubmul(a,1,c);0===l.negative&&(r=l,o&&(o.words[c]=1));for(var p=c-1;p>=0;p--){var d=67108864*(0|r.words[a.length+p])+(0|r.words[a.length+p-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(a,d,p);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(a,1,p),r.isZero()||(r.negative^=1);o&&(o.words[p]=d)}return o&&o._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(a=o.div.neg()),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:a,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(a=o.div.neg()),{div:a,mod:o.mod}):this.negative&e.negative?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var a,s,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),a=n.cmp(r);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,a=this.length-1;a>=0;a--)i=(r*i+(0|this.words[a]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var a=(0|this.words[i])+67108864*r;this.words[i]=a/e|0,r=a%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new i(1),s=new i(0),o=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),p=t.clone();!t.isZero();){for(var d=0,f=1;!(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(l),s.isub(p)),a.iushrn(1),s.iushrn(1);for(var h=0,m=1;!(r.words[0]&m)&&h<26;++h,m<<=1);if(h>0)for(r.iushrn(h);h-- >0;)(o.isOdd()||c.isOdd())&&(o.iadd(l),c.isub(p)),o.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(o),s.isub(c)):(r.isub(t),o.isub(a),c.isub(s))}return{a:o,b:c,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,s=new i(1),o=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,l=1;!(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var p=0,d=1;!(r.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(r.iushrn(p);p-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(o)):(r.isub(t),o.isub(s))}return(a=0===t.cmpn(1)?s:o).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var a=t;t=n,n=a}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new E(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},r(x,v),x.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&n,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&n)<<4|a>>>22,a=s}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(w,v),r(_,v),r(S,v),S.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return y[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(!(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},E.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),s=0;!a.isZero()&&0===a.andln(1);)s++,a.iushrn(1);n(!a.isZero());var o=new i(1).toRed(this),c=o.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var p=this.pow(l,a),d=this.pow(e,a.addn(1).iushrn(1)),f=this.pow(e,a),h=s;0!==f.cmp(o);){for(var m=f,g=0;0!==m.cmp(o);g++)m=m.redSqr();n(g<h);var b=this.pow(p,new i(1).iushln(h-g-1));d=d.redMul(b),p=b.redSqr(),f=f.redMul(p),h=g}return d},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var a=n[0],s=0,o=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],l=c-1;l>=0;l--){var p=u>>l&1;a!==n[0]&&(a=this.sqr(a)),0!==p||0!==s?(s<<=1,s|=p,(4==++o||0===r&&0===l)&&(a=this.mul(a,n[s]),o=0,s=0)):o=0}c=26}return a},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new k(e)},r(k,E),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=n.isub(r).iushrn(this.shift),s=a;return a.cmp(this.m)>=0?s=a.isub(this.m):a.cmpn(0)<0&&(s=a.iadd(this.m)),s._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(Od,Id)),Od.exports}var Pd,jd,Dd,Ld={};function Cd(){if(Pd)return Ld;Pd=1;var e=Ld&&Ld.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ld,"__esModule",{value:!0}),Ld.getLength=Ld.decode=Ld.encode=void 0;const t=e(Nd());function n(e,t){if("0"===e[0]&&"0"===e[1])throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function r(e,t){if(e<56)return Buffer.from([e+t]);{const n=s(e),r=s(t+55+n.length/2);return Buffer.from(r+n,"hex")}}function i(e){let t,r,a,s,o;const c=[],u=e[0];if(u<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(u<=183){if(t=u-127,a=128===u?Buffer.from([]):e.slice(1,t),2===t&&a[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:a,remainder:e.slice(t)}}if(u<=191){if(r=u-182,e.length-1<r)throw new Error("invalid RLP: not enough bytes for string length");if(t=n(e.slice(1,r).toString("hex"),16),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");if(a=e.slice(r,t+r),a.length<t)throw new Error("invalid RLP: not enough bytes for string");return{data:a,remainder:e.slice(t+r)}}if(u<=247){for(t=u-191,s=e.slice(1,t);s.length;)o=i(s),c.push(o.data),s=o.remainder;return{data:c,remainder:e.slice(t)}}{r=u-246,t=n(e.slice(1,r).toString("hex"),16);const a=r+t;if(a>e.length)throw new Error("invalid rlp: total length is larger than the data");if(s=e.slice(r,a),0===s.length)throw new Error("invalid rlp, List has a invalid length");for(;s.length;)o=i(s),c.push(o.data),s=o.remainder;return{data:c,remainder:e.slice(a)}}}function a(e){return"0x"===e.slice(0,2)}function s(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function o(e){if(!Buffer.isBuffer(e)){if("string"==typeof e)return a(e)?Buffer.from((n="string"!=typeof(r=e)?r:a(r)?r.slice(2):r).length%2?`0${n}`:n,"hex"):Buffer.from(e);if("number"==typeof e||"bigint"==typeof e)return e?function(e){const t=s(e);return Buffer.from(t,"hex")}(e):Buffer.from([]);if(null==e)return Buffer.from([]);if(e instanceof Uint8Array)return Buffer.from(e);if(t.default.isBN(e))return Buffer.from(e.toArray());throw new Error("invalid type")}var n,r;return e}return Ld.encode=function e(t){if(Array.isArray(t)){const n=[];for(let r=0;r<t.length;r++)n.push(e(t[r]));const i=Buffer.concat(n);return Buffer.concat([r(i.length,192),i])}{const e=o(t);return 1===e.length&&e[0]<128?e:Buffer.concat([r(e.length,128),e])}},Ld.decode=function(e,t=!1){if(!e||0===e.length)return Buffer.from([]);const n=i(o(e));if(t)return n;if(0!==n.remainder.length)throw new Error("invalid remainder");return n.data},Ld.getLength=function(e){if(!e||0===e.length)return Buffer.from([]);const t=o(e),r=t[0];if(r<=127)return t.length;if(r<=183)return r-127;if(r<=191)return r-182;if(r<=247)return r-191;{const e=r-246;return e+n(t.slice(1,e).toString("hex"),16)}},Ld}function $d(){if(jd)return Rd;jd=1;var e=Rd&&Rd.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),t=Rd&&Rd.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=Rd&&Rd.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&e(r,n,i);return t(r,n),r},r=Rd&&Rd.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Rd,"__esModule",{value:!0}),Rd.rlp=Rd.BN=void 0;const i=r(Nd());Rd.BN=i.default;const a=n(Cd());return Rd.rlp=a,Rd}function Bd(){return Dd||(Dd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.KECCAK256_RLP=e.KECCAK256_RLP_S=e.KECCAK256_RLP_ARRAY=e.KECCAK256_RLP_ARRAY_S=e.KECCAK256_NULL=e.KECCAK256_NULL_S=e.TWO_POW256=e.MAX_INTEGER=e.MAX_UINT64=void 0;const t=p,n=$d();e.MAX_UINT64=new n.BN("ffffffffffffffff",16),e.MAX_INTEGER=new n.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),e.TWO_POW256=new n.BN("10000000000000000000000000000000000000000000000000000000000000000",16),e.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",e.KECCAK256_NULL=t.Buffer.from(e.KECCAK256_NULL_S,"hex"),e.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",e.KECCAK256_RLP_ARRAY=t.Buffer.from(e.KECCAK256_RLP_ARRAY_S,"hex"),e.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",e.KECCAK256_RLP=t.Buffer.from(e.KECCAK256_RLP_S,"hex")}(Ad)),Ad}var zd,Ud,Fd,qd,Hd,Yd,Vd,Gd,Kd,Wd,Zd,Jd,Xd={},Qd={},ef={exports:{}},tf={exports:{}};function nf(){if(Fd)return tf.exports;Fd=1;const e="function"==typeof __webpack_require__?__non_webpack_require__:ws;return"function"==typeof e.addon?tf.exports=e.addon.bind(e):tf.exports=function(){if(Ud)return zd;Ud=1;var e=n,t=a,r=u,i="function"==typeof __webpack_require__?__non_webpack_require__:ws,s=process.config&&process.config.variables||{},o=!!process.env.PREBUILDS_ONLY,c=process.versions.modules,l=process.versions&&process.versions.electron||process.env.ELECTRON_RUN_AS_NODE||"undefined"!=typeof window&&window.process&&"renderer"===window.process.type?"electron":process.versions&&process.versions.nw?"node-webkit":"node",p=process.env.npm_config_arch||r.arch(),d=process.env.npm_config_platform||r.platform(),f=process.env.LIBC||(function(t){return"linux"===t&&e.existsSync("/etc/alpine-release")}(d)?"musl":"glibc"),h=process.env.ARM_VERSION||("arm64"===p?"8":s.arm_version)||"",m=(process.versions.uv||"").split(".")[0];function g(e){return i(g.resolve(e))}function b(t){try{return e.readdirSync(t)}catch(e){return[]}}function y(e,n){var r=b(e).filter(n);return r[0]&&t.join(e,r[0])}function v(e){return/\.node$/.test(e)}function x(e){var t=e.split("-");if(2===t.length){var n=t[0],r=t[1].split("+");if(n&&r.length&&r.every(Boolean))return{name:e,platform:n,architectures:r}}}function w(e,t){return function(n){return null!=n&&n.platform===e&&n.architectures.includes(t)}}function _(e,t){return e.architectures.length-t.architectures.length}function S(e){var t=e.split("."),n={file:e,specificity:0};if("node"===t.pop()){for(var r=0;r<t.length;r++){var i=t[r];if("node"===i||"electron"===i||"node-webkit"===i)n.runtime=i;else if("napi"===i)n.napi=!0;else if("abi"===i.slice(0,3))n.abi=i.slice(3);else if("uv"===i.slice(0,2))n.uv=i.slice(2);else if("armv"===i.slice(0,4))n.armv=i.slice(4);else{if("glibc"!==i&&"musl"!==i)continue;n.libc=i}n.specificity++}return n}}function E(e,t){return function(n){return!(null==n||n.runtime&&n.runtime!==e&&!function(e){return"node"===e.runtime&&e.napi}(n)||n.abi&&n.abi!==t&&!n.napi||n.uv&&n.uv!==m||n.armv&&n.armv!==h||n.libc&&n.libc!==f)}}function k(e){return function(t,n){return t.runtime!==n.runtime?t.runtime===e?-1:1:t.abi!==n.abi?t.abi?-1:1:t.specificity!==n.specificity?t.specificity>n.specificity?-1:1:0}}return zd=g,g.resolve=g.path=function(e){e=t.resolve(e||".");try{var n=i(t.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[n+"_PREBUILD"]&&(e=process.env[n+"_PREBUILD"])}catch(e){}if(!o){var r=y(t.join(e,"build/Release"),v);if(r)return r;var a=y(t.join(e,"build/Debug"),v);if(a)return a}var s=M(e);if(s)return s;var u=M(t.dirname(process.execPath));if(u)return u;var g=["platform="+d,"arch="+p,"runtime="+l,"abi="+c,"uv="+m,h?"armv="+h:"","libc="+f,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"","function"==typeof __webpack_require__?"webpack=true":""].filter(Boolean).join(" ");throw new Error("No native build was found for "+g+"\n loaded from: "+e+"\n");function M(e){var n=b(t.join(e,"prebuilds")).map(x).filter(w(d,p)).sort(_)[0];if(n){var r=t.join(e,"prebuilds",n.name),i=b(r).map(S).filter(E(l,c)).sort(k(l))[0];return i?t.join(r,i.file):void 0}}},g.parseTags=S,g.matchTags=E,g.compareTags=k,g.parseTuple=x,g.matchTuple=w,g.compareTuples=_,zd}(),tf.exports}function rf(){if(Hd)return qd;Hd=1;const e="Impossible case. Please create issue.",t="The tweak was out of range or the resulted private key is invalid",n="The tweak was out of range or equal to zero",r="Unknow error on context randomization",i="Private Key is invalid",a="Public Key could not be parsed",s="Public Key serialization error",o="The sum of the public keys is not valid",c="Signature could not be parsed",u="The nonce generation function failed, or the private key was invalid",l="Public key could not be recover",p="Scalar was invalid (zero or overflow)";function d(e,t){if(!e)throw new Error(t)}function f(e,t,n){if(d(t instanceof Uint8Array,`Expected ${e} to be an Uint8Array`),void 0!==n)if(Array.isArray(n)){const r=`Expected ${e} to be an Uint8Array with length [${n.join(", ")}]`;d(n.includes(t.length),r)}else{const r=`Expected ${e} to be an Uint8Array with length ${n}`;d(t.length===n,r)}}function h(e){d("Boolean"===g(e),"Expected compressed to be a Boolean")}function m(e=e=>new Uint8Array(e),t){return"function"==typeof e&&(e=e(t)),f("output",e,t),e}function g(e){return Object.prototype.toString.call(e).slice(8,-1)}return qd=b=>({contextRandomize(e){if(d(null===e||e instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==e&&f("seed",e,32),1===b.contextRandomize(e))throw new Error(r)},privateKeyVerify:e=>(f("private key",e,32),0===b.privateKeyVerify(e)),privateKeyNegate(t){switch(f("private key",t,32),b.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(e)}},privateKeyTweakAdd(e,n){switch(f("private key",e,32),f("tweak",n,32),b.privateKeyTweakAdd(e,n)){case 0:return e;case 1:throw new Error(t)}},privateKeyTweakMul(e,t){switch(f("private key",e,32),f("tweak",t,32),b.privateKeyTweakMul(e,t)){case 0:return e;case 1:throw new Error(n)}},publicKeyVerify:e=>(f("public key",e,[33,65]),0===b.publicKeyVerify(e)),publicKeyCreate(e,t=!0,n){switch(f("private key",e,32),h(t),n=m(n,t?33:65),b.publicKeyCreate(n,e)){case 0:return n;case 1:throw new Error(i);case 2:throw new Error(s)}},publicKeyConvert(e,t=!0,n){switch(f("public key",e,[33,65]),h(t),n=m(n,t?33:65),b.publicKeyConvert(n,e)){case 0:return n;case 1:throw new Error(a);case 2:throw new Error(s)}},publicKeyNegate(t,n=!0,r){switch(f("public key",t,[33,65]),h(n),r=m(r,n?33:65),b.publicKeyNegate(r,t)){case 0:return r;case 1:throw new Error(a);case 2:throw new Error(e);case 3:throw new Error(s)}},publicKeyCombine(e,t=!0,n){d(Array.isArray(e),"Expected public keys to be an Array"),d(e.length>0,"Expected public keys array will have more than zero items");for(const t of e)f("public key",t,[33,65]);switch(h(t),n=m(n,t?33:65),b.publicKeyCombine(n,e)){case 0:return n;case 1:throw new Error(a);case 2:throw new Error(o);case 3:throw new Error(s)}},publicKeyTweakAdd(e,n,r=!0,i){switch(f("public key",e,[33,65]),f("tweak",n,32),h(r),i=m(i,r?33:65),b.publicKeyTweakAdd(i,e,n)){case 0:return i;case 1:throw new Error(a);case 2:throw new Error(t)}},publicKeyTweakMul(e,t,r=!0,i){switch(f("public key",e,[33,65]),f("tweak",t,32),h(r),i=m(i,r?33:65),b.publicKeyTweakMul(i,e,t)){case 0:return i;case 1:throw new Error(a);case 2:throw new Error(n)}},signatureNormalize(e){switch(f("signature",e,64),b.signatureNormalize(e)){case 0:return e;case 1:throw new Error(c)}},signatureExport(t,n){f("signature",t,64);const r={output:n=m(n,72),outputlen:72};switch(b.signatureExport(r,t)){case 0:return n.slice(0,r.outputlen);case 1:throw new Error(c);case 2:throw new Error(e)}},signatureImport(t,n){switch(f("signature",t),n=m(n,64),b.signatureImport(n,t)){case 0:return n;case 1:throw new Error(c);case 2:throw new Error(e)}},ecdsaSign(t,n,r={},i){f("message",t,32),f("private key",n,32),d("Object"===g(r),"Expected options to be an Object"),void 0!==r.data&&f("options.data",r.data),void 0!==r.noncefn&&d("Function"===g(r.noncefn),"Expected options.noncefn to be a Function");const a={signature:i=m(i,64),recid:null};switch(b.ecdsaSign(a,t,n,r.data,r.noncefn)){case 0:return a;case 1:throw new Error(u);case 2:throw new Error(e)}},ecdsaVerify(e,t,n){switch(f("signature",e,64),f("message",t,32),f("public key",n,[33,65]),b.ecdsaVerify(e,t,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(c);case 2:throw new Error(a)}},ecdsaRecover(t,n,r,i=!0,a){switch(f("signature",t,64),d("Number"===g(n)&&n>=0&&n<=3,"Expected recovery id to be a Number within interval [0, 3]"),f("message",r,32),h(i),a=m(a,i?33:65),b.ecdsaRecover(a,t,n,r)){case 0:return a;case 1:throw new Error(c);case 2:throw new Error(l);case 3:throw new Error(e)}},ecdh(e,t,n={},r){switch(f("public key",e,[33,65]),f("private key",t,32),d("Object"===g(n),"Expected options to be an Object"),void 0!==n.data&&f("options.data",n.data),void 0!==n.hashfn?(d("Function"===g(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&f("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&f("options.ybuf",n.ybuf,32),f("output",r)):r=m(r,32),b.ecdh(r,e,t,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return r;case 1:throw new Error(a);case 2:throw new Error(p)}}}),qd}function af(){if(Kd)return Gd;Kd=1;const e=new(0,yd().ec)("secp256k1"),t=e.curve,n=t.n.constructor;function r(r){const i=r[0];switch(i){case 2:case 3:return 33!==r.length?null:function(r,i){let a=new n(i);if(a.cmp(t.p)>=0)return null;a=a.toRed(t.red);let s=a.redSqr().redIMul(a).redIAdd(t.b).redSqrt();3===r!==s.isOdd()&&(s=s.redNeg());const o=a.redSqr().redIMul(a);return s.redSqr().redISub(o.redIAdd(t.b)).isZero()?e.keyPair({pub:{x:a,y:s}}):null}(i,r.subarray(1,33));case 4:case 6:case 7:return 65!==r.length?null:function(r,i,a){let s=new n(i),o=new n(a);if(s.cmp(t.p)>=0||o.cmp(t.p)>=0)return null;if(s=s.toRed(t.red),o=o.toRed(t.red),(6===r||7===r)&&o.isOdd()!==(7===r))return null;const c=s.redSqr().redIMul(s);return o.redSqr().redISub(c.redIAdd(t.b)).isZero()?e.keyPair({pub:{x:s,y:o}}):null}(i,r.subarray(1,33),r.subarray(33,65));default:return null}}function i(e,t){const n=t.encode(null,33===e.length);for(let t=0;t<e.length;++t)e[t]=n[t]}return Gd={contextRandomize:()=>0,privateKeyVerify(e){const r=new n(e);return r.cmp(t.n)<0&&!r.isZero()?0:1},privateKeyNegate(e){const r=new n(e),i=t.n.sub(r).umod(t.n).toArrayLike(Uint8Array,"be",32);return e.set(i),0},privateKeyTweakAdd(e,r){const i=new n(r);if(i.cmp(t.n)>=0)return 1;if(i.iadd(new n(e)),i.cmp(t.n)>=0&&i.isub(t.n),i.isZero())return 1;const a=i.toArrayLike(Uint8Array,"be",32);return e.set(a),0},privateKeyTweakMul(e,r){let i=new n(r);if(i.cmp(t.n)>=0||i.isZero())return 1;i.imul(new n(e)),i.cmp(t.n)>=0&&(i=i.umod(t.n));const a=i.toArrayLike(Uint8Array,"be",32);return e.set(a),0},publicKeyVerify:e=>null===r(e)?1:0,publicKeyCreate(r,a){const s=new n(a);if(s.cmp(t.n)>=0||s.isZero())return 1;return i(r,e.keyFromPrivate(a).getPublic()),0},publicKeyConvert(e,t){const n=r(t);if(null===n)return 1;return i(e,n.getPublic()),0},publicKeyNegate(e,t){const n=r(t);if(null===n)return 1;const a=n.getPublic();return a.y=a.y.redNeg(),i(e,a),0},publicKeyCombine(e,t){const n=new Array(t.length);for(let e=0;e<t.length;++e)if(n[e]=r(t[e]),null===n[e])return 1;let a=n[0].getPublic();for(let e=1;e<n.length;++e)a=a.add(n[e].pub);return a.isInfinity()?2:(i(e,a),0)},publicKeyTweakAdd(e,a,s){const o=r(a);if(null===o)return 1;if((s=new n(s)).cmp(t.n)>=0)return 2;const c=o.getPublic().add(t.g.mul(s));return c.isInfinity()?2:(i(e,c),0)},publicKeyTweakMul(e,a,s){const o=r(a);if(null===o)return 1;if((s=new n(s)).cmp(t.n)>=0||s.isZero())return 2;return i(e,o.getPublic().mul(s)),0},signatureNormalize(r){const i=new n(r.subarray(0,32)),a=new n(r.subarray(32,64));return i.cmp(t.n)>=0||a.cmp(t.n)>=0?1:(1===a.cmp(e.nh)&&r.set(t.n.sub(a).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(e,r){const i=r.subarray(0,32),a=r.subarray(32,64);if(new n(i).cmp(t.n)>=0)return 1;if(new n(a).cmp(t.n)>=0)return 1;const{output:s}=e;let o=s.subarray(4,37);o[0]=0,o.set(i,1);let c=33,u=0;for(;c>1&&0===o[u]&&!(128&o[u+1]);--c,++u);if(o=o.subarray(u),128&o[0])return 1;if(c>1&&0===o[0]&&!(128&o[1]))return 1;let l=s.subarray(39,72);l[0]=0,l.set(a,1);let p=33,d=0;for(;p>1&&0===l[d]&&!(128&l[d+1]);--p,++d);return l=l.subarray(d),128&l[0]||p>1&&0===l[0]&&!(128&l[1])?1:(e.outputlen=6+c+p,s[0]=48,s[1]=e.outputlen-2,s[2]=2,s[3]=o.length,s.set(o,4),s[4+c]=2,s[5+c]=l.length,s.set(l,6+c),0)},signatureImport(e,r){if(r.length<8)return 1;if(r.length>72)return 1;if(48!==r[0])return 1;if(r[1]!==r.length-2)return 1;if(2!==r[2])return 1;const i=r[3];if(0===i)return 1;if(5+i>=r.length)return 1;if(2!==r[4+i])return 1;const a=r[5+i];if(0===a)return 1;if(6+i+a!==r.length)return 1;if(128&r[4])return 1;if(i>1&&0===r[4]&&!(128&r[5]))return 1;if(128&r[i+6])return 1;if(a>1&&0===r[i+6]&&!(128&r[i+7]))return 1;let s=r.subarray(4,4+i);if(33===s.length&&0===s[0]&&(s=s.subarray(1)),s.length>32)return 1;let o=r.subarray(6+i);if(33===o.length&&0===o[0]&&(o=o.slice(1)),o.length>32)throw new Error("S length is too long");let c=new n(s);c.cmp(t.n)>=0&&(c=new n(0));let u=new n(r.subarray(6+i));return u.cmp(t.n)>=0&&(u=new n(0)),e.set(c.toArrayLike(Uint8Array,"be",32),0),e.set(u.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(r,i,a,s,o){if(o){const e=o;o=t=>{const r=e(i,a,null,s,t);if(!(r instanceof Uint8Array&&32===r.length))throw new Error("This is the way");return new n(r)}}const c=new n(a);if(c.cmp(t.n)>=0||c.isZero())return 1;let u;try{u=e.sign(i,a,{canonical:!0,k:o,pers:s})}catch(e){return 1}return r.signature.set(u.r.toArrayLike(Uint8Array,"be",32),0),r.signature.set(u.s.toArrayLike(Uint8Array,"be",32),32),r.recid=u.recoveryParam,0},ecdsaVerify(i,a,s){const o={r:i.subarray(0,32),s:i.subarray(32,64)},c=new n(o.r),u=new n(o.s);if(c.cmp(t.n)>=0||u.cmp(t.n)>=0)return 1;if(1===u.cmp(e.nh)||c.isZero()||u.isZero())return 3;const l=r(s);if(null===l)return 2;const p=l.getPublic();return e.verify(a,o,p)?0:3},ecdsaRecover(r,a,s,o){const c={r:a.slice(0,32),s:a.slice(32,64)},u=new n(c.r),l=new n(c.s);if(u.cmp(t.n)>=0||l.cmp(t.n)>=0)return 1;if(u.isZero()||l.isZero())return 2;let p;try{p=e.recoverPubKey(o,c,s)}catch(e){return 2}return i(r,p),0},ecdh(i,a,s,o,c,u,l){const p=r(a);if(null===p)return 1;const d=new n(s);if(d.cmp(t.n)>=0||d.isZero())return 2;const f=p.getPublic().mul(d);if(void 0===c){const t=f.encode(null,!0),n=e.hash().update(t).digest();for(let e=0;e<32;++e)i[e]=n[e]}else{u||(u=new Uint8Array(32));const e=f.getX().toArray("be",32);for(let t=0;t<32;++t)u[t]=e[t];l||(l=new Uint8Array(32));const t=f.getY().toArray("be",32);for(let e=0;e<32;++e)l[e]=t[e];const n=c(u,l,o);if(!(n instanceof Uint8Array&&n.length===i.length))return 2;i.set(n)}return 0}},Gd}function sf(){if(Jd)return ef.exports;Jd=1;try{ef.exports=function(){if(Vd)return Yd;Vd=1;const e=nf()(__dirname);return Yd=rf()(new e.Secp256k1)}()}catch(e){ef.exports=Zd?Wd:(Zd=1,Wd=rf()(af()))}return ef.exports}var of,cf,uf,lf,pf={};function df(){return cf?of:(cf=1,of=w.randomBytes)}function ff(){if(uf)return pf;uf=1,Object.defineProperty(pf,"__esModule",{value:!0});var e=df();return pf.getRandomBytes=function(t){return new Promise((function(n,r){e(t,(function(e,t){e?r(e):n(t)}))}))},pf.getRandomBytesSync=function(t){return e(t)},pf}function hf(){return lf||(lf=1,function(e){var t=Qd&&Qd.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function s(e){try{c(r.next(e))}catch(e){a(e)}}function o(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,o)}c((r=r.apply(e,t||[])).next())}))},n=Qd&&Qd.__generator||function(e,t){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var r=sf(),i=ff();e.createPrivateKey=function(){return t(this,void 0,void 0,(function(){var e;return n(this,(function(t){switch(t.label){case 0:return[4,i.getRandomBytes(32)];case 1:return e=t.sent(),r.privateKeyVerify(e)?[2,e]:[3,0];case 2:return[2]}}))}))},e.createPrivateKeySync=function(){for(;;){var e=i.getRandomBytesSync(32);if(r.privateKeyVerify(e))return e}},function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(sf())}(Qd)),Qd}var mf,gf={};function bf(){if(mf)return gf;function e(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type "+typeof e);return"0"===e[0]&&"x"===e[1]}mf=1,Object.defineProperty(gf,"__esModule",{value:!0}),gf.isHexString=gf.getKeys=gf.fromAscii=gf.fromUtf8=gf.toAscii=gf.arrayContainsArray=gf.getBinarySize=gf.padToEven=gf.stripHexPrefix=gf.isHexPrefixed=void 0,gf.isHexPrefixed=e;function t(e){let t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}return gf.stripHexPrefix=t=>{if("string"!=typeof t)throw new Error("[stripHexPrefix] input must be type 'string', received "+typeof t);return e(t)?t.slice(2):t},gf.padToEven=t,gf.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', recieved "+typeof e);return Buffer.byteLength(e,"utf8")},gf.arrayContainsArray=function(e,t,n){if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[n?"some":"every"]((t=>e.indexOf(t)>=0))},gf.toAscii=function(e){let t="",n=0;const r=e.length;for("0x"===e.substring(0,2)&&(n=2);n<r;n+=2){const r=parseInt(e.substr(n,2),16);t+=String.fromCharCode(r)}return t},gf.fromUtf8=function(e){return`0x${t(Buffer.from(e,"utf8").toString("hex")).replace(/^0+|0+$/g,"")}`},gf.fromAscii=function(e){let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n).toString(16);t+=r.length<2?`0${r}`:r}return`0x${t}`},gf.getKeys=function(e,t,n){if(!Array.isArray(e))throw new Error("[getKeys] method expects input 'params' to be an array, got "+typeof e);if("string"!=typeof t)throw new Error("[getKeys] method expects input 'key' to be type 'string', got "+typeof e);const r=[];for(let i=0;i<e.length;i++){let a=e[i][t];if(n&&!a)a="";else if("string"!=typeof a)throw new Error("invalid abi - expected type 'string', received "+typeof a);r.push(a)}return r},gf.isHexString=function(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)},gf}var yf,vf,xf={},wf={};function _f(){if(yf)return wf;yf=1,Object.defineProperty(wf,"__esModule",{value:!0}),wf.assertIsString=wf.assertIsArray=wf.assertIsBuffer=wf.assertIsHexString=void 0;const e=bf();wf.assertIsHexString=function(t){if(!(0,e.isHexString)(t)){throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${t}`)}};wf.assertIsBuffer=function(e){if(!Buffer.isBuffer(e)){throw new Error(`This method only supports Buffer but input was: ${e}`)}};wf.assertIsArray=function(e){if(!Array.isArray(e)){throw new Error(`This method only supports number arrays but input was: ${e}`)}};return wf.assertIsString=function(e){if("string"!=typeof e){throw new Error(`This method only supports strings but input was: ${e}`)}},wf}function Sf(){return vf||(vf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bufArrToArr=e.arrToBufArr=e.validateNoLeadingZeroes=e.baToJSON=e.toUtf8=e.addHexPrefix=e.toUnsigned=e.fromSigned=e.bufferToHex=e.bufferToInt=e.toBuffer=e.unpadHexString=e.unpadArray=e.unpadBuffer=e.setLengthRight=e.setLengthLeft=e.zeros=e.intToBuffer=e.intToHex=void 0;const t=$d(),n=bf(),r=_f();e.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`};e.intToBuffer=function(t){const r=(0,e.intToHex)(t);return Buffer.from((0,n.padToEven)(r.slice(2)),"hex")};e.zeros=function(e){return Buffer.allocUnsafe(e).fill(0)};const i=function(t,n,r){const i=(0,e.zeros)(n);return r?t.length<n?(t.copy(i),i):t.slice(0,n):t.length<n?(t.copy(i,n-t.length),i):t.slice(-n)};e.setLengthLeft=function(e,t){return(0,r.assertIsBuffer)(e),i(e,t,!1)};e.setLengthRight=function(e,t){return(0,r.assertIsBuffer)(e),i(e,t,!0)};const a=function(e){let t=e[0];for(;e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};e.unpadBuffer=function(e){return(0,r.assertIsBuffer)(e),a(e)};e.unpadArray=function(e){return(0,r.assertIsArray)(e),a(e)};e.unpadHexString=function(e){return(0,r.assertIsHexString)(e),e=(0,n.stripHexPrefix)(e),a(e)};e.toBuffer=function(r){if(null==r)return Buffer.allocUnsafe(0);if(Buffer.isBuffer(r))return Buffer.from(r);if(Array.isArray(r)||r instanceof Uint8Array)return Buffer.from(r);if("string"==typeof r){if(!(0,n.isHexString)(r))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${r}`);return Buffer.from((0,n.padToEven)((0,n.stripHexPrefix)(r)),"hex")}if("number"==typeof r)return(0,e.intToBuffer)(r);if(t.BN.isBN(r)){if(r.isNeg())throw new Error(`Cannot convert negative BN to buffer. Given: ${r}`);return r.toArrayLike(Buffer)}if(r.toArray)return Buffer.from(r.toArray());if(r.toBuffer)return Buffer.from(r.toBuffer());throw new Error("invalid type")};e.bufferToInt=function(n){return new t.BN((0,e.toBuffer)(n)).toNumber()};e.bufferToHex=function(t){return"0x"+(t=(0,e.toBuffer)(t)).toString("hex")};e.fromSigned=function(e){return new t.BN(e).fromTwos(256)};e.toUnsigned=function(e){return Buffer.from(e.toTwos(256).toArray())};e.addHexPrefix=function(e){return"string"!=typeof e||(0,n.isHexPrefixed)(e)?e:"0x"+e};e.toUtf8=function(e){if((e=(0,n.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return Buffer.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")};e.baToJSON=function(t){if(Buffer.isBuffer(t))return`0x${t.toString("hex")}`;if(t instanceof Array){const n=[];for(let r=0;r<t.length;r++)n.push((0,e.baToJSON)(t[r]));return n}};e.validateNoLeadingZeroes=function(e){for(const[t,n]of Object.entries(e))if(void 0!==n&&n.length>0&&0===n[0])throw new Error(`${t} cannot have leading zeroes, received: ${n.toString("hex")}`)},e.arrToBufArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Buffer.from(t)},e.bufArrToArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Uint8Array.from(null!=t?t:[])}}(xf)),xf}var Ef,kf={},Mf={},Tf={};function Af(){if(Ef)return Tf;return Ef=1,Object.defineProperty(Tf,"__esModule",{value:!0}),Tf.createHashFunction=function(e){return function(t){var n=e();return n.update(t),Buffer.from(n.digest())}},Tf}var Rf,Of,If,Nf,Pf,jf,Df,Lf,Cf={exports:{}};function $f(){if(jf)return Pf;jf=1;const e=function(){if(Of)return Rf;Of=1;const{Transform:e}=fi();return Rf=t=>class n extends e{constructor(e,n,r,i,a){super(a),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._hashBitLength=i,this._options=a,this._state=new t,this._state.initialize(e,n),this._finalized=!1}_transform(e,t,n){let r=null;try{this.update(e,t)}catch(e){r=e}n(r)}_flush(e){let t=null;try{this.push(this.digest())}catch(e){t=e}e(t)}update(e,t){if(!Buffer.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(e)||(e=Buffer.from(e,t)),this._state.absorb(e),this}digest(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new n(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}}(),t=function(){if(Nf)return If;Nf=1;const{Transform:e}=fi();return If=t=>class n extends e{constructor(e,n,r,i){super(i),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._options=i,this._state=new t,this._state.initialize(e,n),this._finalized=!1}_transform(e,t,n){let r=null;try{this.update(e,t)}catch(e){r=e}n(r)}_flush(){}_read(e){this.push(this.squeeze(e))}update(e,t){if(!Buffer.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(e)||(e=Buffer.from(e,t)),this._state.absorb(e),this}squeeze(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let n=this._state.squeeze(e);return void 0!==t&&(n=n.toString(t)),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new n(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}}();return Pf=function(n){const r=e(n),i=t(n);return function(e,t){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new r(1152,448,null,224,t);case"keccak256":return new r(1088,512,null,256,t);case"keccak384":return new r(832,768,null,384,t);case"keccak512":return new r(576,1024,null,512,t);case"sha3-224":return new r(1152,448,6,224,t);case"sha3-256":return new r(1088,512,6,256,t);case"sha3-384":return new r(832,768,6,384,t);case"sha3-512":return new r(576,1024,6,512,t);case"shake128":return new i(1344,256,31,t);case"shake256":return new i(1088,512,31,t);default:throw new Error("Invald algorithm: "+e)}}}}var Bf,zf,Uf,Ff,qf,Hf,Yf,Vf,Gf,Kf,Wf={};function Zf(){if(Uf)return zf;Uf=1;const e=function(){if(Bf)return Wf;Bf=1;const e=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];return Wf.p1600=function(t){for(let n=0;n<24;++n){const r=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],a=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],o=t[4]^t[14]^t[24]^t[34]^t[44],c=t[5]^t[15]^t[25]^t[35]^t[45],u=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],p=t[8]^t[18]^t[28]^t[38]^t[48],d=t[9]^t[19]^t[29]^t[39]^t[49];let f=p^(a<<1|s>>>31),h=d^(s<<1|a>>>31);const m=t[0]^f,g=t[1]^h,b=t[10]^f,y=t[11]^h,v=t[20]^f,x=t[21]^h,w=t[30]^f,_=t[31]^h,S=t[40]^f,E=t[41]^h;f=r^(o<<1|c>>>31),h=i^(c<<1|o>>>31);const k=t[2]^f,M=t[3]^h,T=t[12]^f,A=t[13]^h,R=t[22]^f,O=t[23]^h,I=t[32]^f,N=t[33]^h,P=t[42]^f,j=t[43]^h;f=a^(u<<1|l>>>31),h=s^(l<<1|u>>>31);const D=t[4]^f,L=t[5]^h,C=t[14]^f,$=t[15]^h,B=t[24]^f,z=t[25]^h,U=t[34]^f,F=t[35]^h,q=t[44]^f,H=t[45]^h;f=o^(p<<1|d>>>31),h=c^(d<<1|p>>>31);const Y=t[6]^f,V=t[7]^h,G=t[16]^f,K=t[17]^h,W=t[26]^f,Z=t[27]^h,J=t[36]^f,X=t[37]^h,Q=t[46]^f,ee=t[47]^h;f=u^(r<<1|i>>>31),h=l^(i<<1|r>>>31);const te=t[8]^f,ne=t[9]^h,re=t[18]^f,ie=t[19]^h,ae=t[28]^f,se=t[29]^h,oe=t[38]^f,ce=t[39]^h,ue=t[48]^f,le=t[49]^h,pe=m,de=g,fe=y<<4|b>>>28,he=b<<4|y>>>28,me=v<<3|x>>>29,ge=x<<3|v>>>29,be=_<<9|w>>>23,ye=w<<9|_>>>23,ve=S<<18|E>>>14,xe=E<<18|S>>>14,we=k<<1|M>>>31,_e=M<<1|k>>>31,Se=A<<12|T>>>20,Ee=T<<12|A>>>20,ke=R<<10|O>>>22,Me=O<<10|R>>>22,Te=N<<13|I>>>19,Ae=I<<13|N>>>19,Re=P<<2|j>>>30,Oe=j<<2|P>>>30,Ie=L<<30|D>>>2,Ne=D<<30|L>>>2,Pe=C<<6|$>>>26,je=$<<6|C>>>26,De=z<<11|B>>>21,Le=B<<11|z>>>21,Ce=U<<15|F>>>17,$e=F<<15|U>>>17,Be=H<<29|q>>>3,ze=q<<29|H>>>3,Ue=Y<<28|V>>>4,Fe=V<<28|Y>>>4,qe=K<<23|G>>>9,He=G<<23|K>>>9,Ye=W<<25|Z>>>7,Ve=Z<<25|W>>>7,Ge=J<<21|X>>>11,Ke=X<<21|J>>>11,We=ee<<24|Q>>>8,Ze=Q<<24|ee>>>8,Je=te<<27|ne>>>5,Xe=ne<<27|te>>>5,Qe=re<<20|ie>>>12,et=ie<<20|re>>>12,tt=se<<7|ae>>>25,nt=ae<<7|se>>>25,rt=oe<<8|ce>>>24,it=ce<<8|oe>>>24,at=ue<<14|le>>>18,st=le<<14|ue>>>18;t[0]=pe^~Se&De,t[1]=de^~Ee&Le,t[10]=Ue^~Qe&me,t[11]=Fe^~et&ge,t[20]=we^~Pe&Ye,t[21]=_e^~je&Ve,t[30]=Je^~fe&ke,t[31]=Xe^~he&Me,t[40]=Ie^~qe&tt,t[41]=Ne^~He&nt,t[2]=Se^~De&Ge,t[3]=Ee^~Le&Ke,t[12]=Qe^~me&Te,t[13]=et^~ge&Ae,t[22]=Pe^~Ye&rt,t[23]=je^~Ve&it,t[32]=fe^~ke&Ce,t[33]=he^~Me&$e,t[42]=qe^~tt&be,t[43]=He^~nt&ye,t[4]=De^~Ge&at,t[5]=Le^~Ke&st,t[14]=me^~Te&Be,t[15]=ge^~Ae&ze,t[24]=Ye^~rt&ve,t[25]=Ve^~it&xe,t[34]=ke^~Ce&We,t[35]=Me^~$e&Ze,t[44]=tt^~be&Re,t[45]=nt^~ye&Oe,t[6]=Ge^~at&pe,t[7]=Ke^~st&de,t[16]=Te^~Be&Ue,t[17]=Ae^~ze&Fe,t[26]=rt^~ve&we,t[27]=it^~xe&_e,t[36]=Ce^~We&Je,t[37]=$e^~Ze&Xe,t[46]=be^~Re&Ie,t[47]=ye^~Oe&Ne,t[8]=at^~pe&Se,t[9]=st^~de&Ee,t[18]=Be^~Ue&Qe,t[19]=ze^~Fe&et,t[28]=ve^~we&Pe,t[29]=xe^~_e&je,t[38]=We^~Je&fe,t[39]=Ze^~Xe&he,t[48]=Re^~Ie&qe,t[49]=Oe^~Ne&He,t[0]^=e[2*n],t[1]^=e[2*n+1]}},Wf}();function t(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}return t.prototype.initialize=function(e,t){for(let e=0;e<50;++e)this.state[e]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},t.prototype.absorb=function(t){for(let n=0;n<t.length;++n)this.state[~~(this.count/4)]^=t[n]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(e.p1600(this.state),this.count=0)},t.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<this.count%4*8,128&t&&this.count===this.blockSize-1&&e.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,e.p1600(this.state),this.count=0,this.squeezing=!0},t.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);const n=Buffer.alloc(t);for(let r=0;r<t;++r)n[r]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(e.p1600(this.state),this.count=0);return n},t.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},zf=t}function Jf(){if(Hf)return Cf.exports;Hf=1;try{Cf.exports=function(){if(Lf)return Df;Lf=1;const e=nf()(__dirname);if("function"!=typeof e)throw new Error("Native add-on failed to load");return Df=$f()(e)}()}catch(e){Cf.exports=qf?Ff:(qf=1,Ff=$f()(Zf()))}return Cf.exports}function Xf(){if(Yf)return Mf;Yf=1,Object.defineProperty(Mf,"__esModule",{value:!0});var e=Af(),t=Jf();return Mf.keccak224=e.createHashFunction((function(){return t("keccak224")})),Mf.keccak256=e.createHashFunction((function(){return t("keccak256")})),Mf.keccak384=e.createHashFunction((function(){return t("keccak384")})),Mf.keccak512=e.createHashFunction((function(){return t("keccak512")})),Mf}function Qf(){return Gf?Vf:(Gf=1,Vf=w.createHash)}function eh(){return Kf||(Kf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.rlphash=e.ripemd160FromArray=e.ripemd160FromString=e.ripemd160=e.sha256FromArray=e.sha256FromString=e.sha256=e.keccakFromArray=e.keccakFromHexString=e.keccakFromString=e.keccak256=e.keccak=void 0;const t=Xf(),n=Qf(),r=$d(),i=Sf(),a=_f();e.keccak=function(e,n=256){switch((0,a.assertIsBuffer)(e),n){case 224:return(0,t.keccak224)(e);case 256:return(0,t.keccak256)(e);case 384:return(0,t.keccak384)(e);case 512:return(0,t.keccak512)(e);default:throw new Error(`Invald algorithm: keccak${n}`)}};e.keccak256=function(t){return(0,e.keccak)(t)};e.keccakFromString=function(t,n=256){(0,a.assertIsString)(t);const r=Buffer.from(t,"utf8");return(0,e.keccak)(r,n)};e.keccakFromHexString=function(t,n=256){return(0,a.assertIsHexString)(t),(0,e.keccak)((0,i.toBuffer)(t),n)};e.keccakFromArray=function(t,n=256){return(0,a.assertIsArray)(t),(0,e.keccak)((0,i.toBuffer)(t),n)};const s=function(e){return e=(0,i.toBuffer)(e),n("sha256").update(e).digest()};e.sha256=function(e){return(0,a.assertIsBuffer)(e),s(e)};e.sha256FromString=function(e){return(0,a.assertIsString)(e),s(e)};e.sha256FromArray=function(e){return(0,a.assertIsArray)(e),s(e)};const o=function(e,t){e=(0,i.toBuffer)(e);const r=n("rmd160").update(e).digest();return!0===t?(0,i.setLengthLeft)(r,32):r};e.ripemd160=function(e,t){return(0,a.assertIsBuffer)(e),o(e,t)};e.ripemd160FromString=function(e,t){return(0,a.assertIsString)(e),o(e,t)};e.ripemd160FromArray=function(e,t){return(0,a.assertIsArray)(e),o(e,t)};e.rlphash=function(t){return(0,e.keccak)(r.rlp.encode(t))}}(kf)),kf}var th,nh,rh={};function ih(){return th||(th=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toType=e.TypeOutput=e.bnToRlp=e.bnToUnpaddedBuffer=e.bnToHex=void 0;const t=$d(),n=bf(),r=Sf();function i(e){return(0,r.unpadBuffer)(e.toArrayLike(Buffer))}var a;e.bnToHex=function(e){return`0x${e.toString(16)}`},e.bnToUnpaddedBuffer=i,e.bnToRlp=function(e){return i(e)},function(e){e[e.Number=0]="Number",e[e.BN=1]="BN",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(a=e.TypeOutput||(e.TypeOutput={})),e.toType=function(e,i){if(null===e)return null;if(void 0===e)return;if("string"==typeof e&&!(0,n.isHexString)(e))throw new Error(`A string must be provided with a 0x-prefix, given: ${e}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const s=(0,r.toBuffer)(e);if(i===a.Buffer)return s;if(i===a.BN)return new t.BN(s);if(i===a.Number){const e=new t.BN(s),n=new t.BN(Number.MAX_SAFE_INTEGER.toString());if(e.gt(n))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return e.toNumber()}return`0x${s.toString("hex")}`}}(rh)),rh}function ah(){return nh||(nh=1,function(e){var t=Xd&&Xd.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.isZeroAddress=e.zeroAddress=e.importPublic=e.privateToAddress=e.privateToPublic=e.publicToAddress=e.pubToAddress=e.isValidPublic=e.isValidPrivate=e.generateAddress2=e.generateAddress=e.isValidChecksumAddress=e.toChecksumAddress=e.isValidAddress=e.Account=void 0;const n=t(k),r=$d(),i=hf(),a=bf(),s=Bd(),o=Sf(),c=eh(),u=_f(),l=ih();class p{constructor(e=new r.BN(0),t=new r.BN(0),n=s.KECCAK256_RLP,i=s.KECCAK256_NULL){this.nonce=e,this.balance=t,this.stateRoot=n,this.codeHash=i,this._validate()}static fromAccountData(e){const{nonce:t,balance:n,stateRoot:i,codeHash:a}=e;return new p(t?new r.BN((0,o.toBuffer)(t)):void 0,n?new r.BN((0,o.toBuffer)(n)):void 0,i?(0,o.toBuffer)(i):void 0,a?(0,o.toBuffer)(a):void 0)}static fromRlpSerializedAccount(e){const t=r.rlp.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)}static fromValuesArray(e){const[t,n,i,a]=e;return new p(new r.BN(t),new r.BN(n),i,a)}_validate(){if(this.nonce.lt(new r.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new r.BN(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")}raw(){return[(0,l.bnToUnpaddedBuffer)(this.nonce),(0,l.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]}serialize(){return r.rlp.encode(this.raw())}isContract(){return!this.codeHash.equals(s.KECCAK256_NULL)}isEmpty(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(s.KECCAK256_NULL)}}e.Account=p;e.isValidAddress=function(e){try{(0,u.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)};e.toChecksumAddress=function(e,t){(0,u.assertIsHexString)(e);const n=(0,a.stripHexPrefix)(e).toLowerCase();let r="";if(t){r=(0,l.toType)(t,l.TypeOutput.BN).toString()+"0x"}const i=(0,c.keccakFromString)(r+n).toString("hex");let s="0x";for(let e=0;e<n.length;e++)parseInt(i[e],16)>=8?s+=n[e].toUpperCase():s+=n[e];return s};e.isValidChecksumAddress=function(t,n){return(0,e.isValidAddress)(t)&&(0,e.toChecksumAddress)(t,n)===t};e.generateAddress=function(e,t){(0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(t);const n=new r.BN(t);return n.isZero()?(0,c.rlphash)([e,null]).slice(-20):(0,c.rlphash)([e,Buffer.from(n.toArray())]).slice(-20)};e.generateAddress2=function(e,t,r){(0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(t),(0,u.assertIsBuffer)(r),(0,n.default)(20===e.length),(0,n.default)(32===t.length);return(0,c.keccak256)(Buffer.concat([Buffer.from("ff","hex"),e,t,(0,c.keccak256)(r)])).slice(-20)};e.isValidPrivate=function(e){return(0,i.privateKeyVerify)(e)};e.isValidPublic=function(e,t=!1){return(0,u.assertIsBuffer)(e),64===e.length?(0,i.publicKeyVerify)(Buffer.concat([Buffer.from([4]),e])):!!t&&(0,i.publicKeyVerify)(e)};e.pubToAddress=function(e,t=!1){return(0,u.assertIsBuffer)(e),t&&64!==e.length&&(e=Buffer.from((0,i.publicKeyConvert)(e,!1).slice(1))),(0,n.default)(64===e.length),(0,c.keccak)(e).slice(-20)},e.publicToAddress=e.pubToAddress;e.privateToPublic=function(e){return(0,u.assertIsBuffer)(e),Buffer.from((0,i.publicKeyCreate)(e,!1)).slice(1)};e.privateToAddress=function(t){return(0,e.publicToAddress)((0,e.privateToPublic)(t))};e.importPublic=function(e){return(0,u.assertIsBuffer)(e),64!==e.length&&(e=Buffer.from((0,i.publicKeyConvert)(e,!1).slice(1))),e};e.zeroAddress=function(){const e=(0,o.zeros)(20);return(0,o.bufferToHex)(e)};e.isZeroAddress=function(t){try{(0,u.assertIsString)(t)}catch(e){return!1}return(0,e.zeroAddress)()===t}}(Xd)),Xd}var sh,oh={};var ch,uh={};var lh,ph,dh={};var fh,hh,mh,gh,bh,yh=(ph||(ph=1,function(e){var t=Td&&Td.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=Td&&Td.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.isHexString=e.getKeys=e.fromAscii=e.fromUtf8=e.toAscii=e.arrayContainsArray=e.getBinarySize=e.padToEven=e.stripHexPrefix=e.isHexPrefixed=void 0,n(Bd(),e),n(ah(),e),n(function(){if(sh)return oh;sh=1;var e=oh&&oh.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oh,"__esModule",{value:!0}),oh.Address=void 0;const t=e(k),n=$d(),r=Sf(),i=ah();class a{constructor(e){(0,t.default)(20===e.length,"Invalid address length"),this.buf=e}static zero(){return new a((0,r.zeros)(20))}static fromString(e){return(0,t.default)((0,i.isValidAddress)(e),"Invalid address"),new a((0,r.toBuffer)(e))}static fromPublicKey(e){(0,t.default)(Buffer.isBuffer(e),"Public key should be Buffer");const n=(0,i.pubToAddress)(e);return new a(n)}static fromPrivateKey(e){(0,t.default)(Buffer.isBuffer(e),"Private key should be Buffer");const n=(0,i.privateToAddress)(e);return new a(n)}static generate(e,r){return(0,t.default)(n.BN.isBN(r)),new a((0,i.generateAddress)(e.buf,r.toArrayLike(Buffer)))}static generate2(e,n,r){return(0,t.default)(Buffer.isBuffer(n)),(0,t.default)(Buffer.isBuffer(r)),new a((0,i.generateAddress2)(e.buf,n,r))}equals(e){return this.buf.equals(e.buf)}isZero(){return this.equals(a.zero())}isPrecompileOrSystemAddress(){const e=new n.BN(this.buf),t=new n.BN(0),r=new n.BN("ffff","hex");return e.gte(t)&&e.lte(r)}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return Buffer.from(this.buf)}}return oh.Address=a,oh}(),e),n(eh(),e),n(function(){if(ch)return uh;ch=1,Object.defineProperty(uh,"__esModule",{value:!0}),uh.hashPersonalMessage=uh.isValidSignature=uh.fromRpcSig=uh.toCompactSig=uh.toRpcSig=uh.ecrecover=uh.ecsign=void 0;const e=hf(),t=$d(),n=Sf(),r=eh(),i=_f(),a=ih();function s(e,t){const n=(0,a.toType)(e,a.TypeOutput.BN);if(n.eqn(0)||n.eqn(1))return(0,a.toType)(e,a.TypeOutput.BN);if(!t)return n.subn(27);const r=(0,a.toType)(t,a.TypeOutput.BN);return n.sub(r.muln(2).addn(35))}function o(e){const n=new t.BN(e);return n.eqn(0)||n.eqn(1)}return uh.ecsign=function(t,n,r){const{signature:i,recid:s}=(0,e.ecdsaSign)(t,n),o=Buffer.from(i.slice(0,32)),c=Buffer.from(i.slice(32,64));if(!r||"number"==typeof r){if(r&&!Number.isSafeInteger(r))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");return{r:o,s:c,v:r?s+(2*r+35):s+27}}return{r:o,s:c,v:(0,a.toType)(r,a.TypeOutput.BN).muln(2).addn(35).addn(s).toArrayLike(Buffer)}},uh.ecrecover=function(t,r,i,a,c){const u=Buffer.concat([(0,n.setLengthLeft)(i,32),(0,n.setLengthLeft)(a,32)],64),l=s(r,c);if(!o(l))throw new Error("Invalid signature v value");const p=(0,e.ecdsaRecover)(u,l.toNumber(),t);return Buffer.from((0,e.publicKeyConvert)(p,!1).slice(1))},uh.toRpcSig=function(e,t,r,i){if(!o(s(e,i)))throw new Error("Invalid signature v value");return(0,n.bufferToHex)(Buffer.concat([(0,n.setLengthLeft)(t,32),(0,n.setLengthLeft)(r,32),(0,n.toBuffer)(e)]))},uh.toCompactSig=function(e,t,r,i){if(!o(s(e,i)))throw new Error("Invalid signature v value");const c=(0,a.toType)(e,a.TypeOutput.Number);let u=r;return(c>28&&c%2==1||1===c||28===c)&&(u=Buffer.from(r),u[0]|=128),(0,n.bufferToHex)(Buffer.concat([(0,n.setLengthLeft)(t,32),(0,n.setLengthLeft)(u,32)]))},uh.fromRpcSig=function(e){const t=(0,n.toBuffer)(e);let r,i,a;if(t.length>=65)r=t.slice(0,32),i=t.slice(32,64),a=(0,n.bufferToInt)(t.slice(64));else{if(64!==t.length)throw new Error("Invalid signature length");r=t.slice(0,32),i=t.slice(32,64),a=(0,n.bufferToInt)(t.slice(32,33))>>7,i[0]&=127}return a<27&&(a+=27),{v:a,r:r,s:i}},uh.isValidSignature=function(e,n,r,i=!0,a){const c=new t.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),u=new t.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==n.length||32!==r.length)return!1;if(!o(s(e,a)))return!1;const l=new t.BN(n),p=new t.BN(r);return!(l.isZero()||l.gt(u)||p.isZero()||p.gt(u)||i&&1===p.cmp(c))},uh.hashPersonalMessage=function(e){(0,i.assertIsBuffer)(e);const t=Buffer.from(`Ethereum Signed Message:\n${e.length}`,"utf-8");return(0,r.keccak)(Buffer.concat([t,e]))},uh}(),e),n(Sf(),e),n(function(){if(lh)return dh;lh=1;var e=dh&&dh.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dh,"__esModule",{value:!0}),dh.defineProperties=void 0;const t=e(k),n=bf(),r=$d(),i=Sf();return dh.defineProperties=function(e,a,s){if(e.raw=[],e._fields=[],e.toJSON=function(t=!1){if(t){const t={};return e._fields.forEach((n=>{t[n]=`0x${e[n].toString("hex")}`})),t}return(0,i.baToJSON)(e.raw)},e.serialize=function(){return r.rlp.encode(e.raw)},a.forEach(((n,r)=>{function a(){return e.raw[r]}function s(a){"00"!==(a=(0,i.toBuffer)(a)).toString("hex")||n.allowZero||(a=Buffer.allocUnsafe(0)),n.allowLess&&n.length?(a=(0,i.unpadBuffer)(a),(0,t.default)(n.length>=a.length,`The field ${n.name} must not have more ${n.length} bytes`)):n.allowZero&&0===a.length||!n.length||(0,t.default)(n.length===a.length,`The field ${n.name} must have byte length of ${n.length}`),e.raw[r]=a}e._fields.push(n.name),Object.defineProperty(e,n.name,{enumerable:!0,configurable:!0,get:a,set:s}),n.default&&(e[n.name]=n.default),n.alias&&Object.defineProperty(e,n.alias,{enumerable:!1,configurable:!0,set:s,get:a})})),s)if("string"==typeof s&&(s=Buffer.from((0,n.stripHexPrefix)(s),"hex")),Buffer.isBuffer(s)&&(s=r.rlp.decode(s)),Array.isArray(s)){if(s.length>e._fields.length)throw new Error("wrong number of fields in data");s.forEach(((t,n)=>{e[e._fields[n]]=(0,i.toBuffer)(t)}))}else{if("object"!=typeof s)throw new Error("invalid data");{const t=Object.keys(s);a.forEach((n=>{-1!==t.indexOf(n.name)&&(e[n.name]=s[n.name]),-1!==t.indexOf(n.alias)&&(e[n.alias]=s[n.alias])}))}}},dh}(),e),n($d(),e),n(ih(),e);var r=bf();Object.defineProperty(e,"isHexPrefixed",{enumerable:!0,get:function(){return r.isHexPrefixed}}),Object.defineProperty(e,"stripHexPrefix",{enumerable:!0,get:function(){return r.stripHexPrefix}}),Object.defineProperty(e,"padToEven",{enumerable:!0,get:function(){return r.padToEven}}),Object.defineProperty(e,"getBinarySize",{enumerable:!0,get:function(){return r.getBinarySize}}),Object.defineProperty(e,"arrayContainsArray",{enumerable:!0,get:function(){return r.arrayContainsArray}}),Object.defineProperty(e,"toAscii",{enumerable:!0,get:function(){return r.toAscii}}),Object.defineProperty(e,"fromUtf8",{enumerable:!0,get:function(){return r.fromUtf8}}),Object.defineProperty(e,"fromAscii",{enumerable:!0,get:function(){return r.fromAscii}}),Object.defineProperty(e,"getKeys",{enumerable:!0,get:function(){return r.getKeys}}),Object.defineProperty(e,"isHexString",{enumerable:!0,get:function(){return r.isHexString}})}(Td)),Td);class vh{static hash(e){const t=Buffer.from(e,"utf8");return yh.keccak256(t)}static hashRandomBits(e){if(!this.isValidSHA256(e.blockHash.replace("0x",""))||e.taskRequesterTimestamp<=0||e.dispatcherTimestamp<=0)throw`Invalid inputs for hashRandomBits:\n blockHash: ${e.blockHash},\n taskRequesterTimestamp: ${e.taskRequesterTimestamp},\n dispatcherTimestamp: ${e.dispatcherTimestamp}\n `;const t=e.taskRequesterTimestamp.toString()+e.dispatcherTimestamp.toString()+e.blockHash,n=Buffer.from(t,"utf8");return yh.keccak256(n)}static hashMessage(e={}){let t=JSON.parse(JSON.stringify(e));t.payload&&(t=t.payload),delete t.type,delete t.msgHash,delete t.signature;const n=Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}),r=Buffer.from(JSON.stringify(n),"utf-8");return yh.keccak256(r)}static computeFileSHA256(e){const t=x.createHash("sha256");return t.update(e),t.digest("hex")}static computeStringSHA256(e){const t=x.createHash("sha256");return t.update(e),t.digest("hex")}static isValidSHA256(e){return/^[a-f0-9]{64}$/gi.test(e)}}class xh{static sign(e,t){const n=yh.toBuffer("0x"+t);if(!yh.isValidPrivate(n))throw"Invalid private key when trying to sign msg";return yh.ecsign(e,n)}static verifySignature(e,t,n){const r=yh.ecrecover(e,t.v,t.r,t.s);return"0x"+yh.pubToAddress(r).toString("hex").toLowerCase()===n.toLowerCase()}static serializeSignature(e){return JSON.stringify({v:e.v,r:e.r.toString("hex"),s:e.s.toString("hex")})}static deserializeSignature(e){const t=JSON.parse(e);return{v:t.v,r:Buffer.from(t.r,"hex"),s:Buffer.from(t.s,"hex")}}static ECDSASignatureToHex(e){return{v:e.v,r:e.r.toString("hex"),s:e.s.toString("hex")}}static SignatureHexToECDSA(e){return{v:e.v,r:Buffer.from(e.r,"hex"),s:Buffer.from(e.s,"hex")}}static isValidSignature(e){const t=xh.SignatureHexToECDSA(e);return yh.isValidSignature(t.v,t.r,t.s)}static generateAddress(){const e=function(){let e=kd(32);for(;!Ed(e);)e=kd(32);return e}(),t=yh.privateToPublic(e),n=function(e){return Sd(32===e.length,"Bad private key"),Sd(Ed(e),"Bad private key"),Buffer.from(vd.keyFromPrivate(e).getPublic("array"))}(e),r=yh.pubToAddress(t),i=yh.bufferToHex(e).replace("0x",""),a=yh.bufferToHex(n).replace("0x","");return{addressHex:yh.bufferToHex(r),privateKeyHex:i,publicKeyHex:a}}static createSignedBody(e,t,n){!e.walletAddress&&n&&(e.walletAddress=n);const r=vh.hashMessage(e);let i;i="0"===t[0]&&"x"===t[1]?t.slice(2):t;const a=xh.sign(r,i);return e.signature=xh.ECDSASignatureToHex(a),e}}!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(fh||(fh={}));class wh{constructor(){}}class _h extends wh{async build(e,n){const r=i.join(process.cwd(),e,"main.js");if(!t.existsSync(r))throw`File doesn't exist: ${r} `;t.copyFileSync(r,i.join(process.cwd(),`${n}/main.js`))}}class Sh extends wh{async build(e,n){const r=i.join(process.cwd(),e,"task.py");if(!t.existsSync(r))throw`File doesn't exist: ${r} `;t.copyFileSync(r,i.join(process.cwd(),`${n}/task.py`))}}class Eh extends wh{async build(e,n){const r=i.join(process.cwd(),e),a=i.join(r,"task.wasm");if(t.existsSync(a)&&t.rmSync(a),await new Promise(((e,t)=>{R(`cd ${r} && sh compile.sh`,((n,r,i)=>{n&&t(i),e(r)}))})),!t.existsSync(a))throw`File doesn't exist: ${a}`;t.copyFileSync(a,i.join(process.cwd(),`${n}/task.wasm`))}}class kh extends wh{async build(e,n){await new Promise(((t,n)=>{R("rustc --version",((r,a,s)=>{r&&n(`Rust ${s.split("error: ")[1]}`);const o=a.split(" ")[1];"1.78.0"!==o?n(`Rust version detected is: ${o}. Version must be 1.78`):R(`cargo build --manifest-path ${i.join(process.cwd(),e,"Cargo.toml")} --target wasm32-wasip1`,((e,r,i)=>{e&&n(`Cargo ${i.split("error: ")[1]}`),t(r)}))}))}));const r=e.split("/"),a=r[r.length-1]||r[r.length-2];if(!t.existsSync(i.join(process.cwd(),e,`/target/wasm32-wasip1/debug/${a}.wasm`)))throw`File doesn't exist: ${i.join(process.cwd(),e,`/target/wasm32-wasip1/debug/${a}.wasm`)}. Please check that your Cargo.toml file has the same name of the directory of the task. `;t.copyFileSync(i.join(process.cwd(),e,`/target/wasm32-wasip1/debug/${a}.wasm`),i.join(process.cwd(),`${n}/task.wasm`))}}class Mh extends wh{async build(e,n){const r=i.join(process.cwd(),e);if(!t.existsSync(r))throw`File doesn't exist: ${r}`;try{const e=t.readFileSync(r,"utf-8"),[n,i,a]=await O(JSON.parse(e),{fullResult:!0});if(void 0!==i)throw console.error(i),new Error(i);void 0!==a&&console.warn(a),void 0!==n&&console.log("OpenAPI manifest is valid!")}catch{throw"Error validating OpenAPI manifest"}t.copyFileSync(r,i.join(process.cwd(),`${n}/manifest.json`))}}class Th{static createBuild(e){switch(e){case Rs.RUST:return new kh;case Rs.C:return new Eh;case Rs.JS:return new _h;case Os.API:return new Mh;case Rs.PYTHON:return new Sh;default:throw"Invalid language"}}}function Ah(){if(bh)return gh;bh=1;var e=s,t=l.Stream,n=function(){if(mh)return hh;mh=1;var e=l.Stream;function t(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}return hh=t,s.inherits(t,e),t.create=function(e,t){var n=new this;for(var r in t=t||{})n[r]=t[r];n.source=e;var i=e.emit;return e.emit=function(){return n._handleEmit(arguments),i.apply(e,arguments)},e.on("error",(function(){})),n.pauseStream&&e.pause(),n},Object.defineProperty(t.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}}),t.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)},t.prototype.resume=function(){this._released||this.release(),this.source.resume()},t.prototype.pause=function(){this.source.pause()},t.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]},t.prototype.pipe=function(){var t=e.prototype.pipe.apply(this,arguments);return this.resume(),t},t.prototype._handleEmit=function(e){this._released?this.emit.apply(this,e):("data"===e[0]&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e))},t.prototype._checkIfMaxDataSizeExceeded=function(){if(!(this._maxDataSizeExceeded||this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}},hh}();function r(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}return gh=r,e.inherits(r,t),r.create=function(e){var t=new this;for(var n in e=e||{})t[n]=e[n];return t},r.isStreamLike=function(e){return"function"!=typeof e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e&&!Buffer.isBuffer(e)},r.prototype.append=function(e){if(r.isStreamLike(e)){if(!(e instanceof n)){var t=n.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=t}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},r.prototype.pipe=function(e,n){return t.prototype.pipe.call(this,e,n),this.resume(),e},r.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop)this._pendingNext=!0;else{this._insideLoop=!0;try{do{this._pendingNext=!1,this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=!1}}},r.prototype._realGetNext=function(){var e=this._streams.shift();void 0!==e?"function"==typeof e?e(function(e){r.isStreamLike(e)&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this)):this._pipeNext(e):this.end()},r.prototype._pipeNext=function(e){if(this._currentStream=e,r.isStreamLike(e))return e.on("end",this._getNext.bind(this)),void e.pipe(this,{end:!1});var t=e;this.write(t),this._getNext()},r.prototype._handleErrors=function(e){var t=this;e.on("error",(function(e){t._emitError(e)}))},r.prototype.write=function(e){this.emit("data",e)},r.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.pause&&this._currentStream.pause(),this.emit("pause"))},r.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.resume&&this._currentStream.resume(),this.emit("resume")},r.prototype.end=function(){this._reset(),this.emit("end")},r.prototype.destroy=function(){this._reset(),this.emit("close")},r.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},r.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}},r.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(t){t.dataSize&&(e.dataSize+=t.dataSize)})),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)},r.prototype._emitError=function(e){this._reset(),this.emit("error",e)},gh}var Rh,Oh,Ih,Nh,Ph,jh,Dh,Lh,Ch,$h,Bh,zh,Uh,Fh,qh,Hh,Yh,Vh={},Gh={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}};function Kh(){return Ih||(Ih=1,function(e){var t=Oh?Rh:(Oh=1,Rh=Gh),n=a.extname,r=/^\s*([^;\s]*)(?:;|\s|$)/,i=/^text\//i;function s(e){if(!e||"string"!=typeof e)return!1;var n=r.exec(e),a=n&&t[n[1].toLowerCase()];return a&&a.charset?a.charset:!(!n||!i.test(n[1]))&&"UTF-8"}e.charset=s,e.charsets={lookup:s},e.contentType=function(t){if(!t||"string"!=typeof t)return!1;var n=-1===t.indexOf("/")?e.lookup(t):t;if(!n)return!1;if(-1===n.indexOf("charset")){var r=e.charset(n);r&&(n+="; charset="+r.toLowerCase())}return n},e.extension=function(t){if(!t||"string"!=typeof t)return!1;var n=r.exec(t),i=n&&e.extensions[n[1].toLowerCase()];if(!i||!i.length)return!1;return i[0]},e.extensions=Object.create(null),e.lookup=function(t){if(!t||"string"!=typeof t)return!1;var r=n("x."+t).toLowerCase().substr(1);if(!r)return!1;return e.types[r]||!1},e.types=Object.create(null),function(e,n){var r=["nginx","apache",void 0,"iana"];Object.keys(t).forEach((function(i){var a=t[i],s=a.extensions;if(s&&s.length){e[i]=s;for(var o=0;o<s.length;o++){var c=s[o];if(n[c]){var u=r.indexOf(t[n[c]].source),l=r.indexOf(a.source);if("application/octet-stream"!==n[c]&&(u>l||u===l&&"application/"===n[c].substr(0,12)))continue}n[c]=i}}}))}(e.extensions,e.types)}(Vh)),Vh}function Wh(){if(Dh)return jh;Dh=1;var e=Ph?Nh:(Ph=1,Nh=function(e){var t="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;t?t(e):setTimeout(e,0)});return jh=function(t){var n=!1;return e((function(){n=!0})),function(r,i){n?t(r,i):e((function(){t(r,i)}))}}}function Zh(){if(Ch)return Lh;function e(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}return Ch=1,Lh=function(t){Object.keys(t.jobs).forEach(e.bind(t)),t.jobs={}},Lh}function Jh(){if(Bh)return $h;Bh=1;var e=Wh(),t=Zh();return $h=function(n,r,i,a){var s=i.keyedList?i.keyedList[i.index]:i.index;i.jobs[s]=function(t,n,r,i){var a;a=2==t.length?t(r,e(i)):t(r,n,e(i));return a}(r,s,n[s],(function(e,n){s in i.jobs&&(delete i.jobs[s],e?t(i):i.results[s]=n,a(e,i.results))}))},$h}function Xh(){if(Uh)return zh;return Uh=1,zh=function(e,t){var n=!Array.isArray(e),r={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};t&&r.keyedList.sort(n?t:function(n,r){return t(e[n],e[r])});return r}}function Qh(){if(qh)return Fh;qh=1;var e=Zh(),t=Wh();return Fh=function(n){if(!Object.keys(this.jobs).length)return;this.index=this.size,e(this),t(n)(null,this.results)}}function em(){if(Yh)return Hh;Yh=1;var e=Jh(),t=Xh(),n=Qh();return Hh=function(r,i,a){var s=t(r);for(;s.index<(s.keyedList||r).length;)e(r,i,s,(function(e,t){e?a(e,t):0!==Object.keys(s.jobs).length||a(null,s.results)})),s.index++;return n.bind(s,a)},Hh}var tm,nm,rm,im,am,sm,om,cm,um,lm,pm,dm,fm,hm,mm,gm,bm,ym,vm,xm,wm,_m,Sm,Em,km,Mm,Tm,Am,Rm,Om,Im,Nm,Pm,jm,Dm,Lm,Cm,$m,Bm,zm,Um,Fm,qm,Hm,Ym,Vm,Gm,Km,Wm,Zm,Jm,Xm,Qm,eg,tg,ng,rg,ig,ag,sg,og,cg,ug,lg,pg,dg,fg,hg,mg,gg,bg,yg,vg,xg,wg,_g,Sg,Eg,kg,Mg,Tg,Ag={exports:{}};function Rg(){if(tm)return Ag.exports;tm=1;var e=Jh(),t=Xh(),n=Qh();function r(e,t){return e<t?-1:e>t?1:0}return Ag.exports=function(r,i,a,s){var o=t(r,a);return e(r,i,o,(function t(n,a){n?s(n,a):(o.index++,o.index<(o.keyedList||r).length?e(r,i,o,t):s(null,o.results))})),n.bind(o,s)},Ag.exports.ascending=r,Ag.exports.descending=function(e,t){return-1*r(e,t)},Ag.exports}function Og(){if(rm)return nm;rm=1;var e=Rg();return nm=function(t,n,r){return e(t,n,null,r)},nm}function Ig(){return am?im:(am=1,im={parallel:em(),serial:Og(),serialOrdered:Rg()})}function Ng(){return om?sm:(om=1,sm=Object)}function Pg(){return um?cm:(um=1,cm=Error)}function jg(){return pm?lm:(pm=1,lm=EvalError)}function Dg(){return fm?dm:(fm=1,dm=RangeError)}function Lg(){return mm?hm:(mm=1,hm=ReferenceError)}function Cg(){return bm?gm:(bm=1,gm=SyntaxError)}function $g(){return vm?ym:(vm=1,ym=TypeError)}function Bg(){return wm?xm:(wm=1,xm=URIError)}function zg(){return Sm?_m:(Sm=1,_m=Math.abs)}function Ug(){return km?Em:(km=1,Em=Math.floor)}function Fg(){return Tm?Mm:(Tm=1,Mm=Math.max)}function qg(){return Rm?Am:(Rm=1,Am=Math.min)}function Hg(){return Im?Om:(Im=1,Om=Math.pow)}function Yg(){return Pm?Nm:(Pm=1,Nm=Math.round)}function Vg(){return Dm?jm:(Dm=1,jm=Number.isNaN||function(e){return e!=e})}function Gg(){if(Cm)return Lm;Cm=1;var e=Vg();return Lm=function(t){return e(t)||0===t?t:t<0?-1:1}}function Kg(){return Bm?$m:(Bm=1,$m=Object.getOwnPropertyDescriptor)}function Wg(){if(Um)return zm;Um=1;var e=Kg();if(e)try{e([],"length")}catch(t){e=null}return zm=e}function Zg(){if(qm)return Fm;qm=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}return Fm=e}function Jg(){return Ym?Hm:(Ym=1,Hm=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var r in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0})}function Xg(){if(Gm)return Vm;Gm=1;var e="undefined"!=typeof Symbol&&Symbol,t=Jg();return Vm=function(){return"function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&t())))}}function Qg(){return Wm?Km:(Wm=1,Km="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function eb(){return Jm?Zm:(Jm=1,Zm=Ng().getPrototypeOf||null)}function tb(){if(Qm)return Xm;Qm=1;var e=Object.prototype.toString,t=Math.max,n=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n};return Xm=function(r){var i=this;if("function"!=typeof i||"[object Function]"!==e.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var a,s=function(e,t){for(var n=[],r=t,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n}(arguments,1),o=t(0,i.length-s.length),c=[],u=0;u<o;u++)c[u]="$"+u;if(a=Function("binder","return function ("+function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n}(c,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof a){var e=i.apply(this,n(s,arguments));return Object(e)===e?e:this}return i.apply(r,n(s,arguments))})),i.prototype){var l=function(){};l.prototype=i.prototype,a.prototype=new l,l.prototype=null}return a},Xm}function nb(){if(tg)return eg;tg=1;var e=tb();return eg=Function.prototype.bind||e}function rb(){return rg?ng:(rg=1,ng=Function.prototype.call)}function ib(){return ag?ig:(ag=1,ig=Function.prototype.apply)}function ab(){if(ug)return cg;ug=1;var e=nb(),t=ib(),n=rb(),r=og?sg:(og=1,sg="undefined"!=typeof Reflect&&Reflect&&Reflect.apply);return cg=r||e.call(n,t)}function sb(){if(fg)return dg;fg=1;var e,t=function(){if(pg)return lg;pg=1;var e=nb(),t=$g(),n=rb(),r=ab();return lg=function(i){if(i.length<1||"function"!=typeof i[0])throw new t("a function is required");return r(e,n,i)}}(),n=Wg();try{e=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var r=!!e&&n&&n(Object.prototype,"__proto__"),i=Object,a=i.getPrototypeOf;return dg=r&&"function"==typeof r.get?t([r.get]):"function"==typeof a&&function(e){return a(null==e?e:i(e))}}function ob(){if(mg)return hg;mg=1;var e=Qg(),t=eb(),n=sb();return hg=e?function(t){return e(t)}:t?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:n?function(e){return n(e)}:null}function cb(){if(bg)return gg;bg=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=nb();return gg=n.call(e,t)}function ub(){if(vg)return yg;var e;vg=1;var t=Ng(),n=Pg(),r=jg(),i=Dg(),a=Lg(),s=Cg(),o=$g(),c=Bg(),u=zg(),l=Ug(),p=Fg(),d=qg(),f=Hg(),h=Yg(),m=Gg(),g=Function,b=function(e){try{return g('"use strict"; return ('+e+").constructor;")()}catch(e){}},y=Wg(),v=Zg(),x=function(){throw new o},w=y?function(){try{return x}catch(e){try{return y(arguments,"callee").get}catch(e){return x}}}():x,_=Xg()(),S=ob(),E=eb(),k=Qg(),M=ib(),T=rb(),A={},R="undefined"!=typeof Uint8Array&&S?S(Uint8Array):e,O={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer,"%ArrayIteratorPrototype%":_&&S?S([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":"undefined"==typeof Atomics?e:Atomics,"%BigInt%":"undefined"==typeof BigInt?e:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?e:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":"undefined"==typeof Float16Array?e:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?e:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?e:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?e:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":A,"%Int8Array%":"undefined"==typeof Int8Array?e:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?e:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&S?S(S([][Symbol.iterator]())):e,"%JSON%":"object"==typeof JSON?JSON:e,"%Map%":"undefined"==typeof Map?e:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&_&&S?S((new Map)[Symbol.iterator]()):e,"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":y,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?e:Promise,"%Proxy%":"undefined"==typeof Proxy?e:Proxy,"%RangeError%":i,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?e:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?e:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&_&&S?S((new Set)[Symbol.iterator]()):e,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&S?S(""[Symbol.iterator]()):e,"%Symbol%":_?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":w,"%TypedArray%":R,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?e:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?e:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?e:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?e:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?e:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?e:WeakSet,"%Function.prototype.call%":T,"%Function.prototype.apply%":M,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":E,"%Math.abs%":u,"%Math.floor%":l,"%Math.max%":p,"%Math.min%":d,"%Math.pow%":f,"%Math.round%":h,"%Math.sign%":m,"%Reflect.getPrototypeOf%":k};if(S)try{null.error}catch(e){var I=S(S(e));O["%Error.prototype%"]=I}var N=function e(t){var n;if("%AsyncFunction%"===t)n=b("async function () {}");else if("%GeneratorFunction%"===t)n=b("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=b("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&S&&(n=S(i.prototype))}return O[t]=n,n},P={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},j=nb(),D=cb(),L=j.call(T,Array.prototype.concat),C=j.call(M,Array.prototype.splice),$=j.call(T,String.prototype.replace),B=j.call(T,String.prototype.slice),z=j.call(T,RegExp.prototype.exec),U=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,F=/\\(\\)?/g,q=function(e,t){var n,r=e;if(D(P,r)&&(r="%"+(n=P[r])[0]+"%"),D(O,r)){var i=O[r];if(i===A&&(i=N(r)),void 0===i&&!t)throw new o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new s("intrinsic "+e+" does not exist!")};return yg=function(e,t){if("string"!=typeof e||0===e.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new o('"allowMissing" argument must be a boolean');if(null===z(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=B(e,0,1),n=B(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return $(e,U,(function(e,t,n,i){r[r.length]=n?$(i,F,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",i=q("%"+r+"%",t),a=i.name,c=i.value,u=!1,l=i.alias;l&&(r=l[0],C(n,L([0,1],l)));for(var p=1,d=!0;p<n.length;p+=1){var f=n[p],h=B(f,0,1),m=B(f,-1);if(('"'===h||"'"===h||"`"===h||'"'===m||"'"===m||"`"===m)&&h!==m)throw new s("property names with quotes must have matching quotes");if("constructor"!==f&&d||(u=!0),D(O,a="%"+(r+="."+f)+"%"))c=O[a];else if(null!=c){if(!(f in c)){if(!t)throw new o("base intrinsic for "+e+" exists, but the property is not available.");return}if(y&&p+1>=n.length){var g=y(c,f);c=(d=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[f]}else d=D(c,f),c=c[f];d&&!u&&(O[a]=c)}}return c},yg}function lb(){if(Sg)return _g;Sg=1;var e=ub()("%Object.defineProperty%",!0),t=function(){if(wg)return xg;wg=1;var e=Jg();return xg=function(){return e()&&!!Symbol.toStringTag}}()(),n=cb(),r=$g(),i=t?Symbol.toStringTag:null;return _g=function(t,a){var s=arguments.length>2&&!!arguments[2]&&arguments[2].force,o=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(void 0!==s&&"boolean"!=typeof s||void 0!==o&&"boolean"!=typeof o)throw new r("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");!i||!s&&n(t,i)||(e?e(t,i,{configurable:!o,enumerable:!1,value:a,writable:!1}):t[i]=a)},_g}function pb(){return kg?Eg:(kg=1,Eg=function(e,t){return Object.keys(t).forEach((function(n){e[n]=e[n]||t[n]})),e})}var db=function(){if(Tg)return Mg;Tg=1;var e=Ah(),t=s,r=a,i=g,o=y,c=I.parse,u=n,p=l.Stream,d=Kh(),f=Ig(),h=lb(),m=pb();function b(t){if(!(this instanceof b))return new b(t);for(var n in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],e.call(this),t=t||{})this[n]=t[n]}return Mg=b,t.inherits(b,e),b.LINE_BREAK="\r\n",b.DEFAULT_CONTENT_TYPE="application/octet-stream",b.prototype.append=function(t,n,r){"string"==typeof(r=r||{})&&(r={filename:r});var i=e.prototype.append.bind(this);if("number"==typeof n&&(n=""+n),Array.isArray(n))this._error(new Error("Arrays are not supported."));else{var a=this._multiPartHeader(t,n,r),s=this._multiPartFooter();i(a),i(n),i(s),this._trackLength(a,n,r)}},b.prototype._trackLength=function(e,t,n){var r=0;null!=n.knownLength?r+=+n.knownLength:Buffer.isBuffer(t)?r=t.length:"string"==typeof t&&(r=Buffer.byteLength(t)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(e)+b.LINE_BREAK.length,t&&(t.path||t.readable&&Object.prototype.hasOwnProperty.call(t,"httpVersion")||t instanceof p)&&(n.knownLength||this._valuesToMeasure.push(t))},b.prototype._lengthRetriever=function(e,t){Object.prototype.hasOwnProperty.call(e,"fd")?null!=e.end&&e.end!=1/0&&null!=e.start?t(null,e.end+1-(e.start?e.start:0)):u.stat(e.path,(function(n,r){var i;n?t(n):(i=r.size-(e.start?e.start:0),t(null,i))})):Object.prototype.hasOwnProperty.call(e,"httpVersion")?t(null,+e.headers["content-length"]):Object.prototype.hasOwnProperty.call(e,"httpModule")?(e.on("response",(function(n){e.pause(),t(null,+n.headers["content-length"])})),e.resume()):t("Unknown stream")},b.prototype._multiPartHeader=function(e,t,n){if("string"==typeof n.header)return n.header;var r,i=this._getContentDisposition(t,n),a=this._getContentType(t,n),s="",o={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(a||[])};for(var c in"object"==typeof n.header&&m(o,n.header),o)if(Object.prototype.hasOwnProperty.call(o,c)){if(null==(r=o[c]))continue;Array.isArray(r)||(r=[r]),r.length&&(s+=c+": "+r.join("; ")+b.LINE_BREAK)}return"--"+this.getBoundary()+b.LINE_BREAK+s+b.LINE_BREAK},b.prototype._getContentDisposition=function(e,t){var n,i;return"string"==typeof t.filepath?n=r.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?n=r.basename(t.filename||e.name||e.path):e.readable&&Object.prototype.hasOwnProperty.call(e,"httpVersion")&&(n=r.basename(e.client._httpMessage.path||"")),n&&(i='filename="'+n+'"'),i},b.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e.name&&(n=d.lookup(e.name)),!n&&e.path&&(n=d.lookup(e.path)),!n&&e.readable&&Object.prototype.hasOwnProperty.call(e,"httpVersion")&&(n=e.headers["content-type"]),n||!t.filepath&&!t.filename||(n=d.lookup(t.filepath||t.filename)),n||"object"!=typeof e||(n=b.DEFAULT_CONTENT_TYPE),n},b.prototype._multiPartFooter=function(){return function(e){var t=b.LINE_BREAK;0===this._streams.length&&(t+=this._lastBoundary()),e(t)}.bind(this)},b.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+b.LINE_BREAK},b.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t.toLowerCase()]=e[t]);return n},b.prototype.setBoundary=function(e){this._boundary=e},b.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},b.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)"function"!=typeof this._streams[n]&&(e=Buffer.isBuffer(this._streams[n])?Buffer.concat([e,this._streams[n]]):Buffer.concat([e,Buffer.from(this._streams[n])]),"string"==typeof this._streams[n]&&this._streams[n].substring(2,t.length+2)===t||(e=Buffer.concat([e,Buffer.from(b.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},b.prototype._generateBoundary=function(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(10*Math.random()).toString(16);this._boundary=e},b.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e},b.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},b.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;this._streams.length&&(t+=this._lastBoundary().length),this._valuesToMeasure.length?f.parallel(this._valuesToMeasure,this._lengthRetriever,(function(n,r){n?e(n):(r.forEach((function(e){t+=e})),e(null,t))})):process.nextTick(e.bind(this,null,t))},b.prototype.submit=function(e,t){var n,r,a={method:"post"};return"string"==typeof e?(e=c(e),r=m({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},a)):(r=m(e,a)).port||(r.port="https:"==r.protocol?443:80),r.headers=this.getHeaders(e.headers),n="https:"==r.protocol?o.request(r):i.request(r),this.getLength(function(e,r){if(e&&"Unknown stream"!==e)this._error(e);else if(r&&n.setHeader("Content-Length",r),this.pipe(n),t){var i,a=function(e,r){return n.removeListener("error",a),n.removeListener("response",i),t.call(this,e,r)};i=a.bind(this,null),n.on("error",a),n.on("response",i)}}.bind(this)),n},b.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))},b.prototype.toString=function(){return"[object FormData]"},h(b,"FormData"),Mg}(),fb=q(db);const hb={httpAdapterURL:"https://worker01-prod.truebit.network/http-adapter/",hubURL:"https://run.truebit.network/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"production",eula:"",RPC_URL:""},mb={httpAdapterURL:"http://localhost:3000/",hubURL:"http://localhost:5000/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"local",eula:"",RPC_URL:""},gb={httpAdapterURL:"http://localhost:3000/",hubURL:"http://localhost:5000/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"testnet",eula:"",RPC_URL:""},bb={httpAdapterURL:"https://worker01-staging.truebit.network/http-adapter/",hubURL:"https://staging.truebit.network/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"staging",eula:"",RPC_URL:""},yb={httpAdapterURL:"https://worker-02.go.truebit.network/http-adapter/",hubURL:"https://go.truebit.network/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"early-access",eula:"",RPC_URL:""};function vb(){let e=hb;return"local"===process.env.TRUEBIT_ENV?e=mb:"staging"===process.env.TRUEBIT_ENV?e=bb:"testnet"===process.env.TRUEBIT_ENV?e=gb:"early-access"===process.env.TRUEBIT_ENV&&(e=yb),e}function xb(){const e=_b(),n=i.join(e,".truebit","secret.json");if(!t.existsSync(n))return null;const r=t.readFileSync(n,{encoding:"utf8"});try{return JSON.parse(r)}catch(e){return console.error("Error parsing secret config file:",e),null}}function wb(e){const n=_b(),r=i.join(n,".truebit","secret.json");if(!t.existsSync(r))return;const a=t.readFileSync(r,{encoding:"utf8"});try{const n={...JSON.parse(a),...e};t.writeFileSync(r,JSON.stringify(n,null,2),{encoding:"utf8"})}catch(e){console.error("Error updating secret config file:",e)}}function _b(){return process.env.TRUEBIT_PATH||(process.env.TRUEBIT_PATH=c.homedir()),process.env.TRUEBIT_PATH}function Sb(e){const t=xb();return t&&e in t?t[e]:void 0}function Eb(){const e=xb();if(!e)return void console.error("Secret config file does not exist.");let t=!1;const n=["privateKey","address"];for(const r of n)r in e||(e[r]="",t=!0);const r=["httpAdapterURL","hubURL","defaultLanguage","blockchainEnv"];for(const n of r)n in e&&""!==e[n]||(e[n]=vb()[n],t=!0);t&&(wb(e),console.log("Configuration has been updated with default values for missing properties."))}class kb{static EULA_TERMS_LINK="https://truebit.io/terms/";static SETUP_INTRODUCTION=`\nYour all-in-one solution to develop, build, test, and deploy tasks seamlessly.\nLet's get started by setting up your account and configuring your wallet.\nWe'll guide you through each step to ensure a smooth experience.\n\n${N.bold("**Important: Private Key Information")}\n\nTruebit Verify employs a private key system to secure your account:\n\n - A unique private key will be automatically generated for you.\n - This key serves as your secure identifier within Truebit Verify.\n - It's used internally to authenticate your actions.\n - You won't need to manage this key directly.\n\nWe are committed to ensuring the security of your private key and safeguarding your account.\nReady to begin?`;static SETUP_INTRODUCTION_NO_ACCEPTANCE=`\n${N.bold("Account Setup Required")}\n\nYou need an account to access platform features.\n\n${N.bold("To get started:")}\n\n 1. Run the setup command: $ truebit setup\n 2. Follow the prompts to create your account.\n 3. Once setup is complete, you'll have full access to all Truebit Verify features.\n\n${N.bold("Need assistance?")}\nUse the 'truebit -h' command for more information.`;static SETUP_STEP1=`\n${N.bold("Step 1: Create an Account")}\n\nIt appears you're a new user without a wallet configured locally.\n\nWould you like to create a new wallet now?`;static SETUP_STEP1_SCENARIO1_P1=`\nYour configuration file has been detected and will not be overwritten.\nTo make any modifications, edit the file located at: ${_b()}/.truebit/secret.json\n\nEnsure this file is kept secure, as it contains your credentials for using Truebit Verify.`;static SETUP_STEP1_SCENARIO1_P2(e){return`\nYour account setup appears to be complete.\n\nAccount Details:\n\n - Name: ${e.name}\n - Email: ${e.email}\n - Company: ${e.company}\n - Job Description: ${e.jobDescription}\n - Wallet Address: ${e.walletAddress}\n - Namespace: ${e.defaultNamespace} // API Key: ${e.defaultApiKey}\n\nRun 'truebit -h' to explore available commands and start your journey.`}static SETUP_STEP1_SCENARIO2(e){return`\nYour new wallet address is: ${e}\n\nYour wallet information has been securely stored in ${_b()}/.truebit/secret.json\nPlease keep this file safe, as it contains your credentials for using Truebit Verify.`}static SETUP_STEP1_SCENARIO3=`\n${N.bold("(!) Important Notice (!)")}\n\nYou’ve chosen not to create a new wallet at this time.\n\n - A wallet is required for full access to Truebit Verify features.\n - Without a wallet, your functionality on the platform will be limited.\n - You can create a wallet at any time by running the truebit setup command again.\n\nRun 'truebit setup' to get started.`;static SETUP_STEP2_SCENARIO3_P1=`\n${N.bold("Step 2: Create an Account")}\n\nYour wallet is now set up. Let's proceed with creating your Truebit Verify account.\n\nPlease provide the following information:`;static SETUP_STEP2_SCENARIO3_P2(e,t,n,r){return`\n${N.bold("Account Registration Complete")}\n\nThanks for registering with Truebit Verify!\n\nCongratulations! Your Truebit Verify account has been successfully created.\n\nAccount Summary:\n\n ${N.bold("- Name: ")+e.fullNameAnswer}\n ${N.bold("- Email: ")+e.emailAddressAnswer}\n ${N.bold("- Company: ")+e.companyNameAnswer}\n ${N.bold("- Job Description: ")+e.jobPositionAnswer}\n ${N.bold("- Wallet Address: ")+t}\n ${N.bold("- Namespace: ")+n} // ${N.bold("API Key: ")+r}\n\nRun 'truebit -h' to begin your journey.`}static SETUP_STEP2_UNHANDLED_ERROR=N.bold("\nSomething went wrong with the user registration:\n \nAccount registration interrupted.\n\nPlease run 'truebit setup' again.");static EULA_INSTALLATION=`\nWelcome to Truebit Verify!\n\nBefore completing your Truebit Verify installation, you must review the Terms of Use at: ${kb.EULA_TERMS_LINK}`;static EULA_INSTALLATION_NO_ACCEPTED="Installation cancelled because you have not accepted the Terms of Use.";static EULA_REGISTRATION_NO_ACCEPTED=`\n${N.bold("(!) Important Notice (!)")}\n\nYou’ve chosen not to accept the End User License Agreement (EULA) at this time.\n\n - Accepting the EULA is required for full access to Truebit Verify features.\n\nRun 'truebit setup' to get started`;static USER_NO_REGISTERED="You need to set up your Truebit Verify account to access platform features.\n\nTo get started:\n\n 1. Run the setup command: $ truebit setup\n 2. Follow the prompts to create your account.\n 3. Once setup is complete, you'll have full access to all Truebit Verify features.\n\nNeed assistance?\nUse the 'truebit -h' command for additional information."}async function Mb(){const e=Sb("hubURL");if(e)return E.create({headers:{Connection:"keep-alive"},httpAgent:new b({keepAlive:!0}),httpsAgent:new v({keepAlive:!0}),baseURL:e,timeout:12e4,maxContentLength:1/0,maxBodyLength:1/0});throw kb.USER_NO_REGISTERED}async function Tb(){const e=Sb("httpAdapterURL");if(e)return E.create({headers:{Connection:"keep-alive"},httpAgent:new b({keepAlive:!0}),httpsAgent:new v({keepAlive:!0}),baseURL:e,timeout:12e4,maxContentLength:1/0,maxBodyLength:1/0});throw kb.USER_NO_REGISTERED}var Ab,Rb={},Ob={},Ib={};function Nb(){if(Ab)return Ib;return Ab=1,Object.defineProperty(Ib,"__esModule",{value:!0}),Ib.isCorrect=Ib.isInSubnet=void 0,Ib.isInSubnet=function(e){return!(this.subnetMask<e.subnetMask)&&this.mask(e.subnetMask)===e.mask()},Ib.isCorrect=function(e){return function(){return this.addressMinusSuffix===this.correctForm()&&(this.subnetMask===e&&!this.parsedSubnet||this.parsedSubnet===String(this.subnetMask))}},Ib}var Pb,jb={};function Db(){return Pb||(Pb=1,Object.defineProperty(jb,"__esModule",{value:!0}),jb.RE_SUBNET_STRING=jb.RE_ADDRESS=jb.GROUPS=jb.BITS=void 0,jb.BITS=32,jb.GROUPS=4,jb.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g,jb.RE_SUBNET_STRING=/\/\d{1,2}$/),jb}var Lb,Cb={};function $b(){if(Lb)return Cb;Lb=1,Object.defineProperty(Cb,"__esModule",{value:!0}),Cb.AddressError=void 0;class e extends Error{constructor(e,t){super(e),this.name="AddressError",null!==t&&(this.parseMessage=t)}}return Cb.AddressError=e,Cb}var Bb,zb={exports:{}},Ub=zb.exports;function Fb(){return Bb||(Bb=1,e=zb,function(){var t;function n(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function r(){return new n(null)}var i="undefined"!=typeof navigator;i&&"Microsoft Internet Explorer"==navigator.appName?(n.prototype.am=function(e,t,n,r,i,a){for(var s=32767&t,o=t>>15;--a>=0;){var c=32767&this[e],u=this[e++]>>15,l=o*c+u*s;i=((c=s*c+((32767&l)<<15)+n[r]+(1073741823&i))>>>30)+(l>>>15)+o*u+(i>>>30),n[r++]=1073741823&c}return i},t=30):i&&"Netscape"!=navigator.appName?(n.prototype.am=function(e,t,n,r,i,a){for(;--a>=0;){var s=t*this[e++]+n[r]+i;i=Math.floor(s/67108864),n[r++]=67108863&s}return i},t=26):(n.prototype.am=function(e,t,n,r,i,a){for(var s=16383&t,o=t>>14;--a>=0;){var c=16383&this[e],u=this[e++]>>14,l=o*c+u*s;i=((c=s*c+((16383&l)<<14)+n[r]+i)>>28)+(l>>14)+o*u,n[r++]=268435455&c}return i},t=28),n.prototype.DB=t,n.prototype.DM=(1<<t)-1,n.prototype.DV=1<<t,n.prototype.FV=Math.pow(2,52),n.prototype.F1=52-t,n.prototype.F2=2*t-52;var a,s,o=new Array;for(a="0".charCodeAt(0),s=0;s<=9;++s)o[a++]=s;for(a="a".charCodeAt(0),s=10;s<36;++s)o[a++]=s;for(a="A".charCodeAt(0),s=10;s<36;++s)o[a++]=s;function c(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function u(e,t){var n=o[e.charCodeAt(t)];return null==n?-1:n}function l(e){var t=r();return t.fromInt(e),t}function p(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}function d(e){this.m=e}function f(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function h(e,t){return e&t}function m(e,t){return e|t}function g(e,t){return e^t}function b(e,t){return e&~t}function y(e){if(0==e)return-1;var t=0;return 65535&e||(e>>=16,t+=16),255&e||(e>>=8,t+=8),15&e||(e>>=4,t+=4),3&e||(e>>=2,t+=2),1&e||++t,t}function v(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function x(){}function w(e){return e}function _(e){this.r2=r(),this.q3=r(),n.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}d.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},d.prototype.revert=function(e){return e},d.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},d.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},d.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},f.prototype.convert=function(e){var t=r();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(n.ZERO)>0&&this.m.subTo(t,t),t},f.prototype.revert=function(e){var t=r();return e.copyTo(t),this.reduce(t),t},f.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},f.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},f.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},n.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},n.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},n.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var i=e.length,a=!1,s=0;--i>=0;){var o=8==r?255&e[i]:u(e,i);o<0?"-"==e.charAt(i)&&(a=!0):(a=!1,0==s?this[this.t++]=o:s+r>this.DB?(this[this.t-1]|=(o&(1<<this.DB-s)-1)<<s,this[this.t++]=o>>this.DB-s):this[this.t-1]|=o<<s,(s+=r)>=this.DB&&(s-=this.DB))}8==r&&128&e[0]&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),a&&n.ZERO.subTo(this,this)},n.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},n.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},n.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},n.prototype.lShiftTo=function(e,t){var n,r=e%this.DB,i=this.DB-r,a=(1<<i)-1,s=Math.floor(e/this.DB),o=this.s<<r&this.DM;for(n=this.t-1;n>=0;--n)t[n+s+1]=this[n]>>i|o,o=(this[n]&a)<<r;for(n=s-1;n>=0;--n)t[n]=0;t[s]=o,t.t=this.t+s+1,t.s=this.s,t.clamp()},n.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,i=this.DB-r,a=(1<<r)-1;t[0]=this[n]>>r;for(var s=n+1;s<this.t;++s)t[s-n-1]|=(this[s]&a)<<i,t[s-n]=this[s]>>r;r>0&&(t[this.t-n-1]|=(this.s&a)<<i),t.t=this.t-n,t.clamp()}},n.prototype.subTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()},n.prototype.multiplyTo=function(e,t){var r=this.abs(),i=e.abs(),a=r.t;for(t.t=a+i.t;--a>=0;)t[a]=0;for(a=0;a<i.t;++a)t[a+r.t]=r.am(0,i[a],t,a,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&n.ZERO.subTo(t,t)},n.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},n.prototype.divRemTo=function(e,t,i){var a=e.abs();if(!(a.t<=0)){var s=this.abs();if(s.t<a.t)return null!=t&&t.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=r());var o=r(),c=this.s,u=e.s,l=this.DB-p(a[a.t-1]);l>0?(a.lShiftTo(l,o),s.lShiftTo(l,i)):(a.copyTo(o),s.copyTo(i));var d=o.t,f=o[d-1];if(0!=f){var h=f*(1<<this.F1)+(d>1?o[d-2]>>this.F2:0),m=this.FV/h,g=(1<<this.F1)/h,b=1<<this.F2,y=i.t,v=y-d,x=null==t?r():t;for(o.dlShiftTo(v,x),i.compareTo(x)>=0&&(i[i.t++]=1,i.subTo(x,i)),n.ONE.dlShiftTo(d,x),x.subTo(o,o);o.t<d;)o[o.t++]=0;for(;--v>=0;){var w=i[--y]==f?this.DM:Math.floor(i[y]*m+(i[y-1]+b)*g);if((i[y]+=o.am(0,w,i,v,0,d))<w)for(o.dlShiftTo(v,x),i.subTo(x,i);i[y]<--w;)i.subTo(x,i)}null!=t&&(i.drShiftTo(d,t),c!=u&&n.ZERO.subTo(t,t)),i.t=d,i.clamp(),l>0&&i.rShiftTo(l,i),c<0&&n.ZERO.subTo(i,i)}}},n.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(!(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},n.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},n.prototype.exp=function(e,t){if(e>4294967295||e<1)return n.ONE;var i=r(),a=r(),s=t.convert(this),o=p(e)-1;for(s.copyTo(i);--o>=0;)if(t.sqrTo(i,a),(e&1<<o)>0)t.mulTo(a,s,i);else{var c=i;i=a,a=c}return t.revert(i)},n.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,r=(1<<t)-1,i=!1,a="",s=this.t,o=this.DB-s*this.DB%t;if(s-- >0)for(o<this.DB&&(n=this[s]>>o)>0&&(i=!0,a=c(n));s>=0;)o<t?(n=(this[s]&(1<<o)-1)<<t-o,n|=this[--s]>>(o+=this.DB-t)):(n=this[s]>>(o-=t)&r,o<=0&&(o+=this.DB,--s)),n>0&&(i=!0),i&&(a+=c(n));return i?a:"0"},n.prototype.negate=function(){var e=r();return n.ZERO.subTo(this,e),e},n.prototype.abs=function(){return this.s<0?this.negate():this},n.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},n.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this[this.t-1]^this.s&this.DM)},n.prototype.mod=function(e){var t=r();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(n.ZERO)>0&&e.subTo(t,t),t},n.prototype.modPowInt=function(e,t){var n;return n=e<256||t.isEven()?new d(t):new f(t),this.exp(e,n)},n.ZERO=l(0),n.ONE=l(1),x.prototype.convert=w,x.prototype.revert=w,x.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},x.prototype.sqrTo=function(e,t){e.squareTo(t)},_.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=r();return e.copyTo(t),this.reduce(t),t},_.prototype.revert=function(e){return e},_.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},_.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},_.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var S,E,k,M=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],T=(1<<26)/M[M.length-1];function A(){var e;e=(new Date).getTime(),E[k++]^=255&e,E[k++]^=e>>8&255,E[k++]^=e>>16&255,E[k++]^=e>>24&255,k>=D&&(k-=D)}if(n.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},n.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),i=l(n),a=r(),s=r(),o="";for(this.divRemTo(i,a,s);a.signum()>0;)o=(n+s.intValue()).toString(e).substr(1)+o,a.divRemTo(i,a,s);return s.intValue().toString(e)+o},n.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),i=Math.pow(t,r),a=!1,s=0,o=0,c=0;c<e.length;++c){var l=u(e,c);l<0?"-"==e.charAt(c)&&0==this.signum()&&(a=!0):(o=t*o+l,++s>=r&&(this.dMultiply(i),this.dAddOffset(o,0),s=0,o=0))}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(o,0)),a&&n.ZERO.subTo(this,this)},n.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(n.ONE.shiftLeft(e-1),m,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(n.ONE.shiftLeft(e-1),this);else{var i=new Array,a=7&e;i.length=1+(e>>3),t.nextBytes(i),a>0?i[0]&=(1<<a)-1:i[0]=0,this.fromString(i,256)}},n.prototype.bitwiseTo=function(e,t,n){var r,i,a=Math.min(e.t,this.t);for(r=0;r<a;++r)n[r]=t(this[r],e[r]);if(e.t<this.t){for(i=e.s&this.DM,r=a;r<this.t;++r)n[r]=t(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=a;r<e.t;++r)n[r]=t(i,e[r]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()},n.prototype.changeBit=function(e,t){var r=n.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r},n.prototype.addTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},n.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},n.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},n.prototype.multiplyLowerTo=function(e,t,n){var r,i=Math.min(this.t+e.t,t);for(n.s=0,n.t=i;i>0;)n[--i]=0;for(r=n.t-this.t;i<r;++i)n[i+this.t]=this.am(0,e[i],n,i,0,this.t);for(r=Math.min(e.t,t);i<r;++i)this.am(0,e[i],n,i,0,t-i);n.clamp()},n.prototype.multiplyUpperTo=function(e,t,n){--t;var r=n.t=this.t+e.t-t;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)n[this.t+r-t]=this.am(t-r,e[r],n,0,0,this.t+r-t);n.clamp(),n.drShiftTo(1,n)},n.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this[r])%e;return n},n.prototype.millerRabin=function(e){var t=this.subtract(n.ONE),i=t.getLowestSetBit();if(i<=0)return!1;var a=t.shiftRight(i);(e=e+1>>1)>M.length&&(e=M.length);for(var s=r(),o=0;o<e;++o){s.fromInt(M[Math.floor(Math.random()*M.length)]);var c=s.modPow(a,this);if(0!=c.compareTo(n.ONE)&&0!=c.compareTo(t)){for(var u=1;u++<i&&0!=c.compareTo(t);)if(0==(c=c.modPowInt(2,this)).compareTo(n.ONE))return!1;if(0!=c.compareTo(t))return!1}}return!0},n.prototype.clone=function(){var e=r();return this.copyTo(e),e},n.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},n.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},n.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},n.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},n.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var n,r=this.DB-e*this.DB%8,i=0;if(e-- >0)for(r<this.DB&&(n=this[e]>>r)!=(this.s&this.DM)>>r&&(t[i++]=n|this.s<<this.DB-r);e>=0;)r<8?(n=(this[e]&(1<<r)-1)<<8-r,n|=this[--e]>>(r+=this.DB-8)):(n=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),128&n&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(t[i++]=n);return t},n.prototype.equals=function(e){return 0==this.compareTo(e)},n.prototype.min=function(e){return this.compareTo(e)<0?this:e},n.prototype.max=function(e){return this.compareTo(e)>0?this:e},n.prototype.and=function(e){var t=r();return this.bitwiseTo(e,h,t),t},n.prototype.or=function(e){var t=r();return this.bitwiseTo(e,m,t),t},n.prototype.xor=function(e){var t=r();return this.bitwiseTo(e,g,t),t},n.prototype.andNot=function(e){var t=r();return this.bitwiseTo(e,b,t),t},n.prototype.not=function(){for(var e=r(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},n.prototype.shiftLeft=function(e){var t=r();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},n.prototype.shiftRight=function(e){var t=r();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},n.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+y(this[e]);return this.s<0?this.t*this.DB:-1},n.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=v(this[n]^t);return e},n.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:!!(this[t]&1<<e%this.DB)},n.prototype.setBit=function(e){return this.changeBit(e,m)},n.prototype.clearBit=function(e){return this.changeBit(e,b)},n.prototype.flipBit=function(e){return this.changeBit(e,g)},n.prototype.add=function(e){var t=r();return this.addTo(e,t),t},n.prototype.subtract=function(e){var t=r();return this.subTo(e,t),t},n.prototype.multiply=function(e){var t=r();return this.multiplyTo(e,t),t},n.prototype.divide=function(e){var t=r();return this.divRemTo(e,t,null),t},n.prototype.remainder=function(e){var t=r();return this.divRemTo(e,null,t),t},n.prototype.divideAndRemainder=function(e){var t=r(),n=r();return this.divRemTo(e,t,n),new Array(t,n)},n.prototype.modPow=function(e,t){var n,i,a=e.bitLength(),s=l(1);if(a<=0)return s;n=a<18?1:a<48?3:a<144?4:a<768?5:6,i=a<8?new d(t):t.isEven()?new _(t):new f(t);var o=new Array,c=3,u=n-1,h=(1<<n)-1;if(o[1]=i.convert(this),n>1){var m=r();for(i.sqrTo(o[1],m);c<=h;)o[c]=r(),i.mulTo(m,o[c-2],o[c]),c+=2}var g,b,y=e.t-1,v=!0,x=r();for(a=p(e[y])-1;y>=0;){for(a>=u?g=e[y]>>a-u&h:(g=(e[y]&(1<<a+1)-1)<<u-a,y>0&&(g|=e[y-1]>>this.DB+a-u)),c=n;!(1&g);)g>>=1,--c;if((a-=c)<0&&(a+=this.DB,--y),v)o[g].copyTo(s),v=!1;else{for(;c>1;)i.sqrTo(s,x),i.sqrTo(x,s),c-=2;c>0?i.sqrTo(s,x):(b=s,s=x,x=b),i.mulTo(x,o[g],s)}for(;y>=0&&!(e[y]&1<<a);)i.sqrTo(s,x),b=s,s=x,x=b,--a<0&&(a=this.DB-1,--y)}return i.revert(s)},n.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return n.ZERO;for(var r=e.clone(),i=this.clone(),a=l(1),s=l(0),o=l(0),c=l(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),t?(a.isEven()&&s.isEven()||(a.addTo(this,a),s.subTo(e,s)),a.rShiftTo(1,a)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);for(;i.isEven();)i.rShiftTo(1,i),t?(o.isEven()&&c.isEven()||(o.addTo(this,o),c.subTo(e,c)),o.rShiftTo(1,o)):c.isEven()||c.subTo(e,c),c.rShiftTo(1,c);r.compareTo(i)>=0?(r.subTo(i,r),t&&a.subTo(o,a),s.subTo(c,s)):(i.subTo(r,i),t&&o.subTo(a,o),c.subTo(s,c))}return 0!=i.compareTo(n.ONE)?n.ZERO:c.compareTo(e)>=0?c.subtract(e):c.signum()<0?(c.addTo(e,c),c.signum()<0?c.add(e):c):c},n.prototype.pow=function(e){return this.exp(e,new x)},n.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var i=t.getLowestSetBit(),a=n.getLowestSetBit();if(a<0)return t;for(i<a&&(a=i),a>0&&(t.rShiftTo(a,t),n.rShiftTo(a,n));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return a>0&&n.lShiftTo(a,n),n},n.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n[0]<=M[M.length-1]){for(t=0;t<M.length;++t)if(n[0]==M[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<M.length;){for(var r=M[t],i=t+1;i<M.length&&r<T;)r*=M[i++];for(r=n.modInt(r);t<i;)if(r%M[t++]==0)return!1}return n.millerRabin(e)},n.prototype.square=function(){var e=r();return this.squareTo(e),e},n.prototype.Barrett=_,null==E){var R;if(E=new Array,k=0,"undefined"!=typeof window&&window.crypto)if(window.crypto.getRandomValues){var O=new Uint8Array(32);for(window.crypto.getRandomValues(O),R=0;R<32;++R)E[k++]=O[R]}else if("Netscape"==navigator.appName&&navigator.appVersion<"5"){var I=window.crypto.random(32);for(R=0;R<I.length;++R)E[k++]=255&I.charCodeAt(R)}for(;k<D;)R=Math.floor(65536*Math.random()),E[k++]=R>>>8,E[k++]=255&R;k=0,A()}function N(){if(null==S){for(A(),(S=new j).init(E),k=0;k<E.length;++k)E[k]=0;k=0}return S.next()}function P(){}function j(){this.i=0,this.j=0,this.S=new Array}P.prototype.nextBytes=function(e){var t;for(t=0;t<e.length;++t)e[t]=N()},j.prototype.init=function(e){var t,n,r;for(t=0;t<256;++t)this.S[t]=t;for(n=0,t=0;t<256;++t)n=n+this.S[t]+e[t%e.length]&255,r=this.S[t],this.S[t]=this.S[n],this.S[n]=r;this.i=0,this.j=0},j.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]};var D=256;e.exports={default:n,BigInteger:n,SecureRandom:P}}.call(Ub)),zb.exports;var e}var qb,Hb,Yb={};function Vb(){return qb||(qb=1,e=Yb,function(){var t={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function n(e){return function(e,r){var i,a,s,o,c,u,l,p,d,f=1,h=e.length,m="";for(a=0;a<h;a++)if("string"==typeof e[a])m+=e[a];else if("object"==typeof e[a]){if((o=e[a]).keys)for(i=r[f],s=0;s<o.keys.length;s++){if(null==i)throw new Error(n('[sprintf] Cannot access property "%s" of undefined value "%s"',o.keys[s],o.keys[s-1]));i=i[o.keys[s]]}else i=o.param_no?r[o.param_no]:r[f++];if(t.not_type.test(o.type)&&t.not_primitive.test(o.type)&&i instanceof Function&&(i=i()),t.numeric_arg.test(o.type)&&"number"!=typeof i&&isNaN(i))throw new TypeError(n("[sprintf] expecting number but found %T",i));switch(t.number.test(o.type)&&(p=i>=0),o.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,o.width?parseInt(o.width):0);break;case"e":i=o.precision?parseFloat(i).toExponential(o.precision):parseFloat(i).toExponential();break;case"f":i=o.precision?parseFloat(i).toFixed(o.precision):parseFloat(i);break;case"g":i=o.precision?String(Number(i.toPrecision(o.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=o.precision?i.substring(0,o.precision):i;break;case"t":i=String(!!i),i=o.precision?i.substring(0,o.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=o.precision?i.substring(0,o.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=o.precision?i.substring(0,o.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}t.json.test(o.type)?m+=i:(!t.number.test(o.type)||p&&!o.sign?d="":(d=p?"+":"-",i=i.toString().replace(t.sign,"")),u=o.pad_char?"0"===o.pad_char?"0":o.pad_char.charAt(1):" ",l=o.width-(d+i).length,c=o.width&&l>0?u.repeat(l):"",m+=o.align?d+i+c:"0"===u?d+c+i:c+d+i)}return m}(function(e){if(i[e])return i[e];for(var n,r=e,a=[],s=0;r;){if(null!==(n=t.text.exec(r)))a.push(n[0]);else if(null!==(n=t.modulo.exec(r)))a.push("%");else{if(null===(n=t.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(n[2]){s|=1;var o=[],c=n[2],u=[];if(null===(u=t.key.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(u[1]);""!==(c=c.substring(u[0].length));)if(null!==(u=t.key_access.exec(c)))o.push(u[1]);else{if(null===(u=t.index_access.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(u[1])}n[2]=o}else s|=2;if(3===s)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");a.push({placeholder:n[0],param_no:n[1],keys:n[2],sign:n[3],pad_char:n[4],align:n[5],width:n[6],precision:n[7],type:n[8]})}r=r.substring(n[0].length)}return i[e]=a}(e),arguments)}function r(e,t){return n.apply(null,[e].concat(t||[]))}var i=Object.create(null);e.sprintf=n,e.vsprintf=r,"undefined"!=typeof window&&(window.sprintf=n,window.vsprintf=r)}()),Yb;var e}function Gb(){if(Hb)return Ob;Hb=1;var e=Ob&&Ob.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),t=Ob&&Ob.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=Ob&&Ob.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&e(r,n,i);return t(r,n),r};Object.defineProperty(Ob,"__esModule",{value:!0}),Ob.Address4=void 0;const r=n(Nb()),i=n(Db()),a=$b(),s=Fb(),o=Vb();class c{constructor(e){this.groups=i.GROUPS,this.parsedAddress=[],this.parsedSubnet="",this.subnet="/32",this.subnetMask=32,this.v4=!0,this.isCorrect=r.isCorrect(i.BITS),this.isInSubnet=r.isInSubnet,this.address=e;const t=i.RE_SUBNET_STRING.exec(e);if(t){if(this.parsedSubnet=t[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,this.subnetMask<0||this.subnetMask>i.BITS)throw new a.AddressError("Invalid subnet mask.");e=e.replace(i.RE_SUBNET_STRING,"")}this.addressMinusSuffix=e,this.parsedAddress=this.parse(e)}static isValid(e){try{return new c(e),!0}catch(e){return!1}}parse(e){const t=e.split(".");if(!e.match(i.RE_ADDRESS))throw new a.AddressError("Invalid IPv4 address.");return t}correctForm(){return this.parsedAddress.map((e=>parseInt(e,10))).join(".")}static fromHex(e){const t=e.replace(/:/g,"").padStart(8,"0"),n=[];let r;for(r=0;r<8;r+=2){const e=t.slice(r,r+2);n.push(parseInt(e,16))}return new c(n.join("."))}static fromInteger(e){return c.fromHex(e.toString(16))}static fromArpa(e){const t=e.replace(/(\.in-addr\.arpa)?\.$/,"").split(".").reverse().join(".");return new c(t)}toHex(){return this.parsedAddress.map((e=>(0,o.sprintf)("%02x",parseInt(e,10)))).join(":")}toArray(){return this.parsedAddress.map((e=>parseInt(e,10)))}toGroup6(){const e=[];let t;for(t=0;t<i.GROUPS;t+=2){const n=(0,o.sprintf)("%02x%02x",parseInt(this.parsedAddress[t],10),parseInt(this.parsedAddress[t+1],10));e.push((0,o.sprintf)("%x",parseInt(n,16)))}return e.join(":")}bigInteger(){return new s.BigInteger(this.parsedAddress.map((e=>(0,o.sprintf)("%02x",parseInt(e,10)))).join(""),16)}_startAddress(){return new s.BigInteger(this.mask()+"0".repeat(i.BITS-this.subnetMask),2)}startAddress(){return c.fromBigInteger(this._startAddress())}startAddressExclusive(){const e=new s.BigInteger("1");return c.fromBigInteger(this._startAddress().add(e))}_endAddress(){return new s.BigInteger(this.mask()+"1".repeat(i.BITS-this.subnetMask),2)}endAddress(){return c.fromBigInteger(this._endAddress())}endAddressExclusive(){const e=new s.BigInteger("1");return c.fromBigInteger(this._endAddress().subtract(e))}static fromBigInteger(e){return c.fromInteger(parseInt(e.toString(),10))}mask(e){return void 0===e&&(e=this.subnetMask),this.getBitsBase2(0,e)}getBitsBase2(e,t){return this.binaryZeroPad().slice(e,t)}reverseForm(e){e||(e={});const t=this.correctForm().split(".").reverse().join(".");return e.omitSuffix?t:(0,o.sprintf)("%s.in-addr.arpa.",t)}isMulticast(){return this.isInSubnet(new c("224.0.0.0/4"))}binaryZeroPad(){return this.bigInteger().toString(2).padStart(i.BITS,"0")}groupForV6(){const e=this.parsedAddress;return this.address.replace(i.RE_ADDRESS,(0,o.sprintf)('<span class="hover-group group-v4 group-6">%s</span>.<span class="hover-group group-v4 group-7">%s</span>',e.slice(0,2).join("."),e.slice(2,4).join(".")))}}return Ob.Address4=c,Ob}var Kb,Wb={},Zb={};function Jb(){return Kb||(Kb=1,Object.defineProperty(Zb,"__esModule",{value:!0}),Zb.RE_URL_WITH_PORT=Zb.RE_URL=Zb.RE_ZONE_STRING=Zb.RE_SUBNET_STRING=Zb.RE_BAD_ADDRESS=Zb.RE_BAD_CHARACTERS=Zb.TYPES=Zb.SCOPES=Zb.GROUPS=Zb.BITS=void 0,Zb.BITS=128,Zb.GROUPS=8,Zb.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"},Zb.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"},Zb.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi,Zb.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi,Zb.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/,Zb.RE_ZONE_STRING=/%.*$/,Zb.RE_URL=new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/),Zb.RE_URL_WITH_PORT=new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/)),Zb}var Xb,Qb={};function ey(){if(Xb)return Qb;Xb=1,Object.defineProperty(Qb,"__esModule",{value:!0}),Qb.simpleGroup=Qb.spanLeadingZeroes=Qb.spanAll=Qb.spanAllZeroes=void 0;const e=Vb();function t(e){return e.replace(/(0+)/g,'<span class="zero">$1</span>')}function n(e){return e.replace(/^(0+)/,'<span class="zero">$1</span>')}return Qb.spanAllZeroes=t,Qb.spanAll=function(n,r=0){return n.split("").map(((n,i)=>(0,e.sprintf)('<span class="digit value-%s position-%d">%s</span>',n,i+r,t(n)))).join("")},Qb.spanLeadingZeroes=function(e){return e.split(":").map((e=>n(e))).join(":")},Qb.simpleGroup=function(t,r=0){return t.split(":").map(((t,i)=>/group-v4/.test(t)?t:(0,e.sprintf)('<span class="hover-group group-%d">%s</span>',i+r,n(t))))},Qb}var ty,ny,ry,iy={};function ay(){if(ny)return Wb;ny=1;var e=Wb&&Wb.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),t=Wb&&Wb.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=Wb&&Wb.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&e(r,n,i);return t(r,n),r};Object.defineProperty(Wb,"__esModule",{value:!0}),Wb.Address6=void 0;const r=n(Nb()),i=n(Db()),a=n(Jb()),s=n(ey()),o=Gb(),c=function(){if(ty)return iy;ty=1;var e=iy&&iy.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),t=iy&&iy.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=iy&&iy.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&e(r,n,i);return t(r,n),r};Object.defineProperty(iy,"__esModule",{value:!0}),iy.possibleElisions=iy.simpleRegularExpression=iy.ADDRESS_BOUNDARY=iy.padGroup=iy.groupPossibilities=void 0;const r=n(Jb()),i=Vb();function a(e){return(0,i.sprintf)("(%s)",e.join("|"))}function s(e){return e.length<4?(0,i.sprintf)("0{0,%d}%s",4-e.length,e):e}return iy.groupPossibilities=a,iy.padGroup=s,iy.ADDRESS_BOUNDARY="[^A-Fa-f0-9:]",iy.simpleRegularExpression=function(e){const t=[];e.forEach(((e,n)=>{0===parseInt(e,16)&&t.push(n)}));const n=t.map((t=>e.map(((e,n)=>{if(n===t){const t=0===n||n===r.GROUPS-1?":":"";return a([s(e),t])}return s(e)})).join(":")));return n.push(e.map(s).join(":")),a(n)},iy.possibleElisions=function(e,t,n){const r=t?"":":",s=n?"":":",o=[];t||n||o.push("::"),t&&n&&o.push(""),(n&&!t||!n&&t)&&o.push(":"),o.push((0,i.sprintf)("%s(:0{1,4}){1,%d}",r,e-1)),o.push((0,i.sprintf)("(0{1,4}:){1,%d}%s",e-1,s)),o.push((0,i.sprintf)("(0{1,4}:){%d}0{1,4}",e-1));for(let t=1;t<e-1;t++)for(let n=1;n<e-t;n++)o.push((0,i.sprintf)("(0{1,4}:){%d}:(0{1,4}:){%d}0{1,4}",n,e-n-t-1));return a(o)},iy}(),u=$b(),l=Fb(),p=Vb();function d(e){if(!e)throw new Error("Assertion failed.")}function f(e){return e=(e=e.replace(/^(0{1,})([1-9]+)$/,'<span class="parse-error">$1</span>$2')).replace(/^(0{1,})(0)$/,'<span class="parse-error">$1</span>$2')}function h(e){return(0,p.sprintf)("%04x",parseInt(e,16))}function m(e){return 255&e}class g{constructor(e,t){this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=r.isInSubnet,this.isCorrect=r.isCorrect(a.BITS),this.groups=void 0===t?a.GROUPS:t,this.address=e;const n=a.RE_SUBNET_STRING.exec(e);if(n){if(this.parsedSubnet=n[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,Number.isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>a.BITS)throw new u.AddressError("Invalid subnet mask.");e=e.replace(a.RE_SUBNET_STRING,"")}else if(/\//.test(e))throw new u.AddressError("Invalid subnet mask.");const i=a.RE_ZONE_STRING.exec(e);i&&(this.zone=i[0],e=e.replace(a.RE_ZONE_STRING,"")),this.addressMinusSuffix=e,this.parsedAddress=this.parse(this.addressMinusSuffix)}static isValid(e){try{return new g(e),!0}catch(e){return!1}}static fromBigInteger(e){const t=e.toString(16).padStart(32,"0"),n=[];let r;for(r=0;r<a.GROUPS;r++)n.push(t.slice(4*r,4*(r+1)));return new g(n.join(":"))}static fromURL(e){let t,n,r=null;if(-1!==e.indexOf("[")&&-1!==e.indexOf("]:")){if(n=a.RE_URL_WITH_PORT.exec(e),null===n)return{error:"failed to parse address with port",address:null,port:null};t=n[1],r=n[2]}else if(-1!==e.indexOf("/")){if(e=e.replace(/^[a-z0-9]+:\/\//,""),n=a.RE_URL.exec(e),null===n)return{error:"failed to parse address from URL",address:null,port:null};t=n[1]}else t=e;return r?(r=parseInt(r,10),(r<0||r>65536)&&(r=null)):r=null,{address:new g(t),port:r}}static fromAddress4(e){const t=new o.Address4(e),n=a.BITS-(i.BITS-t.subnetMask);return new g(`::ffff:${t.correctForm()}/${n}`)}static fromArpa(e){let t=e.replace(/(\.ip6\.arpa)?\.$/,"");if(63!==t.length)throw new u.AddressError("Invalid 'ip6.arpa' form.");const n=t.split(".").reverse();for(let e=7;e>0;e--){const t=4*e;n.splice(t,0,":")}return t=n.join(""),new g(t)}microsoftTranscription(){return(0,p.sprintf)("%s.ipv6-literal.net",this.correctForm().replace(/:/g,"-"))}mask(e=this.subnetMask){return this.getBitsBase2(0,e)}possibleSubnets(e=128){const t=a.BITS-this.subnetMask-Math.abs(e-a.BITS);return t<0?"0":function(e){const t=/(\d+)(\d{3})/;for(;t.test(e);)e=e.replace(t,"$1,$2");return e}(new l.BigInteger("2",10).pow(t).toString(10))}_startAddress(){return new l.BigInteger(this.mask()+"0".repeat(a.BITS-this.subnetMask),2)}startAddress(){return g.fromBigInteger(this._startAddress())}startAddressExclusive(){const e=new l.BigInteger("1");return g.fromBigInteger(this._startAddress().add(e))}_endAddress(){return new l.BigInteger(this.mask()+"1".repeat(a.BITS-this.subnetMask),2)}endAddress(){return g.fromBigInteger(this._endAddress())}endAddressExclusive(){const e=new l.BigInteger("1");return g.fromBigInteger(this._endAddress().subtract(e))}getScope(){let e=a.SCOPES[this.getBits(12,16).intValue()];return"Global unicast"===this.getType()&&"Link local"!==e&&(e="Global"),e||"Unknown"}getType(){for(const e of Object.keys(a.TYPES))if(this.isInSubnet(new g(e)))return a.TYPES[e];return"Global unicast"}getBits(e,t){return new l.BigInteger(this.getBitsBase2(e,t),2)}getBitsBase2(e,t){return this.binaryZeroPad().slice(e,t)}getBitsBase16(e,t){const n=t-e;if(n%4!=0)throw new Error("Length of bits to retrieve must be divisible by four");return this.getBits(e,t).toString(16).padStart(n/4,"0")}getBitsPastSubnet(){return this.getBitsBase2(this.subnetMask,a.BITS)}reverseForm(e){e||(e={});const t=Math.floor(this.subnetMask/4),n=this.canonicalForm().replace(/:/g,"").split("").slice(0,t).reverse().join(".");return t>0?e.omitSuffix?n:(0,p.sprintf)("%s.ip6.arpa.",n):e.omitSuffix?"":"ip6.arpa."}correctForm(){let e,t=[],n=0;const r=[];for(e=0;e<this.parsedAddress.length;e++){const t=parseInt(this.parsedAddress[e],16);0===t&&n++,0!==t&&n>0&&(n>1&&r.push([e-n,e-1]),n=0)}n>1&&r.push([this.parsedAddress.length-n,this.parsedAddress.length-1]);const i=r.map((e=>e[1]-e[0]+1));if(r.length>0){const e=i.indexOf(Math.max(...i));t=function(e,t){const n=[],r=[];let i;for(i=0;i<e.length;i++)i<t[0]?n.push(e[i]):i>t[1]&&r.push(e[i]);return n.concat(["compact"]).concat(r)}(this.parsedAddress,r[e])}else t=this.parsedAddress;for(e=0;e<t.length;e++)"compact"!==t[e]&&(t[e]=parseInt(t[e],16).toString(16));let a=t.join(":");return a=a.replace(/^compact$/,"::"),a=a.replace(/^compact|compact$/,":"),a=a.replace(/compact/,""),a}binaryZeroPad(){return this.bigInteger().toString(2).padStart(a.BITS,"0")}parse4in6(e){const t=e.split(":"),n=t.slice(-1)[0].match(i.RE_ADDRESS);if(n){this.parsedAddress4=n[0],this.address4=new o.Address4(this.parsedAddress4);for(let t=0;t<this.address4.groups;t++)if(/^0[0-9]+/.test(this.address4.parsedAddress[t]))throw new u.AddressError("IPv4 addresses can't have leading zeroes.",e.replace(i.RE_ADDRESS,this.address4.parsedAddress.map(f).join(".")));this.v4=!0,t[t.length-1]=this.address4.toGroup6(),e=t.join(":")}return e}parse(e){const t=(e=this.parse4in6(e)).match(a.RE_BAD_CHARACTERS);if(t)throw new u.AddressError((0,p.sprintf)("Bad character%s detected in address: %s",t.length>1?"s":"",t.join("")),e.replace(a.RE_BAD_CHARACTERS,'<span class="parse-error">$1</span>'));const n=e.match(a.RE_BAD_ADDRESS);if(n)throw new u.AddressError((0,p.sprintf)("Address failed regex: %s",n.join("")),e.replace(a.RE_BAD_ADDRESS,'<span class="parse-error">$1</span>'));let r=[];const i=e.split("::");if(2===i.length){let e=i[0].split(":"),t=i[1].split(":");1===e.length&&""===e[0]&&(e=[]),1===t.length&&""===t[0]&&(t=[]);const n=this.groups-(e.length+t.length);if(!n)throw new u.AddressError("Error parsing groups");this.elidedGroups=n,this.elisionBegin=e.length,this.elisionEnd=e.length+this.elidedGroups,r=r.concat(e);for(let e=0;e<n;e++)r.push("0");r=r.concat(t)}else{if(1!==i.length)throw new u.AddressError("Too many :: groups found");r=e.split(":"),this.elidedGroups=0}if(r=r.map((e=>(0,p.sprintf)("%x",parseInt(e,16)))),r.length!==this.groups)throw new u.AddressError("Incorrect number of groups found");return r}canonicalForm(){return this.parsedAddress.map(h).join(":")}decimal(){return this.parsedAddress.map((e=>(0,p.sprintf)("%05d",parseInt(e,16)))).join(":")}bigInteger(){return new l.BigInteger(this.parsedAddress.map(h).join(""),16)}to4(){const e=this.binaryZeroPad().split("");return o.Address4.fromHex(new l.BigInteger(e.slice(96,128).join(""),2).toString(16))}to4in6(){const e=this.to4(),t=new g(this.parsedAddress.slice(0,6).join(":"),6).correctForm();let n="";return/:$/.test(t)||(n=":"),t+n+e.address}inspectTeredo(){const e=this.getBitsBase16(0,32),t=this.getBits(80,96).xor(new l.BigInteger("ffff",16)).toString(),n=o.Address4.fromHex(this.getBitsBase16(32,64)),r=o.Address4.fromHex(this.getBits(96,128).xor(new l.BigInteger("ffffffff",16)).toString(16)),i=this.getBits(64,80),a=this.getBitsBase2(64,80),s=i.testBit(15),c=i.testBit(14),u=i.testBit(8),d=i.testBit(9),f=new l.BigInteger(a.slice(2,6)+a.slice(8,16),2).toString(10);return{prefix:(0,p.sprintf)("%s:%s",e.slice(0,4),e.slice(4,8)),server4:n.address,client4:r.address,flags:a,coneNat:s,microsoft:{reserved:c,universalLocal:d,groupIndividual:u,nonce:f},udpPort:t}}inspect6to4(){const e=this.getBitsBase16(0,16),t=o.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:(0,p.sprintf)("%s",e.slice(0,4)),gateway:t.address}}to6to4(){if(!this.is4())return null;const e=["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":");return new g(e)}toByteArray(){const e=this.bigInteger().toByteArray();return 17===e.length&&0===e[0]?e.slice(1):e}toUnsignedByteArray(){return this.toByteArray().map(m)}static fromByteArray(e){return this.fromUnsignedByteArray(e.map(m))}static fromUnsignedByteArray(e){const t=new l.BigInteger("256",10);let n=new l.BigInteger("0",10),r=new l.BigInteger("1",10);for(let i=e.length-1;i>=0;i--)n=n.add(r.multiply(new l.BigInteger(e[i].toString(10),10))),r=r.multiply(t);return g.fromBigInteger(n)}isCanonical(){return this.addressMinusSuffix===this.canonicalForm()}isLinkLocal(){return"1111111010000000000000000000000000000000000000000000000000000000"===this.getBitsBase2(0,64)}isMulticast(){return"Multicast"===this.getType()}is4(){return this.v4}isTeredo(){return this.isInSubnet(new g("2001::/32"))}is6to4(){return this.isInSubnet(new g("2002::/16"))}isLoopback(){return"Loopback"===this.getType()}href(e){return e=void 0===e?"":(0,p.sprintf)(":%s",e),(0,p.sprintf)("http://[%s]%s/",this.correctForm(),e)}link(e){e||(e={}),void 0===e.className&&(e.className=""),void 0===e.prefix&&(e.prefix="/#address="),void 0===e.v4&&(e.v4=!1);let t=this.correctForm;return e.v4&&(t=this.to4in6),e.className?(0,p.sprintf)('<a href="%1$s%2$s" class="%3$s">%2$s</a>',e.prefix,t.call(this),e.className):(0,p.sprintf)('<a href="%1$s%2$s">%2$s</a>',e.prefix,t.call(this))}group(){if(0===this.elidedGroups)return s.simpleGroup(this.address).join(":");d("number"==typeof this.elidedGroups),d("number"==typeof this.elisionBegin);const e=[],[t,n]=this.address.split("::");t.length?e.push(...s.simpleGroup(t)):e.push("");const r=["hover-group"];for(let e=this.elisionBegin;e<this.elisionBegin+this.elidedGroups;e++)r.push((0,p.sprintf)("group-%d",e));return e.push((0,p.sprintf)('<span class="%s"></span>',r.join(" "))),n.length?e.push(...s.simpleGroup(n,this.elisionEnd)):e.push(""),this.is4()&&(d(this.address4 instanceof o.Address4),e.pop(),e.push(this.address4.groupForV6())),e.join(":")}regularExpressionString(e=!1){let t=[];const n=new g(this.correctForm());if(0===n.elidedGroups)t.push((0,c.simpleRegularExpression)(n.parsedAddress));else if(n.elidedGroups===a.GROUPS)t.push((0,c.possibleElisions)(a.GROUPS));else{const e=n.address.split("::");e[0].length&&t.push((0,c.simpleRegularExpression)(e[0].split(":"))),d("number"==typeof n.elidedGroups),t.push((0,c.possibleElisions)(n.elidedGroups,0!==e[0].length,0!==e[1].length)),e[1].length&&t.push((0,c.simpleRegularExpression)(e[1].split(":"))),t=[t.join(":")]}return e||(t=["(?=^|",c.ADDRESS_BOUNDARY,"|[^\\w\\:])(",...t,")(?=[^\\w\\:]|",c.ADDRESS_BOUNDARY,"|$)"]),t.join("")}regularExpression(e=!1){return new RegExp(this.regularExpressionString(e),"i")}}return Wb.Address6=g,Wb}var sy,oy=(ry||(ry=1,function(e){var t=Rb&&Rb.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=Rb&&Rb.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Rb&&Rb.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(r,e,i);return n(r,e),r};Object.defineProperty(e,"__esModule",{value:!0}),e.v6=e.AddressError=e.Address6=e.Address4=void 0;const i=Gb();Object.defineProperty(e,"Address4",{enumerable:!0,get:function(){return i.Address4}});const a=ay();Object.defineProperty(e,"Address6",{enumerable:!0,get:function(){return a.Address6}});const s=$b();Object.defineProperty(e,"AddressError",{enumerable:!0,get:function(){return s.AddressError}});const o=r(ey());e.v6={helpers:o}}(Rb)),Rb);class cy{static create(e,t,n,r){if(t===cl.EVM)return new My(e,n,r);throw new Error(`Unsupported blockchain: ${t}`)}}class uy{serviceLogger;env;pk;constructor(e,t,n){this.serviceLogger=e,this.env=t,this.pk=n}}function ly(e){switch(e){case sy.LOCAL:return{url:"http://127.0.0.1:8545",chainId:"31337",contractAddress:"0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",taskRegistryAddress:"0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",authorizationAddress:"0x0165878A594ca255338adfa4d48449f69242Eb8F"};case sy.LOCAL_DOCKER:return{url:"http://hardhat-node:8545",chainId:"31337",contractAddress:"0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",taskRegistryAddress:"0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",authorizationAddress:"0x0165878A594ca255338adfa4d48449f69242Eb8F"};case sy.TESTNET:return{url:process.env.RPC_URL||"https://api.avax-test.network/ext/bc/C/rpc",chainId:"43113",contractAddress:"0xB0Cd8d3430C14ecc08c4ccff713d5b21b472f88C",taskRegistryAddress:"0x26F9aD5E14518C4D4FD86EDA9753c28db5a85bEA",authorizationAddress:"0xdA5a5a58ee6fd52B3D0a60758695F7f0f2354F7a"};case sy.STAGING:return{url:process.env.RPC_URL||"https://api.avax-test.network/ext/bc/C/rpc",chainId:"43113",contractAddress:"0x84B5e1c533F3A4b24336a4cFFE546E09D56666Ce",taskRegistryAddress:"0x712c0E7122CBa5b0087DED2D7F1beAE9d24e5f5A",authorizationAddress:"0xc84f349C46e046ca6dbd7e653700DF728FA496E4"};case sy.EARLY_ACCESS:return{url:process.env.RPC_URL||"https://api.avax-test.network/ext/bc/C/rpc",chainId:"43113",contractAddress:"0x5F13b58a9737F0507c841F63417d27eEd066eaB1",taskRegistryAddress:"0x2DC64DC9AFa010fd702e5Ad721cd8864B77080df",authorizationAddress:"0xB2DE18FC7A3776f137dD590EaDD133793354882f"};case sy.PRODUCTION:return{url:process.env.RPC_URL||"https://api.avax.network/ext/bc/C/rpc",chainId:"43114",contractAddress:"0x91313C352BdB8f6527Eda20110a0EB5C77459c4A",taskRegistryAddress:"0xa23aB89E9b5F37a7dCCcCD5Ea7B9C0E5679d8E1e",authorizationAddress:"0x747E55Fc9531aFbEA7D5d1856ACF1B8136eEBCb1"};default:throw new Error(`Unsupported environment: ${e}`)}}!function(e){e.LOCAL="local",e.LOCAL_DOCKER="local-docker",e.TESTNET="testnet",e.STAGING="staging",e.EARLY_ACCESS="early-access",e.PRODUCTION="production"}(sy||(sy={}));var py=[{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"}],name:"DeRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"},{indexed:!1,internalType:"uint256",name:"index",type:"uint256"}],name:"Registered",type:"event"},{inputs:[],name:"deRegister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"id",type:"address"}],name:"deRegisterAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"deRegisterAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getNodeAtIndex",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodeCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"node",type:"address"}],name:"getNodeIndexByAddress",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodes",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nodeIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"registerNode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"registeredNodes",outputs:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}];let dy={delay:250,maxTry:240,until:null};function fy(e,t){const n=Object.assign(Object.assign({},Object.assign({},dy)),t);return Object.assign(Object.assign({},n),{currentTry:e,maxTry:n.maxTry||240,delay:hy(n.delay),until:n.until?n.until:()=>!0})}function hy(e){return void 0===e?()=>250:"function"==typeof e?e:()=>e}class my extends Error{constructor(e=void 0){super("function did not complete within allowed number of attempts"),this.lastResult=e,this.tooManyTries=!0}getLastResult(){return this.lastResult}}function gy(e){return!0===e.tooManyTries}var by=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function s(e){try{c(r.next(e))}catch(e){a(e)}}function o(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,o)}c((r=r.apply(e,t||[])).next())}))};function yy(e,t){return by(this,void 0,void 0,(function*(){const n=fy(1,t);return yield vy(e,n)}))}function vy(e,t){return by(this,void 0,void 0,(function*(){const n=t.currentTry<t.maxTry;try{const r=yield e();if(t.until(r))return t.onSuccessFunc&&t.onSuccessFunc(r,t.currentTry),r;throw n?new Error("function result failed to meet until() requirements"):new my(r)}catch(r){if(!gy(r)&&n)return t.onError&&t.onError(r,t.currentTry),yield function(e,t,n){return by(this,void 0,void 0,(function*(){const r=t.delay({currentTry:t.currentTry,maxTry:t.maxTry,lastDelay:t.lastDelay,lastResult:n});yield function(e=6e4){return new Promise((t=>setTimeout(t,e)))}(r);const i=Object.assign(Object.assign({},t),{currentTry:t.currentTry+1});return yield vy(e,i)}))}(e,t);throw t.onMaxRetryFunc&&t.onMaxRetryFunc(r,t.currentTry),r}}))}class xy{serviceLogger;provider;signer;contractAddress;nodeRegistryContract;constructor(e,t,n){this.serviceLogger=e;const r=ly(t);this.provider=n.provider,this.signer=n,this.contractAddress=r.contractAddress,this.nodeRegistryContract=new P.Contract(this.contractAddress,py,this.signer)}async getChainId(){const{chainId:e}=await this.provider.getNetwork();return e.toString()}getRegistrationContractAddress(){return this.contractAddress}async registerNode(){await this.nodeRegistryContract.registerNode()}async getNodes(){return(await this.nodeRegistryContract.getNodes()).map((e=>({nodeAddress:e.nodeAddress,blockNumber:e.blockNumber,timestamp:e.timestamp})))}async getNodeCount(){return await this.nodeRegistryContract.getNodeCount()}async deRegister(){return await this.nodeRegistryContract.deRegister()}async deRegisterAddress(e){await this.nodeRegistryContract.deRegisterAddress(e)}async getNodeAtIndex(e){const t=await this.nodeRegistryContract.getNodeAtIndex(e);return{nodeAddress:t.nodeAddress,blockNumber:t.blockNumber,timestamp:t.timestamp}}async getNodeIndexByAddress(e){return await this.nodeRegistryContract.getNodeIndexByAddress(e)}async deRegisterAll(){await this.nodeRegistryContract.deRegisterAll()}async getBlockInfo(){const e=await this.provider.getBlock("latest");if(!e)throw"Couldn't get latest block information";if(!e.hash)throw"Couldn't get block hash";return{hash:e.hash,number:e.number,timestamp:e.timestamp}}async getBlockHash(){const e=await this.provider.getBlock("latest");return e?e.hash:null}async waitForBlocks(e){const t=(await yy((async()=>await this.provider.getBlock("latest")),{delay:2e3,maxTry:Number.MAX_SAFE_INTEGER,until:e=>null!=e})).number+e;await yy((async()=>await this.provider.getBlock("latest")),{delay:2e3,maxTry:Number.MAX_SAFE_INTEGER,until:e=>null!=e&&e.number>=t})}async sendSignedTransaction(e){if(!this.signer)throw"Private key wasn't provided";const t=await this.signer.sendTransaction({data:e}),n=await t.wait();if(n)return n.blockHash;throw new Error("Transaction receipt is null")}async signTransaction(e){if(!this.signer)throw"Private key wasn't provided";return await this.signer.signTransaction(e)}async estimateGas(e){try{return await this.provider.estimateGas(e)}catch(e){throw console.error("Error estimating gas:",e),e}}}var wy=[{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessRevoked",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaNamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaTaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"oldOwner",type:"address"},{indexed:!1,internalType:"address",name:"newOwner",type:"address"}],name:"NamespaceOwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"cid",type:"string"},{indexed:!1,internalType:"address",name:"sender",type:"address"}],name:"TaskIdRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"string",name:"label",type:"string"}],name:"VersionLabelSet",type:"event"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"disableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"disableTaskByLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"enableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestActiveVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getTask",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"getTaskByLabel",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"getTaskByVersion",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grantNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"input",type:"string"}],name:"isAsciiString",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"isTaskRevoked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"str",type:"string"}],name:"isValidName",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"labeledVersions",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"latestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"address",name:"",type:"address"}],name:"namespaceGrantees",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"namespaceOwners",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"}],name:"registerTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"}],name:"registerTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskNamespaceWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revokeNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"revokeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"revokedTaskId",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"},{internalType:"string",name:"label",type:"string"}],name:"setTaskLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"uint256",name:"",type:"uint256"}],name:"tasks",outputs:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"newOwner",type:"address"}],name:"transferTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"}];class _y{serviceLogger;provider;signer;taskRegistryAddress;taskRegistryContract;transactionSuccess=1;constructor(e,t,n){this.serviceLogger=e;const r=ly(t);this.provider=n.provider,this.signer=n,this.taskRegistryAddress=r.taskRegistryAddress,this.taskRegistryContract=new P.Contract(this.taskRegistryAddress,wy,this.signer)}getTaskRegistryContractAddress(){return this.taskRegistryAddress}async getEIP712Domain(){return{name:"TaskRegistry",version:"1",chainId:Number(await this.provider.getNetwork().then((e=>e.chainId))),verifyingContract:this.taskRegistryAddress}}async registerTaskNamespace(e){if((await(await this.taskRegistryContract.registerTaskNamespace(e)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error registering task namespace")}async nonces(e){return await this.taskRegistryContract.nonces(e)}async getNamespaceOwner(e){return await this.taskRegistryContract.namespaceOwners(e)}async registerTaskNamespaceWithSignature(e){const t=await this.provider.getFeeData();let n=null;t.gasPrice&&(n=2n*t.gasPrice);const r=2n*await this.taskRegistryContract.registerTaskNamespaceWithSignature.estimateGas(e.user,e.namespace,e.deadline,e.signatureMeta,{gasPrice:n}),i=await yy((async()=>{const t=await this.taskRegistryContract.registerTaskNamespaceWithSignature(e.user,e.namespace,e.deadline,e.signatureMeta,{gasPrice:n,gasLimit:r});return await t.wait()}),{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof P.NonceManager&&this.signer.reset(),!1)});if(i.status==this.transactionSuccess)return i;throw new Error("Error registering task namespace")}async transferTaskNamespace(e,t){if((await(await this.taskRegistryContract.transferTaskNamespace(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error transferring task namespace")}async grantNamespaceAccess(e,t){if((await(await this.taskRegistryContract.grantNamespaceAccess(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error granting task namespace")}async revokeNamespaceAccess(e,t){if((await(await this.taskRegistryContract.revokeNamespaceAccess(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error revoking task namespace")}async setTaskLabel(e,t,n,r){if(r.length>128)throw new Error("Label exceeds maximum length of 128 chars");if((await(await this.taskRegistryContract.setTaskLabel(e,t,n,r)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error setting task label")}async registerTask(e,t,n){if((await(await this.taskRegistryContract.registerTask(e,t,n)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error registering task")}async registerTaskWithSignature(e){const t=await this.provider.getFeeData();let n=null;t.gasPrice&&(n=2n*t.gasPrice);const r=2n*await this.taskRegistryContract.registerTaskWithSignature.estimateGas(e.user,e.namespace,e.taskName,e.task,e.deadline,e.signatureMeta,{gasPrice:n}),i=await yy((async()=>{const t=await this.taskRegistryContract.registerTaskWithSignature(e.user,e.namespace,e.taskName,e.task,e.deadline,e.signatureMeta,{gasPrice:n,gasLimit:r});return await t.wait()}),{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof P.NonceManager&&this.signer.reset(),!1)});if(i.status==this.transactionSuccess)return i;throw new Error("Error registering task")}async getTask(e,t){const n=await this.taskRegistryContract.getTask(e,t);return{namespace:e,taskId:n[0][0],version:Number(n[2]),meta:n[0][1],nameSpaceOwner:n[1]}}async getTaskByLabel(e,t,n){const r=await this.taskRegistryContract.getTaskByLabel(e,t,n);return{namespace:e,taskId:r[0][0],version:Number(r[2]),label:n,meta:r[0][1],nameSpaceOwner:r[1]}}async getTaskByVersion(e,t,n){const r=await this.taskRegistryContract.getTaskByVersion(e,t,n);return{namespace:e,taskId:r[0][0],version:Number(n),meta:r[0][1],nameSpaceOwner:r[1]}}async disableTask(e,t,n){if((await(await this.taskRegistryContract.disableTask(e,t,n)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error disabling task")}async enableTask(e,t,n){if((await(await this.taskRegistryContract.enableTask(e,t,n)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error enabling task")}async isTaskRevoked(e){return await this.taskRegistryContract.isTaskRevoked(e)}async getLatestVersion(e,t){const n=Number(await this.taskRegistryContract.getLatestVersion(e,t));if(0==n)throw`Task (${t}) not found in namespace (${e})`;return n}async getLatestActiveVersion(e,t){return Number(await this.taskRegistryContract.getLatestActiveVersion(e,t))}}var Sy=[{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Deregistered",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Granted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Registered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Revoked",type:"event"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"deregister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"deregisterWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"getPayer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grant",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"grantWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"isAuthorized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"register",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revoke",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"revokeWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"setTaskRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"taskRegistry",outputs:[{internalType:"contract ITaskRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}];class Ey{serviceLogger;provider;signer;authorizationAddress;authorizationContract;transactionSuccess=1;constructor(e,t,n){this.serviceLogger=e;const r=ly(t);this.provider=n.provider,this.signer=n,this.authorizationAddress=r.authorizationAddress,this.authorizationContract=new P.Contract(this.authorizationAddress,Sy,this.signer)}getAuthorizationContractAddress(){return this.authorizationAddress}async getEIP712Domain(){return{name:"Authorization",version:"1",chainId:Number(await this.provider.getNetwork().then((e=>e.chainId))),verifyingContract:this.authorizationAddress}}async nonces(e){return await this.authorizationContract.nonces(e)}async grantAuthorization(e,t){if((await(await this.authorizationContract.grant(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error granting authorization")}async grantAuthorizationWithSignature(e){const t=await this.provider.getFeeData();let n=null;t.gasPrice&&(n=2n*t.gasPrice);if((await yy((async()=>{const t=await this.authorizationContract.grantWithSignature(e.user,e.namespace,e.deadline,e.signatureMeta,{gasPrice:n});return await t.wait()}),{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("Nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof P.NonceManager&&this.signer.reset(),!1)})).status==this.transactionSuccess)return!0;throw new Error("Error granting authorization with signature")}async revokeAuthorization(e,t){if((await(await this.authorizationContract.revoke(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error revoking authorization")}async revokeAuthorizationWithSignature(e){if((await yy((async()=>{const t=await this.authorizationContract.revokeWithSignature(e.user,e.namespace,e.deadline,e.signatureMeta);return await t.wait()}),{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("Nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof P.NonceManager&&this.signer.reset(),!1)})).status==this.transactionSuccess)return!0;throw new Error("Error revoking authorization with signature")}async registerAuthorization(e){if((await(await this.authorizationContract.register(e)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error registering authorization")}async registerAuthorizationWithSignature(e){const t=await this.provider.getFeeData();let n=null;t.gasPrice&&(n=2n*t.gasPrice);const r=2n*await this.authorizationContract.registerWithSignature.estimateGas(e.user,e.apiKeyHash,e.deadline,e.signatureMeta,{gasPrice:n}),i=await yy((async()=>{const t=await this.authorizationContract.registerWithSignature(e.user,e.apiKeyHash,e.deadline,e.signatureMeta,{gasPrice:n,gasLimit:r});return await t.wait()}),{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("Nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof P.NonceManager&&this.signer.reset(),!1)});if(i.status==this.transactionSuccess)return i;throw new Error("Error registering authorization with signature")}async deRegisterAuthorization(e){if((await(await this.authorizationContract.deregister(e)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error deregistering authorization")}async deRegisterAuthorizationWithSignature(e){if((await yy((async()=>{const t=await this.authorizationContract.deregisterWithSignature(e.user,e.apiKeyHash,e.deadline,e.signatureMeta);return await t.wait()}),{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("Nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof P.NonceManager&&this.signer.reset(),!1)})).status==this.transactionSuccess)return!0;throw new Error("Error deregistering authorization with signature")}async isAuthorized(e,t){return await this.authorizationContract.isAuthorized(e,t)}async getPayerAddress(e){return await this.authorizationContract.getPayer(e)}}class ky{provider;signer;constructor(e,t){this.provider=t.provider,this.signer=t}async signMeta(e,t,n){if(!function(e){return e&&"string"==typeof e.name&&"string"==typeof e.version&&"number"==typeof e.chainId&&"string"==typeof e.verifyingContract}(e))throw new Error("Invalid EIP712Domain");return await this.signer.signTypedData(e,t,n)}async getCurrentNonce(){return await this.signer.getNonce()}async reSyncNonceManager(){this.signer instanceof P.NonceManager&&this.signer.reset()}}class My extends uy{nodeRegistry;taskRegistry;authorization;utils;signer;constructor(e,t,n){if(super(e,t,n),void 0===n)throw new Error("Private key wasn't provided");const r=ly(t),i=new P.Network(t,r.chainId),a=new P.JsonRpcProvider(`${r.url}`,i,{staticNetwork:i}),s=new P.Wallet(n,a);this.signer=new P.NonceManager(s),this.nodeRegistry=new xy(this.serviceLogger,t,this.signer),this.taskRegistry=new _y(this.serviceLogger,t,this.signer),this.authorization=new Ey(this.serviceLogger,t,this.signer),this.utils=new ky(t,this.signer)}}const Ty=e=>{throw E.isAxiosError(e)?e.response?e.response.data.message.includes("Entitlement Validation Error")?kb.USER_NO_REGISTERED:`${e.response.data.message||e.response.data}`:e.request?`Server is not responding: ${e.message}\n${e.config?.method} - ${e.config?.url}`:e.message:e.message};function Ay(e,t){if(e!==e.toLowerCase())throw new Error(`${t} must be lowercase.`)}function Ry(e){return cy.create(null,cl.EVM,e,Sb("privateKey"))}function Oy(e){if(!P.isAddress(e)||42!==e.length||!e.startsWith("0x"))throw new Error("Must be a valid ethereum address. (ENS not supported yet)")}function Iy(){const e=u.networkInterfaces();for(const t in e){const n=e[t];if(n)for(const e of n)if("IPv4"===e.family&&!e.internal&&oy.Address4.isValid(e.address))return e.address}throw new Error("Could not be found a valid local IP address.")}function Ny(e){const t=xb(),n=null!==t;let r=0;switch(r=n&&(!n||t.privateKey&&t.address)?2:1,r){case 1:console.error(kb.USER_NO_REGISTERED),process.exit(1);break;case 2:e=xh.createSignedBody(e,t.privateKey,t.address)}return e}const Py=async(e,n)=>{const r=`./tmp.${S()}`;try{t.mkdirSync(r);const s=i.join(process.cwd(),n);if(!t.existsSync(s))throw"Task path doesn't exist";if(e===Rs.C||e===Rs.RUST||e===Rs.JS||e===Rs.PYTHON){const e="config.json",n=i.join(s,e);if(!t.existsSync(n)){const e={run:{limits:{call:"65536",frame:"524288",gas:"1099511627776",memory:"2048"}}};t.writeFileSync(n,JSON.stringify(e))}t.copyFileSync(n,i.join(r,e));const a="fs.tar",o=i.join(s,a);t.existsSync(o)&&t.copyFileSync(o,i.join(r,a))}const o=Th.createBuild(e);await o.build(n,r);const c=await async function(e,n){if(!t.existsSync(e))throw"Invalid source code path";const r=t.readdirSync(e);if(0===r.length)throw"No files found in directory";const i=new fb;for(const n of r){const r=e+`/${n}`,s=t.readFileSync(r),o=a.basename(r);i.append("files",s,o)}i.append("lang",n);const s={files:r,lang:n},o=Ny(s),c=await Tb();return i.append("walletAddress",o.walletAddress),i.append("signature",JSON.stringify(o.signature)),i.append("fmpayload",JSON.stringify(s)),(await c.post("api/filesystem/pushLocal",i,{headers:{...i.getHeaders()}}).catch((e=>{Ty(e)}))).data}(r,e);return t.rmSync(r,{recursive:!0}),c}catch(e){throw t.rmSync(r,{recursive:!0}),e}},{parse:jy,stringify:Dy}=JSON,Ly=String,Cy=(e,t)=>t,$y=(e,t,n)=>{const r=Ly(t.push(n)-1);return e.set(n,r),r},By=(e,t,n)=>{const r=Cy,i=new Map,a=[],s=[];let o=+$y(i,a,r.call({"":e},"",e)),c=!o;for(;o<a.length;)c=!0,s[o]=Dy(a[o++],u,n);return"["+s.join(",")+"]";function u(e,t){if(c)return c=!c,t;const n=r.call(this,e,t);switch(typeof n){case"object":if(null===n)return n;case"string":return i.get(n)||$y(i,a,n)}return n}},zy=e=>jy(By(e));async function Uy(e,t,n,r,i){const a=n.body,s=n.method.toLowerCase();let o,c={},u=0,l=0;o=["post","put","patch"].includes(s)?e+t.path:`${e}${function(e,t){if(t)for(const n in t){const r=t[n];e=e.replace(new RegExp(`{${n}}`,"g"),r)}return e}(t.path,t.params||{})}`;const p=E.create({headers:{Connection:"keep-alive"},httpsAgent:new y.Agent({keepAlive:!0}).on("keylog",((e,t)=>{const n=t.getSession(),r=Buffer.from(n).toString("hex").toUpperCase();c={tlsCert:zy(t.getPeerCertificate(!0)),localCertificate:zy(t.getCertificate()),ephemeral:t.getEphemeralKeyInfo(),cipher:t.getCipher(),session:r,ticket:t.getTLSTicket(),localAddress:t.localAddress,sharedSigAlgs:t.getSharedSigalgs(),remoteAddress:t.remoteAddress,protocol:t.getProtocol()}})),maxContentLength:1/0,maxBodyLength:1/0});p.interceptors.request.use((e=>{const t=e.data?JSON.stringify(e.data):"";return u=(e.url?.length||0)+(t.length||0)+JSON.stringify(e.headers).length,e})),p.interceptors.response.use((e=>(l=JSON.stringify(e.data).length+JSON.stringify(e.headers).length,e)));try{let e;switch(s){case"get":e=await p.get(o,{headers:r,timeout:i});break;case"patch":e=await p.patch(o,a,{headers:r,timeout:i});break;case"post":e=await p.post(o,a,{headers:r,timeout:i});break;case"put":e=await p.put(o,a,{headers:r,timeout:i});break;case"delete":e=await p.delete(o,{headers:r,timeout:i});break;default:throw new Error("Unsupported HTTP method")}return[e.data,JSON.stringify(c),Uc.SUCCEED,u,l]}catch(e){let t,n;return n=e.response&&e.response.data?JSON.stringify(e.response.data):e.message,t=E.isAxiosError(e)&&e.response||{data:n,status:500,statusText:"",headers:{},config:{headers:{}}},[t.data,JSON.stringify(c),Uc.FAILED,u,l]}}function Fy(e,t){const n=t.method;if(["POST","PUT","PATCH"].includes(n)){return{host:e,path:t.path,method:n,body:t.body,headers:{}}}if("GET"===n||"DELETE"===n){const r=t.path,i=t.params;return{host:e,path:r.replace(/{(\w+)}/g,((e,t)=>i?.[t]??"")),method:n,headers:{}}}throw console.error("Unsupported method:",n),new Error("Api_Adapter create request error format")}async function qy(e,t){try{const n=await O(e),r=function(e){const t=e.servers;if(t&&t.length>0){const e=t[0];let n=e.url;return e.variables&&Object.keys(e.variables).forEach((t=>{const r=e.variables[t],i=r.default||r.enum&&r.enum[0];if(void 0===i)throw new Error(`No default value found for variable ${t}`);n=n.replace(`{${t}}`,i)})),n}throw new Error("No servers defined in OpenAPI document")}(n),i=Fy(r,t),[a,s]=n.request(i);return s?["",s,Uc.FAILED]:[r,"",Uc.SUCCEED]}catch(e){return console.log(e),["",e,Uc.FAILED]}}class Hy{tokens=[];authInputs;parse(e,t){const n=this.parseKeyValuePairs(t);if(0==e.length)return void(this.authInputs=n);const r=Object.keys(n);if(!e.every((e=>r.includes(e))))throw new Error(`Invalid authString: ${e} are required`);{const t={};for(const r of e)t[r]=n[r];this.authInputs=t}}parseKeyValuePairs(e){try{const t=e.split(","),n={};for(const e of t){const[t,r]=e.split(":");n[t.trim()]=r.trim()}return n}catch{throw new Error("Invalid auth string")}}}class Yy extends Hy{tokens=["accessKey","secretKey"];constructor(e){super(),this.parse(this.tokens,e)}authHeaders(e){return D.sign(e,{accessKeyId:this.authInputs.accessKey,secretAccessKey:this.authInputs.secretKey}).headers||{}}}class Vy extends Hy{tokens=["username","password"];constructor(e){super(),this.parse(this.tokens,e)}authHeaders(e){return{Authorization:`Basic ${btoa(`${this.authInputs.username}:${this.authInputs.password}`)}`}}}class Gy extends Hy{tokens=[];constructor(e){super(),this.parse([],e)}authHeaders(e){return{...this.authInputs}}}var Ky;!function(e){e.AWS_SIGNATURE="aws-signature",e.BASIC_AUTH="basic-auth",e.CUSTOM_HEADER="custom-header"}(Ky||(Ky={}));const Wy=(e,t)=>{switch(e){case Ky.AWS_SIGNATURE:return new Yy(t);case Ky.BASIC_AUTH:return new Vy(t);case Ky.CUSTOM_HEADER:return new Gy(t);default:throw new Error(`Invalid authentication method specified. Should be one of <${Object.values(Ky)}>`)}},Zy=async(e,n,r,i)=>{let a="";const s=t.readFileSync(n,"utf8"),o=JSON.parse(s).input,c=JSON.parse(s).executionTimeout,[u,l,p]=await async function(e){try{const t=JSON.parse(e);return[{path:t.path.toString(),method:t.method.toString(),body:t.body,params:t.params,headers:{}},"",Uc.SUCCEED]}catch(e){return console.error("Invalid JSON format:",e),[null,"Api_Adapter create request input format",Uc.FAILED]}}(JSON.stringify(o));if(a+=`${N.cyanBright("\nInput request :\n")}`,a+=JSON.stringify(u,null,2)+"\n",null===u)throw a+=`Invalid message input - ${N.red("FAIL")} \n`,new Error(`Invalid message input ${l}`);const[d,f,h]=await qy(e,u);let m,g,b;a+=`${N.cyanBright("\nBase URL = ")}${d} \n`;let y={};if(h!=Uc.SUCCEED)throw console.info(`Axios call - ${N.red("ERROR")} `),console.log(a),new Error(`Invalid message input ${f}`);{a+=`${N.cyanBright("OpenAPI manifest check -")} ${N.green("OK")} \n`;const e=Fy(d,u),t=new URL(d),n={host:t.host,path:t.pathname+u.path,method:u.method.toUpperCase(),headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(u.body)||""};if(r&&(y=((e,t,n)=>Wy(e,t).authHeaders(n))(r,i,n)),[m,g,b]=await Uy(d,u,e,y,c),null===b)throw a+=`${N.cyanBright("OpenAPI manifest check -")} ${N.red("FAIL")} \n`,new Error(` Error in Axios ${m}`);a+=`${N.cyanBright("\nAPI Task response")}\n`,a+=N.green(JSON.stringify(m,null,2)),console.log(`API Task executed with status - ${N.green("OK")} `),console.log(a)}};L.config({path:process.cwd()+"/truebit.verify.env"});const Jy=e=>{const t=e.split("/");if(2!=t.length)return!1;const n=t[0].split("_");return r=n[n.length-1],!(!/^[a-f0-9]{64}$/gi.test(r)||!(e=>/^\d+\.\d+\.\d+$/.test(e))(t[1]));var r};function Xy(e){if(!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(e))throw new Error("Invalid API key format")}async function Qy(e,t,n=null,r=Sb("blockchainEnv")){let i;Ay(e,"Namespace");const a=Ry(r),s=Sb("address");if(!s)throw`Please provide an address property in '${_b()}/.truebit/secret.json'`;return i=n?await a.taskRegistry.registerTaskNamespace(e):await async function(e,t,n,r){const i=await n.taskRegistry.getEIP712Domain(),a={RegisterTaskNamespaceMeta:[{name:"user",type:"address"},{name:"namespace",type:"string"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},s=BigInt(await n.taskRegistry.nonces(e)),o={user:P.getAddress(e),namespace:t,nonce:s,deadline:Math.floor(Date.now()/1e3)+3600};let c=await n.utils.signMeta(i,a,o);Date.now()/1e3>=o.deadline&&(o.deadline=Math.floor(Date.now()/1e3)+7200,c=await n.utils.signMeta(i,a,o));const u=await async function(e,t,n,r,i,a){const s={user:e,namespace:t,nonce:BigInt(n),deadline:r,signatureMeta:i};try{const e=await Mb(),t={...s};return t.nonce=String(s.nonce),await e.post("user/relayer/namespace",t,{params:{fromSetup:a}})}catch(e){throw E.isAxiosError(e)?e.response?new Error(`The server responding with an error - ${e.response.status+" - "+e.response.statusText+" - "+e.response.data.message}.`):e.request?new Error(`The server is not responding - ${e.message}.`):new Error(`There was an error in the communication with the server - ${e.message}.`):new Error("There was an error in the communication with the server.")}}(e,t,o.nonce,o.deadline,c,r);return 201==u.status}(s,e,a,t),i}async function ev(e,t,n,r,i){const a=await i.taskRegistry.getEIP712Domain(),s={Task:[{name:"taskId",type:"string"},{name:"meta",type:"string"},{name:"active",type:"bool"}],RegisterTaskMeta:[{name:"user",type:"address"},{name:"namespace",type:"string"},{name:"taskName",type:"string"},{name:"task",type:"Task"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},o={user:e,namespace:t,taskName:n,task:{taskId:r.taskId,meta:r.meta,active:r.active},nonce:BigInt(await i.taskRegistry.nonces(e)),deadline:Math.floor(Date.now()/1e3)+3600};let c=await i.utils.signMeta(a,s,o);Date.now()/1e3>=o.deadline&&(o.deadline=Math.floor(Date.now()/1e3)+7200,c=await i.utils.signMeta(a,s,o));const u=await async function(e,t,n,r,i,a,s){const o={user:e,namespace:t,taskName:n,task:r,nonce:BigInt(i),deadline:a,signatureMeta:s};try{const e=await Mb(),t={...o};return t.nonce=String(o.nonce),await e.post("user/relayer/task",t)}catch(e){throw E.isAxiosError(e)?e.response?new Error(`The server responding with an error - ${e.response.status+" - "+e.response.statusText+" - "+e.response.data.message}.`):e.request?new Error(`The server is not responding - ${e.message}.`):new Error(`There was an error in the communication with the server - ${e.message}.`):new Error("There was an error in the communication with the server.")}}(e,t,n,r,o.nonce,o.deadline,c);return 201==u.status}async function tv(e,t,n,r,i){if(!Jy(n))throw new Error("Invalid taskId");if(r)try{r=JSON.stringify(r)}catch{throw new Error("Meta information cannot be serialized as JSON")}let a=null;try{await async function(e){const t=await Tb();return await t.post("api/filesystem/push",Ny({taskId:e})).catch(Ty)}(n);const s={taskId:n,meta:r||"",active:!0};await async function(e,t,n,r=null){const i=Ry(Sb("blockchainEnv"));let a=!1;try{if(r)a=await i.taskRegistry.registerTask(t,n,e);else{const r=Sb("address");if(!r)throw Error(`Please provide an address property in '${_b()}/.truebit/secret.json'`);a=await ev(r,t,n,e,i)}}catch(e){const t=e.message,n=t.match(/execution reverted: "(.*?)" /)?.[1];throw n?new Error(`Trying to register a task -> ${n}`):new Error(`Trying to register a task -> ${t}`)}return a}(s,e,t,i),a=await async function(e,t){const n=Ry(Sb("blockchainEnv"));return await n.taskRegistry.getLatestVersion(e,t)}(e,t)}catch(e){if(e instanceof Error)throw e;if("string"==typeof e)throw new Error(e)}return a}function nv(e,n){if(console.log(`Task executed with status: ${n.status}`),n.output)if(console.log(`Task executed with result: ${n.output.result}`),n.output.metering){console.log("Task resource usage:");const r=n.output.metering,a=(e,t)=>{if(0==t)return"N/A";const n=e/t;return n<1?"Short":Number(n.toFixed(0))},s={Gas:{Unit:"Steps",Limits:r.limits.gas,Peak:"N/A","Last status":r.last.steps,Capacity:a(r.limits.gas,r.last.steps)},"Nested calls":{Unit:"Calls",Limits:r.limits.call,Peak:r.peak.call,"Last status":r.last.call,Capacity:a(r.limits.call,r.peak.call)},"Frame memory":{Unit:"Bytes",Limits:r.limits.frame,Peak:r.peak.frame,"Last status":r.last.frame,Capacity:a(r.limits.frame,r.peak.frame)},"System memory":{Unit:"64 Kb pages",Limits:r.limits.memory,Peak:r.peak.memory,"Last status":"𝚫 "+r.last.memoryGrowDelta,Capacity:a(r.limits.memory,r.peak.memory)}};if(console.table(s),e.updateConfig){const e=i.join(process.cwd(),"config.json");try{const n=t.readFileSync(e),i=JSON.parse(n.toString());i.run.limits.gas=String(r.last.steps),i.run.limits.call=String(r.peak.call),i.run.limits.frame=String(r.peak.frame),i.run.limits.memory=String(r.limits.memory),t.writeFileSync(e,JSON.stringify(i)),console.log("Task limits updated with last/peak values (--update-config)")}catch(t){console.log(`Error updating config file at '${e}': '${t}', (--update-config)`)}}}else console.log("No task resource usage reported.")}async function rv(){const e=xb(),t=null!==e,n=C.createInterface({input:process.stdin,output:process.stdout});let r=0;if(t&&e.privateKey&&e.address)r=1;else if(t){console.log(kb.SETUP_STEP1);switch((await(i="Press [Y] to proceed or [N] to skip: ",new Promise((e=>n.question(i,e))))).trim().toUpperCase()){case"Y":r=2;break;case"N":r=3;break;default:return console.log("Invalid input. Please enter Y or N."),void n.close()}}var i;switch(r){case 1:Eb(),console.log(kb.SETUP_STEP1_SCENARIO1_P1);break;case 2:{Eb();const e=P.Wallet.createRandom(),t=e.privateKey,n=e.address;wb({privateKey:t,address:n}),console.log("\nSetting up your new wallet..."),console.log(kb.SETUP_STEP1_SCENARIO2(n));break}case 3:Eb(),console.log(kb.SETUP_STEP1_SCENARIO3),process.exit(1);break;default:console.log("An unexpected error occurred.")}n.close()}async function iv(e,t,n,r,i){console.log("Deploying the API Authentication Credentials");try{if(!function(e){try{new j(e)}catch{return!1}return!0}(r))throw"Invalid private key provided";if(!P.isAddress(i))throw"Invalid address provided";if(Wy(t,n),!Jy(e))throw"Invalid taskId";const a=await Tb();await a.post("api/api-credentials",Ny({taskId:e,authString:n,method:t})).catch(Ty),console.log("The credentials were deployed "+N.green("Successfully"))}catch(e){throw`There was an Error deploying credentials:\nCouldn't push api credentials to remote server: ${e}`}}async function av(e,t,n=Sb("blockchainEnv"),r=Sb("address")){Xy(e);const i=Ry(n),a=await i.authorization.getEIP712Domain(),s=await i.authorization.nonces(r),o=Math.floor(Date.now()/1e3)+3600,c=P.keccak256(P.toUtf8Bytes(e)),u={user:r,apiKeyHash:c,nonce:Number(s),deadline:o},l=await i.utils.signMeta(a,{RegisterMeta:[{name:"user",type:"address"},{name:"apiKeyHash",type:"string"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},u),p=await async function(e,t,n,r,i){const a={user:e,apiKeyHash:t,deadline:n,signatureMeta:r};try{const e=await Mb();return await e.post("user/relayer/auth",a,{params:{fromSetup:i}})}catch(e){throw E.isAxiosError(e)?e.response?new Error(`The server responding with an error - ${e.response.status+" - "+e.response.statusText+" - "+e.response.data.message}.`):e.request?new Error(`The server is not responding - ${e.message}.`):new Error(`There was an error in the communication with the server - ${e.message}.`):new Error("There was an error in the communication with the server.")}}(r,c,o,l,t);return 201==p.status?c:null}const sv="0x0000000000000000000000000000000000000000";async function ov(e){let t=!0;if(""===e)t=!1,console.log("An email address is required. Please provide your email address to proceed.");else{new RegExp(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(e)?await pv({email:e})&&(t=!1,console.log("The provided email address is already in use. Please enter a different email address.")):(t=!1,console.log("The email address provided is not valid. Please try again."))}return t}function cv(e){return"Y"===e||"N"===e}async function uv(){const e=await async function(){const e=Ry(Sb("blockchainEnv"));let t="";try{await yy((async()=>{t=S();const n=P.keccak256(P.toUtf8Bytes(t));return await e.authorization.getPayerAddress(n)===sv}),{delay:500,maxTry:5,until:e=>!0===e})}catch(e){throw gy(e)?Error("Attempts to generate unique Api Key for the user exhausted."):e}return t}();try{if(!await av(e,!0))throw Error("The API key could not been registered.")}catch(e){const t=e.message;if(t)throw Error(`There was an error registering the API key -> ${t}`)}return e}async function lv(){const e=await async function(){const e=Ry(Sb("blockchainEnv"));let t="";try{await yy((async()=>{t=_(4).toString("hex");return await e.taskRegistry.getNamespaceOwner(t)===sv}),{delay:500,maxTry:5,until:e=>!0===e})}catch(e){throw gy(e)?Error("Attempts to generate unique namespace for the user exhausted."):e}return t}();try{if(!await Qy(e,!0))throw Error("The namespace could not been registered.")}catch(e){const t=e.message,n=t?t.match(/execution reverted: "(.*?)" /)?.[1]:null;if(n)throw Error(`There was an error registering the namespace -> ${n}`);if(t)throw Error(`There was an error registering the namespace -> ${t}`)}return e}async function pv(e){try{const t=await Mb();return(await t.post("user",e)).data}catch(e){if(E.isAxiosError(e)&&404==e.response?.status&&e.response?.data.message&&e.response?.data.message.includes("User not found"))return null;throw E.isAxiosError(e)?e.response?Error(`The server responding with an error -> ${e.response.data.message||e.response.status+" - "+e.response.statusText}`):e.request?Error(`The server is not responding -> ${e.message}`):Error(`There was an error in the communication with the server -> ${e.message}`):"string"==typeof e?Error(`There was an error in the communication with the server -> ${e}`):Error("There was an error in the communication with the server.")}}async function dv(){const e=xb(),t=null!==e;let n,r=0;const i=z({input:process.stdin,output:process.stdout,terminal:!0});switch(t&&(!function(e){return!P.isAddress(e)||42!==e.length||!e.startsWith("0x")}(e.address)?(n=await pv({walletAddress:e.address}),r=n?2:3):r=1),r){case 1:console.log("The wallet set in the configuration must be a valid ethereum address. (ENS not supported yet)");break;case 2:console.log(kb.SETUP_STEP1_SCENARIO1_P2(n));break;case 3:{console.log(kb.SETUP_STEP2_SCENARIO3_P1),console.log();const t={confirmRegistration:"",fullNameAnswer:"",emailAddressAnswer:"",companyNameAnswer:"",jobPositionAnswer:"",eulaAnswer:""};for(;"Y"!=t.confirmRegistration;){for(t.fullNameAnswer=(await i.question(N.bold(" 1. Full Name: "))).trim();""===t.fullNameAnswer;)console.log("Your full name is required. Please provide your first and last name to proceed."),t.fullNameAnswer=(await i.question(N.bold(" 1. Full Name: "))).trim();for(t.emailAddressAnswer=(await i.question(N.bold(" 2. Email Address: "))).trim();!await ov(t.emailAddressAnswer);)t.emailAddressAnswer=(await i.question(N.bold(" 2. Email Address: "))).trim();for(t.companyNameAnswer=(await i.question(N.bold(" 3. Company Name: "))).trim(),t.jobPositionAnswer=(await i.question(N.bold(" 4. Job Position: "))).trim();!cv(t.eulaAnswer);)t.eulaAnswer=(await i.question(N.bold(` 5. Accept EULA? [Y|N] (${kb.EULA_TERMS_LINK}): `))).toUpperCase();if("N"==t.eulaAnswer){console.log(kb.EULA_REGISTRATION_NO_ACCEPTED);break}for(;!cv(t.confirmRegistration);)console.log("\nIs the information provided above correct?"),t.confirmRegistration=(await i.question(N.bold("Press [Y] to confirm or [N] to edit: "))).toUpperCase();"N"==t.confirmRegistration&&(console.log("\nPlease provide the following information:"),(a=t).fullNameAnswer="",a.emailAddressAnswer="",a.companyNameAnswer="",a.jobPositionAnswer="",a.eulaAnswer="",a.confirmRegistration="")}if("N"==t.eulaAnswer)break;console.log(),console.log("By completing registration, you'll be automatically subscribed to our newsletter."),console.log("To opt-out, please follow the steps described in our documentation portal."),console.log();const n=$({text:N.bold("... registering your account."),stream:process.stdout}).start();try{const r=await lv(),i=await uv(),a={name:t.fullNameAnswer,email:t.emailAddressAnswer,walletAddress:e?.address,company:t.companyNameAnswer,jobDescription:t.jobPositionAnswer,EULA:xh.createSignedBody({ip:Iy(),date:(new Date).toISOString()},e.privateKey),defaultNamespace:r,defaultApiKey:i};await async function(e){try{const t=await Mb();return await t.post("user/register",e)}catch(e){throw E.isAxiosError(e)?e.response?Error(`The server responding with an error -> ${e.response.data.message||e.response.status+" - "+e.response.statusText}`):e.request?Error(`The server is not responding -> ${e.message}`):Error(`There was an error in the communication with the server -> ${e.message}`):"string"==typeof e?Error(`There was an error in the communication with the server -> ${e}`):Error("There was an error in the communication with the server.")}}(a),n.stop(),console.log(kb.SETUP_STEP2_SCENARIO3_P2(t,e.address,r,i))}catch(e){n.stop();const t=e.message,r=t?t.match(/CreateUserValidation - (.*?.*)/)?.[1]:null;if(r)throw Error(r);if(t.includes("Sender doesn't have enough funds to send tx"))throw Error("We are currently experiencing technical difficulties. Please try again later.");console.error(kb.SETUP_STEP2_UNHANDLED_ERROR),process.exit(1)}finally{n.clear()}break}default:throw Error("An unexpected error occurred.")}var a;i.close()}async function fv(){const e=xb(),n=null!==e;let r=0;switch(r=n?n&&!e.eula?2:3:1,r){case 1:case 2:{const e=z({input:process.stdin,output:process.stdout,terminal:!0});let n="";for(console.log(kb.EULA_INSTALLATION);!cv(n);)n=(await e.question(N.bold("\nHave you read, and do you accept the Terms of Use? [Y|N]: "))).toUpperCase();if("N"==n)throw kb.EULA_INSTALLATION_NO_ACCEPTED;const a=Math.round((new Date).getTime()).toString();if(1===r){!function(e=vb()){const n=_b(),r=i.join(n,".truebit"),a=i.join(r,"secret.json");t.existsSync(r)||t.mkdirSync(r,{recursive:!0}),t.writeFileSync(a,JSON.stringify(e,null,2),{encoding:"utf8"})}({...vb(),eula:a})}else 2===r&&wb({eula:a});e.close()}}}async function hv(e=!1){const t=xb(),n=null!==t;let r=null,i=0;switch(n?!n||t.privateKey&&t.address?(r=await pv({walletAddress:t.address}),i=r?4:3):i=2:i=1,i){case 1:case 2:case 3:console.log(kb.USER_NO_REGISTERED),process.exit(1);break;case 4:e&&console.log(`You are logged in as: ${r?.name} - ${r?.email}`)}}L.config({path:process.cwd()+"/truebit.verify.env"}),U(!1);const mv=B(import.meta.url),gv=JSON.parse(r(a.dirname(mv.resolve("@truebit/cli"))+"/../package.json","utf8"));process.on("unhandledRejection",((e,t)=>{console.error(`Unhandled Rejection at: \n${o(t,void 0,100)}, \nreason: ${e}`)})),async function(){try{await fv()}catch(e){console.error(`${e}`),process.exit(1)}let t;await async function(e){if(!qc.satisfies(process.version,e)){const t=`Nodejs required version ${e} not satisfied with current version ${process.version}.`;console.log(t),process.exit(1)}}(gv.engines.node),Sb("blockchainEnv")&&(t=Sb("blockchainEnv"));const n=Sb("RPC_URL");n&&(process.env.RPC_URL=n);const r=new M;r.showSuggestionAfterError(!0),r.description(e.green(A.textSync("Truebit Verify\nCLI"))+"\nA CLI to interact with Truebit Verify node\nBy accessing and using the Protocol, you hereby agree to our Terms of Use and our Privacy Policy. Patents pending.\nTerms of Use: https://www.truebit.io/terms\nPrivacy Policy: https://www.truebit.io/privacy-policy").name("truebit").version(gv.version).helpOption("-h, --help","Display help for command"),r.command("setup").description("Setup generate a secret.json in your home directory with your information").summary("Initialize user profile configuration").action((async()=>{try{await async function(){console.log(N.bold("\nWelcome to Truebit Verify!"));const e=xb(),t=null!==e;if(!t||t&&(!e.privateKey||!e.address)){const e=z({input:process.stdin,output:process.stdout,terminal:!0});console.log(kb.SETUP_INTRODUCTION);let t="";for(;!cv(t);)t=(await e.question("Press [Y] to proceed or [N] to exit: ")).toUpperCase();e.close(),"N"==t&&(console.log(kb.SETUP_INTRODUCTION_NO_ACCEPTANCE),process.exit(1))}}(),await rv(),await dv()}catch(e){console.error(`${e}`),process.exit(1)}})),r.command("start").description("Executes a task within the context of Truebit Verify node. The task should be already uploaded to local-storage.").summary("Run a Truebit Task").argument("<taskId>","Id of the task").argument("<input>","Input for task execution").option("--update-config","Automatically update resource limits in config.json according to peak usage report").hook("preAction",(async()=>{try{await hv()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async(e,t,n)=>{try{await(async(e,t,n)=>{if(console.log("Executing the function Task"),!Jy(t))throw"Invalid task id";const r=await Tb(),i=await r.post("api/execution/",Ny({taskId:t,input:n})).catch(Ty),a=i.data.executionId;if(console.log(`Execution Id: ${a}`),i.data.payload)nv(e,i.data.payload);else{const t=setInterval((async()=>{const n=await r.get(`api/execution/${a}`);n.data&&"running"!=n.data.status&&(nv(e,n.data),clearInterval(t))}),1e3)}})(n,e,t)}catch(e){console.error(`Error: ${e}`)}})),r.command("deploy").description("Deploys and registers a new Truebit task specified by the --taskId parameter. Using the deploy command makes the Truebit task available for execution.").summary("Deploy and register a new Truebit Task").argument("<namespace>","Namespace to register the task in (lowercase)").argument("<taskName>","Name of the task (lowercase)").option("--taskId <taskId>","Id of the task <Required>").option("--meta <meta>","Meta information for the task (string between single quotes)").addOption(new T("--label <label>","Label for the task").hideHelp()).option("--norelay","Do not relay the transaction").hook("preAction",(async()=>{try{await hv()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async(t,n,r)=>{const i=$({text:"Deploying and registering the function task \n",stream:process.stdout}).start();try{if(Ay(t,"Namespace"),Ay(n,"TaskName"),r.label&&r.label.length>128)throw new Error("Label exceeds maximum length of 128 chars");if(!r.taskId)throw new Error("Task ID is required to register a task");const a=await tv(t,n,r.taskId,r.meta,r.norelay);let s=!1;r.label&&(s=await async function(e,t,n){const r=Ry(Sb("blockchainEnv")),i=await r.taskRegistry.getLatestVersion(e,t);return await r.taskRegistry.setTaskLabel(e,t,i,n)}(t,n,r.label)),i.stop(),a&&(console.log(e.green(`The function task has been deployed successfully.\nThe Task ${n} version '${a}' was registered successfully in namespace ${t}.`)),r.meta&&console.log(e.green(`Metadata associated to the task: ${r.meta}.`)),s&&console.log(e.green(`Label ${r.label} set successfully for task ${n} in namespace ${t}.`)))}catch(e){i.stop(),console.error(`${e}`)}i.clear()})),r.command("build").description("Compiles source code to obtain compiled and instrumented Truebit task and pushes it to the Truebit node.").summary("Create a Function Task").option("-l, --lang [programming-language]","Specify the programming language in which the task was developed").argument("<sourceCodePath>","Path of the task source code.").hook("preAction",(async()=>{try{await hv()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async(e,t)=>{try{t.lang=t.lang?t.lang:Sb("defaultLanguage");if(!Object.values(Rs).includes(t.lang))throw`Invalid language provided, the current options are: ${Object.values(Rs)}`;console.log("Building the function task");const n=await Py(t.lang,e||"./");t.lang!=Rs.JS&&t.lang!=Rs.PYTHON?await async function(e){try{const t=await Tb(),n=await t.post("api/instrumentation",Ny({taskId:`${e}`})).catch(Ty);if(!0===n.data.error?.status){if(!n.data.error.message)throw"Malformed instrumentation service error message";console.log(`Instrumentation failed: ${n.data.error?.message}`)}else{if(!n.data.payload||!n.data.payload.instrumentedTaskId)throw"Malformed instrumentation service success message";console.log("Your function task is ready."),console.log(`Use the following TaskId for execution or deployment:\n${n.data.payload.instrumentedTaskId}`)}}catch(e){throw console.error(e),e}}(n):(console.log("Your function task is ready."),console.log(`Use the following TaskId for execution or deployment:\n${n}`))}catch(e){console.error(`Error: ${e}`)}})),r.command("create-api").description("Create the Truebit API Task and upload the Manifest to the local storage. As a result, it returns the taskId").summary("Create an API Task").argument("<manifestPath>","Path of the manifest.").hook("preAction",(async()=>{try{await hv()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async e=>{try{console.log("Creating API task...");const t=await Py(Os.API,e||"./");console.log("Your API task is ready!"),console.log(`Use the following TaskId for execution or deployment: \n${t}`)}catch(e){console.error(`Error: ${e}`)}})),r.command("start-api").description("Start the Truebit API Task, verify with enforcer and request the api. As a result, it returns the API response").summary("Run an API Task").argument("<manifestPath>","Path of the manifest.").argument("<input>","Input request JSON file path").argument("[authType]",`Type of authentication needed for API task usage. One of: <${Object.values(Ky)}>`).argument("[authString]",'Auth string is a comma separated value that represents auth method.\n\n\tExamples:\r\n\t\tAWS_SIGNATURE = "accessKey:<accesskey>,secretKey:<secretkey>"\r\n\t\tBASIC_AUTH = "username:<username>,password:<password>"\r\n\t\tCUSTOM_HEADER = "<customheader>"').hook("preAction",(async()=>{try{await hv()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async(e,t,n,r)=>{try{console.log("Executing the API Task"),n&&r?await Zy(e,t,n,r):await Zy(e,t,null,"")}catch(e){console.error(`${e}`)}})),r.command("status").description("Retrieves the status of a given execution id.").summary("Get execution status").argument("<executionId>","Execution Id").hook("preAction",(async()=>{try{await hv()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async e=>{try{await async function(e){try{console.log("Fetching execution status...");const t=await Tb(),n=await t.get(`api/execution/${e}`).catch(Ty);if(n.data.message)throw n.data.message;console.log("Task execution status: ",n.data.status),n.data.output&&console.log("Task execution output: ",n.data.output)}catch(t){console.error(`Couldn't fetch execution status for executionId ${e}: ${t}`)}}(e)}catch(e){console.error(`Error: ${e}`)}})),r.command("api-auth").description("Specify authentication for a truebit api task").summary("Set API Task authentication").argument("<taskId>","Id of the task").argument("<authType>",`Type of authentication need for api task usage. One of: <${Object.values(Ky)}>`).argument("<authString>",'Auth string is a comma separated value that represent auth method.\n\n\tExamples:\r\n\t\tAWS_SIGNATURE = "accessKey:<accesskey>,secretKey:<secretkey>"\r\n\t\tBASIC_AUTH = "username:<username>,password:<password>"\r\n\t\tCUSTOM_HEADER = "<customheader>"').hook("preAction",(async()=>{try{await hv()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async(e,t,n)=>{try{const r=Sb("privateKey"),i=Sb("address");await iv(e,t,n,r,i)}catch(e){console.error(`Error: ${e}`)}}));const i=r.command("namespace").description("The namespace command helps you group and manage different tasks under a single name, like an umbrella.\nThis name, called a namespace, can be anything that represents your tasks, such as the name of your company. Each task you create will be associated with a namespace.").summary("Manage Namespace operations").hook("preAction",(async()=>{try{await hv()}catch(e){console.error(`${e}`),process.exit(1)}}));i.command("register").argument("<namespace>","Namespace to register").description("Register a new namespace. The user who calls this command will become the owner of the registered namespace. Each namespace can have only one owner. The owner can grant access to other users using the grant command.").summary("Register a new namespace").option("--norelay","Do not relay the transaction").action((async(n,r)=>{const i=$({text:`Registering namespace: ${e.cyan(n)} \n`,stream:process.stdout}).start();try{const a=await Qy(n,!1,r.norelay,t);i.stop(),a&&console.log(e.green(`Namespace ${n} registered successfully`))}catch(t){i.stop();const r=t.message,a=r.match(/execution reverted: "(.*?)" /)?.[1];a?console.error(`${e.red("ERROR:")} registering namespace -> ${e.yellow(n)}: ${a}`):console.error(`${e.red("ERROR:")} registering namespace -> ${e.yellow(n)}: ${r}`)}i.clear()})),i.command("transfer").argument("<namespace>","Namespace to transfer").argument("<address>","Address to transfer namespace to").description("Change the owner of a namespace. \nOnly the current owner can use this command to grant access.").summary("Transfer a namespace").action((async(n,r)=>{const i=$({text:`Transferring namespace: ${e.cyan(n)} to address: ${e.cyan(r)}`,stream:process.stdout}).start();try{Ay(n,"Namespace"),Oy(r);const a=Ry(t),s=await a.taskRegistry.transferTaskNamespace(n,r);i.stop(),s&&console.log(e.green(`Namespace ${n} transferred successfully to ${r}`))}catch(t){i.stop();const a=t.message,s=a.match(/execution reverted: "(.*?)" /)?.[1];s?console.error(`${e.red("ERROR:")} transferring namespace -> ${e.yellow(n)} to ${e.yellow(r)}: ${s}`):console.error(`${e.red("ERROR:")} transferring namespace -> ${e.yellow(n)} to ${e.yellow(r)}: ${a}`)}i.clear()})),i.command("grant").argument("<namespace>","Namespace to grant access to").argument("<address>","Address to grant access to").description("Give a user access to the namespace. \nOnly the current owner can use this command to grant access.").summary("Grant access to a namespace").action((async(n,r)=>{const i=$({text:`Granting access to namespace: ${e.cyan(n)} for address: ${e.cyan(r)}`,stream:process.stdout}).start();try{Ay(n,"Namespace"),Oy(r);const a=Ry(t),s=await a.taskRegistry.grantNamespaceAccess(n,r);i.stop(),s&&console.log(e.green(`Access to namespace ${n} granted successfully to ${r}`))}catch(t){i.stop();const a=t.message,s=a.match(/execution reverted: "(.*?)" /)?.[1];s?console.error(`${e.red("ERROR:")} granting access to namespace -> ${e.yellow(n)} for ${e.yellow(r)}: ${s}`):console.error(`${e.red("ERROR:")} granting access to namespace -> ${e.yellow(n)} for ${e.yellow(r)}: ${a}`)}i.clear()})),i.command("revoke").argument("<namespace>","Namespace to revoke access from").argument("<address>","Address to revoke access from").description("Take away a user's access to the namespace. \nOnly the current owner can use this command to revoke access.").summary("Revoke access to a namespace").action((async(n,r)=>{const i=$({text:`Revoking access to namespace: ${e.cyan(n)} from address: ${e.cyan(r)}`,stream:process.stdout}).start();try{Ay(n,"Namespace"),Oy(r);const a=Ry(t),s=await a.taskRegistry.revokeNamespaceAccess(n,r);i.stop(),s&&console.log(e.green(`Access to namespace ${n} revoked successfully from ${r}`))}catch(t){i.stop();const a=t.message,s=a.match(/execution reverted: "(.*?)" /)?.[1];s?console.error(`${e.red("ERROR:")} revoking access to namespace -> ${e.yellow(n)} from ${e.yellow(r)}: ${s}`):console.error(`${e.red("ERROR:")} revoking access to namespace -> ${e.yellow(n)} from ${e.yellow(r)}: ${a}`)}i.clear()}));const a=r.command("task").description("Manages tasks within a specified namespace, facilitating the organization, tracking, and management of tasks across different projects or domains. This command serves as a gateway to various task-related operations such as registration, modification, and querying, thereby enhancing project management and operational efficiency.").summary("Manage Task operations").hook("preAction",(async()=>{try{await hv()}catch(e){console.error(`${e}`),process.exit(1)}}));a.command("label").description("Set label for a task in a namespace").summary("Assign a label to a registered task.").argument("<namespace>","Namespace of the task").argument("<taskName>","Name of the task").option("--label <label>","Label for the task <Required>").option("--ver <version>","Version of the task <Required>").action((async(n,r,i)=>{const a=$({text:`Setting label: ${e.cyan(i.label)} for task: ${e.cyan(r)} in namespace: ${e.cyan(n)}`,stream:process.stdout}).start();try{Ay(n,"Namespace");const s=Ry(t);if(!i.label)throw new Error(`${e.red("ERROR:")} Label is required to set a label for a task. Check -h for help`);if(!i.ver)throw new Error(`${e.red("ERROR:")} Version is required to set a label for a task. Check -h for help`);const o=await s.taskRegistry.setTaskLabel(n,r,i.ver,i.label);a.stop(),a.clear(),o&&console.log(e.green(`Label ${i.label} set successfully for task ${r} in namespace ${n}`))}catch(t){a.stop(),a.clear();const n=t.message;console.error(n);const r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Setting label for task -> : ${r}`):console.error(`${e.red("ERROR:")} Setting label for task -> : ${n}`)}})),a.command("disable").description("Disable task in a namespace --ver <version> or --label <label> can be used to disable specific task ").summary("Disable a registered task.").argument("<namespace>","Namespace of the task").argument("<taskName>","Name of the task").option("--ver <version>","Version of the task to disable <Required>").option("--label <label>","Label for the task to disable <Required>").action((async(n,r,i)=>{const a=$({text:`Disabling task: ${e.cyan(r)} in namespace: ${e.cyan(n)}`,stream:process.stdout}).start();try{Ay(n,"Namespace");const s=Ry(t);let o;if(!i.ver&&!i.label)throw new Error(`${e.red("ERROR:")} Version or label is required to enable a task`);if(i.ver&&i.label)throw new Error(`${e.red("ERROR:")} Cannot provide both version and label`);if(i.label){const e=await s.taskRegistry.getTaskByLabel(n,r,i.label);return o=await s.taskRegistry.disableTask(n,r,e.version),a.stop(),void a.clear()}o=await s.taskRegistry.disableTask(n,r,i.ver),a.stop(),o&&console.log(e.green(`Task ${r} disabled successfully in namespace ${n}`))}catch(t){a.stop(),a.clear();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Disabling task -> : ${r}`):console.error(`${e.red("ERROR:")} Disabling task -> : ${n}`)}})),a.command("enable").description("Enable a task in a namespace --ver <version> or --label <label> can be used to enable specific task").summary("Enable a registered task.").argument("<namespace>","Namespace of the task").argument("<taskName>","Name of the task").option("--ver <version>","Version of the task to enable <Required>").option("--label <label>","Label for the task to enable <Required>").action((async(n,r,i)=>{const a=$({text:`Enabling task: ${e.cyan(r)} in namespace: ${e.cyan(n)}`,stream:process.stdout}).start();try{Ay(n,"Namespace");const s=Ry(t);let o;if(!i.ver&&!i.label)throw new Error(`${e.red("ERROR:")} Version or label is required to enable a task`);if(i.ver&&i.label)throw new Error(`${e.red("ERROR:")} Cannot provide both version and label`);if(i.label){const e=await s.taskRegistry.getTaskByLabel(n,r,i.label);return o=await s.taskRegistry.enableTask(n,r,e.version),a.stop(),void a.clear()}o=await s.taskRegistry.enableTask(n,r,i.ver),a.stop(),a.clear(),o&&console.log(e.green(`Task ${r} enabled successfully in namespace ${n}`))}catch(t){a.stop();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Enabling task -> : ${r}`):console.error(`${e.red("ERROR:")} Enabling task -> : ${n}`)}})),a.command("get-task").description("Get task information from a namespace and a taskName --ver or --label can be used to get specific task").summary("Retrieve information from a namespace and a taskName").argument("<namespace>","Namespace of the task").argument("<taskName>","Name of the task").option("--ver <version>","Version of the task <Optional>").option("--label <label>","Label for the task <Optional>").action((async(n,r,i)=>{const a=$({text:`Getting latest task: ${e.cyan(r)} in namespace: ${e.cyan(n)}`,stream:process.stdout}).start();try{Ay(n,"Namespace");const s=Ry(t);let o={meta:""};if(i.label&&i.ver)throw new Error(`${e.red("ERROR:")} Cannot have both version and label at the same time`);if(i.ver||i.label||(o=await s.taskRegistry.getTask(n,r)),!i.label&&i.ver&&(o=await s.taskRegistry.getTaskByVersion(n,r,i.ver)),i.label&&!i.ver&&(o=await s.taskRegistry.getTaskByLabel(n,r,i.label)),""!==o.meta){const e=JSON.parse(o.meta);o.meta=e}a.stop(),console.log(o)}catch(t){a.stop();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Getting task -> : ${r}`):console.error(`${e.red("ERROR:")} Getting task -> : ${n}`)}a.clear()}));const s=r.command("auth").description("The auth command is responsible for managing the authorization for task execution. It allows the namespace owner to grant or deny access to addresses, ensuring that only authorized individuals can execute specific tasks.").summary("Manage authorization operations").hook("preAction",(async()=>{try{await hv()}catch(e){console.error(`${e}`),process.exit(1)}}));s.command("grant").description("The auth grant command is responsible for granting access to a specific address within a namespace. The grantee will have the ability to execute the tasks stored within that namespace.").summary("Grant authorization to a grantee").argument("<namespace>","Namespace of the task").argument("<grantee>","Grantee to be authorized").action((async(n,r)=>{const i=$({text:`Granting authorization to ${e.cyan(r)} in namespace ${e.cyan(n)}`,stream:process.stdout}).start();try{Ay(n,"Namespace"),Oy(r);const a=Ry(t),s=await a.authorization.grantAuthorization(n,r);i.stop(),s&&console.log(e.green(`Authorization granted to ${r} in namespace ${n}`))}catch(t){i.stop(),i.clear();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Granting authorization -> : ${r}`):console.error(`${e.red("ERROR:")} Granting authorization -> : ${n}`)}})),s.command("revoke").description("The auth revoke command is responsible for revoking access from a specific address within a namespace. This command ensures that the specified address can no longer execute the tasks stored within that namespace.").summary("Revoke authorization from a grantee").argument("<namespace>","Namespace of the task").argument("<grantee>","Grantee to be unauthorized").action((async(n,r)=>{const i=$({text:`Revoking authorization from ${e.cyan(r)} in namespace ${e.cyan(n)}`,stream:process.stdout}).start();try{Ay(n,"Namespace");const a=Ry(t),s=await a.authorization.revokeAuthorization(n,r);i.stop(),s&&console.log(e.green(`Authorization revoked from ${r} in namespace ${n}`))}catch(t){i.stop(),i.clear();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Revoking authorization -> : ${r}`):console.error(`${e.red("ERROR:")} Revoking authorization -> : ${n}`)}i.clear()})),s.command("register").description("The auth register command is responsible for registering a specific API_KEY. Every execution made with this API_KEY will be charged to the user who registered it. This way, you can ensure that the user who registered the API_KEY is responsible for paying for all executions made with it.").summary("Register authorization with an API key hash").argument("<apiKey>","API key for authorization").option("--norelay","Do not relay the transaction").action((async(t,n)=>{const r=$({text:`Registering authorization with API key hash ${e.cyan(t)}`,stream:process.stdout}).start();try{let i;if(i=n.norelay?await async function(e,t=Sb("blockchainEnv")){Xy(e);const n=Ry(t),r=P.keccak256(P.toUtf8Bytes(e));return await n.authorization.registerAuthorization(r),r}(t):await av(t,!1),r.stop(),!i)throw Error("The API key could not been registered.");console.log(e.green(`Authorization registered with API key ${t} with hash -> ${i}`))}catch(t){r.stop(),r.clear();const n=t.message,i=n.match(/execution reverted: "(.*?)" /)?.[1];i?console.error(`${e.red("ERROR:")} Registering authorization -> : ${i}`):console.error(`${e.red("ERROR:")} Registering authorization -> : ${n}`)}r.clear()})),s.command("deregister").description('The auth deregister command will revoke access to a specific API_KEY. After deregistration, any execution attempt using this API_KEY will result in a "not authorized" message.').summary("Deregister authorization with an API key hash").argument("<apiKey>","API key hash for deregistration").action((async n=>{const r=$({text:`Deregistering authorization with API key ${e.cyan(n)}`,stream:process.stdout}).start();try{Xy(n);const i=P.keccak256(P.toUtf8Bytes(n)),a=Ry(t),s=await a.authorization.deRegisterAuthorization(i);r.stop(),s&&console.log(e.green(`Authorization deregistered with API key hash ${n} with hash -> ${i}`))}catch(t){r.stop(),r.clear();const n=t.message,i=n.match(/execution reverted: "(.*?)" /)?.[1];i?console.error(`${e.red("ERROR:")} Deregistering authorization -> : ${i}`):console.error(`${e.red("ERROR:")} Deregistering authorization -> : ${n}`)}r.clear()})),s.command("check-authorization").description("The auth check-authorization command verifies if a specific address has permission to execute tasks in a particular namespace.").summary("Check if a grantee is authorized").argument("<namespace>","Namespace of the task").argument("<grantee>","Grantee to check authorization for").action((async(n,r)=>{const i=$({text:`Checking authorization for ${e.cyan(r)} in namespace ${e.cyan(n)}`,stream:process.stdout}).start();try{Ay(n,"Namespace");const a=Ry(t),s=await a.authorization.isAuthorized(n,r);i.stop(),console.log(e.green(`Grantee ${r} is ${s?"authorized":"not authorized"} in namespace ${n}`))}catch(t){i.stop(),i.clear();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Checking authorization -> : ${r}`):console.error(`${e.red("ERROR:")} Checking authorization -> : ${n}`)}i.clear()})),s.command("get-payer").description("The auth get-payer command retrieves the payer address associated with a specific API_KEY.").summary("Get payer address from an API key hash").argument("<apiKey>","API key for payer address").action((async n=>{const r=$({text:`Getting payer address for API key hash ${e.cyan(n)}`,stream:process.stdout}).start();try{const i=Ry(t),a=P.keccak256(P.toUtf8Bytes(n)),s=await i.authorization.getPayerAddress(a);r.stop(),console.log(e.green(`Payer address for API key ${n} is ${s}`))}catch(t){r.stop(),r.clear();const n=t.message,i=n.match(/execution reverted: "(.*?)" /)?.[1];i?console.error(`${e.red("ERROR:")} Getting payer address -> : ${i}`):console.error(`${e.red("ERROR:")} Getting payer address -> : ${n}`)}r.clear()})),s.command("new-apikey").description("Generate a new Api Key to be used for execution payment. The Api Key is a unique identifier for the payer.").summary("Generate a new Api Key").action((()=>{const e=S();console.log(`Api Key: ${e}`)})),await r.parseAsync(process.argv)}().catch((e=>{console.error(e)}));
12
+ //# sourceMappingURL=index.mjs.map