@cline/core 0.0.95 → 0.2.0

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 (167) hide show
  1. package/dist/ClineCore.d.ts +6 -1
  2. package/dist/account/rpc.d.ts +3 -1
  3. package/dist/cline-core/runtime-services.d.ts +4 -2
  4. package/dist/cloud/controller.d.ts +5 -2
  5. package/dist/cloud/hub-client.d.ts +51 -0
  6. package/dist/cloud/hub-protocol.d.ts +18 -0
  7. package/dist/cloud/index.d.ts +2 -0
  8. package/dist/cloud/index.js +16 -16
  9. package/dist/cloud/types.d.ts +4 -1
  10. package/dist/extensions/context/compaction-shared.d.ts +1 -0
  11. package/dist/extensions/context/compaction.d.ts +7 -0
  12. package/dist/extensions/context/summarize-conversation.d.ts +7 -0
  13. package/dist/extensions/context/summary-generation.d.ts +14 -0
  14. package/dist/extensions/mcp/apps.d.ts +16 -0
  15. package/dist/extensions/mcp/client.d.ts +1 -0
  16. package/dist/extensions/mcp/index.d.ts +5 -1
  17. package/dist/extensions/mcp/manager.d.ts +2 -1
  18. package/dist/extensions/mcp/session-apps.d.ts +28 -0
  19. package/dist/extensions/mcp/types.d.ts +22 -0
  20. package/dist/extensions/plugin/plugin-command-origin.d.ts +8 -0
  21. package/dist/extensions/plugin/plugin-registry.d.ts +1 -0
  22. package/dist/extensions/plugin/plugin-runtime.d.ts +7 -0
  23. package/dist/hub/client/index.d.ts +6 -0
  24. package/dist/hub/client/managed-hub-build-watcher.d.ts +2 -0
  25. package/dist/hub/client/plugin-commands.d.ts +4 -0
  26. package/dist/hub/client/session-client.d.ts +2 -0
  27. package/dist/hub/daemon/entry.js +241 -228
  28. package/dist/hub/index.d.ts +1 -0
  29. package/dist/hub/index.js +231 -218
  30. package/dist/hub/runtime-host/hub-runtime-host.d.ts +6 -0
  31. package/dist/hub/server/cloud-session-service.d.ts +50 -0
  32. package/dist/hub/server/handlers/capability-handlers.d.ts +18 -1
  33. package/dist/hub/server/handlers/context.d.ts +13 -2
  34. package/dist/hub/server/handlers/mcp-apps-handlers.d.ts +5 -0
  35. package/dist/hub/server/hub-server-options.d.ts +3 -0
  36. package/dist/hub/server/hub-server-transport.d.ts +2 -0
  37. package/dist/index.d.ts +8 -4
  38. package/dist/index.js +278 -258
  39. package/dist/plugin-runtime/node_modules/@cline/agents/dist/index.js +76 -0
  40. package/dist/plugin-runtime/node_modules/@cline/agents/package.json +1 -0
  41. package/dist/plugin-runtime/node_modules/@cline/core/dist/ai-sdk-b1d8eb67.js +1 -0
  42. package/dist/plugin-runtime/node_modules/@cline/core/dist/anthropic-33qvrctr.js +1 -0
  43. package/dist/plugin-runtime/node_modules/@cline/core/dist/bedrock-paabhz8w.js +1 -0
  44. package/dist/plugin-runtime/node_modules/@cline/core/dist/cline-yhsfqcy1.js +1 -0
  45. package/dist/plugin-runtime/node_modules/@cline/core/dist/cloud/index.js +21 -0
  46. package/dist/plugin-runtime/node_modules/@cline/core/dist/community-gqgs7446.js +1 -0
  47. package/dist/plugin-runtime/node_modules/@cline/core/dist/foundation-models-embedding-model-strategy-SAVQFBF4-822304b0.js +1 -0
  48. package/dist/plugin-runtime/node_modules/@cline/core/dist/foundation-models-language-model-strategy-BPQO66W7-hky2m2yx.js +1 -0
  49. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-bsd-sqf1kd37.js +1 -0
  50. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-bsd-tx1kp6xn.js +1 -0
  51. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-darwin-6cpgjxme.js +2 -0
  52. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-darwin-fxchqbze.js +2 -0
  53. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-linux-m3bzwmzc.js +1 -0
  54. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-linux-pr9sb5fr.js +1 -0
  55. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-unsupported-nckraycx.js +1 -0
  56. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-unsupported-w91yq3tm.js +1 -0
  57. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-win-xdyxc2tf.js +1 -0
  58. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-win-yxsvs11a.js +1 -0
  59. package/dist/plugin-runtime/node_modules/@cline/core/dist/google-pgdk2dm9.js +1 -0
  60. package/dist/plugin-runtime/node_modules/@cline/core/dist/hub/daemon/entry.js +1160 -0
  61. package/dist/plugin-runtime/node_modules/@cline/core/dist/hub/index.js +1147 -0
  62. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-02jpyn9y.js +85 -0
  63. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-0cb4390m.js +137 -0
  64. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-0f8xrhgt.js +209 -0
  65. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-1f8vb421.js +2 -0
  66. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-28c7m0fv.js +16 -0
  67. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-2em3jg4q.js +1 -0
  68. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-4n1zpzbe.js +2 -0
  69. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-54eea0ex.js +2 -0
  70. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-5j92dtg5.js +16 -0
  71. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-6akf3a5d.js +2 -0
  72. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-6k6ep10s.js +136 -0
  73. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-71ym4q6s.js +2 -0
  74. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-91p1ghfk.js +14 -0
  75. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-9qkpjy7x.js +2 -0
  76. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-9swk4nej.js +3 -0
  77. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-aa2s5myc.js +1 -0
  78. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ae0ajw38.js +13 -0
  79. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bxvyzjhc.js +1 -0
  80. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bzy863k0.js +6 -0
  81. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-d96n0s70.js +20 -0
  82. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-dsd6vt8c.js +1 -0
  83. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-e2q4azd9.js +119 -0
  84. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-egd18jj2.js +4 -0
  85. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-eh83hr16.js +2 -0
  86. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ev9r2dy3.js +1204 -0
  87. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-f2mvvryf.js +190 -0
  88. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-h7gn5v3f.js +2 -0
  89. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-h7s1a560.js +12 -0
  90. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-hkhq3jtz.js +21 -0
  91. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-j8r18nfg.js +15 -0
  92. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-jhny555h.js +6 -0
  93. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-m1gpa2eg.js +146 -0
  94. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-m2ad6tgj.js +1 -0
  95. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-m7mks2jq.js +4 -0
  96. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-mcnngj50.js +62 -0
  97. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-n2srkkh0.js +39 -0
  98. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-nbs1tsny.js +142 -0
  99. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-nqjnz7m4.js +9 -0
  100. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-rmhzyxr8.js +3 -0
  101. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-rtzf3vvk.js +6 -0
  102. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-sw74pcm3.js +2 -0
  103. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-t3eanyjj.js +3 -0
  104. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-tseksj1v.js +1 -0
  105. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v0ctpcdr.js +12 -0
  106. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v4-dx8bd4wq.js +1 -0
  107. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v695918t.js +14 -0
  108. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v96yy1pw.js +1 -0
  109. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-vfm7r9wk.js +65 -0
  110. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-xecthgrg.js +9 -0
  111. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-xn1xhp06.js +9 -0
  112. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-yfdscfdx.js +1 -0
  113. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-yrnwqsdt.js +2 -0
  114. package/dist/plugin-runtime/node_modules/@cline/core/dist/index.js +1 -0
  115. package/dist/plugin-runtime/node_modules/@cline/core/dist/jiti-static-3mgy2y9y.js +473 -0
  116. package/dist/plugin-runtime/node_modules/@cline/core/dist/jiti-w1xrs0vd.js +1 -0
  117. package/dist/plugin-runtime/node_modules/@cline/core/dist/langfuse-stream-telemetry-9tppg77c.js +1 -0
  118. package/dist/plugin-runtime/node_modules/@cline/core/dist/langfuse-telemetry-y658kpzy.js +1 -0
  119. package/dist/plugin-runtime/node_modules/@cline/core/dist/mistral-cmhqd91b.js +1 -0
  120. package/dist/plugin-runtime/node_modules/@cline/core/dist/multipart-parser-qkjjf8mm.js +2 -0
  121. package/dist/plugin-runtime/node_modules/@cline/core/dist/ollama-8z6y9d1h.js +1 -0
  122. package/dist/plugin-runtime/node_modules/@cline/core/dist/openai-cfmja1ez.js +1 -0
  123. package/dist/plugin-runtime/node_modules/@cline/core/dist/openai-compatible-1t7n5sxj.js +1 -0
  124. package/dist/plugin-runtime/node_modules/@cline/core/dist/orchestration-embedding-model-strategy-GT27AFII-k6yqgnyd.js +1 -0
  125. package/dist/plugin-runtime/node_modules/@cline/core/dist/orchestration-language-model-strategy-YEQPUCOT-6rdyebbq.js +1 -0
  126. package/dist/plugin-runtime/node_modules/@cline/core/dist/services/feature-flags/posthog.js +2 -0
  127. package/dist/plugin-runtime/node_modules/@cline/core/dist/services/telemetry/index.js +1 -0
  128. package/dist/plugin-runtime/node_modules/@cline/core/dist/token-1h068py9.js +1 -0
  129. package/dist/plugin-runtime/node_modules/@cline/core/dist/token-util-7jchft51.js +1 -0
  130. package/dist/plugin-runtime/node_modules/@cline/core/dist/vertex-qfxfsrn4.js +1 -0
  131. package/dist/plugin-runtime/node_modules/@cline/core/package.json +1 -0
  132. package/dist/plugin-runtime/node_modules/@cline/llms/dist/index.browser.js +16 -0
  133. package/dist/plugin-runtime/node_modules/@cline/llms/dist/index.js +1 -0
  134. package/dist/plugin-runtime/node_modules/@cline/llms/package.json +1 -0
  135. package/dist/plugin-runtime/node_modules/@cline/sdk/dist/index.js +1 -0
  136. package/dist/plugin-runtime/node_modules/@cline/sdk/package.json +1 -0
  137. package/dist/plugin-runtime/node_modules/@cline/shared/dist/automation/index.js +57 -0
  138. package/dist/plugin-runtime/node_modules/@cline/shared/dist/db/index.js +127 -0
  139. package/dist/plugin-runtime/node_modules/@cline/shared/dist/index.browser.js +110 -0
  140. package/dist/plugin-runtime/node_modules/@cline/shared/dist/index.js +1 -0
  141. package/dist/plugin-runtime/node_modules/@cline/shared/dist/node.js +1 -0
  142. package/dist/plugin-runtime/node_modules/@cline/shared/dist/remote-config/index.js +68 -0
  143. package/dist/plugin-runtime/node_modules/@cline/shared/dist/storage/index.js +1 -0
  144. package/dist/plugin-runtime/node_modules/@cline/shared/dist/types/index.js +1 -0
  145. package/dist/plugin-runtime/node_modules/@cline/shared/package.json +1 -0
  146. package/dist/plugin-runtime/package.json +1 -0
  147. package/dist/{extensions → plugin-runtime}/plugin-sandbox-bootstrap.js +129 -129
  148. package/dist/remote/remote-environments.d.ts +1 -0
  149. package/dist/runtime/config/agent-runtime-config-builder.d.ts +2 -0
  150. package/dist/runtime/host/local-runtime-host.d.ts +10 -0
  151. package/dist/runtime/host/runtime-host.d.ts +6 -0
  152. package/dist/runtime/orchestration/runtime-oauth-token-manager.d.ts +3 -0
  153. package/dist/runtime/orchestration/session-runtime-orchestrator.d.ts +10 -1
  154. package/dist/runtime/orchestration/session-runtime.d.ts +2 -0
  155. package/dist/runtime/tools/subprocess-sandbox.d.ts +22 -0
  156. package/dist/services/llms/cline-recommended-models.d.ts +2 -0
  157. package/dist/services/local-runtime-bootstrap.d.ts +1 -0
  158. package/dist/services/plugin-command-api.d.ts +47 -0
  159. package/dist/services/plugin-commands.d.ts +25 -27
  160. package/dist/services/skills-cli.d.ts +2 -0
  161. package/dist/services/telemetry/core-events.d.ts +26 -0
  162. package/dist/services/telemetry/index.js +1 -1
  163. package/dist/services/telemetry/run-health.d.ts +40 -0
  164. package/dist/services/telemetry/stall-signals.d.ts +12 -0
  165. package/dist/types/config.d.ts +1 -0
  166. package/dist/types/session.d.ts +7 -0
  167. package/package.json +6 -5
@@ -0,0 +1,209 @@
1
+ import{X}from"./index-0cb4390m.js";import{Sm,Tt}from"./index-jhny555h.js";import{hc,gc}from"./index-m7mks2jq.js";import{N,gt,St,ve,b,u,l}from"./index-6k6ep10s.js";import{v,i,c,Pt,Fr,_e,T,na,Xm,g,Tl,_l,Il,Ay,ce,jr,wc,Tp,_p,Zm,kc,Ip,Sp,Sl,Ep,Rp,Pp,Lp,Bp,Mi,tn,Up,e,n,r,m,t,p,d,s,a,Y}from"./index-mcnngj50.js";var Sd=i(function(Qz){Object.defineProperty(Qz,"__esModule",{value:!0});Qz.flatten=void 0;Qz.flat=x$;Qz.unique=_$;Qz.last=z$;Qz.first=C$;Qz.splitInChunks=w$;Qz.transformVariadicArgumentToArray=S$;Qz.zip=E$;Qz.partition=k$;Qz.filterDuplicates=Xz;Qz.filterDuplicatesRight=O$;function x$(o){return o.reduce((f,h)=>[...f,...h],[])}function _$(o){return Array.from(new Set(o))}function z$(o){return o.length?o[o.length-1]:void 0}function C$(o){return o[0]}function w$(o,f){let h=[];if(o)for(let y=0;y<o.length;y+=f)h.push(o.slice(y,y+f));return h}function S$(o,f){if(Array.isArray(o))return[...o,...f];return o?[o,...f]:[...f]}var T$=(o)=>{let f=[],h=[...o];while(h.length>0){let y=h.pop();if(!Array.isArray(y))f.push(y);else h.push(...y)}return f.reverse()};Qz.flatten=T$;function E$(o,f){return(o.length>f.length?o:f).reduce((y,x,_)=>{let z=[];if(o.length>_)z.push(o[_]);if(f.length>_)z.push(f[_]);return[...y,...z]},[])}function k$(o,f){return o.reduce(([h,y],x)=>f(x)?[[...h,x],y]:[h,[...y,x]],[[],[]])}function Xz(o,f=(h,y)=>h===y){return o.filter((h,y)=>!o.slice(0,y).find((x)=>f(h,x)))}function O$(o,f=(h,y)=>h===y){return Xz(o.reverse(),f).reverse()}});var og=i(function(o1){Object.defineProperty(o1,"__esModule",{value:!0});o1.encodeBase64=q$;o1.trimLeft=t1;o1.trimRight=r1;o1.trim=F$;o1.removeFileExtension=U$;function q$(o){return Buffer.from(o).toString("base64")}function t1(o){let f=o.split(`
2
+ `),h=f[0].trimStart();if(!h)f.shift();else f[0]=h;return f.join(`
3
+ `)}function r1(o){let f=o.split(`
4
+ `),h=f[f.length-1].trimEnd();if(!h)f.pop();else f[f.length-1]=h;return f.join(`
5
+ `)}function F$(o){return r1(t1(o))}function U$(o){return o.includes(".")?o.split(".").slice(0,-1).join("."):o}});var i1=i(function(n1){Object.defineProperty(n1,"__esModule",{value:!0});n1.codeBlock=Z$;var W$=Sd(),J$=og();function Z$(o,...f){let h=o.slice(0,-1).map((z)=>{let C=Y$(z);return C.length===z.length?z:`${C}
6
+ `});h.push(o[o.length-1]);let y=o.slice(0,-1).map((z)=>{let C=z.split(`
7
+ `).pop();return!C.trim()?C:""}),x=f.map((z,C)=>(""+z).split(`
8
+ `).map((w)=>y[C]+w).join(`
9
+ `)),_=W$.zip(h,x);return J$.trim(_.join(""))}function Y$(o){let f=o.split(`
10
+ `);if(!f[f.length-1].trim())f=f.slice(0,-1);return f.join(`
11
+ `)}});var ho=i(function(UOe,s1){class ng extends Error{constructor(o){super(`Format functions must be synchronous taking a two arguments: (info, opts)
12
+ Found: ${o.toString().split(`
13
+ `)[0]}
14
+ `);Error.captureStackTrace(this,ng)}}s1.exports=(o)=>{if(o.length>2)throw new ng(o);function f(y={}){this.options=y}f.prototype.transform=o;function h(y){return new f(y)}return h.Format=f,h}});var u1=i(function($Oe,l1){var c1={};l1.exports=c1;var a1={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(a1).forEach(function(o){var f=a1[o],h=c1[o]=[];h.open="\x1B["+f[0]+"m",h.close="\x1B["+f[1]+"m"})});var p1=i(function(VOe,d1){d1.exports=function(o,f){f=f||process.argv||[];var h=f.indexOf("--"),y=/^-{1,2}/.test(o)?"":"--",x=f.indexOf(y+o);return x!==-1&&(h===-1?!0:x<h)}});var h1=i(function(HOe,f1){var Q$=c("os"),rn=p1(),Qr=process.env,ga=void 0;if(rn("no-color")||rn("no-colors")||rn("color=false"))ga=!1;else if(rn("color")||rn("colors")||rn("color=true")||rn("color=always"))ga=!0;if("FORCE_COLOR"in Qr)ga=Qr.FORCE_COLOR.length===0||parseInt(Qr.FORCE_COLOR,10)!==0;function eV(o){if(o===0)return!1;return{level:o,hasBasic:!0,has256:o>=2,has16m:o>=3}}function tV(o){if(ga===!1)return 0;if(rn("color=16m")||rn("color=full")||rn("color=truecolor"))return 3;if(rn("color=256"))return 2;if(o&&!o.isTTY&&ga!==!0)return 0;var f=ga?1:0;if(process.platform==="win32"){var h=Q$.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(h[0])>=10&&Number(h[2])>=10586)return Number(h[2])>=14931?3:2;return 1}if("CI"in Qr){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(x){return x in Qr})||Qr.CI_NAME==="codeship")return 1;return f}if("TEAMCITY_VERSION"in Qr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Qr.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in Qr){var y=parseInt((Qr.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Qr.TERM_PROGRAM){case"iTerm.app":return y>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(Qr.TERM))return 2;if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(Qr.TERM))return 1;if("COLORTERM"in Qr)return 1;if(Qr.TERM==="dumb")return f;return f}function ig(o){var f=tV(o);return eV(f)}f1.exports={supportsColor:ig,stdout:ig(process.stdout),stderr:ig(process.stderr)}});var g1=i(function(GOe,m1){m1.exports=function(f,h){var y="";f=f||"Run the trap, drop the bass",f=f.split("");var x={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 f.forEach(function(_){_=_.toLowerCase();var z=x[_]||[" "],C=Math.floor(Math.random()*z.length);if(typeof x[_]<"u")y+=x[_][C];else y+=_}),y}});var b1=i(function(KOe,y1){y1.exports=function(f,h){f=f||" he is here ";var y={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},x=[].concat(y.up,y.down,y.mid);function _(w){var S=Math.floor(Math.random()*w);return S}function z(w){var S=!1;return x.filter(function(E){S=E===w}),S}function C(w,S){var E="",k,O;S=S||{},S.up=typeof S.up<"u"?S.up:!0,S.mid=typeof S.mid<"u"?S.mid:!0,S.down=typeof S.down<"u"?S.down:!0,S.size=typeof S.size<"u"?S.size:"maxi",w=w.split("");for(O in w){if(z(O))continue;switch(E=E+w[O],k={up:0,down:0,mid:0},S.size){case"mini":k.up=_(8),k.mid=_(2),k.down=_(8);break;case"maxi":k.up=_(16)+3,k.mid=_(4)+1,k.down=_(64)+3;break;default:k.up=_(8)+1,k.mid=_(6)/2,k.down=_(8)+1;break}var R=["up","mid","down"];for(var I in R){var A=R[I];for(var M=0;M<=k[A];M++)if(S[A])E=E+y[A][_(y[A].length)]}}return E}return C(f,h)}});var x1=i(function(WOe,v1){v1.exports=function(o){return function(f,h,y){if(f===" ")return f;switch(h%3){case 0:return o.red(f);case 1:return o.white(f);case 2:return o.blue(f)}}}});var z1=i(function(JOe,_1){_1.exports=function(o){return function(f,h,y){return h%2===0?f:o.inverse(f)}}});var w1=i(function(ZOe,C1){C1.exports=function(o){var f=["red","yellow","green","blue","magenta"];return function(h,y,x){if(h===" ")return h;else return o[f[y++%f.length]](h)}}});var T1=i(function(YOe,S1){S1.exports=function(o){var f=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(h,y,x){return h===" "?h:o[f[Math.round(Math.random()*(f.length-2))]](h)}}});var R1=i(function(QOe,I1){var tt={};I1.exports=tt;tt.themes={};var rV=c("util"),ss=tt.styles=u1(),E1=Object.defineProperties,oV=new RegExp(/[\r\n]+/g);tt.supportsColor=h1().supportsColor;if(typeof tt.enabled>"u")tt.enabled=tt.supportsColor()!==!1;tt.enable=function(){tt.enabled=!0};tt.disable=function(){tt.enabled=!1};tt.stripColors=tt.strip=function(o){return(""+o).replace(/\x1B\[\d+m/g,"")};var XOe=tt.stylize=function(f,h){if(!tt.enabled)return f+"";var y=ss[h];if(!y&&h in tt)return tt[h](f);return y.open+f+y.close},nV=/[|\\{}()[\]^$+*?.]/g,iV=function(o){if(typeof o!=="string")throw TypeError("Expected a string");return o.replace(nV,"\\$&")};function k1(o){var f=function h(){return aV.apply(h,arguments)};return f._styles=o,f.__proto__=sV,f}var O1=function(){var o={};return ss.grey=ss.gray,Object.keys(ss).forEach(function(f){ss[f].closeRe=new RegExp(iV(ss[f].close),"g"),o[f]={get:function(){return k1(this._styles.concat(f))}}}),o}(),sV=E1(function(){},O1);function aV(){var o=Array.prototype.slice.call(arguments),f=o.map(function(z){if(z!=null&&z.constructor===String)return z;else return rV.inspect(z)}).join(" ");if(!tt.enabled||!f)return f;var h=f.indexOf(`
15
+ `)!=-1,y=this._styles,x=y.length;while(x--){var _=ss[y[x]];if(f=_.open+f.replace(_.closeRe,_.open)+_.close,h)f=f.replace(oV,function(z){return _.close+z+_.open})}return f}tt.setTheme=function(o){if(typeof o==="string"){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'));");return}for(var f in o)(function(h){tt[h]=function(y){if(typeof o[h]==="object"){var x=y;for(var _ in o[h])x=tt[o[h][_]](x);return x}return tt[o[h]](y)}})(f)};function cV(){var o={};return Object.keys(O1).forEach(function(f){o[f]={get:function(){return k1([f])}}}),o}var lV=function(f,h){var y=h.split("");return y=y.map(f),y.join("")};tt.trap=g1();tt.zalgo=b1();tt.maps={};tt.maps.america=x1()(tt);tt.maps.zebra=z1()(tt);tt.maps.rainbow=w1()(tt);tt.maps.random=T1()(tt);for(sg in tt.maps)(function(o){tt[o]=function(f){return lV(tt.maps[o],f)}})(sg);var sg;E1(tt,cV())});var ag=i(function(eIe,A1){var uV=R1();A1.exports=uV});var P1=i(function(dV){dV.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};dV.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}});var B1=i(function(hV){hV.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};hV.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}});var D1=i(function(yV){yV.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};yV.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}});var L1=i(function(Td){Object.defineProperty(Td,"cli",{value:P1()});Object.defineProperty(Td,"npm",{value:B1()});Object.defineProperty(Td,"syslog",{value:D1()})});var lr=i(function($c){Object.defineProperty($c,"LEVEL",{value:Symbol.for("level")});Object.defineProperty($c,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty($c,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty($c,"configs",{value:L1()})});var kd=i(function(sIe,Ed){var ug=ag(),{LEVEL:cg,MESSAGE:lg}=lr();ug.enabled=!0;var N1=/\s+/;class on{constructor(o={}){if(o.colors)this.addColors(o.colors);this.options=o}static addColors(o){let f=Object.keys(o).reduce((h,y)=>(h[y]=N1.test(o[y])?o[y].split(N1):o[y],h),{});return on.allColors=Object.assign({},on.allColors||{},f),on.allColors}addColors(o){return on.addColors(o)}colorize(o,f,h){if(typeof h>"u")h=f;if(!Array.isArray(on.allColors[o]))return ug[on.allColors[o]](h);for(let y=0,x=on.allColors[o].length;y<x;y++)h=ug[on.allColors[o][y]](h);return h}transform(o,f){if(f.all&&typeof o[lg]==="string")o[lg]=this.colorize(o[cg],o.level,o[lg]);if(f.level||f.all||!f.message)o.level=this.colorize(o[cg],o.level);if(f.all||f.message)o.message=this.colorize(o[cg],o.level,o.message);return o}}Ed.exports=(o)=>new on(o);Ed.exports.Colorizer=Ed.exports.Format=on});var M1=i(function(aIe,j1){var{Colorizer:xV}=kd();j1.exports=(o)=>(xV.addColors(o.colors||o),o)});var F1=i(function(cIe,q1){var _V=ho();q1.exports=_V((o)=>(o.message=` ${o.message}`,o))});var V1=i(function(lIe,$1){var zV=ho(),{LEVEL:U1,MESSAGE:dg}=lr();$1.exports=zV((o,{stack:f,cause:h})=>{if(o instanceof Error){let x=Object.assign({},o,{level:o.level,[U1]:o[U1]||o.level,message:o.message,[dg]:o[dg]||o.message});if(f)x.stack=o.stack;if(h)x.cause=o.cause;return x}if(!(o.message instanceof Error))return o;let y=o.message;if(Object.assign(o,y),o.message=y.message,o[dg]=y.message,f)o.stack=y.stack;if(h)o.cause=y.cause;return o})});var fg=i(function(uIe,Od){var{configs:CV,LEVEL:H1,MESSAGE:pg}=lr();class ya{constructor(o={levels:CV.npm.levels}){this.paddings=ya.paddingForLevels(o.levels,o.filler),this.options=o}static getLongestLevel(o){let f=Object.keys(o).map((h)=>h.length);return Math.max(...f)}static paddingForLevel(o,f,h){let y=h+1-o.length,x=Math.floor(y/f.length);return`${f}${f.repeat(x)}`.slice(0,y)}static paddingForLevels(o,f=" "){let h=ya.getLongestLevel(o);return Object.keys(o).reduce((y,x)=>(y[x]=ya.paddingForLevel(x,f,h),y),{})}transform(o,f){if(o.message=`${this.paddings[o[H1]]}${o.message}`,o[pg])o[pg]=`${this.paddings[o[H1]]}${o[pg]}`;return o}}Od.exports=(o)=>new ya(o);Od.exports.Padder=Od.exports.Format=ya});var G1=i(function(dIe,mg){var{Colorizer:wV}=kd(),{Padder:SV}=fg(),{configs:TV,MESSAGE:EV}=lr();class hg{constructor(o={}){if(!o.levels)o.levels=TV.cli.levels;this.colorizer=new wV(o),this.padder=new SV(o),this.options=o}transform(o,f){return this.colorizer.transform(this.padder.transform(o,f),f),o[EV]=`${o.level}:${o.message}`,o}}mg.exports=(o)=>new hg(o);mg.exports.Format=hg});var W1=i(function(pIe,gg){var kV=ho();function K1(o){if(!o.every(OV))return;return(f)=>{let h=f;for(let y=0;y<o.length;y++)if(h=o[y].transform(h,o[y].options),!h)return!1;return h}}function OV(o){if(typeof o.transform!=="function")throw Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join(`
16
+ `));return!0}gg.exports=(...o)=>{let f=kV(K1(o)),h=f();return h.Format=f.Format,h};gg.exports.cascade=K1});var ba=i(function(fIe,Y1){var{hasOwnProperty:Vc}=Object.prototype,cs=vg();cs.configure=vg;cs.stringify=cs;cs.default=cs;fIe.stringify=cs;fIe.configure=vg;Y1.exports=cs;var IV=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function hi(o){if(o.length<5000&&!IV.test(o))return`"${o}"`;return JSON.stringify(o)}function yg(o,f){if(o.length>200||f)return o.sort(f);for(let h=1;h<o.length;h++){let y=o[h],x=h;while(x!==0&&o[x-1]>y)o[x]=o[x-1],x--;o[x]=y}return o}var RV=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function bg(o){return RV.call(o)!==void 0&&o.length!==0}function J1(o,f,h){if(o.length<h)h=o.length;let y=f===","?"":" ",x=`"0":${y}${o[0]}`;for(let _=1;_<h;_++)x+=`${f}"${_}":${y}${o[_]}`;return x}function AV(o){if(Vc.call(o,"circularValue")){let f=o.circularValue;if(typeof f==="string")return`"${f}"`;if(f==null)return f;if(f===Error||f===TypeError)return{toString(){throw TypeError("Converting circular structure to JSON")}};throw TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function PV(o){let f;if(Vc.call(o,"deterministic")){if(f=o.deterministic,typeof f!=="boolean"&&typeof f!=="function")throw TypeError('The "deterministic" argument must be of type boolean or comparator function')}return f===void 0?!0:f}function BV(o,f){let h;if(Vc.call(o,f)){if(h=o[f],typeof h!=="boolean")throw TypeError(`The "${f}" argument must be of type boolean`)}return h===void 0?!0:h}function Z1(o,f){let h;if(Vc.call(o,f)){if(h=o[f],typeof h!=="number")throw TypeError(`The "${f}" argument must be of type number`);if(!Number.isInteger(h))throw TypeError(`The "${f}" argument must be an integer`);if(h<1)throw RangeError(`The "${f}" argument must be >= 1`)}return h===void 0?1/0:h}function as(o){if(o===1)return"1 item";return`${o} items`}function LV(o){let f=new Set;for(let h of o)if(typeof h==="string"||typeof h==="number")f.add(String(h));return f}function NV(o){if(Vc.call(o,"strict")){let f=o.strict;if(typeof f!=="boolean")throw TypeError('The "strict" argument must be of type boolean');if(f)return(h)=>{let y=`Object can not safely be stringified. Received type ${typeof h}`;if(typeof h!=="function")y+=` (${h.toString()})`;throw Error(y)}}}function vg(o){o={...o};let f=NV(o);if(f){if(o.bigint===void 0)o.bigint=!1;if(!("circularValue"in o))o.circularValue=Error}let h=AV(o),y=BV(o,"bigint"),x=PV(o),_=typeof x==="function"?x:void 0,z=Z1(o,"maximumDepth"),C=Z1(o,"maximumBreadth");function w(R,I,A,M,D,U){let F=I[R];if(typeof F==="object"&&F!==null&&typeof F.toJSON==="function")F=F.toJSON(R);switch(F=M.call(I,R,F),typeof F){case"string":return hi(F);case"object":{if(F===null)return"null";if(A.indexOf(F)!==-1)return h;let J="",Q=",",te=U;if(Array.isArray(F)){if(F.length===0)return"[]";if(z<A.length+1)return'"[Array]"';if(A.push(F),D!=="")U+=D,J+=`
17
+ ${U}`,Q=`,
18
+ ${U}`;let Ae=Math.min(F.length,C),We=0;for(;We<Ae-1;We++){let De=w(String(We),F,A,M,D,U);J+=De!==void 0?De:"null",J+=Q}let $e=w(String(We),F,A,M,D,U);if(J+=$e!==void 0?$e:"null",F.length-1>C){let De=F.length-C-1;J+=`${Q}"... ${as(De)} not stringified"`}if(D!=="")J+=`
19
+ ${te}`;return A.pop(),`[${J}]`}let le=Object.keys(F),he=le.length;if(he===0)return"{}";if(z<A.length+1)return'"[Object]"';let xe="",Re="";if(D!=="")U+=D,Q=`,
20
+ ${U}`,xe=" ";let me=Math.min(he,C);if(x&&!bg(F))le=yg(le,_);A.push(F);for(let Ae=0;Ae<me;Ae++){let We=le[Ae],$e=w(We,F,A,M,D,U);if($e!==void 0)J+=`${Re}${hi(We)}:${xe}${$e}`,Re=Q}if(he>C){let Ae=he-C;J+=`${Re}"...":${xe}"${as(Ae)} not stringified"`,Re=Q}if(D!==""&&Re.length>1)J=`
21
+ ${U}${J}
22
+ ${te}`;return A.pop(),`{${J}}`}case"number":return isFinite(F)?String(F):f?f(F):"null";case"boolean":return F===!0?"true":"false";case"undefined":return;case"bigint":if(y)return String(F);default:return f?f(F):void 0}}function S(R,I,A,M,D,U){if(typeof I==="object"&&I!==null&&typeof I.toJSON==="function")I=I.toJSON(R);switch(typeof I){case"string":return hi(I);case"object":{if(I===null)return"null";if(A.indexOf(I)!==-1)return h;let F=U,J="",Q=",";if(Array.isArray(I)){if(I.length===0)return"[]";if(z<A.length+1)return'"[Array]"';if(A.push(I),D!=="")U+=D,J+=`
23
+ ${U}`,Q=`,
24
+ ${U}`;let he=Math.min(I.length,C),xe=0;for(;xe<he-1;xe++){let me=S(String(xe),I[xe],A,M,D,U);J+=me!==void 0?me:"null",J+=Q}let Re=S(String(xe),I[xe],A,M,D,U);if(J+=Re!==void 0?Re:"null",I.length-1>C){let me=I.length-C-1;J+=`${Q}"... ${as(me)} not stringified"`}if(D!=="")J+=`
25
+ ${F}`;return A.pop(),`[${J}]`}A.push(I);let te="";if(D!=="")U+=D,Q=`,
26
+ ${U}`,te=" ";let le="";for(let he of M){let xe=S(he,I[he],A,M,D,U);if(xe!==void 0)J+=`${le}${hi(he)}:${te}${xe}`,le=Q}if(D!==""&&le.length>1)J=`
27
+ ${U}${J}
28
+ ${F}`;return A.pop(),`{${J}}`}case"number":return isFinite(I)?String(I):f?f(I):"null";case"boolean":return I===!0?"true":"false";case"undefined":return;case"bigint":if(y)return String(I);default:return f?f(I):void 0}}function E(R,I,A,M,D){switch(typeof I){case"string":return hi(I);case"object":{if(I===null)return"null";if(typeof I.toJSON==="function"){if(I=I.toJSON(R),typeof I!=="object")return E(R,I,A,M,D);if(I===null)return"null"}if(A.indexOf(I)!==-1)return h;let U=D;if(Array.isArray(I)){if(I.length===0)return"[]";if(z<A.length+1)return'"[Array]"';A.push(I),D+=M;let xe=`
29
+ ${D}`,Re=`,
30
+ ${D}`,me=Math.min(I.length,C),Ae=0;for(;Ae<me-1;Ae++){let $e=E(String(Ae),I[Ae],A,M,D);xe+=$e!==void 0?$e:"null",xe+=Re}let We=E(String(Ae),I[Ae],A,M,D);if(xe+=We!==void 0?We:"null",I.length-1>C){let $e=I.length-C-1;xe+=`${Re}"... ${as($e)} not stringified"`}return xe+=`
31
+ ${U}`,A.pop(),`[${xe}]`}let F=Object.keys(I),J=F.length;if(J===0)return"{}";if(z<A.length+1)return'"[Object]"';D+=M;let Q=`,
32
+ ${D}`,te="",le="",he=Math.min(J,C);if(bg(I))te+=J1(I,Q,C),F=F.slice(I.length),he-=I.length,le=Q;if(x)F=yg(F,_);A.push(I);for(let xe=0;xe<he;xe++){let Re=F[xe],me=E(Re,I[Re],A,M,D);if(me!==void 0)te+=`${le}${hi(Re)}: ${me}`,le=Q}if(J>C){let xe=J-C;te+=`${le}"...": "${as(xe)} not stringified"`,le=Q}if(le!=="")te=`
33
+ ${D}${te}
34
+ ${U}`;return A.pop(),`{${te}}`}case"number":return isFinite(I)?String(I):f?f(I):"null";case"boolean":return I===!0?"true":"false";case"undefined":return;case"bigint":if(y)return String(I);default:return f?f(I):void 0}}function k(R,I,A){switch(typeof I){case"string":return hi(I);case"object":{if(I===null)return"null";if(typeof I.toJSON==="function"){if(I=I.toJSON(R),typeof I!=="object")return k(R,I,A);if(I===null)return"null"}if(A.indexOf(I)!==-1)return h;let M="",D=I.length!==void 0;if(D&&Array.isArray(I)){if(I.length===0)return"[]";if(z<A.length+1)return'"[Array]"';A.push(I);let te=Math.min(I.length,C),le=0;for(;le<te-1;le++){let xe=k(String(le),I[le],A);M+=xe!==void 0?xe:"null",M+=","}let he=k(String(le),I[le],A);if(M+=he!==void 0?he:"null",I.length-1>C){let xe=I.length-C-1;M+=`,"... ${as(xe)} not stringified"`}return A.pop(),`[${M}]`}let U=Object.keys(I),F=U.length;if(F===0)return"{}";if(z<A.length+1)return'"[Object]"';let J="",Q=Math.min(F,C);if(D&&bg(I))M+=J1(I,",",C),U=U.slice(I.length),Q-=I.length,J=",";if(x)U=yg(U,_);A.push(I);for(let te=0;te<Q;te++){let le=U[te],he=k(le,I[le],A);if(he!==void 0)M+=`${J}${hi(le)}:${he}`,J=","}if(F>C){let te=F-C;M+=`${J}"...":"${as(te)} not stringified"`}return A.pop(),`{${M}}`}case"number":return isFinite(I)?String(I):f?f(I):"null";case"boolean":return I===!0?"true":"false";case"undefined":return;case"bigint":if(y)return String(I);default:return f?f(I):void 0}}function O(R,I,A){if(arguments.length>1){let M="";if(typeof A==="number")M=" ".repeat(Math.min(A,10));else if(typeof A==="string")M=A.slice(0,10);if(I!=null){if(typeof I==="function")return w("",{"":R},[],I,M,"");if(Array.isArray(I))return S("",R,[],LV(I),M,"")}if(M.length!==0)return E("",R,[],M,"")}return k("",R,[])}return O}});var xg=i(function(hIe,X1){var qV=ho(),{MESSAGE:FV}=lr(),UV=ba();function $V(o,f){if(typeof f==="bigint")return f.toString();return f}X1.exports=qV((o,f)=>{let h=UV.configure(f);return o[FV]=h(o,f.replacer||$V,f.space),o})});var eC=i(function(mIe,Q1){var VV=ho();Q1.exports=VV((o,f)=>{if(f.message)return o.message=`[${f.label}] ${o.message}`,o;return o.label=f.label,o})});var rC=i(function(gIe,tC){var HV=ho(),{MESSAGE:GV}=lr(),KV=ba();tC.exports=HV((o)=>{let f={};if(o.message)f["@message"]=o.message,delete o.message;if(o.timestamp)f["@timestamp"]=o.timestamp,delete o.timestamp;return f["@fields"]=o,o[GV]=KV(f),o})});var nC=i(function(yIe,oC){var WV=ho();function JV(o,f,h){let y=f.reduce((_,z)=>(_[z]=o[z],delete o[z],_),{}),x=Object.keys(o).reduce((_,z)=>(_[z]=o[z],delete o[z],_),{});return Object.assign(o,y,{[h]:x}),o}function ZV(o,f,h){return o[h]=f.reduce((y,x)=>(y[x]=o[x],delete o[x],y),{}),o}oC.exports=WV((o,f={})=>{let h="metadata";if(f.key)h=f.key;let y=[];if(!f.fillExcept&&!f.fillWith)y.push("level"),y.push("message");if(f.fillExcept)y=f.fillExcept;if(y.length>0)return JV(o,y,h);if(f.fillWith)return ZV(o,f.fillWith,h);return o})});var sC=i(function(Hc,iC){var YV=ho(),XV=Sm();iC.exports=YV((o)=>{let f=+new Date;return Hc.diff=f-(Hc.prevTime||f),Hc.prevTime=f,o.ms=`+${XV(Hc.diff)}`,o})});var lC=i(function(bIe,cC){var QV=c("util").inspect,e9=ho(),{LEVEL:t9,MESSAGE:aC,SPLAT:r9}=lr();cC.exports=e9((o,f={})=>{let h=Object.assign({},o);return delete h[t9],delete h[aC],delete h[r9],o[aC]=QV(h,!1,f.depth||null,f.colorize),o})});var uC=i(function(vIe,Id){var{MESSAGE:o9}=lr();class _g{constructor(o){this.template=o}transform(o){return o[o9]=this.template(o),o}}Id.exports=(o)=>new _g(o);Id.exports.Printf=Id.exports.Format=_g});var fC=i(function(xIe,pC){var n9=ho(),{MESSAGE:dC}=lr(),i9=ba();pC.exports=n9((o)=>{let f=i9(Object.assign({},o,{level:void 0,message:void 0,splat:void 0})),h=o.padding&&o.padding[o.level]||"";if(f!=="{}")o[dC]=`${o.level}:${h} ${o.message} ${f}`;else o[dC]=`${o.level}:${h} ${o.message}`;return o})});var yC=i(function(_Ie,gC){var s9=c("util"),{SPLAT:hC}=lr(),a9=/%[scdjifoO%]/g,c9=/%%/g;class mC{constructor(o){this.options=o}_splat(o,f){let h=o.message,y=o[hC]||o.splat||[],x=h.match(c9),_=x&&x.length||0,C=f.length-_-y.length,w=C<0?y.splice(C,-1*C):[],S=w.length;if(S)for(let E=0;E<S;E++)Object.assign(o,w[E]);return o.message=s9.format(h,...y),o}transform(o){let f=o.message,h=o[hC]||o.splat;if(!h||!h.length)return o;let y=f&&f.match&&f.match(a9);if(!y&&(h||h.length)){let x=h.length>1?h.splice(0):h,_=x.length;if(_)for(let z=0;z<_;z++)Object.assign(o,x[z]);return o}if(y)return this._splat(o,y);return o}}gC.exports=(o)=>new mC(o)});var vC=i(function(Rd,bC){(function(o,f){typeof Rd==="object"&&typeof bC<"u"?f(Rd):typeof define==="function"&&define.amd?define(["exports"],f):f(o.fecha={})})(Rd,function(o){var f=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,h="\\d\\d?",y="\\d\\d",x="\\d{3}",_="\\d{4}",z="[^\\s]+",C=/\[([^]*?)\]/gm;function w(re,oe){var Ge=[];for(var Bt=0,Se=re.length;Bt<Se;Bt++)Ge.push(re[Bt].substr(0,oe));return Ge}var S=function(re){return function(oe,Ge){var Bt=Ge[re].map(function(Pe){return Pe.toLowerCase()}),Se=Bt.indexOf(oe.toLowerCase());if(Se>-1)return Se;return null}};function E(re){var oe=[];for(var Ge=1;Ge<arguments.length;Ge++)oe[Ge-1]=arguments[Ge];for(var Bt=0,Se=oe;Bt<Se.length;Bt++){var Pe=Se[Bt];for(var Le in Pe)re[Le]=Pe[Le]}return re}var k=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],O=["January","February","March","April","May","June","July","August","September","October","November","December"],R=w(O,3),I=w(k,3),A={dayNamesShort:I,dayNames:k,monthNamesShort:R,monthNames:O,amPm:["am","pm"],DoFn:function(re){return re+["th","st","nd","rd"][re%10>3?0:(re-re%10!==10?1:0)*re%10]}},M=E({},A),D=function(re){return M=E(M,re)},U=function(re){return re.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},F=function(re,oe){if(oe===void 0)oe=2;re=String(re);while(re.length<oe)re="0"+re;return re},J={D:function(re){return String(re.getDate())},DD:function(re){return F(re.getDate())},Do:function(re,oe){return oe.DoFn(re.getDate())},d:function(re){return String(re.getDay())},dd:function(re){return F(re.getDay())},ddd:function(re,oe){return oe.dayNamesShort[re.getDay()]},dddd:function(re,oe){return oe.dayNames[re.getDay()]},M:function(re){return String(re.getMonth()+1)},MM:function(re){return F(re.getMonth()+1)},MMM:function(re,oe){return oe.monthNamesShort[re.getMonth()]},MMMM:function(re,oe){return oe.monthNames[re.getMonth()]},YY:function(re){return F(String(re.getFullYear()),4).substr(2)},YYYY:function(re){return F(re.getFullYear(),4)},h:function(re){return String(re.getHours()%12||12)},hh:function(re){return F(re.getHours()%12||12)},H:function(re){return String(re.getHours())},HH:function(re){return F(re.getHours())},m:function(re){return String(re.getMinutes())},mm:function(re){return F(re.getMinutes())},s:function(re){return String(re.getSeconds())},ss:function(re){return F(re.getSeconds())},S:function(re){return String(Math.round(re.getMilliseconds()/100))},SS:function(re){return F(Math.round(re.getMilliseconds()/10),2)},SSS:function(re){return F(re.getMilliseconds(),3)},a:function(re,oe){return re.getHours()<12?oe.amPm[0]:oe.amPm[1]},A:function(re,oe){return re.getHours()<12?oe.amPm[0].toUpperCase():oe.amPm[1].toUpperCase()},ZZ:function(re){var oe=re.getTimezoneOffset();return(oe>0?"-":"+")+F(Math.floor(Math.abs(oe)/60)*100+Math.abs(oe)%60,4)},Z:function(re){var oe=re.getTimezoneOffset();return(oe>0?"-":"+")+F(Math.floor(Math.abs(oe)/60),2)+":"+F(Math.abs(oe)%60,2)}},Q=function(re){return+re-1},te=[null,h],le=[null,z],he=["isPm",z,function(re,oe){var Ge=re.toLowerCase();if(Ge===oe.amPm[0])return 0;else if(Ge===oe.amPm[1])return 1;return null}],xe=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(re){var oe=(re+"").match(/([+-]|\d\d)/gi);if(oe){var Ge=+oe[1]*60+parseInt(oe[2],10);return oe[0]==="+"?Ge:-Ge}return 0}],Re={D:["day",h],DD:["day",y],Do:["day",h+z,function(re){return parseInt(re,10)}],M:["month",h,Q],MM:["month",y,Q],YY:["year",y,function(re){var oe=new Date,Ge=+(""+oe.getFullYear()).substr(0,2);return+(""+(+re>68?Ge-1:Ge)+re)}],h:["hour",h,void 0,"isPm"],hh:["hour",y,void 0,"isPm"],H:["hour",h],HH:["hour",y],m:["minute",h],mm:["minute",y],s:["second",h],ss:["second",y],YYYY:["year",_],S:["millisecond","\\d",function(re){return+re*100}],SS:["millisecond",y,function(re){return+re*10}],SSS:["millisecond",x],d:te,dd:te,ddd:le,dddd:le,MMM:["month",z,S("monthNamesShort")],MMMM:["month",z,S("monthNames")],a:he,A:he,ZZ:xe,Z:xe},me={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"},Ae=function(re){return E(me,re)},We=function(re,oe,Ge){if(oe===void 0)oe=me.default;if(Ge===void 0)Ge={};if(typeof re==="number")re=new Date(re);if(Object.prototype.toString.call(re)!=="[object Date]"||isNaN(re.getTime()))throw Error("Invalid Date pass to format");oe=me[oe]||oe;var Bt=[];oe=oe.replace(C,function(Pe,Le){return Bt.push(Le),"@@@"});var Se=E(E({},M),Ge);return oe=oe.replace(f,function(Pe){return J[Pe](re,Se)}),oe.replace(/@@@/g,function(){return Bt.shift()})};function $e(re,oe,Ge){if(Ge===void 0)Ge={};if(typeof oe!=="string")throw Error("Invalid format in fecha parse");if(oe=me[oe]||oe,re.length>1000)return null;var Bt=new Date,Se={year:Bt.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},Pe=[],Le=[],He=oe.replace(C,function(uo,or){return Le.push(U(or)),"@@@"}),st={},Et={};He=U(He).replace(f,function(uo){var or=Re[uo],Ue=or[0],Wt=or[1],be=or[3];if(st[Ue])throw Error("Invalid format. "+Ue+" specified twice in format");if(st[Ue]=!0,be)Et[be]=!0;return Pe.push(or),"("+Wt+")"}),Object.keys(Et).forEach(function(uo){if(!st[uo])throw Error("Invalid format. "+uo+" is required in specified format")}),He=He.replace(/@@@/g,function(){return Le.shift()});var kt=re.match(new RegExp(He,"i"));if(!kt)return null;var Ne=E(E({},M),Ge);for(var qe=1;qe<kt.length;qe++){var at=Pe[qe-1],ut=at[0],Lt=at[2],ct=Lt?Lt(kt[qe],Ne):+kt[qe];if(ct==null)return null;Se[ut]=ct}if(Se.isPm===1&&Se.hour!=null&&+Se.hour!==12)Se.hour=+Se.hour+12;else if(Se.isPm===0&&+Se.hour===12)Se.hour=0;var Fe;if(Se.timezoneOffset==null){Fe=new Date(Se.year,Se.month,Se.day,Se.hour,Se.minute,Se.second,Se.millisecond);var et=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]];for(var qe=0,Rt=et.length;qe<Rt;qe++)if(st[et[qe][0]]&&Se[et[qe][0]]!==Fe[et[qe][1]]())return null}else if(Fe=new Date(Date.UTC(Se.year,Se.month,Se.day,Se.hour,Se.minute-Se.timezoneOffset,Se.second,Se.millisecond)),Se.month>11||Se.month<0||Se.day>31||Se.day<1||Se.hour>23||Se.hour<0||Se.minute>59||Se.minute<0||Se.second>59||Se.second<0)return null;return Fe}var De={format:We,parse:$e,defaultI18n:A,setGlobalDateI18n:D,setGlobalDateMasks:Ae};o.assign=E,o.default=De,o.format=We,o.parse=$e,o.defaultI18n=A,o.setGlobalDateI18n=D,o.setGlobalDateMasks=Ae,Object.defineProperty(o,"__esModule",{value:!0})})});var _C=i(function(zIe,xC){var l9=vC(),u9=ho();xC.exports=u9((o,f={})=>{if(f.format)o.timestamp=typeof f.format==="function"?f.format():l9.format(new Date,f.format);if(!o.timestamp)o.timestamp=new Date().toISOString();if(f.alias)o[f.alias]=o.timestamp;return o})});var CC=i(function(CIe,zC){var zg=ag(),d9=ho(),{MESSAGE:Cg}=lr();zC.exports=d9((o,f)=>{if(f.level!==!1)o.level=zg.strip(o.level);if(f.message!==!1)o.message=zg.strip(String(o.message));if(f.raw!==!1&&o[Cg])o[Cg]=zg.strip(String(o[Cg]));return o})});var wg=i(function(f9){var p9=f9.format=ho();f9.levels=M1();function Ar(o,f){Object.defineProperty(p9,o,{get(){return f()},configurable:!0})}Ar("align",function(){return F1()});Ar("errors",function(){return V1()});Ar("cli",function(){return G1()});Ar("combine",function(){return W1()});Ar("colorize",function(){return kd()});Ar("json",function(){return xg()});Ar("label",function(){return eC()});Ar("logstash",function(){return rC()});Ar("metadata",function(){return nC()});Ar("ms",function(){return sC()});Ar("padLevels",function(){return fg()});Ar("prettyPrint",function(){return lC()});Ar("printf",function(){return uC()});Ar("simple",function(){return fC()});Ar("splat",function(){return yC()});Ar("timestamp",function(){return _C()});Ar("uncolorize",function(){return CC()})});var Tg=i(function(m9){var{format:wC}=c("util");m9.warn={deprecated(o){return()=>{throw Error(wC("{ %s } was removed in winston@3.0.0.",o))}},useFormat(o){return()=>{throw Error([wC("{ %s } was removed in winston@3.0.0.",o),"Use a custom winston.format = winston.format(function) instead."].join(`
35
+ `))}},forFunctions(o,f,h){h.forEach((y)=>{o[y]=m9.warn[f](y)})},forProperties(o,f,h){h.forEach((y)=>{let x=m9.warn[f](y);Object.defineProperty(o,y,{get:x,set:x})})}}});var SC=i(function(EIe,g9){g9.exports={name:"winston",description:"A logger for just about everything.",version:"3.19.0",author:"Charlie Robbins <charlie.robbins@gmail.com>",maintainers:["David Hyde <dabh@alumni.stanford.edu>"],repository:{type:"git",url:"https://github.com/winstonjs/winston.git"},keywords:["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],dependencies:{"@dabh/diagnostics":"^2.0.8","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.7.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.9.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^4.4.0","@types/node":"^20.11.24","abstract-winston-transport":"^0.5.1",assume:"^2.2.0","cross-spawn-async":"^2.2.5",eslint:"^8.57.0",hock:"^1.4.1",jest:"^29.7.0",rimraf:"5.0.10",split2:"^4.1.0","std-mocks":"^2.0.0",through2:"^4.0.2","winston-compat":"^0.1.5"},main:"./lib/winston.js",browser:"./dist/winston",types:"./index.d.ts",scripts:{lint:"eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist",test:"jest","test:unit":"jest -c test/jest.config.unit.js","test:integration":"jest -c test/jest.config.integration.js","test:typescript":"npx --package typescript tsc --project test",build:"babel lib -d dist",prebuild:"rimraf dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"}});var EC=i(function(kIe,TC){TC.exports=c("util").deprecate});var kg=i(function(OIe,OC){function y9(o,f){var h=this,y=this._readableState&&this._readableState.destroyed,x=this._writableState&&this._writableState.destroyed;if(y||x){if(f)f(o);else if(o){if(!this._writableState)process.nextTick(Eg,this,o);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,process.nextTick(Eg,this,o)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy(o||null,function(_){if(!f&&_)if(!h._writableState)process.nextTick(kC,h,_);else if(!h._writableState.errorEmitted)h._writableState.errorEmitted=!0,process.nextTick(kC,h,_);else process.nextTick(Ad,h);else if(f)process.nextTick(Ad,h),f(_);else process.nextTick(Ad,h)}),this}function kC(o,f){Eg(o,f),Ad(o)}function Ad(o){if(o._writableState&&!o._writableState.emitClose)return;if(o._readableState&&!o._readableState.emitClose)return;o.emit("close")}function b9(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(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}function Eg(o,f){o.emit("error",f)}function v9(o,f){var{_readableState:h,_writableState:y}=o;if(h&&h.autoDestroy||y&&y.autoDestroy)o.destroy(f);else o.emit("error",f)}OC.exports={destroy:y9,undestroy:b9,errorOrDestroy:v9}});var mi=i(function(C9,AC){var RC={};function Bo(o,f,h){if(!h)h=Error;function y(_,z,C){if(typeof f==="string")return f;else return f(_,z,C)}class x extends h{constructor(_,z,C){super(y(_,z,C))}}x.prototype.name=h.name,x.prototype.code=o,RC[o]=x}function IC(o,f){if(Array.isArray(o)){let h=o.length;if(o=o.map((y)=>String(y)),h>2)return`one of ${f} ${o.slice(0,h-1).join(", ")}, or `+o[h-1];else if(h===2)return`one of ${f} ${o[0]} or ${o[1]}`;else return`of ${f} ${o[0]}`}else return`of ${f} ${String(o)}`}function x9(o,f,h){return o.substr(!h||h<0?0:+h,f.length)===f}function _9(o,f,h){if(h===void 0||h>o.length)h=o.length;return o.substring(h-f.length,h)===f}function z9(o,f,h){if(typeof h!=="number")h=0;if(h+f.length>o.length)return!1;else return o.indexOf(f,h)!==-1}Bo("ERR_INVALID_OPT_VALUE",function(o,f){return'The value "'+f+'" is invalid for option "'+o+'"'},TypeError);Bo("ERR_INVALID_ARG_TYPE",function(o,f,h){let y;if(typeof f==="string"&&x9(f,"not "))y="must not be",f=f.replace(/^not /,"");else y="must be";let x;if(_9(o," argument"))x=`The ${o} ${y} ${IC(f,"type")}`;else{let _=z9(o,".")?"property":"argument";x=`The "${o}" ${_} ${y} ${IC(f,"type")}`}return x+=`. Received type ${typeof h}`,x},TypeError);Bo("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Bo("ERR_METHOD_NOT_IMPLEMENTED",function(o){return"The "+o+" method is not implemented"});Bo("ERR_STREAM_PREMATURE_CLOSE","Premature close");Bo("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" after a stream was destroyed"});Bo("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Bo("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Bo("ERR_STREAM_WRITE_AFTER_END","write after end");Bo("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Bo("ERR_UNKNOWN_ENCODING",function(o){return"Unknown encoding: "+o},TypeError);Bo("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");C9.codes=RC});var Og=i(function(IIe,PC){var S9=mi().codes.ERR_INVALID_OPT_VALUE;function T9(o,f,h){return o.highWaterMark!=null?o.highWaterMark:f?o[h]:null}function E9(o,f,h,y){var x=T9(f,y,h);if(x!=null){if(!(isFinite(x)&&Math.floor(x)===x)||x<0){var _=y?h:"highWaterMark";throw new S9(_,x)}return Math.floor(x)}return o.objectMode?16:16384}PC.exports={getHighWaterMark:E9}});var BC=i(function(RIe,Ig){if(typeof Object.create==="function")Ig.exports=function(f,h){if(h)f.super_=h,f.prototype=Object.create(h.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}})};else Ig.exports=function(f,h){if(h){f.super_=h;var y=function(){};y.prototype=h.prototype,f.prototype=new y,f.prototype.constructor=f}}});var va=i(function(AIe,Rg){try{if(Pd=c("util"),typeof Pd.inherits!=="function")throw"";Rg.exports=Pd.inherits}catch(o){Rg.exports=BC()}var Pd});var qC=i(function(PIe,MC){function DC(o,f){var h=Object.keys(o);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(o);f&&(y=y.filter(function(x){return Object.getOwnPropertyDescriptor(o,x).enumerable})),h.push.apply(h,y)}return h}function LC(o){for(var f=1;f<arguments.length;f++){var h=arguments[f]!=null?arguments[f]:{};f%2?DC(Object(h),!0).forEach(function(y){k9(o,y,h[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(h)):DC(Object(h)).forEach(function(y){Object.defineProperty(o,y,Object.getOwnPropertyDescriptor(h,y))})}return o}function k9(o,f,h){if(f=jC(f),f in o)Object.defineProperty(o,f,{value:h,enumerable:!0,configurable:!0,writable:!0});else o[f]=h;return o}function O9(o,f){if(!(o instanceof f))throw TypeError("Cannot call a class as a function")}function NC(o,f){for(var h=0;h<f.length;h++){var y=f[h];if(y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y)y.writable=!0;Object.defineProperty(o,jC(y.key),y)}}function I9(o,f,h){if(f)NC(o.prototype,f);if(h)NC(o,h);return Object.defineProperty(o,"prototype",{writable:!1}),o}function jC(o){var f=R9(o,"string");return typeof f==="symbol"?f:String(f)}function R9(o,f){if(typeof o!=="object"||o===null)return o;var h=o[Symbol.toPrimitive];if(h!==void 0){var y=h.call(o,f||"default");if(typeof y!=="object")return y;throw TypeError("@@toPrimitive must return a primitive value.")}return(f==="string"?String:Number)(o)}var A9=c("buffer"),Bd=A9.Buffer,P9=c("util"),Ag=P9.inspect,B9=Ag&&Ag.custom||"inspect";function D9(o,f,h){Bd.prototype.copy.call(o,f,h)}MC.exports=function(){function o(){O9(this,o),this.head=null,this.tail=null,this.length=0}return I9(o,[{key:"push",value:function(h){var y={data:h,next:null};if(this.length>0)this.tail.next=y;else this.head=y;this.tail=y,++this.length}},{key:"unshift",value:function(h){var y={data:h,next:this.head};if(this.length===0)this.tail=y;this.head=y,++this.length}},{key:"shift",value:function(){if(this.length===0)return;var h=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,h}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(h){if(this.length===0)return"";var y=this.head,x=""+y.data;while(y=y.next)x+=h+y.data;return x}},{key:"concat",value:function(h){if(this.length===0)return Bd.alloc(0);var y=Bd.allocUnsafe(h>>>0),x=this.head,_=0;while(x)D9(x.data,y,_),_+=x.data.length,x=x.next;return y}},{key:"consume",value:function(h,y){var x;if(h<this.head.data.length)x=this.head.data.slice(0,h),this.head.data=this.head.data.slice(h);else if(h===this.head.data.length)x=this.shift();else x=y?this._getString(h):this._getBuffer(h);return x}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(h){var y=this.head,x=1,_=y.data;h-=_.length;while(y=y.next){var z=y.data,C=h>z.length?z.length:h;if(C===z.length)_+=z;else _+=z.slice(0,h);if(h-=C,h===0){if(C===z.length)if(++x,y.next)this.head=y.next;else this.head=this.tail=null;else this.head=y,y.data=z.slice(C);break}++x}return this.length-=x,_}},{key:"_getBuffer",value:function(h){var y=Bd.allocUnsafe(h),x=this.head,_=1;x.data.copy(y),h-=x.data.length;while(x=x.next){var z=x.data,C=h>z.length?z.length:h;if(z.copy(y,y.length-h,0,C),h-=C,h===0){if(C===z.length)if(++_,x.next)this.head=x.next;else this.head=this.tail=null;else this.head=x,x.data=z.slice(C);break}++_}return this.length-=_,y}},{key:B9,value:function(h,y){return Ag(this,LC(LC({},y),{},{depth:0,customInspect:!1}))}}]),o}()});var Dg=i(function(J9){var Bg=hc().Buffer,FC=Bg.isEncoding||function(o){switch(o=""+o,o&&o.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 L9(o){if(!o)return"utf8";var f;while(!0)switch(o){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 o;default:if(f)return;o=(""+o).toLowerCase(),f=!0}}function N9(o){var f=L9(o);if(typeof f!=="string"&&(Bg.isEncoding===FC||!FC(o)))throw Error("Unknown encoding: "+o);return f||o}J9.StringDecoder=Gc;function Gc(o){this.encoding=N9(o);var f;switch(this.encoding){case"utf16le":this.text=$9,this.end=V9,f=4;break;case"utf8":this.fillLast=q9,f=4;break;case"base64":this.text=H9,this.end=G9,f=3;break;default:this.write=K9,this.end=W9;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Bg.allocUnsafe(f)}Gc.prototype.write=function(o){if(o.length===0)return"";var f,h;if(this.lastNeed){if(f=this.fillLast(o),f===void 0)return"";h=this.lastNeed,this.lastNeed=0}else h=0;if(h<o.length)return f?f+this.text(o,h):this.text(o,h);return f||""};Gc.prototype.end=U9;Gc.prototype.text=F9;Gc.prototype.fillLast=function(o){if(this.lastNeed<=o.length)return o.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);o.copy(this.lastChar,this.lastTotal-this.lastNeed,0,o.length),this.lastNeed-=o.length};function Pg(o){if(o<=127)return 0;else if(o>>5===6)return 2;else if(o>>4===14)return 3;else if(o>>3===30)return 4;return o>>6===2?-1:-2}function j9(o,f,h){var y=f.length-1;if(y<h)return 0;var x=Pg(f[y]);if(x>=0){if(x>0)o.lastNeed=x-1;return x}if(--y<h||x===-2)return 0;if(x=Pg(f[y]),x>=0){if(x>0)o.lastNeed=x-2;return x}if(--y<h||x===-2)return 0;if(x=Pg(f[y]),x>=0){if(x>0)if(x===2)x=0;else o.lastNeed=x-3;return x}return 0}function M9(o,f,h){if((f[0]&192)!==128)return o.lastNeed=0,"�";if(o.lastNeed>1&&f.length>1){if((f[1]&192)!==128)return o.lastNeed=1,"�";if(o.lastNeed>2&&f.length>2){if((f[2]&192)!==128)return o.lastNeed=2,"�"}}}function q9(o){var f=this.lastTotal-this.lastNeed,h=M9(this,o,f);if(h!==void 0)return h;if(this.lastNeed<=o.length)return o.copy(this.lastChar,f,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);o.copy(this.lastChar,f,0,o.length),this.lastNeed-=o.length}function F9(o,f){var h=j9(this,o,f);if(!this.lastNeed)return o.toString("utf8",f);this.lastTotal=h;var y=o.length-(h-this.lastNeed);return o.copy(this.lastChar,0,y),o.toString("utf8",f,y)}function U9(o){var f=o&&o.length?this.write(o):"";if(this.lastNeed)return f+"�";return f}function $9(o,f){if((o.length-f)%2===0){var h=o.toString("utf16le",f);if(h){var y=h.charCodeAt(h.length-1);if(y>=55296&&y<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=o[o.length-2],this.lastChar[1]=o[o.length-1],h.slice(0,-1)}return h}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=o[o.length-1],o.toString("utf16le",f,o.length-1)}function V9(o){var f=o&&o.length?this.write(o):"";if(this.lastNeed){var h=this.lastTotal-this.lastNeed;return f+this.lastChar.toString("utf16le",0,h)}return f}function H9(o,f){var h=(o.length-f)%3;if(h===0)return o.toString("base64",f);if(this.lastNeed=3-h,this.lastTotal=3,h===1)this.lastChar[0]=o[o.length-1];else this.lastChar[0]=o[o.length-2],this.lastChar[1]=o[o.length-1];return o.toString("base64",f,o.length-h)}function G9(o){var f=o&&o.length?this.write(o):"";if(this.lastNeed)return f+this.lastChar.toString("base64",0,3-this.lastNeed);return f}function K9(o){return o.toString(this.encoding)}function W9(o){return o&&o.length?this.write(o):""}});var Dd=i(function(DIe,VC){var UC=mi().codes.ERR_STREAM_PREMATURE_CLOSE;function Y9(o){var f=!1;return function(){if(f)return;f=!0;for(var h=arguments.length,y=Array(h),x=0;x<h;x++)y[x]=arguments[x];o.apply(this,y)}}function X9(){}function Q9(o){return o.setHeader&&typeof o.abort==="function"}function $C(o,f,h){if(typeof f==="function")return $C(o,null,f);if(!f)f={};h=Y9(h||X9);var y=f.readable||f.readable!==!1&&o.readable,x=f.writable||f.writable!==!1&&o.writable,_=function(){if(!o.writable)C()},z=o._writableState&&o._writableState.finished,C=function(){if(x=!1,z=!0,!y)h.call(o)},w=o._readableState&&o._readableState.endEmitted,S=function(){if(y=!1,w=!0,!x)h.call(o)},E=function(I){h.call(o,I)},k=function(){var I;if(y&&!w){if(!o._readableState||!o._readableState.ended)I=new UC;return h.call(o,I)}if(x&&!z){if(!o._writableState||!o._writableState.ended)I=new UC;return h.call(o,I)}},O=function(){o.req.on("finish",C)};if(Q9(o))if(o.on("complete",C),o.on("abort",k),o.req)O();else o.on("request",O);else if(x&&!o._writableState)o.on("end",_),o.on("close",_);if(o.on("end",S),o.on("finish",C),f.error!==!1)o.on("error",E);return o.on("close",k),function(){if(o.removeListener("complete",C),o.removeListener("abort",k),o.removeListener("request",O),o.req)o.req.removeListener("finish",C);o.removeListener("end",_),o.removeListener("close",_),o.removeListener("finish",C),o.removeListener("end",S),o.removeListener("error",E),o.removeListener("close",k)}}VC.exports=$C});var GC=i(function(LIe,HC){var Ld;function gi(o,f,h){if(f=eH(f),f in o)Object.defineProperty(o,f,{value:h,enumerable:!0,configurable:!0,writable:!0});else o[f]=h;return o}function eH(o){var f=tH(o,"string");return typeof f==="symbol"?f:String(f)}function tH(o,f){if(typeof o!=="object"||o===null)return o;var h=o[Symbol.toPrimitive];if(h!==void 0){var y=h.call(o,f||"default");if(typeof y!=="object")return y;throw TypeError("@@toPrimitive must return a primitive value.")}return(f==="string"?String:Number)(o)}var rH=Dd(),yi=Symbol("lastResolve"),ls=Symbol("lastReject"),Kc=Symbol("error"),Nd=Symbol("ended"),us=Symbol("lastPromise"),Lg=Symbol("handlePromise"),ds=Symbol("stream");function bi(o,f){return{value:o,done:f}}function oH(o){var f=o[yi];if(f!==null){var h=o[ds].read();if(h!==null)o[us]=null,o[yi]=null,o[ls]=null,f(bi(h,!1))}}function nH(o){process.nextTick(oH,o)}function iH(o,f){return function(h,y){o.then(function(){if(f[Nd]){h(bi(void 0,!0));return}f[Lg](h,y)},y)}}var sH=Object.getPrototypeOf(function(){}),aH=Object.setPrototypeOf((Ld={get stream(){return this[ds]},next:function(){var f=this,h=this[Kc];if(h!==null)return Promise.reject(h);if(this[Nd])return Promise.resolve(bi(void 0,!0));if(this[ds].destroyed)return new Promise(function(z,C){process.nextTick(function(){if(f[Kc])C(f[Kc]);else z(bi(void 0,!0))})});var y=this[us],x;if(y)x=new Promise(iH(y,this));else{var _=this[ds].read();if(_!==null)return Promise.resolve(bi(_,!1));x=new Promise(this[Lg])}return this[us]=x,x}},gi(Ld,Symbol.asyncIterator,function(){return this}),gi(Ld,"return",function(){var f=this;return new Promise(function(h,y){f[ds].destroy(null,function(x){if(x){y(x);return}h(bi(void 0,!0))})})}),Ld),sH),cH=function(f){var h,y=Object.create(aH,(h={},gi(h,ds,{value:f,writable:!0}),gi(h,yi,{value:null,writable:!0}),gi(h,ls,{value:null,writable:!0}),gi(h,Kc,{value:null,writable:!0}),gi(h,Nd,{value:f._readableState.endEmitted,writable:!0}),gi(h,Lg,{value:function(_,z){var C=y[ds].read();if(C)y[us]=null,y[yi]=null,y[ls]=null,_(bi(C,!1));else y[yi]=_,y[ls]=z},writable:!0}),h));return y[us]=null,rH(f,function(x){if(x&&x.code!=="ERR_STREAM_PREMATURE_CLOSE"){var _=y[ls];if(_!==null)y[us]=null,y[yi]=null,y[ls]=null,_(x);y[Kc]=x;return}var z=y[yi];if(z!==null)y[us]=null,y[yi]=null,y[ls]=null,z(bi(void 0,!0));y[Nd]=!0}),f.on("readable",nH.bind(null,y)),y};HC.exports=cH});var ZC=i(function(NIe,JC){function KC(o,f,h,y,x,_,z){try{var C=o[_](z),w=C.value}catch(S){h(S);return}if(C.done)f(w);else Promise.resolve(w).then(y,x)}function lH(o){return function(){var f=this,h=arguments;return new Promise(function(y,x){var _=o.apply(f,h);function z(w){KC(_,y,x,z,C,"next",w)}function C(w){KC(_,y,x,z,C,"throw",w)}z(void 0)})}}function WC(o,f){var h=Object.keys(o);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(o);f&&(y=y.filter(function(x){return Object.getOwnPropertyDescriptor(o,x).enumerable})),h.push.apply(h,y)}return h}function uH(o){for(var f=1;f<arguments.length;f++){var h=arguments[f]!=null?arguments[f]:{};f%2?WC(Object(h),!0).forEach(function(y){dH(o,y,h[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(h)):WC(Object(h)).forEach(function(y){Object.defineProperty(o,y,Object.getOwnPropertyDescriptor(h,y))})}return o}function dH(o,f,h){if(f=pH(f),f in o)Object.defineProperty(o,f,{value:h,enumerable:!0,configurable:!0,writable:!0});else o[f]=h;return o}function pH(o){var f=fH(o,"string");return typeof f==="symbol"?f:String(f)}function fH(o,f){if(typeof o!=="object"||o===null)return o;var h=o[Symbol.toPrimitive];if(h!==void 0){var y=h.call(o,f||"default");if(typeof y!=="object")return y;throw TypeError("@@toPrimitive must return a primitive value.")}return(f==="string"?String:Number)(o)}var hH=mi().codes.ERR_INVALID_ARG_TYPE;function mH(o,f,h){var y;if(f&&typeof f.next==="function")y=f;else if(f&&f[Symbol.asyncIterator])y=f[Symbol.asyncIterator]();else if(f&&f[Symbol.iterator])y=f[Symbol.iterator]();else throw new hH("iterable",["Iterable"],f);var x=new o(uH({objectMode:!0},h)),_=!1;x._read=function(){if(!_)_=!0,z()};function z(){return C.apply(this,arguments)}function C(){return C=lH(function*(){try{var w=yield y.next(),{value:S,done:E}=w;if(E)x.push(null);else if(x.push(yield S))z();else _=!1}catch(k){x.destroy(k)}}),C.apply(this,arguments)}return x}JC.exports=mH});var Gg=i(function(MIe,sw){sw.exports=xt;var xa;xt.ReadableState=ew;var jIe=c("events").EventEmitter,QC=function(f,h){return f.listeners(h).length},Jc=c("stream"),jd=c("buffer").Buffer,gH=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function yH(o){return jd.from(o)}function bH(o){return jd.isBuffer(o)||o instanceof gH}var Ng=c("util"),Qe;if(Ng&&Ng.debuglog)Qe=Ng.debuglog("stream");else Qe=function(){};var vH=qC(),Vg=kg(),xH=Og(),_H=xH.getHighWaterMark,Md=mi().codes,{ERR_INVALID_ARG_TYPE:zH,ERR_STREAM_PUSH_AFTER_EOF:CH,ERR_METHOD_NOT_IMPLEMENTED:wH,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:SH}=Md,_a,jg,Mg;va()(xt,Jc);var Wc=Vg.errorOrDestroy,qg=["error","close","destroy","pause","resume"];function TH(o,f,h){if(typeof o.prependListener==="function")return o.prependListener(f,h);if(!o._events||!o._events[f])o.on(f,h);else if(Array.isArray(o._events[f]))o._events[f].unshift(h);else o._events[f]=[h,o._events[f]]}function ew(o,f,h){if(xa=xa||ps(),o=o||{},typeof h!=="boolean")h=f instanceof xa;if(this.objectMode=!!o.objectMode,h)this.objectMode=this.objectMode||!!o.readableObjectMode;if(this.highWaterMark=_H(this,o,"readableHighWaterMark",h),this.buffer=new vH,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=o.emitClose!==!1,this.autoDestroy=!!o.autoDestroy,this.destroyed=!1,this.defaultEncoding=o.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,o.encoding){if(!_a)_a=Dg().StringDecoder;this.decoder=new _a(o.encoding),this.encoding=o.encoding}}function xt(o){if(xa=xa||ps(),!(this instanceof xt))return new xt(o);var f=this instanceof xa;if(this._readableState=new ew(o,this,f),this.readable=!0,o){if(typeof o.read==="function")this._read=o.read;if(typeof o.destroy==="function")this._destroy=o.destroy}Jc.call(this)}Object.defineProperty(xt.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(f){if(!this._readableState)return;this._readableState.destroyed=f}});xt.prototype.destroy=Vg.destroy;xt.prototype._undestroy=Vg.undestroy;xt.prototype._destroy=function(o,f){f(o)};xt.prototype.push=function(o,f){var h=this._readableState,y;if(!h.objectMode){if(typeof o==="string"){if(f=f||h.defaultEncoding,f!==h.encoding)o=jd.from(o,f),f="";y=!0}}else y=!0;return tw(this,o,f,!1,y)};xt.prototype.unshift=function(o){return tw(this,o,null,!0,!1)};function tw(o,f,h,y,x){Qe("readableAddChunk",f);var _=o._readableState;if(f===null)_.reading=!1,OH(o,_);else{var z;if(!x)z=EH(_,f);if(z)Wc(o,z);else if(_.objectMode||f&&f.length>0){if(typeof f!=="string"&&!_.objectMode&&Object.getPrototypeOf(f)!==jd.prototype)f=yH(f);if(y)if(_.endEmitted)Wc(o,new SH);else Fg(o,_,f,!0);else if(_.ended)Wc(o,new CH);else if(_.destroyed)return!1;else if(_.reading=!1,_.decoder&&!h)if(f=_.decoder.write(f),_.objectMode||f.length!==0)Fg(o,_,f,!1);else $g(o,_);else Fg(o,_,f,!1)}else if(!y)_.reading=!1,$g(o,_)}return!_.ended&&(_.length<_.highWaterMark||_.length===0)}function Fg(o,f,h,y){if(f.flowing&&f.length===0&&!f.sync)f.awaitDrain=0,o.emit("data",h);else{if(f.length+=f.objectMode?1:h.length,y)f.buffer.unshift(h);else f.buffer.push(h);if(f.needReadable)qd(o)}$g(o,f)}function EH(o,f){var h;if(!bH(f)&&typeof f!=="string"&&f!==void 0&&!o.objectMode)h=new zH("chunk",["string","Buffer","Uint8Array"],f);return h}xt.prototype.isPaused=function(){return this._readableState.flowing===!1};xt.prototype.setEncoding=function(o){if(!_a)_a=Dg().StringDecoder;var f=new _a(o);this._readableState.decoder=f,this._readableState.encoding=this._readableState.decoder.encoding;var h=this._readableState.buffer.head,y="";while(h!==null)y+=f.write(h.data),h=h.next;if(this._readableState.buffer.clear(),y!=="")this._readableState.buffer.push(y);return this._readableState.length=y.length,this};var YC=1073741824;function kH(o){if(o>=YC)o=YC;else o--,o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o++;return o}function XC(o,f){if(o<=0||f.length===0&&f.ended)return 0;if(f.objectMode)return 1;if(o!==o)if(f.flowing&&f.length)return f.buffer.head.data.length;else return f.length;if(o>f.highWaterMark)f.highWaterMark=kH(o);if(o<=f.length)return o;if(!f.ended)return f.needReadable=!0,0;return f.length}xt.prototype.read=function(o){Qe("read",o),o=parseInt(o,10);var f=this._readableState,h=o;if(o!==0)f.emittedReadable=!1;if(o===0&&f.needReadable&&((f.highWaterMark!==0?f.length>=f.highWaterMark:f.length>0)||f.ended)){if(Qe("read: emitReadable",f.length,f.ended),f.length===0&&f.ended)Ug(this);else qd(this);return null}if(o=XC(o,f),o===0&&f.ended){if(f.length===0)Ug(this);return null}var y=f.needReadable;if(Qe("need readable",y),f.length===0||f.length-o<f.highWaterMark)y=!0,Qe("length less than watermark",y);if(f.ended||f.reading)y=!1,Qe("reading or ended",y);else if(y){if(Qe("do read"),f.reading=!0,f.sync=!0,f.length===0)f.needReadable=!0;if(this._read(f.highWaterMark),f.sync=!1,!f.reading)o=XC(h,f)}var x;if(o>0)x=nw(o,f);else x=null;if(x===null)f.needReadable=f.length<=f.highWaterMark,o=0;else f.length-=o,f.awaitDrain=0;if(f.length===0){if(!f.ended)f.needReadable=!0;if(h!==o&&f.ended)Ug(this)}if(x!==null)this.emit("data",x);return x};function OH(o,f){if(Qe("onEofChunk"),f.ended)return;if(f.decoder){var h=f.decoder.end();if(h&&h.length)f.buffer.push(h),f.length+=f.objectMode?1:h.length}if(f.ended=!0,f.sync)qd(o);else if(f.needReadable=!1,!f.emittedReadable)f.emittedReadable=!0,rw(o)}function qd(o){var f=o._readableState;if(Qe("emitReadable",f.needReadable,f.emittedReadable),f.needReadable=!1,!f.emittedReadable)Qe("emitReadable",f.flowing),f.emittedReadable=!0,process.nextTick(rw,o)}function rw(o){var f=o._readableState;if(Qe("emitReadable_",f.destroyed,f.length,f.ended),!f.destroyed&&(f.length||f.ended))o.emit("readable"),f.emittedReadable=!1;f.needReadable=!f.flowing&&!f.ended&&f.length<=f.highWaterMark,Hg(o)}function $g(o,f){if(!f.readingMore)f.readingMore=!0,process.nextTick(IH,o,f)}function IH(o,f){while(!f.reading&&!f.ended&&(f.length<f.highWaterMark||f.flowing&&f.length===0)){var h=f.length;if(Qe("maybeReadMore read 0"),o.read(0),h===f.length)break}f.readingMore=!1}xt.prototype._read=function(o){Wc(this,new wH("_read()"))};xt.prototype.pipe=function(o,f){var h=this,y=this._readableState;switch(y.pipesCount){case 0:y.pipes=o;break;case 1:y.pipes=[y.pipes,o];break;default:y.pipes.push(o);break}y.pipesCount+=1,Qe("pipe count=%d opts=%j",y.pipesCount,f);var x=(!f||f.end!==!1)&&o!==process.stdout&&o!==process.stderr,_=x?C:A;if(y.endEmitted)process.nextTick(_);else h.once("end",_);o.on("unpipe",z);function z(M,D){if(Qe("onunpipe"),M===h){if(D&&D.hasUnpiped===!1)D.hasUnpiped=!0,E()}}function C(){Qe("onend"),o.end()}var w=RH(h);o.on("drain",w);var S=!1;function E(){if(Qe("cleanup"),o.removeListener("close",R),o.removeListener("finish",I),o.removeListener("drain",w),o.removeListener("error",O),o.removeListener("unpipe",z),h.removeListener("end",C),h.removeListener("end",A),h.removeListener("data",k),S=!0,y.awaitDrain&&(!o._writableState||o._writableState.needDrain))w()}h.on("data",k);function k(M){Qe("ondata");var D=o.write(M);if(Qe("dest.write",D),D===!1){if((y.pipesCount===1&&y.pipes===o||y.pipesCount>1&&iw(y.pipes,o)!==-1)&&!S)Qe("false write response, pause",y.awaitDrain),y.awaitDrain++;h.pause()}}function O(M){if(Qe("onerror",M),A(),o.removeListener("error",O),QC(o,"error")===0)Wc(o,M)}TH(o,"error",O);function R(){o.removeListener("finish",I),A()}o.once("close",R);function I(){Qe("onfinish"),o.removeListener("close",R),A()}o.once("finish",I);function A(){Qe("unpipe"),h.unpipe(o)}if(o.emit("pipe",h),!y.flowing)Qe("pipe resume"),h.resume();return o};function RH(o){return function(){var h=o._readableState;if(Qe("pipeOnDrain",h.awaitDrain),h.awaitDrain)h.awaitDrain--;if(h.awaitDrain===0&&QC(o,"data"))h.flowing=!0,Hg(o)}}xt.prototype.unpipe=function(o){var f=this._readableState,h={hasUnpiped:!1};if(f.pipesCount===0)return this;if(f.pipesCount===1){if(o&&o!==f.pipes)return this;if(!o)o=f.pipes;if(f.pipes=null,f.pipesCount=0,f.flowing=!1,o)o.emit("unpipe",this,h);return this}if(!o){var{pipes:y,pipesCount:x}=f;f.pipes=null,f.pipesCount=0,f.flowing=!1;for(var _=0;_<x;_++)y[_].emit("unpipe",this,{hasUnpiped:!1});return this}var z=iw(f.pipes,o);if(z===-1)return this;if(f.pipes.splice(z,1),f.pipesCount-=1,f.pipesCount===1)f.pipes=f.pipes[0];return o.emit("unpipe",this,h),this};xt.prototype.on=function(o,f){var h=Jc.prototype.on.call(this,o,f),y=this._readableState;if(o==="data"){if(y.readableListening=this.listenerCount("readable")>0,y.flowing!==!1)this.resume()}else if(o==="readable"){if(!y.endEmitted&&!y.readableListening){if(y.readableListening=y.needReadable=!0,y.flowing=!1,y.emittedReadable=!1,Qe("on readable",y.length,y.reading),y.length)qd(this);else if(!y.reading)process.nextTick(AH,this)}}return h};xt.prototype.addListener=xt.prototype.on;xt.prototype.removeListener=function(o,f){var h=Jc.prototype.removeListener.call(this,o,f);if(o==="readable")process.nextTick(ow,this);return h};xt.prototype.removeAllListeners=function(o){var f=Jc.prototype.removeAllListeners.apply(this,arguments);if(o==="readable"||o===void 0)process.nextTick(ow,this);return f};function ow(o){var f=o._readableState;if(f.readableListening=o.listenerCount("readable")>0,f.resumeScheduled&&!f.paused)f.flowing=!0;else if(o.listenerCount("data")>0)o.resume()}function AH(o){Qe("readable nexttick read 0"),o.read(0)}xt.prototype.resume=function(){var o=this._readableState;if(!o.flowing)Qe("resume"),o.flowing=!o.readableListening,PH(this,o);return o.paused=!1,this};function PH(o,f){if(!f.resumeScheduled)f.resumeScheduled=!0,process.nextTick(BH,o,f)}function BH(o,f){if(Qe("resume",f.reading),!f.reading)o.read(0);if(f.resumeScheduled=!1,o.emit("resume"),Hg(o),f.flowing&&!f.reading)o.read(0)}xt.prototype.pause=function(){if(Qe("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)Qe("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this};function Hg(o){var f=o._readableState;Qe("flow",f.flowing);while(f.flowing&&o.read()!==null);}xt.prototype.wrap=function(o){var f=this,h=this._readableState,y=!1;o.on("end",function(){if(Qe("wrapped end"),h.decoder&&!h.ended){var z=h.decoder.end();if(z&&z.length)f.push(z)}f.push(null)}),o.on("data",function(z){if(Qe("wrapped data"),h.decoder)z=h.decoder.write(z);if(h.objectMode&&(z===null||z===void 0))return;else if(!h.objectMode&&(!z||!z.length))return;var C=f.push(z);if(!C)y=!0,o.pause()});for(var x in o)if(this[x]===void 0&&typeof o[x]==="function")this[x]=function(C){return function(){return o[C].apply(o,arguments)}}(x);for(var _=0;_<qg.length;_++)o.on(qg[_],this.emit.bind(this,qg[_]));return this._read=function(z){if(Qe("wrapped _read",z),y)y=!1,o.resume()},this};if(typeof Symbol==="function")xt.prototype[Symbol.asyncIterator]=function(){if(jg===void 0)jg=GC();return jg(this)};Object.defineProperty(xt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(xt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(xt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(f){if(this._readableState)this._readableState.flowing=f}});xt._fromList=nw;Object.defineProperty(xt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function nw(o,f){if(f.length===0)return null;var h;if(f.objectMode)h=f.buffer.shift();else if(!o||o>=f.length){if(f.decoder)h=f.buffer.join("");else if(f.buffer.length===1)h=f.buffer.first();else h=f.buffer.concat(f.length);f.buffer.clear()}else h=f.buffer.consume(o,f.decoder);return h}function Ug(o){var f=o._readableState;if(Qe("endReadable",f.endEmitted),!f.endEmitted)f.ended=!0,process.nextTick(DH,f,o)}function DH(o,f){if(Qe("endReadableNT",o.endEmitted,o.length),!o.endEmitted&&o.length===0){if(o.endEmitted=!0,f.readable=!1,f.emit("end"),o.autoDestroy){var h=f._writableState;if(!h||h.autoDestroy&&h.finished)f.destroy()}}}if(typeof Symbol==="function")xt.from=function(o,f){if(Mg===void 0)Mg=ZC();return Mg(xt,o,f)};function iw(o,f){for(var h=0,y=o.length;h<y;h++)if(o[h]===f)return h;return-1}});var ps=i(function(qIe,cw){var LH=Object.keys||function(o){var f=[];for(var h in o)f.push(h);return f};cw.exports=wn;var aw=Gg(),Kg=Ud();va()(wn,aw);{Fd=LH(Kg.prototype);for(Zc=0;Zc<Fd.length;Zc++)if(Yc=Fd[Zc],!wn.prototype[Yc])wn.prototype[Yc]=Kg.prototype[Yc]}var Fd,Yc,Zc;function wn(o){if(!(this instanceof wn))return new wn(o);if(aw.call(this,o),Kg.call(this,o),this.allowHalfOpen=!0,o){if(o.readable===!1)this.readable=!1;if(o.writable===!1)this.writable=!1;if(o.allowHalfOpen===!1)this.allowHalfOpen=!1,this.once("end",NH)}}Object.defineProperty(wn.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(wn.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(wn.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function NH(){if(this._writableState.ended)return;process.nextTick(jH,this)}function jH(o){o.end()}Object.defineProperty(wn.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set:function(f){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=f,this._writableState.destroyed=f}})});var Ud=i(function(FIe,hw){hw.exports=Qt;function uw(o){var f=this;this.next=null,this.entry=null,this.finish=function(){d7(f,o)}}var za;Qt.WritableState=Qc;var MH={deprecate:EC()},dw=c("stream"),Vd=c("buffer").Buffer,qH=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function FH(o){return Vd.from(o)}function UH(o){return Vd.isBuffer(o)||o instanceof qH}var Jg=kg(),$H=Og(),VH=$H.getHighWaterMark,vi=mi().codes,{ERR_INVALID_ARG_TYPE:HH,ERR_METHOD_NOT_IMPLEMENTED:GH,ERR_MULTIPLE_CALLBACK:KH,ERR_STREAM_CANNOT_PIPE:WH,ERR_STREAM_DESTROYED:JH,ERR_STREAM_NULL_VALUES:ZH,ERR_STREAM_WRITE_AFTER_END:YH,ERR_UNKNOWN_ENCODING:XH}=vi,Ca=Jg.errorOrDestroy;va()(Qt,dw);function QH(){}function Qc(o,f,h){if(za=za||ps(),o=o||{},typeof h!=="boolean")h=f instanceof za;if(this.objectMode=!!o.objectMode,h)this.objectMode=this.objectMode||!!o.writableObjectMode;this.highWaterMark=VH(this,o,"writableHighWaterMark",h),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var y=o.decodeStrings===!1;this.decodeStrings=!y,this.defaultEncoding=o.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(x){s7(f,x)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=o.emitClose!==!1,this.autoDestroy=!!o.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new uw(this)}Qc.prototype.getBuffer=function(){var f=this.bufferedRequest,h=[];while(f)h.push(f),f=f.next;return h};(function(){try{Object.defineProperty(Qc.prototype,"buffer",{get:MH.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(o){}})();var $d;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")$d=Function.prototype[Symbol.hasInstance],Object.defineProperty(Qt,Symbol.hasInstance,{value:function(f){if($d.call(this,f))return!0;if(this!==Qt)return!1;return f&&f._writableState instanceof Qc}});else $d=function(f){return f instanceof this};function Qt(o){za=za||ps();var f=this instanceof za;if(!f&&!$d.call(Qt,this))return new Qt(o);if(this._writableState=new Qc(o,this,f),this.writable=!0,o){if(typeof o.write==="function")this._write=o.write;if(typeof o.writev==="function")this._writev=o.writev;if(typeof o.destroy==="function")this._destroy=o.destroy;if(typeof o.final==="function")this._final=o.final}dw.call(this)}Qt.prototype.pipe=function(){Ca(this,new WH)};function e7(o,f){var h=new YH;Ca(o,h),process.nextTick(f,h)}function t7(o,f,h,y){var x;if(h===null)x=new ZH;else if(typeof h!=="string"&&!f.objectMode)x=new HH("chunk",["string","Buffer"],h);if(x)return Ca(o,x),process.nextTick(y,x),!1;return!0}Qt.prototype.write=function(o,f,h){var y=this._writableState,x=!1,_=!y.objectMode&&UH(o);if(_&&!Vd.isBuffer(o))o=FH(o);if(typeof f==="function")h=f,f=null;if(_)f="buffer";else if(!f)f=y.defaultEncoding;if(typeof h!=="function")h=QH;if(y.ending)e7(this,h);else if(_||t7(this,y,o,h))y.pendingcb++,x=o7(this,y,_,o,f,h);return x};Qt.prototype.cork=function(){this._writableState.corked++};Qt.prototype.uncork=function(){var o=this._writableState;if(o.corked){if(o.corked--,!o.writing&&!o.corked&&!o.bufferProcessing&&o.bufferedRequest)pw(this,o)}};Qt.prototype.setDefaultEncoding=function(f){if(typeof f==="string")f=f.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((f+"").toLowerCase())>-1))throw new XH(f);return this._writableState.defaultEncoding=f,this};Object.defineProperty(Qt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function r7(o,f,h){if(!o.objectMode&&o.decodeStrings!==!1&&typeof f==="string")f=Vd.from(f,h);return f}Object.defineProperty(Qt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function o7(o,f,h,y,x,_){if(!h){var z=r7(f,y,x);if(y!==z)h=!0,x="buffer",y=z}var C=f.objectMode?1:y.length;f.length+=C;var w=f.length<f.highWaterMark;if(!w)f.needDrain=!0;if(f.writing||f.corked){var S=f.lastBufferedRequest;if(f.lastBufferedRequest={chunk:y,encoding:x,isBuf:h,callback:_,next:null},S)S.next=f.lastBufferedRequest;else f.bufferedRequest=f.lastBufferedRequest;f.bufferedRequestCount+=1}else Wg(o,f,!1,C,y,x,_);return w}function Wg(o,f,h,y,x,_,z){if(f.writelen=y,f.writecb=z,f.writing=!0,f.sync=!0,f.destroyed)f.onwrite(new JH("write"));else if(h)o._writev(x,f.onwrite);else o._write(x,_,f.onwrite);f.sync=!1}function n7(o,f,h,y,x){if(--f.pendingcb,h)process.nextTick(x,y),process.nextTick(Xc,o,f),o._writableState.errorEmitted=!0,Ca(o,y);else x(y),o._writableState.errorEmitted=!0,Ca(o,y),Xc(o,f)}function i7(o){o.writing=!1,o.writecb=null,o.length-=o.writelen,o.writelen=0}function s7(o,f){var h=o._writableState,{sync:y,writecb:x}=h;if(typeof x!=="function")throw new KH;if(i7(h),f)n7(o,h,y,f,x);else{var _=fw(h)||o.destroyed;if(!_&&!h.corked&&!h.bufferProcessing&&h.bufferedRequest)pw(o,h);if(y)process.nextTick(lw,o,h,_,x);else lw(o,h,_,x)}}function lw(o,f,h,y){if(!h)a7(o,f);f.pendingcb--,y(),Xc(o,f)}function a7(o,f){if(f.length===0&&f.needDrain)f.needDrain=!1,o.emit("drain")}function pw(o,f){f.bufferProcessing=!0;var h=f.bufferedRequest;if(o._writev&&h&&h.next){var y=f.bufferedRequestCount,x=Array(y),_=f.corkedRequestsFree;_.entry=h;var z=0,C=!0;while(h){if(x[z]=h,!h.isBuf)C=!1;h=h.next,z+=1}if(x.allBuffers=C,Wg(o,f,!0,f.length,x,"",_.finish),f.pendingcb++,f.lastBufferedRequest=null,_.next)f.corkedRequestsFree=_.next,_.next=null;else f.corkedRequestsFree=new uw(f);f.bufferedRequestCount=0}else{while(h){var w=h.chunk,S=h.encoding,E=h.callback,k=f.objectMode?1:w.length;if(Wg(o,f,!1,k,w,S,E),h=h.next,f.bufferedRequestCount--,f.writing)break}if(h===null)f.lastBufferedRequest=null}f.bufferedRequest=h,f.bufferProcessing=!1}Qt.prototype._write=function(o,f,h){h(new GH("_write()"))};Qt.prototype._writev=null;Qt.prototype.end=function(o,f,h){var y=this._writableState;if(typeof o==="function")h=o,o=null,f=null;else if(typeof f==="function")h=f,f=null;if(o!==null&&o!==void 0)this.write(o,f);if(y.corked)y.corked=1,this.uncork();if(!y.ending)u7(this,y,h);return this};Object.defineProperty(Qt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function fw(o){return o.ending&&o.length===0&&o.bufferedRequest===null&&!o.finished&&!o.writing}function c7(o,f){o._final(function(h){if(f.pendingcb--,h)Ca(o,h);f.prefinished=!0,o.emit("prefinish"),Xc(o,f)})}function l7(o,f){if(!f.prefinished&&!f.finalCalled)if(typeof o._final==="function"&&!f.destroyed)f.pendingcb++,f.finalCalled=!0,process.nextTick(c7,o,f);else f.prefinished=!0,o.emit("prefinish")}function Xc(o,f){var h=fw(f);if(h){if(l7(o,f),f.pendingcb===0){if(f.finished=!0,o.emit("finish"),f.autoDestroy){var y=o._readableState;if(!y||y.autoDestroy&&y.endEmitted)o.destroy()}}}return h}function u7(o,f,h){if(f.ending=!0,Xc(o,f),h)if(f.finished)process.nextTick(h);else o.once("finish",h);f.ended=!0,o.writable=!1}function d7(o,f,h){var y=o.entry;o.entry=null;while(y){var x=y.callback;f.pendingcb--,x(h),y=y.next}f.corkedRequestsFree.next=o}Object.defineProperty(Qt.prototype,"destroyed",{enumerable:!1,get:function(){if(this._writableState===void 0)return!1;return this._writableState.destroyed},set:function(f){if(!this._writableState)return;this._writableState.destroyed=f}});Qt.prototype.destroy=Jg.destroy;Qt.prototype._undestroy=Jg.undestroy;Qt.prototype._destroy=function(o,f){f(o)}});var Zg=i(function(UIe,yw){var p7=c("util"),mw=Ud(),{LEVEL:gw}=lr(),el=yw.exports=function(f={}){if(mw.call(this,{objectMode:!0,highWaterMark:f.highWaterMark}),this.format=f.format,this.level=f.level,this.handleExceptions=f.handleExceptions,this.handleRejections=f.handleRejections,this.silent=f.silent,f.log)this.log=f.log;if(f.logv)this.logv=f.logv;if(f.close)this.close=f.close;this.once("pipe",(h)=>{this.levels=h.levels,this.parent=h}),this.once("unpipe",(h)=>{if(h===this.parent){if(this.parent=null,this.close)this.close()}})};p7.inherits(el,mw);el.prototype._write=function(f,h,y){if(this.silent||f.exception===!0&&!this.handleExceptions)return y(null);let x=this.level||this.parent&&this.parent.level;if(!x||this.levels[x]>=this.levels[f[gw]]){if(f&&!this.format)return this.log(f,y);let _,z;try{z=this.format.transform(Object.assign({},f),this.format.options)}catch(C){_=C}if(_||!z){if(y(),_)throw _;return}return this.log(z,y)}return this._writableState.sync=!1,y(null)};el.prototype._writev=function(f,h){if(this.logv){let y=f.filter(this._accept,this);if(!y.length)return h(null);return this.logv(y,h)}for(let y=0;y<f.length;y++){if(!this._accept(f[y]))continue;if(f[y].chunk&&!this.format){this.log(f[y].chunk,f[y].callback);continue}let x,_;try{_=this.format.transform(Object.assign({},f[y].chunk),this.format.options)}catch(z){x=z}if(x||!_){if(f[y].callback(),x)throw h(null),x}else this.log(_,f[y].callback)}return h(null)};el.prototype._accept=function(f){let h=f.chunk;if(this.silent)return!1;let y=this.level||this.parent&&this.parent.level;if(h.exception===!0||!y||this.levels[y]>=this.levels[h[gw]]){if(this.handleExceptions||h.exception!==!0)return!0}return!1};el.prototype._nop=function(){return}});var Xg=i(function($Ie,vw){var f7=c("util"),{LEVEL:Yg}=lr(),bw=Zg(),tl=vw.exports=function(f={}){if(bw.call(this,f),!f.transport||typeof f.transport.log!=="function")throw Error("Invalid transport, must be an object with a log method.");this.transport=f.transport,this.level=this.level||f.transport.level,this.handleExceptions=this.handleExceptions||f.transport.handleExceptions,this._deprecated();function h(y){this.emit("error",y,this.transport)}if(!this.transport.__winstonError)this.transport.__winstonError=h.bind(this),this.transport.on("error",this.transport.__winstonError)};f7.inherits(tl,bw);tl.prototype._write=function(f,h,y){if(this.silent||f.exception===!0&&!this.handleExceptions)return y(null);if(!this.level||this.levels[this.level]>=this.levels[f[Yg]])this.transport.log(f[Yg],f.message,f,this._nop);y(null)};tl.prototype._writev=function(f,h){for(let y=0;y<f.length;y++)if(this._accept(f[y]))this.transport.log(f[y].chunk[Yg],f[y].chunk.message,f[y].chunk,this._nop),f[y].callback();return h(null)};tl.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(`
36
+ `))};tl.prototype.close=function(){if(this.transport.close)this.transport.close();if(this.transport.__winstonError)this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null}});var wa=i(function(VIe,Qg){Qg.exports=Zg();Qg.exports.LegacyTransportStream=Xg()});var zw=i(function(HIe,_w){var h7=c("os"),{LEVEL:xw,MESSAGE:Sa}=lr(),m7=wa();_w.exports=class extends m7{constructor(f={}){super(f);this.name=f.name||"console",this.stderrLevels=this._stringArrayToSet(f.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(f.consoleWarnLevels),this.eol=typeof f.eol==="string"?f.eol:h7.EOL,this.forceConsole=f.forceConsole||!1,this._consoleLog=console.log.bind(console),this._consoleWarn=console.warn.bind(console),this._consoleError=console.error.bind(console),this.setMaxListeners(30)}log(f,h){if(setImmediate(()=>this.emit("logged",f)),this.stderrLevels[f[xw]]){if(console._stderr&&!this.forceConsole)console._stderr.write(`${f[Sa]}${this.eol}`);else this._consoleError(f[Sa]);if(h)h();return}else if(this.consoleWarnLevels[f[xw]]){if(console._stderr&&!this.forceConsole)console._stderr.write(`${f[Sa]}${this.eol}`);else this._consoleWarn(f[Sa]);if(h)h();return}if(console._stdout&&!this.forceConsole)console._stdout.write(`${f[Sa]}${this.eol}`);else this._consoleLog(f[Sa]);if(h)h()}_stringArrayToSet(f,h){if(!f)return{};if(h=h||"Cannot make set from type other than Array of string elements",!Array.isArray(f))throw Error(h);return f.reduce((y,x)=>{if(typeof x!=="string")throw Error(h);return y[x]=!0,y},{})}}});var Hd=i(function(e0,Cw){Object.defineProperty(e0,"__esModule",{value:!0});e0.default=g7;function g7(o){return o&&typeof o.length==="number"&&o.length>=0&&o.length%1===0}Cw.exports=e0.default});var Sw=i(function(t0,ww){Object.defineProperty(t0,"__esModule",{value:!0});t0.default=function(o){return function(...f){var h=f.pop();return o.call(this,f,h)}};ww.exports=t0.default});var Ow=i(function(kw){Object.defineProperty(kw,"__esModule",{value:!0});kw.fallback=Tw;kw.wrap=Ew;var v7=kw.hasQueueMicrotask=typeof queueMicrotask==="function"&&queueMicrotask,x7=kw.hasSetImmediate=typeof setImmediate==="function"&&setImmediate,_7=kw.hasNextTick=typeof process==="object"&&typeof process.nextTick==="function";function Tw(o){setTimeout(o,0)}function Ew(o){return(f,...h)=>o(()=>f(...h))}var rl;if(v7)rl=queueMicrotask;else if(x7)rl=setImmediate;else if(_7)rl=process.nextTick;else rl=Tw;kw.default=Ew(rl)});var Bw=i(function(r0,Pw){Object.defineProperty(r0,"__esModule",{value:!0});r0.default=I7;var S7=Sw(),T7=Aw(S7),E7=Ow(),k7=Aw(E7),O7=fs();function Aw(o){return o&&o.__esModule?o:{default:o}}function I7(o){if((0,O7.isAsync)(o))return function(...f){let h=f.pop(),y=o.apply(this,f);return Iw(y,h)};return(0,T7.default)(function(f,h){var y;try{y=o.apply(this,f)}catch(x){return h(x)}if(y&&typeof y.then==="function")return Iw(y,h);else h(null,y)})}function Iw(o,f){return o.then((h)=>{Rw(f,null,h)},(h)=>{Rw(f,h&&(h instanceof Error||h.message)?h:Error(h))})}function Rw(o,f,h){try{o(f,h)}catch(y){(0,k7.default)((x)=>{throw x},y)}}Pw.exports=r0.default});var fs=i(function(Lw){Object.defineProperty(Lw,"__esModule",{value:!0});Lw.isAsyncIterable=Lw.isAsyncGenerator=Lw.isAsync=void 0;var A7=Bw(),P7=B7(A7);function B7(o){return o&&o.__esModule?o:{default:o}}function Dw(o){return o[Symbol.toStringTag]==="AsyncFunction"}function D7(o){return o[Symbol.toStringTag]==="AsyncGenerator"}function L7(o){return typeof o[Symbol.asyncIterator]==="function"}function N7(o){if(typeof o!=="function")throw Error("expected a function");return Dw(o)?(0,P7.default)(o):o}Lw.default=N7;Lw.isAsync=Dw;Lw.isAsyncGenerator=D7;Lw.isAsyncIterable=L7});var Ta=i(function(o0,jw){Object.defineProperty(o0,"__esModule",{value:!0});o0.default=F7;function F7(o,f){if(!f)f=o.length;if(!f)throw Error("arity is undefined");function h(...y){if(typeof y[f-1]==="function")return o.apply(this,y);return new Promise((x,_)=>{y[f-1]=(z,...C)=>{if(z)return _(z);x(C.length>1?C:C[0])},o.apply(this,y)})}return h}jw.exports=o0.default});var qw=i(function(i0,Mw){Object.defineProperty(i0,"__esModule",{value:!0});var $7=Hd(),V7=n0($7),H7=fs(),G7=n0(H7),K7=Ta(),W7=n0(K7);function n0(o){return o&&o.__esModule?o:{default:o}}i0.default=(0,W7.default)((o,f,h)=>{var y=(0,V7.default)(f)?[]:{};o(f,(x,_,z)=>{(0,G7.default)(x)((C,...w)=>{if(w.length<2)[w]=w;y[_]=w,z(C)})},(x)=>h(x,y))},3);Mw.exports=i0.default});var a0=i(function(s0,Fw){Object.defineProperty(s0,"__esModule",{value:!0});s0.default=Z7;function Z7(o){function f(...h){if(o===null)return;var y=o;o=null,y.apply(this,h)}return Object.assign(f,o),f}Fw.exports=s0.default});var $w=i(function(c0,Uw){Object.defineProperty(c0,"__esModule",{value:!0});c0.default=function(o){return o[Symbol.iterator]&&o[Symbol.iterator]()};Uw.exports=c0.default});var Gw=i(function(l0,Hw){Object.defineProperty(l0,"__esModule",{value:!0});l0.default=sG;var Q7=Hd(),eG=Vw(Q7),tG=$w(),rG=Vw(tG);function Vw(o){return o&&o.__esModule?o:{default:o}}function oG(o){var f=-1,h=o.length;return function(){return++f<h?{value:o[f],key:f}:null}}function nG(o){var f=-1;return function(){var y=o.next();if(y.done)return null;return f++,{value:y.value,key:f}}}function iG(o){var f=o?Object.keys(o):[],h=-1,y=f.length;return function x(){var _=f[++h];if(_==="__proto__")return x();return h<y?{value:o[_],key:_}:null}}function sG(o){if((0,eG.default)(o))return oG(o);var f=(0,rG.default)(o);return f?nG(f):iG(o)}Hw.exports=l0.default});var d0=i(function(u0,Kw){Object.defineProperty(u0,"__esModule",{value:!0});u0.default=cG;function cG(o){return function(...f){if(o===null)throw Error("Callback was already called.");var h=o;o=null,h.apply(this,f)}}Kw.exports=u0.default});var Gd=i(function(p0,Ww){Object.defineProperty(p0,"__esModule",{value:!0});var uG={};p0.default=uG;Ww.exports=p0.default});var Zw=i(function(f0,Jw){Object.defineProperty(f0,"__esModule",{value:!0});f0.default=mG;var pG=Gd(),fG=hG(pG);function hG(o){return o&&o.__esModule?o:{default:o}}function mG(o,f,h,y){let x=!1,_=!1,z=!1,C=0,w=0;function S(){if(C>=f||z||x)return;z=!0,o.next().then(({value:O,done:R})=>{if(_||x)return;if(z=!1,R){if(x=!0,C<=0)y(null);return}C++,h(O,w,E),w++,S()}).catch(k)}function E(O,R){if(C-=1,_)return;if(O)return k(O);if(O===!1){x=!0,_=!0;return}if(R===fG.default||x&&C<=0)return x=!0,y(null);S()}function k(O){if(_)return;z=!1,x=!0,y(O)}S()}Jw.exports=f0.default});var eS=i(function(h0,Qw){Object.defineProperty(h0,"__esModule",{value:!0});var yG=a0(),bG=ol(yG),vG=Gw(),xG=ol(vG),_G=d0(),zG=ol(_G),Yw=fs(),CG=Zw(),Xw=ol(CG),wG=Gd(),SG=ol(wG);function ol(o){return o&&o.__esModule?o:{default:o}}h0.default=(o)=>(f,h,y)=>{if(y=(0,bG.default)(y),o<=0)throw RangeError("concurrency limit cannot be less than 1");if(!f)return y(null);if((0,Yw.isAsyncGenerator)(f))return(0,Xw.default)(f,o,h,y);if((0,Yw.isAsyncIterable)(f))return(0,Xw.default)(f[Symbol.asyncIterator](),o,h,y);var x=(0,xG.default)(f),_=!1,z=!1,C=0,w=!1;function S(k,O){if(z)return;if(C-=1,k)_=!0,y(k);else if(k===!1)_=!0,z=!0;else if(O===SG.default||_&&C<=0)return _=!0,y(null);else if(!w)E()}function E(){w=!0;while(C<o&&!_){var k=x();if(k===null){if(_=!0,C<=0)y(null);return}C+=1,h(k.value,k.key,(0,zG.default)(S))}w=!1}E()};Qw.exports=h0.default});var y0=i(function(g0,tS){Object.defineProperty(g0,"__esModule",{value:!0});var EG=eS(),kG=m0(EG),OG=fs(),IG=m0(OG),RG=Ta(),AG=m0(RG);function m0(o){return o&&o.__esModule?o:{default:o}}function PG(o,f,h,y){return(0,kG.default)(f)(o,(0,IG.default)(h),y)}g0.default=(0,AG.default)(PG,4);tS.exports=g0.default});var nS=i(function(b0,oS){Object.defineProperty(b0,"__esModule",{value:!0});var DG=y0(),LG=rS(DG),NG=Ta(),jG=rS(NG);function rS(o){return o&&o.__esModule?o:{default:o}}function MG(o,f,h){return(0,LG.default)(o,1,f,h)}b0.default=(0,jG.default)(MG,3);oS.exports=b0.default});var aS=i(function(v0,sS){Object.defineProperty(v0,"__esModule",{value:!0});v0.default=HG;var FG=qw(),UG=iS(FG),$G=nS(),VG=iS($G);function iS(o){return o&&o.__esModule?o:{default:o}}function HG(o,f){return(0,UG.default)(VG.default,o,f)}sS.exports=v0.default});var x0=i(function(YIe,lS){lS.exports=Zn;var Kd=mi().codes,{ERR_METHOD_NOT_IMPLEMENTED:KG,ERR_MULTIPLE_CALLBACK:WG,ERR_TRANSFORM_ALREADY_TRANSFORMING:JG,ERR_TRANSFORM_WITH_LENGTH_0:ZG}=Kd,Wd=ps();va()(Zn,Wd);function YG(o,f){var h=this._transformState;h.transforming=!1;var y=h.writecb;if(y===null)return this.emit("error",new WG);if(h.writechunk=null,h.writecb=null,f!=null)this.push(f);y(o);var x=this._readableState;if(x.reading=!1,x.needReadable||x.length<x.highWaterMark)this._read(x.highWaterMark)}function Zn(o){if(!(this instanceof Zn))return new Zn(o);if(Wd.call(this,o),this._transformState={afterTransform:YG.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,o){if(typeof o.transform==="function")this._transform=o.transform;if(typeof o.flush==="function")this._flush=o.flush}this.on("prefinish",XG)}function XG(){var o=this;if(typeof this._flush==="function"&&!this._readableState.destroyed)this._flush(function(f,h){cS(o,f,h)});else cS(this,null,null)}Zn.prototype.push=function(o,f){return this._transformState.needTransform=!1,Wd.prototype.push.call(this,o,f)};Zn.prototype._transform=function(o,f,h){h(new KG("_transform()"))};Zn.prototype._write=function(o,f,h){var y=this._transformState;if(y.writecb=h,y.writechunk=o,y.writeencoding=f,!y.transforming){var x=this._readableState;if(y.needTransform||x.needReadable||x.length<x.highWaterMark)this._read(x.highWaterMark)}};Zn.prototype._read=function(o){var f=this._transformState;if(f.writechunk!==null&&!f.transforming)f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform);else f.needTransform=!0};Zn.prototype._destroy=function(o,f){Wd.prototype._destroy.call(this,o,function(h){f(h)})};function cS(o,f,h){if(f)return o.emit("error",f);if(h!=null)o.push(h);if(o._writableState.length)throw new ZG;if(o._transformState.transforming)throw new JG;return o.push(null)}});var pS=i(function(XIe,dS){dS.exports=nl;var uS=x0();va()(nl,uS);function nl(o){if(!(this instanceof nl))return new nl(o);uS.call(this,o)}nl.prototype._transform=function(o,f,h){h(null,o)}});var yS=i(function(QIe,gS){var _0;function QG(o){var f=!1;return function(){if(f)return;f=!0,o.apply(void 0,arguments)}}var mS=mi().codes,{ERR_MISSING_ARGS:eK,ERR_STREAM_DESTROYED:tK}=mS;function fS(o){if(o)throw o}function rK(o){return o.setHeader&&typeof o.abort==="function"}function oK(o,f,h,y){y=QG(y);var x=!1;if(o.on("close",function(){x=!0}),_0===void 0)_0=Dd();_0(o,{readable:f,writable:h},function(z){if(z)return y(z);x=!0,y()});var _=!1;return function(z){if(x)return;if(_)return;if(_=!0,rK(o))return o.abort();if(typeof o.destroy==="function")return o.destroy();y(z||new tK("pipe"))}}function hS(o){o()}function nK(o,f){return o.pipe(f)}function iK(o){if(!o.length)return fS;if(typeof o[o.length-1]!=="function")return fS;return o.pop()}function sK(){for(var o=arguments.length,f=Array(o),h=0;h<o;h++)f[h]=arguments[h];var y=iK(f);if(Array.isArray(f[0]))f=f[0];if(f.length<2)throw new eK("streams");var x,_=f.map(function(z,C){var w=C<f.length-1,S=C>0;return oK(z,w,S,function(E){if(!x)x=E;if(E)_.forEach(hS);if(w)return;_.forEach(hS),y(x)})});return f.reduce(nK)}gS.exports=sK});var hs=i(function(Do,sl){var il=c("stream");if(process.env.READABLE_STREAM==="disable"&&il)sl.exports=il.Readable,Object.assign(sl.exports,il),sl.exports.Stream=il;else Do=sl.exports=Gg(),Do.Stream=il||Do,Do.Readable=Do,Do.Writable=Ud(),Do.Duplex=ps(),Do.Transform=x0(),Do.PassThrough=pS(),Do.finished=Dd(),Do.pipeline=yS()});var xS=i(function(eRe,vS){var Ea=[],al=[],z0=function(){};function w0(o){if(~Ea.indexOf(o))return!1;return Ea.push(o),!0}function S0(o){z0=o}function aK(o){var f=[];for(var h=0;h<Ea.length;h++){if(Ea[h].async){f.push(Ea[h]);continue}if(Ea[h](o))return!0}if(!f.length)return!1;return new Promise(function(x){Promise.all(f.map(function(z){return z(o)})).then(function(z){x(z.some(Boolean))})})}function T0(o){if(~al.indexOf(o))return!1;return al.push(o),!0}function C0(){z0.apply(z0,arguments)}function bS(o){for(var f=0;f<al.length;f++)o=al[f].apply(al[f],arguments);return o}function E0(o,f){var h=Object.prototype.hasOwnProperty;for(var y in f)if(h.call(f,y))o[y]=f[y];return o}function cK(o){return o.enabled=!1,o.modify=T0,o.set=S0,o.use=w0,E0(function(){return!1},o)}function lK(o){function f(){var h=Array.prototype.slice.call(arguments,0);return C0.call(C0,o,bS(h,o)),!0}return o.enabled=!0,o.modify=T0,o.set=S0,o.use=w0,E0(f,o)}vS.exports=function(f){return f.introduce=E0,f.enabled=aK,f.process=bS,f.modify=T0,f.write=C0,f.nope=cK,f.yep=lK,f.set=S0,f.use=w0,f}});var TS=i(function(tRe,SS){var Sn={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]},zS=Object.create(null);for(let o in Sn)if(Object.hasOwn(Sn,o))zS[Sn[o]]=o;var yr={to:{},get:{}};yr.get=function(o){let f=o.slice(0,3).toLowerCase(),h,y;switch(f){case"hsl":{h=yr.get.hsl(o),y="hsl";break}case"hwb":{h=yr.get.hwb(o),y="hwb";break}default:{h=yr.get.rgb(o),y="rgb";break}}if(!h)return null;return{model:y,value:h}};yr.get.rgb=function(o){if(!o)return null;let f=/^#([a-f\d]{3,4})$/i,h=/^#([a-f\d]{6})([a-f\d]{2})?$/i,y=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,x=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,_=/^(\w+)$/,z=[0,0,0,1],C,w,S;if(C=o.match(h)){S=C[2],C=C[1];for(w=0;w<3;w++){let E=w*2;z[w]=Number.parseInt(C.slice(E,E+2),16)}if(S)z[3]=Number.parseInt(S,16)/255}else if(C=o.match(f)){C=C[1],S=C[3];for(w=0;w<3;w++)z[w]=Number.parseInt(C[w]+C[w],16);if(S)z[3]=Number.parseInt(S+S,16)/255}else if(C=o.match(y)){for(w=0;w<3;w++)z[w]=Number.parseInt(C[w+1],10);if(C[4])z[3]=C[5]?Number.parseFloat(C[4])*0.01:Number.parseFloat(C[4])}else if(C=o.match(x)){for(w=0;w<3;w++)z[w]=Math.round(Number.parseFloat(C[w+1])*2.55);if(C[4])z[3]=C[5]?Number.parseFloat(C[4])*0.01:Number.parseFloat(C[4])}else if(C=o.match(_)){if(C[1]==="transparent")return[0,0,0,0];if(!Object.hasOwn(Sn,C[1]))return null;return z=Sn[C[1]],z[3]=1,z}else return null;for(w=0;w<3;w++)z[w]=xi(z[w],0,255);return z[3]=xi(z[3],0,1),z};yr.get.hsl=function(o){if(!o)return null;let f=/^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*)?\)$/,h=o.match(f);if(h){let y=Number.parseFloat(h[4]),x=(Number.parseFloat(h[1])%360+360)%360,_=xi(Number.parseFloat(h[2]),0,100),z=xi(Number.parseFloat(h[3]),0,100),C=xi(Number.isNaN(y)?1:y,0,1);return[x,_,z,C]}return null};yr.get.hwb=function(o){if(!o)return null;let f=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,h=o.match(f);if(h){let y=Number.parseFloat(h[4]),x=(Number.parseFloat(h[1])%360+360)%360,_=xi(Number.parseFloat(h[2]),0,100),z=xi(Number.parseFloat(h[3]),0,100),C=xi(Number.isNaN(y)?1:y,0,1);return[x,_,z,C]}return null};yr.to.hex=function(...o){return"#"+Jd(o[0])+Jd(o[1])+Jd(o[2])+(o[3]<1?Jd(Math.round(o[3]*255)):"")};yr.to.rgb=function(...o){return o.length<4||o[3]===1?"rgb("+Math.round(o[0])+", "+Math.round(o[1])+", "+Math.round(o[2])+")":"rgba("+Math.round(o[0])+", "+Math.round(o[1])+", "+Math.round(o[2])+", "+o[3]+")"};yr.to.rgb.percent=function(...o){let f=Math.round(o[0]/255*100),h=Math.round(o[1]/255*100),y=Math.round(o[2]/255*100);return o.length<4||o[3]===1?"rgb("+f+"%, "+h+"%, "+y+"%)":"rgba("+f+"%, "+h+"%, "+y+"%, "+o[3]+")"};yr.to.hsl=function(...o){return o.length<4||o[3]===1?"hsl("+o[0]+", "+o[1]+"%, "+o[2]+"%)":"hsla("+o[0]+", "+o[1]+"%, "+o[2]+"%, "+o[3]+")"};yr.to.hwb=function(...o){let f="";if(o.length>=4&&o[3]!==1)f=", "+o[3];return"hwb("+o[0]+", "+o[1]+"%, "+o[2]+"%"+f+")"};yr.to.keyword=function(...o){return zS[o.slice(0,3)]};function xi(o,f,h){return Math.min(Math.max(f,o),h)}function Jd(o){let f=Math.round(o).toString(16).toUpperCase();return f.length<2?"0"+f:f}var CS={};for(let o of Object.keys(Sn))CS[Sn[o]]=o;var we={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"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},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"]}},Yn=0.008856451679035631;function ka(o){let f=o>0.0031308?1.055*o**0.4166666666666667-0.055:o*12.92;return Math.min(Math.max(0,f),1)}function Oa(o){return o>0.04045?((o+0.055)/1.055)**2.4:o/12.92}for(let o of Object.keys(we)){if(!("channels"in we[o]))throw Error("missing channels property: "+o);if(!("labels"in we[o]))throw Error("missing channel labels property: "+o);if(we[o].labels.length!==we[o].channels)throw Error("channel and label counts mismatch: "+o);let{channels:f,labels:h}=we[o];delete we[o].channels,delete we[o].labels,Object.defineProperty(we[o],"channels",{value:f}),Object.defineProperty(we[o],"labels",{value:h})}we.rgb.hsl=function(o){let f=o[0]/255,h=o[1]/255,y=o[2]/255,x=Math.min(f,h,y),_=Math.max(f,h,y),z=_-x,C,w;switch(_){case x:{C=0;break}case f:{C=(h-y)/z;break}case h:{C=2+(y-f)/z;break}case y:{C=4+(f-h)/z;break}}if(C=Math.min(C*60,360),C<0)C+=360;let S=(x+_)/2;if(_===x)w=0;else if(S<=0.5)w=z/(_+x);else w=z/(2-_-x);return[C,w*100,S*100]};we.rgb.hsv=function(o){let f,h,y,x,_,z=o[0]/255,C=o[1]/255,w=o[2]/255,S=Math.max(z,C,w),E=S-Math.min(z,C,w),k=function(O){return(S-O)/6/E+0.5};if(E===0)x=0,_=0;else{switch(_=E/S,f=k(z),h=k(C),y=k(w),S){case z:{x=y-h;break}case C:{x=0.3333333333333333+f-y;break}case w:{x=0.6666666666666666+h-f;break}}if(x<0)x+=1;else if(x>1)x-=1}return[x*360,_*100,S*100]};we.rgb.hwb=function(o){let f=o[0],h=o[1],y=o[2],x=we.rgb.hsl(o)[0],_=0.00392156862745098*Math.min(f,Math.min(h,y));return y=1-0.00392156862745098*Math.max(f,Math.max(h,y)),[x,_*100,y*100]};we.rgb.oklab=function(o){let f=Oa(o[0]/255),h=Oa(o[1]/255),y=Oa(o[2]/255),x=Math.cbrt(0.4122214708*f+0.5363325363*h+0.0514459929*y),_=Math.cbrt(0.2119034982*f+0.6806995451*h+0.1073969566*y),z=Math.cbrt(0.0883024619*f+0.2817188376*h+0.6299787005*y),C=0.2104542553*x+0.793617785*_-0.0040720468*z,w=1.9779984951*x-2.428592205*_+0.4505937099*z,S=0.0259040371*x+0.7827717662*_-0.808675766*z;return[C*100,w*100,S*100]};we.rgb.cmyk=function(o){let f=o[0]/255,h=o[1]/255,y=o[2]/255,x=Math.min(1-f,1-h,1-y),_=(1-f-x)/(1-x)||0,z=(1-h-x)/(1-x)||0,C=(1-y-x)/(1-x)||0;return[_*100,z*100,C*100,x*100]};function uK(o,f){return(o[0]-f[0])**2+(o[1]-f[1])**2+(o[2]-f[2])**2}we.rgb.keyword=function(o){let f=CS[o];if(f)return f;let h=Number.POSITIVE_INFINITY,y;for(let x of Object.keys(Sn)){let _=Sn[x],z=uK(o,_);if(z<h)h=z,y=x}return y};we.keyword.rgb=function(o){return Sn[o]};we.rgb.xyz=function(o){let f=Oa(o[0]/255),h=Oa(o[1]/255),y=Oa(o[2]/255),x=f*0.4124564+h*0.3575761+y*0.1804375,_=f*0.2126729+h*0.7151522+y*0.072175,z=f*0.0193339+h*0.119192+y*0.9503041;return[x*100,_*100,z*100]};we.rgb.lab=function(o){let f=we.rgb.xyz(o),h=f[0],y=f[1],x=f[2];h/=95.047,y/=100,x/=108.883,h=h>Yn?h**0.3333333333333333:7.787*h+0.13793103448275862,y=y>Yn?y**0.3333333333333333:7.787*y+0.13793103448275862,x=x>Yn?x**0.3333333333333333:7.787*x+0.13793103448275862;let _=116*y-16,z=500*(h-y),C=200*(y-x);return[_,z,C]};we.hsl.rgb=function(o){let f=o[0]/360,h=o[1]/100,y=o[2]/100,x,_;if(h===0)return _=y*255,[_,_,_];let z=y<0.5?y*(1+h):y+h-y*h,C=2*y-z,w=[0,0,0];for(let S=0;S<3;S++){if(x=f+0.3333333333333333*-(S-1),x<0)x++;if(x>1)x--;if(6*x<1)_=C+(z-C)*6*x;else if(2*x<1)_=z;else if(3*x<2)_=C+(z-C)*(0.6666666666666666-x)*6;else _=C;w[S]=_*255}return w};we.hsl.hsv=function(o){let f=o[0],h=o[1]/100,y=o[2]/100,x=h,_=Math.max(y,0.01);y*=2,h*=y<=1?y:2-y,x*=_<=1?_:2-_;let z=(y+h)/2,C=y===0?2*x/(_+x):2*h/(y+h);return[f,C*100,z*100]};we.hsv.rgb=function(o){let f=o[0]/60,h=o[1]/100,y=o[2]/100,x=Math.floor(f)%6,_=f-Math.floor(f),z=255*y*(1-h),C=255*y*(1-h*_),w=255*y*(1-h*(1-_));switch(y*=255,x){case 0:return[y,w,z];case 1:return[C,y,z];case 2:return[z,y,w];case 3:return[z,C,y];case 4:return[w,z,y];case 5:return[y,z,C]}};we.hsv.hsl=function(o){let f=o[0],h=o[1]/100,y=o[2]/100,x=Math.max(y,0.01),_,z;z=(2-h)*y;let C=(2-h)*x;return _=h*x,_/=C<=1?C:2-C,_=_||0,z/=2,[f,_*100,z*100]};we.hwb.rgb=function(o){let f=o[0]/360,h=o[1]/100,y=o[2]/100,x=h+y,_;if(x>1)h/=x,y/=x;let z=Math.floor(6*f),C=1-y;if(_=6*f-z,(z&1)!==0)_=1-_;let w=h+_*(C-h),S,E,k;switch(z){default:case 6:case 0:{S=C,E=w,k=h;break}case 1:{S=w,E=C,k=h;break}case 2:{S=h,E=C,k=w;break}case 3:{S=h,E=w,k=C;break}case 4:{S=w,E=h,k=C;break}case 5:{S=C,E=h,k=w;break}}return[S*255,E*255,k*255]};we.cmyk.rgb=function(o){let f=o[0]/100,h=o[1]/100,y=o[2]/100,x=o[3]/100,_=1-Math.min(1,f*(1-x)+x),z=1-Math.min(1,h*(1-x)+x),C=1-Math.min(1,y*(1-x)+x);return[_*255,z*255,C*255]};we.xyz.rgb=function(o){let f=o[0]/100,h=o[1]/100,y=o[2]/100,x,_,z;return x=f*3.2404542+h*-1.5371385+y*-0.4985314,_=f*-0.969266+h*1.8760108+y*0.041556,z=f*0.0556434+h*-0.2040259+y*1.0572252,x=ka(x),_=ka(_),z=ka(z),[x*255,_*255,z*255]};we.xyz.lab=function(o){let f=o[0],h=o[1],y=o[2];f/=95.047,h/=100,y/=108.883,f=f>Yn?f**0.3333333333333333:7.787*f+0.13793103448275862,h=h>Yn?h**0.3333333333333333:7.787*h+0.13793103448275862,y=y>Yn?y**0.3333333333333333:7.787*y+0.13793103448275862;let x=116*h-16,_=500*(f-h),z=200*(h-y);return[x,_,z]};we.xyz.oklab=function(o){let f=o[0]/100,h=o[1]/100,y=o[2]/100,x=Math.cbrt(0.8189330101*f+0.3618667424*h-0.1288597137*y),_=Math.cbrt(0.0329845436*f+0.9293118715*h+0.0361456387*y),z=Math.cbrt(0.0482003018*f+0.2643662691*h+0.633851707*y),C=0.2104542553*x+0.793617785*_-0.0040720468*z,w=1.9779984951*x-2.428592205*_+0.4505937099*z,S=0.0259040371*x+0.7827717662*_-0.808675766*z;return[C*100,w*100,S*100]};we.oklab.oklch=function(o){return we.lab.lch(o)};we.oklab.xyz=function(o){let f=o[0]/100,h=o[1]/100,y=o[2]/100,x=(0.999999998*f+0.396337792*h+0.215803758*y)**3,_=(1.000000008*f-0.105561342*h-0.063854175*y)**3,z=(1.000000055*f-0.089484182*h-1.291485538*y)**3,C=1.227013851*x-0.55779998*_+0.281256149*z,w=-0.040580178*x+1.11225687*_-0.071676679*z,S=-0.076381285*x-0.421481978*_+1.58616322*z;return[C*100,w*100,S*100]};we.oklab.rgb=function(o){let f=o[0]/100,h=o[1]/100,y=o[2]/100,x=(f+0.3963377774*h+0.2158037573*y)**3,_=(f-0.1055613458*h-0.0638541728*y)**3,z=(f-0.0894841775*h-1.291485548*y)**3,C=ka(4.0767416621*x-3.3077115913*_+0.2309699292*z),w=ka(-1.2684380046*x+2.6097574011*_-0.3413193965*z),S=ka(-0.0041960863*x-0.7034186147*_+1.707614701*z);return[C*255,w*255,S*255]};we.oklch.oklab=function(o){return we.lch.lab(o)};we.lab.xyz=function(o){let f=o[0],h=o[1],y=o[2],x,_,z;_=(f+16)/116,x=h/500+_,z=_-y/200;let C=_**3,w=x**3,S=z**3;return _=C>Yn?C:(_-0.13793103448275862)/7.787,x=w>Yn?w:(x-0.13793103448275862)/7.787,z=S>Yn?S:(z-0.13793103448275862)/7.787,x*=95.047,_*=100,z*=108.883,[x,_,z]};we.lab.lch=function(o){let f=o[0],h=o[1],y=o[2],x;if(x=Math.atan2(y,h)*360/2/Math.PI,x<0)x+=360;let z=Math.sqrt(h*h+y*y);return[f,z,x]};we.lch.lab=function(o){let f=o[0],h=o[1],x=o[2]/360*2*Math.PI,_=h*Math.cos(x),z=h*Math.sin(x);return[f,_,z]};we.rgb.ansi16=function(o,f=null){let[h,y,x]=o,_=f===null?we.rgb.hsv(o)[2]:f;if(_=Math.round(_/50),_===0)return 30;let z=30+(Math.round(x/255)<<2|Math.round(y/255)<<1|Math.round(h/255));if(_===2)z+=60;return z};we.hsv.ansi16=function(o){return we.rgb.ansi16(we.hsv.rgb(o),o[2])};we.rgb.ansi256=function(o){let f=o[0],h=o[1],y=o[2];if(f>>4===h>>4&&h>>4===y>>4){if(f<8)return 16;if(f>248)return 231;return Math.round((f-8)/247*24)+232}return 16+36*Math.round(f/255*5)+6*Math.round(h/255*5)+Math.round(y/255*5)};we.ansi16.rgb=function(o){o=o[0];let f=o%10;if(f===0||f===7){if(o>50)f+=3.5;return f=f/10.5*255,[f,f,f]}let h=(Math.trunc(o>50)+1)*0.5,y=(f&1)*h*255,x=(f>>1&1)*h*255,_=(f>>2&1)*h*255;return[y,x,_]};we.ansi256.rgb=function(o){if(o=o[0],o>=232){let _=(o-232)*10+8;return[_,_,_]}o-=16;let f,h=Math.floor(o/36)/5*255,y=Math.floor((f=o%36)/6)/5*255,x=f%6/5*255;return[h,y,x]};we.rgb.hex=function(o){let h=(((Math.round(o[0])&255)<<16)+((Math.round(o[1])&255)<<8)+(Math.round(o[2])&255)).toString(16).toUpperCase();return"000000".slice(h.length)+h};we.hex.rgb=function(o){let f=o.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!f)return[0,0,0];let h=f[0];if(f[0].length===3)h=[...h].map((C)=>C+C).join("");let y=Number.parseInt(h,16),x=y>>16&255,_=y>>8&255,z=y&255;return[x,_,z]};we.rgb.hcg=function(o){let f=o[0]/255,h=o[1]/255,y=o[2]/255,x=Math.max(Math.max(f,h),y),_=Math.min(Math.min(f,h),y),z=x-_,C,w=z<1?_/(1-z):0;if(z<=0)C=0;else if(x===f)C=(h-y)/z%6;else if(x===h)C=2+(y-f)/z;else C=4+(f-h)/z;return C/=6,C%=1,[C*360,z*100,w*100]};we.hsl.hcg=function(o){let f=o[1]/100,h=o[2]/100,y=h<0.5?2*f*h:2*f*(1-h),x=0;if(y<1)x=(h-0.5*y)/(1-y);return[o[0],y*100,x*100]};we.hsv.hcg=function(o){let f=o[1]/100,h=o[2]/100,y=f*h,x=0;if(y<1)x=(h-y)/(1-y);return[o[0],y*100,x*100]};we.hcg.rgb=function(o){let f=o[0]/360,h=o[1]/100,y=o[2]/100;if(h===0)return[y*255,y*255,y*255];let x=[0,0,0],_=f%1*6,z=_%1,C=1-z,w=0;switch(Math.floor(_)){case 0:{x[0]=1,x[1]=z,x[2]=0;break}case 1:{x[0]=C,x[1]=1,x[2]=0;break}case 2:{x[0]=0,x[1]=1,x[2]=z;break}case 3:{x[0]=0,x[1]=C,x[2]=1;break}case 4:{x[0]=z,x[1]=0,x[2]=1;break}default:x[0]=1,x[1]=0,x[2]=C}return w=(1-h)*y,[(h*x[0]+w)*255,(h*x[1]+w)*255,(h*x[2]+w)*255]};we.hcg.hsv=function(o){let f=o[1]/100,h=o[2]/100,y=f+h*(1-f),x=0;if(y>0)x=f/y;return[o[0],x*100,y*100]};we.hcg.hsl=function(o){let f=o[1]/100,y=o[2]/100*(1-f)+0.5*f,x=0;if(y>0&&y<0.5)x=f/(2*y);else if(y>=0.5&&y<1)x=f/(2*(1-y));return[o[0],x*100,y*100]};we.hcg.hwb=function(o){let f=o[1]/100,h=o[2]/100,y=f+h*(1-f);return[o[0],(y-f)*100,(1-y)*100]};we.hwb.hcg=function(o){let f=o[1]/100,y=1-o[2]/100,x=y-f,_=0;if(x<1)_=(y-x)/(1-x);return[o[0],x*100,_*100]};we.apple.rgb=function(o){return[o[0]/65535*255,o[1]/65535*255,o[2]/65535*255]};we.rgb.apple=function(o){return[o[0]/255*65535,o[1]/255*65535,o[2]/255*65535]};we.gray.rgb=function(o){return[o[0]/100*255,o[0]/100*255,o[0]/100*255]};we.gray.hsl=function(o){return[0,0,o[0]]};we.gray.hsv=we.gray.hsl;we.gray.hwb=function(o){return[0,100,o[0]]};we.gray.cmyk=function(o){return[0,0,0,o[0]]};we.gray.lab=function(o){return[o[0],0,0]};we.gray.hex=function(o){let f=Math.round(o[0]/100*255)&255,y=((f<<16)+(f<<8)+f).toString(16).toUpperCase();return"000000".slice(y.length)+y};we.rgb.gray=function(o){return[(o[0]+o[1]+o[2])/3/255*100]};function dK(){let o={},f=Object.keys(we);for(let{length:h}=f,y=0;y<h;y++)o[f[y]]={distance:-1,parent:null};return o}function pK(o){let f=dK(),h=[o];f[o].distance=0;while(h.length>0){let y=h.pop(),x=Object.keys(we[y]);for(let{length:_}=x,z=0;z<_;z++){let C=x[z],w=f[C];if(w.distance===-1)w.distance=f[y].distance+1,w.parent=y,h.unshift(C)}}return f}function fK(o,f){return function(h){return f(o(h))}}function hK(o,f){let h=[f[o].parent,o],y=we[f[o].parent][o],x=f[o].parent;while(f[x].parent)h.unshift(f[x].parent),y=fK(we[f[x].parent][x],y),x=f[x].parent;return y.conversion=h,y}function mK(o){let f=pK(o),h={},y=Object.keys(f);for(let{length:x}=y,_=0;_<x;_++){let z=y[_];if(f[z].parent===null)continue;h[z]=hK(z,f)}return h}var zr={},gK=Object.keys(we);function yK(o){let f=function(...h){let y=h[0];if(y===void 0||y===null)return y;if(y.length>1)h=y;return o(h)};if("conversion"in o)f.conversion=o.conversion;return f}function bK(o){let f=function(...h){let y=h[0];if(y===void 0||y===null)return y;if(y.length>1)h=y;let x=o(h);if(typeof x==="object")for(let{length:_}=x,z=0;z<_;z++)x[z]=Math.round(x[z]);return x};if("conversion"in o)f.conversion=o.conversion;return f}for(let o of gK){zr[o]={},Object.defineProperty(zr[o],"channels",{value:we[o].channels}),Object.defineProperty(zr[o],"labels",{value:we[o].labels});let f=mK(o),h=Object.keys(f);for(let y of h){let x=f[y];zr[o][y]=bK(x),zr[o][y].raw=yK(x)}}var wS=["keyword","gray","hex"],k0={};for(let o of Object.keys(zr))k0[[...zr[o].labels].sort().join("")]=o;var O0={};function gr(o,f){if(!(this instanceof gr))return new gr(o,f);if(f&&f in wS)f=null;if(f&&!(f in zr))throw Error("Unknown model: "+f);let h,y;if(o==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(o instanceof gr)this.model=o.model,this.color=[...o.color],this.valpha=o.valpha;else if(typeof o==="string"){let x=yr.get(o);if(x===null)throw Error("Unable to parse color from string: "+o);this.model=x.model,y=zr[this.model].channels,this.color=x.value.slice(0,y),this.valpha=typeof x.value[y]==="number"?x.value[y]:1}else if(o.length>0){this.model=f||"rgb",y=zr[this.model].channels;let x=Array.prototype.slice.call(o,0,y);this.color=I0(x,y),this.valpha=typeof o[y]==="number"?o[y]:1}else if(typeof o==="number")this.model="rgb",this.color=[o>>16&255,o>>8&255,o&255],this.valpha=1;else{this.valpha=1;let x=Object.keys(o);if("alpha"in o)x.splice(x.indexOf("alpha"),1),this.valpha=typeof o.alpha==="number"?o.alpha:0;let _=x.sort().join("");if(!(_ in k0))throw Error("Unable to parse color from object: "+JSON.stringify(o));this.model=k0[_];let{labels:z}=zr[this.model],C=[];for(h=0;h<z.length;h++)C.push(o[z[h]]);this.color=I0(C)}if(O0[this.model]){y=zr[this.model].channels;for(h=0;h<y;h++){let x=O0[this.model][h];if(x)this.color[h]=x(this.color[h])}}if(this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze)Object.freeze(this)}gr.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(o){let f=this.model in yr.to?this:this.rgb();f=f.round(typeof o==="number"?o:1);let h=f.valpha===1?f.color:[...f.color,this.valpha];return yr.to[f.model](...h)},percentString(o){let f=this.rgb().round(typeof o==="number"?o:1),h=f.valpha===1?f.color:[...f.color,this.valpha];return yr.to.rgb.percent(...h)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let o={},{channels:f}=zr[this.model],{labels:h}=zr[this.model];for(let y=0;y<f;y++)o[h[y]]=this.color[y];if(this.valpha!==1)o.alpha=this.valpha;return o},unitArray(){let o=this.rgb().color;if(o[0]/=255,o[1]/=255,o[2]/=255,this.valpha!==1)o.push(this.valpha);return o},unitObject(){let o=this.rgb().object();if(o.r/=255,o.g/=255,o.b/=255,this.valpha!==1)o.alpha=this.valpha;return o},round(o){return o=Math.max(o||0,0),new gr([...this.color.map(xK(o)),this.valpha],this.model)},alpha(o){if(o!==void 0)return new gr([...this.color,Math.max(0,Math.min(1,o))],this.model);return this.valpha},red:er("rgb",0,mr(255)),green:er("rgb",1,mr(255)),blue:er("rgb",2,mr(255)),hue:er(["hsl","hsv","hsl","hwb","hcg"],0,(o)=>(o%360+360)%360),saturationl:er("hsl",1,mr(100)),lightness:er("hsl",2,mr(100)),saturationv:er("hsv",1,mr(100)),value:er("hsv",2,mr(100)),chroma:er("hcg",1,mr(100)),gray:er("hcg",2,mr(100)),white:er("hwb",1,mr(100)),wblack:er("hwb",2,mr(100)),cyan:er("cmyk",0,mr(100)),magenta:er("cmyk",1,mr(100)),yellow:er("cmyk",2,mr(100)),black:er("cmyk",3,mr(100)),x:er("xyz",0,mr(95.047)),y:er("xyz",1,mr(100)),z:er("xyz",2,mr(108.833)),l:er("lab",0,mr(100)),a:er("lab",1),b:er("lab",2),keyword(o){if(o!==void 0)return new gr(o);return zr[this.model].keyword(this.color)},hex(o){if(o!==void 0)return new gr(o);return yr.to.hex(...this.rgb().round().color)},hexa(o){if(o!==void 0)return new gr(o);let f=this.rgb().round().color,h=Math.round(this.valpha*255).toString(16).toUpperCase();if(h.length===1)h="0"+h;return yr.to.hex(...f)+h},rgbNumber(){let o=this.rgb().color;return(o[0]&255)<<16|(o[1]&255)<<8|o[2]&255},luminosity(){let o=this.rgb().color,f=[];for(let[h,y]of o.entries()){let x=y/255;f[h]=x<=0.04045?x/12.92:((x+0.055)/1.055)**2.4}return 0.2126*f[0]+0.7152*f[1]+0.0722*f[2]},contrast(o){let f=this.luminosity(),h=o.luminosity();if(f>h)return(f+0.05)/(h+0.05);return(h+0.05)/(f+0.05)},level(o){let f=this.contrast(o);if(f>=7)return"AAA";return f>=4.5?"AA":""},isDark(){let o=this.rgb().color;return(o[0]*2126+o[1]*7152+o[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let o=this.rgb();for(let f=0;f<3;f++)o.color[f]=255-o.color[f];return o},lighten(o){let f=this.hsl();return f.color[2]+=f.color[2]*o,f},darken(o){let f=this.hsl();return f.color[2]-=f.color[2]*o,f},saturate(o){let f=this.hsl();return f.color[1]+=f.color[1]*o,f},desaturate(o){let f=this.hsl();return f.color[1]-=f.color[1]*o,f},whiten(o){let f=this.hwb();return f.color[1]+=f.color[1]*o,f},blacken(o){let f=this.hwb();return f.color[2]+=f.color[2]*o,f},grayscale(){let o=this.rgb().color,f=o[0]*0.3+o[1]*0.59+o[2]*0.11;return gr.rgb(f,f,f)},fade(o){return this.alpha(this.valpha-this.valpha*o)},opaquer(o){return this.alpha(this.valpha+this.valpha*o)},rotate(o){let f=this.hsl(),h=f.color[0];return h=(h+o)%360,h=h<0?360+h:h,f.color[0]=h,f},mix(o,f){if(!o||!o.rgb)throw Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof o);let h=o.rgb(),y=this.rgb(),x=f===void 0?0.5:f,_=2*x-1,z=h.alpha()-y.alpha(),C=((_*z===-1?_:(_+z)/(1+_*z))+1)/2,w=1-C;return gr.rgb(C*h.red()+w*y.red(),C*h.green()+w*y.green(),C*h.blue()+w*y.blue(),h.alpha()*x+y.alpha()*(1-x))}};for(let o of Object.keys(zr)){if(wS.includes(o))continue;let{channels:f}=zr[o];gr.prototype[o]=function(...h){if(this.model===o)return new gr(this);if(h.length>0)return new gr(h,o);return new gr([..._K(zr[this.model][o].raw(this.color)),this.valpha],o)},gr[o]=function(...h){let y=h[0];if(typeof y==="number")y=I0(h,f);return new gr(y,o)}}function vK(o,f){return Number(o.toFixed(f))}function xK(o){return function(f){return vK(f,o)}}function er(o,f,h){o=Array.isArray(o)?o:[o];for(let y of o)(O0[y]||=[])[f]=h;return o=o[0],function(y){let x;if(y!==void 0){if(h)y=h(y);return x=this[o](),x.color[f]=y,x}if(x=this[o]().color[f],h)x=h(x);return x}}function mr(o){return function(f){return Math.max(0,Math.min(o,f))}}function _K(o){return Array.isArray(o)?o:[o]}function I0(o,f){for(let h=0;h<f;h++)if(typeof o[h]!=="number")o[h]=0;return o}function zK(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var CK=function(f){for(var h=0,y=0;h<f.length;y=f.charCodeAt(h++)+((y<<5)-y));var x=Math.floor(Math.abs(Math.sin(y)*1e4%1*16777216)).toString(16);return"#"+Array(6-x.length+1).join("0")+x},_S=zK(CK);function wK(o,f){let h=o.split(f||":"),y=_S(h[0]);if(!h.length)return y;for(let x=0,_=h.length-1;x<_;x++)y=gr(y).mix(gr(_S(h[x+1]))).saturate(1).hex();return y}SS.exports=wK});var kS=i(function(rRe,ES){function nn(o,f){if(f)return new nn(o).style(f);if(!(this instanceof nn))return new nn(o);this.text=o}nn.prototype.prefix="\x1B[";nn.prototype.suffix="m";nn.prototype.hex=function(f){if(f=f[0]==="#"?f.substring(1):f,f.length===3)f=f.split(""),f[5]=f[2],f[4]=f[2],f[3]=f[1],f[2]=f[1],f[1]=f[0],f=f.join("");var h=f.substring(0,2),y=f.substring(2,4),x=f.substring(4,6);return[parseInt(h,16),parseInt(y,16),parseInt(x,16)]};nn.prototype.rgb=function(f,h,y){var x=f/255*5,_=h/255*5,z=y/255*5;return this.ansi(x,_,z)};nn.prototype.ansi=function(f,h,y){var x=Math.round(f),_=Math.round(h),z=Math.round(y);return 16+x*36+_*6+z};nn.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};nn.prototype.style=function(f){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(f))+this.suffix+this.text+this.reset()};ES.exports=nn});var IS=i(function(oRe,OS){var SK=TS(),TK=kS();OS.exports=function(f,h){var y=h.namespace,x=h.colors!==!1?TK(y+":",SK(y)):y+":";return f[0]=x+" "+f[0],f}});var AS=i(function(nRe,RS){RS.exports=function(f,h){if(!h)return!1;var y=h.split(/[\s,]+/),x=0;for(;x<y.length;x++){if(h=y[x].replace("*",".*?"),h.charAt(0)==="-"){if(new RegExp("^"+h.substr(1)+"$").test(f))return!1;continue}if(new RegExp("^"+h+"$").test(f))return!0}return!1}});var BS=i(function(iRe,PS){var EK=AS();PS.exports=function(f){return function(y){try{return EK(y,f())}catch(x){}return!1}}});var LS=i(function(sRe,DS){var kK=BS();DS.exports=kK(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var jS=i(function(aRe,NS){NS.exports=function(o,f){try{Function.prototype.apply.call(console.log,console,f)}catch(h){}}});var cl=i(function(cRe,MS){var OK=xS(),IK=c("tty").isatty(1),Zd=OK(function o(f,h){if(h=h||{},h.colors="colors"in h?h.colors:IK,h.namespace=f,h.prod=!1,h.dev=!0,!o.enabled(f)&&!(h.force||o.force))return o.nope(h);return o.yep(h)});Zd.modify(IS());Zd.use(LS());Zd.set(jS());MS.exports=Zd});var FS=i(function(lRe,qS){var R0=c("fs"),{StringDecoder:RK}=c("string_decoder"),{Stream:AK}=hs();function PK(){}qS.exports=(o,f)=>{let h=Buffer.alloc(65536),y=new RK("utf8"),x=new AK,_="",z=0,C=0;if(o.start===-1)delete o.start;if(x.readable=!0,x.destroy=()=>{x.destroyed=!0,x.emit("end"),x.emit("close")},R0.open(o.file,"a+","0644",(w,S)=>{if(w){if(!f)x.emit("error",w);else f(w);x.destroy();return}(function E(){if(x.destroyed){R0.close(S,PK);return}return R0.read(S,h,0,h.length,z,(k,O)=>{if(k){if(!f)x.emit("error",k);else f(k);x.destroy();return}if(!O){if(_){if(o.start==null||C>o.start)if(!f)x.emit("line",_);else f(null,_);C++,_=""}return setTimeout(E,1000)}let R=y.write(h.slice(0,O));if(!f)x.emit("data",R);R=(_+R).split(/\n+/);let I=R.length-1,A=0;for(;A<I;A++){if(o.start==null||C>o.start)if(!f)x.emit("line",R[A]);else f(null,R[A]);C++}return _=R[I],z+=O,E()})})()}),!f)return x;return x.destroy}});var HS=i(function(uRe,VS){var mo=c("fs"),Cr=c("path"),US=aS(),BK=c("zlib"),{MESSAGE:DK}=lr(),{Stream:LK,PassThrough:$S}=hs(),NK=wa(),sn=cl()("winston:file"),jK=c("os"),MK=FS();VS.exports=class extends NK{constructor(f={}){super(f);this.name=f.name||"file";function h(y,...x){x.slice(1).forEach((_)=>{if(f[_])throw Error(`Cannot set ${_} and ${y} together`)})}if(this._stream=new $S,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),f.filename||f.dirname)h("filename or dirname","stream"),this._basename=this.filename=f.filename?Cr.basename(f.filename):"winston.log",this.dirname=f.dirname||Cr.dirname(f.filename),this.options=f.options||{flags:"a"};else if(f.stream)console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),h("stream","filename","maxsize"),this._dest=this._stream.pipe(this._setupStream(f.stream)),this.dirname=Cr.dirname(this._dest.path);else throw Error("Cannot log to file without filename or stream.");if(this.maxsize=f.maxsize||null,this.rotationFormat=f.rotationFormat||!1,this.zippedArchive=f.zippedArchive||!1,this.maxFiles=f.maxFiles||null,this.eol=typeof f.eol==="string"?f.eol:jK.EOL,this.tailable=f.tailable||!1,this.lazy=f.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);if(!this.lazy)this.open()}finishIfEnding(){if(this._ending)if(this._opening)this.once("open",()=>{this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())});else this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())}_final(f){if(this._opening){this.once("open",()=>this._final(f));return}if(this._stream.end(),!this._dest)return f();if(this._dest.writableFinished)return f();this._dest.once("finish",f),this._dest.once("error",f)}log(f,h=()=>{}){if(this.silent)return h(),!0;if(this._drain){this._stream.once("drain",()=>{this._drain=!1,this.log(f,h)});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=!1,this.log(f,h)});return}if(this.lazy){if(!this._fileExist){if(!this._opening)this.open();this.once("open",()=>{this._fileExist=!0,this.log(f,h);return});return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",()=>{if(!this._opening)this.open();this.once("open",()=>{this.log(f,h);return});return});return}}let y=`${f[DK]}${this.eol}`,x=Buffer.byteLength(y);function _(){if(this._size+=x,this._pendingSize-=x,sn("logged %s %s",this._size,y),this.emit("logged",f),this._rotate)return;if(this._opening)return;if(!this._needsNewFile())return;if(this.lazy){this._endStream(()=>{this.emit("fileclosed")});return}this._rotate=!0,this._endStream(()=>this._rotateFile())}if(this._pendingSize+=x,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize))this.rotatedWhileOpening=!0;let z=this._stream.write(y,_.bind(this));if(!z)this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,h()});else h();return sn("written",z,this._drain),this.finishIfEnding(),z}query(f,h){if(typeof f==="function")h=f,f={};f=k(f);let y=Cr.join(this.dirname,this.filename),x="",_=[],z=0,C=mo.createReadStream(y,{encoding:"utf8"});C.on("error",(O)=>{if(C.readable)C.destroy();if(!h)return;return O.code!=="ENOENT"?h(O):h(null,_)}),C.on("data",(O)=>{O=(x+O).split(/\n+/);let R=O.length-1,I=0;for(;I<R;I++){if(!f.start||z>=f.start)w(O[I]);z++}x=O[R]}),C.on("close",()=>{if(x)w(x,!0);if(f.order==="desc")_=_.reverse();if(h)h(null,_)});function w(O,R){try{let I=JSON.parse(O);if(E(I))S(I)}catch(I){if(!R)C.emit("error",I)}}function S(O){if(f.rows&&_.length>=f.rows&&f.order!=="desc"){if(C.readable)C.destroy();return}if(f.fields)O=f.fields.reduce((R,I)=>(R[I]=O[I],R),{});if(f.order==="desc"){if(_.length>=f.rows)_.shift()}_.push(O)}function E(O){if(!O)return;if(typeof O!=="object")return;let R=new Date(O.timestamp);if(f.from&&R<f.from||f.until&&R>f.until||f.level&&f.level!==O.level)return;return!0}function k(O){if(O=O||{},O.rows=O.rows||O.limit||10,O.start=O.start||0,O.until=O.until||new Date,typeof O.until!=="object")O.until=new Date(O.until);if(O.from=O.from||O.until-86400000,typeof O.from!=="object")O.from=new Date(O.from);return O.order=O.order||"desc",O}}stream(f={}){let h=Cr.join(this.dirname,this.filename),y=new LK,x={file:h,start:f.start};return y.destroy=MK(x,(_,z)=>{if(_)return y.emit("error",_);try{y.emit("data",z),z=JSON.parse(z),y.emit("log",z)}catch(C){y.emit("error",C)}}),y}open(){if(!this.filename)return;if(this._opening)return;this._opening=!0,this.stat((f,h)=>{if(f)return this.emit("error",f);sn("stat done: %s { size: %s }",this.filename,h),this._size=h,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",()=>{if(!this._stream.emit("rotate"))this._rotate=!1})})}stat(f){let h=this._getFile(),y=Cr.join(this.dirname,h);mo.stat(y,(x,_)=>{if(x&&x.code==="ENOENT")return sn("ENOENT ok",y),this.filename=h,f(null,0);if(x)return sn(`err ${x.code} ${y}`),f(x);if(!_||this._needsNewFile(_.size))return this._incFile(()=>this.stat(f));this.filename=h,f(null,_.size)})}close(f){if(!this._stream)return;this._stream.end(()=>{if(f)f();this.emit("flush"),this.emit("closed")})}_needsNewFile(f){return f=f||this._size,this.maxsize&&f>=this.maxsize}_onError(f){this.emit("error",f)}_setupStream(f){return f.on("error",this._onError),f}_cleanupStream(f){return f.removeListener("error",this._onError),f.destroy(),f}_rotateFile(){this._incFile(()=>this.open())}_endStream(f=()=>{}){if(this._dest)this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),f()});else f()}_createStream(f){let h=Cr.join(this.dirname,this.filename);sn("create stream start",h,this.options);let y=mo.createWriteStream(h,this.options).on("error",(x)=>sn(x)).on("close",()=>sn("close",y.path,y.bytesWritten)).on("open",()=>{if(sn("file open ok",h),this.emit("open",h),f.pipe(y),this.rotatedWhileOpening)this._stream=new $S,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(y),f.end()});return sn("create stream ok",h),y}_incFile(f){sn("_incFile",this.filename);let h=Cr.extname(this._basename),y=Cr.basename(this._basename,h),x=[];if(this.zippedArchive)x.push(function(_){let z=this._created>0&&!this.tailable?this._created:"";this._compressFile(Cr.join(this.dirname,`${y}${z}${h}`),Cr.join(this.dirname,`${y}${z}${h}.gz`),_)}.bind(this));x.push(function(_){if(!this.tailable)this._created+=1,this._checkMaxFilesIncrementing(h,y,_);else this._checkMaxFilesTailable(h,y,_)}.bind(this)),US(x,f)}_getFile(){let f=Cr.extname(this._basename),h=Cr.basename(this._basename,f),y=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${h}${y}${f}`:`${h}${f}`}_checkMaxFilesIncrementing(f,h,y){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(y);let x=this._created-this.maxFiles,_=x!==0?x:"",z=this.zippedArchive?".gz":"",C=`${h}${_}${f}${z}`,w=Cr.join(this.dirname,C);mo.unlink(w,y)}_checkMaxFilesTailable(f,h,y){let x=[];if(!this.maxFiles)return;let _=this.zippedArchive?".gz":"";for(let z=this.maxFiles-1;z>1;z--)x.push(function(C,w){let S=`${h}${C-1}${f}${_}`,E=Cr.join(this.dirname,S);mo.exists(E,(k)=>{if(!k)return w(null);S=`${h}${C}${f}${_}`,mo.rename(E,Cr.join(this.dirname,S),w)})}.bind(this,z));US(x,()=>{mo.rename(Cr.join(this.dirname,`${h}${f}${_}`),Cr.join(this.dirname,`${h}1${f}${_}`),y)})}_compressFile(f,h,y){mo.access(f,mo.F_OK,(x)=>{if(x)return y();var _=BK.createGzip(),z=mo.createReadStream(f),C=mo.createWriteStream(h);C.on("finish",()=>{mo.unlink(f,y)}),z.pipe(_).pipe(C)})}_createLogDirIfNotExist(f){if(!mo.existsSync(f))mo.mkdirSync(f,{recursive:!0})}}});var KS=i(function(dRe,GS){var qK=c("http"),FK=c("https"),{Stream:UK}=hs(),$K=wa(),{configure:VK}=ba();GS.exports=class extends $K{constructor(f={}){super(f);if(this.options=f,this.name=f.name||"http",this.ssl=!!f.ssl,this.host=f.host||"localhost",this.port=f.port,this.auth=f.auth,this.path=f.path||"",this.maximumDepth=f.maximumDepth,this.agent=f.agent,this.headers=f.headers||{},this.headers["content-type"]="application/json",this.batch=f.batch||!1,this.batchInterval=f.batchInterval||5000,this.batchCount=f.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},!this.port)this.port=this.ssl?443:80}log(f,h){if(this._request(f,null,null,(y,x)=>{if(x&&x.statusCode!==200)y=Error(`Invalid HTTP Status Code: ${x.statusCode}`);if(y)this.emit("warn",y);else this.emit("logged",f)}),h)setImmediate(h)}query(f,h){if(typeof f==="function")h=f,f={};f={method:"query",params:this.normalizeQuery(f)};let y=f.params.auth||null;delete f.params.auth;let x=f.params.path||null;delete f.params.path,this._request(f,y,x,(_,z,C)=>{if(z&&z.statusCode!==200)_=Error(`Invalid HTTP Status Code: ${z.statusCode}`);if(_)return h(_);if(typeof C==="string")try{C=JSON.parse(C)}catch(w){return h(w)}h(null,C)})}stream(f={}){let h=new UK;f={method:"stream",params:f};let y=f.params.path||null;delete f.params.path;let x=f.params.auth||null;delete f.params.auth;let _="",z=this._request(f,x,y);return h.destroy=()=>z.destroy(),z.on("data",(C)=>{C=(_+C).split(/\n+/);let w=C.length-1,S=0;for(;S<w;S++)try{h.emit("log",JSON.parse(C[S]))}catch(E){h.emit("error",E)}_=C[w]}),z.on("error",(C)=>h.emit("error",C)),h}_request(f,h,y,x){if(f=f||{},h=h||this.auth,y=y||this.path||"",this.batch)this._doBatch(f,x,h,y);else this._doRequest(f,x,h,y)}_doBatch(f,h,y,x){if(this.batchOptions.push(f),this.batchOptions.length===1){let _=this;this.batchCallback=h,this.batchTimeoutID=setTimeout(function(){_.batchTimeoutID=-1,_._doBatchRequest(_.batchCallback,y,x)},this.batchInterval)}if(this.batchOptions.length===this.batchCount)this._doBatchRequest(this.batchCallback,y,x)}_doBatchRequest(f,h,y){if(this.batchTimeoutID>0)clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1;let x=this.batchOptions.slice();this.batchOptions=[],this._doRequest(x,f,h,y)}_doRequest(f,h,y,x){let _=Object.assign({},this.headers);if(y&&y.bearer)_.Authorization=`Bearer ${y.bearer}`;let z=(this.ssl?FK:qK).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${x.replace(/^\//,"")}`,headers:_,auth:y&&y.username&&y.password?`${y.username}:${y.password}`:"",agent:this.agent});z.on("error",h),z.on("response",(w)=>w.on("end",()=>h(null,w)).resume());let C=VK({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});z.end(Buffer.from(C(f,this.options.replacer),"utf8"))}}});var A0=i(function(pRe,WS){var Tn=(o)=>o!==null&&typeof o==="object"&&typeof o.pipe==="function";Tn.writable=(o)=>Tn(o)&&o.writable!==!1&&typeof o._write==="function"&&typeof o._writableState==="object";Tn.readable=(o)=>Tn(o)&&o.readable!==!1&&typeof o._read==="function"&&typeof o._readableState==="object";Tn.duplex=(o)=>Tn.writable(o)&&Tn.readable(o);Tn.transform=(o)=>Tn.duplex(o)&&typeof o._transform==="function";WS.exports=Tn});var ZS=i(function(fRe,JS){var HK=A0(),{MESSAGE:GK}=lr(),KK=c("os"),WK=wa();JS.exports=class extends WK{constructor(f={}){super(f);if(!f.stream||!HK(f.stream))throw Error("options.stream is required.");this._stream=f.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=f.stream._writableState.objectMode,this.eol=typeof f.eol==="string"?f.eol:KK.EOL}log(f,h){if(setImmediate(()=>this.emit("logged",f)),this.isObjectMode){if(this._stream.write(f),h)h();return}if(this._stream.write(`${f[GK]}${this.eol}`),h)h();return}}});var YS=i(function(ll){Object.defineProperty(ll,"Console",{configurable:!0,enumerable:!0,get(){return zw()}});Object.defineProperty(ll,"File",{configurable:!0,enumerable:!0,get(){return HS()}});Object.defineProperty(ll,"Http",{configurable:!0,enumerable:!0,get(){return KS()}});Object.defineProperty(ll,"Stream",{configurable:!0,enumerable:!0,get(){return ZS()}})});var Xd=i(function(JK){var Yd=wg(),{configs:P0}=lr();JK.cli=Yd.levels(P0.cli);JK.npm=Yd.levels(P0.npm);JK.syslog=Yd.levels(P0.syslog);JK.addColors=Yd.levels});var QS=i(function(B0,XS){Object.defineProperty(B0,"__esModule",{value:!0});var eW=Hd(),tW=ms(eW),rW=Gd(),oW=ms(rW),nW=y0(),iW=ms(nW),sW=a0(),aW=ms(sW),cW=d0(),lW=ms(cW),uW=fs(),dW=ms(uW),pW=Ta(),fW=ms(pW);function ms(o){return o&&o.__esModule?o:{default:o}}function hW(o,f,h){h=(0,aW.default)(h);var y=0,x=0,{length:_}=o,z=!1;if(_===0)h(null);function C(w,S){if(w===!1)z=!0;if(z===!0)return;if(w)h(w);else if(++x===_||S===oW.default)h(null)}for(;y<_;y++)f(o[y],y,(0,lW.default)(C))}function mW(o,f,h){return(0,iW.default)(o,1/0,f,h)}function gW(o,f,h){var y=(0,tW.default)(o)?hW:mW;return y(o,(0,dW.default)(f),h)}B0.default=(0,fW.default)(gW,3);XS.exports=B0.default});var tT=i(function(D0,eT){Object.defineProperty(D0,"__esModule",{value:!0});D0.default=bW;function bW(o){return(f,h,y)=>o(f,y)}eT.exports=D0.default});var ep=i(function(L0,rT){Object.defineProperty(L0,"__esModule",{value:!0});var xW=QS(),_W=Qd(xW),zW=tT(),CW=Qd(zW),wW=fs(),SW=Qd(wW),TW=Ta(),EW=Qd(TW);function Qd(o){return o&&o.__esModule?o:{default:o}}function kW(o,f,h){return(0,_W.default)(o,(0,CW.default)((0,SW.default)(f)),h)}L0.default=(0,EW.default)(kW,3);rT.exports=L0.default});var nT=i(function(gRe,oT){var IW=Object.prototype.toString;oT.exports=function(f){if(typeof f.displayName==="string"&&f.constructor.name)return f.displayName;else if(typeof f.name==="string"&&f.name)return f.name;if(typeof f==="object"&&f.constructor&&typeof f.constructor.name==="string")return f.constructor.name;var h=f.toString(),y=IW.call(f).slice(8,-1);if(y==="Function")h=h.substring(h.indexOf("(")+1,h.indexOf(")"));else h=y;return h||"anonymous"}});var N0=i(function(yRe,iT){var RW=nT();iT.exports=function(f){var h=0,y;function x(){if(h)return y;return h=1,y=f.apply(this,arguments),f=null,y}return x.displayName=RW(f),x}});var j0=i(function(BW){BW.get=function(o){var f=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var h={},y=Error.prepareStackTrace;Error.prepareStackTrace=function(_,z){return z},Error.captureStackTrace(h,o||BW.get);var x=h.stack;return Error.prepareStackTrace=y,Error.stackTraceLimit=f,x};BW.parse=function(o){if(!o.stack)return[];var f=this,h=o.stack.split(`
37
+ `).slice(1);return h.map(function(y){if(y.match(/^\s*[-]{4,}$/))return f._createParsedCallSite({fileName:y,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var x=y.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(!x)return;var _=null,z=null,C=null,w=null,S=null,E=x[5]==="native";if(x[1]){C=x[1];var k=C.lastIndexOf(".");if(C[k-1]==".")k--;if(k>0){_=C.substr(0,k),z=C.substr(k+1);var O=_.indexOf(".Module");if(O>0)C=C.substr(O+1),_=_.substr(0,O)}w=null}if(z)w=_,S=z;if(z==="<anonymous>")S=null,C=null;var R={fileName:x[2]||null,lineNumber:parseInt(x[3],10)||null,functionName:C,typeName:w,methodName:S,columnNumber:parseInt(x[4],10)||null,native:E};return f._createParsedCallSite(R)}).filter(function(y){return!!y})};function ul(o){for(var f in o)this[f]=o[f]}var AW=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],PW=["topLevel","eval","native","constructor"];AW.forEach(function(o){ul.prototype[o]=null,ul.prototype["get"+o[0].toUpperCase()+o.substr(1)]=function(){return this[o]}});PW.forEach(function(o){ul.prototype[o]=!1,ul.prototype["is"+o[0].toUpperCase()+o.substr(1)]=function(){return this[o]}});BW._createParsedCallSite=function(o){return new ul(o)}});var cT=i(function(vRe,aT){var{Writable:NW}=hs();aT.exports=class extends NW{constructor(f){super({objectMode:!0});if(!f)throw Error("ExceptionStream requires a TransportStream instance.");this.handleExceptions=!0,this.transport=f}_write(f,h,y){if(f.exception)return this.transport.log(f,y);return y(),!0}}});var q0=i(function(xRe,dT){var lT=c("os"),jW=ep(),M0=cl()("winston:exception"),MW=N0(),uT=j0(),qW=cT();dT.exports=class{constructor(f){if(!f)throw Error("Logger is required to handle exceptions");this.logger=f,this.handlers=new Map}handle(...f){if(f.forEach((h)=>{if(Array.isArray(h))return h.forEach((y)=>this._addHandler(y));this._addHandler(h)}),!this.catcher)this.catcher=this._uncaughtException.bind(this),process.on("uncaughtException",this.catcher)}unhandle(){if(this.catcher)process.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((f)=>this.logger.unpipe(f))}getAllInfo(f){let h=null;if(f)h=typeof f==="string"?f:f.message;return{error:f,level:"error",message:[`uncaughtException: ${h||"(no error message)"}`,f&&f.stack||" No stack trace"].join(`
38
+ `),stack:f&&f.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(f)}}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:lT.loadavg(),uptime:lT.uptime()}}getTrace(f){return(f?uT.parse(f):uT.get()).map((y)=>({column:y.getColumnNumber(),file:y.getFileName(),function:y.getFunctionName(),line:y.getLineNumber(),method:y.getMethodName(),native:y.isNative()}))}_addHandler(f){if(!this.handlers.has(f)){f.handleExceptions=!0;let h=new qW(f);this.handlers.set(f,h),this.logger.pipe(h)}}_uncaughtException(f){let h=this.getAllInfo(f),y=this._getExceptionHandlers(),x=typeof this.logger.exitOnError==="function"?this.logger.exitOnError(f):this.logger.exitOnError,_;if(!y.length&&x)console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),x=!1;function z(){if(M0("doExit",x),M0("process._exiting",process._exiting),x&&!process._exiting){if(_)clearTimeout(_);process.exit(1)}}if(!y||y.length===0)return process.nextTick(z);if(jW(y,(C,w)=>{let S=MW(w),E=C.transport||C;function k(O){return()=>{M0(O),S()}}E._ending=!0,E.once("finish",k("finished")),E.once("error",k("error"))},()=>x&&z()),this.logger.log(h),x)_=setTimeout(z,3000)}_getExceptionHandlers(){return this.logger.transports.filter((f)=>(f.transport||f).handleExceptions)}}});var fT=i(function(_Re,pT){var{Writable:FW}=hs();pT.exports=class extends FW{constructor(f){super({objectMode:!0});if(!f)throw Error("RejectionStream requires a TransportStream instance.");this.handleRejections=!0,this.transport=f}_write(f,h,y){if(f.rejection)return this.transport.log(f,y);return y(),!0}}});var U0=i(function(zRe,gT){var hT=c("os"),UW=ep(),F0=cl()("winston:rejection"),$W=N0(),mT=j0(),VW=fT();gT.exports=class{constructor(f){if(!f)throw Error("Logger is required to handle rejections");this.logger=f,this.handlers=new Map}handle(...f){if(f.forEach((h)=>{if(Array.isArray(h))return h.forEach((y)=>this._addHandler(y));this._addHandler(h)}),!this.catcher)this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher)}unhandle(){if(this.catcher)process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((f)=>this.logger.unpipe(f))}getAllInfo(f){let h=null;if(f)h=typeof f==="string"?f:f.message;return{error:f,level:"error",message:[`unhandledRejection: ${h||"(no error message)"}`,f&&f.stack||" No stack trace"].join(`
39
+ `),stack:f&&f.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(f)}}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:hT.loadavg(),uptime:hT.uptime()}}getTrace(f){return(f?mT.parse(f):mT.get()).map((y)=>({column:y.getColumnNumber(),file:y.getFileName(),function:y.getFunctionName(),line:y.getLineNumber(),method:y.getMethodName(),native:y.isNative()}))}_addHandler(f){if(!this.handlers.has(f)){f.handleRejections=!0;let h=new VW(f);this.handlers.set(f,h),this.logger.pipe(h)}}_unhandledRejection(f){let h=this.getAllInfo(f),y=this._getRejectionHandlers(),x=typeof this.logger.exitOnError==="function"?this.logger.exitOnError(f):this.logger.exitOnError,_;if(!y.length&&x)console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),x=!1;function z(){if(F0("doExit",x),F0("process._exiting",process._exiting),x&&!process._exiting){if(_)clearTimeout(_);process.exit(1)}}if(!y||y.length===0)return process.nextTick(z);if(UW(y,(C,w)=>{let S=$W(w),E=C.transport||C;function k(O){return()=>{F0(O),S()}}E._ending=!0,E.once("finish",k("finished")),E.once("error",k("error"))},()=>x&&z()),this.logger.log(h),x)_=setTimeout(z,3000)}_getRejectionHandlers(){return this.logger.transports.filter((f)=>(f.transport||f).handleRejections)}}});var vT=i(function(CRe,bT){class yT{constructor(o){let f=tp();if(typeof o!=="object"||Array.isArray(o)||!(o instanceof f))throw Error("Logger is required for profiling");else this.logger=o,this.start=Date.now()}done(...o){if(typeof o[o.length-1]==="function")console.warn("Callback function no longer supported as of winston@3.0.0"),o.pop();let f=typeof o[o.length-1]==="object"?o.pop():{};return f.level=f.level||"info",f.durationMs=Date.now()-this.start,this.logger.write(f)}}bT.exports=yT});var tp=i(function(wRe,CT){var{Stream:HW,Transform:GW}=hs(),xT=ep(),{LEVEL:En,SPLAT:_T}=lr(),zT=A0(),KW=q0(),WW=U0(),JW=Xg(),ZW=vT(),{warn:YW}=Tg(),XW=Xd(),QW=/%[scdjifoO%]/g;class $0 extends GW{constructor(o){super({objectMode:!0});this.configure(o)}child(o){let f=this;return Object.create(f,{write:{value:function(h){let y=Object.assign({},o,h);if(h instanceof Error)y.stack=h.stack,y.message=h.message,y.cause=h.cause;f.write(y)}}})}configure({silent:o,format:f,defaultMeta:h,levels:y,level:x="info",exitOnError:_=!0,transports:z,colors:C,emitErrs:w,formatters:S,padLevels:E,rewriters:k,stripColors:O,exceptionHandlers:R,rejectionHandlers:I}={}){if(this.transports.length)this.clear();if(this.silent=o,this.format=f||this.format||xg()(),this.defaultMeta=h||null,this.levels=y||this.levels||XW.npm.levels,this.level=x,this.exceptions)this.exceptions.unhandle();if(this.rejections)this.rejections.unhandle();if(this.exceptions=new KW(this),this.rejections=new WW(this),this.profilers={},this.exitOnError=_,z)z=Array.isArray(z)?z:[z],z.forEach((A)=>this.add(A));if(C||w||S||E||k||O)throw 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(`
40
+ `));if(R)this.exceptions.handle(R);if(I)this.rejections.handle(I)}getHighestLogLevel(){let o=dl(this.levels,this.level);if(!this.transports||this.transports.length===0)return o;return this.transports.reduce((f,h)=>{let y=dl(this.levels,h.level);return y!==null&&y>f?y:f},o)}isLevelEnabled(o){let f=dl(this.levels,o);if(f===null)return!1;let h=dl(this.levels,this.level);if(h===null)return!1;if(!this.transports||this.transports.length===0)return h>=f;return this.transports.findIndex((x)=>{let _=dl(this.levels,x.level);if(_===null)_=h;return _>=f})!==-1}log(o,f,...h){if(arguments.length===1)return o[En]=o.level,this._addDefaultMeta(o),this.write(o),this;if(arguments.length===2){if(f&&typeof f==="object")return f[En]=f.level=o,this._addDefaultMeta(f),this.write(f),this;return f={[En]:o,level:o,message:f},this._addDefaultMeta(f),this.write(f),this}let[y]=h;if(typeof y==="object"&&y!==null){if(!(f&&f.match&&f.match(QW))){let _=Object.assign({},this.defaultMeta,y,{[En]:o,[_T]:h,level:o,message:f});if(y.message)_.message=`${_.message} ${y.message}`;if(y.stack)_.stack=y.stack;if(y.cause)_.cause=y.cause;return this.write(_),this}}return this.write(Object.assign({},this.defaultMeta,{[En]:o,[_T]:h,level:o,message:f})),this}_transform(o,f,h){if(this.silent)return h();if(!o[En])o[En]=o.level;if(!this.levels[o[En]]&&this.levels[o[En]]!==0)console.error("[winston] Unknown logger level: %s",o[En]);if(!this._readableState.pipes)console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",o);try{this.push(this.format.transform(o,this.format.options))}finally{this._writableState.sync=!1,h()}}_final(o){let f=this.transports.slice();xT(f,(h,y)=>{if(!h||h.finished)return setImmediate(y);h.once("finish",y),h.end()},o)}add(o){let f=!zT(o)||o.log.length>2?new JW({transport:o}):o;if(!f._writableState||!f._writableState.objectMode)throw Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");if(this._onEvent("error",f),this._onEvent("warn",f),this.pipe(f),o.handleExceptions)this.exceptions.handle();if(o.handleRejections)this.rejections.handle();return this}remove(o){if(!o)return this;let f=o;if(!zT(o)||o.log.length>2)f=this.transports.filter((h)=>h.transport===o)[0];if(f)this.unpipe(f);return this}clear(){return this.unpipe(),this}close(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}setLevels(){YW.deprecated("setLevels")}query(o,f){if(typeof o==="function")f=o,o={};o=o||{};let h={},y=Object.assign({},o.query||{});function x(z,C){if(o.query&&typeof z.formatQuery==="function")o.query=z.formatQuery(y);z.query(o,(w,S)=>{if(w)return C(w);if(typeof z.formatResults==="function")S=z.formatResults(S,o.format);C(null,S)})}function _(z,C){x(z,(w,S)=>{if(C){if(S=w||S,S)h[z.name]=S;C()}C=null})}xT(this.transports.filter((z)=>!!z.query),_,()=>f(null,h))}stream(o={}){let f=new HW,h=[];return f._streams=h,f.destroy=()=>{let y=h.length;while(y--)h[y].destroy()},this.transports.filter((y)=>!!y.stream).forEach((y)=>{let x=y.stream(o);if(!x)return;h.push(x),x.on("log",(_)=>{_.transport=_.transport||[],_.transport.push(y.name),f.emit("log",_)}),x.on("error",(_)=>{_.transport=_.transport||[],_.transport.push(y.name),f.emit("error",_)})}),f}startTimer(){return new ZW(this)}profile(o,...f){let h=Date.now();if(this.profilers[o]){let y=this.profilers[o];if(delete this.profilers[o],typeof f[f.length-2]==="function")console.warn("Callback function no longer supported as of winston@3.0.0"),f.pop();let x=typeof f[f.length-1]==="object"?f.pop():{};return x.level=x.level||"info",x.durationMs=h-y,x.message=x.message||o,this.write(x)}return this.profilers[o]=h,this}handleExceptions(...o){console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),this.exceptions.handle(...o)}unhandleExceptions(...o){console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),this.exceptions.unhandle(...o)}cli(){throw 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(`
41
+ `))}_onEvent(o,f){function h(y){if(o==="error"&&!this.transports.includes(f))this.add(f);this.emit(o,y,f)}if(!f["__winston"+o])f["__winston"+o]=h.bind(this),f.on(o,f["__winston"+o])}_addDefaultMeta(o){if(this.defaultMeta)Object.assign(o,this.defaultMeta)}}function dl(o,f){let h=o[f];if(!h&&h!==0)return null;return h}Object.defineProperty($0.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:o}=this._readableState;return!Array.isArray(o)?[o].filter(Boolean):o}});CT.exports=$0});var V0=i(function(SRe,wT){var{LEVEL:eJ}=lr(),tJ=Xd(),rJ=tp(),oJ=cl()("winston:create-logger");function nJ(o){return"is"+o.charAt(0).toUpperCase()+o.slice(1)+"Enabled"}wT.exports=function(o={}){o.levels=o.levels||tJ.npm.levels;class f extends rJ{constructor(y){super(y)}}let h=new f(o);return Object.keys(o.levels).forEach(function(y){if(oJ('Define prototype method for "%s"',y),y==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}f.prototype[y]=function(...x){let _=this||h;if(x.length===1){let[z]=x,C=z&&z.message&&z||{message:z};return C.level=C[eJ]=y,_._addDefaultMeta(C),_.write(C),this||h}if(x.length===0)return _.log(y,""),_;return _.log(y,...x)},f.prototype[nJ(y)]=function(){return(this||h).isLevelEnabled(y)}}),h}});var TT=i(function(TRe,ST){var iJ=V0();ST.exports=class{constructor(f={}){this.loggers=new Map,this.options=f}add(f,h){if(!this.loggers.has(f)){h=Object.assign({},h||this.options);let y=h.transports||this.options.transports;if(y)h.transports=Array.isArray(y)?y.slice():[y];else h.transports=[];let x=iJ(h);x.on("close",()=>this._delete(f)),this.loggers.set(f,x)}return this.loggers.get(f)}get(f,h){return this.add(f,h)}has(f){return!!this.loggers.has(f)}close(f){if(f)return this._removeLogger(f);this.loggers.forEach((h,y)=>this._removeLogger(y))}_removeLogger(f){if(!this.loggers.has(f))return;this.loggers.get(f).close(),this._delete(f)}_delete(f){this.loggers.delete(f)}}});var rp=i(function(To){var ET=wg(),{warn:pl}=Tg();To.version=SC().version;To.transports=YS();To.config=Xd();To.addColors=ET.levels;To.format=ET.format;To.createLogger=V0();To.Logger=tp();To.ExceptionHandler=q0();To.RejectionHandler=U0();To.Container=TT();To.Transport=wa();To.loggers=new To.Container;var kn=To.createLogger();Object.keys(To.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach((o)=>To[o]=(...f)=>kn[o](...f));Object.defineProperty(To,"level",{get(){return kn.level},set(o){kn.level=o}});Object.defineProperty(To,"exceptions",{get(){return kn.exceptions}});Object.defineProperty(To,"rejections",{get(){return kn.rejections}});["exitOnError"].forEach((o)=>{Object.defineProperty(To,o,{get(){return kn[o]},set(f){kn[o]=f}})});Object.defineProperty(To,"default",{get(){return{exceptionHandlers:kn.exceptionHandlers,rejectionHandlers:kn.rejectionHandlers,transports:kn.transports}}});pl.deprecated(To,"setLevels");pl.forFunctions(To,"useFormat",["cli"]);pl.forProperties(To,"useFormat",["padLevels","stripColors"]);pl.forFunctions(To,"deprecated",["addRewriter","addFilter","clone","extend"]);pl.forProperties(To,"deprecated",["emitErrs","levelLength"])});var G0=i(function(PT){Object.defineProperty(PT,"__esModule",{value:!0});PT.local=void 0;PT.getMessageOrStack=AT;var H0=c("node:util"),RT=rp(),{combine:mJ,timestamp:gJ,cli:yJ,printf:bJ,errors:vJ}=RT.format;PT.local=mJ(vJ({stack:!0}),gJ(),RT.format(xJ)(),yJ(),bJ((o)=>{let f=o.custom_fields&&typeof o.custom_fields==="object"&&"messageContext"in o.custom_fields?`${H0.styleText("blue",`(${o.custom_fields.messageContext})`)}: `:"",h=typeof o.message==="string"?o.message:"",y=h.replace(/^\s*/,""),x=h.length-y.length+f.length;if(o.error)o.level=H0.styleText("inverse",o.level);return`${H0.styleText("gray",`[${o.timestamp}]`)} ${o.level} ${f.padStart(x," ")}${y}`}));function AT(o){let f=(y)=>typeof y==="string";if(o.stack&&o.level==="error"&&f(o.stack))return o.stack;if(f(o.message))return o.message;return""}function xJ(o){return{...o,level:o.level.toUpperCase(),message:AT(o)}}});var jT=i(function(LT){Object.defineProperty(LT,"__esModule",{value:!0});LT.kibana=void 0;var DT=rp(),zJ=G0(),{combine:CJ,timestamp:wJ,json:SJ,errors:TJ}=DT.format;LT.kibana=CJ(TJ({stack:!0}),wJ(),DT.format(EJ)(),SJ());function EJ(o){return{...o,msg:zJ.getMessageOrStack(o),written_ts:new Date(o.timestamp).getTime(),written_at:o.timestamp}}});var K0=i(function(_i){var kJ=_i&&_i.__createBinding||(Object.create?function(o,f,h,y){if(y===void 0)y=h;var x=Object.getOwnPropertyDescriptor(f,h);if(!x||("get"in x?!f.__esModule:x.writable||x.configurable))x={enumerable:!0,get:function(){return f[h]}};Object.defineProperty(o,y,x)}:function(o,f,h,y){if(y===void 0)y=h;o[y]=f[h]}),MT=_i&&_i.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))kJ(f,o,h)};Object.defineProperty(_i,"__esModule",{value:!0});MT(jT(),_i);MT(G0(),_i)});var YT=i(function(ZT){Object.defineProperty(ZT,"__esModule",{value:!0});ZT.cloudSdkExceptionLogger=ZT.logFormat=void 0;ZT.muteLoggers=IJ;ZT.unmuteLoggers=RJ;ZT.disableExceptionLogger=KT;ZT.enableExceptionLogger=AJ;ZT.createLogger=WT;ZT.getLogger=PJ;ZT.setLogLevel=BJ;ZT.setGlobalLogLevel=DJ;ZT.getGlobalLogLevel=LJ;ZT.setGlobalTransports=NJ;ZT.setLogFormat=jJ;ZT.setGlobalLogFormat=MJ;ZT.getGlobalLogFormat=qJ;ZT.sanitizeRecord=VJ;ZT.resetCustomLogLevels=HJ;ZT.resetCustomLogFormats=GJ;var W0=rp(),qT=K0(),FT="sap-cloud-sdk-logger",OJ="sap-cloud-sdk-exception-logger",ir=new W0.Container;ZT.logFormat={kibana:qT.kibana,local:qT.local};ir.options.format=ZT.logFormat.local;var UT=new W0.transports.Console,op={},np={},J0="__DEFAULT_LOGGER__MESSAGE_CONTEXT",$T=!1,VT=WT({package:"util",messageContext:"cloud-sdk-logger"});function HT(o){$T=o,ir.loggers.forEach((f)=>GT(f,o))}function GT(o,f){o.transports.forEach((h)=>h.silent=f)}function IJ(){HT(!0)}function RJ(){HT(!1)}ZT.cloudSdkExceptionLogger=ir.get(OJ,{defaultMeta:{logger:FT,test:"exception"},format:ir.options.format,exceptionHandlers:[UT]});function KT(){ZT.cloudSdkExceptionLogger.exceptions.unhandle()}function AJ(){KT(),ZT.cloudSdkExceptionLogger.exceptions.handle(UT)}function WT(o){let f=typeof o==="string"?{messageContext:o}:{...o},h=ir.get(f.messageContext,{level:process.env.SAP_CLOUD_SDK_LOG_LEVEL||op[f.messageContext]||f.level||ir.options.level||"info",defaultMeta:{...Object.entries(f).length&&{custom_fields:f},logger:f.logger||FT},format:np[f.messageContext]||f.format||ir.options.format||ZT.logFormat.local,transports:[new W0.transports.Console]});return GT(h,$T),h}function PJ(o=J0){if(ir.has(o))return ir.get(o)}function BJ(o,f=J0){let h=typeof f==="string"?f:JT(f);if(h){if(op[h]=o,ir.has(h)){let y=ir.get(h);y.level=o}}else if(typeof f!=="string")VT.warn("Setting log level for logger with unknown message context"),f.level=o}function DJ(o){ir.options.level=o,ir.loggers.forEach((f)=>{f.level=o})}function LJ(){return ir.options.level}function NJ(o){ir.options.transports=o,ir.loggers.forEach((f)=>(f.clear(),Array.isArray(o)?o.forEach((h)=>f.add(h)):f.add(o)))}function jJ(o,f=J0){let h=typeof f==="string"?f:JT(f);if(h){if(np[h]=o,ir.has(h)){let y=ir.get(h);y.format=o}}else if(typeof f!=="string")VT.warn("Setting log format for logger with unknown message context"),f.format=o}function MJ(o){ir.options.format=o,ir.loggers.forEach((f)=>{f.format=o})}function qJ(){return ir.options.format}var FJ=["access_token","authentication","authorization","apiKey","credentials","csrf","xsrf","secret","password","JTENANT","JSESSION"];function UJ(o,f,h){let y=h.map((_)=>_.toLowerCase()),x=$J(o,f)?f:o;return y.some((_)=>x.toLowerCase().includes(_))}function $J(o,f){return o.toLowerCase()==="cookie"&&typeof f==="string"}function VJ(o,f="<DATA NOT LOGGED TO PREVENT LEAKING SENSITIVE DATA>",h=FJ){return Object.fromEntries(Object.entries(o).map(([y,x])=>UJ(y,x,h)?[y,f]:[y,x]))}function JT(o){let f=o;if(f&&f.defaultMeta&&f.defaultMeta.custom_fields)return f.defaultMeta.custom_fields.messageContext}function HJ(){Object.keys(op).forEach((o)=>delete op[o])}function GJ(){Object.keys(np).forEach((o)=>delete np[o])}});var fl=i(function(zi){var lZ=zi&&zi.__createBinding||(Object.create?function(o,f,h,y){if(y===void 0)y=h;var x=Object.getOwnPropertyDescriptor(f,h);if(!x||("get"in x?!f.__esModule:x.writable||x.configurable))x={enumerable:!0,get:function(){return f[h]}};Object.defineProperty(o,y,x)}:function(o,f,h,y){if(y===void 0)y=h;o[y]=f[h]}),XT=zi&&zi.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))lZ(f,o,h)};Object.defineProperty(zi,"__esModule",{value:!0});XT(YT(),zi);XT(K0(),zi)});var eE=i(function(QT){Object.defineProperty(QT,"__esModule",{value:!0});QT.documentationBlock=fZ;var uZ=Sd(),dZ=fl(),pZ=dZ.createLogger("documentation-block");function fZ(o,...f){let h=hZ(o.raw[0]),y=yZ(h),x=mZ(f,y),_=uZ.zip([h,...o.raw.slice(1)],x).join("");if(!_.match(/\w/))return"";_=bZ(_);let z=_.split(`
42
+ `);return z=gZ(z,y),_=z.join(`
43
+ * `),["/**",` * ${_}`," */"].join(`
44
+ `)}function hZ(o){let f=o.split(`
45
+ `),h=f.findIndex((y)=>y.match(/\w/))||0;return f.splice(h).join(`
46
+ `)}function mZ(o,f){return o.map((y)=>y.replace(/\n/g,`
47
+ `+" ".repeat(f)))}function gZ(o,f){return o.map((h)=>h.slice(f))}function yZ(o){let h=o?.replace(/^\n*/g,"")?.search(/\S/);return h>0?h:0}function bZ(o){if(o.includes("*/"))pZ.warn(`The documentation block ${o}'
48
+ )} contained */ in the text will be masked as \\*\\/.`);return o.replace(/\*\//g,"\\*\\/")}});var sp=i(function(tE){Object.defineProperty(tE,"__esModule",{value:!0});tE.isNullish=xZ;function xZ(o){return o===null||o===void 0}});var sE=i(function(iE){Object.defineProperty(iE,"__esModule",{value:!0});iE.equalObjects=oE;iE.equal=Y0;iE.equalArrays=nE;var rE=sp();function oE(o,f){let h=Object.keys(o);return Object.keys(o).length===Object.keys(f).length&&h.every((y)=>Y0(o[y],f[y]))}function Y0(o,f){if(Array.isArray(o)&&Array.isArray(f))return nE(o,f);if(typeof o==="object"&&typeof f==="object"&&!rE.isNullish(o)&&!rE.isNullish(f))return oE(o,f);return o===f}function nE(o,f){return o.length===f.length&&o.every((h,y)=>Y0(h,f[y]))}});var dE=i(function(lE){Object.defineProperty(lE,"__esModule",{value:!0});lE.ErrorWithCause=void 0;lE.isErrorWithCause=cE;var SZ=fl(),TZ=SZ.createLogger({package:"util",messageContext:"error-with-cause"});class aE extends Error{constructor(o,f){super(o);this.cause=f,Object.setPrototypeOf(this,new.target.prototype),this.name="ErrorWithCause",this.addStack(f)}isAxiosError(o){return"isAxiosError"in o&&o.isAxiosError===!0}addStack(o){if(this.isAxiosError(o)){let f="";if(o.response?.data)try{f=`
49
+ ${JSON.stringify(o.response?.data,null,2)}`}catch(h){TZ.warn(`Failed to stringify response data: ${h.message}`),f=`
50
+ ${o.response?.data}`}this.stack=`${this.stack}
51
+ Caused by:
52
+ HTTP Response: ${o.message}${f}`}else if(this.stack&&o?.stack)this.stack=`${this.stack}
53
+ Caused by:
54
+ ${o.stack}`}get rootCause(){return cE(this.cause)?this.cause.rootCause:this.cause}}lE.ErrorWithCause=aE;function cE(o){return o?.name==="ErrorWithCause"}});var hE=i(function(fE){Object.defineProperty(fE,"__esModule",{value:!0});fE.findProjectRoot=pE;fE.readJSON=RZ;var ap=c("fs"),kZ=c("path"),OZ=fl(),IZ=OZ.createLogger({package:"util",messageContext:"fs"});function pE(o,f=o){if(!o)return f;if(!(ap.readdirSync(o).includes("package.json")||ap.readdirSync(o).includes("node_modules")||o.includes("node_modules")))return f;return pE(kZ.resolve(o,".."),o)}function RZ(o){if(ap.existsSync(o))return JSON.parse(ap.readFileSync(o,"utf8"));return IZ.warn(`File "${o}" does not exist, return empty object.`),{}}});var xE=i(function(bE){Object.defineProperty(bE,"__esModule",{value:!0});bE.exclude=bE.pick=bE.renameKeys=void 0;bE.propertyExists=mE;bE.toSanitizedObject=NZ;bE.pickIgnoreCase=X0;bE.pickValueIgnoreCase=gE;bE.pickNonNullish=jZ;bE.mergeLeftIgnoreCase=yE;bE.mergeIgnoreCase=MZ;var cp=sp();function mE(o,...f){if(!f.length)return!0;if(o&&o.hasOwnProperty(f[0]))return mE(o[f[0]],...f.slice(1));return!1}var BZ=(o,f)=>{let h=Object.keys(f).filter((y)=>!Object.keys(o).includes(y)).reduce((y,x)=>({...y,[x]:f[x]}),{});return Object.entries(o).reduce((y,[x,_])=>({...y,[_]:f[x]}),h)};bE.renameKeys=BZ;var DZ=(o,f)=>{let h={};return o.forEach((y)=>{let x=f[y];if(Object.keys(f).includes(y))h[y]=x}),h};bE.pick=DZ;var LZ=(o,f)=>{let h={};return Object.keys(f).forEach((y)=>{let x=f[y];if(!o.includes(y))h[y]=x}),h};bE.exclude=LZ;function NZ(o,f){return cp.isNullish(o)||cp.isNullish(f)?{}:{[o]:f}}function X0(o={},...f){return f.reduce((h,y)=>{let x=Object.keys(o).find((_)=>_.toLowerCase()===y.toLowerCase());return{...h,...x&&{[x]:o[x]}}},{})}function gE(o={},f){return Object.values(X0(o,f))[0]}function jZ(o={}){return Object.entries(o).filter(([f,h])=>!cp.isNullish(f)&&!cp.isNullish(h)).reduce((f,[h,y])=>({...f,[h]:y}),{})}function yE(o={},f={}){return Object.entries(o).map(([h,y])=>gE(f,h)?X0(f,h):{[h]:y}).reduce((h,y)=>({...h,...y}),{})}function MZ(o={},f={}){return{...yE(o,f),...f}}});var zE=i(function(_E){Object.defineProperty(_E,"__esModule",{value:!0});_E.identity=JZ;function JZ(o){return o}});var wE=i(function(CE){Object.defineProperty(CE,"__esModule",{value:!0});CE.finishAll=YZ;async function YZ(o,f){let y=(await Promise.allSettled(o)).filter((x)=>x.status==="rejected");if(y.length){let x=y.map((z)=>` ${z.reason}`).join(`
55
+ `),_=f?`${f} `:"";throw Error(`${_}Errors: [
56
+ ${x}
57
+ ]`)}}});var kE=i(function(EE){Object.defineProperty(EE,"__esModule",{value:!0});EE.removeSlashes=QZ;EE.removeTrailingSlashes=SE;EE.removeLeadingSlashes=TE;function QZ(o){return o=TE(o),o=SE(o),o}function SE(o){return o.endsWith("/")?o.slice(0,-1):o}function TE(o){return o.startsWith("/")?o.slice(1):o}});var OE=i(function(Q0,ey){/*!
58
+ * Voca string library 1.4.1
59
+ * https://vocajs.pages.dev
60
+ *
61
+ * Copyright Dmitri Pavlutin and other contributors
62
+ * Released under the MIT license
63
+ */(function(o,f){typeof Q0==="object"&&typeof ey<"u"?ey.exports=f():typeof define==="function"&&define.amd?define(f):(o=o||self,o.v=f())})(Q0,function(){function o(){return o=Object.assign||function(j){for(var q=1;q<arguments.length;q++){var H=arguments[q];for(var Z in H)if(Object.prototype.hasOwnProperty.call(H,Z))j[Z]=H[Z]}return j},o.apply(this,arguments)}function f(j,q){return x(j)||z(j,q)||w()}function h(j){return y(j)||_(j)||C()}function y(j){if(Array.isArray(j)){for(var q=0,H=Array(j.length);q<j.length;q++)H[q]=j[q];return H}}function x(j){if(Array.isArray(j))return j}function _(j){if(Symbol.iterator in Object(j)||Object.prototype.toString.call(j)==="[object Arguments]")return Array.from(j)}function z(j,q){if(!((Symbol.iterator in Object(j))||Object.prototype.toString.call(j)==="[object Arguments]"))return;var H=[],Z=!0,ie=!1,ye=void 0;try{for(var Be=j[Symbol.iterator](),Ot;!(Z=(Ot=Be.next()).done);Z=!0)if(H.push(Ot.value),q&&H.length===q)break}catch(dt){ie=!0,ye=dt}finally{try{if(!Z&&Be.return!=null)Be.return()}finally{if(ie)throw ye}}return H}function C(){throw TypeError("Invalid attempt to spread non-iterable instance")}function w(){throw TypeError("Invalid attempt to destructure non-iterable instance")}function S(j){return j===void 0||j===null}function E(j){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(S(j))return q;return Boolean(j)}function k(j){return typeof j==="string"}function O(j){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(S(j))return q;if(k(j))return j;return String(j)}function R(j,q){var H=O(j),Z=E(q);if(H==="")return"";if(Z)H=H.toLowerCase();return H.substr(0,1).toUpperCase()+H.substr(1)}function I(j){var q=O(j,"");return q.toLowerCase()}var A="\\d",M="\\s\\uFEFF\\xA0",D="\\uD800-\\uDBFF",U="\\uDC00-\\uDFFF",F="\\u0300-\\u036F\\u1AB0-\\u1AFF\\u1DC0-\\u1DFF\\u20D0-\\u20FF\\uFE20-\\uFE2F",J="\\0-\\u02FF\\u0370-\\u1AAF\\u1B00-\\u1DBF\\u1E00-\\u20CF\\u2100-\\uD7FF\\uE000-\\uFE1F\\uFE30-\\uFFFF",Q=new RegExp("(["+J+"]|["+D+"]["+U+"]|["+D+"](?!["+U+"])|(?:[^"+D+"]|^)["+U+"])(["+F+"]+)","g"),te=new RegExp("(["+D+"])(["+U+"])","g"),le=new RegExp("((?:["+J+"]|["+D+"]["+U+"]|["+D+"](?!["+U+"])|(?:[^"+D+"]|^)["+U+"])(?:["+F+"]+))|(["+D+"]["+U+"])|([\\n\\r\\u2028\\u2029])|(.)","g"),he=new RegExp("["+M+"]"),xe=new RegExp("^["+M+"]+"),Re=new RegExp("["+M+"]+$"),me=new RegExp("^"+A+"+$"),Ae=/[-[\]{}()*+!<=:?./\\^$|#,]/g,We=/[^A-Za-z0-9]/g,$e=/[<>&"'`]/g,De=/(%{1,2})(?:(\d+)\$)?(\+)?([ 0]|'.{1})?(-)?(\d+)?(?:\.(\d+))?([bcdiouxXeEfgGs])?/g,re=/\.?0+$/g,oe=/<([A-Za-z0-9]+)>/g,Ge="\\u2000-\\u206F",Bt="\\x00-\\x2F\\x3A-\\x40\\x5B-\\x60\\x7b-\\xBF\\xD7\\xF7",Se="\\u2700-\\u27BF",Pe="a-z\\xB5\\xDF-\\xF6\\xF8-\\xFF\\u0101\\u0103\\u0105\\u0107\\u0109\\u010B\\u010D\\u010F\\u0111\\u0113\\u0115\\u0117\\u0119\\u011B\\u011D\\u011F\\u0121\\u0123\\u0125\\u0127\\u0129\\u012B\\u012D\\u012F\\u0131\\u0133\\u0135\\u0137\\u0138\\u013A\\u013C\\u013E\\u0140\\u0142\\u0144\\u0146\\u0148\\u0149\\u014B\\u014D\\u014F\\u0151\\u0153\\u0155\\u0157\\u0159\\u015B\\u015D\\u015F\\u0161\\u0163\\u0165\\u0167\\u0169\\u016B\\u016D\\u016F\\u0171\\u0173\\u0175\\u0177\\u017A\\u017C\\u017E-\\u0180\\u0183\\u0185\\u0188\\u018C\\u018D\\u0192\\u0195\\u0199-\\u019B\\u019E\\u01A1\\u01A3\\u01A5\\u01A8\\u01AA\\u01AB\\u01AD\\u01B0\\u01B4\\u01B6\\u01B9\\u01BA\\u01BD-\\u01BF\\u01C6\\u01C9\\u01CC\\u01CE\\u01D0\\u01D2\\u01D4\\u01D6\\u01D8\\u01DA\\u01DC\\u01DD\\u01DF\\u01E1\\u01E3\\u01E5\\u01E7\\u01E9\\u01EB\\u01ED\\u01EF\\u01F0\\u01F3\\u01F5\\u01F9\\u01FB\\u01FD\\u01FF\\u0201\\u0203\\u0205\\u0207\\u0209\\u020B\\u020D\\u020F\\u0211\\u0213\\u0215\\u0217\\u0219\\u021B\\u021D\\u021F\\u0221\\u0223\\u0225\\u0227\\u0229\\u022B\\u022D\\u022F\\u0231\\u0233-\\u0239\\u023C\\u023F\\u0240\\u0242\\u0247\\u0249\\u024B\\u024D\\u024F",Le="\\x41-\\x5a\\xc0-\\xd6\\xd8-\\xde\\u0100\\u0102\\u0104\\u0106\\u0108\\u010a\\u010c\\u010e\\u0110\\u0112\\u0114\\u0116\\u0118\\u011a\\u011c\\u011e\\u0120\\u0122\\u0124\\u0126\\u0128\\u012a\\u012c\\u012e\\u0130\\u0132\\u0134\\u0136\\u0139\\u013b\\u013d\\u013f\\u0141\\u0143\\u0145\\u0147\\u014a\\u014c\\u014e\\u0150\\u0152\\u0154\\u0156\\u0158\\u015a\\u015c\\u015e\\u0160\\u0162\\u0164\\u0166\\u0168\\u016a\\u016c\\u016e\\u0170\\u0172\\u0174\\u0176\\u0178\\u0179\\u017b\\u017d\\u0181\\u0182\\u0184\\u0186\\u0187\\u0189-\\u018b\\u018e-\\u0191\\u0193\\u0194\\u0196-\\u0198\\u019c\\u019d\\u019f\\u01a0\\u01a2\\u01a4\\u01a6\\u01a7\\u01a9\\u01ac\\u01ae\\u01af\\u01b1-\\u01b3\\u01b5\\u01b7\\u01b8\\u01bc\\u01c4\\u01c5\\u01c7\\u01c8\\u01ca\\u01cb\\u01cd\\u01cf\\u01d1\\u01d3\\u01d5\\u01d7\\u01d9\\u01db\\u01de\\u01e0\\u01e2\\u01e4\\u01e6\\u01e8\\u01ea\\u01ec\\u01ee\\u01f1\\u01f2\\u01f4\\u01f6-\\u01f8\\u01fa\\u01fc\\u01fe\\u0200\\u0202\\u0204\\u0206\\u0208\\u020a\\u020c\\u020e\\u0210\\u0212\\u0214\\u0216\\u0218\\u021a\\u021c\\u021e\\u0220\\u0222\\u0224\\u0226\\u0228\\u022a\\u022c\\u022e\\u0230\\u0232\\u023a\\u023b\\u023d\\u023e\\u0241\\u0243-\\u0246\\u0248\\u024a\\u024c\\u024e",He=new RegExp("(?:["+Le+"]["+F+"]*)?(?:["+Pe+"]["+F+"]*)+|(?:["+Le+"]["+F+"]*)+(?!["+Pe+"])|["+A+"]+|["+Se+"]|[^"+Bt+Ge+M+"]+","g"),st=/[A-Z\xC0-\xD6\xD8-\xDE]?[a-z\xDF-\xF6\xF8-\xFF]+|[A-Z\xC0-\xD6\xD8-\xDE]+(?![a-z\xDF-\xF6\xF8-\xFF])|\d+/g,Et=new RegExp("^(?:["+Pe+Le+"]["+F+"]*)+$"),kt=new RegExp("^((?:["+Pe+Le+"]["+F+"]*)|["+A+"])+$"),Ne=/^[\x01-\xFF]*$/;function qe(j,q){return j==null?q:j}function at(j){if(S(j))return null;if(k(j))return j;return String(j)}function ut(j,q,H){var Z=O(j),ie;if(S(q))ie=Ne.test(Z)?st:He;else if(q instanceof RegExp)ie=q;else{var ye=at(qe(H,""));ie=new RegExp(at(q),ye)}return qe(Z.match(ie),[])}function Lt(j,q){return q===0?I(j):R(j,!0)}function ct(j){var q=O(j);if(q==="")return"";return ut(q).map(Lt).join("")}function Fe(j){var q=O(j);if(q==="")return"";return q.substr(0,1).toLowerCase()+q.substr(1)}function et(j){var q=O(j);if(q==="")return"";return ut(q).map(I).join("-")}function Rt(j){var q=O(j);if(q==="")return"";return ut(q).map(I).join("_")}function uo(j){var q=O(j);return q.toUpperCase()}function or(j){var q=O(j);return q.split("").reduce(Ue,"")}function Ue(j,q){var H=q.toLowerCase(),Z=q.toUpperCase();return j+(q===H?Z:H)}function Wt(j,q){var H=O(j),Z=Array.isArray(q)?q:[],ie=Ne.test(H)?st:He;return H.replace(ie,function(ye,Be){var Ot=Be>0&&Z.indexOf(H[Be-1])>=0;return Ot?ye.toLowerCase():R(ye,!0)})}function be(j,q,H){if(j<=q)return q;if(j>=H)return H;return j}var Te=9007199254740991;function Ke(j){if(j===1/0)return Te;if(j===-1/0)return-Te;return~~j}function sr(j,q,H){var Z=O(j),ie=S(q)?Z.length:be(Ke(q),0,Te),ye=O(H,"...");if(ie>=Z.length)return Z;return Z.substr(0,q-ye.length)+ye}function vt(j,q){var H=O(j);return H.charAt(q)}var Rr=55296,Kr=56319,ar=56320,fa=57343;function ns(j){return j>=Rr&&j<=Kr}function cr(j){return j>=ar&&j<=fa}function xd(j,q){return(j-Rr)*1024+q-ar+65536}function Jn(j){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(S(j))return q;if(typeof j==="number")return j;return Number(j)}function Cz(j,q){return j!==j?q:j}function wz(j,q){var H=O(j),Z=H.length,ie=Jn(q);if(ie=Cz(ie,0),ie<0||ie>=Z)return;var ye=H.charCodeAt(ie),Be;if(ns(ye)&&Z>ie+1){if(Be=H.charCodeAt(ie+1),cr(Be))return xd(ye,Be)}return ye}function j6(j,q){var H=O(j),Z=S(q)?1:be(Ke(q),0,Te);if(H.length<=Z)return H;return H.substr(0,Z)}function M6(j,q){var H=O(j),Z=Jn(q),ie,ye=0;Z=Cz(Z,0);while((ie=le.exec(H))!==null){if(ye===Z)return le.lastIndex=0,ie[0];ye++}return""}function q6(j,q){var H=O(j),Z=S(q)?1:be(Ke(q),0,Te);if(H.length<=Z)return H;return H.substr(H.length-Z,Z)}function F6(j,q,H){var Z=O(j),ie=S(q)?Z.length:be(Ke(q),0,Te),ye=O(H,"...");if(ie>=Z.length)return Z;var Be=Ne.test(Z)?st:He,Ot=0;return Z.replace(Be,function(dt,nr){var pt=nr+dt.length;if(pt<=ie-ye.length)Ot=pt}),Z.substr(0,Ot)+ye}function U6(j,q,H){return O(j).slice(q,H)}function $6(j,q,H){return O(j).substr(q,H)}function V6(j,q,H){return O(j).substring(q,H)}function H6(j){return O(j).length}function G6(j){return O(j).replace(Q,"*").replace(te,"*").length}function K6(j,q){var H=O(j),Z=O(q),ie=Z.length,ye=0,Be=0;if(H===""||Z==="")return ye;do if(Be=H.indexOf(Z,Be),Be!==-1)ye++,Be+=ie;while(Be!==-1);return ye}var W6=Array.prototype.reduce;function J6(j,q,H){var Z=O(j);if(Z===""||typeof q!=="function")return 0;var ie=q.bind(H);return W6.call(Z,function(ye,Be,Ot){return ie(Be,Ot,Z)?ye+1:ye},0)}function Z6(j,q,H){return ut(j,q,H).length}function _d(){this.index=0}_d.prototype.increment=function(){this.index++},_d.prototype.incrementOnEmptyPosition=function(j){if(S(j))this.increment()},_d.prototype.getIndexByPosition=function(j){return S(j)?this.index:j-1};var Y6="i",Sz="b",Tz="c",X6="d",Ez="o",Q6="u",kz="x",Oz="X",Iz="e",Rz="E",Az="f",Pz="g",Gm="G",e8="s",t8="'",Bz="+",r8="-",o8="%%",n8=2,i8=8,Dz=16;function Lz(j,q){var H=O(j),Z=S(q)?1:be(Ke(q),0,Te),ie="";while(Z){if(Z&1)ie+=H;if(Z>1)H+=H;Z>>=1}return ie}function zd(j,q){var H=Ke(q/j.length),Z=q%j.length;return Lz(j,H+Z).substr(0,q)}function Nz(j,q,H){var Z=O(j),ie=S(q)?0:be(Ke(q),0,Te),ye=O(H," ");if(ie<=Z.length)return Z;return zd(ye,ie-Z.length)+Z}function jz(j,q,H){var Z=O(j),ie=S(q)?0:be(Ke(q),0,Te),ye=O(H," ");if(ie<=Z.length)return Z;return Z+zd(ye,ie-Z.length)}function s8(j,q){var H=q.width;if(S(H)||j.length>=H)return j;var Z=q.alignmentSpecifier===r8?jz:Nz;return Z(j,H,q.getPaddingCharacter())}function Mz(j,q,H){if(H.signSpecifier===Bz&&j>=0)q=Bz+q;return q}function a8(j,q){var H=parseFloat(j),Z;if(isNaN(H))H=0;var ie=Jn(q.precision,6);switch(q.typeSpecifier){case Az:Z=H.toFixed(ie);break;case Iz:Z=H.toExponential(ie);break;case Rz:Z=H.toExponential(ie).toUpperCase();break;case Pz:case Gm:Z=c8(H,ie,q);break}return Z=Mz(H,Z,q),O(Z)}function c8(j,q,H){if(j===0)return"0";var Z=q===0?1:q,ie=j.toPrecision(Z).replace(re,"");if(H.typeSpecifier===Gm)ie=ie.toUpperCase();return ie}function l8(j,q){var H=parseInt(j);if(isNaN(H))H=0;switch(H=H>>>0,q.typeSpecifier){case Tz:H=String.fromCharCode(H);break;case Sz:H=H.toString(n8);break;case Ez:H=H.toString(i8);break;case kz:H=H.toString(Dz);break;case Oz:H=H.toString(Dz).toUpperCase();break}return O(H)}function u8(j,q){var H=parseInt(j);if(isNaN(H))H=0;return Mz(H,at(H),q)}function d8(j,q){var H=j,Z=q.precision;if(!S(Z)&&H.length>Z)H=sr(H,Z,"");return H}function p8(j,q){var H;switch(q.typeSpecifier){case e8:H=d8;break;case X6:case Y6:H=u8;break;case Tz:case Sz:case Ez:case kz:case Oz:case Q6:H=l8;break;case Az:case Iz:case Rz:case Pz:case Gm:H=a8;break}var Z=H(j,q);return s8(Z,q)}function Km(j){this.percent=j.percent,this.signSpecifier=j.signSpecifier,this.paddingSpecifier=j.paddingSpecifier,this.alignmentSpecifier=j.alignmentSpecifier,this.width=j.width,this.precision=j.precision,this.typeSpecifier=j.typeSpecifier}Km.prototype.isPercentLiteral=function(){return o8===this.percent},Km.prototype.getPaddingCharacter=function(){var j=qe(this.paddingSpecifier," ");if(j.length===2&&j[0]===t8)j=j[1];return j};function f8(j,q,H){if(S(H.typeSpecifier))throw Error("sprintf(): Unknown type specifier");if(j>q-1)throw Error("sprintf(): Too few arguments");if(j<0)throw Error("sprintf(): Argument number must be greater than zero")}function h8(j,q,H,Z,ie,ye,Be,Ot,dt,nr,pt){var Dt=new Km({percent:Z,signSpecifier:ye,paddingSpecifier:Be,alignmentSpecifier:Ot,width:Jn(dt,null),precision:Jn(nr,null),typeSpecifier:pt});if(Dt.isPercentLiteral())return H.slice(1);var Mt=j.getIndexByPosition(ie);return j.incrementOnEmptyPosition(ie),f8(Mt,q.length,Dt),p8(q[Mt],Dt)}function qz(j){var q=O(j);if(q==="")return q;for(var H=arguments.length,Z=Array(H>1?H-1:0),ie=1;ie<H;ie++)Z[ie-1]=arguments[ie];var ye=h8.bind(void 0,new _d,Z);return q.replace(De,ye)}function m8(j,q){return qz.apply(void 0,[j].concat(h(qe(q,[]))))}var g8={"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};function y8(j){return g8[j]}function b8(j){return O(j).replace($e,y8)}function v8(j){return O(j).replace(Ae,"\\$&")}var Fz={"<":/(&lt;)|(&#x0*3c;)|(&#0*60;)/gi,">":/(&gt;)|(&#x0*3e;)|(&#0*62;)/gi,"&":/(&amp;)|(&#x0*26;)|(&#0*38;)/gi,'"':/(&quot;)|(&#x0*22;)|(&#0*34;)/gi,"'":/(&#x0*27;)|(&#0*39;)/gi,"`":/(&#x0*60;)|(&#0*96;)/gi},x8=Object.keys(Fz);function _8(j,q){return j.replace(Fz[q],q)}function z8(j){var q=O(j);return x8.reduce(_8,q)}function C8(j,q,H){var Z=O(j);return Z.indexOf(q,H)}function w8(j,q,H){var Z=O(j);return Z.lastIndexOf(q,H)}function S8(j,q,H){var Z=O(j),ie=S(H)?0:be(Ke(H),0,Z.length),ye=Z.substr(ie).search(q);if(ye!==-1&&!isNaN(ie))ye+=ie;return ye}function T8(j,q,H){var Z=O(j),ie=O(q),ye=Jn(H);if(ye<0||ye>Z.length||ie==="")return Z;return Z.slice(0,ye)+ie+Z.slice(ye)}var Uz={"3":"Ξξ","8":"Θθ",A:"AÀÁÂÃÄÅĀĂĄǍǞǠǺȀȂȦȺΆΑА",B:"BƁƂɃΒБ",C:"CÇĆĈĊČƇȻЦ",D:"DĎĐƉƊƋÐΔД",E:"EÈÉÊËĒĔĖĘĚƎƐȄȆȨΈΕЕЭ",F:"FƑΦФ",G:"GĜĞĠĢƓǤǦǴΓГҐ",H:"HĤĦȞΉΗХ",I:"IÌÍÎÏĨĪĬĮİƗǏȈȊΊΙΪІИ",J:"JĴɈЙ",K:"KĶƘǨΚК",L:"LĹĻĽĿŁȽΛЛ",M:"MƜΜМ",N:"NÑŃŅŇƝǸȠΝН",O:"OÒÓÔÕÖØŌŎŐƆƟƠǑǪǬǾȌȎȪȬȮȰΌΟО",P:"PƤΠП",Q:"QɊ",R:"RŔŖŘȐȒɌΡР",S:"SŚŜŞŠȘΣС",T:"TŢŤŦƬƮȚȾΤТ",U:"UÙÚÛÜŨŪŬŮŰŲƯǓǕǗǙǛȔȖɄУЪ",V:"VƲɅВ",W:"WŴΏΩ",X:"XΧ",Y:"YÝŶŸƳȲɎΎΥΫЫ",Z:"ZŹŻŽƵȤΖЗ",a:"aàáâãäåāăąǎǟǡǻȁȃȧɐάαа",b:"bƀƃɓβб",c:"cçćĉċčƈȼц",d:"dďđƌɖɗðδд",e:"eèéêëēĕėęěǝȅȇȩɇɛέεеэ",f:"fƒφф",g:"gĝğġģǥǧǵɠγгґ",h:"hĥħȟɥήηх",i:"iìíîïĩīĭįıǐȉȋɨΐίιϊиі",j:"jĵǰɉй",k:"kķƙǩκк",l:"lĺļľŀłſƚɫλл",m:"mɯɱμм",n:"nñńņňʼnƞǹɲνн",o:"oòóôõöøōŏőơǒǫǭǿȍȏȫȭȯȱɔɵοόо",p:"pƥπп",q:"qɋ",r:"rŕŗřȑȓɍɽρр",s:"sßśŝşšșȿςσс",t:"tţťŧƭțʈτт",u:"uùúûüũūŭůűųưǔǖǘǚǜȕȗʉуъ",v:"vʋʌв",w:"wŵωώ",x:"xχ",y:"yýÿŷƴȳɏΰυϋύы",z:"zźżžƶȥɀζз",OE:"ŒŒ",oe:"œœ",AE:"ÆǢǼ",ae:"æǣǽ",hv:"ƕ",OI:"Ƣ",oi:"ƣ",DZ:"DŽDZ",Dz:"DžDz",dz:"dždz",LJ:"LJ",Lj:"Lj",lj:"lj",NJ:"NJ",Nj:"Nj",nj:"nj",OU:"Ȣ",ou:"ȣ",TH:"Þ",th:"þ",PS:"Ψ",ps:"ψ",Yo:"Ё",Ye:"Є",Yi:"Ї",Zh:"Ж",Ch:"Ч",Sh:"ШЩ","":"ЪЬь",Yu:"Ю",Ya:"Я",zh:"ж",ch:"ч",sh:"шщ",yu:"ю",ya:"я",yo:"ё",ye:"є",yi:"ї"},Fc=null;function E8(){if(Fc!==null)return Fc;return Fc={},Object.keys(Uz).forEach(function(j){var q=Uz[j];for(var H=0;H<q.length;H++){var Z=q[H];Fc[Z]=j}}),Fc}function k8(j){var q=E8()[j];return q?q:j}function O8(j,q){return q}function $z(j){var q=O(j);if(q==="")return"";return q.replace(We,k8).replace(Q,O8)}function I8(j,q,H){var Z=O(j),ie=S(q)?0:be(Ke(q),0,Te),ye=O(H," ");if(ie<=Z.length)return Z;var Be=ie-Z.length,Ot=Ke(Be/2),dt=Be%2;return zd(ye,Ot)+Z+zd(ye,Ot+dt)}function R8(j,q,H){var Z=O(j);return Z.replace(q,H)}function Vz(j,q,H){var Z=O(j);if(q instanceof RegExp){if(q.flags.indexOf("g")===-1)throw TypeError("search argument is a non-global regular expression");return Z.replace(q,H)}var ie=O(q),ye=typeof H==="function";if(!ye)H=O(H);var Be=ie.length;if(Be===0)return Vz(j,/(?:)/g,H);var Ot=Be>1?Be:1,dt=[],nr=Z.indexOf(ie,0);while(nr!==-1)dt.push(nr),nr=Z.indexOf(ie,nr+Ot);var pt=0,Dt="";for(var Mt=0;Mt<dt.length;Mt++){var Xr=dt[Mt],po=H;if(ye)po=O(H.call(void 0,ie,Xr,Z));Dt+=Z.slice(pt,Xr)+po,pt=Xr+Be}if(pt<Z.length)Dt+=Z.slice(pt);return Dt}function A8(j){var q=O(j);return q.split("").reverse().join("")}function Hz(j){var q=O(j);q=q.replace(Q,function(ie,ye,Be){return Hz(Be)+ye}).replace(te,"$2$1");var H="",Z=q.length;while(Z--)H+=q.charAt(Z);return H}function P8(j){var q=O(j);if(q==="")return"";var H=$z(q).replace(We,"-");return et(H)}function B8(j,q,H,Z){var ie=O(j),ye=O(Z),Be=Jn(q);if(Be<0){if(Be=ie.length+Be,Be<0)Be=0}else if(Be>ie.length)Be=ie.length;var Ot=Jn(H,ie.length-Be);if(Ot<0)Ot=0;return ie.slice(0,Be)+ye+ie.slice(Be+Ot)}function D8(j,q,H){var Z=O(j),ie,ye;if(k(q)&&k(H))ie=q.split(""),ye=H.split("");else{var Be=L8(qe(q,{})),Ot=f(Be,2);ie=Ot[0],ye=Ot[1]}var dt=ie.length;if(dt===0)return Z;var nr="",pt=ye.length;for(var Dt=0;Dt<Z.length;Dt++){var Mt=!1,Xr=void 0;for(var po=0;po<dt&&po<pt;po++){var fo=ie[po];if(Z.substr(Dt,fo.length)===fo){Mt=!0,Xr=ye[po],Dt=Dt+fo.length-1;break}}nr+=Mt?Xr:Z[Dt]}return nr}function L8(j){var q=Object.keys(j),H=q.sort(N8).map(function(Z){return j[Z]});return[q,H]}function N8(j,q){if(j.length===q.length)return 0;return j.length<q.length?1:-1}function Wm(j,q,H){var Z=O(j),ie=at(q);if(ie===null)return!1;if(ie==="")return!0;return H=S(H)?0:be(Ke(H),0,Z.length),Z.indexOf(ie,H)!==-1}var j8=Array.prototype.reduce;function Gz(j,q){var H=O(j);if(q===""||H==="")return H;var Z=at(q);if(S(Z))return H.replace(xe,"");var ie=!0;return j8.call(H,function(ye,Be){if(ie&&Wm(Z,Be))return ye;return ie=!1,ye+Be},"")}var M8=Array.prototype.reduceRight;function Kz(j,q){var H=O(j);if(q===""||H==="")return H;var Z=at(q);if(S(Z))return H.replace(Re,"");var ie=!0;return M8.call(H,function(ye,Be){if(ie&&Wm(Z,Be))return ye;return ie=!1,Be+ye},"")}function q8(j,q){var H=O(j);if(q===""||H==="")return H;var Z=at(q);if(S(Z))return H.trim();return Kz(Gz(H,Z),Z)}var F8="width",U8="newLine",$8="indent",V8="cut";function H8(j){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=O(j),Z=G8(q),{width:ie,newLine:ye,indent:Be,cut:Ot}=Z;if(H===""||ie<=0)return Be;var dt=H.length,nr=H.substring.bind(H),pt=0,Dt="";while(dt-pt>ie){if(H[pt]===" "){pt++;continue}var Mt=H.lastIndexOf(" ",ie+pt);if(Mt>=pt)Dt+=Be+nr(pt,Mt)+ye,pt=Mt+1;else if(Ot)Dt+=Be+nr(pt,ie+pt)+ye,pt+=ie;else if(Mt=H.indexOf(" ",ie+pt),Mt>=0)Dt+=Be+nr(pt,Mt)+ye,pt=Mt+1;else Dt+=Be+nr(pt),pt=dt}if(pt<dt)Dt+=Be+nr(pt);return Dt}function G8(j){return{width:Jn(j[F8],75),newLine:O(j[U8],`
64
+ `),indent:O(j[$8],""),cut:E(j[V8],!1)}}function K8(j,q,H){if(S(q))return!1;var Z=O(j),ie=O(q);if(ie==="")return!0;H=S(H)?Z.length:be(Ke(H),0,Z.length),H-=ie.length;var ye=Z.indexOf(ie,H);return ye!==-1&&ye===H}function Jm(j){var q=O(j);return Et.test(q)}function W8(j){var q=O(j);return kt.test(q)}function J8(j){var q=O(j);return q.trim().length===0}function Z8(j){var q=O(j);return me.test(q)}function Y8(j){var q=O(j);return q.length===0}function X8(j){var q=O(j);return Jm(q)&&q.toLowerCase()===q}function Q8(j){var q=typeof j==="object"&&!S(j)?Number(j):j;return(typeof q==="number"||typeof q==="string")&&!isNaN(q-parseFloat(q))}function e$(j){var q=O(j);return Jm(q)&&q.toUpperCase()===q}function t$(j,q,H){var Z=O(j),ie=O(H),ye;if(!(q instanceof RegExp)){if(ye=at(q),ye===null)return!1;q=new RegExp(ye,ie)}return q.test(Z)}function r$(j,q,H){var Z=O(j),ie=at(q);if(ie===null)return!1;if(ie==="")return!0;return H=S(H)?0:be(Ke(H),0,Z.length),Z.substr(H,ie.length)===ie}function o$(j){var q=O(j);return q.split("")}function n$(j){var q=O(j),H=q.length,Z=[],ie=0,ye;while(ie<H)ye=wz(q,ie),Z.push(ye),ie+=ye>65535?2:1;return Z}function i$(j){var q=O(j);return qe(q.match(le),[])}function s$(j,q,H){var Z=O(j);return Z.split(q,H)}var a$="\uFEFF";function c$(j){var q=O(j);if(q==="")return"";if(q[0]===a$)return q.substring(1);return q}function l$(j,q,H){var Z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,ie=0;if(Z)ie=-q.length+1;var ye=j.substr(H+ie,q.length);return ye.toLowerCase()===q}function u$(j){var q=[],H;while((H=oe.exec(j))!==null)q.push(H[1]);return q}var Wz=0,Jz=1,Ym=2;function d$(j){var q=Wz,H="",Z=0;while(q!==Ym){var ie=j[Z++].toLowerCase();switch(ie){case"<":break;case">":q=Ym;break;default:if(he.test(ie)){if(q===Jz)q=Ym}else{if(q===Wz)q=Jz;if(ie!=="/")H+=ie}break}}return H}var Uc=0,is=1,Cd=2,Zz=3;function p$(j,q,H){if(j=O(j),j==="")return"";if(!Array.isArray(q)){var Z=O(q);q=Z===""?[]:u$(Z)}var ie=O(H),ye=j.length,Be=q.length>0,Ot=l$.bind(null,j),dt=Uc,nr=0,pt="",Dt="",Mt=null;for(var Xr=0;Xr<ye;Xr++){var po=j[Xr],fo=!1;switch(po){case"<":if(Mt)break;if(Ot("< ",Xr,!1)){fo=!0;break}if(dt===Uc){fo=!0,dt=is;break}if(dt===is){nr++;break}fo=!0;break;case"!":if(dt===is&&Ot("<!",Xr)){dt=Cd;break}fo=!0;break;case"-":if(dt===Cd&&Ot("!--",Xr)){dt=Zz;break}fo=!0;break;case'"':case"'":if(dt===is){if(Mt===po)Mt=null;else if(!Mt)Mt=po}fo=!0;break;case"E":case"e":if(dt===Cd&&Ot("doctype",Xr)){dt=is;break}fo=!0;break;case">":if(nr>0){nr--;break}if(Mt)break;if(dt===is){if(Mt=null,dt=Uc,Be){Dt+=">";var v$=d$(Dt);if(q.indexOf(v$.toLowerCase())!==-1)pt+=Dt;else pt+=ie;Dt=""}else pt+=ie;break}if(dt===Cd||dt===Zz&&Ot("-->",Xr)){Mt=null,dt=Uc,Dt="";break}fo=!0;break;default:fo=!0}if(fo)switch(dt){case Uc:pt+=po;break;case is:if(Be)Dt+=po;break}}return pt}var ha=null;function f$(){if(ha!==null)return ha;if(typeof global==="object"&&global.Object===Object)ha=global;else if(typeof self==="object"&&self.Object===Object)ha=self;else ha=Function("return this")();return ha}var Qm=f$(),h$=Qm.v;function m$(){if(this===Qm.v)Qm.v=h$;return this}var g$="1.4.0",eg={camelCase:ct,capitalize:R,decapitalize:Fe,kebabCase:et,lowerCase:I,snakeCase:Rt,swapCase:or,titleCase:Wt,upperCase:uo,count:H6,countGraphemes:G6,countSubstrings:K6,countWhere:J6,countWords:Z6,escapeHtml:b8,escapeRegExp:v8,unescapeHtml:z8,sprintf:qz,vprintf:m8,indexOf:C8,lastIndexOf:w8,search:S8,charAt:vt,codePointAt:wz,first:j6,graphemeAt:M6,last:q6,prune:F6,slice:U6,substr:$6,substring:V6,truncate:sr,insert:T8,latinise:$z,pad:I8,padLeft:Nz,padRight:jz,repeat:Lz,replace:R8,replaceAll:Vz,reverse:A8,reverseGrapheme:Hz,slugify:P8,splice:B8,tr:D8,trim:q8,trimLeft:Gz,trimRight:Kz,wordWrap:H8,endsWith:K8,includes:Wm,isAlpha:Jm,isAlphaDigit:W8,isBlank:J8,isDigit:Z8,isEmpty:Y8,isLowerCase:X8,isNumeric:Q8,isString:k,isUpperCase:e$,matches:t$,startsWith:r$,chars:o$,codePoints:n$,graphemes:i$,split:s$,words:ut,stripBom:c$,stripTags:p$,noConflict:m$,version:g$};function So(j,q){this._wrappedValue=j,this._explicitChain=q}So.prototype.value=function(){return this._wrappedValue},So.prototype.valueOf=function(){return this.value()},So.prototype.toJSON=function(){return this.value()},So.prototype.toString=function(){return String(this.value())},So.prototype.chain=function(){return new So(this._wrappedValue,!0)},So.prototype.thru=function(j){if(typeof j==="function")return new So(j(this._wrappedValue),this._explicitChain);return this},So.prototype._explicitChain=!0;function y$(j){return function(){for(var q=arguments.length,H=Array(q),Z=0;Z<q;Z++)H[Z]=arguments[Z];var ie=j.apply(void 0,[this._wrappedValue].concat(H));if(this._explicitChain||typeof ie==="string")return new So(ie,this._explicitChain);else return ie}}Object.keys(eg).forEach(function(j){So.prototype[j]=y$(eg[j])});function b$(j){return new So(j,!0)}function Yz(j){return new So(j,!1)}return o(Yz,eg,{chain:b$}),Yz})});var IE=i(function(go){var oY=go&&go.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(go,"__esModule",{value:!0});go.webEOL=go.unixEOL=void 0;go.upperCaseSnakeCase=nY;go.camelCase=iY;go.titleFormat=sY;go.pascalCase=aY;go.kebabCase=cY;go.formatJson=lY;var Ci=oY(OE());go.unixEOL=`
65
+ `;go.webEOL=`\r
66
+ `;function nY(o){return Ci.default.upperCase(Ci.default.snakeCase(o))}function iY(o){return Ci.default.camelCase(o)}function sY(o){return Ci.default.titleCase(Ci.default.words(o).join(" "))}function aY(o){return Ci.default.words(o).map((f)=>Ci.default.capitalize(f)).join("")}function cY(o){return Ci.default.kebabCase(o)}function lY(o){return JSON.stringify(o,null,2)+`
67
+ `}});var AE=i(function(RE){Object.defineProperty(RE,"__esModule",{value:!0});RE.caps=uY;function uY(o){return o?o.toUpperCase():"V2"}});var DE=i(function(PE){Object.defineProperty(PE,"__esModule",{value:!0});PE.UniqueNameGenerator=void 0;class Xn{static getNameForComparison(o,f){return f?o:o.toLowerCase()}constructor(o="_",f=[]){this.indexSeparator=o,this.usedNames=[],this.addToUsedNames(...f)}addToUsedNames(...o){this.usedNames.push(...o)}generateUniqueName(o,f=!0){return this.generateUniqueNamesWithSuffixes(o,[],f)[0]}generateAndSaveUniqueName(o,f=!0){let h=this.generateUniqueName(o,f);return this.addToUsedNames(h),h}generateUniqueNamesWithSuffixes(o,f,h=!0){let y=this.getUsedNamesStartingWith(o,h),x=this.generateNamesWithSuffixes(o,f);if(!this.areNamesUsed(x,y,h))return[o,...x];let _=this.getUniqueIndex(o,y,f,h);return this.generateNamesWithIndexAndSuffixes(o,_,f)}generateAndSaveUniqueNamesWithSuffixes(o,f,h=!0){let y=this.generateUniqueNamesWithSuffixes(o,f,h);return this.addToUsedNames(...y),y}getUsedNamesForComparison(o){return this.usedNames.map((f)=>Xn.getNameForComparison(f,o))}areNamesUsed(o,f,h){return o.some((y)=>f.map((x)=>Xn.getNameForComparison(x,h)).includes(Xn.getNameForComparison(y,h)))}generateNamesWithIndexAndSuffixes(o,f,h){let y=this.getNameWithoutIndex(o);return this.generateNamesWithSuffixes(`${y}${this.indexSeparator}${f}`,h)}generateNamesWithSuffixes(o,f){return[o,...f.map((h)=>`${o}${h}`)]}getUsedNamesStartingWith(o,f){let h=this.getNameWithoutIndex(o);return this.getUsedNamesForComparison(f).filter((y)=>y.startsWith(Xn.getNameForComparison(h,f)))}getUniqueIndex(o,f,h,y){let x=1;while(x<Xn.MAXIMUM_NUMBER_OF_SUFFIX){let _=this.generateNamesWithIndexAndSuffixes(o,x,h);if(!this.areNamesUsed(_,f,y))return x;x++}throw Error(`Unable to find a unique name for ${o} within the range of ${Xn.MAXIMUM_NUMBER_OF_SUFFIX} suffixes.`)}getNameWithoutIndex(o){return o.replace(new RegExp(`${this.indexSeparator}\\d+$`),"")}}PE.UniqueNameGenerator=Xn;Xn.MAXIMUM_NUMBER_OF_SUFFIX=1000});var jE=i(function(HRe,NE){var LE=c("stream").Stream,pY=c("util");NE.exports=an;function an(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}pY.inherits(an,LE);an.create=function(o,f){var h=new this;f=f||{};for(var y in f)h[y]=f[y];h.source=o;var x=o.emit;if(o.emit=function(){return h._handleEmit(arguments),x.apply(o,arguments)},o.on("error",function(){}),h.pauseStream)o.pause();return h};Object.defineProperty(an.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});an.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};an.prototype.resume=function(){if(!this._released)this.release();this.source.resume()};an.prototype.pause=function(){this.source.pause()};an.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(o){this.emit.apply(this,o)}.bind(this)),this._bufferedEvents=[]};an.prototype.pipe=function(){var o=LE.prototype.pipe.apply(this,arguments);return this.resume(),o};an.prototype._handleEmit=function(o){if(this._released){this.emit.apply(this,o);return}if(o[0]==="data")this.dataSize+=o[1].length,this._checkIfMaxDataSizeExceeded();this._bufferedEvents.push(o)};an.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded)return;if(this.dataSize<=this.maxDataSize)return;this._maxDataSizeExceeded=!0;var o="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",Error(o))}});var UE=i(function(GRe,FE){var fY=c("util"),qE=c("stream").Stream,ME=jE();FE.exports=tr;function tr(){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}fY.inherits(tr,qE);tr.create=function(o){var f=new this;o=o||{};for(var h in o)f[h]=o[h];return f};tr.isStreamLike=function(o){return typeof o!=="function"&&typeof o!=="string"&&typeof o!=="boolean"&&typeof o!=="number"&&!Buffer.isBuffer(o)};tr.prototype.append=function(o){var f=tr.isStreamLike(o);if(f){if(!(o instanceof ME)){var h=ME.create(o,{maxDataSize:1/0,pauseStream:this.pauseStreams});o.on("data",this._checkDataSize.bind(this)),o=h}if(this._handleErrors(o),this.pauseStreams)o.pause()}return this._streams.push(o),this};tr.prototype.pipe=function(o,f){return qE.prototype.pipe.call(this,o,f),this.resume(),o};tr.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};tr.prototype._realGetNext=function(){var o=this._streams.shift();if(typeof o>"u"){this.end();return}if(typeof o!=="function"){this._pipeNext(o);return}var f=o;f(function(h){var y=tr.isStreamLike(h);if(y)h.on("data",this._checkDataSize.bind(this)),this._handleErrors(h);this._pipeNext(h)}.bind(this))};tr.prototype._pipeNext=function(o){this._currentStream=o;var f=tr.isStreamLike(o);if(f){o.on("end",this._getNext.bind(this)),o.pipe(this,{end:!1});return}var h=o;this.write(h),this._getNext()};tr.prototype._handleErrors=function(o){var f=this;o.on("error",function(h){f._emitError(h)})};tr.prototype.write=function(o){this.emit("data",o)};tr.prototype.pause=function(){if(!this.pauseStreams)return;if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};tr.prototype.resume=function(){if(!this._released)this._released=!0,this.writable=!0,this._getNext();if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function")this._currentStream.resume();this.emit("resume")};tr.prototype.end=function(){this._reset(),this.emit("end")};tr.prototype.destroy=function(){this._reset(),this.emit("close")};tr.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};tr.prototype._checkDataSize=function(){if(this._updateDataSize(),this.dataSize<=this.maxDataSize)return;var o="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(Error(o))};tr.prototype._updateDataSize=function(){this.dataSize=0;var o=this;if(this._streams.forEach(function(f){if(!f.dataSize)return;o.dataSize+=f.dataSize}),this._currentStream&&this._currentStream.dataSize)this.dataSize+=this._currentStream.dataSize};tr.prototype._emitError=function(o){this._reset(),this.emit("error",o)}});var $E=i(function(KRe,hY){hY.exports={"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}}});var WE=i(function(_Y){/*!
68
+ * mime-types
69
+ * Copyright(c) 2014 Jonathan Ong
70
+ * Copyright(c) 2015 Douglas Christopher Wilson
71
+ * MIT Licensed
72
+ */var lp=$E(),mY=c("path").extname,VE=/^\s*([^;\s]*)(?:;|\s|$)/,gY=/^text\//i;_Y.charset=HE;_Y.charsets={lookup:HE};_Y.contentType=yY;_Y.extension=bY;_Y.extensions=Object.create(null);_Y.lookup=vY;_Y.types=Object.create(null);xY(_Y.extensions,_Y.types);function HE(o){if(!o||typeof o!=="string")return!1;var f=VE.exec(o),h=f&&lp[f[1].toLowerCase()];if(h&&h.charset)return h.charset;if(f&&gY.test(f[1]))return"UTF-8";return!1}function yY(o){if(!o||typeof o!=="string")return!1;var f=o.indexOf("/")===-1?_Y.lookup(o):o;if(!f)return!1;if(f.indexOf("charset")===-1){var h=_Y.charset(f);if(h)f+="; charset="+h.toLowerCase()}return f}function bY(o){if(!o||typeof o!=="string")return!1;var f=VE.exec(o),h=f&&_Y.extensions[f[1].toLowerCase()];if(!h||!h.length)return!1;return h[0]}function vY(o){if(!o||typeof o!=="string")return!1;var f=mY("x."+o).toLowerCase().substr(1);if(!f)return!1;return _Y.types[f]||!1}function xY(o,f){var h=["nginx","apache",void 0,"iana"];Object.keys(lp).forEach(function(x){var _=lp[x],z=_.extensions;if(!z||!z.length)return;o[x]=z;for(var C=0;C<z.length;C++){var w=z[C];if(f[w]){var S=h.indexOf(lp[f[w]].source),E=h.indexOf(_.source);if(f[w]!=="application/octet-stream"&&(S>E||S===E&&f[w].substr(0,12)==="application/"))continue}f[w]=x}})}});var ZE=i(function(JRe,JE){JE.exports=SY;function SY(o){var f=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if(f)f(o);else setTimeout(o,0)}});var oy=i(function(ZRe,XE){var YE=ZE();XE.exports=TY;function TY(o){var f=!1;return YE(function(){f=!0}),function(y,x){if(f)o(y,x);else YE(function(){o(y,x)})}}});var ny=i(function(YRe,QE){QE.exports=EY;function EY(o){Object.keys(o.jobs).forEach(kY.bind(o)),o.jobs={}}function kY(o){if(typeof this.jobs[o]=="function")this.jobs[o]()}});var iy=i(function(XRe,tk){var ek=oy(),OY=ny();tk.exports=IY;function IY(o,f,h,y){var x=h.keyedList?h.keyedList[h.index]:h.index;h.jobs[x]=RY(f,x,o[x],function(_,z){if(!(x in h.jobs))return;if(delete h.jobs[x],_)OY(h);else h.results[x]=z;y(_,h.results)})}function RY(o,f,h,y){var x;if(o.length==2)x=o(h,ek(y));else x=o(h,f,ek(y));return x}});var sy=i(function(QRe,rk){rk.exports=AY;function AY(o,f){var h=!Array.isArray(o),y={index:0,keyedList:h||f?Object.keys(o):null,jobs:{},results:h?{}:[],size:h?Object.keys(o).length:o.length};if(f)y.keyedList.sort(h?f:function(x,_){return f(o[x],o[_])});return y}});var ay=i(function(eAe,ok){var PY=ny(),BY=oy();ok.exports=DY;function DY(o){if(!Object.keys(this.jobs).length)return;this.index=this.size,PY(this),BY(o)(null,this.results)}});var ik=i(function(tAe,nk){var LY=iy(),NY=sy(),jY=ay();nk.exports=MY;function MY(o,f,h){var y=NY(o);while(y.index<(y.keyedList||o).length)LY(o,f,y,function(x,_){if(x){h(x,_);return}if(Object.keys(y.jobs).length===0){h(null,y.results);return}}),y.index++;return jY.bind(y,h)}});var cy=i(function(rAe,up){var sk=iy(),qY=sy(),FY=ay();up.exports=UY;up.exports.ascending=ak;up.exports.descending=$Y;function UY(o,f,h,y){var x=qY(o,h);return sk(o,f,x,function _(z,C){if(z){y(z,C);return}if(x.index++,x.index<(x.keyedList||o).length){sk(o,f,x,_);return}y(null,x.results)}),FY.bind(x,y)}function ak(o,f){return o<f?-1:o>f?1:0}function $Y(o,f){return-1*ak(o,f)}});var lk=i(function(oAe,ck){var VY=cy();ck.exports=HY;function HY(o,f,h){return VY(o,f,null,h)}});var dk=i(function(nAe,uk){uk.exports={parallel:ik(),serial:lk(),serialOrdered:cy()}});var ly=i(function(iAe,pk){pk.exports=Object});var hk=i(function(sAe,fk){fk.exports=Error});var gk=i(function(aAe,mk){mk.exports=EvalError});var bk=i(function(cAe,yk){yk.exports=RangeError});var xk=i(function(lAe,vk){vk.exports=ReferenceError});var zk=i(function(uAe,_k){_k.exports=SyntaxError});var dp=i(function(dAe,Ck){Ck.exports=TypeError});var Sk=i(function(pAe,wk){wk.exports=URIError});var Ek=i(function(fAe,Tk){Tk.exports=Math.abs});var Ok=i(function(hAe,kk){kk.exports=Math.floor});var Rk=i(function(mAe,Ik){Ik.exports=Math.max});var Pk=i(function(gAe,Ak){Ak.exports=Math.min});var Dk=i(function(yAe,Bk){Bk.exports=Math.pow});var Nk=i(function(bAe,Lk){Lk.exports=Math.round});var Mk=i(function(vAe,jk){jk.exports=Number.isNaN||function(f){return f!==f}});var Fk=i(function(xAe,qk){var GY=Mk();qk.exports=function(f){if(GY(f)||f===0)return f;return f<0?-1:1}});var $k=i(function(_Ae,Uk){Uk.exports=Object.getOwnPropertyDescriptor});var uy=i(function(zAe,Vk){var pp=$k();if(pp)try{pp([],"length")}catch(o){pp=null}Vk.exports=pp});var Kk=i(function(CAe,Gk){var fp=Object.defineProperty||!1;if(fp)try{fp({},"a",{value:1})}catch(o){fp=!1}Gk.exports=fp});var dy=i(function(wAe,Wk){Wk.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var f={},h=Symbol("test"),y=Object(h);if(typeof h==="string")return!1;if(Object.prototype.toString.call(h)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(y)!=="[object Symbol]")return!1;var x=42;f[h]=x;for(var _ in f)return!1;if(typeof Object.keys==="function"&&Object.keys(f).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(f).length!==0)return!1;var z=Object.getOwnPropertySymbols(f);if(z.length!==1||z[0]!==h)return!1;if(!Object.prototype.propertyIsEnumerable.call(f,h))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var C=Object.getOwnPropertyDescriptor(f,h);if(C.value!==x||C.enumerable!==!0)return!1}return!0}});var Yk=i(function(SAe,Zk){var Jk=typeof Symbol<"u"&&Symbol,KY=dy();Zk.exports=function(){if(typeof Jk!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof Jk("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return KY()}});var py=i(function(TAe,Xk){Xk.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var fy=i(function(EAe,Qk){var WY=ly();Qk.exports=WY.getPrototypeOf||null});var rO=i(function(kAe,tO){var JY="Function.prototype.bind called on incompatible ",ZY=Object.prototype.toString,YY=Math.max,XY="[object Function]",eO=function(f,h){var y=[];for(var x=0;x<f.length;x+=1)y[x]=f[x];for(var _=0;_<h.length;_+=1)y[_+f.length]=h[_];return y},QY=function(f,h){var y=[];for(var x=h||0,_=0;x<f.length;x+=1,_+=1)y[_]=f[x];return y},eX=function(o,f){var h="";for(var y=0;y<o.length;y+=1)if(h+=o[y],y+1<o.length)h+=f;return h};tO.exports=function(f){var h=this;if(typeof h!=="function"||ZY.apply(h)!==XY)throw TypeError(JY+h);var y=QY(arguments,1),x,_=function(){if(this instanceof x){var E=h.apply(this,eO(y,arguments));if(Object(E)===E)return E;return this}return h.apply(f,eO(y,arguments))},z=YY(0,h.length-y.length),C=[];for(var w=0;w<z;w++)C[w]="$"+w;if(x=Function("binder","return function ("+eX(C,",")+"){ return binder.apply(this,arguments); }")(_),h.prototype){var S=function(){};S.prototype=h.prototype,x.prototype=new S,S.prototype=null}return x}});var hl=i(function(OAe,oO){var tX=rO();oO.exports=Function.prototype.bind||tX});var hp=i(function(IAe,nO){nO.exports=Function.prototype.call});var hy=i(function(RAe,iO){iO.exports=Function.prototype.apply});var aO=i(function(AAe,sO){sO.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var lO=i(function(PAe,cO){var rX=hl(),oX=hy(),nX=hp(),iX=aO();cO.exports=iX||rX.call(nX,oX)});var dO=i(function(BAe,uO){var sX=hl(),aX=dp(),cX=hp(),lX=lO();uO.exports=function(f){if(f.length<1||typeof f[0]!=="function")throw new aX("a function is required");return lX(sX,cX,f)}});var yO=i(function(DAe,gO){var uX=dO(),pO=uy(),hO;try{hO=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!=="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var my=!!hO&&pO&&pO(Object.prototype,"__proto__"),mO=Object,fO=mO.getPrototypeOf;gO.exports=my&&typeof my.get==="function"?uX([my.get]):typeof fO==="function"?function(f){return fO(f==null?f:mO(f))}:!1});var zO=i(function(LAe,_O){var bO=py(),vO=fy(),xO=yO();_O.exports=bO?function(f){return bO(f)}:vO?function(f){if(!f||typeof f!=="object"&&typeof f!=="function")throw TypeError("getProto: not an object");return vO(f)}:xO?function(f){return xO(f)}:null});var mp=i(function(NAe,CO){var dX=Function.prototype.call,pX=Object.prototype.hasOwnProperty,fX=hl();CO.exports=fX.call(dX,pX)});var OO=i(function(jAe,kO){var rt,hX=ly(),mX=hk(),gX=gk(),yX=bk(),bX=xk(),Pa=zk(),Aa=dp(),vX=Sk(),xX=Ek(),_X=Ok(),zX=Rk(),CX=Pk(),wX=Dk(),SX=Nk(),TX=Fk(),TO=Function,gy=function(o){try{return TO('"use strict"; return ('+o+").constructor;")()}catch(f){}},ml=uy(),EX=Kk(),yy=function(){throw new Aa},kX=ml?function(){try{return arguments.callee,yy}catch(o){try{return ml(arguments,"callee").get}catch(f){return yy}}}():yy,Ia=Yk()(),wr=zO(),OX=fy(),IX=py(),EO=hy(),gl=hp(),Ra={},RX=typeof Uint8Array>"u"||!wr?rt:wr(Uint8Array),gs={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?rt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?rt:ArrayBuffer,"%ArrayIteratorPrototype%":Ia&&wr?wr([][Symbol.iterator]()):rt,"%AsyncFromSyncIteratorPrototype%":rt,"%AsyncFunction%":Ra,"%AsyncGenerator%":Ra,"%AsyncGeneratorFunction%":Ra,"%AsyncIteratorPrototype%":Ra,"%Atomics%":typeof Atomics>"u"?rt:Atomics,"%BigInt%":typeof BigInt>"u"?rt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?rt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?rt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?rt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":mX,"%eval%":eval,"%EvalError%":gX,"%Float16Array%":typeof Float16Array>"u"?rt:Float16Array,"%Float32Array%":typeof Float32Array>"u"?rt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?rt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?rt:FinalizationRegistry,"%Function%":TO,"%GeneratorFunction%":Ra,"%Int8Array%":typeof Int8Array>"u"?rt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?rt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?rt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ia&&wr?wr(wr([][Symbol.iterator]())):rt,"%JSON%":typeof JSON==="object"?JSON:rt,"%Map%":typeof Map>"u"?rt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ia||!wr?rt:wr(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":hX,"%Object.getOwnPropertyDescriptor%":ml,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?rt:Promise,"%Proxy%":typeof Proxy>"u"?rt:Proxy,"%RangeError%":yX,"%ReferenceError%":bX,"%Reflect%":typeof Reflect>"u"?rt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?rt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ia||!wr?rt:wr(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?rt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ia&&wr?wr(""[Symbol.iterator]()):rt,"%Symbol%":Ia?Symbol:rt,"%SyntaxError%":Pa,"%ThrowTypeError%":kX,"%TypedArray%":RX,"%TypeError%":Aa,"%Uint8Array%":typeof Uint8Array>"u"?rt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?rt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?rt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?rt:Uint32Array,"%URIError%":vX,"%WeakMap%":typeof WeakMap>"u"?rt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?rt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?rt:WeakSet,"%Function.prototype.call%":gl,"%Function.prototype.apply%":EO,"%Object.defineProperty%":EX,"%Object.getPrototypeOf%":OX,"%Math.abs%":xX,"%Math.floor%":_X,"%Math.max%":zX,"%Math.min%":CX,"%Math.pow%":wX,"%Math.round%":SX,"%Math.sign%":TX,"%Reflect.getPrototypeOf%":IX};if(wr)try{null.error}catch(o){by=wr(wr(o)),gs["%Error.prototype%"]=by}var by,AX=function o(f){var h;if(f==="%AsyncFunction%")h=gy("async function () {}");else if(f==="%GeneratorFunction%")h=gy("function* () {}");else if(f==="%AsyncGeneratorFunction%")h=gy("async function* () {}");else if(f==="%AsyncGenerator%"){var y=o("%AsyncGeneratorFunction%");if(y)h=y.prototype}else if(f==="%AsyncIteratorPrototype%"){var x=o("%AsyncGenerator%");if(x&&wr)h=wr(x.prototype)}return gs[f]=h,h},wO={__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"]},yl=hl(),gp=mp(),PX=yl.call(gl,Array.prototype.concat),BX=yl.call(EO,Array.prototype.splice),SO=yl.call(gl,String.prototype.replace),yp=yl.call(gl,String.prototype.slice),DX=yl.call(gl,RegExp.prototype.exec),LX=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,NX=/\\(\\)?/g,jX=function(f){var h=yp(f,0,1),y=yp(f,-1);if(h==="%"&&y!=="%")throw new Pa("invalid intrinsic syntax, expected closing `%`");else if(y==="%"&&h!=="%")throw new Pa("invalid intrinsic syntax, expected opening `%`");var x=[];return SO(f,LX,function(_,z,C,w){x[x.length]=C?SO(w,NX,"$1"):z||_}),x},MX=function(f,h){var y=f,x;if(gp(wO,y))x=wO[y],y="%"+x[0]+"%";if(gp(gs,y)){var _=gs[y];if(_===Ra)_=AX(y);if(typeof _>"u"&&!h)throw new Aa("intrinsic "+f+" exists, but is not available. Please file an issue!");return{alias:x,name:y,value:_}}throw new Pa("intrinsic "+f+" does not exist!")};kO.exports=function(f,h){if(typeof f!=="string"||f.length===0)throw new Aa("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof h!=="boolean")throw new Aa('"allowMissing" argument must be a boolean');if(DX(/^%?[^%]*%?$/,f)===null)throw new Pa("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var y=jX(f),x=y.length>0?y[0]:"",_=MX("%"+x+"%",h),{name:z,value:C}=_,w=!1,S=_.alias;if(S)x=S[0],BX(y,PX([0,1],S));for(var E=1,k=!0;E<y.length;E+=1){var O=y[E],R=yp(O,0,1),I=yp(O,-1);if((R==='"'||R==="'"||R==="`"||(I==='"'||I==="'"||I==="`"))&&R!==I)throw new Pa("property names with quotes must have matching quotes");if(O==="constructor"||!k)w=!0;if(x+="."+O,z="%"+x+"%",gp(gs,z))C=gs[z];else if(C!=null){if(!(O in C)){if(!h)throw new Aa("base intrinsic for "+f+" exists, but the property is not available.");return}if(ml&&E+1>=y.length){var A=ml(C,O);if(k=!!A,k&&"get"in A&&!("originalValue"in A.get))C=A.get;else C=C[O]}else k=gp(C,O),C=C[O];if(k&&!w)gs[z]=C}}return C}});var RO=i(function(MAe,IO){var qX=dy();IO.exports=function(){return qX()&&!!Symbol.toStringTag}});var BO=i(function(qAe,PO){var FX=OO(),AO=FX("%Object.defineProperty%",!0),UX=RO()(),$X=mp(),VX=dp(),bp=UX?Symbol.toStringTag:null;PO.exports=function(f,h){var y=arguments.length>2&&!!arguments[2]&&arguments[2].force,x=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof y<"u"&&typeof y!=="boolean"||typeof x<"u"&&typeof x!=="boolean")throw new VX("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");if(bp&&(y||!$X(f,bp)))if(AO)AO(f,bp,{configurable:!x,enumerable:!1,value:h,writable:!1});else f[bp]=h}});var LO=i(function(FAe,DO){DO.exports=function(o,f){return Object.keys(f).forEach(function(h){o[h]=o[h]||f[h]}),o}});var MO=i(function(UAe,jO){var zy=UE(),HX=c("util"),vy=c("path"),GX=c("http"),KX=c("https"),WX=c("url").parse,JX=c("fs"),ZX=c("stream").Stream,YX=c("crypto"),xy=WE(),XX=dk(),QX=BO(),wi=mp(),_y=LO();function NO(o){return String(o).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function mt(o){if(!(this instanceof mt))return new mt(o);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],zy.call(this),o=o||{};for(var f in o)this[f]=o[f]}HX.inherits(mt,zy);mt.LINE_BREAK=`\r
73
+ `;mt.DEFAULT_CONTENT_TYPE="application/octet-stream";mt.prototype.append=function(o,f,h){if(h=h||{},typeof h==="string")h={filename:h};var y=zy.prototype.append.bind(this);if(typeof f==="number"||f==null)f=String(f);if(Array.isArray(f)){this._error(Error("Arrays are not supported."));return}var x=this._multiPartHeader(o,f,h),_=this._multiPartFooter();y(x),y(f),y(_),this._trackLength(x,f,h)};mt.prototype._trackLength=function(o,f,h){var y=0;if(h.knownLength!=null)y+=Number(h.knownLength);else if(Buffer.isBuffer(f))y=f.length;else if(typeof f==="string")y=Buffer.byteLength(f);if(this._valueLength+=y,this._overheadLength+=Buffer.byteLength(o)+mt.LINE_BREAK.length,!f||!f.path&&!(f.readable&&wi(f,"httpVersion"))&&!(f instanceof ZX))return;if(!h.knownLength)this._valuesToMeasure.push(f)};mt.prototype._lengthRetriever=function(o,f){if(wi(o,"fd"))if(o.end!=null&&o.end!=1/0&&o.start!=null)f(null,o.end+1-(o.start?o.start:0));else JX.stat(o.path,function(h,y){if(h){f(h);return}var x=y.size-(o.start?o.start:0);f(null,x)});else if(wi(o,"httpVersion"))f(null,Number(o.headers["content-length"]));else if(wi(o,"httpModule"))o.on("response",function(h){o.pause(),f(null,Number(h.headers["content-length"]))}),o.resume();else f("Unknown stream")};mt.prototype._multiPartHeader=function(o,f,h){if(typeof h.header==="string")return h.header;var y=this._getContentDisposition(f,h),x=this._getContentType(f,h),_="",z={"Content-Disposition":["form-data",'name="'+NO(o)+'"'].concat(y||[]),"Content-Type":[].concat(x||[])};if(typeof h.header==="object")_y(z,h.header);var C;for(var w in z)if(wi(z,w)){if(C=z[w],C==null)continue;if(!Array.isArray(C))C=[C];if(C.length)_+=w+": "+C.join("; ")+mt.LINE_BREAK}return"--"+this.getBoundary()+mt.LINE_BREAK+_+mt.LINE_BREAK};mt.prototype._getContentDisposition=function(o,f){var h;if(typeof f.filepath==="string")h=vy.normalize(f.filepath).replace(/\\/g,"/");else if(f.filename||o&&(o.name||o.path))h=vy.basename(f.filename||o&&(o.name||o.path));else if(o&&o.readable&&wi(o,"httpVersion"))h=vy.basename(o.client._httpMessage.path||"");if(h)return'filename="'+NO(h)+'"'};mt.prototype._getContentType=function(o,f){var h=f.contentType;if(!h&&o&&o.name)h=xy.lookup(o.name);if(!h&&o&&o.path)h=xy.lookup(o.path);if(!h&&o&&o.readable&&wi(o,"httpVersion"))h=o.headers["content-type"];if(!h&&(f.filepath||f.filename))h=xy.lookup(f.filepath||f.filename);if(!h&&o&&typeof o==="object")h=mt.DEFAULT_CONTENT_TYPE;return h};mt.prototype._multiPartFooter=function(){return function(o){var f=mt.LINE_BREAK,h=this._streams.length===0;if(h)f+=this._lastBoundary();o(f)}.bind(this)};mt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+mt.LINE_BREAK};mt.prototype.getHeaders=function(o){var f,h={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(f in o)if(wi(o,f))h[f.toLowerCase()]=o[f];return h};mt.prototype.setBoundary=function(o){if(typeof o!=="string")throw TypeError("FormData boundary must be a string");this._boundary=o};mt.prototype.getBoundary=function(){if(!this._boundary)this._generateBoundary();return this._boundary};mt.prototype.getBuffer=function(){var o=new Buffer.alloc(0),f=this.getBoundary();for(var h=0,y=this._streams.length;h<y;h++)if(typeof this._streams[h]!=="function"){if(Buffer.isBuffer(this._streams[h]))o=Buffer.concat([o,this._streams[h]]);else o=Buffer.concat([o,Buffer.from(this._streams[h])]);if(typeof this._streams[h]!=="string"||this._streams[h].substring(2,f.length+2)!==f)o=Buffer.concat([o,Buffer.from(mt.LINE_BREAK)])}return Buffer.concat([o,Buffer.from(this._lastBoundary())])};mt.prototype._generateBoundary=function(){this._boundary="--------------------------"+YX.randomBytes(12).toString("hex")};mt.prototype.getLengthSync=function(){var o=this._overheadLength+this._valueLength;if(this._streams.length)o+=this._lastBoundary().length;if(!this.hasKnownLength())this._error(Error("Cannot calculate proper length in synchronous way."));return o};mt.prototype.hasKnownLength=function(){var o=!0;if(this._valuesToMeasure.length)o=!1;return o};mt.prototype.getLength=function(o){var f=this._overheadLength+this._valueLength;if(this._streams.length)f+=this._lastBoundary().length;if(!this._valuesToMeasure.length){process.nextTick(o.bind(this,null,f));return}XX.parallel(this._valuesToMeasure,this._lengthRetriever,function(h,y){if(h){o(h);return}y.forEach(function(x){f+=x}),o(null,f)})};mt.prototype.submit=function(o,f){var h,y,x={method:"post"};if(typeof o==="string")o=WX(o),y=_y({port:o.port,path:o.pathname,host:o.hostname,protocol:o.protocol},x);else if(y=_y(o,x),!y.port)y.port=y.protocol==="https:"?443:80;if(y.headers=this.getHeaders(o.headers),y.protocol==="https:")h=KX.request(y);else h=GX.request(y);return this.getLength(function(_,z){if(_&&_!=="Unknown stream"){this._error(_);return}if(z)h.setHeader("Content-Length",z);if(this.pipe(h),f){var C,w=function(S,E){return h.removeListener("error",w),h.removeListener("response",C),f.call(this,S,E)};C=w.bind(this,null),h.on("error",w),h.on("response",C)}}.bind(this)),h};mt.prototype._error=function(o){if(!this.error)this.error=o,this.pause(),this.emit("error",o)};mt.prototype.toString=function(){return"[object FormData]"};QX(mt.prototype,"FormData");jO.exports=mt});var FO=i(function(qO){Object.defineProperty(qO,"__esModule",{value:!0});function eQ(o){return function(f,h){return new Promise((y,x)=>{o.call(this,f,h,(_,z)=>{if(_)x(_);else y(z)})})}}qO.default=eQ});var VO=i(function(wy,$O){var UO=wy&&wy.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},rQ=c("events"),oQ=UO(Tt()),nQ=UO(FO()),bl=oQ.default("agent-base");function iQ(o){return Boolean(o)&&typeof o.addRequest==="function"}function Cy(){let{stack:o}=Error();if(typeof o!=="string")return!1;return o.split(`
74
+ `).some((f)=>f.indexOf("(https.js:")!==-1||f.indexOf("node:https:")!==-1)}function vp(o,f){return new vp.Agent(o,f)}(function(o){class f extends rQ.EventEmitter{constructor(h,y){super();let x=y;if(typeof h==="function")this.callback=h;else if(h)x=h;if(this.timeout=null,x&&typeof x.timeout==="number")this.timeout=x.timeout;this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){if(typeof this.explicitDefaultPort==="number")return this.explicitDefaultPort;return Cy()?443:80}set defaultPort(h){this.explicitDefaultPort=h}get protocol(){if(typeof this.explicitProtocol==="string")return this.explicitProtocol;return Cy()?"https:":"http:"}set protocol(h){this.explicitProtocol=h}callback(h,y,x){throw Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(h,y){let x=Object.assign({},y);if(typeof x.secureEndpoint!=="boolean")x.secureEndpoint=Cy();if(x.host==null)x.host="localhost";if(x.port==null)x.port=x.secureEndpoint?443:80;if(x.protocol==null)x.protocol=x.secureEndpoint?"https:":"http:";if(x.host&&x.path)delete x.path;delete x.agent,delete x.hostname,delete x._defaultAgent,delete x.defaultPort,delete x.createConnection,h._last=!0,h.shouldKeepAlive=!1;let _=!1,z=null,C=x.timeout||this.timeout,w=(O)=>{if(h._hadError)return;h.emit("error",O),h._hadError=!0},S=()=>{z=null,_=!0;let O=Error(`A "socket" was not created for HTTP request before ${C}ms`);O.code="ETIMEOUT",w(O)},E=(O)=>{if(_)return;if(z!==null)clearTimeout(z),z=null;w(O)},k=(O)=>{if(_)return;if(z!=null)clearTimeout(z),z=null;if(iQ(O)){bl("Callback returned another Agent instance %o",O.constructor.name),O.addRequest(h,x);return}if(O){O.once("free",()=>{this.freeSocket(O,x)}),h.onSocket(O);return}let R=Error(`no Duplex stream was returned to agent-base for \`${h.method} ${h.path}\``);w(R)};if(typeof this.callback!=="function"){w(Error("`callback` is not defined"));return}if(!this.promisifiedCallback)if(this.callback.length>=3)bl("Converting legacy callback function to promise"),this.promisifiedCallback=nQ.default(this.callback);else this.promisifiedCallback=this.callback;if(typeof C==="number"&&C>0)z=setTimeout(S,C);if("port"in x&&typeof x.port!=="number")x.port=Number(x.port);try{bl("Resolving socket for %o request: %o",x.protocol,`${h.method} ${h.path}`),Promise.resolve(this.promisifiedCallback(h,x)).then(k,E)}catch(O){Promise.reject(O).catch(E)}}freeSocket(h,y){bl("Freeing socket %o %o",h.constructor.name,y),h.destroy()}destroy(){bl("Destroying agent %o",this.constructor.name)}}o.Agent=f,o.prototype=o.Agent.prototype})(vp||(vp={}));$O.exports=vp});var HO=i(function(xl){var sQ=xl&&xl.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(xl,"__esModule",{value:!0});var aQ=sQ(Tt()),vl=aQ.default("https-proxy-agent:parse-proxy-response");function cQ(o){return new Promise((f,h)=>{let y=0,x=[];function _(){let k=o.read();if(k)E(k);else o.once("readable",_)}function z(){o.removeListener("end",w),o.removeListener("error",S),o.removeListener("close",C),o.removeListener("readable",_)}function C(k){vl("onclose had error %o",k)}function w(){vl("onend")}function S(k){z(),vl("onerror %o",k),h(k)}function E(k){x.push(k),y+=k.length;let O=Buffer.concat(x,y);if(O.indexOf(`\r
75
+ \r
76
+ `)===-1){vl("have not received end of HTTP headers yet..."),_();return}let I=O.toString("ascii",0,O.indexOf(`\r
77
+ `)),A=+I.split(" ")[1];vl("got proxy server response: %o",I),f({statusCode:A,buffered:O})}o.on("error",S),o.on("close",C),o.on("end",w),_()})}xl.default=cQ});var JO=i(function(ys){var lQ=ys&&ys.__awaiter||function(o,f,h,y){function x(_){return _ instanceof h?_:new h(function(z){z(_)})}return new(h||(h=Promise))(function(_,z){function C(E){try{S(y.next(E))}catch(k){z(k)}}function w(E){try{S(y.throw(E))}catch(k){z(k)}}function S(E){E.done?_(E.value):x(E.value).then(C,w)}S((y=y.apply(o,f||[])).next())})},Ba=ys&&ys.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(ys,"__esModule",{value:!0});var GO=Ba(c("net")),KO=Ba(c("tls")),uQ=Ba(c("url")),dQ=Ba(c("assert")),pQ=Ba(Tt()),fQ=VO(),hQ=Ba(HO()),zl=pQ.default("https-proxy-agent:agent");class WO extends fQ.Agent{constructor(o){let f;if(typeof o==="string")f=uQ.default.parse(o);else f=o;if(!f)throw Error("an HTTP(S) proxy server `host` and `port` must be specified!");zl("creating new HttpsProxyAgent instance: %o",f);super(f);let h=Object.assign({},f);if(this.secureProxy=f.secureProxy||yQ(h.protocol),h.host=h.hostname||h.host,typeof h.port==="string")h.port=parseInt(h.port,10);if(!h.port&&h.host)h.port=this.secureProxy?443:80;if(this.secureProxy&&!("ALPNProtocols"in h))h.ALPNProtocols=["http 1.1"];if(h.host&&h.path)delete h.path,delete h.pathname;this.proxy=h}callback(o,f){return lQ(this,void 0,void 0,function*(){let{proxy:h,secureProxy:y}=this,x;if(y)zl("Creating `tls.Socket`: %o",h),x=KO.default.connect(h);else zl("Creating `net.Socket`: %o",h),x=GO.default.connect(h);let _=Object.assign({},h.headers),C=`CONNECT ${`${f.host}:${f.port}`} HTTP/1.1\r
78
+ `;if(h.auth)_["Proxy-Authorization"]=`Basic ${Buffer.from(h.auth).toString("base64")}`;let{host:w,port:S,secureEndpoint:E}=f;if(!gQ(S,E))w+=`:${S}`;_.Host=w,_.Connection="close";for(let A of Object.keys(_))C+=`${A}: ${_[A]}\r
79
+ `;let k=hQ.default(x);x.write(`${C}\r
80
+ `);let{statusCode:O,buffered:R}=yield k;if(O===200){if(o.once("socket",mQ),f.secureEndpoint){zl("Upgrading socket connection to TLS");let A=f.servername||f.host;return KO.default.connect(Object.assign(Object.assign({},bQ(f,"host","hostname","path","port")),{socket:x,servername:A}))}return x}x.destroy();let I=new GO.default.Socket({writable:!1});return I.readable=!0,o.once("socket",(A)=>{zl("replaying proxy buffer for failed request"),dQ.default(A.listenerCount("data")>0),A.push(R),A.push(null)}),I})}}ys.default=WO;function mQ(o){o.resume()}function gQ(o,f){return Boolean(!f&&o===80||f&&o===443)}function yQ(o){return typeof o==="string"?/^https:?$/i.test(o):!1}function bQ(o,...f){let h={},y;for(y in o)if(!f.includes(y))h[y]=o[y];return h}});var YO=i(function(Ey,ZO){var vQ=Ey&&Ey.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},Sy=vQ(JO());function Ty(o){return new Sy.default(o)}(function(o){o.HttpsProxyAgent=Sy.default,o.prototype=Sy.default.prototype})(Ty||(Ty={}));ZO.exports=Ty});var QO=i(function(GAe,XO){var Cl;XO.exports=function(){if(!Cl){try{Cl=Tt()("follow-redirects")}catch(o){}if(typeof Cl!=="function")Cl=function(){}}Cl.apply(null,arguments)}});var nI=i(function(KAe,qy){var El=c("url"),wl=El.URL,xQ=c("http"),_Q=c("https"),Py=c("stream").Writable,By=c("assert"),eI=QO();(function(){var f=typeof process<"u",h=typeof window<"u"&&typeof document<"u",y=vs(Error.captureStackTrace);if(!f&&(h||!y))console.warn("The follow-redirects package should be excluded from browser builds.")})();var Dy=!1;try{By(new wl(""))}catch(o){Dy=o.code==="ERR_INVALID_URL"}var zQ=["Authorization","Proxy-Authorization","Cookie"],CQ=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Ly=["abort","aborted","connect","error","socket","timeout"],Ny=Object.create(null);Ly.forEach(function(o){Ny[o]=function(f,h,y){this._redirectable.emit(o,f,h,y)}});var Oy=kl("ERR_INVALID_URL","Invalid URL",TypeError),Iy=kl("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),wQ=kl("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Iy),SQ=kl("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),TQ=kl("ERR_STREAM_WRITE_AFTER_END","write after end"),EQ=Py.prototype.destroy||rI;function yo(o,f){if(Py.call(this),this._sanitizeOptions(o),this._options=o,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],f)this.on("response",f);var h=this;this._onNativeResponse=function(y){try{h._processResponse(y)}catch(x){h.emit("error",x instanceof Iy?x:new Iy({cause:x}))}},this._headerFilter=new RegExp("^(?:"+zQ.concat(o.sensitiveHeaders).map(AQ).join("|")+")$","i"),this._performRequest()}yo.prototype=Object.create(Py.prototype);yo.prototype.abort=function(){My(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};yo.prototype.destroy=function(o){return My(this._currentRequest,o),EQ.call(this,o),this};yo.prototype.write=function(o,f,h){if(this._ending)throw new TQ;if(!bs(o)&&!IQ(o))throw TypeError("data should be a string, Buffer or Uint8Array");if(vs(f))h=f,f=null;if(o.length===0){if(h)h();return}if(this._requestBodyLength+o.length<=this._options.maxBodyLength)this._requestBodyLength+=o.length,this._requestBodyBuffers.push({data:o,encoding:f}),this._currentRequest.write(o,f,h);else this.emit("error",new SQ),this.abort()};yo.prototype.end=function(o,f,h){if(vs(o))h=o,o=f=null;else if(vs(f))h=f,f=null;if(!o)this._ended=this._ending=!0,this._currentRequest.end(null,null,h);else{var y=this,x=this._currentRequest;this.write(o,f,function(){y._ended=!0,x.end(null,null,h)}),this._ending=!0}};yo.prototype.setHeader=function(o,f){this._options.headers[o]=f,this._currentRequest.setHeader(o,f)};yo.prototype.removeHeader=function(o){delete this._options.headers[o],this._currentRequest.removeHeader(o)};yo.prototype.setTimeout=function(o,f){var h=this;function y(z){z.setTimeout(o),z.removeListener("timeout",z.destroy),z.addListener("timeout",z.destroy)}function x(z){if(h._timeout)clearTimeout(h._timeout);h._timeout=setTimeout(function(){h.emit("timeout"),_()},o),y(z)}function _(){if(h._timeout)clearTimeout(h._timeout),h._timeout=null;if(h.removeListener("abort",_),h.removeListener("error",_),h.removeListener("response",_),h.removeListener("close",_),f)h.removeListener("timeout",f);if(!h.socket)h._currentRequest.removeListener("socket",x)}if(f)this.on("timeout",f);if(this.socket)x(this.socket);else this._currentRequest.once("socket",x);return this.on("socket",y),this.on("abort",_),this.on("error",_),this.on("response",_),this.on("close",_),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(o){yo.prototype[o]=function(f,h){return this._currentRequest[o](f,h)}});["aborted","connection","socket"].forEach(function(o){Object.defineProperty(yo.prototype,o,{get:function(){return this._currentRequest[o]}})});yo.prototype._sanitizeOptions=function(o){if(!o.headers)o.headers={};else if(Array.isArray(o.headers)){var f=o.headers;o.headers={};for(var h=0;h<f.length;h+=2)o.headers[f[h]]=f[h+1]}if(!Array.isArray(o.sensitiveHeaders))o.sensitiveHeaders=[];if(o.host){if(!o.hostname)o.hostname=o.host;delete o.host}if(!o.pathname&&o.path){var y=o.path.indexOf("?");if(y<0)o.pathname=o.path;else o.pathname=o.path.substring(0,y),o.search=o.path.substring(y)}};yo.prototype._performRequest=function(){var o=this._options.protocol,f=this._options.nativeProtocols[o];if(!f)throw TypeError("Unsupported protocol "+o);if(this._options.agents){var h=o.slice(0,-1);this._options.agent=this._options.agents[h]}var y=this._currentRequest=f.request(this._options,this._onNativeResponse);y._redirectable=this;for(var x of Ly)y.on(x,Ny[x]);if(this._currentUrl=/^\//.test(this._options.path)?El.format(this._options):this._options.path,this._isRedirect){var _=0,z=this,C=this._requestBodyBuffers;(function w(S){if(y===z._currentRequest){if(S)z.emit("error",S);else if(_<C.length){var E=C[_++];if(!y.finished)y.write(E.data,E.encoding,w)}else if(z._ended)y.end()}})()}};yo.prototype._processResponse=function(o){var f=o.statusCode;if(this._options.trackRedirects)this._redirects.push({url:this._currentUrl,headers:o.headers,statusCode:f});var h=o.headers.location;if(!h||this._options.followRedirects===!1||f<300||f>=400){o.responseUrl=this._currentUrl,o.redirects=this._redirects,this.emit("response",o),this._requestBodyBuffers=[];return}if(My(this._currentRequest),o.destroy(),++this._redirectCount>this._options.maxRedirects)throw new wQ;var y,x=this._options.beforeRedirect;if(x)y=Object.assign({Host:o.req.getHeader("host")},this._options.headers);var _=this._options.method;if((f===301||f===302)&&this._options.method==="POST"||f===303&&!/^(?:GET|HEAD)$/.test(this._options.method))this._options.method="GET",this._requestBodyBuffers=[],ky(/^content-/i,this._options.headers);var z=ky(/^host$/i,this._options.headers),C=jy(this._currentUrl),w=z||C.host,S=/^\w+:/.test(h)?this._currentUrl:El.format(Object.assign(C,{host:w})),E=kQ(h,S);if(eI("redirecting to",E.href),this._isRedirect=!0,Ry(E,this._options),E.protocol!==C.protocol&&E.protocol!=="https:"||E.host!==w&&!OQ(E.host,w))ky(this._headerFilter,this._options.headers);if(vs(x)){var k={headers:o.headers,statusCode:f},O={url:S,method:_,headers:y};x(this._options,k,O),this._sanitizeOptions(this._options)}this._performRequest()};function tI(o){var f={maxRedirects:21,maxBodyLength:10485760},h={};return Object.keys(o).forEach(function(y){var x=y+":",_=h[x]=o[y],z=f[y]=Object.create(_);function C(S,E,k){if(RQ(S))S=Ry(S);else if(bs(S))S=Ry(jy(S));else k=E,E=oI(S),S={protocol:x};if(vs(E))k=E,E=null;if(E=Object.assign({maxRedirects:f.maxRedirects,maxBodyLength:f.maxBodyLength},S,E),E.nativeProtocols=h,!bs(E.host)&&!bs(E.hostname))E.hostname="::1";return By.equal(E.protocol,x,"protocol mismatch"),eI("options",E),new yo(E,k)}function w(S,E,k){var O=z.request(S,E,k);return O.end(),O}Object.defineProperties(z,{request:{value:C,configurable:!0,enumerable:!0,writable:!0},get:{value:w,configurable:!0,enumerable:!0,writable:!0}})}),f}function rI(){}function jy(o){var f;if(Dy)f=new wl(o);else if(f=oI(El.parse(o)),!bs(f.protocol))throw new Oy({input:o});return f}function kQ(o,f){return Dy?new wl(o,f):jy(El.resolve(f,o))}function oI(o){if(/^\[/.test(o.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(o.hostname))throw new Oy({input:o.href||o});if(/^\[/.test(o.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(o.host))throw new Oy({input:o.href||o});return o}function Ry(o,f){var h=f||{};for(var y of CQ)h[y]=o[y];if(h.hostname.startsWith("["))h.hostname=h.hostname.slice(1,-1);if(h.port!=="")h.port=Number(h.port);return h.path=h.search?h.pathname+h.search:h.pathname,h}function ky(o,f){var h;for(var y in f)if(o.test(y))h=f[y],delete f[y];return h===null||typeof h>"u"?void 0:String(h).trim()}function kl(o,f,h){function y(x){if(vs(Error.captureStackTrace))Error.captureStackTrace(this,this.constructor);Object.assign(this,x||{}),this.code=o,this.message=this.cause?f+": "+this.cause.message:f}return y.prototype=new(h||Error),Object.defineProperties(y.prototype,{constructor:{value:y,enumerable:!1},name:{value:"Error ["+o+"]",enumerable:!1}}),y}function My(o,f){for(var h of Ly)o.removeListener(h,Ny[h]);o.on("error",rI),o.destroy(f)}function OQ(o,f){By(bs(o)&&bs(f));var h=o.length-f.length-1;return h>0&&o[h]==="."&&o.endsWith(f)}function bs(o){return typeof o==="string"||o instanceof String}function vs(o){return typeof o==="function"}function IQ(o){return typeof o==="object"&&"length"in o}function RQ(o){return wl&&o instanceof wl}function AQ(o){return o.replace(/[[\]\\/()*+?.^$|]/g,"\\$&")}qy.exports=tI({http:xQ,https:_Q});qy.exports.wrap=tI});var Ss=i(function(WAe,BR){/*! Axios v1.20.0 Copyright (c) 2026 Matt Zabriskie and contributors */var jI=MO(),PQ=c("crypto"),BQ=c("url"),MI=YO(),qI=c("http"),FI=c("https"),UI=c("http2"),nb=c("util"),iI=c("path"),DQ=nI(),Lo=c("zlib"),bo=c("stream"),LQ=c("events");function $I(o,f){return function(){return o.apply(f,arguments)}}var{toString:NQ}=Object.prototype,{getPrototypeOf:Ti}=Object,{iterator:Nl,toStringTag:VI}=Symbol,Pl=(({hasOwnProperty:o})=>(f,h)=>o.call(f,h))(Object.prototype),HI=(o)=>typeof o==="string"&&(o==="__proto__"||o==="constructor"||o==="prototype"),GI=(o,f,h)=>o===Object.prototype||!h&&f===null,jQ=(o)=>{if(!Object.isExtensible(o))return!1;let f=Object.getOwnPropertyNames(o);if(Object.getOwnPropertySymbols)f.push(...Object.getOwnPropertySymbols(o));return f.every((h)=>{if(HI(h))return!1;let y=Object.getOwnPropertyDescriptor(o,h);return!!y&&y.configurable&&y.writable===!0})},Bl=(o,f)=>{let h=o,y=[];while(h!=null){if(y.indexOf(h)!==-1)return!1;y.push(h);let x=Ti(h);if(GI(h,x,h===o))return!1;if(Pl(h,f))return!0;h=x}return!1},MQ=(o,f)=>o!=null&&Bl(o,f)?o[f]:void 0,qQ=(o)=>{if(o==null||typeof o!=="object"&&typeof o!=="function")return o;let f=Ti(o);if(f===null&&jQ(o))return o;let h=Object.create(null),y=Object.create(null),x=[],_=o;while(_!=null){if(x.indexOf(_)!==-1)break;x.push(_);let z=_===o?f:Ti(_);if(GI(_,z,_===o))break;let C=Object.getOwnPropertyNames(_);if(Object.getOwnPropertySymbols)C.push(...Object.getOwnPropertySymbols(_));for(let w of C){if(HI(w))continue;if(!Pl(y,w))h[w]=o[w],y[w]=!0}_=z}return h},ib=((o)=>(f)=>{let h=NQ.call(f);return o[h]||(o[h]=h.slice(8,-1).toLowerCase())})(Object.create(null)),No=(o)=>(o=o.toLowerCase(),(f)=>ib(f)===o),Mp=(o)=>(f)=>typeof f===o,{isArray:zs}=Array,Cs=Mp("undefined");function ja(o){return o!==null&&!Cs(o)&&o.constructor!==null&&!Cs(o.constructor)&&vo(o.constructor.isBuffer)&&o.constructor.isBuffer(o)}var KI=No("ArrayBuffer");function FQ(o){let f;if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)f=ArrayBuffer.isView(o);else f=o&&o.buffer&&KI(o.buffer);return f}var UQ=Mp("string"),vo=Mp("function"),WI=Mp("number"),Ma=(o)=>o!==null&&typeof o==="object",$Q=(o)=>o===!0||o===!1,zp=(o)=>{if(!Ma(o))return!1;let f=Ti(o);return(f===null||f===Object.prototype||Ti(f)===null)&&!Bl(o,VI)&&!Bl(o,Nl)},VQ=(o)=>{if(!Ma(o)||ja(o))return!1;try{return Object.keys(o).length===0&&Object.getPrototypeOf(o)===Object.prototype}catch(f){return!1}},HQ=No("Date"),GQ=No("File"),KQ=(o)=>!!(o&&typeof o.uri<"u"),WQ=(o)=>o&&typeof o.getParts<"u",JQ=No("Blob"),ZQ=No("FileList"),YQ=No("Set"),XQ=(o)=>Ma(o)&&vo(o.pipe);function QQ(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;return{}}var sI=QQ(),aI=typeof sI.FormData<"u"?sI.FormData:void 0,eee=(o)=>{if(!o)return!1;if(aI&&o instanceof aI)return!0;let f=Ti(o);if(!f||f===Object.prototype)return!1;if(!vo(o.append))return!1;let h=ib(o);return h==="formdata"||h==="object"&&vo(o.toString)&&o.toString()==="[object FormData]"},tee=No("URLSearchParams"),[ree,oee,nee,iee]=["ReadableStream","Request","Response","Headers"].map(No),see=(o)=>o.trim?o.trim():o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function jl(o,f,{allOwnKeys:h=!1}={}){if(o===null||typeof o>"u")return;let y,x;if(typeof o!=="object")o=[o];if(zs(o))for(y=0,x=o.length;y<x;y++)f.call(null,o[y],y,o);else{if(ja(o))return;let _=h?Object.getOwnPropertyNames(o):Object.keys(o),z=_.length,C;for(y=0;y<z;y++)C=_[y],f.call(null,o[C],C,o)}}function JI(o,f){if(ja(o))return null;f=f.toLowerCase();let h=Object.keys(o),y=h.length,x;while(y-- >0)if(x=h[y],f===x.toLowerCase())return x;return null}var xs=(()=>{if(typeof globalThis<"u")return globalThis;return typeof self<"u"?self:typeof window<"u"?window:global})(),ZI=(o)=>!Cs(o)&&o!==xs;function Xy(...o){let{caseless:f,skipUndefined:h}=ZI(this)&&this||{},y={},x=(_,z)=>{if(z==="__proto__"||z==="constructor"||z==="prototype")return;let C=f&&typeof z==="string"&&JI(y,z)||z,w=Pl(y,C)?y[C]:void 0;if(zp(w)&&zp(_))y[C]=Xy(w,_);else if(zp(_))y[C]=Xy({},_);else if(zs(_))y[C]=_.slice();else if(!h||!Cs(_))y[C]=_};for(let _=0,z=o.length;_<z;_++){let C=o[_];if(!C||ja(C))continue;if(jl(C,x),typeof C!=="object"||zs(C))continue;let w=Object.getOwnPropertySymbols(C);for(let S=0;S<w.length;S++){let E=w[S];if(bee.call(C,E))x(C[E],E)}}return y}var aee=(o,f,h,{allOwnKeys:y}={})=>(jl(f,(x,_)=>{if(h&&vo(x))Object.defineProperty(o,_,{__proto__:null,value:$I(x,h),writable:!0,enumerable:!0,configurable:!0});else Object.defineProperty(o,_,{__proto__:null,value:x,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:y}),o),cee=(o)=>{if(o.charCodeAt(0)===65279)o=o.slice(1);return o},lee=(o,f,h,y)=>{o.prototype=Object.create(f.prototype,y),Object.defineProperty(o.prototype,"constructor",{__proto__:null,value:o,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(o,"super",{__proto__:null,value:f.prototype}),h&&Object.assign(o.prototype,h)},uee=(o,f,h,y)=>{let x,_,z,C={};if(f=f||{},o==null)return f;do{x=Object.getOwnPropertyNames(o),_=x.length;while(_-- >0)if(z=x[_],(!y||y(z,o,f))&&!C[z])f[z]=o[z],C[z]=!0;o=h!==!1&&Ti(o)}while(o&&(!h||h(o,f))&&o!==Object.prototype);return f},dee=(o,f,h)=>{if(o=String(o),h===void 0||h>o.length)h=o.length;h-=f.length;let y=o.indexOf(f,h);return y!==-1&&y===h},pee=(o)=>{if(!o)return null;if(zs(o))return o;let f=o.length;if(!WI(f))return null;let h=Array(f);while(f-- >0)h[f]=o[f];return h},fee=((o)=>(f)=>o&&f instanceof o)(typeof Uint8Array<"u"&&Ti(Uint8Array)),hee=(o,f)=>{let y=(o&&o[Nl]).call(o),x;while((x=y.next())&&!x.done){let _=x.value;f.call(o,_[0],_[1])}},mee=(o,f)=>{let h,y=[];while((h=o.exec(f))!==null)y.push(h);return y},gee=No("HTMLFormElement"),yee=(o)=>o.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(h,y,x){return y.toUpperCase()+x}),{propertyIsEnumerable:bee}=Object.prototype,vee=No("RegExp"),YI=(o,f)=>{let h=Object.getOwnPropertyDescriptors(o),y={};jl(h,(x,_)=>{let z;if((z=f(x,_,o))!==!1)y[_]=z||x}),Object.defineProperties(o,y)},xee=(o)=>{YI(o,(f,h)=>{if(vo(o)&&["arguments","caller","callee"].includes(h))return!1;let y=o[h];if(!vo(y))return;if(f.enumerable=!1,"writable"in f){f.writable=!1;return}if(!f.set)f.set=()=>{throw Error("Can not rewrite read-only method '"+h+"'")}})},_ee=(o,f)=>{let h={},y=(x)=>{x.forEach((_)=>{h[_]=!0})};return zs(o)?y(o):y(String(o).split(f)),h},zee=()=>{},Cee=(o,f)=>o!=null&&Number.isFinite(o=+o)?o:f;function wee(o){return!!(o&&vo(o.append)&&o[VI]==="FormData"&&o[Nl])}var See=(o)=>{let f=new WeakSet,h=(y)=>{if(Ma(y)){if(f.has(y))return;if(ja(y))return y;if(!("toJSON"in y)){f.add(y);let x;if(YQ(y)){x=[];for(let _ of y){let z=h(_);!Cs(z)&&x.push(z)}}else x=zs(y)?[]:{},jl(y,(_,z)=>{let C=h(_);!Cs(C)&&(x[z]=C)});return f.delete(y),x}}return y};return h(o)},Tee=No("AsyncFunction"),Eee=(o)=>o&&(Ma(o)||vo(o))&&vo(o.then)&&vo(o.catch),XI=((o,f)=>{if(o)return setImmediate;return f?((h,y)=>(xs.addEventListener("message",({source:x,data:_})=>{if(x===xs&&_===h)y.length&&y.shift()()},!1),(x)=>{y.push(x),xs.postMessage(h,"*")}))(`axios@${Math.random()}`,[]):(h)=>setTimeout(h)})(typeof setImmediate==="function",vo(xs.postMessage)),kee=typeof queueMicrotask<"u"?queueMicrotask.bind(xs):typeof process<"u"&&process.nextTick||XI,QI=(o)=>o!=null&&vo(o[Nl]),Oee=(o)=>o!=null&&Bl(o,Nl)&&QI(o),V={isArray:zs,isArrayBuffer:KI,isBuffer:ja,isFormData:eee,isArrayBufferView:FQ,isString:UQ,isNumber:WI,isBoolean:$Q,isObject:Ma,isPlainObject:zp,isEmptyObject:VQ,isReadableStream:ree,isRequest:oee,isResponse:nee,isHeaders:iee,isUndefined:Cs,isDate:HQ,isFile:GQ,isReactNativeBlob:KQ,isReactNative:WQ,isBlob:JQ,isRegExp:vee,isFunction:vo,isStream:XQ,isURLSearchParams:tee,isTypedArray:fee,isFileList:ZQ,forEach:jl,merge:Xy,extend:aee,trim:see,stripBOM:cee,inherits:lee,toFlatObject:uee,kindOf:ib,kindOfTest:No,endsWith:dee,toArray:pee,forEachEntry:hee,matchAll:mee,isHTMLForm:gee,hasOwnProperty:Pl,hasOwnProp:Pl,hasOwnInPrototypeChain:Bl,getSafeProp:MQ,toSafeFlatObject:qQ,reduceDescriptors:YI,freezeMethods:xee,toObjectSet:_ee,toCamelCase:yee,noop:zee,toFiniteNumber:Cee,findKey:JI,global:xs,isContextDefined:ZI,isSpecCompliantForm:wee,toJSONObject:See,isAsyncFn:Tee,isThenable:Eee,setImmediate:XI,asap:kee,isIterable:QI,isSafeIterable:Oee},Iee=V.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ree=(o)=>{let f={},h,y,x;return o&&o.split(`
81
+ `).forEach(function(z){x=z.indexOf(":"),h=z.substring(0,x).trim().toLowerCase(),y=z.substring(x+1).trim();let C=V.hasOwnProp(f,h);if(!h||C&&V.hasOwnProp(Iee,h))return;if(h==="set-cookie")if(C)f[h].push(y);else f[h]=[y];else f[h]=C?f[h]+", "+y:y}),f};function Aee(o){let f=0,h=o.length;while(f<h){let y=o.charCodeAt(f);if(y!==9&&y!==32)break;f+=1}while(h>f){let y=o.charCodeAt(h-1);if(y!==9&&y!==32)break;h-=1}return f===0&&h===o.length?o:o.slice(f,h)}var Pee=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Bee=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function sb(o,f){if(V.isArray(o))return o.map((h)=>sb(h,f));return Aee(String(o).replace(f,""))}var Dee=(o)=>sb(o,Pee),Lee=(o)=>sb(o,Bee);function ab(o){let f=Object.create(null);return V.forEach(o.toJSON(),(h,y)=>{f[y]=Lee(h)}),f}var cI=Symbol("internals");function Ol(o){return o&&String(o).trim().toLowerCase()}function Cp(o){if(o===!1||o==null)return o;return V.isArray(o)?o.map(Cp):Dee(String(o))}function Nee(o){let f=Object.create(null),h=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,y;while(y=h.exec(o))f[y[1]]=y[2];return f}var jee=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Fy(o){let f=0,h=o.length;while(f<h){let y=o.charCodeAt(f);if(y!==9&&y!==32)break;f+=1}while(h>f){let y=o.charCodeAt(h-1);if(y!==9&&y!==32)break;h-=1}return f===0&&h===o.length?o:o.slice(f,h)}function Mee(o){let f=o.length-1;if(f<1||o.charCodeAt(0)!==34||o.charCodeAt(f)!==34)return o;let h="";for(let y=1;y<f;y++){let x=o.charCodeAt(y);if(x===34)return o;if(x===92){if(y+=1,y>=f)return o}h+=o[y]}return h}function qee(o){let f=Object.create(null),h=String(o),y=0,x=!1,_=!1;function z(C){let w=Fy(h.slice(y,C)),S=w.indexOf("=");if(S<1)return;let E=Fy(w.slice(0,S));if(!jee.test(E))return;let k=E.toLowerCase();if(k==="__proto__"||k==="constructor"||k==="prototype")return;let O=Fy(w.slice(S+1));f[k]=Mee(O)}for(let C=0;C<h.length;C++){let w=h.charCodeAt(C);if(x){if(_)_=!1;else if(w===92)_=!0;else if(w===34)x=!1}else if(w===34)x=!0;else if(w===44||w===59)z(C),y=C+1}return z(h.length),f}var Fee=(o)=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(o.trim());function Uy(o,f,h,y,x){if(V.isFunction(y))return y.call(this,f,h);if(x)f=h;if(!V.isString(f))return;if(V.isString(y))return f.indexOf(y)!==-1;if(V.isRegExp(y))return y.test(f)}function Uee(o){return o.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(f,h,y)=>h.toUpperCase()+y)}function $ee(o,f){let h=V.toCamelCase(" "+f);["get","set","has"].forEach((y)=>{Object.defineProperty(o,y+h,{__proto__:null,value:function(x,_,z){return this[y].call(this,f,x,_,z)},configurable:!0})})}class ur{constructor(o){o&&this.set(o)}set(o,f,h){let y=this;function x(z,C,w){let S=Ol(C);if(!S)return;let E=V.findKey(y,S);if(!E||y[E]===void 0||w===!0||w===void 0&&y[E]!==!1)y[E||C]=Cp(z)}let _=(z,C)=>V.forEach(z,(w,S)=>x(w,S,C));if(V.isPlainObject(o)||o instanceof this.constructor)_(o,f);else if(V.isString(o)&&(o=o.trim())&&!Fee(o))_(Ree(o),f);else if(V.isObject(o)&&V.isSafeIterable(o)){let z=Object.create(null),C,w;for(let S of o){if(!V.isArray(S))throw TypeError("Object iterator must return a key-value pair");if(w=S[0],V.hasOwnProp(z,w))C=z[w],z[w]=V.isArray(C)?[...C,S[1]]:[C,S[1]];else z[w]=S[1]}_(z,f)}else o!=null&&x(f,o,h);return this}get(o,f){if(o=Ol(o),o){let h=V.findKey(this,o);if(h){let y=this[h];if(!f)return y;if(f===!0)return Nee(y);if(V.isFunction(f))return f.call(this,y,h);if(V.isRegExp(f))return f.exec(y);throw TypeError("parser must be boolean|regexp|function")}}}has(o,f){if(o=Ol(o),o){let h=V.findKey(this,o);return!!(h&&this[h]!==void 0&&(!f||Uy(this,this[h],h,f)))}return!1}delete(o,f){let h=this,y=!1;function x(_){if(_=Ol(_),_){let z=V.findKey(h,_);if(z&&(!f||Uy(h,h[z],z,f)))delete h[z],y=!0}}if(V.isArray(o))o.forEach(x);else x(o);return y}clear(o){let f=Object.keys(this),h=f.length,y=!1;while(h--){let x=f[h];if(!o||Uy(this,this[x],x,o,!0))delete this[x],y=!0}return y}normalize(o){let f=this,h={};return V.forEach(this,(y,x)=>{let _=V.findKey(h,x);if(_){f[_]=Cp(y),delete f[x];return}let z=o?Uee(x):String(x).trim();if(z!==x)delete f[x];f[z]=Cp(y),h[z]=!0}),this}concat(...o){return this.constructor.concat(this,...o)}toJSON(o){let f=Object.create(null);return V.forEach(this,(h,y)=>{h!=null&&h!==!1&&(f[y]=o&&V.isArray(h)?h.join(", "):h)}),f}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([o,f])=>o+": "+f).join(`
82
+ `)}getSetCookie(){let o=this.get("set-cookie");return V.isArray(o)?o:o==null||o===!1?[]:[o]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(o){return o instanceof this?o:new this(o)}static parseParameters(o){return qee(o)}static concat(o,...f){let h=new this(o);return f.forEach((y)=>h.set(y)),h}static accessor(o){let h=(this[cI]=this[cI]={accessors:{}}).accessors,y=this.prototype;function x(_){let z=Ol(_);if(!h[z])$ee(y,_),h[z]=!0}return V.isArray(o)?o.forEach(x):x(o),this}}ur.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);V.reduceDescriptors(ur.prototype,({value:o},f)=>{let h=f[0].toUpperCase()+f.slice(1);return{get:()=>o,set(y){this[h]=y}}});V.freezeMethods(ur);var Dp="[REDACTED ****]";function Vee(o){if(V.hasOwnProp(o,"toJSON"))return!0;let f=Object.getPrototypeOf(o);while(f&&f!==Object.prototype){if(V.hasOwnProp(f,"toJSON"))return!0;f=Object.getPrototypeOf(f)}return!1}function Hee(o,f){let h=new Set(f.map((_)=>String(_).toLowerCase())),y=[],x=(_)=>{if(_===null||typeof _!=="object")return _;if(V.isBuffer(_))return _;if(y.indexOf(_)!==-1)return;if(_ instanceof ur)_=_.toJSON();y.push(_);let z;if(V.isArray(_))z=[],_.forEach((C,w)=>{let S=x(C);if(!V.isUndefined(S))z[w]=S});else{if(!V.isPlainObject(_)&&Vee(_))return y.pop(),_;z=Object.create(null);for(let[C,w]of Object.entries(_)){let S=h.has(C.toLowerCase())?Dp:x(w);if(!V.isUndefined(S))z[C]=S}}return y.pop(),z};return x(o)}function lI(o){try{return String(o)}catch(f){return""}}function Gee(o){return o.errors.map((h)=>{try{return h&&h.message?lI(h.message):lI(h)}catch(y){return""}}).filter(Boolean).join("; ")||o.name||"AggregateError"}class ne extends Error{static from(o,f,h,y,x,_){let z=o.message;if(!z&&V.isArray(o.errors)&&o.errors.length)z=Gee(o);let C=new ne(z,f||o.code,h,y,x);if(Object.defineProperty(C,"cause",{__proto__:null,value:o,writable:!0,enumerable:!1,configurable:!0}),C.name=o.name,o.status!=null&&C.status==null)C.status=o.status;return _&&Object.assign(C,_),C}constructor(o,f,h,y,x){super(o);if(Object.defineProperty(this,"message",{__proto__:null,value:o,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,f&&(this.code=f),h&&(this.config=h),y&&(this.request=y),x)this.response=x,this.status=x.status}toJSON(){let o=this.config,f=o&&V.hasOwnProp(o,"redact")?o.redact:void 0,h=V.isArray(f)&&f.length>0?Hee(o,f):V.toJSONObject(o);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:h,code:this.code,status:this.status}}}ne.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";ne.ERR_BAD_OPTION="ERR_BAD_OPTION";ne.ECONNABORTED="ECONNABORTED";ne.ETIMEDOUT="ETIMEDOUT";ne.ECONNREFUSED="ECONNREFUSED";ne.ERR_NETWORK="ERR_NETWORK";ne.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";ne.ERR_DEPRECATED="ERR_DEPRECATED";ne.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";ne.ERR_BAD_REQUEST="ERR_BAD_REQUEST";ne.ERR_CANCELED="ERR_CANCELED";ne.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";ne.ERR_INVALID_URL="ERR_INVALID_URL";ne.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var $y={isBufferAvailable(){return typeof Buffer<"u"},from(o){return Buffer.from(o)}},eR=100;function Qy(o){return V.isPlainObject(o)||V.isArray(o)}function tR(o){return V.endsWith(o,"[]")?o.slice(0,-2):o}function Vy(o,f,h){if(!o)return f;return o.concat(f).map(function(x,_){return x=tR(x),!h&&_?"["+x+"]":x}).join(h?".":"")}function Kee(o){return V.isArray(o)&&!o.some(Qy)}var Wee=V.toFlatObject(V,{},null,function(f){return/^is[A-Z]/.test(f)});function qp(o,f,h){if(!V.isObject(o))throw TypeError("target must be an object");f=f||new(jI||FormData);let y=(U,F)=>{let J=V.getSafeProp(h,U);return V.isUndefined(J)?F:J},x=y("metaTokens",!0),_=y("visitor")||A,z=y("dots",!1),C=y("indexes",!1),w=y("Blob")||typeof Blob<"u"&&Blob,S=y("maxDepth",eR),E=w&&V.isSpecCompliantForm(f),k=[];if(!V.isFunction(_))throw TypeError("visitor must be a function");function O(U){if(U===null)return"";if(V.isDate(U))return U.toISOString();if(V.isBoolean(U))return U.toString();if(!E&&V.isBlob(U))throw new ne("Blob is not supported. Use a Buffer instead.");if(V.isArrayBuffer(U)||V.isTypedArray(U)){if(E&&typeof w==="function")return new w([U]);if($y&&$y.isBufferAvailable())return $y.from(U);throw new ne("Blob is not supported. Use a Buffer instead.",ne.ERR_NOT_SUPPORT)}return U}function R(U){if(U>S)throw new ne("Object is too deeply nested ("+U+" levels). Max depth: "+S,ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function I(U,F){if(S===1/0)return JSON.stringify(U);let J=[];return JSON.stringify(U,function(te,le){if(!V.isObject(le))return le;while(J.length&&J[J.length-1]!==this)J.pop();return J.push(le),R(F+J.length-1),le})}function A(U,F,J){let Q=U;if(V.isReactNative(f)&&V.isReactNativeBlob(U))return f.append(Vy(J,F,z),O(U)),!1;if(U&&!J&&typeof U==="object"){if(V.endsWith(F,"{}"))F=x?F:F.slice(0,-2),U=I(U,1);else if(V.isArray(U)&&Kee(U)||(V.isFileList(U)||V.endsWith(F,"[]"))&&(Q=V.toArray(U)))return F=tR(F),Q.forEach(function(le,he){!(V.isUndefined(le)||le===null)&&f.append(C===!0?Vy([F],he,z):C===null?F:F+"[]",O(le))}),!1}if(Qy(U))return!0;return f.append(Vy(J,F,z),O(U)),!1}let M=Object.assign(Wee,{defaultVisitor:A,convertValue:O,isVisitable:Qy});function D(U,F,J=0){if(V.isUndefined(U))return;if(R(J),k.indexOf(U)!==-1)throw Error("Circular reference detected in "+F.join("."));k.push(U),V.forEach(U,function(te,le){if((!(V.isUndefined(te)||te===null)&&_.call(f,te,V.isString(le)?le.trim():le,F,M))===!0)D(te,F?F.concat(le):[le],J+1)}),k.pop()}if(!V.isObject(o))throw TypeError("data must be an object");return D(o),f}function uI(o){let f={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(o).replace(/[!'()~]|%20/g,function(y){return f[y]})}function rR(o,f){this._pairs=[],o&&qp(o,this,f)}var oR=rR.prototype;oR.append=function(f,h){this._pairs.push([f,h])};oR.toString=function(f){let h=f?(y)=>f.call(this,y,uI):uI;return this._pairs.map(function(x){return h(x[0])+"="+h(x[1])},"").join("&")};function Jee(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function cb(o,f,h){if(!f)return o;o=o||"";let y=V.isFunction(h)?{serialize:h}:h,x=V.getSafeProp(y,"encode")||Jee,_=V.getSafeProp(y,"serialize"),z;if(_)z=_(f,y);else z=V.isURLSearchParams(f)?f.toString():new rR(f,y).toString(x);if(z){let C=o.indexOf("#");if(C!==-1)o=o.slice(0,C);o+=(o.indexOf("?")===-1?"?":"&")+z}return o}var Rl=Symbol("internals");function nR(o){return o?o.length:0}function dI(o){if(!o)return;while(o.length&&o[o.length-1]===null)o.pop()}function Al(o,f){let h=o.handlers,y=nR(h);if(h!==f.handlersRef)f.handlersRef=h,f.handlerEntries.clear();else if(y!==f.handlersLength)if(!y)f.handlerEntries.clear();else f.handlerEntries.forEach(function(_,z){if(h[_.index]!==_.handler)f.handlerEntries.delete(z)});f.handlersLength=y}class eb{constructor(){this.handlers=[],this[Rl]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(o,f,h){let y={fulfilled:o,rejected:f,synchronous:h?h.synchronous:!1,runWhen:h?h.runWhen:null},x=this[Rl];if(this.handlers==null)this.handlers=[];Al(this,x);let _=x.nextId++;return this.handlers.push(y),x.handlerEntries.set(_,{handler:y,index:this.handlers.length-1}),x.handlersLength=this.handlers.length,_}eject(o){let f=this[Rl];Al(this,f);let h=f.handlerEntries.get(o);if(h){if(f.handlerEntries.delete(o),this.handlers[h.index]!==h.handler)return;if(this.handlers[h.index]=null,!f.iterationDepth)dI(this.handlers),f.handlersLength=this.handlers.length}}clear(){if(this.handlers)this.handlers=[],Al(this,this[Rl])}forEach(o){let f=this[Rl];Al(this,f),f.iterationDepth++;try{V.forEach(this.handlers,function(y){if(y!==null)o(y)})}finally{if(!--f.iterationDepth)Al(this,f),dI(this.handlers),f.handlersLength=nR(this.handlers)}}}var Fp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Zee=BQ.URLSearchParams,Hy="abcdefghijklmnopqrstuvwxyz",pI="0123456789",iR={DIGIT:pI,ALPHA:Hy,ALPHA_DIGIT:Hy+Hy.toUpperCase()+pI},Yee=(o=16,f=iR.ALPHA_DIGIT)=>{let h="",{length:y}=f,x=new Uint32Array(o);PQ.randomFillSync(x);for(let _=0;_<o;_++)h+=f[x[_]%y];return h},Xee={isNode:!0,classes:{URLSearchParams:Zee,FormData:jI,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:iR,generateString:Yee,protocols:["http","https","file","data"]},lb=typeof window<"u"&&typeof document<"u",tb=typeof navigator==="object"&&navigator||void 0,Qee=lb&&(!tb||["ReactNative","NativeScript","NS"].indexOf(tb.product)<0),ete=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function")(),tte=lb&&window.location.href||"http://localhost",rte=Object.freeze({__proto__:null,hasBrowserEnv:lb,hasStandardBrowserEnv:Qee,hasStandardBrowserWebWorkerEnv:ete,navigator:tb,origin:tte}),Jt={...rte,...Xee};function ote(o,f){return qp(o,new Jt.classes.URLSearchParams,{visitor:function(h,y,x,_){if(Jt.isNode&&V.isBuffer(h))return this.append(y,h.toString("base64")),!1;return _.defaultVisitor.apply(this,arguments)},...f})}var fI=eR;function sR(o){if(o>fI)throw new ne("FormData field is too deeply nested ("+o+" levels). Max depth: "+fI,ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function nte(o){let f=[],h=/[^.[\]]+|\[([^.[\]]*)]/g,y;while((y=h.exec(o))!==null)sR(f.length),f.push(y[0]==="[]"?"":y[1]||y[0]);return f}function ite(o){let f={},h=Object.keys(o),y,x=h.length,_;for(y=0;y<x;y++)_=h[y],f[_]=o[_];return f}function aR(o){function f(h,y,x,_){sR(_);let z=h[_++];if(z==="__proto__")return!0;let C=Number.isFinite(+z),w=_>=h.length;if(z=!z&&V.isArray(x)?x.length:z,w){if(V.hasOwnProp(x,z))x[z]=V.isArray(x[z])?x[z].concat(y):[x[z],y];else x[z]=y;return!C}if(!V.hasOwnProp(x,z)||!V.isObject(x[z]))x[z]=[];if(f(h,y,x[z],_)&&V.isArray(x[z]))x[z]=ite(x[z]);return!C}if(V.isFormData(o)&&V.isFunction(o.entries)){let h={};return V.forEachEntry(o,(y,x)=>{f(nte(y),x,h,0)}),h}return null}var cR=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),Da=(o,f)=>o!=null&&V.hasOwnProp(o,f)?o[f]:void 0;function ste(o,f,h){if(V.isString(o))try{return(f||JSON.parse)(o),V.trim(o)}catch(y){if(y.name!=="SyntaxError")throw y}return(h||JSON.stringify)(o)}var Ml={transitional:Fp,adapter:["xhr","http","fetch"],transformRequest:[function(f,h){let y=h.getContentType()||"",x=y.indexOf("application/json")>-1,_=V.isObject(f);if(_&&V.isHTMLForm(f))f=new FormData(f);if(V.isFormData(f))return x?JSON.stringify(aR(f)):f;if(V.isArrayBuffer(f)||V.isBuffer(f)||V.isStream(f)||V.isFile(f)||V.isBlob(f)||V.isReadableStream(f))return f;if(V.isArrayBufferView(f))return f.buffer;if(V.isURLSearchParams(f))return h.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),f.toString();let C;if(_){let w=Da(this,"formSerializer");if(y.indexOf("application/x-www-form-urlencoded")>-1)return ote(f,w).toString();if((C=V.isFileList(f))||y.indexOf("multipart/form-data")>-1){let S=Da(this,"env"),E=S&&S.FormData;return qp(C?{"files[]":f}:f,E&&new E,w)}}if(_||x)return h.setContentType("application/json",!1),ste(f);return f}],transformResponse:[function(f){let h=Da(this,"transitional")||Ml.transitional,y=h&&h.forcedJSONParsing,x=Da(this,"responseType"),_=x==="json";if(V.isResponse(f)||V.isReadableStream(f))return f;if(f&&V.isString(f)&&(y&&!x||_)){let C=!(h&&h.silentJSONParsing)&&_;try{return JSON.parse(f,Da(this,"parseReviver"))}catch(w){if(C){if(w.name==="SyntaxError")throw ne.from(w,ne.ERR_BAD_RESPONSE,this,null,Da(this,"response"));throw w}}}return f}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Jt.classes.FormData,Blob:Jt.classes.Blob},validateStatus:function(f){return f>=200&&f<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(cR,(o)=>{Ml.headers[o]={}});function Gy(o,f){let h=this||Ml,y=f||h,x=ur.from(y.headers),_=y.data;return V.forEach(o,function(C){_=C.call(h,_,x.normalize(),f?f.status:void 0)}),x.normalize(),_}function lR(o){return!!(o&&o.__CANCEL__)}class Ei extends ne{constructor(o,f,h){super(o==null?"canceled":o,ne.ERR_CANCELED,f,h);this.name="CanceledError",this.__CANCEL__=!0}}function La(o,f,h){let y=h.config.validateStatus;if(!h.status||!y||y(h.status))o(h);else f(new ne("Request failed with status code "+h.status,h.status>=400&&h.status<500?ne.ERR_BAD_REQUEST:ne.ERR_BAD_RESPONSE,h.config,h.request,h))}function ate(o){if(typeof o!=="string")return!1;return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o)}function cte(o,f){if(!f)return o;let h=o.length;while(h>0&&o.charCodeAt(h-1)===47)h--;return o.slice(0,h)+"/"+f.replace(/^\/+/,"")}var lte=/[\t\n\r]/g;function uR(o){if(typeof o!=="string")return o;let f=0;while(f<o.length&&o.charCodeAt(f)<=32)f++;return o.slice(f).replace(lte,"")}var ute=/^https?:(?!\/\/)/i;function dte(o){if(!o)return o;return o.replace(/(^|&)([^=&]*=)?[^&]+/g,(f,h,y="")=>`${h}${y}${Dp}`)}function pte(o){let f=o.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Dp}@`),h=f.indexOf("#"),x=(h===-1?f:f.slice(0,h)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Dp}`);if(h===-1)return x;return`${x}#${dte(f.slice(h+1))}`}function hI(o,f){if(typeof o==="string"){let h=uR(o);if(ute.test(h))throw new ne(`Invalid URL ${JSON.stringify(pte(h))}: missing "//" after protocol`,ne.ERR_INVALID_URL,f)}}function ub(o,f,h,y){hI(f,y);let x=!ate(f);if(o&&(x||h===!1))return hI(o,y),cte(o,f);return f}var fte={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function hte(o){try{return new URL(o)}catch{return null}}function mte(o){var f=(typeof o==="string"?hte(o):o)||{},{protocol:h,host:y,port:x}=f;if(typeof y!=="string"||!y||typeof h!=="string")return"";if(h=h.split(":",1)[0],y=y.replace(/:\d*$/,""),x=parseInt(x)||fte[h]||0,!gte(y,x))return"";var _=rb(h+"_proxy")||rb("all_proxy");if(_&&_.indexOf("://")===-1)_=h+"://"+_;return _}function gte(o,f){var h=rb("no_proxy").toLowerCase();if(!h)return!0;if(h==="*")return!1;return h.split(/[,\s]/).every(function(y){if(!y)return!0;var x=y.match(/^(.+):(\d+)$/),_=x?x[1]:y,z=x?parseInt(x[2]):0;if(z&&z!==f)return!0;if(!/^[.*]/.test(_))return o!==_;if(_.charAt(0)==="*")_=_.slice(1);return!o.endsWith(_)})}function rb(o){return process.env[o.toLowerCase()]||process.env[o.toUpperCase()]||""}var Dl="1.20.0";function wp(o){let f=/^([-+\w]{1,25}):(?:\/\/)?/.exec(o);return f&&f[1]||""}var yte=/^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function bte(o,f,h){let y=h&&h.Blob||Jt.classes.Blob,x=wp(o);if(f===void 0&&y)f=!0;if(x==="data"){o=x.length?o.slice(x.length+1):o;let _=yte.exec(o);if(!_)throw new ne("Invalid URL",ne.ERR_INVALID_URL);let z=_[1],C=_[2],w=_[3]?"base64":"utf8",S=_[4],E="";if(z)E=C?z+C:z;else if(C)E="text/plain"+C;let k=w==="base64"?Buffer.from(S,"base64"):Buffer.from(decodeURIComponent(S),w);if(f){if(!y)throw new ne("Blob is not supported",ne.ERR_NOT_SUPPORT);return new y([k],{type:E})}return k}throw new ne("Unsupported protocol "+x,ne.ERR_NOT_SUPPORT)}var vte=["content-type","content-length"];function dR(o,f,h){if(h!=="content-only"){o.set(f);return}Object.entries(f||{}).forEach(([y,x])=>{if(vte.includes(y.toLowerCase()))o.set(y,x)})}var Ky=Symbol("internals");class ob extends bo.Transform{constructor(o){o=V.toFlatObject(o,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(h,y)=>!V.isUndefined(y[h]));super({readableHighWaterMark:o.chunkSize});let f=this[Ky]={timeWindow:o.timeWindow,chunkSize:o.chunkSize,maxRate:o.maxRate,minChunkSize:o.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",(h)=>{if(h==="progress"){if(!f.isCaptured)f.isCaptured=!0}})}_read(o){let f=this[Ky];if(f.onReadCallback)f.onReadCallback();return super._read(o)}_transform(o,f,h){let y=this[Ky],x=y.maxRate,_=this.readableHighWaterMark,z=y.timeWindow,C=1000/z,w=x/C,S=y.minChunkSize!==!1?Math.max(y.minChunkSize,w*0.01):0,E=(O,R)=>{let I=Buffer.byteLength(O);if(y.bytesSeen+=I,y.bytes+=I,y.isCaptured&&this.emit("progress",y.bytesSeen),this.push(O))process.nextTick(R);else y.onReadCallback=()=>{y.onReadCallback=null,process.nextTick(R)}},k=(O,R)=>{let I=Buffer.byteLength(O),A=null,M=_,D,U=0;if(x){let F=Date.now();if(!y.ts||(U=F-y.ts)>=z)y.ts=F,D=w-y.bytes,y.bytes=D<0?-D:0,U=0;D=w-y.bytes}if(x){if(D<=0)return setTimeout(()=>{R(null,O)},z-U);if(D<M)M=D}if(M&&I>M&&I-M>S)A=O.subarray(M),O=O.subarray(0,M);E(O,A?()=>{process.nextTick(R,null,A)}:R)};k(o,function O(R,I){if(R)return h(R);if(I)k(I,O);else h(null)})}}var{asyncIterator:mI}=Symbol,pR=async function*(o){if(o.stream)yield*o.stream();else if(o.arrayBuffer)yield await o.arrayBuffer();else if(o[mI])yield*o[mI]();else yield o},xte=Jt.ALPHABET.ALPHA_DIGIT+"-_",Ll=typeof TextEncoder==="function"?new TextEncoder:new nb.TextEncoder,_s=`\r
83
+ `,_te=Ll.encode(_s),zte=2;class fR{constructor(o,f){let{escapeName:h}=this.constructor,y=V.isString(f),x=`Content-Disposition: form-data; name="${h(o)}"${!y&&f.name?`; filename="${h(f.name)}"`:""}${_s}`;if(y)f=Ll.encode(String(f).replace(/\r?\n|\r\n?/g,_s));else{let _=String(f.type||"application/octet-stream").replace(/[\r\n]/g,"");x+=`Content-Type: ${_}${_s}`}this.headers=Ll.encode(x+_s),this.contentLength=y?f.byteLength:f.size,this.size=this.headers.byteLength+this.contentLength+zte,this.name=o,this.value=f}async*encode(){yield this.headers;let{value:o}=this;if(V.isTypedArray(o))yield o;else yield*pR(o);yield _te}static escapeName(o){return String(o).replace(/[\r\n"]/g,(f)=>({"\r":"%0D","\n":"%0A",'"':"%22"})[f])}}var Cte=(o,f,h)=>{let{tag:y="form-data-boundary",size:x=25,boundary:_=y+"-"+Jt.generateString(x,xte)}=h||{};if(!V.isFormData(o))throw TypeError("FormData instance required");if(_.length<1||_.length>70)throw Error("boundary must be 1-70 characters long");let z=Ll.encode("--"+_+_s),C=Ll.encode("--"+_+"--"+_s),w=C.byteLength,S=Array.from(o.entries()).map(([k,O])=>{let R=new fR(k,O);return w+=R.size,R});w+=z.byteLength*S.length,w=V.toFiniteNumber(w);let E={"Content-Type":`multipart/form-data; boundary=${_}`};if(Number.isFinite(w))E["Content-Length"]=w;return f&&f(E),bo.Readable.from(async function*(){for(let k of S)yield z,yield*k.encode();yield C}())};class hR extends bo.Transform{__transform(o,f,h){this.push(o),h()}_transform(o,f,h){if(o.length!==0){if(this._transform=this.__transform,o[0]!==120){let y=Buffer.alloc(2);y[0]=120,y[1]=156,this.push(y,f)}}this.__transform(o,f,h)}}class mR{constructor(){this.sessions=Object.create(null)}getSession(o,f){f=Object.assign(Object.create(null),{sessionTimeout:1000},f);let h=this.sessions[o];if(h){let E=h.length;for(let k=0;k<E;k++){let[O,R]=h[k];if(!O.destroyed&&!O.closed&&nb.isDeepStrictEqual(R,f))return O}}let y=UI.connect(o,f),x,_,z=()=>{if(x)return;if(x=!0,_)clearTimeout(_),_=null;let E=h,k=E.length,O=k;while(O--)if(E[O][0]===y){if(k===1)delete this.sessions[o];else E.splice(O,1);if(!y.closed)y.close();return}},C=y.request,{sessionTimeout:w}=f;if(w!=null){let E=0;y.request=function(){let k=C.apply(this,arguments);if(E++,_)clearTimeout(_),_=null;return k.once("close",()=>{if(!--E)_=setTimeout(()=>{_=null,z()},w)}),k}}y.once("close",z),y.once("error",z);let S=[y,f];return h?h.push(S):h=this.sessions[o]=[S],y}}var wte=(o,f)=>V.isAsyncFn(o)?function(...h){let y=h.pop();o.apply(this,h).then((x)=>{try{f?y(null,...f(x)):y(null,x)}catch(_){y(_)}},y)}:o,Ste=new Set(["localhost","0.0.0.0"]),gR=(o)=>{let f=o.length;while(f&&o.charCodeAt(f-1)===46)f--;return f===o.length?o:o.slice(0,f)},yR=(o)=>{let f=o.split(".");if(f.length!==4)return!1;if(f[0]!=="127")return!1;return f.every((h)=>/^\d+$/.test(h)&&Number(h)>=0&&Number(h)<=255)},Wy=(o)=>{if(/^0[xX][0-9a-fA-F]+$/.test(o)){let f=parseInt(o.slice(2),16);return Number.isFinite(f)?f:null}if(o.length>1&&/^0[0-7]+$/.test(o)){let f=parseInt(o,8);return Number.isFinite(f)?f:null}if(o.length>1&&/^0[0-9]+$/.test(o))return null;if(/^[0-9]+$/.test(o)){let f=parseInt(o,10);return Number.isFinite(f)?f:null}return null},bR=(o)=>{if(typeof o!=="string"||!o||o.indexOf(":")!==-1)return o;let f=o;if(f.charAt(0)==="["&&f.charAt(f.length-1)==="]")f=f.slice(1,-1);if(f=gR(f),!/^[0-9.xXa-fA-F]+$/.test(f))return o;let h=f.split(".");if(h.some((E)=>E===""))return o;if(h.length===4){let E=h.map(Wy);if(E.some((k)=>k===null||k<0||k>255))return o;return E.join(".")}if(h.length>4)return o;if(h.length===1)return o;let y=h.slice(0,-1),x=h[h.length-1],_=4-y.length,z=Wy(x);if(z===null)return o;let C=(1<<8*_)-1;if(z<0||z>C)return o;let w=Array(_).fill(0);for(let E=_-1,k=z;E>=0;E--,k>>=8)w[E]=k&255;let S=y.map(Wy);if(S.some((E)=>E===null||E<0||E>255))return o;return[...S,...w].join(".")},Jy=(o)=>/^0{1,4}$/.test(o),Tte=(o)=>{if(o==="::")return!0;let f=o.indexOf("::");if(f!==-1){if(f!==o.lastIndexOf("::"))return!1;let y=o.slice(0,f),x=o.slice(f+2),_=y?y.split(":"):[],z=x?x.split(":"):[];return _.length+z.length<8&&_.every(Jy)&&z.every(Jy)}let h=o.split(":");return h.length===8&&h.every(Jy)},Ete=(o)=>{if(o==="::1")return!0;let f=o.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(f)return yR(f[1]);let h=o.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(h){let x=parseInt(h[1],16);return x>=32512&&x<=32767}let y=o.split(":");if(y.length===8){for(let x=0;x<7;x++)if(!/^0+$/.test(y[x]))return!1;return/^0*1$/.test(y[7])}return!1},gI=(o)=>{if(!o)return!1;if(Ste.has(o))return!0;if(yR(o))return!0;if(Tte(o))return!0;return Ete(o)},kte={http:80,https:443,ws:80,wss:443,ftp:21},Ote=(o)=>{let f=o,h=0;if(f.charAt(0)==="["){let _=f.indexOf("]");if(_!==-1){let z=f.slice(1,_),C=f.slice(_+1);if(C.charAt(0)===":"&&/^\d+$/.test(C.slice(1)))h=Number.parseInt(C.slice(1),10);return[z,h]}}let y=f.indexOf(":"),x=f.lastIndexOf(":");if(y!==-1&&y===x&&/^\d+$/.test(f.slice(x+1)))h=Number.parseInt(f.slice(x+1),10),f=f.slice(0,x);return[f,h]},Ite=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,Rte=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,vR=(o)=>{if(typeof o!=="string"||o.indexOf(":")===-1)return o;let f=o.match(Ite);if(f)return f[1];let h=o.match(Rte);if(h){let y=parseInt(h[1],16),x=parseInt(h[2],16);return`${y>>8}.${y&255}.${x>>8}.${x&255}`}return o},Ate=/^(?:0|[1-9]\d{0,2})$/,xR=(o)=>{let f=o.split(".");return f.length===4&&f.every((h)=>Ate.test(h)&&Number(h)<=255)?f.map(Number):null},Pte=/^[0-9a-f]{1,4}$/i,Bte=(o)=>{let f=o.split("::");if(f.length>2)return null;let h=f[0]?f[0].split(":"):[];if(f.length===2){let y=f[1]?f[1].split(":"):[],x=8-h.length-y.length;if(x<1)return null;h.push(...Array(x).fill("0"),...y)}if(h.length!==8||h.some((y)=>!Pte.test(y)))return null;return h.flatMap((y)=>{let x=Number.parseInt(y,16);return[x>>8&255,x&255]})},_R=(o)=>{if(typeof o!=="string"||!o)return null;return o.indexOf(":")!==-1?Bte(o):xR(o)},yI=(o)=>{if(!o)return o;if(o.charAt(0)==="["&&o.charAt(o.length-1)==="]")o=o.slice(1,-1);let f=gR(o),h=bR(f);if(h!==f)return h;return vR(f)},Dte=(o)=>{let f=o,h=f.charAt(0)==="[",y=f.charAt(f.length-1)==="]",x=f.includes("[")||f.includes("]");if(h||y){if(!h||!y)return null;if(f=f.slice(1,-1),f.indexOf(":")===-1||f.includes("[")||f.includes("]"))return null}else if(x)return null;if(!f||f.charAt(f.length-1)===".")return null;let _=f.indexOf(":")!==-1;if(_)try{f=new URL(`http://[${f}]/`).hostname.slice(1,-1)}catch(z){return null}else if(f=bR(f),!xR(f))return null;return{normalized:vR(f),wasIPv6:_}},Lte=/^(.+)\/(0|[1-9]\d{0,2})$/,Nte=(o)=>{if(o.indexOf("/")===-1)return;let f=Lte.exec(o);if(!f)return null;let h=Number(f[2]),y=Dte(f[1]);if(!y)return null;let{normalized:x,wasIPv6:_}=y;if(_&&x.indexOf(":")===-1){if(h<96)return null;h-=96}let z=_R(x);if(!z||h>z.length*8)return null;return{bytes:z,prefix:h}},jte=(o,f,h)=>{let y=h>>3;for(let _=0;_<y;_++)if(o[_]!==f[_])return!1;let x=h&7;if(x){let _=255<<8-x&255;if((o[y]&_)!==(f[y]&_))return!1}return!0};function Mte(o){let f;try{f=new URL(o)}catch(z){return!1}let h=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!h)return!1;if(h==="*")return!0;let y=Number.parseInt(f.port,10)||kte[f.protocol.split(":",1)[0]]||0,x=yI(f.hostname.toLowerCase()),_=_R(x);return h.split(/[\s,]+/).some((z)=>{if(!z)return!1;if(z==="*")return!0;let C=Nte(z);if(C!==void 0)return C!==null&&!!_&&_.length===C.bytes.length&&jte(_,C.bytes,C.prefix);let[w,S]=Ote(z);if(w=yI(w),!w)return!1;if(S&&S!==y)return!1;if(w.charAt(0)==="*")w=w.slice(1);if(w.charAt(0)===".")return x.endsWith(w);return x===w||gI(x)&&gI(w)})}function qte(o,f){o=o||10;let h=Array(o),y=Array(o),x=0,_=0,z;return f=f!==void 0?f:1000,function(w){let S=Date.now(),E=y[_];if(!z)z=S;h[x]=w,y[x]=S;let k=_,O=0;while(k!==x)O+=h[k++],k=k%o;if(x=(x+1)%o,x===_)_=(_+1)%o;if(S-z<f)return;let R=E&&S-E;return R?Math.round(O*1000/R):void 0}}function Fte(o,f){let h=0,y=1000/f,x,_,z=(E,k=Date.now())=>{if(h=k,x=null,_)clearTimeout(_),_=null;o(...E)};return[(...E)=>{let k=Date.now(),O=k-h;if(O>=y)z(E,k);else if(x=E,!_)_=setTimeout(()=>{_=null,z(x)},y-O)},()=>x&&z(x),(...E)=>z(E)]}var Na=(o,f,h=3)=>{let y=0,x=qte(50,250);return Fte((_)=>{if(!_||!V.isNumber(_.loaded))return;let z=_.loaded,C=_.lengthComputable?_.total:void 0,w=Math.max(0,C!=null?Math.min(z,C):z),S=Math.max(0,w-y),E=x(S);y=Math.max(y,w);let k={loaded:w,total:C,progress:C?w/C:void 0,bytes:S,rate:E?E:void 0,estimated:E&&C?(C-w)/E:void 0,event:_,lengthComputable:C!=null,[f?"download":"upload"]:!0};o(k)},h)},Np=(o,f)=>{let h=o!=null;return[(y)=>f[0]({lengthComputable:h,total:o,loaded:y}),f[1]]},jp=(o,f=V.asap)=>(...h)=>f(()=>o(...h)),bI=(o)=>o>=48&&o<=57||o>=65&&o<=70||o>=97&&o<=102,zR=(o,f,h)=>f+2<h&&bI(o.charCodeAt(f+1))&&bI(o.charCodeAt(f+2)),vI=(o)=>o<=57?o-48:(o&223)-55,Ute=(o)=>o>=65&&o<=90||o>=97&&o<=122||o>=48&&o<=57||o===43||o===47||o===45||o===95,$te=(o)=>o===9||o===10||o===12||o===13||o===32,Vte=(o)=>{let f=Math.floor(o/4),h=o%4;return f*3+(h===2?1:h===3?2:0)},CR=(o)=>{let f=o.length,h=0;if(f>0&&o.charCodeAt(f-1)===61){if(h++,f>1&&o.charCodeAt(f-2)===61)h++}return Math.floor((f-h)*3/4)},Hte=(o)=>{let f=o.length,h=0,y=0,x=!1;for(let _=0;_<f;_++){let z=o.charCodeAt(_);if(z===37&&zR(o,_,f))z=vI(o.charCodeAt(_+1))*16+vI(o.charCodeAt(_+2)),_+=2;if($te(z))continue;if(z===61){y++;continue}if(!Ute(z)||y>0){x=!0;continue}h++}if(x||y>2||y>0&&(h+y)%4!==0||h%4===1)return CR(o);return Vte(h)},wR=(o,f)=>{if(!o||typeof o!=="string")return 0;if(!o.startsWith("data:"))return 0;let h=o.indexOf(",");if(h<0)return 0;let y=o.slice(5,h),x=o.slice(h+1);if(/;base64/i.test(y))return f(x);let z=0;for(let C=0,w=x.length;C<w;C++){let S=x.charCodeAt(C);if(S===37&&zR(x,C,w))z+=1,C+=2;else if(S<128)z+=1;else if(S<2048)z+=2;else if(S>=55296&&S<=56319&&C+1<w){let E=x.charCodeAt(C+1);if(E>=56320&&E<=57343)z+=4,C++;else z+=3}else z+=3}return z};function Gte(o){let f=typeof o==="string"?o.indexOf("#"):-1;return wR(f===-1?o:o.slice(0,f),Hte)}function Kte(o){return wR(o,CR)}var xI={flush:Lo.constants.Z_SYNC_FLUSH,finishFlush:Lo.constants.Z_SYNC_FLUSH},Wte={flush:Lo.constants.BROTLI_OPERATION_FLUSH,finishFlush:Lo.constants.BROTLI_OPERATION_FLUSH},Jte={flush:Lo.constants.ZSTD_e_flush,finishFlush:Lo.constants.ZSTD_e_flush},SR=V.isFunction(Lo.createBrotliDecompress),TR=V.isFunction(Lo.createZstdDecompress),ER="gzip, compress, deflate"+(SR?", br":""),Zte=ER+(TR?", zstd":""),_I=typeof process<"u"&&process.nextTick?process.nextTick.bind(process):V.asap,{http:Yte,https:Xte}=DQ,db=/https:?/,zI=Symbol("axios.http.socketListener"),kp=Symbol("axios.http.currentReq");function Qte(o){let f=this[kp];if(f&&!f.destroyed)f.destroy(o)}var kR=Symbol("axios.http.installedTunnel"),ere=new Map,CI=new WeakMap,wI={22:21,24:5};function tre(o=process.versions&&process.versions.node){if(!o)return!1;let[f,h]=o.split(".").map((y)=>Number(y));if(!Number.isInteger(f)||!Number.isInteger(h))return!1;if(f>24)return!0;return wI[f]!=null&&h>=wI[f]}function SI(o,f=process.versions&&process.versions.node){if(!tre(f))return!1;let h=o&&o.options;return Boolean(h&&V.hasOwnProp(h,"proxyEnv")&&h.proxyEnv!=null)}function rre(o,f,h){return db.test(o.protocol)?h||FI.globalAgent:f||qI.globalAgent}function ore(o,f){let h=o.protocol+"//"+o.hostname+":"+(o.port||"")+"#"+(o.auth||""),y=f?CI.get(f)||CI.set(f,new Map).get(f):ere,x=y.get(h);if(x)return x;let _=f&&f.options?{...f.options,...o}:o;if(x=new MI(_),f&&f.options){let z={...f.options},C=x.callback;x.callback=function(S,E){return C.call(this,S,{...z,...E})}}return x[kR]=!0,y.set(h,x),x}var TI=Jt.protocols.map((o)=>o+":"),EI=(o)=>{if(!V.isString(o))return o;try{return decodeURIComponent(o)}catch(f){return o}},kI=(o,[f,h])=>(o.on("end",h).on("error",h),f),nre=new mR;function ire(o,f,h){if(o.beforeRedirects.proxy)o.beforeRedirects.proxy(o);if(o.beforeRedirects.auth)o.beforeRedirects.auth(o);if(o.beforeRedirects.sensitiveHeaders)o.beforeRedirects.sensitiveHeaders(o,h);if(o.beforeRedirects.config)o.beforeRedirects.config(o,f,h)}function sre(o,f){if(!o)return;Object.keys(o).forEach((h)=>{if(f.has(h.toLowerCase()))delete o[h]})}function are(o,f){if(!f)return!1;try{return new URL(f.url).origin===new URL(o.href).origin}catch(h){return!1}}function OR(o,f,h,y,x,_,z=!0){let C=f,w=rre(o,_,x);if(!C&&C!==!1&&z&&!SI(w)){let S=mte(h);if(S){if(!Mte(h))C=new URL(S)}}if(y&&o.headers){for(let S of Object.keys(o.headers))if(S.toLowerCase()==="proxy-authorization")delete o.headers[S]}if(y&&o.agent&&o.agent[kR])o.agent=void 0;if(C){let S=C instanceof URL,E=(A)=>S||V.hasOwnProp(C,A)?C[A]:void 0,k=E("username"),O=E("password"),R=V.hasOwnProp(C,"auth")?C.auth:void 0;if(k)R=(k||"")+":"+(O||"");if(R){let A=typeof R==="object",M=A&&V.hasOwnProp(R,"username")?R.username:void 0,D=A&&V.hasOwnProp(R,"password")?R.password:void 0;if(Boolean(M||D))R=(M||"")+":"+(D||"");else if(A)throw new ne("Invalid proxy authorization",ne.ERR_BAD_OPTION,{proxy:C})}if(db.test(o.protocol)){if(!(x instanceof MI)){let A=E("hostname")||E("host"),M=E("port"),D=E("protocol"),U=D?D.includes(":")?D:`${D}:`:"http:",F=A&&A.includes(":")&&!A.startsWith("[")?`[${A}]`:A,J=new URL(`${U}//${F}${M?":"+M:""}`),Q={protocol:J.protocol,hostname:J.hostname.replace(/^\[|\]$/g,""),port:J.port,auth:R&&typeof R==="string"?R:void 0};if(J.protocol==="https:")Q.ALPNProtocols=["http/1.1"];let te=ore(Q,x);if(o.agent=te,o.agents)o.agents.https=te}}else{if(R){let U=Buffer.from(R,"utf8").toString("base64");o.headers["Proxy-Authorization"]="Basic "+U}let A=!1;for(let U of Object.keys(o.headers))if(U.toLowerCase()==="host"){A=!0;break}if(!A)o.headers.host=o.hostname+(o.port?":"+o.port:"");let M=E("hostname")||E("host");o.hostname=M,o.host=M,o.port=E("port"),o.path=h;let D=E("protocol");if(D)o.protocol=D.includes(":")?D:`${D}:`}}return o.beforeRedirects.proxy=function(E){OR(E,f,E.href,!0,x,_,z)},Boolean(C||f!==!1&&z&&SI(w))}var cre=typeof process<"u"&&V.kindOf(process)==="process",lre=(o)=>new Promise((f,h)=>{let y,x,_=(w,S)=>{if(x)return;x=!0,y&&y(w,S)},z=(w)=>{_(w),f(w)},C=(w)=>{_(w,!0),h(w)};o(z,C,(w)=>y=w).catch(C)}),ure=({address:o,family:f})=>{if(!V.isString(o))throw new ne("address must be a string",ne.ERR_BAD_OPTION_VALUE);return{address:o,family:f||(o.indexOf(".")<0?6:4)}},OI=(o,f)=>ure(V.isObject(o)?o:{address:o,family:f}),II=new WeakMap,dre=(o)=>{let f=II.get(o);if(f)return f;let h=wte(o,(y)=>V.isArray(y)?y:[y]);return f=(y,x,_)=>{h(y,x,(z,C,w)=>{if(z)return _(z);let S;try{S=V.isArray(C)?C.map((E)=>OI(E)):[OI(C,w)]}catch(E){return _(E)}x.all?_(z,S):_(z,S[0].address,S[0].family)})},II.set(o,f),f},pre={request(o,f){let h=o.protocol+"//"+o.hostname+":"+(o.port||(o.protocol==="https:"?443:80)),{http2Options:y,headers:x}=o,_=nre.getSession(h,y),{HTTP2_HEADER_SCHEME:z,HTTP2_HEADER_METHOD:C,HTTP2_HEADER_PATH:w,HTTP2_HEADER_STATUS:S}=UI.constants,E={[z]:o.protocol.replace(":",""),[C]:o.method,[w]:o.path};V.forEach(x,(O,R)=>{R.charAt(0)!==":"&&(E[R]=O)});let k=_.request(E);return k.once("response",(O)=>{let R=k;O=Object.assign({},O);let I=O[S];delete O[S],R.headers=O,R.statusCode=+I,f(R)}),k}},fre=cre&&function(f){return lre(async function(y,x,_){let z=(be)=>V.getSafeProp(f,be),C=z("transitional")||Fp,w=z("data"),S=z("lookup"),E=z("family"),k=z("httpVersion");if(k===void 0)k=1;let O=k,R=z("http2Options"),I=z("httpAgent"),A=z("httpsAgent"),M=z("proxy"),D=z("responseType"),U=z("responseEncoding"),F=z("socketPath"),J=z("method").toUpperCase(),Q=z("maxRedirects"),te=z("maxBodyLength"),le=z("maxContentLength"),he=z("decompress"),xe,Re=!1,me,Ae;try{k=+k}catch(be){throw new ne("Invalid protocol version: value is not a number",ne.ERR_BAD_OPTION_VALUE,f)}if(Number.isNaN(k))throw new ne(`Invalid protocol version: '${O}' is not a number`,ne.ERR_BAD_OPTION_VALUE,f);if(k!==1&&k!==2)throw new ne(`Unsupported protocol version '${k}'`,ne.ERR_BAD_OPTION_VALUE,f);let We=k===2;if(S)S=dre(S);let $e=new LQ.EventEmitter;function De(be){try{$e.emit("abort",!be||be.type?new Ei(null,f,me):be)}catch(Te){}}function re(){if(Ae)clearTimeout(Ae),Ae=null}function oe(){let be=z("timeout"),Te=be?"timeout of "+be+"ms exceeded":"timeout exceeded",Ke=z("timeoutErrorMessage");if(Ke)Te=Ke;return new ne(Te,C.clarifyTimeoutError?ne.ETIMEDOUT:ne.ECONNABORTED,f,me)}$e.once("abort",x);let Ge=()=>{if(re(),f.cancelToken)f.cancelToken.unsubscribe(De);if(f.signal)f.signal.removeEventListener("abort",De);$e.removeAllListeners()};if(f.cancelToken||f.signal){if(f.cancelToken&&f.cancelToken.subscribe(De),f.signal)f.signal.aborted?De():f.signal.addEventListener("abort",De)}_((be,Te)=>{if(xe=!0,re(),Te){Re=!0,Ge();return}let{data:Ke}=be;if(Ke instanceof bo.Readable||Ke instanceof bo.Duplex){let sr=bo.finished(Ke,()=>{sr(),Ge()})}else Ge()});let Bt=ub(z("baseURL"),z("url"),z("allowAbsoluteUrls"),f),Se=F?"http://localhost":Jt.hasBrowserEnv?Jt.origin:void 0,Pe=new URL(Bt,Se),Le=Pe.protocol||TI[0];if(Le==="data:"){if(le>-1){let Te=String(z("url")||Bt||"");if(Kte(Te)>le)return x(new ne("maxContentLength size of "+le+" exceeded",ne.ERR_BAD_RESPONSE,f))}let be;if(J!=="GET")return La(y,x,{status:405,statusText:"method not allowed",headers:{},config:f});try{be=bte(z("url"),D==="blob",{Blob:f.env&&f.env.Blob})}catch(Te){throw ne.from(Te,ne.ERR_BAD_REQUEST,f)}if(D==="text"){if(be=be.toString(U),!U||U==="utf8")be=V.stripBOM(be)}else if(D==="stream")be=bo.Readable.from(be);return La(y,x,{data:be,status:200,statusText:"OK",headers:new ur,config:f})}if(TI.indexOf(Le)===-1)return x(new ne("Unsupported protocol "+Le,ne.ERR_BAD_REQUEST,f));let He=ur.from(f.headers).normalize();He.set("User-Agent","axios/"+Dl,!1);let{onUploadProgress:st,onDownloadProgress:Et}=f,kt=f.maxRate,Ne=void 0,qe=void 0;if(V.isSpecCompliantForm(w)){let be=He.getContentType(/boundary=([-_\w\d]{10,70})/i);w=Cte(w,(Te)=>{He.set(Te)},{tag:`axios-${Dl}-boundary`,boundary:be&&be[1]||void 0})}else if(V.isFormData(w)&&V.isFunction(w.getHeaders)&&w.getHeaders!==Object.prototype.getHeaders){if(dR(He,w.getHeaders(),z("formDataHeaderPolicy")),!He.hasContentLength())try{let be=await nb.promisify(w.getLength).call(w);Number.isFinite(be)&&be>=0&&He.setContentLength(be)}catch(be){}}else if(V.isBlob(w)||V.isFile(w))w.size&&He.setContentType(w.type||"application/octet-stream"),He.setContentLength(w.size||0),w=bo.Readable.from(pR(w));else if(w&&!V.isStream(w)){if(Buffer.isBuffer(w));else if(V.isArrayBuffer(w))w=Buffer.from(new Uint8Array(w));else if(V.isString(w))w=Buffer.from(w,"utf-8");else return x(new ne("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",ne.ERR_BAD_REQUEST,f));if(He.setContentLength(w.length,!1),te>-1&&w.length>te)return x(new ne("Request body larger than maxBodyLength limit",ne.ERR_BAD_REQUEST,f))}let at=V.toFiniteNumber(He.getContentLength());if(V.isArray(kt))Ne=kt[0],qe=kt[1];else Ne=qe=kt;if(w&&(st||Ne)){if(!V.isStream(w))w=bo.Readable.from(w,{objectMode:!1});w=bo.pipeline([w,new ob({maxRate:V.toFiniteNumber(Ne)})],V.noop),st&&w.on("progress",kI(w,Np(at,Na(jp(st,_I),!1,3))))}let ut=void 0,Lt=z("auth");if(Lt){let be=V.getSafeProp(Lt,"username")||"",Te=V.getSafeProp(Lt,"password")||"";ut=be+":"+Te}if(!ut&&(Pe.username||Pe.password)){let be=EI(Pe.username),Te=EI(Pe.password);ut=be+":"+Te}ut&&He.delete("authorization");let ct;try{ct=cb(Pe.pathname+Pe.search,z("params"),z("paramsSerializer")).replace(/^\?/,"")}catch(be){return x(ne.from(be,ne.ERR_BAD_REQUEST,f,null,null,{url:z("url"),exists:!0}))}if(He.set("Accept-Encoding",V.hasOwnProp(C,"advertiseZstdAcceptEncoding")&&C.advertiseZstdAcceptEncoding===!0?Zte:ER,!1),We&&S)R=Object.assign(Object.create(null),R,{lookup:S});let Fe=Object.assign(Object.create(null),{path:ct,method:J,headers:ab(He),agents:{http:I,https:A},auth:ut,protocol:Le,family:E,beforeRedirect:ire,beforeRedirects:Object.create(null),http2Options:R,createConnection:void 0});!V.isUndefined(S)&&(Fe.lookup=S);let et=!1;if(F){if(typeof F!=="string")return x(new ne("socketPath must be a string",ne.ERR_BAD_OPTION_VALUE,f));let be=z("allowedSocketPaths");if(be!=null){let Te=Array.isArray(be)?be:[be],Ke=iI.resolve(F);if(!Te.some((vt)=>typeof vt==="string"&&iI.resolve(vt)===Ke))return x(new ne(`socketPath "${F}" is not permitted by allowedSocketPaths`,ne.ERR_BAD_OPTION_VALUE,f))}Fe.socketPath=F}else Fe.hostname=Pe.hostname.startsWith("[")?Pe.hostname.slice(1,-1):Pe.hostname,Fe.port=Pe.port,et=OR(Fe,M,Le+"//"+Pe.hostname+(Pe.port?":"+Pe.port:"")+Fe.path,!1,A,I,!We);let Rt,uo=!1,or=!1,Ue=db.test(Fe.protocol);if(Fe.agent==null)Fe.agent=Ue?A:I;if(We){if(et)return x(new ne("HTTP/2 requests with a proxy are not supported",ne.ERR_NOT_SUPPORT,f));Rt=pre}else{let be=z("transport");if(be)Rt=be;else if(Q===0)Rt=Ue?FI:qI,uo=!0;else{if(or=!0,Fe.sensitiveHeaders=[],Q)Fe.maxRedirects=Q;let Te=z("beforeRedirect");if(Te)Fe.beforeRedirects.config=Te;if(ut){let sr=Pe.origin,vt=ut;Fe.beforeRedirects.auth=function(Kr){try{if(new URL(Kr.href).origin===sr)Kr.auth=vt}catch(ar){}}}let Ke=z("sensitiveHeaders");if(Ke!=null){if(!V.isArray(Ke))return x(new ne("sensitiveHeaders must be an array of strings",ne.ERR_BAD_OPTION_VALUE,f));let sr=new Set;for(let vt of Ke){if(!V.isString(vt))return x(new ne("sensitiveHeaders must be an array of strings",ne.ERR_BAD_OPTION_VALUE,f));sr.add(vt.toLowerCase())}if(sr.size)Fe.sensitiveHeaders=Array.from(sr),Fe.beforeRedirects.sensitiveHeaders=function(Rr,Kr){if(!are(Rr,Kr))sre(Rr.headers,sr)}}Rt=Ue?Xte:Yte}}if(te>-1)Fe.maxBodyLength=te;else Fe.maxBodyLength=1/0;Fe.insecureHTTPParser=Boolean(z("insecureHTTPParser")),me=Rt.request(Fe,function(Te){if(re(),me.destroyed)return;let Ke=[Te],sr=V.toFiniteNumber(Te.headers["content-length"]);if(Et||qe){let ar=new ob({maxRate:V.toFiniteNumber(qe)});Et&&ar.on("progress",kI(ar,Np(sr,Na(jp(Et,_I),!0,3)))),Ke.push(ar)}let vt=Te,Rr=Te.req||me;if(he!==!1&&Te.headers["content-encoding"]){if(J==="HEAD"||Te.statusCode===204)delete Te.headers["content-encoding"];switch((Te.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Ke.push(Lo.createUnzip(xI)),delete Te.headers["content-encoding"];break;case"deflate":Ke.push(new hR),Ke.push(Lo.createUnzip(xI)),delete Te.headers["content-encoding"];break;case"br":if(SR)Ke.push(Lo.createBrotliDecompress(Wte)),delete Te.headers["content-encoding"];break;case"zstd":if(TR)Ke.push(Lo.createZstdDecompress(Jte)),delete Te.headers["content-encoding"];break}}vt=Ke.length>1?bo.pipeline(Ke,V.noop):Ke[0];let Kr={status:Te.statusCode,statusText:Te.statusMessage,headers:new ur(Te.headers),config:f,request:Rr};if(D==="stream"){if(le>-1){let ar=le,fa=vt;async function*ns(){let cr=0;for await(let xd of fa){if(cr+=xd.length,cr>ar)throw new ne("maxContentLength size of "+ar+" exceeded",ne.ERR_BAD_RESPONSE,f,Rr);yield xd}}vt=bo.Readable.from(ns(),{objectMode:!1})}Kr.data=vt,La(y,x,Kr)}else{let ar=[],fa=0;vt.on("data",function(cr){if(ar.push(cr),fa+=cr.length,le>-1&&fa>le)Re=!0,vt.destroy(),De(new ne("maxContentLength size of "+le+" exceeded",ne.ERR_BAD_RESPONSE,f,Rr))}),vt.on("aborted",function(){if(Re)return;let cr=new ne("stream has been aborted",ne.ERR_BAD_RESPONSE,f,Rr,Kr);vt.destroy(cr),x(cr)}),vt.on("error",function(cr){if(Re)return;x(ne.from(cr,null,f,Rr,Kr))}),vt.on("end",function(){try{let cr=ar.length===1?ar[0]:Buffer.concat(ar);if(D!=="arraybuffer"){if(cr=cr.toString(U),!U||U==="utf8")cr=V.stripBOM(cr)}Kr.data=cr}catch(cr){return x(ne.from(cr,null,f,Kr.request,Kr))}La(y,x,Kr)})}$e.once("abort",(ar)=>{if(!vt.destroyed)vt.emit("error",ar),vt.destroy()})}),$e.once("abort",(be)=>{if(me.close)me.close();else me.destroy(be)}),me.on("error",function(Te){x(ne.from(Te,null,f,me))});let Wt=new Set;if(me.on("socket",function(Te){if(typeof Te.setKeepAlive==="function")Te.setKeepAlive(!0,60000);if(!Te[zI])Te.on("error",Qte),Te[zI]=!0;Te[kp]=me,Wt.add(Te)}),me.once("close",function(){re();for(let Te of Wt)if(Te[kp]===me)Te[kp]=null;Wt.clear()}),z("timeout")){let be=parseInt(z("timeout"),10);if(Number.isNaN(be)){De(new ne("error trying to parse `config.timeout` to int",ne.ERR_BAD_OPTION_VALUE,f,me));return}let Te=function(){if(xe)return;De(oe())};if(uo&&be>0)Ae=setTimeout(Te,be);me.setTimeout(be,Te)}else me.setTimeout(0);if(V.isStream(w)){let be=!1,Te=!1;w.on("end",()=>{be=!0}),w.once("error",(sr)=>{Te=!0,me.destroy(sr)}),w.on("close",()=>{if(!be&&!Te)De(new Ei("Request stream has been aborted",f,me))});let Ke=w;if(te>-1&&!or){let sr=te,vt=0;Ke=bo.pipeline([w,new bo.Transform({transform(Rr,Kr,ar){if(vt+=Rr.length,vt>sr)return ar(new ne("Request body larger than maxBodyLength limit",ne.ERR_BAD_REQUEST,f,me));ar(null,Rr)}})],V.noop),Ke.on("error",(Rr)=>{if(!me.destroyed)me.destroy(Rr)})}Ke.pipe(me)}else w&&me.write(w),me.end()})},hre=Jt.hasStandardBrowserEnv?((o,f)=>(h)=>(h=new URL(h,Jt.origin),o.protocol===h.protocol&&o.host===h.host&&(f||o.port===h.port)))(new URL(Jt.origin),Jt.navigator&&/(msie|trident)/i.test(Jt.navigator.userAgent)):()=>!0,mre=Jt.hasStandardBrowserEnv?{write(o,f,h,y,x,_,z){if(typeof document>"u")return;let C=[`${o}=${encodeURIComponent(f)}`];if(V.isNumber(h))C.push(`expires=${new Date(h).toUTCString()}`);if(V.isString(y))C.push(`path=${y}`);if(V.isString(x))C.push(`domain=${x}`);if(_===!0)C.push("secure");if(V.isString(z))C.push(`SameSite=${z}`);document.cookie=C.join("; ")},read(o){if(typeof document>"u")return null;let f=document.cookie.split(";");for(let h=0;h<f.length;h++){let y=f[h].replace(/^\s+/,""),x=y.indexOf("=");if(x!==-1&&y.slice(0,x)===o)try{return decodeURIComponent(y.slice(x+1))}catch(_){return y.slice(x+1)}}return null},remove(o){this.write(o,"",Date.now()-86400000,"/")}}:{write(){},read(){return null},remove(){}},RI=(o)=>o instanceof ur?{...o}:o,gre=(o)=>{if(Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor)return Object.keys(o).concat(Object.getOwnPropertySymbols(o).filter((f)=>Object.getOwnPropertyDescriptor(o,f).enumerable));return Object.keys(o)};function ws(o,f){o=o||{},f=f||{};let h=Object.create(null);Object.defineProperty(h,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function y(E,k,O,R){if(V.isPlainObject(E)&&V.isPlainObject(k))return V.merge.call({caseless:R},E,k);else if(V.isPlainObject(k))return V.merge({},k);else if(V.isArray(k))return k.slice();return k}function x(E,k,O,R){if(!V.isUndefined(k))return y(E,k,O,R);else if(!V.isUndefined(E))return y(void 0,E,O,R)}function _(E,k){if(!V.isUndefined(k))return y(void 0,k)}function z(E,k){if(!V.isUndefined(k))return y(void 0,k);else if(!V.isUndefined(E))return y(void 0,E)}function C(E){let k=V.hasOwnProp(f,"transitional")?f.transitional:void 0;if(!V.isUndefined(k))if(V.isPlainObject(k)){if(V.hasOwnProp(k,E))return k[E]}else return;let O=V.hasOwnProp(o,"transitional")?o.transitional:void 0;if(V.isPlainObject(O)&&V.hasOwnProp(O,E))return O[E];return}function w(E,k,O){if(V.hasOwnProp(f,O))return y(E,k);else if(V.hasOwnProp(o,O))return y(void 0,E)}let S={url:_,method:_,data:_,baseURL:z,transformRequest:z,transformResponse:z,paramsSerializer:z,timeout:z,timeoutErrorMessage:z,withCredentials:z,withXSRFToken:z,adapter:z,responseType:z,xsrfCookieName:z,xsrfHeaderName:z,onUploadProgress:z,onDownloadProgress:z,decompress:z,maxContentLength:z,maxBodyLength:z,beforeRedirect:z,transport:z,httpAgent:z,httpsAgent:z,cancelToken:z,socketPath:z,allowedSocketPaths:z,responseEncoding:z,validateStatus:w,headers:(E,k,O)=>x(RI(E),RI(k),O,!0)};if(V.forEach(gre({...o,...f}),function(k){if(k==="__proto__"||k==="constructor"||k==="prototype")return;let O=V.hasOwnProp(S,k)?S[k]:x,R=V.hasOwnProp(o,k)?o[k]:void 0,I=V.hasOwnProp(f,k)?f[k]:void 0,A=O(R,I,k);V.isUndefined(A)&&O!==w||(h[k]=A)}),V.hasOwnProp(f,"validateStatus")&&V.isUndefined(f.validateStatus)&&C("validateStatusUndefinedResolves")===!1)if(V.hasOwnProp(o,"validateStatus"))h.validateStatus=y(void 0,o.validateStatus);else delete h.validateStatus;return h}var yre=(o)=>encodeURIComponent(o).replace(/%([0-9A-F]{2})/gi,(f,h)=>String.fromCharCode(parseInt(h,16)));function IR(o){let f=ws({},o),h=(O)=>V.hasOwnProp(f,O)?f[O]:void 0,y=h("data"),x=h("withXSRFToken"),_=h("xsrfHeaderName"),z=h("xsrfCookieName"),C=h("headers"),w=h("auth"),S=h("baseURL"),E=h("allowAbsoluteUrls"),k=h("url");if(f.headers=C=ur.from(C),f.url=cb(ub(S,k,E,f),h("params"),h("paramsSerializer")),w){let O=V.getSafeProp(w,"username")||"",R=V.getSafeProp(w,"password")||"";try{C.set("Authorization","Basic "+btoa(O+":"+(R?yre(R):"")))}catch(I){throw ne.from(I,ne.ERR_BAD_OPTION_VALUE,o)}}if(V.isFormData(y)){let O=V.getSafeProp(y,"getHeaders");if(Jt.hasStandardBrowserEnv||Jt.hasStandardBrowserWebWorkerEnv||V.isReactNative(y))C.setContentType(void 0);else if(V.isFunction(O))dR(C,O.call(y),h("formDataHeaderPolicy"))}if(Jt.hasStandardBrowserEnv){if(V.isFunction(x))x=x(f);if(x===!0||x==null&&hre(f.url)){let R=_&&z&&mre.read(z);if(R)C.set(_,R)}}return f}var bre=typeof XMLHttpRequest<"u",vre=bre&&function(o){return new Promise(function(h,y){let x=IR(o),_=x.data,z=ur.from(x.headers).normalize(),{responseType:C,onUploadProgress:w,onDownloadProgress:S}=x,E,k,O,R,I,A;function M(){R&&R(),I&&I(),x.cancelToken&&x.cancelToken.unsubscribe(E),x.signal&&x.signal.removeEventListener("abort",E)}let D=new XMLHttpRequest;D.open(x.method.toUpperCase(),x.url,!0),D.timeout=x.timeout;function U(J){if(!D)return;if(D.status===0&&(wp(uR(x.url))||wp(Jt.origin))!=="file"&&!(D.responseURL&&D.responseURL.startsWith("file:"))){y(new ne("Request aborted",ne.ECONNABORTED,o,D)),M(),D=null;return}try{if(J)A&&A(J);else I&&I()}catch(he){setTimeout(()=>{throw he})}if(!D)return;let Q=ur.from("getAllResponseHeaders"in D&&D.getAllResponseHeaders()),le={data:!C||C==="text"||C==="json"?D.responseText:D.response,status:D.status,statusText:D.statusText,headers:Q,config:o,request:D};La(function(xe){h(xe),M()},function(xe){y(xe),M()},le),D=null}if("onloadend"in D)D.onloadend=U;else D.onreadystatechange=function(){if(!D||D.readyState!==4)return;if(D.status===0&&!(D.responseURL&&D.responseURL.startsWith("file:")))return;setTimeout(U)};if(D.onabort=function(){if(!D)return;y(new ne("Request aborted",ne.ECONNABORTED,o,D)),M(),D=null},D.onerror=function(Q){let te=Q&&Q.message?Q.message:"Network Error",le=new ne(te,ne.ERR_NETWORK,o,D);le.event=Q||null,y(le),M(),D=null},D.ontimeout=function(){let Q=x.timeout?"timeout of "+x.timeout+"ms exceeded":"timeout exceeded",te=x.transitional||Fp;if(x.timeoutErrorMessage)Q=x.timeoutErrorMessage;y(new ne(Q,te.clarifyTimeoutError?ne.ETIMEDOUT:ne.ECONNABORTED,o,D)),M(),D=null},_===void 0&&z.setContentType(null),"setRequestHeader"in D)V.forEach(ab(z),function(Q,te){D.setRequestHeader(te,Q)});if(!V.isUndefined(x.withCredentials))D.withCredentials=!!x.withCredentials;if(C&&C!=="json")D.responseType=x.responseType;if(S)[O,I,A]=Na(S,!0),D.addEventListener("progress",O);if(w&&D.upload)[k,R]=Na(w),D.upload.addEventListener("progress",k),D.upload.addEventListener("loadend",R);if(x.cancelToken||x.signal){if(E=(J)=>{if(!D)return;y(!J||J.type?new Ei(null,o,D):J),D.abort(),M(),D=null},x.cancelToken&&x.cancelToken.subscribe(E),x.signal)x.signal.aborted?E():x.signal.addEventListener("abort",E)}let F=wp(x.url);if(F&&!Jt.protocols.includes(F)){y(new ne("Unsupported protocol "+F+":",ne.ERR_BAD_REQUEST,o)),M();return}D.send(_||null)})},xre=(o,f)=>{if(o=o?o.filter(Boolean):[],!f&&!o.length)return;let h=new AbortController,y=!1,x=function(w){if(!y){y=!0,z();let S=w instanceof Error?w:this.reason;h.abort(S instanceof ne?S:new Ei(S instanceof Error?S.message:S))}},_=f&&setTimeout(()=>{_=null,x(new ne(`timeout of ${f}ms exceeded`,ne.ETIMEDOUT))},f),z=()=>{if(!o)return;_&&clearTimeout(_),_=null,o.forEach((w)=>{w.unsubscribe?w.unsubscribe(x):w.removeEventListener("abort",x)}),o=null};o.forEach((w)=>{if(y)return;if(w.aborted){x.call(w);return}w.addEventListener("abort",x,{once:!0})});let{signal:C}=h;return C.unsubscribe=()=>V.asap(z),C},_re=function*(o,f){let h=o.byteLength;if(h<f){yield o;return}let y=0,x;while(y<h)x=y+f,yield o.slice(y,x),y=x},zre=async function*(o,f){for await(let h of Cre(o))yield*_re(h,f)},Cre=async function*(o){if(o[Symbol.asyncIterator]){yield*o;return}let f=o.getReader();try{for(;;){let{done:h,value:y}=await f.read();if(h)break;yield y}}finally{await f.cancel()}},AI=(o,f,h,y)=>{let x=zre(o,f),_=0,z,C=(w)=>{if(!z)z=!0,y&&y(w)};return new ReadableStream({async pull(w){try{let{done:S,value:E}=await x.next();if(S){C(),w.close();return}let k=E.byteLength;if(h){let O=_+=k;h(O)}w.enqueue(new Uint8Array(E))}catch(S){throw C(S),S}},cancel(w){return C(w),x.return()}},{highWaterMark:2})},PI=65536,wre={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:xp}=V,Sre=(o)=>encodeURIComponent(o).replace(/%([0-9A-F]{2})/gi,(f,h)=>String.fromCharCode(parseInt(h,16))),BI=(o)=>{if(!V.isString(o))return o;try{return decodeURIComponent(o)}catch(f){return o}},DI=(o,...f)=>{try{return!!o(...f)}catch(h){return!1}},Tre=(o)=>{let f=o.indexOf("://"),h=o;if(f!==-1)h=h.slice(f+3);return h.includes("@")||h.includes(":")},Ere=(o)=>{let f=V.global!==void 0&&V.global!==null?V.global:globalThis,{ReadableStream:h,TextEncoder:y}=f;o=V.merge.call({skipUndefined:!0},{Request:f.Request,Response:f.Response},o);let{fetch:x,Request:_,Response:z}=o,C=x?xp(x):typeof fetch==="function",w=xp(_),S=xp(z);if(!C)return!1;let E=C&&xp(h),k=C&&(typeof y==="function"?((D)=>(U)=>D.encode(U))(new y):async(D)=>new Uint8Array(await new _(D).arrayBuffer())),O=w&&E&&DI(()=>{let D=!1,U=new _(Jt.origin,{body:new h,method:"POST",get duplex(){return D=!0,"half"}}),F=U.headers.has("Content-Type");if(U.body!=null)U.body.cancel();return D&&!F}),R=S&&E&&DI(()=>V.isReadableStream(new z("").body)),I={stream:R&&((D)=>D.body)};C&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach((D)=>{!I[D]&&(I[D]=(U,F)=>{let J=U&&U[D];if(J)return J.call(U);throw new ne(`Response type '${D}' is not supported`,ne.ERR_NOT_SUPPORT,F)})})})();let A=async(D)=>{if(D==null)return 0;if(V.isBlob(D))return D.size;if(V.isSpecCompliantForm(D))return(await new _(Jt.origin,{method:"POST",body:D}).arrayBuffer()).byteLength;if(V.isArrayBufferView(D)||V.isArrayBuffer(D))return D.byteLength;if(V.isURLSearchParams(D))D=D+"";if(V.isString(D))return(await k(D)).byteLength},M=async(D,U)=>{let F=V.toFiniteNumber(D.getContentLength());return F==null?A(U):F};return async(D)=>{let{url:U,method:F,data:J,signal:Q,cancelToken:te,timeout:le,onDownloadProgress:he,onUploadProgress:xe,responseType:Re,headers:me,withCredentials:Ae="same-origin",fetchOptions:We,maxContentLength:$e,maxBodyLength:De,maxRedirects:re}=IR(D),oe=V.isNumber($e)&&$e>-1,Ge=V.isNumber(De)&&De>-1,Bt=(Ne)=>V.hasOwnProp(D,Ne)?D[Ne]:void 0,Se=x||fetch;Re=Re?(Re+"").toLowerCase():"text";let Pe=xre([Q,te&&te.toAbortSignal()],le),Le=null,He=Pe&&Pe.unsubscribe&&(()=>{Pe.unsubscribe()}),st,Et=null,kt=()=>new ne("Request body larger than maxBodyLength limit",ne.ERR_BAD_REQUEST,D,Le);try{let Ne=void 0,qe=Bt("auth");if(qe){let Ue=V.getSafeProp(qe,"username")||"",Wt=V.getSafeProp(qe,"password")||"";Ne={username:Ue,password:Wt}}if(Tre(U)){let Ue=new URL(U,Jt.origin);if(!Ne&&(Ue.username||Ue.password)){let Wt=BI(Ue.username),be=BI(Ue.password);Ne={username:Wt,password:be}}if(Ue.username||Ue.password)Ue.username="",Ue.password="",U=Ue.href}if(Ne)me.delete("authorization"),me.set("Authorization","Basic "+btoa(Sre((Ne.username||"")+":"+(Ne.password||""))));if(oe&&typeof U==="string"&&U.startsWith("data:")){if(Gte(U)>$e)throw new ne("maxContentLength size of "+$e+" exceeded",ne.ERR_BAD_RESPONSE,D,Le)}if(Ge&&F!=="get"&&F!=="head"){let Ue=await A(J);if(typeof Ue==="number"&&isFinite(Ue)){if(st=Ue,Ue>De)throw kt()}}let at=Ge&&(V.isReadableStream(J)||V.isStream(J)),ut=(Ue,Wt,be)=>AI(Ue,PI,(Te)=>{if(Ge&&Te>De)throw Et=kt();Wt&&Wt(Te)},be);if(O&&F!=="get"&&F!=="head"&&(xe||at)){if(st=st==null?await M(me,J):st,st!==0||at){let Ue=new _(U,{method:"POST",body:J,duplex:"half"}),Wt;if(V.isFormData(J)&&(Wt=Ue.headers.get("content-type")))me.setContentType(Wt);if(Ue.body){let[be,Te]=xe&&Np(st,Na(jp(xe)))||[];J=ut(Ue.body,be,Te)}}}else if(at&&!w&&E&&F!=="get"&&F!=="head")J=ut(J);else if(at&&w&&!O&&F!=="get"&&F!=="head")throw new ne("Stream request bodies are not supported by the current fetch implementation",ne.ERR_NOT_SUPPORT,D,Le);if(!V.isString(Ae))Ae=Ae?"include":"omit";let Lt=w&&"credentials"in _.prototype;if(V.isFormData(J)){let Ue=me.getContentType();if(Ue&&/^multipart\/form-data/i.test(Ue)&&!/boundary=/i.test(Ue))me.delete("content-type")}me.set("User-Agent","axios/"+Dl,!1);let ct=We==null?We:Object.assign(Object.create(null),We);if(ct)delete ct.body,delete ct.headers,delete ct.method,delete ct.signal,delete ct.duplex,delete ct.credentials;let Fe=Object.assign(Object.create(null),ct,{signal:Pe,method:F.toUpperCase(),headers:ab(me.normalize()),body:J,duplex:"half",credentials:Lt?Ae:void 0});if(w){if(V.forEach(wre,(Ue,Wt)=>{if(Fe[Wt]===void 0)Fe[Wt]=Ue}),Fe.signal===void 0)Fe.signal=null;if(Fe.body===void 0)Fe.body=null}if(re===0){if(Fe.redirect="manual",ct)ct.redirect="manual"}Le=w&&new _(U,Fe);let et=await(w?Se(Le,ct):Se(U,Fe)),Rt=ur.from(et.headers);if(oe){let Ue=V.toFiniteNumber(Rt.getContentLength());if(Ue!=null&&Ue>$e)throw new ne("maxContentLength size of "+$e+" exceeded",ne.ERR_BAD_RESPONSE,D,Le)}let uo=R&&(Re==="stream"||Re==="response");if(R&&et.body&&(he||oe||uo&&He)){let Ue={};["status","statusText","headers"].forEach((vt)=>{Ue[vt]=et[vt]});let Wt=V.toFiniteNumber(Rt.getContentLength()),[be,Te]=he&&Np(Wt,Na(jp(he),!0))||[],Ke=0,sr=(vt)=>{if(oe){if(Ke=vt,Ke>$e)throw new ne("maxContentLength size of "+$e+" exceeded",ne.ERR_BAD_RESPONSE,D,Le)}be&&be(vt)};et=new z(AI(et.body,PI,sr,()=>{Te&&Te(),He&&He()}),Ue)}Re=Re||"text";let or=await I[V.findKey(I,Re)||"text"](et,D);if(oe&&!R&&!uo){let Ue;if(or!=null){if(typeof or.byteLength==="number")Ue=or.byteLength;else if(typeof or.size==="number")Ue=or.size;else if(typeof or==="string")Ue=typeof y==="function"?new y().encode(or).byteLength:or.length}if(typeof Ue==="number"&&Ue>$e)throw new ne("maxContentLength size of "+$e+" exceeded",ne.ERR_BAD_RESPONSE,D,Le)}return!uo&&He&&He(),await new Promise((Ue,Wt)=>{La(Ue,Wt,{data:or,headers:ur.from(et.headers),status:et.status,statusText:et.statusText,config:D,request:Le})})}catch(Ne){if(He&&He(),Pe&&Pe.aborted&&Pe.reason instanceof ne){let qe=Pe.reason;if(qe.config=D,Le&&(qe.request=Le),Ne!==qe)Object.defineProperty(qe,"cause",{__proto__:null,value:Ne,writable:!0,enumerable:!1,configurable:!0});throw qe}if(Et)throw Le&&!Et.request&&(Et.request=Le),Et;if(Ne instanceof ne)throw Le&&!Ne.request&&(Ne.request=Le),Ne;if(Ne&&Ne.name==="TypeError"&&/Load failed|fetch/i.test(Ne.message)){let qe=new ne("Network Error",ne.ERR_NETWORK,D,Le,Ne&&Ne.response);throw Object.defineProperty(qe,"cause",{__proto__:null,value:Ne.cause||Ne,writable:!0,enumerable:!1,configurable:!0}),qe}throw ne.from(Ne,Ne&&Ne.code,D,Le,Ne&&Ne.response)}}},kre=new Map,RR=(o)=>{let f=o&&o.env||{},{fetch:h,Request:y,Response:x}=f,_=[y,x,h],z=_.length,C=z,w,S,E=kre;while(C--)w=_[C],S=E.get(w),S===void 0&&E.set(w,S=C?new Map:Ere(f)),E=S;return S};RR();var pb={http:fre,xhr:vre,fetch:{get:RR}};V.forEach(pb,(o,f)=>{if(o){try{Object.defineProperty(o,"name",{__proto__:null,value:f})}catch(h){}Object.defineProperty(o,"adapterName",{__proto__:null,value:f})}});var LI=(o)=>`- ${o}`,Ore=(o)=>V.isFunction(o)||o===null||o===!1;function Ire(o,f){o=V.isArray(o)?o:[o];let{length:h}=o,y,x,_={};for(let z=0;z<h;z++){y=o[z];let C;if(x=y,!Ore(y)){if(x=pb[(C=String(y)).toLowerCase()],x===void 0)throw new ne(`Unknown adapter '${C}'`)}if(x&&(V.isFunction(x)||(x=x.get(f))))break;_[C||"#"+z]=x}if(!x){let z=Object.entries(_).map(([w,S])=>`adapter ${w} `+(S===!1?"is not supported by the environment":"is not available in the build")),C=h?z.length>1?`since :
84
+ `+z.map(LI).join(`
85
+ `):" "+LI(z[0]):"as no adapter specified";throw new ne("There is no suitable adapter to dispatch the request "+C,ne.ERR_NOT_SUPPORT)}return x}var AR={getAdapter:Ire,adapters:pb};function Zy(o){if(o.cancelToken)o.cancelToken.throwIfRequested();if(o.signal&&o.signal.aborted)throw new Ei(null,o)}function Yy(o){let f=V.toSafeFlatObject(o);if(Zy(f),f.headers=ur.from(V.getSafeProp(f,"headers")),f.data=Gy.call(f,f.transformRequest),["post","put","patch"].indexOf(f.method)!==-1)f.headers.setContentType("application/x-www-form-urlencoded",!1);return AR.getAdapter(f.adapter||Ml.adapter,f)(f).then(function(x){Zy(f),f.response=x;try{x.data=Gy.call(f,f.transformResponse,x)}finally{delete f.response}return x.headers=ur.from(x.headers),x},function(x){if(!lR(x)){if(Zy(f),x&&x.response){f.response=x.response;try{x.response.data=Gy.call(f,f.transformResponse,x.response)}finally{delete f.response}x.response.headers=ur.from(x.response.headers)}}return Promise.reject(x)})}var $p={};["object","boolean","number","function","string","symbol"].forEach((o,f)=>{$p[o]=function(y){return typeof y===o||"a"+(f<1?"n ":" ")+o}});var NI={};$p.transitional=function(f,h,y){function x(_,z){return"[Axios v"+Dl+"] Transitional option '"+_+"'"+z+(y?". "+y:"")}return(_,z,C)=>{if(f===!1)throw new ne(x(z," has been removed"+(h?" in "+h:"")),ne.ERR_DEPRECATED);if(h&&!NI[z])NI[z]=!0,console.warn(x(z," has been deprecated since v"+h+" and will be removed in the near future"));return f?f(_,z,C):!0}};$p.spelling=function(f){return(h,y)=>(console.warn(`${y} is likely a misspelling of ${f}`),!0)};function Rre(o,f,h){if(typeof o!=="object"||o===null)throw new ne("options must be an object",ne.ERR_BAD_OPTION_VALUE);let y=Object.keys(o),x=y.length;while(x-- >0){let _=y[x],z=Object.prototype.hasOwnProperty.call(f,_)?f[_]:void 0;if(z){let C=o[_],w=C===void 0||z(C,_,o);if(w!==!0)throw new ne("option "+_+" must be "+w,ne.ERR_BAD_OPTION_VALUE);continue}if(h!==!0)throw new ne("Unknown option "+_,ne.ERR_BAD_OPTION)}}var Op={assertOptions:Rre,validators:$p},Wr=Op.validators;class Si{constructor(o){this.defaults=o||{},this.interceptors={request:new eb,response:new eb}}async request(o,f){try{return await this._request(o,f)}catch(h){if(h instanceof Error)try{let y={};Error.captureStackTrace?Error.captureStackTrace(y):y=Error();let x=y.stack,_="";if(typeof x==="string"){let z=x.indexOf(`
86
+ `);_=z===-1?"":x.slice(z+1)}if(!h.stack)h.stack=_;else if(_){let z=_.indexOf(`
87
+ `),C=z===-1?-1:_.indexOf(`
88
+ `,z+1),w=C===-1?"":_.slice(C+1);if(!String(h.stack).endsWith(w))h.stack+=`
89
+ `+_}}catch(y){}throw h}}_request(o,f){if(typeof o==="string")f=f||{},f.url=o;else f=o||{};f=ws(this.defaults,f);let{transitional:h,paramsSerializer:y,headers:x}=f;if(h!==void 0)Op.assertOptions(h,{silentJSONParsing:Wr.transitional(Wr.boolean),forcedJSONParsing:Wr.transitional(Wr.boolean),clarifyTimeoutError:Wr.transitional(Wr.boolean),legacyInterceptorReqResOrdering:Wr.transitional(Wr.boolean),advertiseZstdAcceptEncoding:Wr.transitional(Wr.boolean),validateStatusUndefinedResolves:Wr.transitional(Wr.boolean)},!1);if(y!=null)if(V.isFunction(y))f.paramsSerializer={serialize:y};else Op.assertOptions(y,{encode:Wr.function,serialize:Wr.function},!0);if(f.allowAbsoluteUrls!==void 0);else if(this.defaults.allowAbsoluteUrls!==void 0)f.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls;else f.allowAbsoluteUrls=!0;Op.assertOptions(f,{baseUrl:Wr.spelling("baseURL"),withXsrfToken:Wr.spelling("withXSRFToken")},!0),f.method=(V.getSafeProp(f,"method")||V.getSafeProp(this.defaults,"method")||"get").toLowerCase();let _=x&&V.merge(x.common,x[f.method]);x&&V.forEach(cR.concat("common"),(R)=>{delete x[R]}),f.headers=ur.concat(_,x);let z=[],C=!0;this.interceptors.request.forEach(function(I){if(typeof I.runWhen==="function"&&I.runWhen(f)===!1)return;C=C&&I.synchronous;let A=f.transitional||Fp;if(A&&A.legacyInterceptorReqResOrdering)z.unshift(I.fulfilled,I.rejected);else z.push(I.fulfilled,I.rejected)});let w=[];this.interceptors.response.forEach(function(I){w.push(I.fulfilled,I.rejected)});let S,E=0,k;if(!C){let R=[Yy.bind(this),void 0];R.unshift(...z),R.push(...w),k=R.length,S=Promise.resolve(f);while(E<k)S=S.then(R[E++],R[E++]);return S}k=z.length;let O=f;while(E<k){let R=z[E++],I=z[E++];try{O=R?R(O):O}catch(A){if(!I){S=Promise.reject(A);break}try{let M=I.call(this,A);if(V.isThenable(M))S=Promise.resolve(M).then(()=>Yy.call(this,O))}catch(M){S=Promise.reject(M)}break}}if(!S)try{S=Yy.call(this,O)}catch(R){S=Promise.reject(R)}E=0,k=w.length;while(E<k)S=S.then(w[E++],w[E++]);return S}getUri(o){o=ws(this.defaults,o);let f=ub(o.baseURL,o.url,o.allowAbsoluteUrls,o);return cb(f,o.params,o.paramsSerializer)}}V.forEach(["delete","get","head","options"],function(f){Si.prototype[f]=function(h,y){return this.request(ws(y||{},{method:f,url:h,data:y&&V.hasOwnProp(y,"data")?y.data:void 0}))}});V.forEach(["post","put","patch","query"],function(f){function h(y){return function(_,z,C){return this.request(ws(C||{},{method:f,headers:y?{"Content-Type":"multipart/form-data"}:{},url:_,data:z}))}}if(Si.prototype[f]=h(),f!=="query")Si.prototype[f+"Form"]=h(!0)});class fb{constructor(o){if(typeof o!=="function")throw TypeError("executor must be a function.");let f;this.promise=new Promise(function(x){f=x});let h=this;this.promise.then((y)=>{if(!h._listeners)return;let x=h._listeners.length;while(x-- >0)h._listeners[x](y);h._listeners=null}),this.promise.then=(y)=>{let x,_=new Promise((z)=>{h.subscribe(z),x=z}).then(y);return _.cancel=function(){h.unsubscribe(x)},_},o(function(x,_,z){if(h.reason)return;h.reason=new Ei(x,_,z),f(h.reason)})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(o){if(this.reason){o(this.reason);return}if(this._listeners)this._listeners.push(o);else this._listeners=[o]}unsubscribe(o){if(!this._listeners)return;let f=this._listeners.indexOf(o);if(f!==-1)this._listeners.splice(f,1)}toAbortSignal(){let o=new AbortController,f=(h)=>{o.abort(h)};return this.subscribe(f),o.signal.unsubscribe=()=>this.unsubscribe(f),o.signal}static source(){let o;return{token:new fb(function(y){o=y}),cancel:o}}}function Are(o){return function(h){return o.apply(null,h)}}function Pre(o){return V.isObject(o)&&o.isAxiosError===!0}var Ap={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ap).forEach(([o,f])=>{if(Ap[f]===void 0)Ap[f]=o});function PR(o){let f=new Si(o),h=$I(Si.prototype.request,f);return V.extend(h,Si.prototype,f,{allOwnKeys:!0}),V.extend(h,f,null,{allOwnKeys:!0}),h.create=function(x){return PR(ws(o,x))},h}var dr=PR(Ml);dr.Axios=Si;dr.CanceledError=Ei;dr.CancelToken=fb;dr.isCancel=lR;dr.VERSION=Dl;dr.toFormData=qp;dr.AxiosError=ne;dr.Cancel=dr.CanceledError;dr.all=function(f){return Promise.all(f)};dr.spread=Are;dr.isAxiosError=Pre;dr.mergeConfig=ws;dr.AxiosHeaders=ur;dr.formToJSON=(o)=>aR(V.isHTMLForm(o)?new FormData(o):o);dr.getAdapter=AR.getAdapter;dr.HttpStatusCode=Ap;dr.default=dr;BR.exports=dr});var DR=i(function(qa){var Bre=qa&&qa.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(qa,"__esModule",{value:!0});qa.isValidUrl=Lre;qa.checkUrlExists=Nre;var Dre=Bre(Ss());function Lre(o){try{return new URL(o),!0}catch{return!1}}async function Nre(o){return Dre.default.request({url:o,method:"HEAD"}).then((f)=>f.status)}});var se=i(function(Xt){var jre=Xt&&Xt.__createBinding||(Object.create?function(o,f,h,y){if(y===void 0)y=h;var x=Object.getOwnPropertyDescriptor(f,h);if(!x||("get"in x?!f.__esModule:x.writable||x.configurable))x={enumerable:!0,get:function(){return f[h]}};Object.defineProperty(o,y,x)}:function(o,f,h,y){if(y===void 0)y=h;o[y]=f[h]}),Pr=Xt&&Xt.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))jre(f,o,h)};Object.defineProperty(Xt,"__esModule",{value:!0});Pr(Sd(),Xt);Pr(i1(),Xt);Pr(eE(),Xt);Pr(sE(),Xt);Pr(dE(),Xt);Pr(hE(),Xt);Pr(fl(),Xt);Pr(sp(),Xt);Pr(xE(),Xt);Pr(zE(),Xt);Pr(wE(),Xt);Pr(kE(),Xt);Pr(og(),Xt);Pr(IE(),Xt);Pr(AE(),Xt);Pr(DE(),Xt);Pr(DR(),Xt)});var Vp=i(function(NR){Object.defineProperty(NR,"__esModule",{value:!0});NR.timeout=$re;var qre=se(),Fre=1e4,Ure=qre.createLogger({package:"resilience",messageContext:"timeout"});function $re(o=Fre){if(o<=0)throw Error("Timeout must be greater than 0.");if(o<10)Ure.warn(`The timeout of ${o} ms is too low. Make sure this is not intentional.`);return function(f){let h=`Request to URL: ${f.context.uri} ran into a timeout after ${o}ms.`;return(y)=>Hre(f.fn(y),o,h)}}function Vre(o,f){let h;return[new Promise((x,_)=>{h=setTimeout(()=>_(Error(f)),o)}),h]}async function Hre(o,f,h){let[y,x]=Vre(f,h),_=o.finally(()=>{clearTimeout(x)});return Promise.race([_,y])}});var MR=i(function(e2e,jR){function jo(o,f){if(typeof f==="boolean")f={forever:f};if(this._originalTimeouts=JSON.parse(JSON.stringify(o)),this._timeouts=o,this._options=f||{},this._maxRetryTime=f&&f.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever)this._cachedTimeouts=this._timeouts.slice(0)}jR.exports=jo;jo.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};jo.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);if(this._timer)clearTimeout(this._timer);this._timeouts=[],this._cachedTimeouts=null};jo.prototype.retry=function(o){if(this._timeout)clearTimeout(this._timeout);if(!o)return!1;var f=new Date().getTime();if(o&&f-this._operationStart>=this._maxRetryTime)return this._errors.push(o),this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(o);var h=this._timeouts.shift();if(h===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),h=this._cachedTimeouts.slice(-1);else return!1;var y=this;if(this._timer=setTimeout(function(){if(y._attempts++,y._operationTimeoutCb){if(y._timeout=setTimeout(function(){y._operationTimeoutCb(y._attempts)},y._operationTimeout),y._options.unref)y._timeout.unref()}y._fn(y._attempts)},h),this._options.unref)this._timer.unref();return!0};jo.prototype.attempt=function(o,f){if(this._fn=o,f){if(f.timeout)this._operationTimeout=f.timeout;if(f.cb)this._operationTimeoutCb=f.cb}var h=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){h._operationTimeoutCb()},h._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};jo.prototype.try=function(o){console.log("Using RetryOperation.try() is deprecated"),this.attempt(o)};jo.prototype.start=function(o){console.log("Using RetryOperation.start() is deprecated"),this.attempt(o)};jo.prototype.start=jo.prototype.try;jo.prototype.errors=function(){return this._errors};jo.prototype.attempts=function(){return this._attempts};jo.prototype.mainError=function(){if(this._errors.length===0)return null;var o={},f=null,h=0;for(var y=0;y<this._errors.length;y++){var x=this._errors[y],_=x.message,z=(o[_]||0)+1;if(o[_]=z,z>=h)f=x,h=z}return f}});var FR=i(function(hb){var Kre=MR();hb.operation=function(o){var f=hb.timeouts(o);return new Kre(f,{forever:o&&(o.forever||o.retries===1/0),unref:o&&o.unref,maxRetryTime:o&&o.maxRetryTime})};hb.timeouts=function(o){if(o instanceof Array)return[].concat(o);var f={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var h in o)f[h]=o[h];if(f.minTimeout>f.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var y=[];for(var x=0;x<f.retries;x++)y.push(this.createTimeout(x,f));if(o&&o.forever&&!y.length)y.push(this.createTimeout(x,f));return y.sort(function(_,z){return _-z}),y};hb.createTimeout=function(o,f){var h=f.randomize?Math.random()+1:1,y=Math.round(h*Math.max(f.minTimeout,1)*Math.pow(f.factor,o));return y=Math.min(y,f.maxTimeout),y};hb.wrap=function(o,f,h){if(f instanceof Array)h=f,f=null;if(!h){h=[];for(var y in o)if(typeof o[y]==="function")h.push(y)}for(var x=0;x<h.length;x++){var _=h[x],z=o[_];o[_]=function(w){var S=hb.operation(f),E=Array.prototype.slice.call(arguments,1),k=E.pop();E.push(function(O){if(S.retry(O))return;if(O)arguments[0]=S.mainError();k.apply(this,arguments)}),S.attempt(function(){w.apply(o,E)})}.bind(o,z),o[_].options=f}}});var mb=i(function(r2e,UR){var Yre=FR();function Xre(o,f){function h(y,x){var _=f||{},z;if(!("randomize"in _))_.randomize=!0;z=Yre.operation(_);function C(E){x(E||Error("Aborted"))}function w(E,k){if(E.bail){C(E);return}if(!z.retry(E))x(z.mainError());else if(_.onRetry)_.onRetry(E,k)}function S(E){var k;try{k=o(C,E)}catch(O){w(O,E);return}Promise.resolve(k).then(y).catch(function(R){w(R,E)})}z.attempt(S)}return new Promise(h)}UR.exports=Xre});var Hp=i(function(Qn){var Qre=Qn&&Qn.__createBinding||(Object.create?function(o,f,h,y){if(y===void 0)y=h;var x=Object.getOwnPropertyDescriptor(f,h);if(!x||("get"in x?!f.__esModule:x.writable||x.configurable))x={enumerable:!0,get:function(){return f[h]}};Object.defineProperty(o,y,x)}:function(o,f,h,y){if(y===void 0)y=h;o[y]=f[h]}),eoe=Qn&&Qn.__setModuleDefault||(Object.create?function(o,f){Object.defineProperty(o,"default",{enumerable:!0,value:f})}:function(o,f){o.default=f}),toe=Qn&&Qn.__importStar||function(){var o=function(f){return o=Object.getOwnPropertyNames||function(h){var y=[];for(var x in h)if(Object.prototype.hasOwnProperty.call(h,x))y[y.length]=x;return y},o(f)};return function(f){if(f&&f.__esModule)return f;var h={};if(f!=null){for(var y=o(f),x=0;x<y.length;x++)if(y[x]!=="default")Qre(h,f,y[x])}return eoe(h,f),h}}();Object.defineProperty(Qn,"__esModule",{value:!0});Qn.retry=soe;var $R=se(),roe=toe(mb()),ooe=Ss(),noe=$R.createLogger({package:"resilience",messageContext:"retry"}),ioe=3;function soe(o=ioe){if(o<0)throw Error("Number of retries must be greater or equal to 0.");return function(f){return(h)=>roe.default(async(y)=>{try{return await f.fn(h)}catch(x){let _=ooe.isAxiosError(x)?x.response?.status:void 0;if(!_)noe.debug("HTTP request failed but error did not contain a response status field as expected. Rethrowing error.");else if(_.toString().startsWith("4")){y(new $R.ErrorWithCause(`Request failed with status code ${_}`,x));return}throw x}},{retries:o})}}});var HR=i(function(VR){Object.defineProperty(VR,"__esModule",{value:!0});VR.executeWithMiddleware=aoe;function aoe(o,{fn:f,context:h,fnArgument:y}){if(!o?.length)return f(y);return coe(o,{context:h,fn:f})(y)}function coe(o,f){let{context:h}=f;return o.reduceRight((x,_)=>({fn:_(x),context:h}),f).fn}});var ZR=i(function(WR,JR){var On=Symbol("window"),Gp=Symbol("buckets"),GR=Symbol("timeout"),gb=Symbol("percentiles"),Kp=Symbol("bucket-interval"),Wp=Symbol("snapshot-interval"),Jp=Symbol("rotate-event-name"),uoe=c("events").EventEmitter;class KR extends uoe{constructor(o){super();this[Gp]=o.rollingCountBuckets||10,this[GR]=o.rollingCountTimeout||1e4,this[On]=Array(this[Gp]),this[gb]=[0,0.25,0.5,0.75,0.9,0.95,0.99,0.995,1],this[Jp]="rotate",this.rollingPercentilesEnabled=o.rollingPercentilesEnabled!==!1,this.enableSnapshots=o.enableSnapshots!==!1,this.rotateBucketController=o.rotateBucketController,this.rotateBucket=doe(this[On]);for(let h=0;h<this[Gp];h++)this[On][h]=Yp();let f=Math.floor(this[GR]/this[Gp]);if(this.rotateBucketController)this.startListeneningForRotateEvent();else if(this[Kp]=setInterval(this.rotateBucket,f),typeof this[Kp].unref==="function")this[Kp].unref();if(this.enableSnapshots){if(this[Wp]=setInterval((h)=>this.emit("snapshot",this.stats),f),typeof this[Wp].unref==="function")this[Wp].unref()}if(o.stats)this[On][0]={...Yp(),...o.stats}}get stats(){let o=this[On].reduce((f,h)=>{if(!h)return f;if(Object.keys(f).forEach((y)=>{if(y!=="latencyTimes"&&y!=="percentiles")f[y]+=h[y]||0}),this.rollingPercentilesEnabled){if(h.latencyTimes)f.latencyTimes=f.latencyTimes.concat(h.latencyTimes)}return f},Yp());if(this.rollingPercentilesEnabled){if(o.latencyTimes.sort((f,h)=>f-h),o.latencyTimes.length)o.latencyMean=o.latencyTimes.reduce((f,h)=>f+h,0)/o.latencyTimes.length;else o.latencyMean=0;this[gb].forEach((f)=>{o.percentiles[f]=poe(f,o.latencyTimes)})}else o.latencyMean=-1,this[gb].forEach((f)=>{o.percentiles[f]=-1});return o}get window(){return this[On].slice()}increment(o,f){if(this[On][0][o]++,o==="successes"||o==="failures"||o==="timeouts")this[On][0].latencyTimes.push(f||0)}open(){this[On][0].isCircuitBreakerOpen=!0}close(){this[On][0].isCircuitBreakerOpen=!1}shutdown(){if(this.removeAllListeners(),this.rotateBucketController===void 0)clearInterval(this[Kp]);else this.removeRotateBucketControllerListener();if(this.enableSnapshots)clearInterval(this[Wp])}removeRotateBucketControllerListener(){if(this.rotateBucketController)this.rotateBucketController.removeListener(this[Jp],this.rotateBucket)}startListeneningForRotateEvent(){if(this.rotateBucketController&&this.rotateBucketController.listenerCount(this[Jp],this.rotateBucket)===0)this.rotateBucketController.on(this[Jp],this.rotateBucket)}}var doe=(o)=>(f)=>{o.pop(),o.unshift(Yp())},Yp=(o)=>({failures:0,fallbacks:0,successes:0,rejects:0,fires:0,timeouts:0,cacheHits:0,cacheMisses:0,coalesceCacheHits:0,coalesceCacheMisses:0,semaphoreRejections:0,percentiles:{},latencyTimes:[]});function poe(o,f){if(o===0)return f[0]||0;let h=Math.ceil(o*f.length);return f[h-1]||0}JR.exports=WR=KR});var QR=i(function(YR,XR){XR.exports=YR=foe;function foe(o){let f=[],h=o,y={take:x,release:_,test:z};return Object.defineProperty(y,"count",{get:(C)=>h,enumerable:!0}),y;function x(C){if(h>0)return--h,Promise.resolve(_);return new Promise((w,S)=>{if(f.push((E)=>{--h,w(_)}),C)setTimeout((E)=>{f.shift();let k=Error(`Timed out after ${C}ms`);k.code="ETIMEDOUT",S(k)},C)})}function _(){if(h++,f.length>0)f.shift()()}function z(){if(h<1)return!1;return x()&&!0}}});var oA=i(function(tA,rA){class eA{constructor(o){this.cache=new Map,this.maxEntries=o??16777215}get(o){let f=this.cache.get(o);if(f){if(f.expiresAt>Date.now()||f.expiresAt===0)return f.value;this.cache.delete(o)}return}set(o,f,h){if(this.cache.size===this.maxEntries&&this.get(o)===void 0)this.cache.delete(this.cache.keys().next().value);this.cache.set(o,{expiresAt:h,value:f})}delete(o){this.cache.delete(o)}flush(){this.cache.clear()}}rA.exports=tA=eA});var pA=i(function(uA,dA){var hoe=c("events"),Xp=ZR(),moe=QR(),nA=oA(),Eo=Symbol("state"),ql=Symbol("open"),Ts=Symbol("closed"),Fa=Symbol("half-open"),Es=Symbol("pending-close"),Fl=Symbol("shutdown"),Vl=Symbol("fallback"),ki=Symbol("status"),yb=Symbol("name"),iA=Symbol("group"),Ua=Symbol("Enabled"),$a=Symbol("warming-up"),sA=Symbol("volume-threshold"),cA=Symbol("our-error"),Ul=Symbol("reset-timeout"),bb=Symbol("warmup-timeout"),aA=Symbol("last-timer-at");class vb extends hoe{static isOurError(o){return!!o[cA]}static newStatus(o){return new Xp(o)}constructor(o,f={}){super();if(this.options=f,this.options.timeout=f.timeout??1e4,this.options.resetTimeout=f.resetTimeout??30000,this.options.errorThresholdPercentage=f.errorThresholdPercentage??50,this.options.rollingCountTimeout=f.rollingCountTimeout??1e4,this.options.rollingCountBuckets=f.rollingCountBuckets??10,this.options.rollingPercentilesEnabled=f.rollingPercentilesEnabled!==!1,this.options.capacity=Number.isInteger(f.capacity)?f.capacity:Number.MAX_SAFE_INTEGER,this.options.errorFilter=f.errorFilter||((_)=>!1),this.options.cacheTTL=f.cacheTTL??0,this.options.cacheGetKey=f.cacheGetKey??((..._)=>JSON.stringify(_)),this.options.enableSnapshots=f.enableSnapshots!==!1,this.options.rotateBucketController=f.rotateBucketController,this.options.coalesce=!!f.coalesce,this.options.coalesceTTL=f.coalesceTTL??this.options.timeout,this.options.coalesceResetOn=f.coalesceResetOn?.filter((_)=>["error","success","timeout"].includes(_))||[],this.options.cache){if(this.options.cacheTransport===void 0)this.options.cacheTransport=new nA(f.cacheSize);else if(typeof this.options.cacheTransport!=="object"||!this.options.cacheTransport.get||!this.options.cacheTransport.set||!this.options.cacheTransport.flush)throw TypeError("options.cacheTransport should be an object with `get`, `set` and `flush` methods")}if(this.options.coalesce)this.options.coalesceCache=new nA(f.coalesceSize);if(this.semaphore=new moe(this.options.capacity),!o)throw TypeError("No action provided. Cannot construct a CircuitBreaker without an invocable action.");if(f.autoRenewAbortController&&!f.abortController)f.abortController=new AbortController;if(f.abortController&&typeof f.abortController.abort!=="function")throw TypeError("AbortController does not contain `abort()` method");if(this[sA]=Number.isInteger(f.volumeThreshold)?f.volumeThreshold:0,this[$a]=f.allowWarmUp===!0,this.options.status)if(this.options.status instanceof Xp)this[ki]=this.options.status;else this[ki]=new Xp({stats:this.options.status});else this[ki]=new Xp(this.options);if(this[Eo]=Ts,f.state)this[Ua]=f.state.enabled!==!1,this[$a]=f.state.warmUp||this[$a],this[Ts]=f.state.closed!==!1,this[Fa]=this[Es]=f.state.halfOpen||!1,this[ql]=!this[Ts]&&!this[Fa],this[Fl]=f.state.shutdown||!1;else this[Es]=!1,this[Ua]=f.enabled!==!1;if(this[Vl]=null,this[yb]=f.name||o.name||yoe(),this[iA]=f.group||this[yb],this[$a]){let _=this[bb]=setTimeout((z)=>this[$a]=!1,this.options.rollingCountTimeout);if(typeof _.unref==="function")_.unref()}if(typeof o!=="function")this.action=(_)=>Promise.resolve(o);else this.action=o;if(f.maxFailures)console.error("options.maxFailures is deprecated. Please use options.errorThresholdPercentage");let h=(_)=>(z,C)=>this[ki].increment(_,C);this.on("success",h("successes")),this.on("failure",h("failures")),this.on("fallback",h("fallbacks")),this.on("timeout",h("timeouts")),this.on("fire",h("fires")),this.on("reject",h("rejects")),this.on("cacheHit",h("cacheHits")),this.on("cacheMiss",h("cacheMisses")),this.on("coalesceCacheHit",h("coalesceCacheHits")),this.on("coalesceCacheMiss",h("coalesceCacheMisses")),this.on("open",(_)=>this[ki].open()),this.on("close",(_)=>this[ki].close()),this.on("semaphoreLocked",h("semaphoreRejections"));function y(_){return _[aA]=Date.now(),(z)=>{let C=_[Ul]=setTimeout(()=>{x(_)},_.options.resetTimeout);if(typeof C.unref==="function")C.unref()}}function x(_){_[Eo]=Fa,_[Es]=!0,_._renewAbortControllerIfNeeded(),_.emit("halfOpen",_.options.resetTimeout)}if(this.on("open",y(this)),this.on("success",(_)=>{if(this.halfOpen)this.close()}),this[Fl])this[Eo]=Fl,this.shutdown();else if(this[Ts])this.close();else if(this[ql])if(this.options.state.lastTimerAt!==void 0&&Date.now()-this.options.state.lastTimerAt>this.options.resetTimeout)x(this);else this.open();else if(this[Fa])this[Eo]=Fa}_renewAbortControllerIfNeeded(){if(this.options.autoRenewAbortController&&this.options.abortController&&this.options.abortController.signal.aborted)this.options.abortController=new AbortController}close(){if(this[Eo]!==Ts){if(this[Ul])clearTimeout(this[Ul]);this[Eo]=Ts,this[Es]=!1,this._renewAbortControllerIfNeeded(),this.emit("close")}}open(){if(this[Eo]!==ql)this[Eo]=ql,this[Es]=!1,this.emit("open")}shutdown(){if(this.emit("shutdown"),this.disable(),this.removeAllListeners(),this[Ul])clearTimeout(this[Ul]);if(this[bb])clearTimeout(this[bb]);this.status.shutdown(),this[Eo]=Fl,this.clearCache()}get isShutdown(){return this[Eo]===Fl}get name(){return this[yb]}get group(){return this[iA]}get pendingClose(){return this[Es]}get closed(){return this[Eo]===Ts}get opened(){return this[Eo]===ql}get halfOpen(){return this[Eo]===Fa}get status(){return this[ki]}get stats(){return this[ki].stats}toJSON(){return{state:{name:this.name,enabled:this.enabled,closed:this.closed,open:this.opened,halfOpen:this.halfOpen,warmUp:this.warmUp,shutdown:this.isShutdown,lastTimerAt:this[aA]},status:this.status.stats}}get enabled(){return this[Ua]}get warmUp(){return this[$a]}get volumeThreshold(){return this[sA]}fallback(o){let f=o;if(o instanceof vb)f=(...h)=>o.fire(...h);return this[Vl]=f,this}fire(...o){return this.call(this.action,...o)}call(o,...f){if(this.isShutdown){let C=ef("The circuit has been shutdown.","ESHUTDOWN");return Promise.reject(C)}let h=f.slice();if(this.emit("fire",h),!this[Ua]){let C=this.action.apply(o,h);return typeof C.then==="function"?C:Promise.resolve(C)}let y=this.options.cache||this.options.coalesce?this.options.cacheGetKey.apply(this,f):"";if(this.options.cache){let C=this.options.cacheTransport.get(y);if(C)return this.emit("cacheHit"),C;this.emit("cacheMiss")}if(this.options.coalesce){let C=this.options.coalesceCache.get(y);if(C)return this.emit("coalesceCacheHit"),C;this.emit("coalesceCacheMiss")}if(!this.closed&&!this.pendingClose){let C=ef("Breaker is open","EOPENBREAKER");return this.emit("reject",C),lA(this,C,h)||Promise.reject(C)}this[Es]=!1;let x,_=!1,z=new Promise((C,w)=>{let S=Date.now();if(this.semaphore.test()){if(this.options.timeout)x=setTimeout(()=>{_=!0;let E=ef(`Timed out after ${this.options.timeout}ms`,"ETIMEDOUT"),k=Date.now()-S;if(this.semaphore.release(),this.emit("timeout",E,k,h),Qp(E,this,x,h,k,C,w),$l(this,y,"timeout"),this.options.abortController)this.options.abortController.abort()},this.options.timeout);try{let E=this.action.apply(o,h),k=typeof E.then==="function"?E:Promise.resolve(E);k.then((O)=>{if(!_){if(clearTimeout(x),this.emit("success",O,Date.now()-S),$l(this,y,"success"),this.semaphore.release(),C(O),this.options.cache)this.options.cacheTransport.set(y,k,this.options.cacheTTL>0?Date.now()+this.options.cacheTTL:0)}}).catch((O)=>{if(!_){this.semaphore.release();let R=Date.now()-S;Qp(O,this,x,h,R,C,w),$l(this,y,"error")}})}catch(E){this.semaphore.release();let k=Date.now()-S;Qp(E,this,x,h,k,C,w),$l(this,y,"error")}}else{let E=Date.now()-S,k=ef("Semaphore locked","ESEMLOCKED");this.emit("semaphoreLocked",k,E),Qp(k,this,x,h,E,C,w),$l(this,y)}});if(this.options.coalesce)this.options.coalesceCache.set(y,z,this.options.coalesceTTL>0?Date.now()+this.options.coalesceTTL:0);return z}clearCache(){if(this.options.cache)this.options.cacheTransport.flush();if(this.options.coalesceCache)this.options.coalesceCache.flush()}healthCheck(o,f){if(f=f||5000,typeof o!=="function")throw TypeError("Health check function must be a function");if(isNaN(f))throw TypeError("Health check interval must be a number");let h=(x)=>{o.apply(this).catch((_)=>{this.emit("healthCheckFailed",_),this.open()})},y=setInterval(h,f);if(typeof y.unref==="function")y.unref();h()}enable(){this[Ua]=!0,this.status.startListeneningForRotateEvent()}disable(){this[Ua]=!1,this.status.removeRotateBucketControllerListener()}getSignal(){if(this.options.abortController&&this.options.abortController.signal)return this.options.abortController.signal;return}getAbortController(){return this.options.abortController}}function Qp(o,f,h,y,x,_,z){if(clearTimeout(h),f.options.errorFilter(o,...y))f.emit("success",o,x);else{goe(f,o,y,x);let C=lA(f,o,y);if(C)return _(C)}z(o)}function lA(o,f,h){if(o[Vl])try{let y=o[Vl].apply(o[Vl],[...h,f]);if(o.emit("fallback",y,f),y instanceof Promise)return y;return Promise.resolve(y)}catch(y){return Promise.reject(y)}}function goe(o,f,h,y){if(o.emit("failure",f,y,h),o.warmUp)return;let x=o.stats;if(x.fires<o.volumeThreshold&&!o.halfOpen)return;if(x.failures/x.fires*100>o.options.errorThresholdPercentage||o.halfOpen)o.open()}function $l(o,f,h){if(!h||o.options.coalesceResetOn.includes(h))o.options.coalesceCache?.delete(f)}function ef(o,f){let h=Error(o);return h.code=f,h[cA]=!0,h}var yoe=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(o)=>{let f=Math.random()*16|0;return(o==="x"?f:f&3|8).toString(16)});dA.exports=uA=vb});var mA=i(function(fA,hA){hA.exports=fA=pA()});var tf=i(function(ko){var boe=ko&&ko.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(ko,"__esModule",{value:!0});ko.circuitBreakerDefaultOptions=ko.circuitBreakers=void 0;ko.circuitBreaker=Coe;var voe=boe(mA()),xoe=Ss();ko.circuitBreakers={};ko.circuitBreakerDefaultOptions={timeout:!1,errorThresholdPercentage:50,volumeThreshold:10,resetTimeout:30000,cache:!1};function _oe(o){return xoe.isAxiosError(o)&&!!o.response?.status&&o.response.status.toString().startsWith("4")}function zoe({uri:o,tenantId:f="tenant_id"}){return`${o}::${f}`}function Coe(){return woe(zoe,_oe)}function woe(o,f){return(h)=>(y)=>Soe(o(h.context),f).fire(h.fn,y)}function Soe(o,f){if(!ko.circuitBreakers[o])ko.circuitBreakers[o]=new voe.default(Toe,{...ko.circuitBreakerDefaultOptions,errorFilter:f});return ko.circuitBreakers[o]}function Toe(o,...f){return o(...f)}});var xb=i(function(bA){Object.defineProperty(bA,"__esModule",{value:!0});bA.resilience=Ooe;var gA=Vp(),yA=Hp(),Eoe=tf(),koe={retry:!1,timeout:!0,circuitBreaker:!0};function Ooe(o){let f={...koe,...o},h=[];if(typeof f.retry==="number")h.push(yA.retry(f.retry));else if(f.retry)h.push(yA.retry());if(f.circuitBreaker)h.push(Eoe.circuitBreaker());if(typeof f.timeout==="number")h.push(gA.timeout(f.timeout));else if(f.timeout)h.push(gA.timeout());return h}});var Va=i(function(cn){var Roe=cn&&cn.__createBinding||(Object.create?function(o,f,h,y){if(y===void 0)y=h;var x=Object.getOwnPropertyDescriptor(f,h);if(!x||("get"in x?!f.__esModule:x.writable||x.configurable))x={enumerable:!0,get:function(){return f[h]}};Object.defineProperty(o,y,x)}:function(o,f,h,y){if(y===void 0)y=h;o[y]=f[h]}),Hl=cn&&cn.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))Roe(f,o,h)};Object.defineProperty(cn,"__esModule",{value:!0});Hl(Vp(),cn);Hl(Hp(),cn);Hl(HR(),cn);Hl(tf(),cn);Hl(xb(),cn)});var of=i(function(In){var Aoe=In&&In.__createBinding||(Object.create?function(o,f,h,y){if(y===void 0)y=h;var x=Object.getOwnPropertyDescriptor(f,h);if(!x||("get"in x?!f.__esModule:x.writable||x.configurable))x={enumerable:!0,get:function(){return f[h]}};Object.defineProperty(o,y,x)}:function(o,f,h,y){if(y===void 0)y=h;o[y]=f[h]}),Poe=In&&In.__setModuleDefault||(Object.create?function(o,f){Object.defineProperty(o,"default",{enumerable:!0,value:f})}:function(o,f){o.default=f}),Boe=In&&In.__importStar||function(){var o=function(f){return o=Object.getOwnPropertyNames||function(h){var y=[];for(var x in h)if(Object.prototype.hasOwnProperty.call(h,x))y[y.length]=x;return y},o(f)};return function(f){if(f&&f.__esModule)return f;var h={};if(f!=null){for(var y=o(f),x=0;x<y.length;x++)if(y[x]!=="default")Aoe(h,f,y[x])}return Poe(h,f),h}}();Object.defineProperty(In,"__esModule",{value:!0});In.csrf=Loe;In.buildCsrfFetchHeaders=zA;var vA=c("url"),ln=se(),xA=Boe(Ss()),Doe=Va(),rf=ln.createLogger("csrf-middleware");function Loe(o){return(f)=>async(h)=>{if(!Noe(h))return f.fn(h);let y=await Uoe(h,{...o,...f});if(y?.cookie)y.cookie=h.headers?.cookie?[h.headers?.cookie,y?.cookie].join(";"):y?.cookie;return h.headers={...h.headers,...y},f.fn(h)}}function Noe(o){if(o.method.toLowerCase()==="get")return rf.debug("Method is GET no CSRF token needed."),!1;if(ln.pickValueIgnoreCase(o.headers,"x-csrf-token"))return rf.debug("CSRF token header was already provided. Existing token used."),!1;return!0}function joe(o){if(!o.url)o.url="/";else if(!o.url.endsWith("/"))o.url=`${o.url}/`;return o}function Moe(o){if(o.url.endsWith("/"))o.url=ln.removeTrailingSlashes(o.url);return o}function qoe(o){return Object.values(ln.pickIgnoreCase(o,"x-csrf-token"))[0]}function _A(o){let f=Object.values(ln.pickIgnoreCase(o,"set-cookie"));return ln.flatten(f).map((h)=>h.split(";")[0]).join(";")}function zA(o){let f=ln.first(Object.keys(ln.pickIgnoreCase(o,"content-length")))||"content-length";return{"x-csrf-token":"Fetch",...o,[f]:0}}async function _b(o,f){try{let h=await Doe.executeWithMiddleware(f.middleware,{fn:xA.default.request,fnArgument:o,context:f.context});return zb(h.headers)}catch(h){if((0,xA.isAxiosError)(h)&&zb(h.response?.headers))return zb(h.response?.headers);rf.warn(new ln.ErrorWithCause(`Failed to get CSRF token from URL: ${o.url}.`,h))}}function zb(o){if(!o)return;let f=qoe(o);if(!f)return;let h=_A(o)?{cookie:_A(o)}:{};return{"x-csrf-token":f,...h}}function Foe(o,f){if(!o||!f)return!1;if(!ln.isValidUrl(o)||!ln.isValidUrl(f))return!1;return new vA.URL(o).hostname!==new vA.URL(f).hostname}async function Uoe(o,f){let{data:h,params:y,parameterEncoder:x,..._}=o;if(Foe(f.url,o.baseURL))rf.warn(`The CSRF token fetch URL (${f.url}) has a different host than the request URL (${o.baseURL}). Sensitive headers will be forwarded to the CSRF token endpoint.`);let z={..._,method:f.method||"head",url:f.url||o.url,headers:zA(o.headers)};if(f.url)return _b(z,f);return await _b(joe(z),f)??await _b(Moe(z),f)}});var EA=i(function(SA){Object.defineProperty(SA,"__esModule",{value:!0});SA.compressorsCache=void 0;SA.compress=Goe;var nf=c("node:util"),Gl=se(),CA=Gl.createLogger({package:"http-client",messageContext:"compress-request-middleware"});function $oe(){return SA.compressorsCache??=(async()=>{let o=await import("node:zlib").catch(()=>({}));return{...o.brotliCompress&&{brotli:nf.promisify(o.brotliCompress)},...o.gzip&&{gzip:nf.promisify(o.gzip)},...o.deflate&&{deflate:nf.promisify(o.deflate)},...o.zstdCompress&&{zstd:nf.promisify(o.zstdCompress)}}})()}function wA(o){return Object.keys(o).length?Object.keys(o).join(", "):"N/A"}function Voe(o,f){let h=f?.mode??"auto";if(h==="header-only"||h==="never")return!1;if(h==="always")return!0;let y;try{y=Buffer.byteLength(o)}catch(w){return CA.error(new Gl.ErrorWithCause("Could not determine payload size for 'auto' compression decision. Payload will not be compressed.",w)),!1}let x=f?.autoCompressMinSize??1024,_=y>=x,z=_?">=":"<",C=_?"Compressing":"Skipping compression";return CA.debug(`Auto compression: payload size ${y} bytes ${z} threshold ${x} bytes. ${C}.`),_}function Hoe(o){switch(o){case"brotli":return"br";case void 0:case"gzip":return"gzip";default:return o}}function Goe(o){return(f)=>async(h)=>{let y=o?.algorithm??"gzip",x=Voe(h.data,o),_=o?.mode??"auto";if(!x&&_!=="header-only")return f.fn(h);let z=Gl.pickValueIgnoreCase(h.headers,"content-encoding"),C=Hoe(y),w=z?`${z}, ${C}`:C;if(h.headers=Gl.mergeIgnoreCase(h.headers,{"content-encoding":w}),_==="header-only")return f.fn(h);let S=await $oe(),E=S[y];if(!E){if(!Object.keys(S).length)throw Error(`No compression algorithms are available in this environment. Cannot apply '${y}' compression.`);if(y==="zstd")throw Error(`'zstd' compression is not supported in this environment. On Node.js, it requires v22.15.0 or higher. Supported algorithms are: ${wA(S)}.`);throw Error(`Unsupported compression algorithm '${y}'. Supported algorithms are: ${wA(S)}.`)}let k=await E(h.data,o?.compressOptions).catch((O)=>{throw new Gl.ErrorWithCause(`Failed to compress request payload using '${y}'.`,O)});return h.data=k,f.fn(h)}}});var sf=i(function(Ha){Object.defineProperty(Ha,"__esModule",{value:!0});Ha.resilience=Ha.circuitBreaker=Ha.retry=Ha.timeout=void 0;var Woe=Vp();Object.defineProperty(Ha,"timeout",{enumerable:!0,get:function(){return Woe.timeout}});var Joe=Hp();Object.defineProperty(Ha,"retry",{enumerable:!0,get:function(){return Joe.retry}});var Zoe=tf();Object.defineProperty(Ha,"circuitBreaker",{enumerable:!0,get:function(){return Zoe.circuitBreaker}});var Yoe=xb();Object.defineProperty(Ha,"resilience",{enumerable:!0,get:function(){return Yoe.resilience}})});var IA=i(function(kA){Object.defineProperty(kA,"__esModule",{value:!0});kA.jwtDecode=kA.InvalidTokenError=void 0;class ks extends Error{}kA.InvalidTokenError=ks;ks.prototype.name="InvalidTokenError";function Qoe(o){return decodeURIComponent(atob(o).replace(/(.)/g,(f,h)=>{let y=h.charCodeAt(0).toString(16).toUpperCase();if(y.length<2)y="0"+y;return"%"+y}))}function ene(o){let f=o.replace(/-/g,"+").replace(/_/g,"/");switch(f.length%4){case 0:break;case 2:f+="==";break;case 3:f+="=";break;default:throw Error("base64 string is not of the correct length")}try{return Qoe(f)}catch(h){return atob(f)}}function tne(o,f){if(typeof o!=="string")throw new ks("Invalid token specified: must be a string");f||(f={});let h=f.header===!0?0:1,y=o.split(".")[h];if(typeof y!=="string")throw new ks(`Invalid token specified: missing part #${h+1}`);let x;try{x=ene(y)}catch(_){throw new ks(`Invalid token specified: invalid base64 for part #${h+1} (${_.message})`)}try{return JSON.parse(x)}catch(_){throw new ks(`Invalid token specified: invalid json for part #${h+1} (${_.message})`)}}kA.jwtDecode=tne});var Kl=i(function(m2e,AA){class RA extends Error{#e;constructor(o){super(o);this.name="XssecError",this.statusCode=500}get statusCode(){return this.#e}get statuscode(){return this.#e}set statusCode(o){this.#e=o}}AA.exports=RA});var un=i(function(g2e,BA){var one=Kl();class PA extends one{constructor(o){super(o);this.name="ValidationError",this.statusCode=401}}BA.exports=PA});var Cb=i(function(y2e,LA){var nne=un();class DA extends nne{#e;constructor(o,f,h=`JWT could not be parsed: ${f.message}`){super(h);this.name="InvalidJwtError",this.jwt=o,this.#e=f}get parseError(){return this.#e}set parseError(o){this.#e=o}}LA.exports=DA});var dn=i(function(b2e,NA){NA.exports={APP_TID_HEADER:"x-app_tid",AZP_HEADER:"x-azp",AZP_APP_TID_HEADER:"x-azp_app_tid",CLIENT_CERTIFICATE_HEADER:"x-client_cert",CLIENTID_HEADER:"x-client_id",CORRELATIONID_HEADER_VCAP:"x-vcap-request-id",CORRELATIONID_HEADERS:["x-correlation-id","x-request-id","x-correlationid","x-vcap-request-id"],DEFAULT_TIMEOUT:2000,DEFAULT_JWT_BEARER_FETCH_TIMEOUT:1e4,FORWARDED_CLIENTCERTIFICATE_HEADER:"x-forwarded-client-cert",MAX_TIMEOUT:1e4,GRANTTYPE_SAML2BEARER:"urn:ietf:params:oauth:grant-type:saml2-bearer",GRANTTYPE_JWTBEARER:"urn:ietf:params:oauth:grant-type:jwt-bearer",GRANTTYPE_USERTOKEN:"user_token",GRANTTYPE_REFRESHTOKEN:"refresh_token",GRANTTYPE_PASSWORD:"password",GRANTTYPE_CLIENTCREDENTIALS:"client_credentials",GRANTTYPE_AUTHORIZATIONCODE:"authorization_code",GRANTTYPE_IMPLICIT:"implicit",HTTP_SCHEME:"http://",HTTPS_SCHEME:"https://",PEM_HEADER:"-----BEGIN CERTIFICATE-----",PEM_FOOTER:"-----END CERTIFICATE-----",USER_AGENT:"nodejs-xssec-4",SERVICE_PLAN_HEADER:"x-osb_plan",TOKEN_DATE_LEEWAY:60,X5T_CNF_CLAIM:"x5t#S256",ZID_HEADER:"x-zid",ZID_QUERY_PARAMETER:"zid"}});var Wl=i(function(v2e,MA){class jA{constructor(o){this.size=o,this.map=new Map}get(o){if(!this.map.has(o))return null;let f=this.map.get(o);return this.map.delete(o),this.map.set(o,f),f}set(o,f){if(this.map.has(o))this.map.delete(o);else if(this.map.size>=this.size){let h=this.map.keys().next().value;this.map.delete(h)}this.map.set(o,f)}}MA.exports=jA});var Rn=i(function(x2e,UA){var{jwtDecode:qA}=IA(),Jl=Cb(),{TOKEN_DATE_LEEWAY:FA}=dn(),ine=Wl();class ei{static decodeCache=null;static enableDecodeCache(o={}){if(o.impl)ei.decodeCache=o.impl;else ei.decodeCache=new ine(o?.size||100)}static disableDecodeCache(){ei.decodeCache=!1}#e;#t;#r;constructor(o,{header:f,payload:h}={}){if(this.#e=o,!f||!h){let y=null;if(ei.decodeCache)y=ei.decodeCache.get(o);if(y!=null)f=y.header,h=y.payload;else if({header:f,payload:h}=this.#o(o),ei.decodeCache)ei.decodeCache.set(o,{header:f,payload:h})}this.#t=f,this.#r=h}#o(o){try{return{header:qA(o,{header:!0}),payload:qA(o)}}catch(f){throw new Jl(o,f)}}get audiences(){if(this.payload.aud)return Array.isArray(this.payload.aud)?this.payload.aud:[this.payload.aud];else return null}get azp(){return this.payload.azp}get clientId(){if(this.azp)return this.azp;if(this.audiences==null||this.audiences.length!=1)return null;return this.audiences[0]||this.payload.cid}get email(){return this.payload.email}get expired(){return this.remainingTime<=0}get expirationDate(){return this.payload.exp?new Date(this.payload.exp*1000):null}get familyName(){return this.payload.ext_attr?.family_name||this.payload.family_name}get givenName(){return this.payload.ext_attr?.given_name||this.payload.given_name}get grantType(){return this.payload.grant_type}get header(){return this.#t}get issuer(){return this.payload.iss}get issueDate(){return this.payload.iat?new Date(this.payload.iat*1000):null}get jwt(){return this.#e}get notYetValid(){let o=this.payload.nbf;if(o==null)return!1;if(typeof o!=="number"||o<=0)throw new Jl(this.jwt,null,`Invalid value '${o}' inside 'nbf' claim.`);let f=new Date(o*1000);if(isNaN(f.getTime()))throw new Jl(this.jwt,null,`Failed to parse 'nbf' claim value '${o}' into a valid date.`);return(f.getTime()-Date.now())/1000>FA}get origin(){return this.payload.origin}get payload(){return this.#r}get remainingTime(){let o=this.payload.exp;if(typeof o!=="number"||o<=0)throw new Jl(this.jwt,null,`Invalid value '${o}' inside 'exp' claim.`);let f=new Date(o*1000);if(isNaN(f.getTime()))throw new Jl(this.jwt,null,`Failed to parse 'exp' claim value '${o}' into a valid date.`);let h=f.getTime()-Date.now(),y=Math.floor(h/1000)+FA;return Math.max(0,y)}get subject(){return this.payload.sub}get userName(){return this.payload.user_name}get userId(){return this.payload.user_uuid}getAudiencesArray(){return this.audiences}getAzp(){return this.azp}getClientId(){return this.clientId}getEmail(){return this.email}getExpirationDate(){return this.expirationDate}getFamilyName(){return this.familyName}getGivenName(){return this.givenName}getGrantType(){return this.grantType}getHeader(){return this.header}getIssuedAt(){return this.issueDate}getIssuer(){if(this.issuer&&!this.issuer.startsWith("http"))return`https://${this.issuer}`;else return this.issuer}getPayload(){return this.payload}getSubject(){return this.subject}getTokenValue(){return this.jwt}getUserId(){return this.userId}}UA.exports=ei});var wb=i(function(_2e,VA){var sne=un();class $A extends sne{constructor(o="Request contains no jwt bearer token and neither a jwt nor a decoded Token were contained in contextConfig of createSecurityContext."){super(o);this.name="MissingJwtError"}}VA.exports=$A});var Sb=i(function(z2e,GA){var ane=un();class HA extends ane{#e;constructor(o,f,h=`The forwarded client certificate could not be parsed as X509 certificate: ${f.message}`){super(h);this.name="InvalidClientCertificateError",this.clientCertificate=o,this.parseError=f}get parseError(){return this.#e}set parseError(o){this.#e=o}}GA.exports=HA});var Eb=i(function(C2e,e2){var{X509Certificate:cne}=c("crypto"),lne=Sb(),{PEM_HEADER:KA,PEM_FOOTER:WA}=dn();e2.exports={parsePemCertificate(o){if(o=o.replaceAll("\\n",`
90
+ `),!o.startsWith(KA))o=`${KA}
91
+ ${o}`;if(!o.endsWith(WA))o=`${o}
92
+ ${WA}`;try{return new cne(o)}catch(f){throw new lne(o,f)}},extractPemFromClientCertHeader(o){if(!o)return null;if(JA(o))return ZA(o);else return o},isXfccFormat:JA,parseXfccToPem:ZA,splitXfccString:Tb,isEscaped:YA,extractCertFromXfccEntry:XA,unquoteAndDecodeCert:QA};function JA(o){if(!o||typeof o!=="string")return!1;return/\bHash=/i.test(o)}function ZA(o){if(!o||typeof o!=="string")return null;let f=Tb(o,","),h=f[f.length-1];return XA(h)}function Tb(o,f){let h=[],y="",x=!1;for(let _=0;_<o.length;_++){let z=o[_];if(z==='"'&&!YA(o,_))x=!x;if(z===f&&!x)h.push(y.trim()),y="";else y+=z}if(y.trim())h.push(y.trim());return h}function YA(o,f){let h=0,y=f-1;while(y>=0&&o[y]==="\\")h++,y--;return h%2===1}function XA(o){if(!o)return null;let f=Tb(o,";");for(let h of f){let y=h.indexOf("=");if(y===-1)continue;let x=h.substring(0,y).trim(),_=h.substring(y+1).trim();if(x.toLowerCase()==="cert")return QA(_)}return null}function QA(o){if(!o)return null;let f=o.trim();if(f.startsWith('"')&&f.endsWith('"')||f.startsWith("'")&&f.endsWith("'"))f=f.slice(1,-1);f=f.replace(/\\"/g,'"');try{return f=decodeURIComponent(f),f}catch(h){return f}}});var ti=i(function(w2e,o2){var{CORRELATIONID_HEADERS:t2,FORWARDED_CLIENTCERTIFICATE_HEADER:une}=dn(),{extractPemFromClientCertHeader:dne}=Eb();class r2{#e;#t;config;constructor(o,f,h){this.#e=o,this.#t=f,this.config=h}get service(){return this.#e}set service(o){this.#e=o}get token(){return this.#t}set token(o){this.#t=o}getAppToken(){return this.token.jwt}getEmail(){return this.getUserInfo().email}getExpirationDate(){return this.token.expirationDate}getFamilyName(){return this.getUserInfo().familyName}getGivenName(){return this.getUserInfo().givenName}getGrantType(){return this.token.grantType}getLogonName(){return this.getUserInfo().logonName}getUserInfo(){return{email:this.token.email,familyName:this.token.familyName,givenName:this.token.givenName,logonName:this.token.payload.user_name}}getTokenInfo(){return this.token}static buildContextConfig(o){let{req:f}=o;for(let h=0;o.correlationId==null&&h<t2.length;h++)o.correlationId=f?.headers?.[t2[h]];o.clientCertificatePem??=dne(f?.headers?.[une]),o.jwt??=f?.headers?.authorization?.split(" ")[1],o.skipValidation??=!1}}o2.exports=r2});var Os=i(function(S2e,i2){var pne=Kl();class n2 extends pne{constructor(o){super(o);this.name="ConfigurationError",this.statusCode=500}}i2.exports=n2});var pn=i(function(T2e,a2){var fne=Tt(),hne=fne("xssec"),mne=un();class s2 extends mne{#e;constructor(o,f="Token is not valid."){super(f);if(this.name="TokenValidationError",this.token=o,hne.enabled)this.jwt=o.jwt}get token(){return this.#e}set token(o){this.#e=o}}a2.exports=s2});var u2=i(function(E2e,l2){var gne=pn();class c2 extends gne{constructor(o,f="Token is expired."){super(o,f);this.name="ExpiredTokenError"}}l2.exports=c2});var f2=i(function(k2e,p2){var yne=Os();class d2 extends yne{constructor(o="The service credentials are missing mandatory properties."){super(o);this.name="InvalidCredentialsError"}}p2.exports=d2});var g2=i(function(O2e,m2){var bne=pn();class h2 extends bne{#e;constructor(o,f,h=`Issuer ${o.issuer} was not a valid domain or URL for use with https. Protocol schemes other than https:// are not supported.`){super(o,h);this.name="InvalidIssuerError",this.#e=f}get parseError(){return this.#e}set parseError(o){this.#e=o}}m2.exports=h2});var kb=i(function(I2e,b2){var vne=pn();class y2 extends vne{constructor(o,f="Token signature is invalid."){super(o,f);this.name="InvalidTokenSignatureError"}}b2.exports=y2});var _2=i(function(R2e,x2){var xne=un();class v2 extends xne{constructor(o="Request is missing a forwarded client certificate which is required to validate the token."){super(o);this.name="MissingClientCertificateError"}}x2.exports=v2});var S2=i(function(A2e,w2){var _ne=pn();class C2 extends _ne{constructor(o,f="Token is missing an issuer which is required to validate the signature."){super(o,f);this.name="MissingIssuerError"}}w2.exports=C2});var af=i(function(P2e,E2){var zne=un();class T2 extends zne{#e;constructor(o,f=`JWKS is missing key for kid=${o} specified in token header.`){super(f);this.name="MissingKidError",this.#e=o}get kid(){return this.#e}set kid(o){this.#e=o}}E2.exports=T2});var Ob=i(function(B2e,O2){var Cne=un();class k2 extends Cne{constructor(o="XSUAA service credentials are missing a verificationkey that would be required as JWKS fallback to validate the given token."){super(o);this.name="MissingVerificationKeyError"}}O2.exports=k2});var cf=i(function(D2e,R2){var wne=Kl();class I2 extends wne{#e;constructor(o="A network error has occured."){super(o);this.name="NetworkError",this.statusCode=500}get correlationId(){return this.#e}set correlationId(o){this.#e=o}}R2.exports=I2});var B2=i(function(L2e,P2){var Sne=pn();class A2 extends Sne{constructor(o,f="The token is not yet valid because its 'nbf' (no use before) date lies in the future."){super(o,f);this.name="NotYetValidTokenError"}}P2.exports=A2});var Ql=i(function(N2e,L2){var Tne=cf();class D2 extends Tne{#e;#t;#r;constructor(o,f,h,y=`HTTP request [${f.name}] to ${o} could not be sent due to: ${h.toString()}.`){super(y);this.name="RequestError",this.url=o,this.request=f,this.originalError=h}get url(){return this.#r}set url(o){this.#r=o}get request(){return this.#e}set request(o){this.#e=o}get originalError(){return this.#t}set originalError(o){this.#t=o}}L2.exports=D2});var Ib=i(function(j2e,j2){var Ene=cf();class N2 extends Ene{#e;#t;#r;#o;constructor(o,f,h,y,x=`HTTP response from ${o} was ${h}: ${y}.`){super(x);this.name="ResponseError",this.url=o,this.request=f,this.responseCode=h,this.responseText=y}get url(){return this.#e}set url(o){this.#e=o}get request(){return this.#t}set request(o){this.#t=o}get responseCode(){return this.#r}set responseCode(o){this.#r=o}get responseText(){return this.#o}set responseText(o){this.#o=o}}j2.exports=N2});var Rb=i(function(M2e,q2){var kne=Ql();class M2 extends kne{constructor(o,f,h,y=`HTTP request [${f.name}] to ${o} timed out after ${f.timeout} ms.`){super(o,f,h,y);this.name="TimeoutError"}}q2.exports=M2});var Ab=i(function(q2e,U2){var One=pn();class F2 extends One{#e;constructor(o,f,h=`Algorithm ${f} specified in token header is not supported.`){super(o,h);this.name="UnsupportedAlgorithmError",this.alg=f}get alg(){return this.#e}set alg(o){this.#e=o}}U2.exports=F2});var W2=i(function(F2e,H2){var Ine=pn();class $2 extends Ine{constructor(o,f,h,y=`Token issuer \`${f}\` is not trusted because it is not a (sub)domain of the trusted domains from the service credentials: [${h.join(", ")}].`){super(o,y);this.name="UntrustedIssuerError",this.issuer=f,this.trustedDomains=h}}H2.exports=$2});var Y2=i(function(U2e,Z2){var Rne=pn();class J2 extends Rne{audiences;#e;constructor(o,f,h=`Token was issued for different audience(s) [${(o.audiences||[]).join(", ")}] than this service (${f.credentials.clientid}).`){super(o,h);this.name="WrongAudienceError",this.service=f,this.audiences=o.audiences}get service(){return this.#e}set service(o){this.#e=o}}Z2.exports=J2});var eP=i(function($2e,Q2){var Ane=pn();class X2 extends Ane{clientCertificate;constructor(o,f,h="X5t validation of token failed."){super(o,h);this.name="X5tError",this.clientCertificate=f}get cert(){return this.clientCertificate}}Q2.exports=X2});var Is=i(function(V2e,tP){var Pne=Os(),Bne=u2(),Dne=Sb(),Lne=f2(),Nne=g2(),jne=Cb(),Mne=kb(),qne=_2(),Fne=S2(),Une=wb(),$ne=af(),Vne=Ob(),Hne=cf(),Gne=B2(),Kne=Ql(),Wne=Ib(),Jne=Rb(),Zne=pn(),Yne=Ab(),Xne=W2(),Qne=un(),eie=Y2(),tie=eP(),rie=Kl();tP.exports={ConfigurationError:Pne,ExpiredTokenError:Bne,InvalidClientCertificateError:Dne,InvalidCredentialsError:Lne,InvalidIssuerError:Nne,InvalidJwtError:jne,InvalidTokenSignatureError:Mne,MissingClientCertificateError:qne,MissingIssuerError:Fne,MissingJwtError:Une,MissingKidError:$ne,MissingVerificationKeyError:Vne,NetworkError:Hne,NotYetValidTokenError:Gne,RequestError:Kne,ResponseError:Wne,TimeoutError:Jne,TokenValidationError:Zne,UnsupportedAlgorithmError:Yne,UntrustedIssuerError:Xne,ValidationError:Qne,WrongAudienceError:eie,X5tError:tie,XssecError:rie}});var nP=i(function(H2e,oP){class rP{constructor(o,f){this.loggingConfig=o,this.prefix=f}info(o,f){if(o=`[${this.prefix}] ${o}`,f!=null)this.loggingConfig.info(o,f);else this.loggingConfig.info(o)}warn(o,f){if(o=`[${this.prefix}] ${o}`,f!=null)this.loggingConfig.warn(o,f);else this.loggingConfig.warn(o)}error(o,f){if(o=`[${this.prefix}] ${o}`,f!=null)this.loggingConfig.error(o,f);else this.loggingConfig.error(o)}debug(o,f){if(o=`[${this.prefix}] ${o}`,f!=null)this.loggingConfig.debug(o,f);else this.loggingConfig.debug(o)}}oP.exports=rP});var An=i(function(G2e,sP){var oie=Tt(),nie=nP(),eu=oie("xssec");eu.log=console.log.bind(console);var iP={info:(o,...f)=>eu(o,...f),warn:(o,...f)=>eu(o,...f),error:(o,...f)=>eu(o,...f),debug:(o,...f)=>eu(o,...f)};function iie(o=""){return new nie(iP,o)}function sie(o){Object.assign(iP,o)}sP.exports={getLogger:iie,setLoggers:sie}});var tu=i(function(K2e,aP){var aie=Rn(),cie=wb(),lie=ti(),{WrongAudienceError:uie}=Is(),{getLogger:die}=An(),Pb=die("createSecurityContext.js");aP.exports=pie;async function pie(o,f){if(f={...f},lie.buildContextConfig(f),f.token==null&&f.jwt==null)throw new cie;let h=f.token??new aie(f.jwt);Pb.debug(`Creating security context from JWT: ${h.jwt}`,{correlationId:f.correlationId});let y=null;if(Array.isArray(o)){if(f.services=o,o.length===1)y=o[0];else if(y=fie(o,h),y!=null)Pb.debug(`Selected ${y.constructor.name} with clientid ${y.credentials.clientid} based on token audience.`,{correlationId:f.correlationId})}else f.services=[o],y=o;if(y==null)throw new uie(h,o,"The audiences of the token fit none of the supplied services.");return y.createSecurityContext(h,f)}function fie(o,f){for(let h of o)try{if(h.acceptsTokenAudience(f))return h}catch(y){Pb.debug(`${h.constructor.name} declined the token during service selection: ${y.message}`)}return}});var Bb=i(function(W2e,uP){var cP=Os(),hie=ti();class lP extends hie{xsuaaContext;constructor(o,f,h){super(o,f,h)}get servicePlans(){if(!this.service.hasProofTokenEnabled())throw new cP("This property is only available on IdentityServiceSecurityContexts created on an IdentityService with proofToken validation enabled.");return this.config.servicePlans}getIdToken(o={}){return this.service._getIdToken(this.token,{correlationId:this.config.correlationId,app_tid:this.token.appTid,...o})}isInternal(){if(!this.service.hasX5tEnabled())throw new cP("This method is only available on IdentityServiceSecurityContexts created on an IdentityService instance with x5t validation enabled.");return this.token.azp===this.service.credentials.clientid&&this.token.subject===this.service.credentials.clientid&&this.token.appTid===this.service.credentials.app_tid}getUserInfo(){return{...super.getUserInfo(),logonName:this.token.payload.user_name||this.token.email||this.token.payload.user_uuid||""}}}uP.exports=lP});var ru=i(function(J2e,pP){var mie=ti(),{getLogger:gie}=An(),{GRANTTYPE_CLIENTCREDENTIALS:Db}=dn(),Rs=gie("XsuaaSecurityContext.js");class dP extends mie{iasContext;constructor(o,f,h){super(o,f,h)}checkScope(o){return this.token.scopes.includes(o)}checkLocalScope(o){return this.token.scopes.includes(`${this.service.credentials.xsappname}.${o}`)}checkFollowingInstanceScope(o){let f=this.token.payload.client_id;if(!f?.startsWith("sb-"))return!1;let h=f.substring(3);if(!h.includes("|"))return!1;return this.checkScope(`${h}.${o}`)}getAttributes(){let o=this.token.xsUserAttributes??{};return Object.keys(o).length!==0?o:null}getAttribute(o){return this.token.getXsUserAttribute(o)||null}getAdditionalAuthAttribute(o){let f=this.getAdditionalAuthAttributes();if(!f)return Rs.debug(`
93
+ The access token contains no additional authentication attributes.
94
+ `),null;if(!o)return Rs.debug(`
95
+ Invalid attribute name (may not be null, empty, or undefined).`),null;if(!f[o])return Rs.debug(`
96
+ No attribute "`+o+'" found as additional authentication attribute.'),null;return f[o]}getAdditionalAuthAttributes(){return this.token.azAttributes||null}getAppTID(){return this.token.zid}getClientId(){return this.token.getClientId()}getCloneServiceInstanceId(){return this.token.extAttributes?.serviceinstanceid||null}getEmail(){return this.#e("XsuaaSecurityContext.getEmail",this.getUserInfo().email)}getFamilyName(){return this.#e("XsuaaSecurityContext.getFamilyName",this.getUserInfo().familyName)}getGivenName(){return this.#e("XsuaaSecurityContext.getGivenName",this.getUserInfo().givenName)}getLogonName(){return this.#e("XsuaaSecurityContext.getLogonName",this.getUserInfo().logonName)}getOrigin(){return this.token.origin}getSubaccountId(){return this.token.subAccountId}getSubdomain(){return this.token.extAttributes?.zdn??null}getUniquePrincipalName(o,f){if(!this.#e("XsuaaSecurityContext.getUniquePrincipalName",!0))return null;if(!o)return Rs.debug("Origin claim not set in JWT. Cannot create unique user name. Returning null."),null;if(!f)return Rs.debug("User login name claim not set in JWT. Cannot create unique user name. Returning null."),null;if(o.includes("/"))return Rs.debug("Illegal '/' character detected in origin claim of JWT. Cannot create unique user name. Retuning null."),null;return`user/${o}/${f}`}getUserName(){if(this.token.grantType===Db)return`client/${this.getClientId()}`;else return this.getUniquePrincipalName(this.token.origin,this.getLogonName())}getZoneId(){return this.token.zid}hasAttributes(){return this.#e("XsuaaSecurityContext.hasAttributes",this.token.xsUserAttributes!=null)}isInForeignMode(){return this.service.credentials.clientid.includes("!b")&&this.token.audiences.some((o)=>o.includes(`|${this.service.credentials.clientid}`))}#e(o,f){if(this.token.grantType===Db)return Rs.debug(`Call to ${o} not allowed with a token of grant type ${Db}.`),null;return f}}pP.exports=dP});var Lb=i(function(Z2e,hP){var yie=ru();class fP extends yie{constructor(o,f,h){super(o,f,h)}get service(){return super.service}set service(o){super.service=o}get token(){return super.token}set token(o){super.token=o}}hP.exports=fP});var Nb=i(function(Y2e,gP){var bie=ru();class mP extends bie{constructor(o,f,h){super(o,f,h)}get service(){return super.service}set service(o){super.service=o}get token(){return super.token}set token(o){super.token=o}}gP.exports=mP});var vP=i(function(X2e,bP){class yP{cache;key;request;deserialize;expirationTime;pendingRequest;#e;#t;constructor(o,f,h,y){Object.assign(this,{cache:o,key:f,request:h,deserialize:y}),this.expirationTime=o.expirationTime}remainingTime(o){if(!o||o.lastRefresh==null)return 0;let f=Date.now()-o.lastRefresh;return Math.max(0,this.expirationTime-f)}hasData(o){return o!=null&&o.data!=null}isExpired(o){return this.remainingTime(o)<=0}isStale(o,f){return this.isExpired(o)||this.remainingTime(o)<=f}refresh(o){return this.pendingRequest??=this.#r(o),this.pendingRequest}resolve(o){if(!o)return null;if(!this.deserialize)return o.data;if(this.#t!==o.lastRefresh)this.#e=this.deserialize(o.data),this.#t=o.lastRefresh;return this.#e}async#r(o){let f;try{f=await this.request(o)}finally{this.pendingRequest=null}let h={data:f,lastRefresh:Date.now()},y=this.cache.store.set(this.key,h);if(y&&typeof y.then==="function")await y;return h}}bP.exports=yP});var CP=i(function(Q2e,zP){var vie=vP(),xP=Os(),{getLogger:xie}=An(),_P=xie("ResponseCache.js");class lf{static get DEFAULT_EXPIRATION_TIME(){return 1800000}static get DEFAULT_REFRESH_PERIOD(){return 900000}store;#e;endpointName;expirationTime;refreshPeriod;constructor({expirationTime:o=lf.DEFAULT_EXPIRATION_TIME,refreshPeriod:f=lf.DEFAULT_REFRESH_PERIOD,endpointName:h="response",impl:y}={}){if(o<0)throw new xP("ResponseCache expirationTime must be >=0.");if(f<0||f>o)throw new xP("ResponseCache refreshPeriod must be between 0 and <expirationTime>.");this.store=y??new Map,this.#e=new Map,this.endpointName=h,this.expirationTime=o,this.refreshPeriod=f}async getOrRequest(o,f,{correlationId:h,deserialize:y}={}){let x=this.#e.get(o);if(!x)x=new vie(this,o,f(),y),this.#e.set(o,x);let _=this.store.get(o);if(_&&typeof _.then==="function")_=await _;if(!x.hasData(_)||x.isExpired(_))_P.debug(`Awaiting ${this.endpointName} refresh because replica for key=${o} has ${x.hasData(_)?"expired":"no"} data.)`,{correlationId:h}),_=await x.refresh(h);else if(x.isStale(_,this.refreshPeriod))_P.debug(`Asynchronous ${this.endpointName} refresh scheduled because replica for key=${o} is stale (remaining time = ${x.remainingTime(_)}ms < ${this.refreshPeriod}ms = refresh period).`),x.refresh(h).catch(()=>{});return x.resolve(_)}async clear(){this.#e.clear(),await this.store.clear()}}zP.exports=lf});var TP=i(function(ePe,SP){var _ie=c("https"),zie=c("http"),Cie=c("zlib"),wie=c("url");function Sie(o){switch(o){case"https:":return _ie;case"http:":return zie;default:throw Error(`Unsupported protocol: ${o}`)}}class ou extends Error{constructor(o,f){super(o);Error.captureStackTrace(this,this.constructor),this.code=this.errno=f?.code,this.erroredSysCall=f?.syscall}get name(){return this.constructor.name}}class wP{#e;#t;constructor(o,f){this.#e=o,this.#t=f}async#r(){let o=this.#e;return new Promise((f,h)=>{let y=Cie.createGunzip();o.pipe(y);let x=[];y.on("data",function(_){x.push(_.toString())}),y.on("end",function(){f(x.join(""))}),y.on("error",(_)=>{h(new ou(`request to ${this.requestUrl} failed, reason: ${_.message}`,_))})})}get requestUrl(){let o=this.#t;return o.protocol+"//"+o.host+o.path}async#o(){let o=this.#e;if(o.headers["content-encoding"]==="gzip")return this.#r();return new Promise((f,h)=>{let y=[];o.setEncoding("utf8"),o.on("data",function(x){y.push(x)}),o.on("end",function(){f(y.join(""))}),o.on("error",(x)=>{h(new ou(`request to ${this.requestUrl} failed, reason: ${x.message}`,x))})})}async json(){return JSON.parse(await this.#o())}async text(){return this.#o()}get ok(){return this.status>=200&&this.status<300}get status(){return this.#e.statusCode}get headers(){let o=new Map;for(let[f,h]of Object.entries(this.#e.headers))o.set(f,h);return o}}async function Tie(o,f={}){Eie(f),Oie(f),kie(f);let h=Sie(new wie.URL(o).protocol);return new Promise(function(y,x){let _=h.request(o,f,(z)=>{y(new wP(z,_))});if(_.on("error",(z)=>{x(new ou(`request to ${o} failed, reason: ${z.message}`,z))}),_.on("timeout",()=>{_.destroy(),x(new ou(`request to ${o} timed out.`,{code:"ETIMEDOUT"}))}),f.data)_.write(f.data);_.end()})}function Eie(o){o.method??="GET"}function kie(o){if(o.body){let f=o.method.toUpperCase();if(f!=="GET"&&f!=="HEAD"){if(o.json)o.data=JSON.stringify(o.body),o.headers["Content-Type"]="application/json;charset=UTF-8";else o.data=o.body.toString(),o.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8";o.headers["Content-Length"]=Buffer.byteLength(o.data),delete o.body}else throw Error("Request with GET/HEAD method cannot have body")}}function Oie(o){if(o.headers==null)o.headers={};if(o.headers["Accept-Encoding"]="gzip,deflate",!o.headers.Accept&&!o.headers.accept)o.headers.Accept="*/*"}SP.exports=Tie});var OP=i(function(tPe,kP){var Iie=Ql();class EP extends Iie{constructor(o,f,h,y=`HTTP request [${f.name}] to ${o} was not successful after ${h.length} attempts.`){super(o,f,h,y);this.name="RetryError"}get retryErrors(){return this.originalError}}kP.exports=EP});var jb=i(function(rPe,RP){var{CLIENT_CERTIFICATE_HEADER:IP}=dn();RP.exports={escapeStringForRegex(o){return String(o).replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")},shrinkRequestOptionsForLog(o){let f={...o};if(f.headers={...o.headers},f.agent)f.agent="<agent>";if(f.headers?.[IP])f.headers[IP]="<clientCertificatePem>";return f}}});var uf=i(function(oPe,DP){var Rie=TP(),{getLogger:Aie}=An(),AP=Ql(),Pie=OP(),PP=Ib(),Bie=Rb(),{CORRELATIONID_HEADER_VCAP:Die,DEFAULT_TIMEOUT:Lie,MAX_TIMEOUT:Nie,USER_AGENT:jie}=dn(),{shrinkRequestOptionsForLog:Mie}=jb(),As=Aie("jsonRequest.js"),qie=(o)=>new Promise((f)=>{setTimeout(()=>{f()},o)});function Fie(o,f){if(f.strategy==="exponential"){let h=f.initialDelay*Math.pow(f.factor,o);return Math.min(h,f.maxDelay)}return f.initialDelay}function Uie(o){if(o instanceof PP){if(o.responseCode>=500&&o.responseCode<=600||o.responseCode==429||o.responseCode==408)return!0}else if(o instanceof AP)return!0;return!1}async function $ie(o,f,h){let{requestName:y,correlationId:x}=h,_=f.retry,z=[],C={...f,name:y};for(let S=0;S<=_.retries;S++)try{if(S>0)As.info(`Retry attempt ${S}/${_.retries} for [${y}] to ${o}`,{correlationId:x});return await BP(o,f,h)}catch(E){if(!Uie(E))throw E;if(z.push(E),S>=_.retries)break;let k=Fie(S,_);As.debug(`Waiting ${k}ms before next retry`,{correlationId:x}),await qie(k)}let w=new Pie(o,C,z);throw As.error(w.message,{correlationId:x}),w}async function BP(o,f,{requestName:h,correlationId:y,extractHeaders:x}){if(y)f.headers[Die]=y;As.debug(`HTTP request [${h}] to ${o} with options`,{correlationId:y,...Mie(f)});let _;try{_=await Rie(o,f)}catch(C){let w={...f,name:h},S=C.code==="ETIMEDOUT"?new Bie(o,w,C):new AP(o,w,C);throw As.error(S.message,{correlationId:y}),S}if(!_.ok){let C=await _.text(),w=new PP(o,{...f,name:h},_.status,C);throw As.error(w.message,{correlationId:y}),w}let z=await _.json();if(As.debug(`HTTP response [${h}]:`,{correlationId:y,...z}),x!=null)z[x]=_.headers;return z}async function Vie(o,f,h={}){if(Object.assign(f,{redirect:"error",follow:0,timeout:Math.min(Nie,f.timeout??Lie)}),f.headers??={},Object.assign(f.headers,{Accept:"application/json","User-Agent":jie}),f.retry)return $ie(o,f,h);else return BP(o,f,h)}DP.exports={jsonRequest:Vie}});var nu=i(function(nPe,LP){function Hie(o={}){return Object.entries(o).filter(([,f])=>f!=null).map(([f,h])=>`${f}=${h}`).join("|")}LP.exports=Hie});var pf=i(function(iPe,$P){var{Agent:Gie}=c("node:https"),su=CP(),NP=Wl(),{ConfigurationError:iu,ExpiredTokenError:Kie,InvalidCredentialsError:jP,MissingKidError:Wie,NotYetValidTokenError:Jie,WrongAudienceError:Zie}=Is(),{jsonRequest:df}=uf(),MP=nu(),{DEFAULT_JWT_BEARER_FETCH_TIMEOUT:Yie,DEFAULT_TIMEOUT:Xie,GRANTTYPE_CLIENTCREDENTIALS:qP,GRANTTYPE_JWTBEARER:FP,GRANTTYPE_PASSWORD:UP,MAX_TIMEOUT:Qie}=dn();class Br{static DEFAULT_RETRY_CONFIG={strategy:"exponential",retries:3,initialDelay:500,factor:3,maxDelay:4000};static DEFAULT_SIGNATURE_CACHE_CONFIG={size:100};static DEFAULT_TOKEN_CACHE_CONFIG={enabled:!0,size:100};static DEFAULT_TOKEN_CACHE_LEEWAY=300;static#e=new su({endpointName:"OIDC configuration"});static#t={};static#r={};credentials;config;#o;#i;#n;#s;contextExtensions=[];constructor(o,f={}){if(o==null)throw new iu("Service requires service credentials.");if(this.credentials=o,this.config=Br.buildServiceConfiguration(f),this.config.context?.extensions)this.contextExtensions=[...this.config.context.extensions]}get endpoints(){if(!this.#o)this.#o={oidc_info:this.config.endpoints?.oidc_info||"/.well-known/openid-configuration"};return this.#o}get oidcCache(){return Br.#e}set oidcCache(o){Br.#e=o}get jwksCache(){if(!this.#i)this.#i=this.config.validation.jwks.shared&&!this.config.validation.jwks.impl?this.#l(this.config):new su({...this.config.validation.jwks,endpointName:"JWKS"});return this.#i}get signatureCache(){if(this.#n===void 0)if(this.config.validation.signatureCache.impl)this.#n=this.config.validation.signatureCache.impl;else if(this.config.validation.signatureCache.enabled!==!1)this.#n=Br.#u(this.config.validation.signatureCache);else this.#n=null;return this.#n}get tokenFetchCache(){if(this.#s===void 0)if(this.config.tokenfetch.cache.impl)this.#s=this.config.tokenfetch.cache.impl;else if(this.config.tokenfetch.cache.enabled!==!1)this.#s=new NP(this.config.tokenfetch.cache.size);else this.#s=null;return this.#s}#l(){return Br.#t[this.constructor.name]??=new su({...this.config.validation.jwks,endpointName:"JWKS"}),Br.#t[this.constructor.name]}static#u(o){let f=Br.#r[this.constructor.name];if(f!=null&&f.size!==o.size)throw new iu(`An internal signature cache with size ${f.size} instead of ${o.size} has already been created by another ${this.constructor.name} configuration. Please use the same size in all ${this.constructor.name} configurations or provide separate, externally managed cache implementations.`);return Br.#r[this.constructor.name]??=new NP(o.size),Br.#r[this.constructor.name]}acceptsTokenAudience(o){this.validateCredentials("validate token audience","clientid");let f=o.audiences;if(f==null)return!1;return f.includes(this.credentials.clientid)}validateCredentials(o,...f){let h=f.filter((y)=>!this.credentials[y]);if(h.length>0)throw new jP(`${this.constructor.name} is missing the properties ${h} inside its credentials for: ${o}.`)}async validateToken(o,f){if(o.expired)throw new Kie(o);if(o.notYetValid)throw new Jie(o);if(!this.acceptsTokenAudience(o))throw new Zie(o,this);await this.validateTokenSignature(o,f)}async validateTokenSignature(o,f){if(!o.header.kid)throw new Wie(o.header.kid,"Token header contained no kid.");let y=(await this.getJwks(o,f)).get(o.header.kid);if(this.signatureCache)y.validateSignature(o,this.signatureCache);else y.validateSignature(o)}async getOpenIDConfiguration({correlationId:o}={}){this.validateCredentials("fetch OIDC configuration","url");let f=MP({url:this.credentials.url}),h=()=>(y)=>this.fetchOpenIDConfiguration({correlationId:y});return this.oidcCache.getOrRequest(f,h,{correlationId:o})}async fetchOpenIDConfiguration({correlationId:o}={}){this.validateCredentials("fetch OIDC configuration","url");let f=new URL(this.endpoints.oidc_info,this.credentials.url),h=this.buildRequest({method:"GET"});return df(f,h,{requestName:`${this.constructor.name}.fetchOpenIDConfiguration`,correlationId:o})}async getClientCredentialsToken(o={}){if(!this.tokenFetchCache)return this.fetchClientCredentialsToken(o);let f=qP,h=await this.getTokenUrl(f,o),y=this.buildTokenRequest(f,o),x=this.#a(h,y);return this.#c(x,()=>this.fetchClientCredentialsToken(o))}async getJwtBearerToken(o,f={}){if(!this.tokenFetchCache)return this.fetchJwtBearerToken(o,f);let h=FP,y=await this.getTokenUrl(h,f),x=this.buildTokenRequest(h,f);x.body.append("assertion",o);let _=this.#a(y,x);return this.#c(_,()=>this.fetchJwtBearerToken(o,f))}async getPasswordToken(o,f,h={}){if(!this.tokenFetchCache)return this.fetchPasswordToken(o,f,h);let y=UP,x=await this.getTokenUrl(y,h),_=this.buildTokenRequest(y,h);_.body.append("username",o),_.body.append("password",f);let z=this.#a(x,_);return this.#c(z,()=>this.fetchPasswordToken(o,f,h))}#a(o,f){let h={};for(let[x,_]of f.body.entries())h[x]=_;let y={url:o.toString(),...h};if(f.headers)for(let[x,_]of Object.entries(f.headers))y[`header_${x}`]=_;return MP(y)}async#c(o,f){let h=await this.tokenFetchCache.get(o);if(h){let{response:_,expiresAt:z}=h;if((z-Date.now())/1000>Br.DEFAULT_TOKEN_CACHE_LEEWAY)return _}let y=await f(),x=Date.now()+y.expires_in*1000;return await this.tokenFetchCache.set(o,{response:y,expiresAt:x}),y}async fetchClientCredentialsToken(o={}){let f=qP,h=await this.getTokenUrl(f,o),y=this.buildTokenRequest(f,o);return df(h,y,{requestName:`${this.constructor.name}.fetchClientCredentialsToken`,correlationId:o.correlationId})}async fetchPasswordToken(o,f,h={}){let y=UP,x=await this.getTokenUrl(y,h),_=this.buildTokenRequest(y,h);return _.body.append("username",o),_.body.append("password",f),df(x,_,{requestName:`${this.constructor.name}.fetchPasswordToken`,correlationId:h.correlationId})}async fetchJwtBearerToken(o,f={}){let h=FP,y=await this.getTokenUrl(h,f);f.timeout??=Yie;let x=this.buildTokenRequest(h,f);return x.body.append("assertion",o),df(y,x,{requestName:`${this.constructor.name}.fetchJwtBearerToken`,correlationId:f.correlationId})}buildRequest(o){return{timeout:this.config.requests.timeout,retry:this.config.requests.retry,...o}}buildTokenRequest(o,f){let h=this.buildRequest({method:"POST",body:new URLSearchParams({grant_type:o})});if(this.addClientAuthentication(h,f),f.timeout)h.timeout=f.timeout;if(f.token_format)h.body.append("token_format",f.token_format);return h}addClientAuthentication(o,f={}){if(this.validateCredentials("fetch token","clientid"),o.body.append("client_id",this.credentials.clientid),this.credentials.clientsecret)o.body.append("client_secret",this.credentials.clientsecret);else if(this.credentials.key&&this.credentials.certificate)o.agent=new Gie({key:this.credentials.key,cert:this.credentials.certificate});else throw new jP("Service credentials contain neither a client secret nor certificate based authentication information.")}setCertificateAndKey(o,f){this.credentials.certificate=o,this.credentials.key=f}static buildServiceConfiguration(o){if(o.validation??={},o.validation.enabled??=!0,o.validation.jwks??={},o.validation.jwks.shared??=!1,o.validation.jwks.expirationTime??=su.DEFAULT_EXPIRATION_TIME,o.validation.jwks.refreshPeriod??=su.DEFAULT_REFRESH_PERIOD,o.validation.signatureCache??={enabled:!1},o.validation.signatureCache.enabled===!1||o.validation.signatureCache.size===0)o.validation.signatureCache={enabled:!1};else if(o.validation.signatureCache.impl)o.validation.signatureCache={impl:o.validation.signatureCache.impl,enabled:!0};else o.validation.signatureCache={...Br.DEFAULT_SIGNATURE_CACHE_CONFIG,...o.validation.signatureCache,enabled:!0};o.tokenfetch??={},o.tokenfetch.cache??=Br.DEFAULT_TOKEN_CACHE_CONFIG;let f=o.tokenfetch.cache;if(f.enabled===!1||f.size===0)o.tokenfetch.cache={enabled:!1};else if(f.impl)o.tokenfetch.cache={impl:f.impl,enabled:!0};else o.tokenfetch.cache={...Br.DEFAULT_TOKEN_CACHE_CONFIG,...f,enabled:!0};if(o.requests??={},o.requests.timeout=Math.min(Qie,o.requests.timeout??Xie),o.requests.retry)if(o.requests.retry===!0)o.requests.retry=Br.DEFAULT_RETRY_CONFIG;else o.requests.retry={...Br.DEFAULT_RETRY_CONFIG,...o.requests.retry};return o}async createSecurityContext(o,f={}){throw new iu("This abstract function MUST be called on a service-specific implementation.")}async getJwks(o,f){throw new iu("This abstract function MUST be called on a service-specific implementation.")}async getTokenUrl(o,f={}){throw new iu("This abstract function MUST be called on a service-specific implementation.")}}$P.exports=Br});var ff=i(function(sPe,HP){var ese=Rn();class VP extends ese{constructor(o,{header:f,payload:h}={}){super(o,{header:f,payload:h})}get appTid(){return this.payload.app_tid??this.payload.zone_uuid}get azpAppTid(){return this.payload.azp_app_tid}get consumedApis(){return this.payload.ias_apis||[]}get customIssuer(){return this.payload.ias_iss?this.payload.iss:null}get issuer(){return this.payload.ias_iss||this.payload.iss}get idType(){return this.payload.sap_id_type}get scimId(){return this.payload.scim_id}getAppTID(){return this.appTid}getCustomIssuer(){return this.customIssuer}getZoneId(){return this.appTid}}HP.exports=VP});var Mb=i(function(aPe,GP){var Pn=c("crypto"),tse=Ab(),rse=kb(),ose=Pn.getHashes();class au{key;pubKey;constructor(o){this.key=o,this.pubKey=Pn.createPublicKey({key:o,format:"jwk"})}static fromPEM(o){let f=au.cleanUpPemKey(o),y=Pn.createPublicKey({key:f,format:"pem"}).export({format:"jwk"});return new au(y)}validateSignature(o,f){let h=f?.get(o.jwt);if(h==null)h=this.validateSignatureWithoutCache(o),f?.set(o.jwt,h);if(h!==!0)throw new rse(o)}validateSignatureWithoutCache(o){let f=au.mapAlg(o.header.alg);if(f==null||!ose.includes(f.hash))throw new tse(o,o.header.alg);let[h,y,x]=o.jwt.split("."),_=Pn.createVerify(f.hash);return _.update(`${h}.${y}`),_.verify({key:this.pubKey,...f.verifyOptions},x,"base64")}static mapAlg(o){switch(o?.toUpperCase()){case"RS256":return{hash:"RSA-SHA256"};case"RS384":return{hash:"RSA-SHA384"};case"RS512":return{hash:"RSA-SHA512"};case"PS256":return{hash:"RSA-SHA256",verifyOptions:{padding:Pn.constants.RSA_PKCS1_PSS_PADDING,saltLength:Pn.constants.RSA_PSS_SALTLEN_DIGEST}};case"PS384":return{hash:"RSA-SHA384",verifyOptions:{padding:Pn.constants.RSA_PKCS1_PSS_PADDING,saltLength:Pn.constants.RSA_PSS_SALTLEN_DIGEST}};case"PS512":return{hash:"RSA-SHA512",verifyOptions:{padding:Pn.constants.RSA_PKCS1_PSS_PADDING,saltLength:Pn.constants.RSA_PSS_SALTLEN_DIGEST}};case"ES256":return{hash:"sha256",verifyOptions:{dsaEncoding:"ieee-p1363"}};case"ES384":return{hash:"sha384",verifyOptions:{dsaEncoding:"ieee-p1363"}};case"ES512":return{hash:"sha512",verifyOptions:{dsaEncoding:"ieee-p1363"}};default:return null}}static cleanUpPemKey(o=""){if(!o.includes(`KEY-----
97
+ `))o=o.replace("KEY-----",`KEY-----
98
+ `);if(!o.includes(`
99
+ -----END`))o=o.replace("-----END",`
100
+ -----END`);return o}}GP.exports=au});var qb=i(function(cPe,WP){var nse=Mb(),ise=af();class KP{constructor(o=[]){this.keys=Object.create(null);for(let f of o)this.keys[f.kid]=new nse(f)}get(o){let f=this.keys[o];if(!f)throw new ise(o,`JWKS does not contain a key for kid=${o}`);return f}}WP.exports=KP});var cu=i(function(lPe,ZP){var sse=Rn();class JP extends sse{constructor(o,{header:f,payload:h}={}){super(o,{header:f,payload:h})}get azAttributes(){return this.payload.az_attr}get extAttributes(){return this.payload.ext_attr}get logonName(){return this.payload.user_name}get scopes(){return this.payload.scope??[]}get serviceInstanceId(){return this.payload.ext_attr?.serviceinstanceid}get subAccountId(){return this.payload.ext_attr?.subaccountid||this.zid}get userId(){return super.userId||this.payload.sub}get xsUserAttributes(){return this.payload.ext_cxt?.["xs.user.attributes"]??this.payload["xs.user.attributes"]}get xsSystemAttributes(){return this.payload.ext_cxt?.["xs.system.attributes"]??this.payload["xs.system.attributes"]}get zid(){return this.payload.zid}getXsUserAttribute(o){return this.xsUserAttributes?.[o]}getAppTID(){return this.zid}getCustomIssuer(){return this.issuer}getZoneId(){return this.zid}}ZP.exports=JP});var Oi=i(function(uPe,XP){var ase=pf(),cse=ti(),lse=ru(),lu=cu(),use=qb(),{jsonRequest:dse}=uf(),{HTTPS_SCHEME:hf,ZID_QUERY_PARAMETER:pse,ZID_HEADER:fse}=dn(),hse=nu(),{ResponseError:mse,WrongAudienceError:gse}=Is(),yse=Rn();class YP extends ase{#e;#t;constructor(o,f){super(o,f)}get endpoints(){if(!this.#e)this.#e={oidc_info:this.config.endpoints?.oidc_info||super.endpoints.oidc_info,jwks:this.config.endpoints?.jwks||"/token_keys",token:this.config.endpoints?.token||"/oauth/token"};return this.#e}acceptsTokenAudience(o){if(this.validateCredentials("validate token audience","clientid","xsappname"),!(o instanceof lu))o=new lu(null,{header:o.header,payload:o.payload});let f;if(o.audiences?.length>0)f=[...o.audiences];else if(o.scopes)f=[...o.scopes];else f=[];if(o.payload.cid)f.push(o.payload.cid);return f.some((h)=>h===this.credentials.clientid||h.startsWith(`${this.credentials.clientid}.`))||f.some((h)=>h===this.credentials.xsappname||h.startsWith(`${this.credentials.xsappname}.`))||this.credentials.clientid.includes("!b")&&f.some((h)=>h.endsWith(`|${this.credentials.xsappname}`))}async createSecurityContext(o,f={}){if(typeof o==="string")o=new lu(o);else if(o instanceof yse&&!(o instanceof lu))o=new lu(o.jwt,{header:o.header,payload:o.payload});if(cse.buildContextConfig(f),f.skipValidation!==!0&&this.config.validation.enabled!==!1)await this.validateToken(o,f);let h=new lse(this,o,f);for(let y of this.contextExtensions)h=await y.extendSecurityContext(h)??h;return h}async getJwks(o,f){let h={zid:o.zid},y={url:this.jwksBaseUrl,...h},x=hse(y),_=()=>async(C)=>({keys:(await this.fetchJwks(h,C)).keys}),z;try{z=await this.jwksCache.getOrRequest(x,_,{correlationId:f.correlationId,deserialize:(C)=>new use(C.keys)})}catch(C){if(C instanceof mse&&C.responseCode===400)throw new gse(o,this,`The online validation in the JWKS endpoint of the XSUAA server responded with 400: '${C.responseText}'. This indicates that the token should not be accepted by this service.`);throw C}return z}get jwksBaseUrl(){if(!this.#t){this.validateCredentials("fetch JWKS","uaadomain");let{uaadomain:o}=this.credentials;if(o.startsWith(hf))this.#t=o;else this.#t=`${hf}${o}`}return this.#t}async fetchJwks(o,f){let h=new URL(this.jwksBaseUrl+this.endpoints.jwks);if(o.zid)h.searchParams.append(pse,o.zid);let y=this.buildRequest({method:"GET"});return dse(h,y,{requestName:`${this.constructor.name}.fetchJwks`,correlationId:f})}async fetchClientCredentialsToken(o={}){return super.fetchClientCredentialsToken(o)}async fetchPasswordToken(o,f,h={}){return super.fetchPasswordToken(o,f,h)}async fetchJwtBearerToken(o,f={}){return super.fetchJwtBearerToken(o,f)}buildTokenRequest(o,f){let h=super.buildTokenRequest(o,f);if(f.scope)h.body.append("scope",f.scope);if(f.authorities)h.body.append("authorities",JSON.stringify({az_attr:f.authorities}));if(f.zid)h.headers??={},h.headers[fse]=f.zid;return h}async getTokenUrl(o,f={}){let{tenant:h,zid:y}=f,x;if(h||y){this.validateCredentials("build token fetch URL for custom tenant subdomain or zone id","uaadomain");let _=this.credentials.certificate?this.credentials.uaadomain.replace("authentication.","authentication.cert."):this.credentials.uaadomain;if(h&&y==null)x=`${hf}${h}.${_}`;else x=`${hf}${_}`}else if(this.credentials.certificate)this.validateCredentials("fetch token via certificate authentication","certurl"),x=this.credentials.certurl;else this.validateCredentials("fetch token via client secret authentication","url"),x=this.credentials.url;return new URL(this.endpoints.token,x)}}XP.exports=YP});var Fb=i(function(dPe,eB){var bse=Wl(),{ConfigurationError:QP}=Is(),vse=nu(),xse=tu(),{getLogger:_se}=An(),zse=Oi(),Cse=ff(),Ii=_se("XsuaaLegacyExtension.js");class mf{static IDENTITY_SERVICE_SECURITY_CONTEXT="IdentityServiceSecurityContext";static XSUAA_SECURITY_CONTEXT="XsuaaSecurityContext";static DEFAULT_CACHE_CONFIG={enabled:!0,size:100};primaryContextType;cache;constructor(o={}){if(o.primaryContextType!=null&&o.primaryContextType!=="XsuaaSecurityContext"&&o.primaryContextType!=="IdentityServiceSecurityContext")throw new QP("XsuaaLegacyExtension: 'primaryContextType' must be either 'IdentityServiceSecurityContext', 'XsuaaSecurityContext' or null/undefined (defaults to 'IdentityServiceSecurityContext').");this.primaryContextType=o.primaryContextType??"IdentityServiceSecurityContext",this.cache=this.#e(o.cache)}#e(o){if(o??=mf.DEFAULT_CACHE_CONFIG,o.enabled===!1||o.size===0)return null;else if(o.impl)return o.impl;else{let f=o.size??mf.DEFAULT_CACHE_CONFIG.size;return new bse(f)}}async extendSecurityContext(o){if(await this.appliesTo(o)){Ii.debug?.(`Applying extension to SAP Identity Service token with app_tid='${o.token.appTid}'.`);let f=await this.getXsuaaContext(o);if(this.primaryContextType==="IdentityServiceSecurityContext")return o.xsuaaContext=f,Ii.debug?.("Successfully embedded XsuaaSecurityContext under property 'xsuaaContext'."),o;else if(this.primaryContextType==="XsuaaSecurityContext")return f.iasContext=o,Ii.debug?.("Successfully swapped IdentityServiceSecurityContext to an XsuaaSecurityContext with original context embedded under 'iasContext' property."),f}else Ii.debug?.(`Skipped extension for SAP Identity Service token with app_tid='${o.token.appTid}'.`)}async appliesTo(o){return o.token.idType==="user"}async getXsuaaContext(o){let f=o.token,h=vse({ias_iss:f.issuer,app_tid:f.appTid||"",jti:f.payload.jti}),y=await this.cache?.get(h);if(y)if(y.token.remainingTime>=300)return Ii.debug?.(`Returning cached XsuaaSecurityContext for IAS token with app_tid='${f.appTid}', jti='${f.payload.jti}', ias_iss='${f.issuer}'.`),y;else Ii.debug?.(`Removing almost expired cached XsuaaSecurityContext for IAS token with app_tid='${f.appTid}', jti='${f.payload.jti}', ias_iss='${f.issuer}'.`),await this.cache.set(h,null);let x=await o.getIdToken(),_=new Cse(x),z=this.findXsuaaService(o.config.services,_);Ii.debug?.(`Fetching XSUAA token for IAS token with app_tid='${f.appTid}', jti='${f.payload.jti}', ias_iss='${f.issuer}'.`);let C=(await z.fetchJwtBearerToken(x,{zid:_.appTid})).access_token,w=await xse(z,{...o.config,jwt:C,token:void 0,skipValidation:!0});return await this.cache?.set(h,w),w}findXsuaaService(o){let f=o.filter((h)=>h instanceof zse);if(f.length<1)throw new QP("XsuaaLegacyExtension enabled but no XsuaaService instance was passed to createSecurityContext. Please pass a Service array of both IdentityService and XsuaaService (in this order).");else if(f.length>1)Ii.debug?.("Multiple XsuaaService instances were passed to createSecurityContext. The first one in the list will be used for the token exchange.");return f[0]}}eB.exports=mf});var Ga=i(function(pPe,oB){var wse=pf(),Sse=ti(),Tse=Bb(),uu=ff(),Ese=qb(),kse=Wl(),{MissingClientCertificateError:Ose,MissingIssuerError:Ise,InvalidIssuerError:Rse,UntrustedIssuerError:Ase,X5tError:Ub,ConfigurationError:tB,ResponseError:Pse,WrongAudienceError:Bse}=Is(),{parsePemCertificate:Dse}=Eb(),rB=nu(),{escapeStringForRegex:Lse}=jb(),{jsonRequest:Nse}=uf(),{APP_TID_HEADER:jse,AZP_HEADER:Mse,AZP_APP_TID_HEADER:qse,CLIENT_CERTIFICATE_HEADER:Fse,CLIENTID_HEADER:Use,HTTPS_SCHEME:$b,SERVICE_PLAN_HEADER:$se,X5T_CNF_CLAIM:Vse}=dn(),Hse=Rn(),Gse=Fb();class ri extends wse{static DEFAULT_ID_TOKEN_CACHE_CONFIG={enabled:!0,size:100};#e;constructor(o,f){super(o,f);if(this.config=ri.buildServiceConfiguration(this.config),this.config.xsuaaLegacyExtension){let h=this.config.xsuaaLegacyExtension===!0?{}:this.config.xsuaaLegacyExtension;this.contextExtensions.push(new Gse(h))}}async createSecurityContext(o,f={}){if(typeof o==="string")o=new uu(o);else if(o instanceof Hse&&!(o instanceof uu))o=new uu(o.jwt,{header:o.header,payload:o.payload});if(Sse.buildContextConfig(f),f.skipValidation!==!0&&this.config.validation.enabled!==!1){if(this.#i(o)||this.hasX5tEnabled())if(f.clientCertificatePem==null)throw new Ose;else f.clientCertificate=Dse(f.clientCertificatePem);await this.validateToken(o,f)}let h=new Tse(this,o,f);for(let y of this.contextExtensions)h=await y.extendSecurityContext(h)??h;return h}async validateToken(o,f){if(this.hasX5tEnabled())ri.validateTokenOwnership(o,f.clientCertificate);await super.validateToken(o,f)}async getJwks(o,f){this.validateCredentials("fetch JWKS","clientid","url");let h=ri.getSafeUrlFromTokenIssuer(o,this.credentials.domains),y={clientid:this.credentials.clientid,app_tid:o.appTid,azp:o.azp,azp_app_tid:o.azpAppTid},x={url:h,...y},_=this.#i(o);if(_)x.certSub=f.clientCertificate?.subject,y.clientCertificatePem=f.clientCertificatePem?.replaceAll("\\n","").replaceAll(`
101
+ `,"");let z=rB(x),C=()=>{let k=h===this.credentials.url?this:this.#n(o),O=_?"headers":null;return async(R)=>{let I=await k.fetchJwks(y,{correlationId:R,extractHeaders:O});return{keys:I.keys,servicePlans:_?I.headers.get($se)?.split(",").map((A)=>A.replaceAll('"',"")):null}}},w;try{w=await this.jwksCache.getOrRequest(z,C,{correlationId:f.correlationId,deserialize:(k)=>({jwks:new Ese(k.keys),servicePlans:k.servicePlans})})}catch(k){if(k instanceof Pse&&k.responseCode===400&&k.request.name===`${this.constructor.name}.fetchJwks`)throw new Bse(o,this,`The online validation in the JWKS endpoint of the Identity Service instance responded with 400: '${k.responseText}'. This indicates that the token should not be accepted by this service.`);throw k}let{jwks:S,servicePlans:E}=w;if(_)f.servicePlans=E;return S}async fetchJwks({clientid:o,app_tid:f,azp:h,azp_app_tid:y,clientCertificatePem:x},{correlationId:_,extractHeaders:z}){let w=(await this.getOpenIDConfiguration({correlationId:_})).jwks_uri,S=this.buildRequest({method:"GET",headers:{[Use]:o}});if(f!=null)S.headers[jse]=f;if(h!=null)S.headers[Mse]=h;if(y!=null)S.headers[qse]=y;if(x!=null)S.headers[Fse]=x;return Nse(w,S,{requestName:`${this.constructor.name}.fetchJwks`,correlationId:_,extractHeaders:z})}async fetchClientCredentialsToken(o={}){return super.fetchClientCredentialsToken(o)}async fetchPasswordToken(o,f,h={}){return super.fetchPasswordToken(o,f,h)}async fetchJwtBearerToken(o,f={}){let h=f.app_tid;if(h===void 0)h=new uu(o).appTid??null;return super.fetchJwtBearerToken(o,{...f,app_tid:h})}async _getIdToken(o,f={}){if(o.idType==="app")throw new tB("ID tokens cannot be retrieved for technical users.");if(!this.#t(o))return o.jwt;if(this.idTokenCache)return this.#r(o,f);else return this.#o(o,f)}#t(o){return o.audiences.length===1&&o.audiences[0]!==o.azp}async#r(o,f={}){let h=rB({ias_iss:o.issuer,app_tid:o.appTid||"",jti:o.payload.jti}),y=await this.idTokenCache.get(h);if(y)if(new uu(y).remainingTime>=300)return y;else await this.idTokenCache.set(h,null);return y=await this.#o(o,f),await this.idTokenCache.set(h,y),y}async#o(o,f={}){return(await this.#n(o).fetchJwtBearerToken(o.jwt,{token_format:"jwt",refresh_expiry:0,...f})).id_token}get idTokenCache(){if(this.#e===void 0)if(this.config.idTokenCache?.impl)this.#e=this.config.idTokenCache.impl;else if(this.config.idTokenCache?.enabled!==!1)this.#e=new kse(this.config.idTokenCache.size);else this.#e=null;return this.#e}buildTokenRequest(o,f){let h=super.buildTokenRequest(o,f);if(f.resource)[f.resource].flatMap((y)=>y).forEach((y)=>h.body.append("resource",y));if(f.refresh_expiry!=null)h.body.append("refresh_expiry",f.refresh_expiry);return h}addClientAuthentication(o,f={}){super.addClientAuthentication(o,f);let h=f.app_tid===void 0?this.credentials.app_tid:f.app_tid;if(h!=null)o.body.append("app_tid",h)}async getTokenUrl(o,f={}){let{correlationId:h}=f,y=await this.getOpenIDConfiguration({correlationId:h});if(!y.grant_types_supported.includes(o))throw new tB(`This Identity Service instance does not support grant type ${o} according to its openid-configuration.`);return new URL(y.token_endpoint)}hasProofTokenEnabled(){return this.config.validation?.proofToken?.enabled}hasX5tEnabled(){return this.config.validation?.x5t?.enabled}#i(o){return this.hasProofTokenEnabled()&&o.audiences.length>1}#n(o){return new ri({...this.credentials,url:ri.getSafeUrlFromTokenIssuer(o,this.credentials.domains)},this.config)}static getSafeUrlFromTokenIssuer=function(o,f=[]){let h=o?.issuer;if(!h)throw new Ise(o);let y=h.startsWith($b)?h:`${$b}${h}`;try{new URL(y)}catch(_){throw new Rse(o,_)}let x=y.substring($b.length);for(let _ of f){let z=`^[a-zA-Z0-9-]{1,63}\\.${Lse(_)}$`;if(x===_||x.match(new RegExp(z)))return y}throw new Ase(o,h,f)};static validateTokenOwnership(o,f){let h=o.payload.cnf?.[Vse];if(!h)throw new Ub(o,f,"X5t validation failed because x5t thumbprint could not be found in token.");let y;try{y=Buffer.from(f.fingerprint256.replaceAll(":",""),"hex").toString("base64url")}catch(x){throw new Ub(o,f,"x5t validation failed because x5t thumbprint could not be calculated from client certificate.")}if(h!==y)throw new Ub(o,f,"x5t thumbprint did not match the thumbprint of the provided client certificate.")}static buildServiceConfiguration(o){if(o.idTokenCache??=ri.DEFAULT_ID_TOKEN_CACHE_CONFIG,o.idTokenCache.enabled===!1||o.idTokenCache.size===0)o.idTokenCache={enabled:!1};else if(o.idTokenCache.impl)o.idTokenCache={impl:o.idTokenCache.impl,enabled:!0};else o.idTokenCache={...ri.DEFAULT_ID_TOKEN_CACHE_CONFIG,...o.idTokenCache,enabled:!0};return o}}oB.exports=ri});var Vb=i(function(fPe,iB){var Kse=cu();class nB extends Kse{}iB.exports=nB});var gf=i(function(hPe,aB){var Wse=ti(),Jse=Lb(),Hb=Vb(),Zse=Mb(),Yse=af(),Xse=Ob(),{getLogger:Qse}=An(),eae=Oi(),tae=Rn(),Gb=Qse("XsaService.js");class sB extends eae{constructor(o,f){super(o,f)}async createSecurityContext(o,f={}){if(typeof o==="string")o=new Hb(o);else if(o instanceof tae&&!(o instanceof Hb))o=new Hb(o.jwt,{header:o.header,payload:o.payload});if(Wse.buildContextConfig(f),f.skipValidation!==!0&&this.config.validation.enabled!==!1)await this.validateToken(o,f);let h=new Jse(this,o,f);for(let y of this.contextExtensions)h=await y.extendSecurityContext(h)??h;return h}async validateTokenSignature(o,f){let h=this.credentials.verificationkey;if(!o.header.jku||!o.header.kid||o.header.kid=="legacy-token-key")return Gb.info("Token header contained no JKU or KID or the KID was 'legacy-token-key'"),this.#e(o,h);try{await super.validateTokenSignature(o,f)}catch(y){if(y instanceof Yse)return Gb.info("JWKS did not contain kid."),this.#e(o,h);else throw y}}#e(o,f){if(!f)throw new Xse;else return Gb.info("Validating token signature with verificationkey from service configuration."),Zse.fromPEM(f).validateSignature(o)}async fetchClientCredentialsToken(o={}){return super.fetchClientCredentialsToken(o)}async fetchPasswordToken(o,f,h={}){return super.fetchPasswordToken(o,f,h)}async fetchJwtBearerToken(o,f={}){return super.fetchJwtBearerToken(o,f)}async getTokenUrl(o){let f;if(this.credentials.certificate)this.validateCredentials("fetch token via certificate authentication","certurl"),f=this.credentials.certurl;else this.validateCredentials("fetch token via client secret authentication","url"),f=this.credentials.url;return new URL(this.endpoints.token,f)}get jwksBaseUrl(){return this.validateCredentials("fetch JWKS","url"),this.credentials.url}}aB.exports=sB});var Kb=i(function(mPe,lB){var rae=cu();class cB extends rae{}lB.exports=cB});var Wb=i(function(gPe,dB){var oae=ti(),nae=Nb(),iae=Rn(),du=Kb(),sae=Oi();class uB extends sae{constructor(o,f){super(o,f)}async createSecurityContext(o,f={}){if(typeof o==="string")o=new du(o);else if(o instanceof iae&&!(o instanceof du))o=new du(o.jwt,{header:o.header,payload:o.payload});if(oae.buildContextConfig(f),f.skipValidation!==!0&&this.config.validation.enabled!==!1)await this.validateToken(o,f);let h=new nae(this,o,f);for(let y of this.contextExtensions)h=await y.extendSecurityContext(h)??h;return h}acceptsTokenAudience(o){if(this.validateCredentials("validate token audience","clientid"),!(o instanceof du))o=new du(null,{header:o.header,payload:o.payload});let f=o.audiences?.length>0?o.audiences:o.scopes??[];if(o.payload.cid)f.push(o.payload.cid);return f.some((h)=>h===this.credentials.clientid||h.startsWith(`${this.credentials.clientid}.`))}}dB.exports=uB});var fB=i(function(yPe,pB){var aae=tu(),cae=Os(),lae=un(),{getLogger:uae}=An(),dae=uae("XssecPassportStrategy.js");class Jb{services;reqProperty;constructor(o,f="securityContext"){this.name="JWT",this.services=o,this.reqProperty=f}async authenticate(o,f={}){try{let h=await aae(this.services,{req:o});if(f.scope){if(typeof h.checkScope!=="function")return this.error(new cae("XssecPassportStrategy was configured with scope but the authentication was performed via a Service whose SecurityContext does not support checkLocalScope."));if(![f.scope].flatMap((_)=>_).some((_)=>h.checkLocalScope(_)))return this.fail("Token is missing required scope.",403)}let y=Jb.#e(h.token);return o[this.reqProperty]=h,o.tokenInfo=h.token,this.success(y,h)}catch(h){if(o.xssecError=h,h instanceof lae)return dae.debug("ValidationError:",h),this.fail(401);else return this.error(h)}}static#e(o){return{id:o.logonName||o.userName,name:{givenName:o.givenName,familyName:o.familyName},emails:[{value:o.email}]}}}pB.exports=Jb});var mB=i(function(bPe,hB){var pae=Ga(),fae=Oi(),hae=gf(),mae=Wb();hB.exports=gae;function gae(o,f){if(o.xsappname&&o.uaadomain)return new fae(o,f);else if(o.xsappname&&o.uaadomain==null)return new hae(o,f);else if(o.xsappname==null&&o.uaadomain)return new mae(o,f);else return new pae(o,f)}});var Yb=i(function(vPe,yB){var yae=tu(),Zb=Os(),{getLogger:bae}=An(),vae=Oi(),xae=Ga(),_ae=Ga(),zae=mB(),Cae=un(),wae=gf(),gB=bae("createSecurityContextV3.js");async function Sae(o,f,h,y){if(typeof h==="function")y=h,h=null;if(y==null||typeof y!=="function")throw new Zb("The callback parameter must be a function.");let x;try{if(f==null)throw new Zb("The configParameter parameter must not be null or undefined.");else if(o==null)throw new Zb("The jwt parameter must not be null or undefined.");let _=Tae(f,o),z=Eae(f),C=kae(_.credentials,h,z);x=await yae(C,_)}catch(_){if(_ instanceof Cae)return y(_,null,{isValid:()=>!1,getErrorObject:()=>_});return y(_)}return y(null,x,x.token)}function Tae(o,f){let h=o.credentials?o:{credentials:o};return h.jwt=f,h.correlationId??=h.credentials.correlationId,h.clientCertificatePem??=h.x509Certificate??h.credentials.x509Certificate,h.skipValidation??=h.credentials.skipValidation,h}function Eae(o){let f={};if(f.endpoints??=o.endpoints||{},f.validation??=o.validation||{},f.validation.x5t??={},f.validation.x5t.enabled??=o.x5tValidation,f.validation.jwks??=o.jwksCache||{},f.validation.jwks.shared=!0,f.validation.signatureCache=o.signatureCache,f.requests=o.requests||{},o.disableCache)gB.warn("The 'disableCache' option to disable the JWKS cache is not supported by the v3 compatibility package. The cache is always enabled.");return f}function kae(o,f,h){let y=Array.isArray(o)?o:[o];if(Oae(y),f)gB.info(`forceType === ${f}. Creating ${f} service(s) from credentials.`);switch(f){case"XSUAA":return y.map((x)=>new vae(x,h));case"XSA":return y.map((x)=>new wae(x,h));case"IAS":return y.map((x)=>new xae(x,h));case"UAA":return y.map((x)=>new _ae(x,h));case null:case void 0:default:return y.map((x)=>zae(x,h))}}function Oae(o){if(process.env.XSAPPNAME)for(let f of o)f.xsappname=process.env.XSAPPNAME}yB.exports=Sae});var vB=i(function(xPe,bB){var Xb=Ga(),Qb=Oi();async function Iae(o,f,h,y,x){if(typeof y==="function")x=y,y=null;let _=f.credentials??f,z=f.type?.toUpperCase()==="IAS"?new Xb(_):new Qb(_),C={authorities:h,correlationId:f.correlationId,resource:f.resource,scope:f.scopes,tenant:o,timeout:f.timeout,app_tid:y};try{let w=await z.fetchClientCredentialsToken(C);return x(null,w.access_token,w)}catch(w){return x(w)}}async function Rae(o,f,h,y){let x=f.credentials??f,_=f.type?.toUpperCase()==="IAS"?new Xb(x):new Qb(x),z={authorities:h,correlationId:f.correlationId,resource:f.resource,scope:f.scopes,tenant:o,timeout:f.timeout};try{let C=await _.fetchPasswordToken(f.username,f.password,z);return y(null,f.type?.toUpperCase()==="IAS"?C.id_token:C.access_token,C)}catch(C){return y(C)}}async function Aae(o,f,h,y,x,_,z){if(typeof _==="function")z=_,_=null;let C=f.credentials??f,w=f.type?.toUpperCase()==="IAS"?new Xb(C):new Qb(C),S={authorities:h,correlationId:f.correlationId,resource:f.resource,scope:y??f.scopes,tenant:x,timeout:f.timeout,app_tid:_,zid:_};try{let E=await w.fetchJwtBearerToken(o,S);return z(null,f.type?.toUpperCase()==="IAS"?E.id_token:E.access_token,E)}catch(E){return z(E)}}bB.exports={requestClientCredentialsToken:Iae,requestPasswordUserToken:Rae,requestUserToken:Aae}});var ev=i(function(Dr){Object.defineProperty(Dr,"XSAPPNAMEPREFIX",{value:"$XSAPPNAME.",enumerable:!0,writable:!1,configurable:!1});Object.defineProperty(Dr,"SYSTEM",{value:"System",enumerable:!0,writable:!1,configurable:!1});Object.defineProperty(Dr,"JOBSCHEDULER",{value:"JobScheduler",enumerable:!0,writable:!1,configurable:!1});Object.defineProperty(Dr,"HDB",{value:"HDB",enumerable:!0,writable:!1,configurable:!1});Object.defineProperty(Dr,"GRANTTYPE_AUTHCODE",{value:"authorization_code",enumerable:!0,writable:!1,configurable:!1});Object.defineProperty(Dr,"GRANTTYPE_PASSWORD",{value:"password",enumerable:!0,writable:!1,configurable:!1});Object.defineProperty(Dr,"GRANTTYPE_CLIENTCREDENTIAL",{value:"client_credentials",enumerable:!0,writable:!1,configurable:!1});Object.defineProperty(Dr,"GRANTTYPE_USERTOKEN",{value:"user_token",enumerable:!0,writable:!1,configurable:!1});Object.defineProperty(Dr,"GRANTTYPE_SAML2BEARER",{value:"urn:ietf:params:oauth:grant-type:saml2-bearer",enumerable:!0,writable:!1,configurable:!1});Object.defineProperty(Dr,"TYPE_USER_TOKEN",{value:0,enumerable:!0,writable:!1,configurable:!1});Object.defineProperty(Dr,"TYPE_CLIENT_CREDENTIALS_TOKEN",{value:1,enumerable:!0,writable:!1,configurable:!1});Object.defineProperty(Dr,"USER_AGENT",{value:"nodejs-xssec-3",enumerable:!0,writable:!1,configurable:!1});Object.defineProperty(Dr,"FWD_CLIENT_CERT_HEADER",{value:"x-forwarded-client-cert",enumerable:!0,writable:!1,configurable:!1});Object.defineProperty(Dr,"CNF_X5T_CLAIM",{value:"x5t#S256",enumerable:!0,writable:!1,configurable:!1});Object.defineProperty(Dr,"PEM_HEADER",{value:"-----BEGIN CERTIFICATE-----",enumerable:!0,writable:!1,configurable:!1});Object.defineProperty(Dr,"PEM_FOOTER",{value:"-----END CERTIFICATE-----",enumerable:!0,writable:!1,configurable:!1})});var _B=i(function(zPe,xB){var Pae=Yb(),{getLogger:Bae}=An(),{FWD_CLIENT_CERT_HEADER:Dae}=ev(),yf=Bae("XssecPassportStrategyV3.js");function vf(o,f){this.options=o,this.name="JWT",this._forceType=f}function bf(o){let f=Error(o);this.getErrorObject=function(){return f}}vf.prototype.authenticate=function(o,f){var h=o.headers.authorization;let y=f;if(!h)return yf.debug("Missing Authorization header"),o.tokenInfo=new bf("Missing Authorization header"),this.fail(401);var x=h.split(" ");if(x.length<2)return yf.debug("Invalid Authorization header format"),o.tokenInfo=new bf("Invalid Authorization header format"),this.fail(400);var _=x[0],z=x[1];if(_.toLowerCase()!=="bearer")return yf.debug("Authorization header is not a Bearer token"),o.tokenInfo=new bf("Authorization header is not a Bearer token"),this.fail(401);let C=o.headers["x-correlationid"]||o.headers["x-vcap-request-id"],w=o.headers[Dae];try{let O=function(I,A,M){if(o.tokenInfo=M,I){if(!o.tokenInfo)o.tokenInfo=new bf(I.toString());return I.statuscode?S.fail(I.statuscode,I):S.error(I)}if(y&&y.scope){var D=Array.isArray(y.scope)?y.scope:[y.scope];for(var U of D)if(!A.checkScope(S.options.xsappname+"."+U))return S.fail(403)}var F=A.getLogonName(),J=A.getGivenName(),Q=A.getFamilyName(),te=A.getEmail(),le=!F?{}:{id:F,name:{givenName:J,familyName:Q},emails:[{value:te}]};S.success(le,A)};var S=this,E=this._forceType?this._forceType:O,k=this._forceType?O:void 0;let R={...f,credentials:this.options,correlationId:C};if(w)R.x509Certificate=w;Pae(z,R,E,k)}catch(O){yf.error("JWT verification error: ",O),this.error(O)}};vf.JWTStrategy=vf;xB.exports=vf});var CB=i(function(CPe,zB){var Lae=Yb(),Nae=vB(),jae=ev(),Mae=Rn(),qae=_B();zB.exports={createSecurityContext:Lae,requests:Nae,constants:jae,TokenInfo:Mae,JWTStrategy:qae}});var SB=i(function(wPe,wB){wB.exports={}});var EB=i(function(SPe,TB){var Fae=Symbol("XSSEC_SECURITY_CONTEXT");TB.exports=Fae});var xf=i(function(TPe,kB){var Uae=tu(),$ae=ti(),Vae=Bb(),Hae=ru(),Gae=Lb(),Kae=Nb(),Wae=pf(),Jae=Ga(),Zae=Oi(),Yae=gf(),Xae=Wb(),Qae=fB(),ece=Rn(),tce=ff(),rce=cu(),oce=Vb(),nce=Kb(),ice=Is(),sce=dn(),ace=CB(),cce=SB(),lce=EB(),uce=Fb();kB.exports={createSecurityContext:Uae,SecurityContext:$ae,IdentityServiceSecurityContext:Vae,XsuaaSecurityContext:Hae,XsaSecurityContext:Gae,UaaSecurityContext:Kae,Service:Wae,IdentityService:Jae,XsuaaService:Zae,XsaService:Yae,UaaService:Xae,XssecPassportStrategy:Qae,Token:ece,IdentityServiceToken:tce,XsuaaToken:rce,XsaToken:oce,UaaToken:nce,errors:ice,constants:sce,v3:ace,Types:cce,SECURITY_CONTEXT:lce,XsuaaLegacyExtension:uce}});var tv=i(function(EPe,OB){var dce=gc();OB.exports=function(o,f){f=f||{};var h=dce.decode(o,f);if(!h)return null;var y=h.payload;if(typeof y==="string")try{var x=JSON.parse(y);if(x!==null&&typeof x==="object")y=x}catch(_){}if(f.complete===!0)return{header:h.header,payload:y,signature:h.signature};return y}});var pu=i(function(kPe,IB){var _f=function(o,f){if(Error.call(this,o),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);if(this.name="JsonWebTokenError",this.message=o,f)this.inner=f};_f.prototype=Object.create(Error.prototype);_f.prototype.constructor=_f;IB.exports=_f});var rv=i(function(OPe,AB){var RB=pu(),zf=function(o,f){RB.call(this,o),this.name="NotBeforeError",this.date=f};zf.prototype=Object.create(RB.prototype);zf.prototype.constructor=zf;AB.exports=zf});var ov=i(function(IPe,BB){var PB=pu(),Cf=function(o,f){PB.call(this,o),this.name="TokenExpiredError",this.expiredAt=f};Cf.prototype=Object.create(PB.prototype);Cf.prototype.constructor=Cf;BB.exports=Cf});var nv=i(function(RPe,DB){var pce=Sm();DB.exports=function(o,f){var h=f||Math.floor(Date.now()/1000);if(typeof o==="string"){var y=pce(o);if(typeof y>"u")return;return Math.floor(h+y/1000)}else if(typeof o==="number")return h+o;else return}});var Ka=i(function(APe,LB){var fce=Number.MAX_SAFE_INTEGER||9007199254740991,hce=["major","premajor","minor","preminor","patch","prepatch","prerelease"];LB.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:fce,RELEASE_TYPES:hce,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var fu=i(function(PPe,NB){var mce=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...o)=>console.error("SEMVER",...o):()=>{};NB.exports=mce});var Wa=i(function(Bn,jB){var{MAX_SAFE_COMPONENT_LENGTH:iv,MAX_SAFE_BUILD_LENGTH:gce,MAX_LENGTH:yce}=Ka(),bce=fu();Bn=jB.exports={};var vce=Bn.re=[],xce=Bn.safeRe=[],Oe=Bn.src=[],_ce=Bn.safeSrc=[],Ie=Bn.t={},zce=0,sv="[a-zA-Z0-9-]",Cce=[["\\s",1],["\\d",yce],[sv,gce]],wce=(o)=>{for(let[f,h]of Cce)o=o.split(`${f}*`).join(`${f}{0,${h}}`).split(`${f}+`).join(`${f}{1,${h}}`);return o},Je=(o,f,h)=>{let y=wce(f),x=zce++;bce(o,x,f),Ie[o]=x,Oe[x]=f,_ce[x]=y,vce[x]=new RegExp(f,h?"g":void 0),xce[x]=new RegExp(y,h?"g":void 0)};Je("NUMERICIDENTIFIER","0|[1-9]\\d*");Je("NUMERICIDENTIFIERLOOSE","\\d+");Je("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${sv}*`);Je("MAINVERSION",`(${Oe[Ie.NUMERICIDENTIFIER]})\\.(${Oe[Ie.NUMERICIDENTIFIER]})\\.(${Oe[Ie.NUMERICIDENTIFIER]})`);Je("MAINVERSIONLOOSE",`(${Oe[Ie.NUMERICIDENTIFIERLOOSE]})\\.(${Oe[Ie.NUMERICIDENTIFIERLOOSE]})\\.(${Oe[Ie.NUMERICIDENTIFIERLOOSE]})`);Je("PRERELEASEIDENTIFIER",`(?:${Oe[Ie.NONNUMERICIDENTIFIER]}|${Oe[Ie.NUMERICIDENTIFIER]})`);Je("PRERELEASEIDENTIFIERLOOSE",`(?:${Oe[Ie.NONNUMERICIDENTIFIER]}|${Oe[Ie.NUMERICIDENTIFIERLOOSE]})`);Je("PRERELEASE",`(?:-(${Oe[Ie.PRERELEASEIDENTIFIER]}(?:\\.${Oe[Ie.PRERELEASEIDENTIFIER]})*))`);Je("PRERELEASELOOSE",`(?:-?(${Oe[Ie.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${Oe[Ie.PRERELEASEIDENTIFIERLOOSE]})*))`);Je("BUILDIDENTIFIER",`${sv}+`);Je("BUILD",`(?:\\+(${Oe[Ie.BUILDIDENTIFIER]}(?:\\.${Oe[Ie.BUILDIDENTIFIER]})*))`);Je("FULLPLAIN",`v?${Oe[Ie.MAINVERSION]}${Oe[Ie.PRERELEASE]}?${Oe[Ie.BUILD]}?`);Je("FULL",`^${Oe[Ie.FULLPLAIN]}$`);Je("LOOSEPLAIN",`[v=\\s]*${Oe[Ie.MAINVERSIONLOOSE]}${Oe[Ie.PRERELEASELOOSE]}?${Oe[Ie.BUILD]}?`);Je("LOOSE",`^${Oe[Ie.LOOSEPLAIN]}$`);Je("GTLT","((?:<|>)?=?)");Je("XRANGEIDENTIFIERLOOSE",`${Oe[Ie.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Je("XRANGEIDENTIFIER",`${Oe[Ie.NUMERICIDENTIFIER]}|x|X|\\*`);Je("XRANGEPLAIN",`[v=\\s]*(${Oe[Ie.XRANGEIDENTIFIER]})(?:\\.(${Oe[Ie.XRANGEIDENTIFIER]})(?:\\.(${Oe[Ie.XRANGEIDENTIFIER]})(?:${Oe[Ie.PRERELEASE]})?${Oe[Ie.BUILD]}?)?)?`);Je("XRANGEPLAINLOOSE",`[v=\\s]*(${Oe[Ie.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Oe[Ie.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Oe[Ie.XRANGEIDENTIFIERLOOSE]})(?:${Oe[Ie.PRERELEASELOOSE]})?${Oe[Ie.BUILD]}?)?)?`);Je("XRANGE",`^${Oe[Ie.GTLT]}\\s*${Oe[Ie.XRANGEPLAIN]}$`);Je("XRANGELOOSE",`^${Oe[Ie.GTLT]}\\s*${Oe[Ie.XRANGEPLAINLOOSE]}$`);Je("COERCEPLAIN",`(^|[^\\d])(\\d{1,${iv}})(?:\\.(\\d{1,${iv}}))?(?:\\.(\\d{1,${iv}}))?`);Je("COERCE",`${Oe[Ie.COERCEPLAIN]}(?:$|[^\\d])`);Je("COERCEFULL",Oe[Ie.COERCEPLAIN]+`(?:${Oe[Ie.PRERELEASE]})?(?:${Oe[Ie.BUILD]})?(?:$|[^\\d])`);Je("COERCERTL",Oe[Ie.COERCE],!0);Je("COERCERTLFULL",Oe[Ie.COERCEFULL],!0);Je("LONETILDE","(?:~>?)");Je("TILDETRIM",`(\\s*)${Oe[Ie.LONETILDE]}\\s+`,!0);Bn.tildeTrimReplace="$1~";Je("TILDE",`^${Oe[Ie.LONETILDE]}${Oe[Ie.XRANGEPLAIN]}$`);Je("TILDELOOSE",`^${Oe[Ie.LONETILDE]}${Oe[Ie.XRANGEPLAINLOOSE]}$`);Je("LONECARET","(?:\\^)");Je("CARETTRIM",`(\\s*)${Oe[Ie.LONECARET]}\\s+`,!0);Bn.caretTrimReplace="$1^";Je("CARET",`^${Oe[Ie.LONECARET]}${Oe[Ie.XRANGEPLAIN]}$`);Je("CARETLOOSE",`^${Oe[Ie.LONECARET]}${Oe[Ie.XRANGEPLAINLOOSE]}$`);Je("COMPARATORLOOSE",`^${Oe[Ie.GTLT]}\\s*(${Oe[Ie.LOOSEPLAIN]})$|^$`);Je("COMPARATOR",`^${Oe[Ie.GTLT]}\\s*(${Oe[Ie.FULLPLAIN]})$|^$`);Je("COMPARATORTRIM",`(\\s*)${Oe[Ie.GTLT]}\\s*(${Oe[Ie.LOOSEPLAIN]}|${Oe[Ie.XRANGEPLAIN]})`,!0);Bn.comparatorTrimReplace="$1$2$3";Je("HYPHENRANGE",`^\\s*(${Oe[Ie.XRANGEPLAIN]})\\s+-\\s+(${Oe[Ie.XRANGEPLAIN]})\\s*$`);Je("HYPHENRANGELOOSE",`^\\s*(${Oe[Ie.XRANGEPLAINLOOSE]})\\s+-\\s+(${Oe[Ie.XRANGEPLAINLOOSE]})\\s*$`);Je("STAR","(<|>)?=?\\s*\\*");Je("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Je("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var wf=i(function(BPe,MB){var Sce=Object.freeze({loose:!0}),Tce=Object.freeze({}),Ece=(o)=>{if(!o)return Tce;if(typeof o!=="object")return Sce;return o};MB.exports=Ece});var av=i(function(DPe,UB){var qB=/^[0-9]+$/,FB=(o,f)=>{if(typeof o==="number"&&typeof f==="number")return o===f?0:o<f?-1:1;let h=qB.test(o),y=qB.test(f);if(h&&y)o=+o,f=+f;return o===f?0:h&&!y?-1:y&&!h?1:o<f?-1:1},kce=(o,f)=>FB(f,o);UB.exports={compareIdentifiers:FB,rcompareIdentifiers:kce}});var Lr=i(function(LPe,VB){var Sf=fu(),{MAX_LENGTH:$B,MAX_SAFE_INTEGER:Tf}=Ka(),{safeRe:Ef,t:kf}=Wa(),Oce=wf(),{compareIdentifiers:cv}=av(),Ice=(o,f)=>{let h=f.split(".");if(h.length>o.length)return!1;for(let y=0;y<h.length;y++)if(cv(o[y],h[y])!==0)return!1;return!0};class fn{constructor(o,f){if(f=Oce(f),o instanceof fn)if(o.loose===!!f.loose&&o.includePrerelease===!!f.includePrerelease)return o;else o=o.version;else if(typeof o!=="string")throw TypeError(`Invalid version. Must be a string. Got type "${typeof o}".`);if(o.length>$B)throw TypeError(`version is longer than ${$B} characters`);Sf("SemVer",o,f),this.options=f,this.loose=!!f.loose,this.includePrerelease=!!f.includePrerelease;let h=o.trim().match(f.loose?Ef[kf.LOOSE]:Ef[kf.FULL]);if(!h)throw TypeError(`Invalid Version: ${o}`);if(this.raw=o,this.major=+h[1],this.minor=+h[2],this.patch=+h[3],this.major>Tf||this.major<0)throw TypeError("Invalid major version");if(this.minor>Tf||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>Tf||this.patch<0)throw TypeError("Invalid patch version");if(!h[4])this.prerelease=[];else this.prerelease=h[4].split(".").map((y)=>{if(/^[0-9]+$/.test(y)){let x=+y;if(x>=0&&x<Tf)return x}return y});this.build=h[5]?h[5].split("."):[],this.format()}format(){if(this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length)this.version+=`-${this.prerelease.join(".")}`;return this.version}toString(){return this.version}compare(o){if(Sf("SemVer.compare",this.version,this.options,o),!(o instanceof fn)){if(typeof o==="string"&&o===this.version)return 0;o=new fn(o,this.options)}if(o.version===this.version)return 0;return this.compareMain(o)||this.comparePre(o)}compareMain(o){if(!(o instanceof fn))o=new fn(o,this.options);if(this.major<o.major)return-1;if(this.major>o.major)return 1;if(this.minor<o.minor)return-1;if(this.minor>o.minor)return 1;if(this.patch<o.patch)return-1;if(this.patch>o.patch)return 1;return 0}comparePre(o){if(!(o instanceof fn))o=new fn(o,this.options);if(this.prerelease.length&&!o.prerelease.length)return-1;else if(!this.prerelease.length&&o.prerelease.length)return 1;else if(!this.prerelease.length&&!o.prerelease.length)return 0;let f=0;do{let h=this.prerelease[f],y=o.prerelease[f];if(Sf("prerelease compare",f,h,y),h===void 0&&y===void 0)return 0;else if(y===void 0)return 1;else if(h===void 0)return-1;else if(h===y)continue;else return cv(h,y)}while(++f)}compareBuild(o){if(!(o instanceof fn))o=new fn(o,this.options);let f=0;do{let h=this.build[f],y=o.build[f];if(Sf("build compare",f,h,y),h===void 0&&y===void 0)return 0;else if(y===void 0)return 1;else if(h===void 0)return-1;else if(h===y)continue;else return cv(h,y)}while(++f)}inc(o,f,h){if(o.startsWith("pre")){if(!f&&h===!1)throw Error("invalid increment argument: identifier is empty");if(f){let y=`-${f}`.match(this.options.loose?Ef[kf.PRERELEASELOOSE]:Ef[kf.PRERELEASE]);if(!y||y[1]!==f)throw Error(`invalid identifier: ${f}`)}}switch(o){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",f,h);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",f,h);break;case"prepatch":this.prerelease.length=0,this.inc("patch",f,h),this.inc("pre",f,h);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",f,h);this.inc("pre",f,h);break;case"release":if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0,this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":{let y=Number(h)?1:0;if(this.prerelease.length===0)this.prerelease=[y];else{let x=this.prerelease.length;while(--x>=0)if(typeof this.prerelease[x]==="number")this.prerelease[x]++,x=-2;if(x===-1){if(f===this.prerelease.join(".")&&h===!1)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(y)}}if(f){let x=[f,y];if(h===!1)x=[f];if(Ice(this.prerelease,f)){let _=this.prerelease[f.split(".").length];if(isNaN(_))this.prerelease=x}else this.prerelease=x}break}default:throw Error(`invalid increment argument: ${o}`)}if(this.raw=this.format(),this.build.length)this.raw+=`+${this.build.join(".")}`;return this}}VB.exports=fn});var Ri=i(function(NPe,GB){var HB=Lr(),Rce=(o,f,h=!1)=>{if(o instanceof HB)return o;try{return new HB(o,f)}catch(y){if(!h)return null;throw y}};GB.exports=Rce});var WB=i(function(jPe,KB){var Ace=Ri(),Pce=(o,f)=>{let h=Ace(o,f);return h?h.version:null};KB.exports=Pce});var ZB=i(function(MPe,JB){var Bce=Ri(),Dce=(o,f)=>{let h=Bce(o.trim().replace(/^[=v]+/,""),f);return h?h.version:null};JB.exports=Dce});var QB=i(function(qPe,XB){var YB=Lr(),Lce=(o,f,h,y,x)=>{if(typeof h==="string")x=y,y=h,h=void 0;try{return new YB(o instanceof YB?o.version:o,h).inc(f,y,x).version}catch(_){return null}};XB.exports=Lce});var rD=i(function(FPe,tD){var eD=Ri(),Nce=(o,f)=>{let h=eD(o,null,!0),y=eD(f,null,!0),x=h.compare(y);if(x===0)return null;let _=x>0,z=_?h:y,C=_?y:h,w=!!z.prerelease.length;if(!!C.prerelease.length&&!w){if(!C.patch&&!C.minor)return"major";if(C.compareMain(z)===0){if(C.minor&&!C.patch)return"minor";return"patch"}}let E=w?"pre":"";if(h.major!==y.major)return E+"major";if(h.minor!==y.minor)return E+"minor";if(h.patch!==y.patch)return E+"patch";return"prerelease"};tD.exports=Nce});var nD=i(function(UPe,oD){var jce=Lr(),Mce=(o,f)=>new jce(o,f).major;oD.exports=Mce});var sD=i(function($Pe,iD){var qce=Lr(),Fce=(o,f)=>new qce(o,f).minor;iD.exports=Fce});var cD=i(function(VPe,aD){var Uce=Lr(),$ce=(o,f)=>new Uce(o,f).patch;aD.exports=$ce});var uD=i(function(HPe,lD){var Vce=Ri(),Hce=(o,f)=>{let h=Vce(o,f);return h&&h.prerelease.length?h.prerelease:null};lD.exports=Hce});var Mo=i(function(GPe,pD){var dD=Lr(),Gce=(o,f,h)=>new dD(o,h).compare(new dD(f,h));pD.exports=Gce});var hD=i(function(KPe,fD){var Kce=Mo(),Wce=(o,f,h)=>Kce(f,o,h);fD.exports=Wce});var gD=i(function(WPe,mD){var Jce=Mo(),Zce=(o,f)=>Jce(o,f,!0);mD.exports=Zce});var Of=i(function(JPe,bD){var yD=Lr(),Yce=(o,f,h)=>{let y=new yD(o,h),x=new yD(f,h);return y.compare(x)||y.compareBuild(x)};bD.exports=Yce});var xD=i(function(ZPe,vD){var Xce=Of(),Qce=(o,f)=>o.sort((h,y)=>Xce(h,y,f));vD.exports=Qce});var zD=i(function(YPe,_D){var ele=Of(),tle=(o,f)=>o.sort((h,y)=>ele(y,h,f));_D.exports=tle});var hu=i(function(XPe,CD){var rle=Mo(),ole=(o,f,h)=>rle(o,f,h)>0;CD.exports=ole});var If=i(function(QPe,wD){var nle=Mo(),ile=(o,f,h)=>nle(o,f,h)<0;wD.exports=ile});var lv=i(function(eBe,SD){var sle=Mo(),ale=(o,f,h)=>sle(o,f,h)===0;SD.exports=ale});var uv=i(function(tBe,TD){var cle=Mo(),lle=(o,f,h)=>cle(o,f,h)!==0;TD.exports=lle});var Rf=i(function(rBe,ED){var ule=Mo(),dle=(o,f,h)=>ule(o,f,h)>=0;ED.exports=dle});var Af=i(function(oBe,kD){var ple=Mo(),fle=(o,f,h)=>ple(o,f,h)<=0;kD.exports=fle});var dv=i(function(nBe,OD){var hle=lv(),mle=uv(),gle=hu(),yle=Rf(),ble=If(),vle=Af(),xle=(o,f,h,y)=>{switch(f){case"===":if(typeof o==="object")o=o.version;if(typeof h==="object")h=h.version;return o===h;case"!==":if(typeof o==="object")o=o.version;if(typeof h==="object")h=h.version;return o!==h;case"":case"=":case"==":return hle(o,h,y);case"!=":return mle(o,h,y);case">":return gle(o,h,y);case">=":return yle(o,h,y);case"<":return ble(o,h,y);case"<=":return vle(o,h,y);default:throw TypeError(`Invalid operator: ${f}`)}};OD.exports=xle});var RD=i(function(iBe,ID){var _le=Lr(),zle=Ri(),{safeRe:Pf,t:Bf}=Wa(),Cle=(o,f)=>{if(o instanceof _le)return o;if(typeof o==="number")o=String(o);if(typeof o!=="string")return null;f=f||{};let h=null;if(!f.rtl)h=o.match(f.includePrerelease?Pf[Bf.COERCEFULL]:Pf[Bf.COERCE]);else{let w=f.includePrerelease?Pf[Bf.COERCERTLFULL]:Pf[Bf.COERCERTL],S;while((S=w.exec(o))&&(!h||h.index+h[0].length!==o.length)){if(!h||S.index+S[0].length!==h.index+h[0].length)h=S;w.lastIndex=S.index+S[1].length+S[2].length}w.lastIndex=-1}if(h===null)return null;let y=h[2],x=h[3]||"0",_=h[4]||"0",z=f.includePrerelease&&h[5]?`-${h[5]}`:"",C=f.includePrerelease&&h[6]?`+${h[6]}`:"";return zle(`${y}.${x}.${_}${z}${C}`,f)};ID.exports=Cle});var PD=i(function(sBe,AD){var wle=Ri(),Sle=Ka(),Tle=Lr(),Ele=(o,f,h)=>{if(!Sle.RELEASE_TYPES.includes(f))return null;let y=kle(o,h);return y&&Ole(y,f)},kle=(o,f)=>{let h=o instanceof Tle?o.version:o;return wle(h,f)},Ole=(o,f)=>{if(Ile(f))return o.version;switch(o.prerelease=[],f){case"major":o.minor=0,o.patch=0;break;case"minor":o.patch=0;break}return o.format()},Ile=(o)=>o.startsWith("pre");AD.exports=Ele});var LD=i(function(aBe,DD){class BD{constructor(){this.max=1000,this.map=new Map}get(o){let f=this.map.get(o);if(f===void 0)return;else return this.map.delete(o),this.map.set(o,f),f}delete(o){return this.map.delete(o)}set(o,f){if(!this.delete(o)&&f!==void 0){if(this.map.size>=this.max){let y=this.map.keys().next().value;this.delete(y)}this.map.set(o,f)}return this}}DD.exports=BD});var qo=i(function(cBe,qD){var Rle=/\s+/g;class mu{constructor(o,f){if(f=Ple(f),o instanceof mu)if(o.loose===!!f.loose&&o.includePrerelease===!!f.includePrerelease)return o;else return new mu(o.raw,f);if(o instanceof pv)return this.raw=o.value,this.set=[[o]],this.formatted=void 0,this;if(this.options=f,this.loose=!!f.loose,this.includePrerelease=!!f.includePrerelease,this.raw=o.trim().replace(Rle," "),this.set=this.raw.split("||").map((h)=>this.parseRange(h.trim())).filter((h)=>h.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let h=this.set[0];if(this.set=this.set.filter((y)=>!jD(y[0])),this.set.length===0)this.set=[h];else if(this.set.length>1){for(let y of this.set)if(y.length===1&&Ule(y[0])){this.set=[y];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let o=0;o<this.set.length;o++){if(o>0)this.formatted+="||";let f=this.set[o];for(let h=0;h<f.length;h++){if(h>0)this.formatted+=" ";this.formatted+=f[h].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(o){o=o.replace(Fle,"");let h=((this.options.includePrerelease&&Mle)|(this.options.loose&&qle))+":"+o,y=ND.get(h);if(y)return y;let x=this.options.loose,_=x?eo[Nr.HYPHENRANGELOOSE]:eo[Nr.HYPHENRANGE];o=o.replace(_,Qle(this.options.includePrerelease)),Vt("hyphen replace",o),o=o.replace(eo[Nr.COMPARATORTRIM],Lle),Vt("comparator trim",o),o=o.replace(eo[Nr.TILDETRIM],Nle),Vt("tilde trim",o),o=o.replace(eo[Nr.CARETTRIM],jle),Vt("caret trim",o);let z=o.split(" ").map((E)=>$le(E,this.options)).join(" ").split(/\s+/).map((E)=>Xle(E,this.options));if(x)z=z.filter((E)=>(Vt("loose invalid filter",E,this.options),!!E.match(eo[Nr.COMPARATORLOOSE])));Vt("range list",z);let C=new Map,w=z.map((E)=>new pv(E,this.options));for(let E of w){if(jD(E))return[E];C.set(E.value,E)}if(C.size>1&&C.has(""))C.delete("");let S=[...C.values()];return ND.set(h,S),S}intersects(o,f){if(!(o instanceof mu))throw TypeError("a Range is required");return this.set.some((h)=>MD(h,f)&&o.set.some((y)=>MD(y,f)&&h.every((x)=>y.every((_)=>x.intersects(_,f)))))}test(o){if(!o)return!1;if(typeof o==="string")try{o=new Ble(o,this.options)}catch(f){return!1}for(let f=0;f<this.set.length;f++)if(eue(this.set[f],o,this.options))return!0;return!1}}qD.exports=mu;var Ale=LD(),ND=new Ale,Ple=wf(),pv=gu(),Vt=fu(),Ble=Lr(),{safeRe:eo,src:Dle,t:Nr,comparatorTrimReplace:Lle,tildeTrimReplace:Nle,caretTrimReplace:jle}=Wa(),{FLAG_INCLUDE_PRERELEASE:Mle,FLAG_LOOSE:qle}=Ka(),Fle=new RegExp(Dle[Nr.BUILD],"g"),jD=(o)=>o.value==="<0.0.0-0",Ule=(o)=>o.value==="",MD=(o,f)=>{let h=!0,y=o.slice(),x=y.pop();while(h&&y.length)h=y.every((_)=>x.intersects(_,f)),x=y.pop();return h},$le=(o,f)=>(o=o.replace(eo[Nr.BUILD],""),Vt("comp",o,f),o=Kle(o,f),Vt("caret",o),o=Hle(o,f),Vt("tildes",o),o=Jle(o,f),Vt("xrange",o),o=Yle(o,f),Vt("stars",o),o),br=(o)=>!o||o.toLowerCase()==="x"||o==="*",Vle=(o,f,h)=>br(o)&&!br(f)||br(f)&&h&&!br(h),Hle=(o,f)=>o.trim().split(/\s+/).map((h)=>Gle(h,f)).join(" "),Gle=(o,f)=>{let h=f.loose?eo[Nr.TILDELOOSE]:eo[Nr.TILDE],y=f.includePrerelease?"-0":"";return o.replace(h,(x,_,z,C,w)=>{Vt("tilde",o,x,_,z,C,w);let S;if(br(_))S="";else if(br(z))S=`>=${_}.0.0${y} <${+_+1}.0.0-0`;else if(br(C))S=`>=${_}.${z}.0${y} <${_}.${+z+1}.0-0`;else if(w)Vt("replaceTilde pr",w),S=`>=${_}.${z}.${C}-${w} <${_}.${+z+1}.0-0`;else S=`>=${_}.${z}.${C} <${_}.${+z+1}.0-0`;return Vt("tilde return",S),S})},Kle=(o,f)=>o.trim().split(/\s+/).map((h)=>Wle(h,f)).join(" "),Wle=(o,f)=>{Vt("caret",o,f);let h=f.loose?eo[Nr.CARETLOOSE]:eo[Nr.CARET],y=f.includePrerelease?"-0":"";return o.replace(h,(x,_,z,C,w)=>{Vt("caret",o,x,_,z,C,w);let S;if(br(_))S="";else if(br(z))S=`>=${_}.0.0${y} <${+_+1}.0.0-0`;else if(br(C))if(_==="0")S=`>=${_}.${z}.0${y} <${_}.${+z+1}.0-0`;else S=`>=${_}.${z}.0${y} <${+_+1}.0.0-0`;else if(w)if(Vt("replaceCaret pr",w),_==="0")if(z==="0")S=`>=${_}.${z}.${C}-${w} <${_}.${z}.${+C+1}-0`;else S=`>=${_}.${z}.${C}-${w} <${_}.${+z+1}.0-0`;else S=`>=${_}.${z}.${C}-${w} <${+_+1}.0.0-0`;else if(Vt("no pr"),_==="0")if(z==="0")S=`>=${_}.${z}.${C} <${_}.${z}.${+C+1}-0`;else S=`>=${_}.${z}.${C} <${_}.${+z+1}.0-0`;else S=`>=${_}.${z}.${C} <${+_+1}.0.0-0`;return Vt("caret return",S),S})},Jle=(o,f)=>(Vt("replaceXRanges",o,f),o.split(/\s+/).map((h)=>Zle(h,f)).join(" ")),Zle=(o,f)=>{o=o.trim();let h=f.loose?eo[Nr.XRANGELOOSE]:eo[Nr.XRANGE];return o.replace(h,(y,x,_,z,C,w)=>{if(Vt("xRange",o,y,x,_,z,C,w),Vle(_,z,C))return o;let S=br(_),E=S||br(z),k=E||br(C),O=k;if(x==="="&&O)x="";if(w=f.includePrerelease?"-0":"",S)if(x===">"||x==="<")y="<0.0.0-0";else y="*";else if(x&&O){if(E)z=0;if(C=0,x===">")if(x=">=",E)_=+_+1,z=0,C=0;else z=+z+1,C=0;else if(x==="<=")if(x="<",E)_=+_+1;else z=+z+1;if(x==="<")w="-0";y=`${x+_}.${z}.${C}${w}`}else if(E)y=`>=${_}.0.0${w} <${+_+1}.0.0-0`;else if(k)y=`>=${_}.${z}.0${w} <${_}.${+z+1}.0-0`;return Vt("xRange return",y),y})},Yle=(o,f)=>(Vt("replaceStars",o,f),o.trim().replace(eo[Nr.STAR],"")),Xle=(o,f)=>(Vt("replaceGTE0",o,f),o.trim().replace(eo[f.includePrerelease?Nr.GTE0PRE:Nr.GTE0],"")),Qle=(o)=>(f,h,y,x,_,z,C,w,S,E,k,O)=>{if(br(y))h="";else if(br(x))h=`>=${y}.0.0${o?"-0":""}`;else if(br(_))h=`>=${y}.${x}.0${o?"-0":""}`;else if(z)h=`>=${h}`;else h=`>=${h}${o?"-0":""}`;if(br(S))w="";else if(br(E))w=`<${+S+1}.0.0-0`;else if(br(k))w=`<${S}.${+E+1}.0-0`;else if(O)w=`<=${S}.${E}.${k}-${O}`;else if(o)w=`<${S}.${E}.${+k+1}-0`;else w=`<=${w}`;return`${h} ${w}`.trim()},eue=(o,f,h)=>{for(let y=0;y<o.length;y++)if(!o[y].test(f))return!1;if(f.prerelease.length&&!h.includePrerelease){for(let y=0;y<o.length;y++){if(Vt(o[y].semver),o[y].semver===pv.ANY)continue;if(o[y].semver.prerelease.length>0){let x=o[y].semver;if(x.major===f.major&&x.minor===f.minor&&x.patch===f.patch)return!0}}return!1}return!0}});var gu=i(function(lBe,GD){var yu=Symbol("SemVer ANY");class Df{static get ANY(){return yu}constructor(o,f){if(f=FD(f),o instanceof Df)if(o.loose===!!f.loose)return o;else o=o.value;if(o=o.trim().split(/\s+/).join(" "),hv("comparator",o,f),this.options=f,this.loose=!!f.loose,this.parse(o),this.semver===yu)this.value="";else this.value=this.operator+this.semver.version;hv("comp",this)}parse(o){let f=this.options.loose?UD[$D.COMPARATORLOOSE]:UD[$D.COMPARATOR],h=o.match(f);if(!h)throw TypeError(`Invalid comparator: ${o}`);if(this.operator=h[1]!==void 0?h[1]:"",this.operator==="=")this.operator="";if(!h[2])this.semver=yu;else this.semver=new VD(h[2],this.options.loose)}toString(){return this.value}test(o){if(hv("Comparator.test",o,this.options.loose),this.semver===yu||o===yu)return!0;if(typeof o==="string")try{o=new VD(o,this.options)}catch(f){return!1}return fv(o,this.operator,this.semver,this.options)}intersects(o,f){if(!(o instanceof Df))throw TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new HD(o.value,f).test(this.value)}else if(o.operator===""){if(o.value==="")return!0;return new HD(this.value,f).test(o.semver)}if(f=FD(f),f.includePrerelease&&(this.value==="<0.0.0-0"||o.value==="<0.0.0-0"))return!1;if(!f.includePrerelease&&(this.value.startsWith("<0.0.0")||o.value.startsWith("<0.0.0")))return!1;if(this.operator.startsWith(">")&&o.operator.startsWith(">"))return!0;if(this.operator.startsWith("<")&&o.operator.startsWith("<"))return!0;if(this.semver.version===o.semver.version&&this.operator.includes("=")&&o.operator.includes("="))return!0;if(fv(this.semver,"<",o.semver,f)&&this.operator.startsWith(">")&&o.operator.startsWith("<"))return!0;if(fv(this.semver,">",o.semver,f)&&this.operator.startsWith("<")&&o.operator.startsWith(">"))return!0;return!1}}GD.exports=Df;var FD=wf(),{safeRe:UD,t:$D}=Wa(),fv=dv(),hv=fu(),VD=Lr(),HD=qo()});var bu=i(function(uBe,KD){var tue=qo(),rue=(o,f,h)=>{try{f=new tue(f,h)}catch(y){return!1}return f.test(o)};KD.exports=rue});var JD=i(function(dBe,WD){var oue=qo(),nue=(o,f)=>new oue(o,f).set.map((h)=>h.map((y)=>y.value).join(" ").trim().split(" "));WD.exports=nue});var YD=i(function(pBe,ZD){var iue=Lr(),sue=qo(),aue=(o,f,h)=>{let y=null,x=null,_=null;try{_=new sue(f,h)}catch(z){return null}return o.forEach((z)=>{if(_.test(z)){if(!y||x.compare(z)===-1)y=z,x=new iue(y,h)}}),y};ZD.exports=aue});var QD=i(function(fBe,XD){var cue=Lr(),lue=qo(),uue=(o,f,h)=>{let y=null,x=null,_=null;try{_=new lue(f,h)}catch(z){return null}return o.forEach((z)=>{if(_.test(z)){if(!y||x.compare(z)===1)y=z,x=new cue(y,h)}}),y};XD.exports=uue});var rL=i(function(hBe,tL){var mv=Lr(),due=qo(),eL=hu(),pue=(o,f)=>{o=new due(o,f);let h=new mv("0.0.0");if(o.test(h))return h;if(h=new mv("0.0.0-0"),o.test(h))return h;h=null;for(let y=0;y<o.set.length;++y){let x=o.set[y],_=null;if(x.forEach((z)=>{let C=new mv(z.semver.version);switch(z.operator){case">":if(C.prerelease.length===0)C.patch++;else C.prerelease.push(0);C.raw=C.format();case"":case">=":if(!_||eL(C,_))_=C;break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${z.operator}`)}}),_&&(!h||eL(h,_)))h=_}if(h&&o.test(h))return h;return null};tL.exports=pue});var nL=i(function(mBe,oL){var fue=qo(),hue=(o,f)=>{try{return new fue(o,f).range||"*"}catch(h){return null}};oL.exports=hue});var Lf=i(function(gBe,cL){var mue=Lr(),aL=gu(),{ANY:gue}=aL,yue=qo(),bue=bu(),iL=hu(),sL=If(),vue=Af(),xue=Rf(),_ue=(o,f,h,y)=>{o=new mue(o,y),f=new yue(f,y);let x,_,z,C,w;switch(h){case">":x=iL,_=vue,z=sL,C=">",w=">=";break;case"<":x=sL,_=xue,z=iL,C="<",w="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(bue(o,f,y))return!1;for(let S=0;S<f.set.length;++S){let E=f.set[S],k=null,O=null;if(E.forEach((R)=>{if(R.semver===gue)R=new aL(">=0.0.0");if(k=k||R,O=O||R,x(R.semver,k.semver,y))k=R;else if(z(R.semver,O.semver,y))O=R}),k.operator===C||k.operator===w)return!1;if((!O.operator||O.operator===C)&&_(o,O.semver))return!1;else if(O.operator===w&&z(o,O.semver))return!1}return!0};cL.exports=_ue});var uL=i(function(yBe,lL){var zue=Lf(),Cue=(o,f,h)=>zue(o,f,">",h);lL.exports=Cue});var pL=i(function(bBe,dL){var wue=Lf(),Sue=(o,f,h)=>wue(o,f,"<",h);dL.exports=Sue});var mL=i(function(vBe,hL){var fL=qo(),Tue=(o,f,h)=>(o=new fL(o,h),f=new fL(f,h),o.intersects(f,h));hL.exports=Tue});var yL=i(function(xBe,gL){var Eue=bu(),kue=Mo();gL.exports=(o,f,h)=>{let y=[],x=null,_=null,z=o.sort((E,k)=>kue(E,k,h));for(let E of z)if(Eue(E,f,h)){if(_=E,!x)x=E}else{if(_)y.push([x,_]);_=null,x=null}if(x)y.push([x,null]);let C=[];for(let[E,k]of y)if(E===k)C.push(E);else if(!k&&E===z[0])C.push("*");else if(!k)C.push(`>=${E}`);else if(E===z[0])C.push(`<=${k}`);else C.push(`${E} - ${k}`);let w=C.join(" || "),S=typeof f.raw==="string"?f.raw:String(f);return w.length<S.length?w:f}});var CL=i(function(_Be,zL){var bL=qo(),bv=gu(),{ANY:gv}=bv,yv=bu(),vv=Mo(),Oue=(o,f,h={})=>{if(o===f)return!0;o=new bL(o,h),f=new bL(f,h);let y=!1;e:for(let x of o.set){for(let _ of f.set){let z=Rue(x,_,h);if(y=y||z!==null,z)continue e}if(y)return!1}return!0},Iue=[new bv(">=0.0.0-0")],vL=[new bv(">=0.0.0")],Rue=(o,f,h)=>{if(o===f)return!0;if(o.length===1&&o[0].semver===gv)if(f.length===1&&f[0].semver===gv)return!0;else if(h.includePrerelease)o=Iue;else o=vL;if(f.length===1&&f[0].semver===gv)if(h.includePrerelease)return!0;else f=vL;let y=new Set,x,_;for(let R of o)if(R.operator===">"||R.operator===">=")x=xL(x,R,h);else if(R.operator==="<"||R.operator==="<=")_=_L(_,R,h);else y.add(R.semver);if(y.size>1)return null;let z;if(x&&_){if(z=vv(x.semver,_.semver,h),z>0)return null;else if(z===0&&(x.operator!==">="||_.operator!=="<="))return null}for(let R of y){if(x&&!yv(R,String(x),h))return null;if(_&&!yv(R,String(_),h))return null;for(let I of f)if(!yv(R,String(I),h))return!1;return!0}let C,w,S,E,k=_&&!h.includePrerelease&&_.semver.prerelease.length?_.semver:!1,O=x&&!h.includePrerelease&&x.semver.prerelease.length?x.semver:!1;if(k&&k.prerelease.length===1&&_.operator==="<"&&k.prerelease[0]===0)k=!1;for(let R of f){if(E=E||R.operator===">"||R.operator===">=",S=S||R.operator==="<"||R.operator==="<=",x){if(O){if(R.semver.prerelease&&R.semver.prerelease.length&&R.semver.major===O.major&&R.semver.minor===O.minor&&R.semver.patch===O.patch)O=!1}if(R.operator===">"||R.operator===">="){if(C=xL(x,R,h),C===R&&C!==x)return!1}else if(x.operator===">="&&!R.test(x.semver))return!1}if(_){if(k){if(R.semver.prerelease&&R.semver.prerelease.length&&R.semver.major===k.major&&R.semver.minor===k.minor&&R.semver.patch===k.patch)k=!1}if(R.operator==="<"||R.operator==="<="){if(w=_L(_,R,h),w===R&&w!==_)return!1}else if(_.operator==="<="&&!R.test(_.semver))return!1}if(!R.operator&&(_||x)&&z!==0)return!1}if(x&&S&&!_&&z!==0)return!1;if(_&&E&&!x&&z!==0)return!1;if(O||k)return!1;return!0},xL=(o,f,h)=>{if(!o)return f;let y=vv(o.semver,f.semver,h);return y>0?o:y<0?f:f.operator===">"&&o.operator===">="?f:o},_L=(o,f,h)=>{if(!o)return f;let y=vv(o.semver,f.semver,h);return y<0?o:y>0?f:f.operator==="<"&&o.operator==="<="?f:o};zL.exports=Oue});var Nf=i(function(zBe,TL){var xv=Wa(),wL=Ka(),Aue=Lr(),SL=av(),Pue=Ri(),Bue=WB(),Due=ZB(),Lue=QB(),Nue=rD(),jue=nD(),Mue=sD(),que=cD(),Fue=uD(),Uue=Mo(),$ue=hD(),Vue=gD(),Hue=Of(),Gue=xD(),Kue=zD(),Wue=hu(),Jue=If(),Zue=lv(),Yue=uv(),Xue=Rf(),Que=Af(),ede=dv(),tde=RD(),rde=PD(),ode=gu(),nde=qo(),ide=bu(),sde=JD(),ade=YD(),cde=QD(),lde=rL(),ude=nL(),dde=Lf(),pde=uL(),fde=pL(),hde=mL(),mde=yL(),gde=CL();TL.exports={parse:Pue,valid:Bue,clean:Due,inc:Lue,diff:Nue,major:jue,minor:Mue,patch:que,prerelease:Fue,compare:Uue,rcompare:$ue,compareLoose:Vue,compareBuild:Hue,sort:Gue,rsort:Kue,gt:Wue,lt:Jue,eq:Zue,neq:Yue,gte:Xue,lte:Que,cmp:ede,coerce:tde,truncate:rde,Comparator:ode,Range:nde,satisfies:ide,toComparators:sde,maxSatisfying:ade,minSatisfying:cde,minVersion:lde,validRange:ude,outside:dde,gtr:pde,ltr:fde,intersects:hde,simplifyRange:mde,subset:gde,SemVer:Aue,re:xv.re,src:xv.src,tokens:xv.t,SEMVER_SPEC_VERSION:wL.SEMVER_SPEC_VERSION,RELEASE_TYPES:wL.RELEASE_TYPES,compareIdentifiers:SL.compareIdentifiers,rcompareIdentifiers:SL.rcompareIdentifiers}});var kL=i(function(CBe,EL){var yde=Nf();EL.exports=yde.satisfies(process.version,">=15.7.0")});var IL=i(function(wBe,OL){var bde=Nf();OL.exports=bde.satisfies(process.version,">=16.9.0")});var _v=i(function(SBe,RL){var vde=kL(),xde=IL(),_de={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},zde={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};RL.exports=function(o,f){if(!o||!f)return;let h=f.asymmetricKeyType;if(!h)return;let y=_de[h];if(!y)throw Error(`Unknown key type "${h}".`);if(!y.includes(o))throw Error(`"alg" parameter for "${h}" key type must be one of: ${y.join(", ")}.`);if(vde)switch(h){case"ec":let x=f.asymmetricKeyDetails.namedCurve,_=zde[o];if(x!==_)throw Error(`"alg" parameter "${o}" requires curve "${_}".`);break;case"rsa-pss":if(xde){let z=parseInt(o.slice(-3),10),{hashAlgorithm:C,mgf1HashAlgorithm:w,saltLength:S}=f.asymmetricKeyDetails;if(C!==`sha${z}`||w!==C)throw Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${o}.`);if(S!==void 0&&S>z>>3)throw Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${o}.`)}break}}});var zv=i(function(TBe,AL){var Cde=Nf();AL.exports=Cde.satisfies(process.version,"^6.12.0 || >=8.0.0")});var DL=i(function(EBe,BL){var qt=pu(),wde=rv(),PL=ov(),Sde=tv(),Tde=nv(),Ede=_v(),kde=zv(),Ode=gc(),{KeyObject:Ide,createSecretKey:Rde,createPublicKey:Ade}=c("crypto"),Cv=["RS256","RS384","RS512"],Pde=["ES256","ES384","ES512"],wv=["RS256","RS384","RS512"],Bde=["HS256","HS384","HS512"];if(kde)Cv.splice(Cv.length,0,"PS256","PS384","PS512"),wv.splice(wv.length,0,"PS256","PS384","PS512");BL.exports=function(o,f,h,y){if(typeof h==="function"&&!y)y=h,h={};if(!h)h={};h=Object.assign({},h);let x;if(y)x=y;else x=function(E,k){if(E)throw E;return k};if(h.clockTimestamp&&typeof h.clockTimestamp!=="number")return x(new qt("clockTimestamp must be a number"));if(h.nonce!==void 0&&(typeof h.nonce!=="string"||h.nonce.trim()===""))return x(new qt("nonce must be a non-empty string"));if(h.allowInvalidAsymmetricKeyTypes!==void 0&&typeof h.allowInvalidAsymmetricKeyTypes!=="boolean")return x(new qt("allowInvalidAsymmetricKeyTypes must be a boolean"));let _=h.clockTimestamp||Math.floor(Date.now()/1000);if(!o)return x(new qt("jwt must be provided"));if(typeof o!=="string")return x(new qt("jwt must be a string"));let z=o.split(".");if(z.length!==3)return x(new qt("jwt malformed"));let C;try{C=Sde(o,{complete:!0})}catch(E){return x(E)}if(!C)return x(new qt("invalid token"));let w=C.header,S;if(typeof f==="function"){if(!y)return x(new qt("verify must be called asynchronous if secret or public key is provided as a callback"));S=f}else S=function(E,k){return k(null,f)};return S(w,function(E,k){if(E)return x(new qt("error in secret or public key callback: "+E.message));let O=z[2].trim()!=="";if(!O&&k)return x(new qt("jwt signature is required"));if(O&&!k)return x(new qt("secret or public key must be provided"));if(!O&&!h.algorithms)return x(new qt('please specify "none" in "algorithms" to verify unsigned tokens'));if(k!=null&&!(k instanceof Ide))try{k=Ade(k)}catch(A){try{k=Rde(typeof k==="string"?Buffer.from(k):k)}catch(M){return x(new qt("secretOrPublicKey is not valid key material"))}}if(!h.algorithms)if(k.type==="secret")h.algorithms=Bde;else if(["rsa","rsa-pss"].includes(k.asymmetricKeyType))h.algorithms=wv;else if(k.asymmetricKeyType==="ec")h.algorithms=Pde;else h.algorithms=Cv;if(h.algorithms.indexOf(C.header.alg)===-1)return x(new qt("invalid algorithm"));if(w.alg.startsWith("HS")&&k.type!=="secret")return x(new qt(`secretOrPublicKey must be a symmetric key when using ${w.alg}`));else if(/^(?:RS|PS|ES)/.test(w.alg)&&k.type!=="public")return x(new qt(`secretOrPublicKey must be an asymmetric key when using ${w.alg}`));if(!h.allowInvalidAsymmetricKeyTypes)try{Ede(w.alg,k)}catch(A){return x(A)}let R;try{R=Ode.verify(o,C.header.alg,k)}catch(A){return x(A)}if(!R)return x(new qt("invalid signature"));let I=C.payload;if(typeof I.nbf<"u"&&!h.ignoreNotBefore){if(typeof I.nbf!=="number")return x(new qt("invalid nbf value"));if(I.nbf>_+(h.clockTolerance||0))return x(new wde("jwt not active",new Date(I.nbf*1000)))}if(typeof I.exp<"u"&&!h.ignoreExpiration){if(typeof I.exp!=="number")return x(new qt("invalid exp value"));if(_>=I.exp+(h.clockTolerance||0))return x(new PL("jwt expired",new Date(I.exp*1000)))}if(h.audience){let A=Array.isArray(h.audience)?h.audience:[h.audience];if(!(Array.isArray(I.aud)?I.aud:[I.aud]).some(function(U){return A.some(function(F){return F instanceof RegExp?F.test(U):F===U})}))return x(new qt("jwt audience invalid. expected: "+A.join(" or ")))}if(h.issuer){if(typeof h.issuer==="string"&&I.iss!==h.issuer||Array.isArray(h.issuer)&&h.issuer.indexOf(I.iss)===-1)return x(new qt("jwt issuer invalid. expected: "+h.issuer))}if(h.subject){if(I.sub!==h.subject)return x(new qt("jwt subject invalid. expected: "+h.subject))}if(h.jwtid){if(I.jti!==h.jwtid)return x(new qt("jwt jwtid invalid. expected: "+h.jwtid))}if(h.nonce){if(I.nonce!==h.nonce)return x(new qt("jwt nonce invalid. expected: "+h.nonce))}if(h.maxAge){if(typeof I.iat!=="number")return x(new qt("iat required when maxAge is specified"));let A=Tde(h.maxAge,I.iat);if(typeof A>"u")return x(new qt('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(_>=A+(h.clockTolerance||0))return x(new PL("maxAge exceeded",new Date(A*1000)))}if(h.complete===!0){let A=C.signature;return x(null,{header:w,payload:I,signature:A})}return x(null,I)})}});var FL=i(function(kBe,qL){var LL=1/0,jL=9007199254740991,Dde=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,NL=NaN,Lde="[object Arguments]",Nde="[object Function]",jde="[object GeneratorFunction]",Mde="[object String]",qde="[object Symbol]",Fde=/^\s+|\s+$/g,Ude=/^[-+]0x[0-9a-f]+$/i,$de=/^0b[01]+$/i,Vde=/^0o[0-7]+$/i,Hde=/^(?:0|[1-9]\d*)$/,Gde=parseInt;function Kde(o,f){var h=-1,y=o?o.length:0,x=Array(y);while(++h<y)x[h]=f(o[h],h,o);return x}function Wde(o,f,h,y){var x=o.length,_=h+(y?1:-1);while(y?_--:++_<x)if(f(o[_],_,o))return _;return-1}function Jde(o,f,h){if(f!==f)return Wde(o,Zde,h);var y=h-1,x=o.length;while(++y<x)if(o[y]===f)return y;return-1}function Zde(o){return o!==o}function Yde(o,f){var h=-1,y=Array(o);while(++h<o)y[h]=f(h);return y}function Xde(o,f){return Kde(f,function(h){return o[h]})}function Qde(o,f){return function(h){return o(f(h))}}var jf=Object.prototype,{hasOwnProperty:Tv,toString:Mf,propertyIsEnumerable:epe}=jf,tpe=Qde(Object.keys,Object),rpe=Math.max;function ope(o,f){var h=ML(o)||cpe(o)?Yde(o.length,String):[],y=h.length,x=!!y;for(var _ in o)if((f||Tv.call(o,_))&&!(x&&(_=="length"||ipe(_,y))))h.push(_);return h}function npe(o){if(!spe(o))return tpe(o);var f=[];for(var h in Object(o))if(Tv.call(o,h)&&h!="constructor")f.push(h);return f}function ipe(o,f){return f=f==null?jL:f,!!f&&(typeof o=="number"||Hde.test(o))&&(o>-1&&o%1==0&&o<f)}function spe(o){var f=o&&o.constructor,h=typeof f=="function"&&f.prototype||jf;return o===h}function ape(o,f,h,y){o=Ev(o)?o:bpe(o),h=h&&!y?mpe(h):0;var x=o.length;if(h<0)h=rpe(x+h,0);return ppe(o)?h<=x&&o.indexOf(f,h)>-1:!!x&&Jde(o,f,h)>-1}function cpe(o){return lpe(o)&&Tv.call(o,"callee")&&(!epe.call(o,"callee")||Mf.call(o)==Lde)}var ML=Array.isArray;function Ev(o){return o!=null&&dpe(o.length)&&!upe(o)}function lpe(o){return kv(o)&&Ev(o)}function upe(o){var f=Sv(o)?Mf.call(o):"";return f==Nde||f==jde}function dpe(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=jL}function Sv(o){var f=typeof o;return!!o&&(f=="object"||f=="function")}function kv(o){return!!o&&typeof o=="object"}function ppe(o){return typeof o=="string"||!ML(o)&&kv(o)&&Mf.call(o)==Mde}function fpe(o){return typeof o=="symbol"||kv(o)&&Mf.call(o)==qde}function hpe(o){if(!o)return o===0?o:0;if(o=gpe(o),o===LL||o===-LL){var f=o<0?-1:1;return f*Dde}return o===o?o:0}function mpe(o){var f=hpe(o),h=f%1;return f===f?h?f-h:f:0}function gpe(o){if(typeof o=="number")return o;if(fpe(o))return NL;if(Sv(o)){var f=typeof o.valueOf=="function"?o.valueOf():o;o=Sv(f)?f+"":f}if(typeof o!="string")return o===0?o:+o;o=o.replace(Fde,"");var h=$de.test(o);return h||Vde.test(o)?Gde(o.slice(2),h?2:8):Ude.test(o)?NL:+o}function ype(o){return Ev(o)?ope(o):npe(o)}function bpe(o){return o?Xde(o,ype(o)):[]}qL.exports=ape});var $L=i(function(OBe,UL){var vpe="[object Boolean]",xpe=Object.prototype,_pe=xpe.toString;function zpe(o){return o===!0||o===!1||Cpe(o)&&_pe.call(o)==vpe}function Cpe(o){return!!o&&typeof o=="object"}UL.exports=zpe});var WL=i(function(IBe,KL){var VL=1/0,wpe=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,HL=NaN,Spe="[object Symbol]",Tpe=/^\s+|\s+$/g,Epe=/^[-+]0x[0-9a-f]+$/i,kpe=/^0b[01]+$/i,Ope=/^0o[0-7]+$/i,Ipe=parseInt,Rpe=Object.prototype,Ape=Rpe.toString;function Ppe(o){return typeof o=="number"&&o==Npe(o)}function GL(o){var f=typeof o;return!!o&&(f=="object"||f=="function")}function Bpe(o){return!!o&&typeof o=="object"}function Dpe(o){return typeof o=="symbol"||Bpe(o)&&Ape.call(o)==Spe}function Lpe(o){if(!o)return o===0?o:0;if(o=jpe(o),o===VL||o===-VL){var f=o<0?-1:1;return f*wpe}return o===o?o:0}function Npe(o){var f=Lpe(o),h=f%1;return f===f?h?f-h:f:0}function jpe(o){if(typeof o=="number")return o;if(Dpe(o))return HL;if(GL(o)){var f=typeof o.valueOf=="function"?o.valueOf():o;o=GL(f)?f+"":f}if(typeof o!="string")return o===0?o:+o;o=o.replace(Tpe,"");var h=kpe.test(o);return h||Ope.test(o)?Ipe(o.slice(2),h?2:8):Epe.test(o)?HL:+o}KL.exports=Ppe});var ZL=i(function(RBe,JL){var Mpe="[object Number]",qpe=Object.prototype,Fpe=qpe.toString;function Upe(o){return!!o&&typeof o=="object"}function $pe(o){return typeof o=="number"||Upe(o)&&Fpe.call(o)==Mpe}JL.exports=$pe});var eN=i(function(ABe,QL){var Vpe="[object Object]";function Hpe(o){var f=!1;if(o!=null&&typeof o.toString!="function")try{f=!!(o+"")}catch(h){}return f}function Gpe(o,f){return function(h){return o(f(h))}}var Kpe=Function.prototype,YL=Object.prototype,XL=Kpe.toString,Wpe=YL.hasOwnProperty,Jpe=XL.call(Object),Zpe=YL.toString,Ype=Gpe(Object.getPrototypeOf,Object);function Xpe(o){return!!o&&typeof o=="object"}function Qpe(o){if(!Xpe(o)||Zpe.call(o)!=Vpe||Hpe(o))return!1;var f=Ype(o);if(f===null)return!0;var h=Wpe.call(f,"constructor")&&f.constructor;return typeof h=="function"&&h instanceof h&&XL.call(h)==Jpe}QL.exports=Qpe});var rN=i(function(PBe,tN){var efe="[object String]",tfe=Object.prototype,rfe=tfe.toString,ofe=Array.isArray;function nfe(o){return!!o&&typeof o=="object"}function ife(o){return typeof o=="string"||!ofe(o)&&nfe(o)&&rfe.call(o)==efe}tN.exports=ife});var aN=i(function(BBe,sN){var sfe="Expected a function",oN=1/0,afe=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,nN=NaN,cfe="[object Symbol]",lfe=/^\s+|\s+$/g,ufe=/^[-+]0x[0-9a-f]+$/i,dfe=/^0b[01]+$/i,pfe=/^0o[0-7]+$/i,ffe=parseInt,hfe=Object.prototype,mfe=hfe.toString;function gfe(o,f){var h;if(typeof f!="function")throw TypeError(sfe);return o=_fe(o),function(){if(--o>0)h=f.apply(this,arguments);if(o<=1)f=void 0;return h}}function yfe(o){return gfe(2,o)}function iN(o){var f=typeof o;return!!o&&(f=="object"||f=="function")}function bfe(o){return!!o&&typeof o=="object"}function vfe(o){return typeof o=="symbol"||bfe(o)&&mfe.call(o)==cfe}function xfe(o){if(!o)return o===0?o:0;if(o=zfe(o),o===oN||o===-oN){var f=o<0?-1:1;return f*afe}return o===o?o:0}function _fe(o){var f=xfe(o),h=f%1;return f===f?h?f-h:f:0}function zfe(o){if(typeof o=="number")return o;if(vfe(o))return nN;if(iN(o)){var f=typeof o.valueOf=="function"?o.valueOf():o;o=iN(f)?f+"":f}if(typeof o!="string")return o===0?o:+o;o=o.replace(lfe,"");var h=dfe.test(o);return h||pfe.test(o)?ffe(o.slice(2),h?2:8):ufe.test(o)?nN:+o}sN.exports=yfe});var gN=i(function(DBe,mN){var cN=nv(),Cfe=zv(),wfe=_v(),dN=gc(),Sfe=FL(),qf=$L(),lN=WL(),Ov=ZL(),pN=eN(),Ai=rN(),Tfe=aN(),{KeyObject:Efe,createSecretKey:kfe,createPrivateKey:Ofe}=c("crypto"),fN=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];if(Cfe)fN.splice(3,0,"PS256","PS384","PS512");var Ife={expiresIn:{isValid:function(o){return lN(o)||Ai(o)&&o},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(o){return lN(o)||Ai(o)&&o},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(o){return Ai(o)||Array.isArray(o)},message:'"audience" must be a string or array'},algorithm:{isValid:Sfe.bind(null,fN),message:'"algorithm" must be a valid string enum value'},header:{isValid:pN,message:'"header" must be an object'},encoding:{isValid:Ai,message:'"encoding" must be a string'},issuer:{isValid:Ai,message:'"issuer" must be a string'},subject:{isValid:Ai,message:'"subject" must be a string'},jwtid:{isValid:Ai,message:'"jwtid" must be a string'},noTimestamp:{isValid:qf,message:'"noTimestamp" must be a boolean'},keyid:{isValid:Ai,message:'"keyid" must be a string'},mutatePayload:{isValid:qf,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:qf,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:qf,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},Rfe={iat:{isValid:Ov,message:'"iat" should be a number of seconds'},exp:{isValid:Ov,message:'"exp" should be a number of seconds'},nbf:{isValid:Ov,message:'"nbf" should be a number of seconds'}};function hN(o,f,h,y){if(!pN(h))throw Error('Expected "'+y+'" to be a plain object.');Object.keys(h).forEach(function(x){let _=o[x];if(!_){if(!f)throw Error('"'+x+'" is not allowed in "'+y+'"');return}if(!_.isValid(h[x]))throw Error(_.message)})}function Afe(o){return hN(Ife,!1,o,"options")}function Pfe(o){return hN(Rfe,!0,o,"payload")}var uN={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},Bfe=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];mN.exports=function(o,f,h,y){if(typeof h==="function")y=h,h={};else h=h||{};let x=typeof o==="object"&&!Buffer.isBuffer(o),_=Object.assign({alg:h.algorithm||"HS256",typ:x?"JWT":void 0,kid:h.keyid},h.header);function z(S){if(y)return y(S);throw S}if(!f&&h.algorithm!=="none")return z(Error("secretOrPrivateKey must have a value"));if(f!=null&&!(f instanceof Efe))try{f=Ofe(f)}catch(S){try{f=kfe(typeof f==="string"?Buffer.from(f):f)}catch(E){return z(Error("secretOrPrivateKey is not valid key material"))}}if(_.alg.startsWith("HS")&&f.type!=="secret")return z(Error(`secretOrPrivateKey must be a symmetric key when using ${_.alg}`));else if(/^(?:RS|PS|ES)/.test(_.alg)){if(f.type!=="private")return z(Error(`secretOrPrivateKey must be an asymmetric key when using ${_.alg}`));if(!h.allowInsecureKeySizes&&!_.alg.startsWith("ES")&&f.asymmetricKeyDetails!==void 0&&f.asymmetricKeyDetails.modulusLength<2048)return z(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${_.alg}`))}if(typeof o>"u")return z(Error("payload is required"));else if(x){try{Pfe(o)}catch(S){return z(S)}if(!h.mutatePayload)o=Object.assign({},o)}else{let S=Bfe.filter(function(E){return typeof h[E]<"u"});if(S.length>0)return z(Error("invalid "+S.join(",")+" option for "+typeof o+" payload"))}if(typeof o.exp<"u"&&typeof h.expiresIn<"u")return z(Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(typeof o.nbf<"u"&&typeof h.notBefore<"u")return z(Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{Afe(h)}catch(S){return z(S)}if(!h.allowInvalidAsymmetricKeyTypes)try{wfe(_.alg,f)}catch(S){return z(S)}let C=o.iat||Math.floor(Date.now()/1000);if(h.noTimestamp)delete o.iat;else if(x)o.iat=C;if(typeof h.notBefore<"u"){try{o.nbf=cN(h.notBefore,C)}catch(S){return z(S)}if(typeof o.nbf>"u")return z(Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(typeof h.expiresIn<"u"&&typeof o==="object"){try{o.exp=cN(h.expiresIn,C)}catch(S){return z(S)}if(typeof o.exp>"u")return z(Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(uN).forEach(function(S){let E=uN[S];if(typeof h[S]<"u"){if(typeof o[E]<"u")return z(Error('Bad "options.'+S+'" option. The payload already has an "'+E+'" property.'));o[E]=h[S]}});let w=h.encoding||"utf8";if(typeof y==="function")y=y&&Tfe(y),dN.createSign({header:_,privateKey:f,payload:o,encoding:w}).once("error",y).once("done",function(S){if(!h.allowInsecureKeySizes&&/^(?:RS|PS)/.test(_.alg)&&S.length<256)return y(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${_.alg}`));y(null,S)});else{let S=dN.sign({header:_,payload:o,secret:f,encoding:w});if(!h.allowInsecureKeySizes&&/^(?:RS|PS)/.test(_.alg)&&S.length<256)throw Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${_.alg}`);return S}}});var bN=i(function(LBe,yN){yN.exports={decode:tv(),verify:DL(),sign:gN(),JsonWebTokenError:pu(),NotBeforeError:rv(),TokenExpiredError:ov()}});var Ps=i(function(hn){var Dfe=hn&&hn.__createBinding||(Object.create?function(o,f,h,y){if(y===void 0)y=h;var x=Object.getOwnPropertyDescriptor(f,h);if(!x||("get"in x?!f.__esModule:x.writable||x.configurable))x={enumerable:!0,get:function(){return f[h]}};Object.defineProperty(o,y,x)}:function(o,f,h,y){if(y===void 0)y=h;o[y]=f[h]}),Lfe=hn&&hn.__setModuleDefault||(Object.create?function(o,f){Object.defineProperty(o,"default",{enumerable:!0,value:f})}:function(o,f){o.default=f}),Nfe=hn&&hn.__importStar||function(){var o=function(f){return o=Object.getOwnPropertyNames||function(h){var y=[];for(var x in h)if(Object.prototype.hasOwnProperty.call(h,x))y[y.length]=x;return y},o(f)};return function(f){if(f&&f.__esModule)return f;var h={};if(f!=null){for(var y=o(f),x=0;x<y.length;x++)if(y[x]!=="default")Dfe(h,f,y[x])}return Lfe(h,f),h}}();Object.defineProperty(hn,"__esModule",{value:!0});hn.Cache=void 0;hn.hashCacheKey=qfe;var jfe=Nfe(c("node:crypto")),Mfe=ba();class vN{constructor(o,f=1/0){this.defaultValidityTime=o,this.capacity=f,this.cache=new Map}clear(){this.cache.clear()}hasKey(o){return this.cache.has(o)}get(o){if(!o)return;let f=this.cache.get(o);if(!f)return;if(Ffe(f)){this.cache.delete(o);return}if(this.capacity!==1/0)this.cache.delete(o),this.cache.set(o,f);return f?.entry}set(o,f){if(!o)return;if(this.cache.size>=this.capacity&&this.cache.size&&!this.cache.has(o)){let y=this.cache.keys().next().value;this.cache.delete(y)}if(this.capacity!==1/0&&this.cache.has(o))this.cache.delete(o);let h=f.expires??this.inferDefaultExpirationTime();this.cache.set(o,{entry:f.entry,expires:h})}getOrInsertComputed(o,f){let h=this.get(o);if(h!==void 0)return h;let y=f();return this.set(o,y),y.entry}inferDefaultExpirationTime(){let o=new Date;return this.defaultValidityTime?o.setMilliseconds(o.getMilliseconds()+this.defaultValidityTime).valueOf():void 0}}hn.Cache=vN;async function qfe(o){let f=Mfe.stringify(o),h=new TextEncoder().encode(f),y=await jfe.subtle.digest("SHA-256",h);return Array.from(new Uint8Array(y)).map((z)=>z.toString(16).padStart(2,"0")).join("")}function Ffe(o){if(o.expires===void 0)return!1;return o.expires<Date.now()}});var vu=i(function(zN){Object.defineProperty(zN,"__esModule",{value:!0});zN.getIssuerSubdomain=Ufe;zN.replaceSubdomain=$fe;var xN=c("url"),Iv=se();function Ufe(o,f=!1){let h=f&&o?.ias_iss?o.ias_iss:o?.iss;if(h){if(!Iv.isValidUrl(h))throw Error(`Issuer URL in JWT is not a valid URL: "${h}".`);return _N(new xN.URL(h)).split(".")[0]}}function _N(o){let{host:f}=o;if(!f||f.indexOf(".")===-1)throw Error(`Failed to determine hostname: invalid host in "${o}".`);return f}function $fe(o,f){if(!Iv.isValidUrl(o))throw Error(`Base URL is not a valid URL: "${o}".`);let h=new xN.URL(o),y=_N(h).split("."),x=f?[f]:[];h.hostname=[...x,...y.slice(1)].join(".");let _=h.toString();return _=Iv.removeTrailingSlashes(_),_}});var xu=i(function(EN){Object.defineProperty(EN,"__esModule",{value:!0});EN.verificationKeyCache=EN.defaultTenantId=void 0;EN.userId=Jfe;EN.getDefaultTenantId=Zfe;EN.getTenantId=Yfe;EN.isIasToken=SN;EN.getSubdomain=Xfe;EN.audiences=Qfe;EN.decodeJwt=Ff;EN.decodeJwtComplete=TN;EN.retrieveJwt=rhe;EN.wrapJwtInHeader=ihe;EN.isXsuaaToken=she;EN.getJwtPair=ahe;EN.isUserToken=che;var CN=se(),Gfe=bN(),Kfe=Ps(),Wfe=vu(),Ja=CN.createLogger({package:"connectivity",messageContext:"jwt"});EN.defaultTenantId="provider-tenant";function wN(o){return o?Array.isArray(o)?o:[o]:[]}function Jfe(o){let f=o.user_id||o.user_uuid;return Ja.debug(`JWT user identifier is: ${f} (from ${o.user_id?"user_id (XSUAA)":"user_uuid (IAS)"}).`),f}function Zfe(){return Ja.debug("Could not determine tenant from JWT nor XSUAA, identity or destination service binding. Client Credentials token is cached without tenant information."),EN.defaultTenantId}function Yfe(o){let f=o?Ff(o):{};return Ja.debug(`JWT zid is: ${f.zid}, app_tid is: ${f.app_tid}, zone_uuid is: ${f.zone_uuid}.`),f.zid||f.app_tid||f.zone_uuid||void 0}function SN(o){if(!o.iss)return!1;try{let h=new URL(o.iss).hostname.toLowerCase();return h.endsWith(".accounts.ondemand.com")||h.endsWith(".accounts400.ondemand.com")}catch{return!1}}function Xfe(o){let f=o?Ff(o):{};return f?.ext_attr?.zdn||(SN(f)?void 0:Wfe.getIssuerSubdomain(f))}function Qfe(o){let f=ehe(o);return f.length?f:the(o)}function ehe({aud:o}){return wN(o).map((f)=>f.split(".")[0])}function the({scope:o}){return wN(o).reduce((f,h)=>h.includes(".")?[...f,h.split(".")[0]]:f,[])}function Ff(o){return typeof o==="string"?TN(o).payload:o}function TN(o){let f=Gfe.decode(o,{complete:!0,json:!0});if(f!==null&&lhe(f))return f;throw Error("JwtError: The given jwt payload does not encode valid JSON.")}function rhe(o){let f=ohe(o);if(nhe(f))return f?.split(" ")[1]}function ohe(o){let f=CN.pickValueIgnoreCase(o.headers,"authorization");if(f)return Array.isArray(f)?f[0]:f}function nhe(o){if(typeof o>"u")return Ja.warn("Authorization header not set."),!1;let[f,h]=o.split(" ");if(typeof h>"u")return Ja.warn("Token in auth header missing."),!1;if(f.toLowerCase()!=="bearer")return Ja.warn("Authorization type is not Bearer."),!1;return!0}EN.verificationKeyCache=new Kfe.Cache(900000);function ihe(o){return{headers:{Authorization:"Bearer "+o}}}function she(o){return o?.ext_attr?.enhancer==="XSUAA"}function ahe(o){return{encoded:o,decoded:Ff(o)}}function che(o){if(!o)return!1;let f=Object.keys(o.decoded);return!(f.length===1&&f[0]==="iss")}function lhe(o){return typeof o.payload!=="string"}});var Rv=i(function(The,IN){var Che=c("assert");The.apply=whe;function whe(o,f){if(Che(typeof f==="string"||typeof f==="object"||typeof f==="function","bad filter type: "+typeof f),!o)return[];if(typeof f==="string")return o[f]?[o[f]]:[];var h=[];for(var y in o)if(She(o[y],f))h.push(o[y]);return h}function She(o,f){if(typeof f==="function")return f(o);var h=!1;for(var y in f)if(o[y]===f[y]||/tags?/.test(y)&&o.tags&&o.tags.indexOf(f[y])>=0)h=!0;else return!1;return h}});var PN=i(function(qBe,AN){var Uf=c("assert"),khe=c("stream").Stream,Ohe=c("util"),Ihe=/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;function Av(o){return o.charAt(0).toUpperCase()+o.slice(1)}function Pi(o,f,h,y,x){throw new Uf.AssertionError({message:Ohe.format("%s (%s) is required",o,f),actual:x===void 0?typeof y:x(y),expected:f,operator:h||"===",stackStartFunction:Pi.caller})}function Pv(o){return Object.prototype.toString.call(o).slice(8,-1)}function Za(){}var _u={bool:{check:function(o){return typeof o==="boolean"}},func:{check:function(o){return typeof o==="function"}},string:{check:function(o){return typeof o==="string"}},object:{check:function(o){return typeof o==="object"&&o!==null}},number:{check:function(o){return typeof o==="number"&&!isNaN(o)}},finite:{check:function(o){return typeof o==="number"&&!isNaN(o)&&isFinite(o)}},buffer:{check:function(o){return Buffer.isBuffer(o)},operator:"Buffer.isBuffer"},array:{check:function(o){return Array.isArray(o)},operator:"Array.isArray"},stream:{check:function(o){return o instanceof khe},operator:"instanceof",actual:Pv},date:{check:function(o){return o instanceof Date},operator:"instanceof",actual:Pv},regexp:{check:function(o){return o instanceof RegExp},operator:"instanceof",actual:Pv},uuid:{check:function(o){return typeof o==="string"&&Ihe.test(o)},operator:"isUUID"}};function RN(o){var f=Object.keys(_u),h;if(process.env.NODE_NDEBUG)h=Za;else h=function(y,x){if(!y)Pi(x,"true",y)};return f.forEach(function(y){if(o){h[y]=Za;return}var x=_u[y];h[y]=function(_,z){if(!x.check(_))Pi(z,y,x.operator,_,x.actual)}}),f.forEach(function(y){var x="optional"+Av(y);if(o){h[x]=Za;return}var _=_u[y];h[x]=function(z,C){if(z===void 0||z===null)return;if(!_.check(z))Pi(C,y,_.operator,z,_.actual)}}),f.forEach(function(y){var x="arrayOf"+Av(y);if(o){h[x]=Za;return}var _=_u[y],z="["+y+"]";h[x]=function(C,w){if(!Array.isArray(C))Pi(w,z,_.operator,C,_.actual);var S;for(S=0;S<C.length;S++)if(!_.check(C[S]))Pi(w,z,_.operator,C,_.actual)}}),f.forEach(function(y){var x="optionalArrayOf"+Av(y);if(o){h[x]=Za;return}var _=_u[y],z="["+y+"]";h[x]=function(C,w){if(C===void 0||C===null)return;if(!Array.isArray(C))Pi(w,z,_.operator,C,_.actual);var S;for(S=0;S<C.length;S++)if(!_.check(C[S]))Pi(w,z,_.operator,C,_.actual)}}),Object.keys(Uf).forEach(function(y){if(y==="AssertionError"){h[y]=Uf[y];return}if(o){h[y]=Za;return}h[y]=Uf[y]}),h._setExports=RN,h}AN.exports=RN(process.env.NODE_NDEBUG)});var LN=i(function(Phe){var Cu=c("assert"),Rhe=c("util");Phe.sprintf=Dv;Phe.printf=Ahe;Phe.fprintf=BN;function Dv(o){var f=["([^%]*)","%","(['\\-+ #0]*?)","([1-9]\\d*)?","(\\.([1-9]\\d*))?","[lhjztL]*?","([diouxXfFeEgGaAcCsSp%jr])"].join(""),h=new RegExp(f),y=Array.prototype.slice.call(arguments,1),x=o,_,z,C,w,S,E,k,O,R,I="",A=1,M=0,D,U;Cu.equal("string",typeof x,"first argument must be a format string");while((R=h.exec(x))!==null){if(I+=R[1],x=x.substring(R[0].length),U=R[0].substring(R[1].length),D=M+R[1].length+1,M+=R[0].length,_=R[2]||"",z=R[3]||0,C=R[4]||"",w=R[6],S=!1,k=!1,E=" ",w=="%"){I+="%";continue}if(y.length===0)throw zu(o,D,U,"has no matching argument (too few arguments passed)");if(O=y.shift(),A++,_.match(/[\' #]/))throw zu(o,D,U,"uses unsupported flags");if(C.length>0)throw zu(o,D,U,"uses non-zero precision (not supported)");if(_.match(/-/))S=!0;if(_.match(/0/))E="0";if(_.match(/\+/))k=!0;switch(w){case"s":if(O===void 0||O===null)throw zu(o,D,U,"attempted to print undefined or null as a string (argument "+A+" to sprintf)");I+=Bv(E,z,S,O.toString());break;case"d":O=Math.floor(O);case"f":k=k&&O>0?"+":"",I+=k+Bv(E,z,S,O.toString());break;case"x":I+=Bv(E,z,S,O.toString(16));break;case"j":if(z===0)z=10;I+=Rhe.inspect(O,!1,z);break;case"r":I+=DN(O);break;default:throw zu(o,D,U,"is not supported")}}return I+=x,I}function zu(o,f,h,y){return Cu.equal(typeof o,"string"),Cu.equal(typeof h,"string"),Cu.equal(typeof f,"number"),Cu.equal(typeof y,"string"),Error('format string "'+o+'": conversion specifier "'+h+'" at character '+f+" "+y)}function Ahe(){var o=Array.prototype.slice.call(arguments);o.unshift(process.stdout),BN.apply(null,o)}function BN(o){var f=Array.prototype.slice.call(arguments,1);return o.write(Dv.apply(this,f))}function Bv(o,f,h,y){var x=y;while(x.length<f)if(h)x+=o;else x=o+x;return x}function DN(o){var f;if(!(o instanceof Error))throw Error(Dv("invalid type for %%r: %j",o));if(f="EXCEPTION: "+o.constructor.name+": "+o.stack,o.cause&&typeof o.cause==="function"){var h=o.cause();if(h)f+=`
102
+ Caused by: `+DN(h)}return f}});var NN=i(function(Yhe){function Nhe(o){if(Array.isArray)return Array.isArray(o);return $f(o)==="[object Array]"}Yhe.isArray=Nhe;function jhe(o){return typeof o==="boolean"}Yhe.isBoolean=jhe;function Mhe(o){return o===null}Yhe.isNull=Mhe;function qhe(o){return o==null}Yhe.isNullOrUndefined=qhe;function Fhe(o){return typeof o==="number"}Yhe.isNumber=Fhe;function Uhe(o){return typeof o==="string"}Yhe.isString=Uhe;function $he(o){return typeof o==="symbol"}Yhe.isSymbol=$he;function Vhe(o){return o===void 0}Yhe.isUndefined=Vhe;function Hhe(o){return $f(o)==="[object RegExp]"}Yhe.isRegExp=Hhe;function Ghe(o){return typeof o==="object"&&o!==null}Yhe.isObject=Ghe;function Khe(o){return $f(o)==="[object Date]"}Yhe.isDate=Khe;function Whe(o){return $f(o)==="[object Error]"||o instanceof Error}Yhe.isError=Whe;function Jhe(o){return typeof o==="function"}Yhe.isFunction=Jhe;function Zhe(o){return o===null||typeof o==="boolean"||typeof o==="number"||typeof o==="string"||typeof o==="symbol"||typeof o>"u"}Yhe.isPrimitive=Zhe;Yhe.isBuffer=Buffer.isBuffer;function $f(o){return Object.prototype.toString.call(o)}});var Su=i(function($Be,jN){var pr=PN(),Vf=c("util"),fme=LN(),mn=NN().isError,hme=fme.sprintf;jN.exports=_t;_t.VError=_t;_t.SError=wu;_t.WError=Bi;_t.MultiError=Ya;function Lv(o){var f,h,y,x,_;if(pr.object(o,"args"),pr.bool(o.strict,"args.strict"),pr.array(o.argv,"args.argv"),f=o.argv,f.length===0)h={},y=[];else if(mn(f[0]))h={cause:f[0]},y=f.slice(1);else if(typeof f[0]==="object"){h={};for(_ in f[0])h[_]=f[0][_];y=f.slice(1)}else pr.string(f[0],"first argument to VError, SError, or WError constructor must be a string, object, or Error"),h={},y=f;if(pr.object(h),!h.strict&&!o.strict)y=y.map(function(z){return z===null?"null":z===void 0?"undefined":z});if(y.length===0)x="";else x=hme.apply(null,y);return{options:h,shortmessage:x}}function _t(){var o,f,h,y,x,_,z;if(o=Array.prototype.slice.call(arguments,0),!(this instanceof _t))return f=Object.create(_t.prototype),_t.apply(f,arguments),f;if(h=Lv({argv:o,strict:!1}),h.options.name)pr.string(h.options.name,`error's "name" must be a string`),this.name=h.options.name;if(this.jse_shortmsg=h.shortmessage,_=h.shortmessage,y=h.options.cause,y){if(pr.ok(mn(y),"cause is not an Error"),this.jse_cause=y,!h.options.skipCauseMessage)_+=": "+y.message}if(this.jse_info={},h.options.info)for(z in h.options.info)this.jse_info[z]=h.options.info[z];if(this.message=_,Error.call(this,_),Error.captureStackTrace)x=h.options.constructorOpt||this.constructor,Error.captureStackTrace(this,x);return this}Vf.inherits(_t,Error);_t.prototype.name="VError";_t.prototype.toString=function(){var f=this.hasOwnProperty("name")&&this.name||this.constructor.name||this.constructor.prototype.name;if(this.message)f+=": "+this.message;return f};_t.prototype.cause=function(){var f=_t.cause(this);return f===null?void 0:f};_t.cause=function(o){return pr.ok(mn(o),"err must be an Error"),mn(o.jse_cause)?o.jse_cause:null};_t.info=function(o){var f,h,y;if(pr.ok(mn(o),"err must be an Error"),h=_t.cause(o),h!==null)f=_t.info(h);else f={};if(typeof o.jse_info=="object"&&o.jse_info!==null)for(y in o.jse_info)f[y]=o.jse_info[y];return f};_t.findCauseByName=function(o,f){var h;pr.ok(mn(o),"err must be an Error"),pr.string(f,"name"),pr.ok(f.length>0,"name cannot be empty");for(h=o;h!==null;h=_t.cause(h))if(pr.ok(mn(h)),h.name==f)return h;return null};_t.hasCauseWithName=function(o,f){return _t.findCauseByName(o,f)!==null};_t.fullStack=function(o){pr.ok(mn(o),"err must be an Error");var f=_t.cause(o);if(f)return o.stack+`
103
+ caused by: `+_t.fullStack(f);return o.stack};_t.errorFromList=function(o){if(pr.arrayOfObject(o,"errors"),o.length===0)return null;if(o.forEach(function(f){pr.ok(mn(f))}),o.length==1)return o[0];return new Ya(o)};_t.errorForEach=function(o,f){if(pr.ok(mn(o),"err must be an Error"),pr.func(f,"func"),o instanceof Ya)o.errors().forEach(function(y){f(y)});else f(o)};function wu(){var o,f,h,y;if(o=Array.prototype.slice.call(arguments,0),!(this instanceof wu))return f=Object.create(wu.prototype),wu.apply(f,arguments),f;return h=Lv({argv:o,strict:!0}),y=h.options,_t.call(this,y,"%s",h.shortmessage),this}Vf.inherits(wu,_t);function Ya(o){pr.array(o,"list of errors"),pr.ok(o.length>0,"must be at least one error"),this.ase_errors=o,_t.call(this,{cause:o[0]},"first of %d error%s",o.length,o.length==1?"":"s")}Vf.inherits(Ya,_t);Ya.prototype.name="MultiError";Ya.prototype.errors=function(){return this.ase_errors.slice(0)};function Bi(){var o,f,h,y;if(o=Array.prototype.slice.call(arguments,0),!(this instanceof Bi))return f=Object.create(Bi.prototype),Bi.apply(f,o),f;return h=Lv({argv:o,strict:!1}),y=h.options,y.skipCauseMessage=!0,_t.call(this,y,"%s",h.shortmessage),this}Vf.inherits(Bi,_t);Bi.prototype.name="WError";Bi.prototype.toString=function(){var f=this.hasOwnProperty("name")&&this.name||this.constructor.name||this.constructor.prototype.name;if(this.message)f+=": "+this.message;if(this.jse_cause&&this.jse_cause.message)f+="; caused by "+this.jse_cause.toString();return f};Bi.prototype.cause=function(f){if(mn(f))this.jse_cause=f;return this.jse_cause}});var jv=i(function(bme){var mme=Rv(),MN=Su(),gme=c("fs"),Nv=Tt()("cf-services");bme.readCFServices=qN;bme.filterCFServices=yme;function qN(){let o,f=process.env.VCAP_SERVICES_FILE_PATH;if(f)try{let y=gme.readFileSync(f,"utf8");o=JSON.parse(y),Nv(`Successfully read services from file: ${f}`)}catch(y){throw new MN(y,`Failed to read or parse file specified by VCAP_SERVICES_FILE_PATH: ${f}`)}else if(process.env.VCAP_SERVICES)try{o=JSON.parse(process.env.VCAP_SERVICES),Nv("Successfully read services from VCAP_SERVICES environment variable")}catch(y){throw new MN(y,"Environment variable VCAP_SERVICES is not a valid JSON string.")}else{Nv("Neither VCAP_SERVICES_FILE_PATH nor VCAP_SERVICES is set.");return}let h={};for(let y in o)for(let x in o[y]){let _=o[y][x];h[_.name]=_}return h}function yme(o){return mme.apply(qN(),o)}});var FN=i(function(HBe,Hf){var _me=function(){function o(E,k){return k!=null&&E instanceof k}var f;try{f=Map}catch(E){f=function(){}}var h;try{h=Set}catch(E){h=function(){}}var y;try{y=Promise}catch(E){y=function(){}}function x(E,k,O,R,I){if(typeof k==="object")O=k.depth,R=k.prototype,I=k.includeNonEnumerable,k=k.circular;var A=[],M=[],D=typeof Buffer<"u";if(typeof k>"u")k=!0;if(typeof O>"u")O=1/0;function U(F,J){if(F===null)return null;if(J===0)return F;var Q,te;if(typeof F!="object")return F;if(o(F,f))Q=new f;else if(o(F,h))Q=new h;else if(o(F,y))Q=new y(function(De,re){F.then(function(oe){De(U(oe,J-1))},function(oe){re(U(oe,J-1))})});else if(x.__isArray(F))Q=[];else if(x.__isRegExp(F)){if(Q=new RegExp(F.source,S(F)),F.lastIndex)Q.lastIndex=F.lastIndex}else if(x.__isDate(F))Q=new Date(F.getTime());else if(D&&Buffer.isBuffer(F)){if(Buffer.allocUnsafe)Q=Buffer.allocUnsafe(F.length);else Q=new Buffer(F.length);return F.copy(Q),Q}else if(o(F,Error))Q=Object.create(F);else if(typeof R>"u")te=Object.getPrototypeOf(F),Q=Object.create(te);else Q=Object.create(R),te=R;if(k){var le=A.indexOf(F);if(le!=-1)return M[le];A.push(F),M.push(Q)}if(o(F,f))F.forEach(function(De,re){var oe=U(re,J-1),Ge=U(De,J-1);Q.set(oe,Ge)});if(o(F,h))F.forEach(function(De){var re=U(De,J-1);Q.add(re)});for(var he in F){var xe;if(te)xe=Object.getOwnPropertyDescriptor(te,he);if(xe&&xe.set==null)continue;Q[he]=U(F[he],J-1)}if(Object.getOwnPropertySymbols){var Re=Object.getOwnPropertySymbols(F);for(var he=0;he<Re.length;he++){var me=Re[he],Ae=Object.getOwnPropertyDescriptor(F,me);if(Ae&&!Ae.enumerable&&!I)continue;if(Q[me]=U(F[me],J-1),!Ae.enumerable)Object.defineProperty(Q,me,{enumerable:!1})}}if(I){var We=Object.getOwnPropertyNames(F);for(var he=0;he<We.length;he++){var $e=We[he],Ae=Object.getOwnPropertyDescriptor(F,$e);if(Ae&&Ae.enumerable)continue;Q[$e]=U(F[$e],J-1),Object.defineProperty(Q,$e,{enumerable:!1})}}return Q}return U(E,O)}x.clonePrototype=function(k){if(k===null)return null;var O=function(){};return O.prototype=k,new O};function _(E){return Object.prototype.toString.call(E)}x.__objToStr=_;function z(E){return typeof E==="object"&&_(E)==="[object Date]"}x.__isDate=z;function C(E){return typeof E==="object"&&_(E)==="[object Array]"}x.__isArray=C;function w(E){return typeof E==="object"&&_(E)==="[object RegExp]"}x.__isRegExp=w;function S(E){var k="";if(E.global)k+="g";if(E.ignoreCase)k+="i";if(E.multiline)k+="m";return k}return x.__getRegExpFlags=S,x}();if(typeof Hf==="object"&&Hf.exports)Hf.exports=_me});var VN=i(function(UN,$N){(function(){var o,f,h,y=[].splice,x=function(z,C){if(!(z instanceof C))throw Error("Bound instance method accessed before binding")},_=[].indexOf;h=FN(),o=c("events").EventEmitter,$N.exports=f=function(){class z extends o{constructor(C={}){super();if(this.get=this.get.bind(this),this.mget=this.mget.bind(this),this.set=this.set.bind(this),this.mset=this.mset.bind(this),this.del=this.del.bind(this),this.take=this.take.bind(this),this.ttl=this.ttl.bind(this),this.getTtl=this.getTtl.bind(this),this.keys=this.keys.bind(this),this.has=this.has.bind(this),this.getStats=this.getStats.bind(this),this.flushAll=this.flushAll.bind(this),this.flushStats=this.flushStats.bind(this),this.close=this.close.bind(this),this._checkData=this._checkData.bind(this),this._check=this._check.bind(this),this._isInvalidKey=this._isInvalidKey.bind(this),this._wrap=this._wrap.bind(this),this._getValLength=this._getValLength.bind(this),this._error=this._error.bind(this),this._initErrors=this._initErrors.bind(this),this.options=C,this._initErrors(),this.data={},this.options=Object.assign({forceString:!1,objectValueSize:80,promiseValueSize:80,arrayValueSize:40,stdTTL:0,checkperiod:600,useClones:!0,deleteOnExpire:!0,enableLegacyCallbacks:!1,maxKeys:-1},this.options),this.options.enableLegacyCallbacks)console.warn("WARNING! node-cache legacy callback support will drop in v6.x"),["get","mget","set","del","ttl","getTtl","keys","has"].forEach((w)=>{var S=this[w];this[w]=function(...E){var k,O,R,I;if(R=E,[...E]=R,[k]=y.call(E,-1),typeof k==="function")try{I=S(...E),k(null,I)}catch(A){O=A,k(O)}else return S(...E,k)}});this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.validKeyTypes=["string","number"],this._checkData();return}get(C){var w,S;if(x(this,z),(S=this._isInvalidKey(C))!=null)throw S;if(this.data[C]!=null&&this._check(C,this.data[C]))return this.stats.hits++,w=this._unwrap(this.data[C]),w;else{this.stats.misses++;return}}mget(C){var w,S,E,k,O,R;if(x(this,z),!Array.isArray(C))throw w=this._error("EKEYSTYPE"),w;R={};for(E=0,O=C.length;E<O;E++){if(k=C[E],(S=this._isInvalidKey(k))!=null)throw S;if(this.data[k]!=null&&this._check(k,this.data[k]))this.stats.hits++,R[k]=this._unwrap(this.data[k]);else this.stats.misses++}return R}set(C,w,S){var E,k,O;if(x(this,z),this.options.maxKeys>-1&&this.stats.keys>=this.options.maxKeys)throw E=this._error("ECACHEFULL"),E;if(this.options.forceString&&!1==="string")w=JSON.stringify(w);if(S==null)S=this.options.stdTTL;if((k=this._isInvalidKey(C))!=null)throw k;if(O=!1,this.data[C])O=!0,this.stats.vsize-=this._getValLength(this._unwrap(this.data[C],!1));if(this.data[C]=this._wrap(w,S),this.stats.vsize+=this._getValLength(w),!O)this.stats.ksize+=this._getKeyLength(C),this.stats.keys++;return this.emit("set",C,w),!0}mset(C){var w,S,E,k,O,R,I,A,M,D;if(x(this,z),this.options.maxKeys>-1&&this.stats.keys+C.length>=this.options.maxKeys)throw w=this._error("ECACHEFULL"),w;for(E=0,I=C.length;E<I;E++){if(R=C[E],{key:O,val:D,ttl:M}=R,M&&typeof M!=="number")throw w=this._error("ETTLTYPE"),w;if((S=this._isInvalidKey(O))!=null)throw S}for(k=0,A=C.length;k<A;k++)R=C[k],{key:O,val:D,ttl:M}=R,this.set(O,D,M);return!0}del(C){var w,S,E,k,O,R;if(x(this,z),!Array.isArray(C))C=[C];w=0;for(E=0,O=C.length;E<O;E++){if(k=C[E],(S=this._isInvalidKey(k))!=null)throw S;if(this.data[k]!=null)this.stats.vsize-=this._getValLength(this._unwrap(this.data[k],!1)),this.stats.ksize-=this._getKeyLength(k),this.stats.keys--,w++,R=this.data[k],delete this.data[k],this.emit("del",k,R.v)}return w}take(C){var w;if(x(this,z),w=this.get(C),w!=null)this.del(C);return w}ttl(C,w){var S;if(x(this,z),w||(w=this.options.stdTTL),!C)return!1;if((S=this._isInvalidKey(C))!=null)throw S;if(this.data[C]!=null&&this._check(C,this.data[C])){if(w>=0)this.data[C]=this._wrap(this.data[C].v,w,!1);else this.del(C);return!0}else return!1}getTtl(C){var w,S;if(x(this,z),!C)return;if((S=this._isInvalidKey(C))!=null)throw S;if(this.data[C]!=null&&this._check(C,this.data[C]))return w=this.data[C].t,w;else return}keys(){var C;return x(this,z),C=Object.keys(this.data),C}has(C){var w;return x(this,z),w=this.data[C]!=null&&this._check(C,this.data[C]),w}getStats(){return x(this,z),this.stats}flushAll(C=!0){x(this,z),this.data={},this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this._killCheckPeriod(),this._checkData(C),this.emit("flush")}flushStats(){x(this,z),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.emit("flush_stats")}close(){x(this,z),this._killCheckPeriod()}_checkData(C=!0){var w,S,E;x(this,z),S=this.data;for(w in S)E=S[w],this._check(w,E);if(C&&this.options.checkperiod>0){if(this.checkTimeout=setTimeout(this._checkData,this.options.checkperiod*1000,C),this.checkTimeout!=null&&this.checkTimeout.unref!=null)this.checkTimeout.unref()}}_killCheckPeriod(){if(this.checkTimeout!=null)return clearTimeout(this.checkTimeout)}_check(C,w){var S;if(x(this,z),S=!0,w.t!==0&&w.t<Date.now()){if(this.options.deleteOnExpire)S=!1,this.del(C);this.emit("expired",C,this._unwrap(w))}return S}_isInvalidKey(C){var w;if(x(this,z),w=typeof C,_.call(this.validKeyTypes,w)<0)return this._error("EKEYTYPE",{type:typeof C})}_wrap(C,w,S=!0){var E,k,O,R;if(x(this,z),!this.options.useClones)S=!1;if(k=Date.now(),E=0,R=1000,w===0)E=0;else if(w)E=k+w*R;else if(this.options.stdTTL===0)E=this.options.stdTTL;else E=k+this.options.stdTTL*R;return O={t:E,v:S?h(C):C}}_unwrap(C,w=!0){if(!this.options.useClones)w=!1;if(C.v!=null)if(w)return h(C.v);else return C.v;return null}_getKeyLength(C){return C.toString().length}_getValLength(C){if(x(this,z),typeof C==="string")return C.length;else if(this.options.forceString)return JSON.stringify(C).length;else if(Array.isArray(C))return this.options.arrayValueSize*C.length;else if(typeof C==="number")return 8;else if(typeof(C!=null?C.then:void 0)==="function")return this.options.promiseValueSize;else if(typeof Buffer<"u"&&Buffer!==null?Buffer.isBuffer(C):void 0)return C.length;else if(C!=null&&typeof C==="object")return this.options.objectValueSize*Object.keys(C).length;else if(typeof C==="boolean")return 8;else return 0}_error(C,w={}){var S;return x(this,z),S=Error(),S.name=C,S.errorcode=C,S.message=this.ERRORS[C]!=null?this.ERRORS[C](w):"-",S.data=w,S}_initErrors(){var C,w,S;x(this,z),this.ERRORS={},S=this._ERRORS;for(w in S)C=S[w],this.ERRORS[w]=this.createErrorMessage(C)}createErrorMessage(C){return function(w){return C.replace("__key",w.type)}}}return z.prototype._ERRORS={ENOTFOUND:"Key `__key` not found",ECACHEFULL:"Cache max keys amount exceeded",EKEYTYPE:"The key argument has to be of type `string` or `number`. Found: `__key`",EKEYSTYPE:"The keys argument has to be an array.",ETTLTYPE:"The ttl argument has to be a number."},z}.call(this)}).call(UN)});var KN=i(function(HN,GN){(function(){var o=GN.exports=VN();o.version="5.1.2"}).call(HN)});var qv=i(function(Cme,JN){var Mv=Tt()("xsenv"),WN=["certificate","key","verificationkey","clientsecret","password","usersecret"];Cme.redactServicesSecretData=zme;function zme(o){if(!o)return{};Mv("Redacting Services Secret Data");let f=JSON.parse(JSON.stringify(o));if(!Object.keys(f)||Object.keys(f).length===0)return Mv("Did not find any services keys in service data."),f;for(let h in f){if(!f[h].credentials)continue;for(let y in WN){let x=WN[y];if(f[h].credentials[x])f[h].credentials[x]="redacted"}}return Mv(f),f}});var QN=i(function(Dme){var Bs=c("fs"),XN=c("assert"),Uv=c("path"),Tu=Tt()("xsenv"),Sme=KN(),ZN=new Sme({stdTTL:540}),YN=qv().redactServicesSecretData;Dme.readK8SServices=Bme;var Tme=(o)=>Bs.statSync(o).isFile(),Fv=(o)=>Bs.statSync(o).isDirectory();function Eme(o){return/^{(.|\r?\n?)*}(\s)*$/.test(o)}function kme(o){let f=Bs.readFileSync(o).toString("utf-8");if(process.env.XSENV_PARSE_ALL_JSON!=="true"){if(!Eme(f))return f}try{f=JSON.parse(f)}catch(y){Tu("Content of file %s is not valid JSON object",o)}return f}function Ome(o){let f={};for(let h of Bs.readdirSync(o)){let y=Uv.join(o,h);if(Tme(y))f[h]=kme(y)}return f}function Ime(o,f){if(!o)return[f];if(process.env.XSENV_PARSE_ALL_JSON)return[...o];return JSON.parse(o)}function Rme(o,f,h){let y=Ome(h),x=Ime(y.tags,o);if(!x.includes(o))x.push(o);return{credentials:y,name:f,label:y.label||o,tags:x}}function Ame(o,f){let h={};for(let y of Bs.readdirSync(f)){let x=Uv.join(f,y);if(Fv(x))h[y]=Rme(o,y,x)}return h}function Pme(o){XN(Fv(o),"secrets path must be a directory");let f={};for(let h of Bs.readdirSync(o)){let y=Uv.join(o,h);if(Fv(y))Object.assign(f,Ame(h,y))}return f}function Bme(o,f){o=o||process.env.SERVICE_BINDING_ROOT||"/etc/secrets/sapcp/",XN(typeof o==="string","secrets directory path must be string");let h=void 0,y=ZN.get(`${o}-services`);if(y&&!f){Tu(`Cached Secrets found: ${o}-services`);let x=YN(y);return Tu(x),y}if(Bs.existsSync(o)){h=Pme(o),Tu(`Caching Secret: ${o}-services`);let x=YN(h);Tu(x),ZN.set(`${o}-services`,h)}return h}});var oj=i(function(Gme){var Ds=c("fs"),Nme=c("assert"),tj=c("path"),$v=Tt()("xsenv");Gme.readServiceBindingServices=Hme;var jme=(o)=>Ds.statSync(o).isDirectory();function Mme(o){let f={};for(let h of Ds.readdirSync(o,{withFileTypes:!0})){let y=tj.join(o,h.name);if(qme(y,h))f[h.name]=Ds.readFileSync(y,"utf8")}return f}function qme(o,f){if(f.isFile())return!0;if(f.isSymbolicLink()){let h=Ds.realpathSync(o);if(Ds.statSync(h).isFile())return!0}return!1}var Fme={type:!0,provider:!0};function rj(o){try{return JSON.parse(o)}catch(f){return}}function Ume(o){let f={credentials:{}};for(let h in o)if(h in Fme)f[h]=o[h];else f.credentials[h]=o[h];return f}function ej(o,f=[]){let h={};for(let y of f){let{name:x}=y,_=o[x];if(x&&typeof _<"u")switch(y.format){case"text":{h[x]=_;break}case"json":{let z=rj(_);if(y.container)Object.assign(h,z);else h[x]=z;break}default:$v("Unexpected format %s",y.format)}else $v("Missing property %s",x)}return h}function $me(o,f){let h=Mme(o),y=h[".metadata"],x;if(y){if(x=rj(y),typeof x>"u")$v("Cannot parse JSON: %s/.metadata",o)}let _;if(x)_=ej(h,x.metaDataProperties),_.credentials=ej(h,x.credentialProperties);else _=Ume(h);if(!_.type)return;return _.name=f,_}function Vme(o){Nme(jme(o),"secrets path must be a directory");let f={};for(let h of Ds.readdirSync(o,{withFileTypes:!0}))if(h.isDirectory()){let y=tj.join(o,h.name),x=$me(y,h.name);if(x)f[x.name]=x}return f}function Hme(o){if(o=o||process.env.SERVICE_BINDING_ROOT,typeof o==="string"&&o.length>0)return Ds.existsSync(o)?Vme(o):void 0;else return}});var lj=i(function(rge){var Wme=c("assert"),Kf=Su(),Xa=Tt()("xsenv"),nj=c("fs"),Vv=Rv(),sj=jv().readCFServices,aj=QN().readK8SServices,cj=oj().readServiceBindingServices,Gf=qv().redactServicesSecretData;rge.getServices=Jme;rge.filterServices=Wf;rge.serviceCredentials=ege;rge.readServices=tge;function Jme(o,f,h){let y=typeof o==="string"?o:void 0,x=typeof o==="string"?f:o,_=typeof o==="string"?h:f;Wme(x&&typeof x==="object","Missing mandatory query parameter");var z=Zme(_),C={};for(var w in x){var S=Wf(y,x[w]);if(S.length===1)C[w]=S[0].credentials;else if(S.length>1)throw new Kf("Found %d services matching %s",S.length,w);else{if(!z[w])throw new Kf("No service matches %s",w);Xa("No service in VCAP_SERVICES matches %s. Returning default configuration from %s",w,_),C[w]=z[w]}}return C}function Zme(o){var f={};if(o!==null){if(o=o||"default-services.json",nj.existsSync(o)){Xa("Loading default service configuration from %s",o);try{f=JSON.parse(nj.readFileSync(o,"utf8"))}catch(h){throw new Kf(h,"Could not parse %s",o)}}}return f}function Wf(o,f){let h=arguments.length===1?void 0:o,y=arguments.length===1?o:f,x=Yme(h,y);if(!ij(x))x=Xme(h,y);if(!ij(x))x=Qme(h,y);return x}function Yme(o,f){let h=Vv.apply(sj(),f);return Hv("CF",f,o,h),h}function Xme(o,f){let h=Vv.apply(cj(o),f);return Hv("Service Binding",f,o||"default",h),h}function Qme(o,f){let h=Vv.apply(aj(o),f);return Hv("K8s",f,o||"default",h),h}function ij(o){return o&&Array.isArray(o)&&o.length>0}function Hv(o,f,h,y){let x=Gf(y);Xa("%s Service filter with filter: %s and path: %s, returned: %s.",o,f,h,x)}function ege(o,f){let h=arguments.length===1?void 0:o,y=arguments.length===1?o:f;var x=h?Wf(h,y):Wf(y);if(x.length!==1)throw new Kf("Found %d matching services",x.length);return x[0].credentials}function tge(o,f){let h=sj();if(h&&Object.keys(h).length>0){let z=Gf(h);return Xa("Found services in VCAP_SERVICES_FILE_PATH or VCAP_SERVICES, returning: %s",z),h}let y=cj(o);if(y&&Object.keys(y).length>0){let z=Gf(y);return Xa("Found Service Bindings, returning: %s",z),y}let x=aj(o,f&&f.disableCache),_=Gf(x);return Xa("Empty VCAP_SERVICES, returning K8s services: %s.",JSON.stringify(_)),x||{}}});var uj=i(function(fge){var age=Tt()("xsenv"),cge=c("path"),lge=c("fs"),uge=c("assert"),dge=Su();fge.loadCertificates=pge;function pge(o){if(uge(!o||typeof o==="string","certPath argument should be a string"),o=o||process.env.XS_CACERT_PATH,o){age("Loading certificate(s) %s",o);try{return o.split(cge.delimiter).map(function(f){return lge.readFileSync(f)})}catch(f){throw new dge(f,"Could not load certificate(s) "+o)}}}});var fj=i(function(ZBe,pj){var dj=c("fs"),mge=Tt()("xsenv"),gge=Su();pj.exports=yge;function yge(o){if(o=o||"default-env.json",!dj.existsSync(o))return;mge("Loading environment from %s",o);try{var f=JSON.parse(dj.readFileSync(o,"utf8"))}catch(x){throw new gge(x,"Could not parse %s",o)}for(var h in f){if(h in process.env)continue;var y=f[h];if(typeof y==="object")process.env[h]=JSON.stringify(y);else process.env[h]=y+""}}});var mj=i(function(vge){var hj=jv(),Eu=lj(),bge=uj();vge.loadCertificates=bge.loadCertificates;vge.loadEnv=fj();vge.getServices=Eu.getServices;vge.filterServices=Eu.filterServices;vge.serviceCredentials=Eu.serviceCredentials;vge.readServices=Eu.readServices;vge.readCFServices=hj.readCFServices;vge.cfServiceCredentials=Eu.serviceCredentials;vge.filterCFServices=hj.filterCFServices});var Kv=i(function(Uo){var Oge=Uo&&Uo.__createBinding||(Object.create?function(o,f,h,y){if(y===void 0)y=h;var x=Object.getOwnPropertyDescriptor(f,h);if(!x||("get"in x?!f.__esModule:x.writable||x.configurable))x={enumerable:!0,get:function(){return f[h]}};Object.defineProperty(o,y,x)}:function(o,f,h,y){if(y===void 0)y=h;o[y]=f[h]}),Ige=Uo&&Uo.__setModuleDefault||(Object.create?function(o,f){Object.defineProperty(o,"default",{enumerable:!0,value:f})}:function(o,f){o.default=f}),Rge=Uo&&Uo.__importStar||function(){var o=function(f){return o=Object.getOwnPropertyNames||function(h){var y=[];for(var x in h)if(Object.prototype.hasOwnProperty.call(h,x))y[y.length]=x;return y},o(f)};return function(f){if(f&&f.__esModule)return f;var h={};if(f!=null){for(var y=o(f),x=0;x<y.length;x++)if(y[x]!=="default")Oge(h,f,y[x])}return Ige(h,f),h}}();Object.defineProperty(Uo,"__esModule",{value:!0});Uo.getServiceBindings=Pge;Uo.getServiceBinding=yj;Uo.resolveServiceBinding=Bge;Uo.getServiceBindingByInstanceName=Dge;var Age=se(),Gv=Rge(mj()),gj=Age.createLogger({package:"connectivity",messageContext:"environment-accessor"});function Pge(o){return Gv.filterServices({label:o})}function yj(o){let f=Gv.filterServices({label:o});if(!f.length)gj.warn(`Could not find service binding of type '${o}'. This might cause errors in other parts of the application.`);else if(f.length>1)gj.warn(`Found more than one service binding for service type '${o}':${f.map(({name:h})=>`
104
+ - ${h}`).join("")}
105
+ Selecting the first one.`);return f[0]}function Bge(o){if(typeof o==="string"){let f=yj(o);if(!f)throw Error(`Could not find service binding of type '${o}'.`);return f}return o}function Dge(o){let f=Gv.filterServices(o);if(!f.length)throw Error(`Could not find service with name: '${o}'.`);if(f.length>1)throw Error(`Found multiple services with name: '${o}'.`);return f[0]}});var Wv=i(function(zj){Object.defineProperty(zj,"__esModule",{value:!0});zj.getServiceCredentials=jge;var Lge=se(),xj=xu(),Nge=Kv(),Qa=Lge.createLogger({package:"connectivity",messageContext:"environment-accessor"});function jge(o,f){let h=Mge(o);if(!h.length){Qa.debug(`Could not find binding to service '${o}', that includes credentials.`);return}if(f)return qge(o,h,typeof f==="string"?xj.decodeJwt(f):f);return Qa.debug(`No JWT given to select binding to service '${o}'.`),Fge(o,h)}function Mge(o){let f=Nge.getServiceBindings(o),h=f.map(({credentials:y})=>y).filter((y)=>y);if(h.length<f.length){let y=f.length-h.length;Qa.warn(`Ignoring ${y} service binding${y>1?"s":""} of service type '${o}' because of missing credentials.`)}return h}function qge(o,f,h){let y=f.filter((x)=>Uge(x,h)||$ge(x,h));return _j(o,y,!0),y[0]}function Fge(o,f){return _j(o,f,!1),f[0]}function _j(o,f,h){if(f.length===1)Qa.debug(`Found one service binding for service '${o}'${bj(h)}. ${vj(f)}`);else if(f.length>1)Qa.warn(`Found multiple bindings for service '${o}'${bj(h)}. ${vj(f)}
106
+ Choosing first one ('${f[0].xsappname}').`);else if(h)Qa.warn(`Found no service binding for service '${o}' matching either the token's client id or audience.`)}function bj(o){return o?" using JWT":""}function vj(o){let f=o.map(({xsappname:h})=>h);if(f.length)return f.length===1?`App name: ${f[0]}.`:`App names:${f.map((h)=>`
107
+ - ${h}`).join("")}`;return""}function Uge(o,f){return o.clientid===f.client_id}function $ge(o,f){return xj.audiences(f).includes(o.xsappname)}});var wj=i(function(Cj){Object.defineProperty(Cj,"__esModule",{value:!0});Cj.getDestinationServiceCredentials=Gge;var Hge=Wv();function Gge(){let o=Hge.getServiceCredentials("destination");if(!o)throw Error("Could not find binding to the destination service.");return o}});var Tj=i(function(Sj){Object.defineProperty(Sj,"__esModule",{value:!0})});var kj=i(function(Ej){Object.defineProperty(Ej,"__esModule",{value:!0});Ej.clearXsuaaServices=Jge;Ej.getXsuaaInstanceFromServiceCredentials=Zge;var Wge=xf(),ku={};function Jge(){Object.keys(ku).forEach((o)=>delete ku[o])}function Zge(o,f=!1){let h=f?{validation:{jwks:{expirationTime:0,refreshPeriod:0}}}:void 0,y=`${o.clientid}:${f}`;if(!ku[y])ku[y]=new Wge.XsuaaService(o,h);return ku[y]}});var Rj=i(function(Ij){Object.defineProperty(Ij,"__esModule",{value:!0});Ij.identityServicesCache=void 0;Ij.getIdentityServiceInstanceFromCredentials=r0e;var Oj=xf(),Qge=se(),Jv=vu(),e0e=Qge.createLogger({package:"connectivity",messageContext:"ias"});Ij.identityServicesCache=new Map;function t0e(o,f){let y=(typeof f==="string"?new Oj.IdentityServiceToken(f):{payload:f}).payload,x=Jv.getIssuerSubdomain(y,!0);if(!x)return e0e.warn("Could not extract subdomain from JWT assertion issuer. Falling back to service binding URL."),{credentials:o,subdomain:x};return{credentials:{...o,url:Jv.replaceSubdomain(o.url,x)},subdomain:x}}function r0e(o,f,h=!1){let y=h?{validation:{jwks:{expirationTime:0,refreshPeriod:0}}}:void 0,x;if(f){let C=t0e(o,f);o=C.credentials,x=C.subdomain}x=x??Jv.getIssuerSubdomain({iss:o.url});let _=`${o.clientid}:${x}:${h}`,z=Ij.identityServicesCache.get(_);if(z===void 0)z=new Oj.IdentityService(o,y),Ij.identityServicesCache.set(_,z);return z}});var gn=i(function($o){var n0e=$o&&$o.__createBinding||(Object.create?function(o,f,h,y){if(y===void 0)y=h;var x=Object.getOwnPropertyDescriptor(f,h);if(!x||("get"in x?!f.__esModule:x.writable||x.configurable))x={enumerable:!0,get:function(){return f[h]}};Object.defineProperty(o,y,x)}:function(o,f,h,y){if(y===void 0)y=h;o[y]=f[h]}),ec=$o&&$o.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))n0e(f,o,h)};Object.defineProperty($o,"__esModule",{value:!0});ec(wj(),$o);ec(Kv(),$o);ec(Tj(),$o);ec(Wv(),$o);ec(kj(),$o);ec(Rj(),$o)});var Dj=i(function(Bj){Object.defineProperty(Bj,"__esModule",{value:!0});Bj.decodeOrMakeJwt=i0e;Bj.getTenantIdFromBinding=Pj;var Zv=gn(),Aj=xu();function i0e(o){if(o){let h=typeof o==="string"?Aj.decodeJwt(o):o;if(Aj.getTenantId(h))return h}let f=Pj();if(f)return{zid:f}}function Pj(){return Zv.getServiceCredentials("xsuaa")?.tenantid||Zv.getServiceCredentials("identity")?.app_tid||Zv.getServiceCredentials("destination")?.tenantid}});var Nj=i(function(Lj){Object.defineProperty(Lj,"__esModule",{value:!0})});var Jr=i(function(oi){var c0e=oi&&oi.__createBinding||(Object.create?function(o,f,h,y){if(y===void 0)y=h;var x=Object.getOwnPropertyDescriptor(f,h);if(!x||("get"in x?!f.__esModule:x.writable||x.configurable))x={enumerable:!0,get:function(){return f[h]}};Object.defineProperty(o,y,x)}:function(o,f,h,y){if(y===void 0)y=h;o[y]=f[h]}),Yv=oi&&oi.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))c0e(f,o,h)};Object.defineProperty(oi,"__esModule",{value:!0});Yv(Dj(),oi);Yv(xu(),oi);Yv(Nj(),oi)});var Ou=i(function(Xv){Object.defineProperty(Xv,"__esModule",{value:!0});Xv.identityServicesCache=void 0;Xv.shouldExchangeToken=f0e;Xv.fetchIasToken=h0e;Xv.getIasAppTid=b0e;var l0e=Va(),u0e=sf(),jj=xf(),d0e=se(),Mj=Jr(),qj=gn(),p0e=gn();Object.defineProperty(Xv,"identityServicesCache",{enumerable:!0,get:function(){return p0e.identityServicesCache}});function f0e(o){return o.iasToXsuaaTokenExchange===!0&&!!o.jwt&&!Mj.isXsuaaToken(Mj.decodeJwt(o.jwt))}async function h0e(o,f={}){let h=qj.resolveServiceBinding(o),y={serviceCredentials:h.credentials,useCache:f.useCache,...f};return await l0e.executeWithMiddleware(u0e.resilience(),{fn:y0e,fnArgument:y,context:{uri:y.serviceCredentials.url,tenantId:y.serviceCredentials.app_tid}}).catch((_)=>{let C=`Could not fetch IAS client for service "${typeof o==="string"?o:o.name||"unknown"}" of type ${h.label}`;if(_.response?.status===401)C+=". In case you are accessing a multi-tenant BTP service on behalf of a subscriber tenant, ensure that the service instance is declared as dependency to SaaS Provisioning Service or Subscription Manager (SMS) and subscribed for the current tenant";throw new d0e.ErrorWithCause(C+(_.message?`: ${_.message}`:"."),_)})}function m0e(o){if(!o)throw Error("Resource parameter is required");if("name"in o)return`urn:sap:identity:application:provider:name:${o.name}`;let f=[`urn:sap:identity:application:provider:clientid:${o.providerClientId}`];if(o.providerTenantId)f.push(`apptid:${o.providerTenantId}`);return f.join(":")}function g0e(o){let f={token_format:"jwt",...o.resource&&{resource:m0e(o.resource)},...o.appTid&&{app_tid:o.appTid},...o.extraParams||{}};if(o.authenticationType==="OAuth2JWTBearer"){if(!o.assertion)throw Error('JWT assertion required for authenticationType: "OAuth2JWTBearer". Provide iasOptions.assertion.');if(o.resource&&f.refresh_expiry===void 0)f.refresh_expiry=0;let h=new jj.IdentityServiceToken(o.assertion);if(!f.app_tid)f.app_tid=h?.appTid||null;if(f.app_tid)f.refresh_expiry=0}return f}async function y0e(o){let f=o.authenticationType==="OAuth2JWTBearer"?o.assertion:o.requestAs!=="provider-tenant"?o.jwt:void 0,h=qj.getIdentityServiceInstanceFromCredentials(o.serviceCredentials,f),y=g0e(o),x=o.useCache!==!1,_=o.authenticationType==="OAuth2JWTBearer"?x?await h.getJwtBearerToken(o.assertion,y):await h.fetchJwtBearerToken(o.assertion,y):x?await h.getClientCredentialsToken(y):await h.fetchClientCredentialsToken(y),z=new jj.IdentityServiceToken(_.access_token);return{access_token:_.access_token,token_type:_.token_type,expires_in:_.expires_in,scope:"",jti:z.payload?.jti??"",aud:z.payload?.aud??[],app_tid:z.appTid,scim_id:z.scimId,ias_apis:z?.consumedApis,custom_iss:z.customIssuer??void 0,refresh_token:_?.refresh_token}}function b0e(o,f,h){let{requestAs:y}=o;if(y==="provider-tenant")return f.credentials.app_tid;if(y==="current-tenant"||!y)return h?.app_tid;throw Error(`Invalid requestAs value: ${y}`)}});var ex=i(function(Uj){Object.defineProperty(Uj,"__esModule",{value:!0});Uj.clientCredentialsTokenCache=void 0;Uj.getCacheKey=Qv;var C0e=se(),w0e=Ps(),Fj=C0e.createLogger({package:"connectivity",messageContext:"client-credentials-token-cache"}),S0e=(o)=>({getToken:(f,h)=>o.get(Qv(f,h)),cacheToken:(f,h,y)=>{o.set(Qv(f,h),{entry:y,expires:y.expires_in?Date.now()+y.expires_in*1000:void 0})},clear:()=>{o.clear()},getCacheInstance:()=>o});function Qv(o,f){if(!o){Fj.warn("Cannot create cache key for client credentials token cache. The given tenant ID is undefined.");return}if(!f){Fj.warn("Cannot create cache key for client credentials token cache. The given client ID is undefined.");return}return[o,f].join(":")}Uj.clientCredentialsTokenCache=S0e(new w0e.Cache(300000))});var tx=i(function(Gj){Object.defineProperty(Gj,"__esModule",{value:!0});Gj.getClientCredentialsToken=E0e;Gj.getUserToken=k0e;var Vj=Va(),Hj=sf(),Zf=gn(),tc=Jr();async function E0e(o,f){let h=f?tc.decodeJwt(f):{},y={subdomain:tc.getSubdomain(h),zoneId:tc.getTenantId(h),serviceCredentials:Zf.resolveServiceBinding(o).credentials},x=function(_){return Zf.getXsuaaInstanceFromServiceCredentials(_.serviceCredentials).fetchClientCredentialsToken({tenant:_.zoneId?void 0:_.subdomain,zid:_.zoneId})};return Vj.executeWithMiddleware(Hj.resilience(),{fn:x,fnArgument:y,context:{uri:y.serviceCredentials.url,tenantId:y.zoneId??y.serviceCredentials.tenantid}}).catch((_)=>{throw Error(`Could not fetch client credentials token for service of type ${Zf.resolveServiceBinding(o).label}: ${_.message}`)})}function k0e(o,f){let h=tc.decodeJwt(f),y={subdomain:tc.getSubdomain(h),zoneId:tc.getTenantId(h),serviceCredentials:o.credentials,userJwt:f},x=function(_){return Zf.getXsuaaInstanceFromServiceCredentials(_.serviceCredentials).fetchJwtBearerToken(_.userJwt,{tenant:_.zoneId?void 0:_.subdomain,zid:_.zoneId}).then((C)=>C.access_token)};return Vj.executeWithMiddleware(Hj.resilience(),{fn:x,fnArgument:y,context:{uri:o.credentials.url,tenantId:y.zoneId??o.credentials.tenantid}}).catch((_)=>{throw Error(`Could not fetch JWT bearer token for service of type ${o.label}: ${_.message}`)})}});var Yf=i(function(Wj){Object.defineProperty(Wj,"__esModule",{value:!0});Wj.buildIasDestination=A0e;Wj.buildDestination=Kj;var R0e=Jr();function A0e(o,f,h){let y=Kj(o,h?.targetUrl??f.credentials.url,f.name,h.authenticationType||"OAuth2ClientCredentials");if(f.credentials.certificate&&f.credentials.key)y.mtlsKeyPair={cert:f.credentials.certificate,key:f.credentials.key};return y}function Kj(o,f,h,y="OAuth2ClientCredentials"){let x=R0e.decodeJwt(o).exp,_=x?x*1000:void 0,z=Date.now(),C=_?Math.floor((_-z)/1000).toString():void 0;return{url:f,name:h,authentication:y,authTokens:[{value:o,type:"bearer",expiresIn:C,http_header:{key:"Authorization",value:`Bearer ${o}`},error:null}]}}});var Di=i(function(e4){Object.defineProperty(e4,"__esModule",{value:!0});e4.serviceToken=N0e;e4.jwtBearerToken=j0e;e4.getIasToken=Qj;e4.createDestinationFromIasService=M0e;var D0e=se(),Xf=Jr(),Jj=ex(),rx=gn(),Zj=tx(),Yj=Ou(),L0e=Yf();async function N0e(o,f){let h={useCache:!0,enableCircuitBreaker:!0,...f},y=rx.resolveServiceBinding(o),x=y.credentials,_=f?.jwt?Xf.getTenantId(f.jwt)||Xf.getSubdomain(f.jwt):Xf.getTenantIdFromBinding()||Xf.getDefaultTenantId();if(h.useCache){let z=Jj.clientCredentialsTokenCache.getToken(_,x.clientid);if(z)return z.access_token}try{let z=await Zj.getClientCredentialsToken(y,f?.jwt);if(h.useCache)Jj.clientCredentialsTokenCache.cacheToken(_,x.clientid,z);return z.access_token}catch(z){throw new D0e.ErrorWithCause(`Could not fetch client credentials token for service of type "${y.label}".`,z)}}async function j0e(o,f){let h=rx.resolveServiceBinding(f);return Zj.getUserToken(h,o)}async function Xj(o){if(typeof o==="string")return rx.resolveServiceBinding(o);return"credentials"in o?o:{name:"identity",label:"identity",tags:[],credentials:o}}async function Qj(o="identity",f){let h=f?.useCache!==!1,y=f?.jwt,x={authenticationType:"OAuth2ClientCredentials",...f},_=await Xj(o);if(x.authenticationType!=="OAuth2JWTBearer"&&!x.appTid)x.appTid=Yj.getIasAppTid(x,_,y);let z=await Yj.fetchIasToken(_,{...x,jwt:y,useCache:h});return{token:z.access_token,expiresIn:z.expires_in,refreshToken:z.refresh_token}}async function M0e(o="identity",f){let h=await Xj(o),{token:y}=await Qj(h,f),x={authenticationType:"OAuth2ClientCredentials",...f};return L0e.buildIasDestination(y,h,x)}});var Qf=i(function(t4){Object.defineProperty(t4,"__esModule",{value:!0});t4.isDestinationFetchOptions=V0e;function V0e(o){return o.destinationName!==void 0||o.service!==void 0}});var rc=i(function(p4){Object.defineProperty(p4,"__esModule",{value:!0});p4.sanitizeDestination=n4;p4.parseDestination=G0e;p4.getAdditionalHeadersAndQueryParameters=s4;p4.getAdditionalHeaders=a4;p4.getAdditionalQueryParameters=c4;p4.getDestinationConfig=l4;p4.toDestinationNameUrl=K0e;p4.parseCertificate=u4;p4.isDestinationConfiguration=oye;p4.isDestinationJson=d4;p4.noDestinationErrorMessage=nye;var o4=Qf();function n4(o){let f=X0e(o);return f=Z0e(f),f=J0e(f),f=Q0e(f),f=rye(f),f=W0e(f),f}function G0e(o){let f=l4(o),h=Object.entries(f).reduce((x,[_,z])=>{if(_ in r4)x[r4[_]]=z;return x},{originalProperties:o,authTokens:o.authTokens||[],certificates:o.certificates||[]}),y=s4(f);return n4({...h,...y})}function i4(o,f){return Object.entries(o).filter(([y])=>y.startsWith(f)).reduce((y,[x,_])=>{let z=x.replace(f,"");return y[z]=_,y},{})}function s4(o){let f={},h=a4(o).headers;if(h&&Object.keys(h).length)f.headers=h;let y=c4(o).queryParameters;if(y&&Object.keys(y).length)f.queryParameters=y;return f}function a4(o){let f=i4(o,"URL.headers."),h={};if(Object.keys(f).length)h.headers=f;return h}function c4(o){let f=i4(o,"URL.queries."),h={};if(Object.keys(f).length)h.queryParameters=f;return h}function l4(o){return d4(o)?o.destinationConfiguration:o}function K0e(o){if(o4.isDestinationFetchOptions(o))return`name: ${o.destinationName}`;let f=["name","url"].filter((h)=>o[h]).map((h)=>`${h}: ${o[h]}`);return f.length>0?f.join(","):"Destination does not have a 'name' or 'url' property."}function W0e(o){let f=o.originalProperties?o.originalProperties:o;return{...o,originalProperties:f}}function J0e(o){return o.authentication?o:{...o,authentication:tye(o)}}function u4(o){return{name:o.Name||o.name,content:o.Content||o.content,type:o.Type||o.type}}function Z0e(o){return{...o,certificates:(o.certificates||[]).map((f)=>u4(f))}}function Y0e(o){return{type:o.type,value:o.value,expiresIn:o.expires_in,error:"error"in o?o.error:null,http_header:o.http_header}}function X0e(o){return{...o,authTokens:(o.authTokens||[]).map((f)=>Y0e(f))}}function Q0e(o){return{...o,isTrustingAllCertificates:eye(o.isTrustingAllCertificates)}}function eye(o){if(typeof o==="string")return o.toLowerCase()==="true";return!!o}function tye(o){return o.authentication||o.username&&o.password?"BasicAuthentication":"NoAuthentication"}function rye(o){let f=o.originalProperties?.forwardAuthToken??o.originalProperties?.["HTML5.ForwardAuthToken"]??o.forwardAuthToken;return{...o,forwardAuthToken:f==="true"||f===!0}}function oye(o){return o.URL!==void 0}function d4(o){return Object.keys(o).includes("destinationConfiguration")}var r4={URL:"url",Name:"name",User:"username",Password:"password",ProxyType:"proxyType","sap-client":"sapClient",Authentication:"authentication",TrustAll:"isTrustingAllCertificates",Type:"type",tokenServiceURL:"tokenServiceUrl",clientId:"clientId",clientSecret:"clientSecret",tokenServiceUser:"tokenServiceUser",tokenServicePassword:"tokenServicePassword",CloudConnectorLocationId:"cloudConnectorLocationId",certificates:"certificates",KeyStoreLocation:"keyStoreName",KeyStorePassword:"keyStorePassword",SystemUser:"systemUser","x_user_token.jwks":"jwks","x_user_token.jwks_uri":"jwksUri","HTML5.ForwardAuthToken":"forwardAuthToken",forwardAuthToken:"forwardAuthToken"};function nye(o){if(o4.isDestinationFetchOptions(o))return o.destinationName?`Could not find a destination with name "${o.destinationName}"! Unable to execute request.`:"Could not find a destination from service binding! Unable to execute request.";return"Could not find a destination to execute request against and no destination name has been provided (this should never happen)!"}});var eh=i(function(h4){Object.defineProperty(h4,"__esModule",{value:!0});h4.getProtocol=f4;var gye={http:"http",https:"https",socks:"socks"};function f4(o){return o.endsWith(":")?f4(o.slice(0,-1)):gye[o]}});var Iu=i(function(y4){Object.defineProperty(y4,"__esModule",{value:!0});y4.getAuthHeader=m4;y4.basicHeader=g4;y4.buildAuthorizationHeaders=wye;var oc=se(),bye=rc(),th=oc.createLogger({package:"connectivity",messageContext:"authorization-header"});function m4(o,f){if(o==="PrincipalPropagation"){let y=oc.pickValueIgnoreCase(f,"SAP-Connectivity-Authentication");if(y)return{"SAP-Connectivity-Authentication":y}}let h=oc.pickValueIgnoreCase(f,"authorization");if(h)return{authorization:h}}function vye(o,f){if(!f||!f.length)throw Error(`\`AuthenticationType\` is "${o}", but no auth tokens could be fetched from the destination service.`);let h=f.filter((x)=>!x.error);if(!h.length)throw Error(["The destination tried to provide authorization tokens but failed in all cases. This is most likely due to misconfiguration.","Original error messages:",...f.map((x)=>x.error)].join(`
108
+ `));return{authorization:h[0].http_header.value}}function xye(o){if(oc.isNullish(o.username)||oc.isNullish(o.password))throw Error('AuthenticationType is "BasicAuthentication", but "username" and / or "password" are missing!');return{authorization:g4(o.username,o.password)}}function g4(o,f){return"Basic "+oc.encodeBase64(`${o}:${f}`)}function _ye(o){let f=o?.proxyConfiguration?.headers?.["SAP-Connectivity-Authentication"];if(!f)throw Error("Principal propagation was selected in destination, but no SAP-Connectivity-Authentication bearer header was added by connectivity service.");return{"SAP-Connectivity-Authentication":f}}function zye(o){let f=o?.proxyConfiguration?.headers?.["Proxy-Authorization"];if(f)return{"Proxy-Authorization":f}}async function Cye(o){let f=m4(o.authentication,o.headers);if(th.debug(`Getting authentication related headers for authentication type: ${o.authentication}`),f)return th.debug("Authentication header from 'destination.headers' used."),f;switch(o.authentication){case null:case void 0:th.warn('No authentication type is specified on the destination. Assuming "NoAuthentication".');return;case"NoAuthentication":return;case"ClientCertificateAuthentication":return;case"SAMLAssertion":case"OAuth2SAMLBearerAssertion":case"OAuth2UserTokenExchange":case"OAuth2JWTBearer":case"OAuth2ClientCredentials":case"OAuth2Password":case"OAuth2RefreshToken":{let h=vye(o.authentication,o.authTokens);if(o.authentication==="SAMLAssertion")return th.warn("Destination authentication flow is 'SamlAssertion' and the auth header contains the SAML assertion. In most cases you want to translate the assertion to a Bearer token using the 'OAuth2SAMLBearerAssertion' flow."),{...h,"x-sap-security-session":"create"};return h}case"BasicAuthentication":return xye(o);case"PrincipalPropagation":return _ye(o);default:throw Error(`The destination used "${o.authentication}" as authentication type which is not supported by the SAP Cloud SDK.`)}}async function wye(o){let f=bye.sanitizeDestination(o);return{...await Cye(f),...zye(f)}}});var rh=i(function(b4){Object.defineProperty(b4,"__esModule",{value:!0});b4.getProtocolOrDefault=Rye;var kye=se(),Oye=eh(),Iye=kye.createLogger({package:"connectivity",messageContext:"get-protocol"});function Rye(o){let f=o.url.toLowerCase()?.split("://");if(!f||f.length===1)return Iye.warn(`URL of the provided destination (${o.url}) has no protocol specified! Assuming HTTPS.`),"https";let h=Oye.getProtocol(f[0]);if(!h)throw Error(`Protocol of the provided destination (${o.url}) is not supported! Currently only HTTP and HTTPS are supported.`);return h}});var Ls=i(function(x4){Object.defineProperty(x4,"__esModule",{value:!0});x4.assertHttpDestination=Pye;x4.isHttpDestination=v4;function Pye(o){if(!v4(o))throw Error(o.url?`The 'type' property is ${o.type} instead of HTTP for destination '${o.name}' which is mandatory if you use it as an 'HTTP destination`:`The 'url' property is not set for destination ${o.name} which is mandatory if you use it as an 'HTTP destination`)}function v4(o){return!!o&&!!o.url&&(!o.type||o.type==="HTTP")}});var Ns=i(function(S4){Object.defineProperty(S4,"__esModule",{value:!0});S4.proxyStrategy=qye;S4.parseProxyEnv=w4;S4.addProxyConfigurationInternet=Gye;S4.getProxyConfig=Kye;var Lye=c("node:url"),z4=se(),Nye=eh(),jye=Iu(),C4=rh(),Mye=Ls(),Vo=z4.createLogger({package:"connectivity",messageContext:"proxy-util"});function qye(o){if(o.proxyType==="OnPremise")return Vo.debug("OnPrem destination proxy settings from connectivity service will be used."),"on-premise";if(o.proxyType==="PrivateLink")return Vo.debug("PrivateLink destination proxy settings will be used. This is not supported in local/CI/CD environments."),"private-link";if(Mye.isHttpDestination(o)){let f=C4.getProtocolOrDefault(o);return Fye(f,o.url)}return"no-proxy"}function Fye(o,f){if(!ox(o))return Vo.debug(`Could not find proxy settings for ${o} in the environment variables - no proxy used.`),"no-proxy";if(_4().includes(f))return Vo.debug(`Destination URL ${f} is in no_proxy list: ${_4()} - no proxy used.`),"no-proxy";if(ox(o))return Vo.debug(`Proxy settings for ${o} are found in environment variables.`),"internet";return"no-proxy"}function ox(o){let f=o+"_proxy",h=process.env[f.toLowerCase()]||process.env[f.toUpperCase()];return Vo.debug(`Tried to read ${f.toLowerCase()} or ${f.toUpperCase()} from the environment variables. Value is ${h}.`),h||void 0}function _4(){let o=process.env.no_proxy||process.env.NO_PROXY;if(!o)return[];let f=o.split(",").map((h)=>h.trim());if(f.find((h)=>h.includes("*")))Vo.warn(`The no_proxy env contains a wildcard ${o}, which is currently not supported`);return f}function Uye(o){if(o.port)return parseInt(o.port);return o.protocol==="https:"?443:80}function $ye(o){let f=o.match(/^[\w.-]+:\/\//);return f?f[0].slice(0,-2):void 0}function Vye(o){if(!$ye(o))return Vo.debug('No protocol specified, using "http:".'),`http://${o}`;return o}function Hye(o){if(o.protocol!=="http:"&&o.protocol!=="https:")throw Error(`Unsupported protocol "${o.protocol}".`);if(o.protocol==="https:")Vo.debug('Using protocol "https:" to connect to a proxy. This is unusual but possible.');if(o.username&&!o.password)throw Error("Password missing.")}function w4(o){let f=Vye(o);try{let h=new Lye.URL(f);Hye(h);let y={host:h.hostname,protocol:Nye.getProtocol(h.protocol),port:Uye(h)};if(h.username&&h.password)y.headers={"Proxy-Authorization":jye.basicHeader(decodeURIComponent(h.username),decodeURIComponent(h.password))};if(y){let x={...y,headers:z4.sanitizeRecord(y.headers||{},"Authorization header present. Not logged for security reasons.")};Vo.debug(`Used Proxy Configuration: ${JSON.stringify(x,null,2)}.`)}return y}catch(h){Vo.warn(`Could not parse proxy configuration from environment variable. Reason: ${h.message}`);return}}function Gye(o){let f=ox(C4.getProtocolOrDefault(o));if(f)return{...o,proxyConfiguration:w4(f)||o.proxyConfiguration};return Vo.warn("Attempt to get proxy config from environment variables failed. At this point this should not happen - no proxy used."),{...o}}function Kye(o){if(o.proxyConfiguration){let{host:f,protocol:h,port:y}=o.proxyConfiguration;return{host:f,protocol:h,port:y}}return!1}});var nc=i(function(E4){Object.defineProperty(E4,"__esModule",{value:!0});E4.addForwardedAuthTokenIfNeeded=rbe;var Xye=se(),Qye=Jr(),T4=Xye.createLogger({package:"connectivity",messageContext:"forward-auth-token"});function ebe(o){let f=Qye.decodeJwt(o);return[{value:o,expiresIn:f.exp?.toString(),error:null,http_header:{key:"Authorization",value:`Bearer ${o}`},type:"Bearer"}]}function tbe(o){if(!o)T4.warn("Option 'forwardAuthToken' was set on destination but no token was provided to forward. This is most likely unintended and will lead to an authorization error on request execution.");return!!o}function rbe(o,f){if(o.forwardAuthToken){if(tbe(f))return T4.debug("Option 'forwardAuthToken' enabled on destination. Using the given token for the destination."),{...o,authTokens:ebe(f)}}return o}});var sx=i(function(A4){Object.defineProperty(A4,"__esModule",{value:!0});A4.getDestinationsFromEnv=I4;A4.getDestinationFromEnvByName=R4;A4.getDestinationsEnvVariable=ix;A4.searchEnvVariablesForDestination=abe;A4.validateNameAvailable=cbe;A4.setDestinationsInEnv=lbe;var k4=se(),nx=rc(),O4=Ns(),nbe=Ls(),ibe=nc(),js=k4.createLogger({package:"connectivity",messageContext:"env-destination-accessor"});function I4(){let o=ix();if(js.debug(`The value for the destination environment variable is: ${o}`),o){let f;try{f=JSON.parse(o)}catch(h){throw new k4.ErrorWithCause("Error in parsing the destinations from the environment variable.",h)}return sbe(f),f.map((h)=>nx.isDestinationConfiguration(h)?nx.parseDestination(h):nx.sanitizeDestination(h))}return[]}function R4(o){let f=I4().filter((h)=>h.name===o);if(!f.length)return null;if(f.length>1)js.warn(`The 'destinations' env variable contains multiple destinations with the name '${o}'. Only the first entry will be considered.`);return f[0]}function ix(){return process.env.destinations}function sbe(o){o.forEach((f)=>{if(typeof f.name>"u"&&typeof f.Name>"u")js.warn("Destination from 'destinations' env variable is missing 'name' or 'Name' property.")})}function abe(o){if(js.debug("Attempting to retrieve destination from environment variable."),ix())try{let f=R4(o.destinationName);if(f){if(js.info(`Successfully retrieved destination '${o.destinationName}' from environment variable.`),f=ibe.addForwardedAuthTokenIfNeeded(f,o.jwt),nbe.isHttpDestination(f)&&["internet","private-link"].includes(O4.proxyStrategy(f)))f=O4.addProxyConfigurationInternet(f);return f}}catch(f){js.error(`Error in reading the given destinations from the environment variable ${f.message}.`)}return js.debug("No environment variable set."),null}function cbe(o,f){if(f.has(o))throw Error(`Parsing destinations failed, destination with name "${o}" already exists in the "destinations" environment variables.`)}function lbe(o){process.env.destinations=JSON.stringify(o)}});var ax=i(function(P4){Object.defineProperty(P4,"__esModule",{value:!0});P4.serviceToDestinationTransformers=void 0;P4.transformServiceBindingToDestination=gbe;P4.transformServiceBindingToClientCredentialsDestination=ybe;var ni=Di(),ii=Yf();P4.serviceToDestinationTransformers={"business-logging":Cbe,"s4-hana-cloud":Sbe,destination:_be,"saas-registry":zbe,workflow:wbe,"service-manager":xbe,xsuaa:vbe,aicore:bbe,identity:Tbe};async function gbe(o,f){if(P4.serviceToDestinationTransformers[o.label])return P4.serviceToDestinationTransformers[o.label](o,f);throw Error(`The provided service binding of type ${o.label} is not supported out of the box for destination transformation.`)}async function ybe(o,f){let h=await ni.serviceToken(o,f);return ii.buildDestination(h,f?.url??o.url,o.name)}async function bbe(o,f){let h=await ni.serviceToken(o,f);return ii.buildDestination(h,o.credentials.serviceurls.AI_API_URL,o.name)}async function vbe(o,f){let h=await ni.serviceToken(o,f);return ii.buildDestination(h,o.credentials.apiurl,o.name)}async function xbe(o,f){let h=await ni.serviceToken(o,f);return ii.buildDestination(h,o.credentials.sm_url,o.name)}async function _be(o,f){let h=await ni.serviceToken(o,f);return ii.buildDestination(h,o.credentials.uri,o.name)}async function zbe(o,f){let h=await ni.serviceToken(o,f);return ii.buildDestination(h,o.credentials.saas_registry_url,o.name)}async function Cbe(o,f){let h={...o,credentials:{...o.credentials.uaa}},y=await ni.serviceToken(h,f);return ii.buildDestination(y,o.credentials.writeUrl,o.name)}async function wbe(o,f){let h={...o,credentials:{...o.credentials.uaa}},y=await ni.serviceToken(h,f);return ii.buildDestination(y,o.credentials.endpoints.workflow_odata_url,o.name)}async function Sbe(o){return{url:o.credentials.URL,authentication:"BasicAuthentication",username:o.credentials.User,password:o.credentials.Password}}async function Tbe(o,f){let h={authenticationType:"OAuth2ClientCredentials",...f?.iasOptions||{}},{token:y}=await ni.getIasToken(o,{jwt:f?.jwt,useCache:f?.useCache!==!1,...h});return ii.buildIasDestination(y,o,h)}});var lx=i(function(N4){Object.defineProperty(N4,"__esModule",{value:!0});N4.getDestinationFromServiceBinding=L4;N4.searchServiceBindingForDestination=Nbe;var Obe=se(),Ibe=Jr(),Rbe=gn(),D4=Ns(),Abe=Ls(),B4=ax(),Pbe=nc(),cx=Obe.createLogger({package:"connectivity",messageContext:"destination-accessor-vcap"});async function L4(o){let f=o.iss?{iss:o.iss}:o.jwt?Ibe.decodeJwt(o.jwt):void 0,h=o.iasOptions;if(h?.authenticationType==="OAuth2JWTBearer"&&o.jwt&&!h.assertion)h={...h,assertion:o.jwt};let y={...o,jwt:f,iasOptions:h},x=await Bbe(y);return x=Pbe.addForwardedAuthTokenIfNeeded(x,o.jwt),Abe.isHttpDestination(x)&&["internet","private-link"].includes(D4.proxyStrategy(x))?D4.addProxyConfigurationInternet(x):x}async function Bbe({useCache:o,jwt:f,destinationName:h,iasOptions:y,service:x,serviceBindingTransformFn:_}){let z=x||Rbe.getServiceBindingByInstanceName(h),C=await(_||Dbe)(z,{useCache:o,jwt:f,...y?{iasOptions:y}:{}});return{name:x&&z.name||h,...C}}async function Dbe(o,f){if(!B4.serviceToDestinationTransformers[o.label])throw Lbe(o);return B4.serviceToDestinationTransformers[o.label](o,f)}function Lbe(o){return Error(`The service "${o.name}" is of type "${o.label}" which is not supported! Consider providing your own transformation function when calling \`getDestinationFromServiceBinding()\`, like this:
109
+ destinationServiceForBinding(yourServiceName, { serviceBindingToDestination: yourTransformationFunction });`)}async function Nbe(o){cx.debug("Attempting to retrieve destination from service binding.");try{let f=await L4(o);return cx.info("Successfully retrieved destination from service binding."),f}catch(f){cx.debug(`Could not retrieve destination from service binding. If you are not using SAP Extension Factory, this information probably does not concern you. ${f.message}`)}return null}});var dx=i(function(U4){Object.defineProperty(U4,"__esModule",{value:!0});U4.addProxyConfigurationOnPrem=Ube;U4.httpProxyHostAndPort=q4;U4.socksProxyHostAndPort=F4;var j4=se(),qbe=gn(),M4=Di(),Fbe=j4.createLogger({package:"connectivity",messageContext:"connectivity-service"});async function Ube(o,f){if(o.type==="MAIL")return{...o,proxyConfiguration:await F4(f?.userJwt.decoded)};let h={...q4(),headers:{...await $be(o.authentication,f)}};return{...o,proxyConfiguration:h}}function q4(){let o=ux();return{host:o.credentials.onpremise_proxy_host,port:o.credentials.onpremise_proxy_http_port||o.credentials.onpremise_proxy_port,protocol:"http"}}async function F4(o){let f=ux(),h=await M4.serviceToken(f,{jwt:o});return{host:f.credentials.onpremise_proxy_host,port:parseInt(f.credentials.onpremise_socks5_proxy_port),protocol:"socks","proxy-authorization":h}}function ux(){let o=qbe.getServiceBindings("connectivity");if(!o.length)throw Error("No binding to a connectivity service found! Please make sure to bind an instance of the connectivity service to your app if you want to connect to on-premise destinations.");return o[0]}async function $be(o,f){let h=await Vbe(f?.serviceJwt.encoded),y=Hbe(o,f?.userJwt.encoded);return{...h,...y}}async function Vbe(o){try{let f=ux();return{"Proxy-Authorization":`Bearer ${await M4.serviceToken(f,{jwt:o})}`}}catch(f){throw new j4.ErrorWithCause("Failed to add proxy authorization header - client credentials grant failed!",f)}}function Hbe(o,f){if(o==="PrincipalPropagation"){if(f)return{"SAP-Connectivity-Authentication":`Bearer ${f}`};throw Error(`Unable to create "SAP-Connectivity-Authentication" header: no JWT found on the current request.
110
+ Connecting to on-premise systems via principle propagation is not possible.`)}if(o==="BasicAuthentication")Fbe.warn("You are connecting to an On-Premise system using basic authentication. For productive usage Principal propagation is recommended.");return{}}});var px=i(function(V4){Object.defineProperty(V4,"__esModule",{value:!0});V4.isIdenticalTenant=Jbe;var $4=Jr();function Jbe(o,f){return $4.getTenantId(o)===$4.getTenantId(f)}});var nh=i(function(G4){Object.defineProperty(G4,"__esModule",{value:!0});G4.AsyncCache=void 0;var Ybe=Ps();class H4{constructor(o=0){this.cache=new Ybe.Cache(o)}async hasKey(o){return this.cache.hasKey(o)}async get(o){return this.cache.get(o)}async set(o,f){return this.cache.set(o,f)}async clear(){return this.cache.clear()}}G4.AsyncCache=H4});var ic=i(function(Z4){Object.defineProperty(Z4,"__esModule",{value:!0});Z4.destinationCache=Z4.DestinationCache=Z4.DefaultDestinationCache=void 0;Z4.getDestinationCacheKey=gx;Z4.setDestinationCache=ove;Z4.getDefaultIsolationStrategy=nve;var J4=se(),ih=Jr(),Xbe=nh(),hx=J4.createLogger({package:"connectivity",messageContext:"destination-cache"});class mx extends Xbe.AsyncCache{constructor(o=0){super(o)}}Z4.DefaultDestinationCache=mx;var Qbe=(o=new mx(300000))=>({retrieveDestinationFromCache:async(f,h,y)=>o.get(gx(f,h,y)),cacheRetrievedDestination:async(f,h,y)=>{fx(f,h,y,o)},cacheRetrievedDestinations:async(f,h,y)=>{h.subaccount.forEach((x)=>fx(f,x,y,o)),h.instance.forEach((x)=>fx(f,x,y,o))},clear:async()=>{o.clear()},getCacheInstance:()=>o});Z4.DestinationCache=Qbe;function W4(o){return o?.serviceJwt?.decoded||o}function eve(o){return o?.userJwt?.decoded||o}function gx(o,f,h="tenant-user"){if(h==="tenant")return tve(f,ih.getTenantId(W4(o)));if(h==="tenant-user")return rve(f,ih.getTenantId(W4(o)),ih.userId(eve(o)));hx.warn(`Could not build destination cache key. Isolation strategy '${h}' is not supported.`)}function tve(o,f){if(f)return`${f}::${o}`;hx.warn("Could not build destination cache key. Isolation strategy 'tenant' is used, but tenant ID is undefined in JWT.")}function rve(o,f,h){if(f&&h)return`${h}:${f}:${o}`;hx.warn("Could not build destination cache key. Isolation strategy 'tenant-user' is used, but tenant id or user id is undefined in JWT.")}async function fx(o,f,h,y){if(!f.name)throw Error("The destination name is undefined.");let x=gx(o,f.name,h),_=J4.first(f.authTokens||[])?.expiresIn,z=_?Date.now()+parseInt(_)*1000:void 0;y.set(x,{entry:f,expires:z})}function ove(o){Z4.destinationCache=Z4.DestinationCache(o)}Z4.destinationCache=Z4.DestinationCache();function nve(o){return o&&ih.userId(o)?"tenant-user":"tenant"}});var vx=i(function(eM){Object.defineProperty(eM,"__esModule",{value:!0});eM.DestinationSelectionStrategies=void 0;eM.alwaysProvider=Y4;eM.alwaysSubscriber=X4;eM.subscriberFirst=Q4;var lve=se(),uve=lve.createLogger({package:"connectivity",messageContext:"destination-selection-strategies"});function Y4(o,f){return sh(o.provider,f)||null}function X4(o,f){return sh(o.subscriber,f)||null}function Q4(o,f){return sh(o.subscriber,f)||sh(o.provider,f)||null}eM.DestinationSelectionStrategies={alwaysProvider:Y4,alwaysSubscriber:X4,subscriberFirst:Q4};function sh(o,f){let h=(_)=>_.name===f,y=o.instance.find(h),x=o.subaccount.find(h);if(y&&x)uve.warn(`Found destinations named '${f}' for both, the destination service instance and subaccount. Using instance destination.`);return y||x}});var oM=i(function(rM){Object.defineProperty(rM,"__esModule",{value:!0})});var sM=i(function(IDe,iM){var hve=c("crypto");class nM{constructor(o){this.hash=this.getPreKeyedHash(o),this.password=o}update(o){this.hash.update(o)}digest(){return this.hash.digest()}getPreKeyedHash(o){let f=hve.createHash("sha1"),h=Buffer.alloc(o.length*2);for(let y=0,x=0;y<o.length;y++)h[x++]=o[y].charCodeAt()>>8,h[x++]=o[y].charCodeAt();return f.update(h),f.update(Buffer.from("Mighty Aphrodite")),f}}iM.exports=nM});var sc=i(function(RDe,aM){var mve=(o,f,h)=>Uint8Array.prototype.slice?Uint8Array.prototype.slice.call(o,f,h):o.slice(f,h);aM.exports=mve});var uM=i(function(ADe,lM){var xx=4294967296,cM=[];for(Ms=0;Ms<256;Ms++)cM[Ms]=(Ms>15?"":"0")+Ms.toString(16);var Ms,Ru=lM.exports=function(o,f){if(o instanceof Buffer)this.buffer=o,this.offset=f||0;else if(Object.prototype.toString.call(o)=="[object Uint8Array]")this.buffer=new Buffer(o),this.offset=f||0;else this.buffer=this.buffer||new Buffer(8),this.offset=0,this.setValue.apply(this,arguments)};Ru.MAX_INT=Math.pow(2,53);Ru.MIN_INT=-Math.pow(2,53);Ru.prototype={constructor:Ru,_2scomp:function(){var o=this.buffer,f=this.offset,h=1;for(var y=f+7;y>=f;y--){var x=(o[y]^255)+h;o[y]=x&255,h=x>>8}},setValue:function(o,f){var h=!1;if(arguments.length==1)if(typeof o=="number"){if(h=o<0,o=Math.abs(o),f=o%xx,o=o/xx,o>xx)throw RangeError(o+" is outside Int64 range");o=o|0}else if(typeof o=="string")o=(o+"").replace(/^0x/,""),f=o.substr(-8),o=o.length>8?o.substr(0,o.length-8):"",o=parseInt(o,16),f=parseInt(f,16);else throw Error(o+" must be a Number or String");var y=this.buffer,x=this.offset;for(var _=7;_>=0;_--)y[x+_]=f&255,f=_==4?o:f>>>8;if(h)this._2scomp()},toNumber:function(o){var f=this.buffer,h=this.offset,y=f[h]&128,x=0,_=1;for(var z=7,C=1;z>=0;z--,C*=256){var w=f[h+z];if(y)w=(w^255)+_,_=w>>8,w=w&255;x+=w*C}if(!o&&x>=Ru.MAX_INT)return y?-1/0:1/0;return y?-x:x},valueOf:function(){return this.toNumber(!1)},toString:function(o){return this.valueOf().toString(o||10)},toOctetString:function(o){var f=[,,,,,,,,],h=this.buffer,y=this.offset;for(var x=0;x<8;x++)f[x]=cM[h[y+x]];return f.join(o||"")},toBuffer:function(o){if(o&&this.offset===0)return this.buffer;var f=new Buffer(8);return this.buffer.copy(f,0,this.offset,this.offset+8),f},copy:function(o,f){this.buffer.copy(o,f||0,this.offset,this.offset+8)},compare:function(o){if((this.buffer[this.offset]&128)!=(o.buffer[o.offset]&128))return o.buffer[o.offset]-this.buffer[this.offset];for(var f=0;f<8;f++)if(this.buffer[this.offset+f]!==o.buffer[o.offset+f])return this.buffer[this.offset+f]-o.buffer[o.offset+f];return 0},equals:function(o){return this.compare(o)===0},inspect:function(){return"[Int64 value:"+this+" octets:"+this.toOctetString(" ")+"]"}}});var qs=i(function(PDe,pM){var gve=uM(),yve=sc();class dM{constructor(o){this.buffer=Buffer.from(o),this.offset=0}readInt(){return this.buffer.readUInt32BE(this.shift(4))}readUTF(){let o=this.buffer.readUInt16BE(this.shift(2));return this.read(o).toString()}read(o){return yve(this.buffer,this.offset,this.shift(o)+o)}readLong(){let o=this.read(8);if(typeof o.readBigUInt64BE==="function")return o.readBigUInt64BE();else return+new gve(o).toString()}readByte(){return this.buffer.readUInt8(this.shift(1))}readShort(){return this.read(2).readUInt16BE()}shift(o){let f=this.offset;return this.offset+=o,f}available(){return this.buffer.length-this.offset}}pM.exports=dM});var mM=i(function(BDe,hM){var bve=sc(),vve=qs();class fM extends vve{constructor(o,f){super(o);this.digest=f}readInt(){return this.updateDigest(4),super.readInt()}readUTF(){return this.updateDigest(2),super.readUTF()}read(o){return this.updateDigest(o),super.read(o)}readLong(){return super.readLong()}readByte(){return this.updateDigest(1),super.readByte()}updateDigest(o){this.digest.update(bve(this.buffer,this.offset,this.offset+o))}}hM.exports=fM});var bM=i(function(DDe,yM){class gM{constructor({certType:o,value:f}){this.certType=o,this.value=f}}yM.exports=gM});var _x=i(function(LDe,xM){class vM{constructor({alias:o,date:f,chain:h,protectedPrivateKey:y}){this.certType="X.509",this.alias=o,this.date=f,this.chain=h,this.protectedPrivateKey=y}}xM.exports=vM});var zx=i(function(NDe,zM){class _M{constructor({alias:o,date:f,cert:h}){this.certType="X.509",this.alias=o,this.date=f,this.cert=h}}zM.exports=_M});var wM=i(function(jDe,CM){var xve=sM(),_ve=mM(),zve=qs(),Cve=bM(),wve=_x(),Sve=zx(),Tve=sc();class Oo{constructor(o,f){if(this.keystore=o,this.password=f,f)this.messageDigest=new xve(f),this.dataInputStream=new _ve(o,this.messageDigest);else this.dataInputStream=new zve(o)}assertMagic(o){if(o!==Oo.MAGIC)throw Error("Invalid keystore format")}assertVersion(o){if(o!==Oo.VERSION_1&&o!==Oo.VERSION_2)throw Error("Invalid keystore format")}parse(){let o=this.dataInputStream.readInt(),f=this.dataInputStream.readInt();this.assertMagic(o),this.assertVersion(f);let h=this.dataInputStream.readInt(),y=[];for(let x=0;x<h;x++){let _=this.dataInputStream.readInt(),z=this.dataInputStream.readUTF(),C=new Date(+this.dataInputStream.readLong().toString());if(_===Oo.PRIVATE_KEY_TAG){let w=this.getPrivateKeyEntry(),S=this.readCertificateChain(f),E=new wve({alias:z,date:C,chain:S,protectedPrivateKey:w});y.push(E)}else if(_===Oo.TRUSTED_CERT_TAG){let w=this.readCert(f),S=new Sve({alias:z,date:C,cert:w});y.push(S)}else throw Error("Unrecognized keystore entry")}return this.validateChecksum(),y}validateChecksum(){if(!this.password)return;let o=this.messageDigest.digest(),f=Tve(this.dataInputStream.buffer,this.dataInputStream.offset,this.dataInputStream.offset+o.length);if(!o.every((y,x)=>f[x]===y))throw Error("Password verification failed")}getPrivateKeyEntry(){return this.dataInputStream.read(this.dataInputStream.readInt())}readCert(o){let f="X.509";if(o===Oo.VERSION_2)f=this.dataInputStream.readUTF();let h=this.dataInputStream.read(this.dataInputStream.readInt());return new Cve({certType:f,value:h})}readCertificateChain(o){let f=this.dataInputStream.readInt(),h=[];for(let y=0;y<f;y++)h.push(this.readCert(o));return h}}Oo.MAGIC=4277010157;Oo.VERSION_1=1;Oo.VERSION_2=2;Oo.PRIVATE_KEY_TAG=1;Oo.TRUSTED_CERT_TAG=2;CM.exports=Oo});var Xe=i(function(MDe,SM){SM.exports={options:{usePureJavaScript:!1}}});var kM=i(function(qDe,EM){var Cx={};EM.exports=Cx;var TM={};Cx.encode=function(o,f,h){if(typeof f!=="string")throw TypeError('"alphabet" must be a string.');if(h!==void 0&&typeof h!=="number")throw TypeError('"maxline" must be a number.');var y="";if(!(o instanceof Uint8Array))y=Eve(o,f);else{var x=0,_=f.length,z=f.charAt(0),C=[0];for(x=0;x<o.length;++x){for(var w=0,S=o[x];w<C.length;++w)S+=C[w]<<8,C[w]=S%_,S=S/_|0;while(S>0)C.push(S%_),S=S/_|0}for(x=0;o[x]===0&&x<o.length-1;++x)y+=z;for(x=C.length-1;x>=0;--x)y+=f[C[x]]}if(h){var E=new RegExp(".{1,"+h+"}","g");y=y.match(E).join(`\r
111
+ `)}return y};Cx.decode=function(o,f){if(typeof o!=="string")throw TypeError('"input" must be a string.');if(typeof f!=="string")throw TypeError('"alphabet" must be a string.');var h=TM[f];if(!h){h=TM[f]=[];for(var y=0;y<f.length;++y)h[f.charCodeAt(y)]=y}o=o.replace(/\s/g,"");var x=f.length,_=f.charAt(0),z=[0];for(var y=0;y<o.length;y++){var C=h[o.charCodeAt(y)];if(C===void 0)return;for(var w=0,S=C;w<z.length;++w)S+=z[w]*x,z[w]=S&255,S>>=8;while(S>0)z.push(S&255),S>>=8}for(var E=0;o[E]===_&&E<o.length-1;++E)z.push(0);if(typeof Buffer<"u")return Buffer.from(z.reverse());return new Uint8Array(z.reverse())};function Eve(o,f){var h=0,y=f.length,x=f.charAt(0),_=[0];for(h=0;h<o.length();++h){for(var z=0,C=o.at(h);z<_.length;++z)C+=_[z]<<8,_[z]=C%y,C=C/y|0;while(C>0)_.push(C%y),C=C/y|0}var w="";for(h=0;o.at(h)===0&&h<o.length()-1;++h)w+=x;for(h=_.length-1;h>=0;--h)w+=f[_[h]];return w}});var zt=i(function(FDe,AM){var OM=Xe(),IM=kM(),W=AM.exports=OM.util=OM.util||{};(function(){if(typeof process<"u"&&process.nextTick){if(W.nextTick=process.nextTick,typeof setImmediate==="function")W.setImmediate=setImmediate;else W.setImmediate=W.nextTick;return}if(typeof setImmediate==="function"){W.setImmediate=function(){return setImmediate.apply(void 0,arguments)},W.nextTick=function(C){return setImmediate(C)};return}if(W.setImmediate=function(C){setTimeout(C,0)},typeof window<"u"&&typeof window.postMessage==="function"){let C=function(w){if(w.source===window&&w.data===o){w.stopPropagation();var S=f.slice();f.length=0,S.forEach(function(E){E()})}};var z=C,o="forge.setImmediate",f=[];W.setImmediate=function(w){if(f.push(w),f.length===1)window.postMessage(o,"*")},window.addEventListener("message",C,!0)}if(typeof MutationObserver<"u"){var h=Date.now(),y=!0,x=document.createElement("div"),f=[];new MutationObserver(function(){var w=f.slice();f.length=0,w.forEach(function(S){S()})}).observe(x,{attributes:!0});var _=W.setImmediate;W.setImmediate=function(w){if(Date.now()-h>15)h=Date.now(),_(w);else if(f.push(w),f.length===1)x.setAttribute("a",y=!y)}}W.nextTick=W.setImmediate})();W.isNodejs=typeof process<"u"&&process.versions&&process.versions.node;W.globalScope=function(){if(W.isNodejs)return global;return typeof self>"u"?window:self}();W.isArray=Array.isArray||function(o){return Object.prototype.toString.call(o)==="[object Array]"};W.isArrayBuffer=function(o){return typeof ArrayBuffer<"u"&&o instanceof ArrayBuffer};W.isArrayBufferView=function(o){return o&&W.isArrayBuffer(o.buffer)&&o.byteLength!==void 0};function Au(o){if(!(o===8||o===16||o===24||o===32))throw Error("Only 8, 16, 24, or 32 bits supported: "+o)}W.ByteBuffer=wx;function wx(o){if(this.data="",this.read=0,typeof o==="string")this.data=o;else if(W.isArrayBuffer(o)||W.isArrayBufferView(o))if(typeof Buffer<"u"&&o instanceof Buffer)this.data=o.toString("binary");else{var f=new Uint8Array(o);try{this.data=String.fromCharCode.apply(null,f)}catch(y){for(var h=0;h<f.length;++h)this.putByte(f[h])}}else if(o instanceof wx||typeof o==="object"&&typeof o.data==="string"&&typeof o.read==="number")this.data=o.data,this.read=o.read;this._constructedStringLength=0}W.ByteStringBuffer=wx;var kve=4096;W.ByteStringBuffer.prototype._optimizeConstructedString=function(o){if(this._constructedStringLength+=o,this._constructedStringLength>kve)this.data.substr(0,1),this._constructedStringLength=0};W.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};W.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};W.ByteStringBuffer.prototype.putByte=function(o){return this.putBytes(String.fromCharCode(o))};W.ByteStringBuffer.prototype.fillWithByte=function(o,f){o=String.fromCharCode(o);var h=this.data;while(f>0){if(f&1)h+=o;if(f>>>=1,f>0)o+=o}return this.data=h,this._optimizeConstructedString(f),this};W.ByteStringBuffer.prototype.putBytes=function(o){return this.data+=o,this._optimizeConstructedString(o.length),this};W.ByteStringBuffer.prototype.putString=function(o){return this.putBytes(W.encodeUtf8(o))};W.ByteStringBuffer.prototype.putInt16=function(o){return this.putBytes(String.fromCharCode(o>>8&255)+String.fromCharCode(o&255))};W.ByteStringBuffer.prototype.putInt24=function(o){return this.putBytes(String.fromCharCode(o>>16&255)+String.fromCharCode(o>>8&255)+String.fromCharCode(o&255))};W.ByteStringBuffer.prototype.putInt32=function(o){return this.putBytes(String.fromCharCode(o>>24&255)+String.fromCharCode(o>>16&255)+String.fromCharCode(o>>8&255)+String.fromCharCode(o&255))};W.ByteStringBuffer.prototype.putInt16Le=function(o){return this.putBytes(String.fromCharCode(o&255)+String.fromCharCode(o>>8&255))};W.ByteStringBuffer.prototype.putInt24Le=function(o){return this.putBytes(String.fromCharCode(o&255)+String.fromCharCode(o>>8&255)+String.fromCharCode(o>>16&255))};W.ByteStringBuffer.prototype.putInt32Le=function(o){return this.putBytes(String.fromCharCode(o&255)+String.fromCharCode(o>>8&255)+String.fromCharCode(o>>16&255)+String.fromCharCode(o>>24&255))};W.ByteStringBuffer.prototype.putInt=function(o,f){Au(f);var h="";do f-=8,h+=String.fromCharCode(o>>f&255);while(f>0);return this.putBytes(h)};W.ByteStringBuffer.prototype.putSignedInt=function(o,f){if(o<0)o+=2<<f-1;return this.putInt(o,f)};W.ByteStringBuffer.prototype.putBuffer=function(o){return this.putBytes(o.getBytes())};W.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};W.ByteStringBuffer.prototype.getInt16=function(){var o=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,o};W.ByteStringBuffer.prototype.getInt24=function(){var o=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,o};W.ByteStringBuffer.prototype.getInt32=function(){var o=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,o};W.ByteStringBuffer.prototype.getInt16Le=function(){var o=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,o};W.ByteStringBuffer.prototype.getInt24Le=function(){var o=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,o};W.ByteStringBuffer.prototype.getInt32Le=function(){var o=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,o};W.ByteStringBuffer.prototype.getInt=function(o){Au(o);var f=0;do f=(f<<8)+this.data.charCodeAt(this.read++),o-=8;while(o>0);return f};W.ByteStringBuffer.prototype.getSignedInt=function(o){var f=this.getInt(o),h=2<<o-2;if(f>=h)f-=h<<1;return f};W.ByteStringBuffer.prototype.getBytes=function(o){var f;if(o)o=Math.min(this.length(),o),f=this.data.slice(this.read,this.read+o),this.read+=o;else if(o===0)f="";else f=this.read===0?this.data:this.data.slice(this.read),this.clear();return f};W.ByteStringBuffer.prototype.bytes=function(o){return typeof o>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+o)};W.ByteStringBuffer.prototype.at=function(o){return this.data.charCodeAt(this.read+o)};W.ByteStringBuffer.prototype.setAt=function(o,f){return this.data=this.data.substr(0,this.read+o)+String.fromCharCode(f)+this.data.substr(this.read+o+1),this};W.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};W.ByteStringBuffer.prototype.copy=function(){var o=W.createBuffer(this.data);return o.read=this.read,o};W.ByteStringBuffer.prototype.compact=function(){if(this.read>0)this.data=this.data.slice(this.read),this.read=0;return this};W.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};W.ByteStringBuffer.prototype.truncate=function(o){var f=Math.max(0,this.length()-o);return this.data=this.data.substr(this.read,f),this.read=0,this};W.ByteStringBuffer.prototype.toHex=function(){var o="";for(var f=this.read;f<this.data.length;++f){var h=this.data.charCodeAt(f);if(h<16)o+="0";o+=h.toString(16)}return o};W.ByteStringBuffer.prototype.toString=function(){return W.decodeUtf8(this.bytes())};function Ove(o,f){f=f||{},this.read=f.readOffset||0,this.growSize=f.growSize||1024;var h=W.isArrayBuffer(o),y=W.isArrayBufferView(o);if(h||y){if(h)this.data=new DataView(o);else this.data=new DataView(o.buffer,o.byteOffset,o.byteLength);this.write="writeOffset"in f?f.writeOffset:this.data.byteLength;return}if(this.data=new DataView(new ArrayBuffer(0)),this.write=0,o!==null&&o!==void 0)this.putBytes(o);if("writeOffset"in f)this.write=f.writeOffset}W.DataBuffer=Ove;W.DataBuffer.prototype.length=function(){return this.write-this.read};W.DataBuffer.prototype.isEmpty=function(){return this.length()<=0};W.DataBuffer.prototype.accommodate=function(o,f){if(this.length()>=o)return this;f=Math.max(f||this.growSize,o);var h=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),y=new Uint8Array(this.length()+f);return y.set(h),this.data=new DataView(y.buffer),this};W.DataBuffer.prototype.putByte=function(o){return this.accommodate(1),this.data.setUint8(this.write++,o),this};W.DataBuffer.prototype.fillWithByte=function(o,f){this.accommodate(f);for(var h=0;h<f;++h)this.data.setUint8(o);return this};W.DataBuffer.prototype.putBytes=function(o,f){if(W.isArrayBufferView(o)){var h=new Uint8Array(o.buffer,o.byteOffset,o.byteLength),y=h.byteLength-h.byteOffset;this.accommodate(y);var x=new Uint8Array(this.data.buffer,this.write);return x.set(h),this.write+=y,this}if(W.isArrayBuffer(o)){var h=new Uint8Array(o);this.accommodate(h.byteLength);var x=new Uint8Array(this.data.buffer);return x.set(h,this.write),this.write+=h.byteLength,this}if(o instanceof W.DataBuffer||typeof o==="object"&&typeof o.read==="number"&&typeof o.write==="number"&&W.isArrayBufferView(o.data)){var h=new Uint8Array(o.data.byteLength,o.read,o.length());this.accommodate(h.byteLength);var x=new Uint8Array(o.data.byteLength,this.write);return x.set(h),this.write+=h.byteLength,this}if(o instanceof W.ByteStringBuffer)o=o.data,f="binary";if(f=f||"binary",typeof o==="string"){var _;if(f==="hex")return this.accommodate(Math.ceil(o.length/2)),_=new Uint8Array(this.data.buffer,this.write),this.write+=W.binary.hex.decode(o,_,this.write),this;if(f==="base64")return this.accommodate(Math.ceil(o.length/4)*3),_=new Uint8Array(this.data.buffer,this.write),this.write+=W.binary.base64.decode(o,_,this.write),this;if(f==="utf8")o=W.encodeUtf8(o),f="binary";if(f==="binary"||f==="raw")return this.accommodate(o.length),_=new Uint8Array(this.data.buffer,this.write),this.write+=W.binary.raw.decode(_),this;if(f==="utf16")return this.accommodate(o.length*2),_=new Uint16Array(this.data.buffer,this.write),this.write+=W.text.utf16.encode(_),this;throw Error("Invalid encoding: "+f)}throw Error("Invalid parameter: "+o)};W.DataBuffer.prototype.putBuffer=function(o){return this.putBytes(o),o.clear(),this};W.DataBuffer.prototype.putString=function(o){return this.putBytes(o,"utf16")};W.DataBuffer.prototype.putInt16=function(o){return this.accommodate(2),this.data.setInt16(this.write,o),this.write+=2,this};W.DataBuffer.prototype.putInt24=function(o){return this.accommodate(3),this.data.setInt16(this.write,o>>8&65535),this.data.setInt8(this.write,o>>16&255),this.write+=3,this};W.DataBuffer.prototype.putInt32=function(o){return this.accommodate(4),this.data.setInt32(this.write,o),this.write+=4,this};W.DataBuffer.prototype.putInt16Le=function(o){return this.accommodate(2),this.data.setInt16(this.write,o,!0),this.write+=2,this};W.DataBuffer.prototype.putInt24Le=function(o){return this.accommodate(3),this.data.setInt8(this.write,o>>16&255),this.data.setInt16(this.write,o>>8&65535,!0),this.write+=3,this};W.DataBuffer.prototype.putInt32Le=function(o){return this.accommodate(4),this.data.setInt32(this.write,o,!0),this.write+=4,this};W.DataBuffer.prototype.putInt=function(o,f){Au(f),this.accommodate(f/8);do f-=8,this.data.setInt8(this.write++,o>>f&255);while(f>0);return this};W.DataBuffer.prototype.putSignedInt=function(o,f){if(Au(f),this.accommodate(f/8),o<0)o+=2<<f-1;return this.putInt(o,f)};W.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};W.DataBuffer.prototype.getInt16=function(){var o=this.data.getInt16(this.read);return this.read+=2,o};W.DataBuffer.prototype.getInt24=function(){var o=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,o};W.DataBuffer.prototype.getInt32=function(){var o=this.data.getInt32(this.read);return this.read+=4,o};W.DataBuffer.prototype.getInt16Le=function(){var o=this.data.getInt16(this.read,!0);return this.read+=2,o};W.DataBuffer.prototype.getInt24Le=function(){var o=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,o};W.DataBuffer.prototype.getInt32Le=function(){var o=this.data.getInt32(this.read,!0);return this.read+=4,o};W.DataBuffer.prototype.getInt=function(o){Au(o);var f=0;do f=(f<<8)+this.data.getInt8(this.read++),o-=8;while(o>0);return f};W.DataBuffer.prototype.getSignedInt=function(o){var f=this.getInt(o),h=2<<o-2;if(f>=h)f-=h<<1;return f};W.DataBuffer.prototype.getBytes=function(o){var f;if(o)o=Math.min(this.length(),o),f=this.data.slice(this.read,this.read+o),this.read+=o;else if(o===0)f="";else f=this.read===0?this.data:this.data.slice(this.read),this.clear();return f};W.DataBuffer.prototype.bytes=function(o){return typeof o>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+o)};W.DataBuffer.prototype.at=function(o){return this.data.getUint8(this.read+o)};W.DataBuffer.prototype.setAt=function(o,f){return this.data.setUint8(o,f),this};W.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};W.DataBuffer.prototype.copy=function(){return new W.DataBuffer(this)};W.DataBuffer.prototype.compact=function(){if(this.read>0){var o=new Uint8Array(this.data.buffer,this.read),f=new Uint8Array(o.byteLength);f.set(o),this.data=new DataView(f),this.write-=this.read,this.read=0}return this};W.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this};W.DataBuffer.prototype.truncate=function(o){return this.write=Math.max(0,this.length()-o),this.read=Math.min(this.read,this.write),this};W.DataBuffer.prototype.toHex=function(){var o="";for(var f=this.read;f<this.data.byteLength;++f){var h=this.data.getUint8(f);if(h<16)o+="0";o+=h.toString(16)}return o};W.DataBuffer.prototype.toString=function(o){var f=new Uint8Array(this.data,this.read,this.length());if(o=o||"utf8",o==="binary"||o==="raw")return W.binary.raw.encode(f);if(o==="hex")return W.binary.hex.encode(f);if(o==="base64")return W.binary.base64.encode(f);if(o==="utf8")return W.text.utf8.decode(f);if(o==="utf16")return W.text.utf16.decode(f);throw Error("Invalid encoding: "+o)};W.createBuffer=function(o,f){if(f=f||"raw",o!==void 0&&f==="utf8")o=W.encodeUtf8(o);return new W.ByteBuffer(o)};W.fillString=function(o,f){var h="";while(f>0){if(f&1)h+=o;if(f>>>=1,f>0)o+=o}return h};W.xorBytes=function(o,f,h){var y="",x="",_="",z=0,C=0;for(;h>0;--h,++z){if(x=o.charCodeAt(z)^f.charCodeAt(z),C>=10)y+=_,_="",C=0;_+=String.fromCharCode(x),++C}return y+=_,y};W.hexToBytes=function(o){var f="",h=0;if(o.length&!0)h=1,f+=String.fromCharCode(parseInt(o[0],16));for(;h<o.length;h+=2)f+=String.fromCharCode(parseInt(o.substr(h,2),16));return f};W.bytesToHex=function(o){return W.createBuffer(o).toHex()};W.int32ToBytes=function(o){return String.fromCharCode(o>>24&255)+String.fromCharCode(o>>16&255)+String.fromCharCode(o>>8&255)+String.fromCharCode(o&255)};var Li="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Ni=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],RM="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";W.encode64=function(o,f){var h="",y="",x,_,z,C=0;while(C<o.length){if(x=o.charCodeAt(C++),_=o.charCodeAt(C++),z=o.charCodeAt(C++),h+=Li.charAt(x>>2),h+=Li.charAt((x&3)<<4|_>>4),isNaN(_))h+="==";else h+=Li.charAt((_&15)<<2|z>>6),h+=isNaN(z)?"=":Li.charAt(z&63);if(f&&h.length>f)y+=h.substr(0,f)+`\r
112
+ `,h=h.substr(f)}return y+=h,y};W.decode64=function(o){o=o.replace(/[^A-Za-z0-9\+\/\=]/g,"");var f="",h,y,x,_,z=0;while(z<o.length)if(h=Ni[o.charCodeAt(z++)-43],y=Ni[o.charCodeAt(z++)-43],x=Ni[o.charCodeAt(z++)-43],_=Ni[o.charCodeAt(z++)-43],f+=String.fromCharCode(h<<2|y>>4),x!==64){if(f+=String.fromCharCode((y&15)<<4|x>>2),_!==64)f+=String.fromCharCode((x&3)<<6|_)}return f};W.encodeUtf8=function(o){return unescape(encodeURIComponent(o))};W.decodeUtf8=function(o){return decodeURIComponent(escape(o))};W.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:IM.encode,decode:IM.decode}};W.binary.raw.encode=function(o){return String.fromCharCode.apply(null,o)};W.binary.raw.decode=function(o,f,h){var y=f;if(!y)y=new Uint8Array(o.length);h=h||0;var x=h;for(var _=0;_<o.length;++_)y[x++]=o.charCodeAt(_);return f?x-h:y};W.binary.hex.encode=W.bytesToHex;W.binary.hex.decode=function(o,f,h){var y=f;if(!y)y=new Uint8Array(Math.ceil(o.length/2));h=h||0;var x=0,_=h;if(o.length&1)x=1,y[_++]=parseInt(o[0],16);for(;x<o.length;x+=2)y[_++]=parseInt(o.substr(x,2),16);return f?_-h:y};W.binary.base64.encode=function(o,f){var h="",y="",x,_,z,C=0;while(C<o.byteLength){if(x=o[C++],_=o[C++],z=o[C++],h+=Li.charAt(x>>2),h+=Li.charAt((x&3)<<4|_>>4),isNaN(_))h+="==";else h+=Li.charAt((_&15)<<2|z>>6),h+=isNaN(z)?"=":Li.charAt(z&63);if(f&&h.length>f)y+=h.substr(0,f)+`\r
113
+ `,h=h.substr(f)}return y+=h,y};W.binary.base64.decode=function(o,f,h){var y=f;if(!y)y=new Uint8Array(Math.ceil(o.length/4)*3);o=o.replace(/[^A-Za-z0-9\+\/\=]/g,""),h=h||0;var x,_,z,C,w=0,S=h;while(w<o.length)if(x=Ni[o.charCodeAt(w++)-43],_=Ni[o.charCodeAt(w++)-43],z=Ni[o.charCodeAt(w++)-43],C=Ni[o.charCodeAt(w++)-43],y[S++]=x<<2|_>>4,z!==64){if(y[S++]=(_&15)<<4|z>>2,C!==64)y[S++]=(z&3)<<6|C}return f?S-h:y.subarray(0,S)};W.binary.base58.encode=function(o,f){return W.binary.baseN.encode(o,RM,f)};W.binary.base58.decode=function(o,f){return W.binary.baseN.decode(o,RM,f)};W.text={utf8:{},utf16:{}};W.text.utf8.encode=function(o,f,h){o=W.encodeUtf8(o);var y=f;if(!y)y=new Uint8Array(o.length);h=h||0;var x=h;for(var _=0;_<o.length;++_)y[x++]=o.charCodeAt(_);return f?x-h:y};W.text.utf8.decode=function(o){return W.decodeUtf8(String.fromCharCode.apply(null,o))};W.text.utf16.encode=function(o,f,h){var y=f;if(!y)y=new Uint8Array(o.length*2);var x=new Uint16Array(y.buffer);h=h||0;var _=h,z=h;for(var C=0;C<o.length;++C)x[z++]=o.charCodeAt(C),_+=2;return f?_-h:y};W.text.utf16.decode=function(o){return String.fromCharCode.apply(null,new Uint16Array(o.buffer))};W.deflate=function(o,f,h){if(f=W.decode64(o.deflate(W.encode64(f)).rval),h){var y=2,x=f.charCodeAt(1);if(x&32)y=6;f=f.substring(y,f.length-4)}return f};W.inflate=function(o,f,h){var y=o.inflate(W.encode64(f)).rval;return y===null?null:W.decode64(y)};var Sx=function(o,f,h){if(!o)throw Error("WebStorage not available.");var y;if(h===null)y=o.removeItem(f);else h=W.encode64(JSON.stringify(h)),y=o.setItem(f,h);if(typeof y<"u"&&y.rval!==!0){var x=Error(y.error.message);throw x.id=y.error.id,x.name=y.error.name,x}},Tx=function(o,f){if(!o)throw Error("WebStorage not available.");var h=o.getItem(f);if(o.init)if(h.rval===null){if(h.error){var y=Error(h.error.message);throw y.id=h.error.id,y.name=h.error.name,y}h=null}else h=h.rval;if(h!==null)h=JSON.parse(W.decode64(h));return h},Ive=function(o,f,h,y){var x=Tx(o,f);if(x===null)x={};x[h]=y,Sx(o,f,x)},Rve=function(o,f,h){var y=Tx(o,f);if(y!==null)y=h in y?y[h]:null;return y},Ave=function(o,f,h){var y=Tx(o,f);if(y!==null&&h in y){delete y[h];var x=!0;for(var _ in y){x=!1;break}if(x)y=null;Sx(o,f,y)}},Pve=function(o,f){Sx(o,f,null)},ah=function(o,f,h){var y=null;if(typeof h>"u")h=["web","flash"];var x,_=!1,z=null;for(var C in h){x=h[C];try{if(x==="flash"||x==="both"){if(f[0]===null)throw Error("Flash local storage not available.");y=o.apply(this,f),_=x==="flash"}if(x==="web"||x==="both")f[0]=localStorage,y=o.apply(this,f),_=!0}catch(w){z=w}if(_)break}if(!_)throw z;return y};W.setItem=function(o,f,h,y,x){ah(Ive,arguments,x)};W.getItem=function(o,f,h,y){return ah(Rve,arguments,y)};W.removeItem=function(o,f,h,y){ah(Ave,arguments,y)};W.clearItems=function(o,f,h){ah(Pve,arguments,h)};W.isEmpty=function(o){for(var f in o)if(o.hasOwnProperty(f))return!1;return!0};W.format=function(o){var f=/%./g,h,y,x=0,_=[],z=0;while(h=f.exec(o)){if(y=o.substring(z,f.lastIndex-2),y.length>0)_.push(y);z=f.lastIndex;var C=h[0][1];switch(C){case"s":case"o":if(x<arguments.length)_.push(arguments[x+++1]);else _.push("<?>");break;case"%":_.push("%");break;default:_.push("<%"+C+"?>")}}return _.push(o.substring(z)),_.join("")};W.formatNumber=function(o,f,h,y){var x=o,_=isNaN(f=Math.abs(f))?2:f,z=h===void 0?",":h,C=y===void 0?".":y,w=x<0?"-":"",S=parseInt(x=Math.abs(+x||0).toFixed(_),10)+"",E=S.length>3?S.length%3:0;return w+(E?S.substr(0,E)+C:"")+S.substr(E).replace(/(\d{3})(?=\d)/g,"$1"+C)+(_?z+Math.abs(x-S).toFixed(_).slice(2):"")};W.formatSize=function(o){if(o>=1073741824)o=W.formatNumber(o/1073741824,2,".","")+" GiB";else if(o>=1048576)o=W.formatNumber(o/1048576,2,".","")+" MiB";else if(o>=1024)o=W.formatNumber(o/1024,0)+" KiB";else o=W.formatNumber(o,0)+" bytes";return o};W.bytesFromIP=function(o){if(o.indexOf(".")!==-1)return W.bytesFromIPv4(o);if(o.indexOf(":")!==-1)return W.bytesFromIPv6(o);return null};W.bytesFromIPv4=function(o){if(o=o.split("."),o.length!==4)return null;var f=W.createBuffer();for(var h=0;h<o.length;++h){var y=parseInt(o[h],10);if(isNaN(y))return null;f.putByte(y)}return f.getBytes()};W.bytesFromIPv6=function(o){var f=0;o=o.split(":").filter(function(z){if(z.length===0)++f;return!0});var h=(8-o.length+f)*2,y=W.createBuffer();for(var x=0;x<8;++x){if(!o[x]||o[x].length===0){y.fillWithByte(0,h),h=0;continue}var _=W.hexToBytes(o[x]);if(_.length<2)y.putByte(0);y.putBytes(_)}return y.getBytes()};W.bytesToIP=function(o){if(o.length===4)return W.bytesToIPv4(o);if(o.length===16)return W.bytesToIPv6(o);return null};W.bytesToIPv4=function(o){if(o.length!==4)return null;var f=[];for(var h=0;h<o.length;++h)f.push(o.charCodeAt(h));return f.join(".")};W.bytesToIPv6=function(o){if(o.length!==16)return null;var f=[],h=[],y=0;for(var x=0;x<o.length;x+=2){var _=W.bytesToHex(o[x]+o[x+1]);while(_[0]==="0"&&_!=="0")_=_.substr(1);if(_==="0"){var z=h[h.length-1],C=f.length;if(!z||C!==z.end+1)h.push({start:C,end:C});else if(z.end=C,z.end-z.start>h[y].end-h[y].start)y=h.length-1}f.push(_)}if(h.length>0){var w=h[y];if(w.end-w.start>0){if(f.splice(w.start,w.end-w.start+1,""),w.start===0)f.unshift("");if(w.end===7)f.push("")}}return f.join(":")};W.estimateCores=function(o,f){if(typeof o==="function")f=o,o={};if(o=o||{},"cores"in W&&!o.update)return f(null,W.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return W.cores=navigator.hardwareConcurrency,f(null,W.cores);if(typeof Worker>"u")return W.cores=1,f(null,W.cores);if(typeof Blob>"u")return W.cores=2,f(null,W.cores);var h=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(z){var C=Date.now(),w=C+4;while(Date.now()<w);self.postMessage({st:C,et:w})})}.toString(),")()"],{type:"application/javascript"}));y([],5,16);function y(z,C,w){if(C===0){var S=Math.floor(z.reduce(function(E,k){return E+k},0)/z.length);return W.cores=Math.max(1,S),URL.revokeObjectURL(h),f(null,W.cores)}x(w,function(E,k){z.push(_(w,k)),y(z,C-1,w)})}function x(z,C){var w=[],S=[];for(var E=0;E<z;++E){var k=new Worker(h);k.addEventListener("message",function(O){if(S.push(O.data),S.length===z){for(var R=0;R<z;++R)w[R].terminate();C(null,S)}}),w.push(k)}for(var E=0;E<z;++E)w[E].postMessage(E)}function _(z,C){var w=[];for(var S=0;S<z;++S){var E=C[S],k=w[S]=[];for(var O=0;O<z;++O){if(S===O)continue;var R=C[O];if(E.st>R.st&&E.st<R.et||R.st>E.st&&R.st<E.et)k.push(O)}}return w.reduce(function(I,A){return Math.max(I,A.length)},0)}}});var ch=i(function(UDe,PM){var Sr=Xe();zt();PM.exports=Sr.cipher=Sr.cipher||{};Sr.cipher.algorithms=Sr.cipher.algorithms||{};Sr.cipher.createCipher=function(o,f){var h=o;if(typeof h==="string"){if(h=Sr.cipher.getAlgorithm(h),h)h=h()}if(!h)throw Error("Unsupported algorithm: "+o);return new Sr.cipher.BlockCipher({algorithm:h,key:f,decrypt:!1})};Sr.cipher.createDecipher=function(o,f){var h=o;if(typeof h==="string"){if(h=Sr.cipher.getAlgorithm(h),h)h=h()}if(!h)throw Error("Unsupported algorithm: "+o);return new Sr.cipher.BlockCipher({algorithm:h,key:f,decrypt:!0})};Sr.cipher.registerAlgorithm=function(o,f){o=o.toUpperCase(),Sr.cipher.algorithms[o]=f};Sr.cipher.getAlgorithm=function(o){if(o=o.toUpperCase(),o in Sr.cipher.algorithms)return Sr.cipher.algorithms[o];return null};var Ex=Sr.cipher.BlockCipher=function(o){this.algorithm=o.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=o.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=o.decrypt,this.algorithm.initialize(o)};Ex.prototype.start=function(o){o=o||{};var f={};for(var h in o)f[h]=o[h];f.decrypt=this._decrypt,this._finish=!1,this._input=Sr.util.createBuffer(),this.output=o.output||Sr.util.createBuffer(),this.mode.start(f)};Ex.prototype.update=function(o){if(o)this._input.putBuffer(o);while(!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish);this._input.compact()};Ex.prototype.finish=function(o){if(o&&(this.mode.name==="ECB"||this.mode.name==="CBC"))this.mode.pad=function(h){return o(this.blockSize,h,!1)},this.mode.unpad=function(h){return o(this.blockSize,h,!0)};var f={};if(f.decrypt=this._decrypt,f.overflow=this._input.length()%this.blockSize,!this._decrypt&&this.mode.pad){if(!this.mode.pad(this._input,f))return!1}if(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad){if(!this.mode.unpad(this.output,f))return!1}if(this.mode.afterFinish){if(!this.mode.afterFinish(this.output,f))return!1}return!0}});var Ox=i(function($De,BM){var Tr=Xe();zt();Tr.cipher=Tr.cipher||{};var ot=BM.exports=Tr.cipher.modes=Tr.cipher.modes||{};ot.ecb=function(o){o=o||{},this.name="ECB",this.cipher=o.cipher,this.blockSize=o.blockSize||16,this._ints=this.blockSize/4,this._inBlock=Array(this._ints),this._outBlock=Array(this._ints)};ot.ecb.prototype.start=function(o){};ot.ecb.prototype.encrypt=function(o,f,h){if(o.length()<this.blockSize&&!(h&&o.length()>0))return!0;for(var y=0;y<this._ints;++y)this._inBlock[y]=o.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var y=0;y<this._ints;++y)f.putInt32(this._outBlock[y])};ot.ecb.prototype.decrypt=function(o,f,h){if(o.length()<this.blockSize&&!(h&&o.length()>0))return!0;for(var y=0;y<this._ints;++y)this._inBlock[y]=o.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var y=0;y<this._ints;++y)f.putInt32(this._outBlock[y])};ot.ecb.prototype.pad=function(o,f){var h=o.length()===this.blockSize?this.blockSize:this.blockSize-o.length();return o.fillWithByte(h,h),!0};ot.ecb.prototype.unpad=function(o,f){if(f.overflow>0)return!1;var h=o.length(),y=o.at(h-1);if(y>this.blockSize<<2)return!1;return o.truncate(y),!0};ot.cbc=function(o){o=o||{},this.name="CBC",this.cipher=o.cipher,this.blockSize=o.blockSize||16,this._ints=this.blockSize/4,this._inBlock=Array(this._ints),this._outBlock=Array(this._ints)};ot.cbc.prototype.start=function(o){if(o.iv===null){if(!this._prev)throw Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if(!("iv"in o))throw Error("Invalid IV parameter.");else this._iv=lh(o.iv,this.blockSize),this._prev=this._iv.slice(0)};ot.cbc.prototype.encrypt=function(o,f,h){if(o.length()<this.blockSize&&!(h&&o.length()>0))return!0;for(var y=0;y<this._ints;++y)this._inBlock[y]=this._prev[y]^o.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var y=0;y<this._ints;++y)f.putInt32(this._outBlock[y]);this._prev=this._outBlock};ot.cbc.prototype.decrypt=function(o,f,h){if(o.length()<this.blockSize&&!(h&&o.length()>0))return!0;for(var y=0;y<this._ints;++y)this._inBlock[y]=o.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var y=0;y<this._ints;++y)f.putInt32(this._prev[y]^this._outBlock[y]);this._prev=this._inBlock.slice(0)};ot.cbc.prototype.pad=function(o,f){var h=o.length()===this.blockSize?this.blockSize:this.blockSize-o.length();return o.fillWithByte(h,h),!0};ot.cbc.prototype.unpad=function(o,f){if(f.overflow>0)return!1;var h=o.length(),y=o.at(h-1);if(y>this.blockSize<<2)return!1;return o.truncate(y),!0};ot.cfb=function(o){o=o||{},this.name="CFB",this.cipher=o.cipher,this.blockSize=o.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=Array(this._ints),this._partialBlock=Array(this._ints),this._partialOutput=Tr.util.createBuffer(),this._partialBytes=0};ot.cfb.prototype.start=function(o){if(!("iv"in o))throw Error("Invalid IV parameter.");this._iv=lh(o.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};ot.cfb.prototype.encrypt=function(o,f,h){var y=o.length();if(y===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&y>=this.blockSize){for(var x=0;x<this._ints;++x)this._inBlock[x]=o.getInt32()^this._outBlock[x],f.putInt32(this._inBlock[x]);return}var _=(this.blockSize-y)%this.blockSize;if(_>0)_=this.blockSize-_;this._partialOutput.clear();for(var x=0;x<this._ints;++x)this._partialBlock[x]=o.getInt32()^this._outBlock[x],this._partialOutput.putInt32(this._partialBlock[x]);if(_>0)o.read-=this.blockSize;else for(var x=0;x<this._ints;++x)this._inBlock[x]=this._partialBlock[x];if(this._partialBytes>0)this._partialOutput.getBytes(this._partialBytes);if(_>0&&!h)return f.putBytes(this._partialOutput.getBytes(_-this._partialBytes)),this._partialBytes=_,!0;f.putBytes(this._partialOutput.getBytes(y-this._partialBytes)),this._partialBytes=0};ot.cfb.prototype.decrypt=function(o,f,h){var y=o.length();if(y===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&y>=this.blockSize){for(var x=0;x<this._ints;++x)this._inBlock[x]=o.getInt32(),f.putInt32(this._inBlock[x]^this._outBlock[x]);return}var _=(this.blockSize-y)%this.blockSize;if(_>0)_=this.blockSize-_;this._partialOutput.clear();for(var x=0;x<this._ints;++x)this._partialBlock[x]=o.getInt32(),this._partialOutput.putInt32(this._partialBlock[x]^this._outBlock[x]);if(_>0)o.read-=this.blockSize;else for(var x=0;x<this._ints;++x)this._inBlock[x]=this._partialBlock[x];if(this._partialBytes>0)this._partialOutput.getBytes(this._partialBytes);if(_>0&&!h)return f.putBytes(this._partialOutput.getBytes(_-this._partialBytes)),this._partialBytes=_,!0;f.putBytes(this._partialOutput.getBytes(y-this._partialBytes)),this._partialBytes=0};ot.ofb=function(o){o=o||{},this.name="OFB",this.cipher=o.cipher,this.blockSize=o.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=Array(this._ints),this._partialOutput=Tr.util.createBuffer(),this._partialBytes=0};ot.ofb.prototype.start=function(o){if(!("iv"in o))throw Error("Invalid IV parameter.");this._iv=lh(o.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};ot.ofb.prototype.encrypt=function(o,f,h){var y=o.length();if(o.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&y>=this.blockSize){for(var x=0;x<this._ints;++x)f.putInt32(o.getInt32()^this._outBlock[x]),this._inBlock[x]=this._outBlock[x];return}var _=(this.blockSize-y)%this.blockSize;if(_>0)_=this.blockSize-_;this._partialOutput.clear();for(var x=0;x<this._ints;++x)this._partialOutput.putInt32(o.getInt32()^this._outBlock[x]);if(_>0)o.read-=this.blockSize;else for(var x=0;x<this._ints;++x)this._inBlock[x]=this._outBlock[x];if(this._partialBytes>0)this._partialOutput.getBytes(this._partialBytes);if(_>0&&!h)return f.putBytes(this._partialOutput.getBytes(_-this._partialBytes)),this._partialBytes=_,!0;f.putBytes(this._partialOutput.getBytes(y-this._partialBytes)),this._partialBytes=0};ot.ofb.prototype.decrypt=ot.ofb.prototype.encrypt;ot.ctr=function(o){o=o||{},this.name="CTR",this.cipher=o.cipher,this.blockSize=o.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=Array(this._ints),this._partialOutput=Tr.util.createBuffer(),this._partialBytes=0};ot.ctr.prototype.start=function(o){if(!("iv"in o))throw Error("Invalid IV parameter.");this._iv=lh(o.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};ot.ctr.prototype.encrypt=function(o,f,h){var y=o.length();if(y===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&y>=this.blockSize)for(var x=0;x<this._ints;++x)f.putInt32(o.getInt32()^this._outBlock[x]);else{var _=(this.blockSize-y)%this.blockSize;if(_>0)_=this.blockSize-_;this._partialOutput.clear();for(var x=0;x<this._ints;++x)this._partialOutput.putInt32(o.getInt32()^this._outBlock[x]);if(_>0)o.read-=this.blockSize;if(this._partialBytes>0)this._partialOutput.getBytes(this._partialBytes);if(_>0&&!h)return f.putBytes(this._partialOutput.getBytes(_-this._partialBytes)),this._partialBytes=_,!0;f.putBytes(this._partialOutput.getBytes(y-this._partialBytes)),this._partialBytes=0}uh(this._inBlock)};ot.ctr.prototype.decrypt=ot.ctr.prototype.encrypt;ot.gcm=function(o){o=o||{},this.name="GCM",this.cipher=o.cipher,this.blockSize=o.blockSize||16,this._ints=this.blockSize/4,this._inBlock=Array(this._ints),this._outBlock=Array(this._ints),this._partialOutput=Tr.util.createBuffer(),this._partialBytes=0,this._R=3774873600};ot.gcm.prototype.start=function(o){if(!("iv"in o))throw Error("Invalid IV parameter.");var f=Tr.util.createBuffer(o.iv);this._cipherLength=0;var h;if("additionalData"in o)h=Tr.util.createBuffer(o.additionalData);else h=Tr.util.createBuffer();if("tagLength"in o)this._tagLength=o.tagLength;else this._tagLength=128;if(this._tag=null,o.decrypt){if(this._tag=Tr.util.createBuffer(o.tag).getBytes(),this._tag.length!==this._tagLength/8)throw Error("Authentication tag does not match tag length.")}this._hashBlock=Array(this._ints),this.tag=null,this._hashSubkey=Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var y=f.length();if(y===12)this._j0=[f.getInt32(),f.getInt32(),f.getInt32(),1];else{this._j0=[0,0,0,0];while(f.length()>0)this._j0=this.ghash(this._hashSubkey,this._j0,[f.getInt32(),f.getInt32(),f.getInt32(),f.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(kx(y*8)))}this._inBlock=this._j0.slice(0),uh(this._inBlock),this._partialBytes=0,h=Tr.util.createBuffer(h),this._aDataLength=kx(h.length()*8);var x=h.length()%this.blockSize;if(x)h.fillWithByte(0,this.blockSize-x);this._s=[0,0,0,0];while(h.length()>0)this._s=this.ghash(this._hashSubkey,this._s,[h.getInt32(),h.getInt32(),h.getInt32(),h.getInt32()])};ot.gcm.prototype.encrypt=function(o,f,h){var y=o.length();if(y===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&y>=this.blockSize){for(var x=0;x<this._ints;++x)f.putInt32(this._outBlock[x]^=o.getInt32());this._cipherLength+=this.blockSize}else{var _=(this.blockSize-y)%this.blockSize;if(_>0)_=this.blockSize-_;this._partialOutput.clear();for(var x=0;x<this._ints;++x)this._partialOutput.putInt32(o.getInt32()^this._outBlock[x]);if(_<=0||h){if(h){var z=y%this.blockSize;this._cipherLength+=z,this._partialOutput.truncate(this.blockSize-z)}else this._cipherLength+=this.blockSize;for(var x=0;x<this._ints;++x)this._outBlock[x]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0)this._partialOutput.getBytes(this._partialBytes);if(_>0&&!h)return o.read-=this.blockSize,f.putBytes(this._partialOutput.getBytes(_-this._partialBytes)),this._partialBytes=_,!0;f.putBytes(this._partialOutput.getBytes(y-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),uh(this._inBlock)};ot.gcm.prototype.decrypt=function(o,f,h){var y=o.length();if(y<this.blockSize&&!(h&&y>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),uh(this._inBlock),this._hashBlock[0]=o.getInt32(),this._hashBlock[1]=o.getInt32(),this._hashBlock[2]=o.getInt32(),this._hashBlock[3]=o.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var x=0;x<this._ints;++x)f.putInt32(this._outBlock[x]^this._hashBlock[x]);if(y<this.blockSize)this._cipherLength+=y%this.blockSize;else this._cipherLength+=this.blockSize};ot.gcm.prototype.afterFinish=function(o,f){var h=!0;if(f.decrypt&&f.overflow)o.truncate(this.blockSize-f.overflow);this.tag=Tr.util.createBuffer();var y=this._aDataLength.concat(kx(this._cipherLength*8));this._s=this.ghash(this._hashSubkey,this._s,y);var x=[];this.cipher.encrypt(this._j0,x);for(var _=0;_<this._ints;++_)this.tag.putInt32(this._s[_]^x[_]);if(this.tag.truncate(this.tag.length()%(this._tagLength/8)),f.decrypt&&this.tag.bytes()!==this._tag)h=!1;return h};ot.gcm.prototype.multiply=function(o,f){var h=[0,0,0,0],y=f.slice(0);for(var x=0;x<128;++x){var _=o[x/32|0]&1<<31-x%32;if(_)h[0]^=y[0],h[1]^=y[1],h[2]^=y[2],h[3]^=y[3];this.pow(y,y)}return h};ot.gcm.prototype.pow=function(o,f){var h=o[3]&1;for(var y=3;y>0;--y)f[y]=o[y]>>>1|(o[y-1]&1)<<31;if(f[0]=o[0]>>>1,h)f[0]^=this._R};ot.gcm.prototype.tableMultiply=function(o){var f=[0,0,0,0];for(var h=0;h<32;++h){var y=h/8|0,x=o[y]>>>(7-h%8)*4&15,_=this._m[h][x];f[0]^=_[0],f[1]^=_[1],f[2]^=_[2],f[3]^=_[3]}return f};ot.gcm.prototype.ghash=function(o,f,h){return f[0]^=h[0],f[1]^=h[1],f[2]^=h[2],f[3]^=h[3],this.tableMultiply(f)};ot.gcm.prototype.generateHashTable=function(o,f){var h=8/f,y=4*h,x=16*h,_=Array(x);for(var z=0;z<x;++z){var C=[0,0,0,0],w=z/y|0,S=(y-1-z%y)*f;C[w]=1<<f-1<<S,_[z]=this.generateSubHashTable(this.multiply(C,o),f)}return _};ot.gcm.prototype.generateSubHashTable=function(o,f){var h=1<<f,y=h>>>1,x=Array(h);x[y]=o.slice(0);var _=y>>>1;while(_>0)this.pow(x[2*_],x[_]=[]),_>>=1;_=2;while(_<y){for(var z=1;z<_;++z){var C=x[_],w=x[z];x[_+z]=[C[0]^w[0],C[1]^w[1],C[2]^w[2],C[3]^w[3]]}_*=2}x[0]=[0,0,0,0];for(_=y+1;_<h;++_){var S=x[_^y];x[_]=[o[0]^S[0],o[1]^S[1],o[2]^S[2],o[3]^S[3]]}return x};function lh(o,f){if(typeof o==="string")o=Tr.util.createBuffer(o);if(Tr.util.isArray(o)&&o.length>4){var h=o;o=Tr.util.createBuffer();for(var y=0;y<h.length;++y)o.putByte(h[y])}if(o.length()<f)throw Error("Invalid IV length; got "+o.length()+" bytes and expected "+f+" bytes.");if(!Tr.util.isArray(o)){var x=[],_=f/4;for(var y=0;y<_;++y)x.push(o.getInt32());o=x}return o}function uh(o){o[o.length-1]=o[o.length-1]+1&4294967295}function kx(o){return[o/4294967296|0,o&4294967295]}});var ji=i(function(VDe,jM){var Ft=Xe();ch();Ox();zt();jM.exports=Ft.aes=Ft.aes||{};Ft.aes.startEncrypting=function(o,f,h,y){var x=dh({key:o,output:h,decrypt:!1,mode:y});return x.start(f),x};Ft.aes.createEncryptionCipher=function(o,f){return dh({key:o,output:null,decrypt:!1,mode:f})};Ft.aes.startDecrypting=function(o,f,h,y){var x=dh({key:o,output:h,decrypt:!0,mode:y});return x.start(f),x};Ft.aes.createDecryptionCipher=function(o,f){return dh({key:o,output:null,decrypt:!0,mode:f})};Ft.aes.Algorithm=function(o,f){if(!Ax)LM();var h=this;h.name=o,h.mode=new f({blockSize:16,cipher:{encrypt:function(y,x){return Rx(h._w,y,x,!1)},decrypt:function(y,x){return Rx(h._w,y,x,!0)}}}),h._init=!1};Ft.aes.Algorithm.prototype.initialize=function(o){if(this._init)return;var f=o.key,h;if(typeof f==="string"&&(f.length===16||f.length===24||f.length===32))f=Ft.util.createBuffer(f);else if(Ft.util.isArray(f)&&(f.length===16||f.length===24||f.length===32)){h=f,f=Ft.util.createBuffer();for(var y=0;y<h.length;++y)f.putByte(h[y])}if(!Ft.util.isArray(f)){h=f,f=[];var x=h.length();if(x===16||x===24||x===32){x=x>>>2;for(var y=0;y<x;++y)f.push(h.getInt32())}}if(!Ft.util.isArray(f)||!(f.length===4||f.length===6||f.length===8))throw Error("Invalid key parameter.");var _=this.mode.name,z=["CFB","OFB","CTR","GCM"].indexOf(_)!==-1;this._w=NM(f,o.decrypt&&!z),this._init=!0};Ft.aes._expandKey=function(o,f){if(!Ax)LM();return NM(o,f)};Ft.aes._updateBlock=Rx;cc("AES-ECB",Ft.cipher.modes.ecb);cc("AES-CBC",Ft.cipher.modes.cbc);cc("AES-CFB",Ft.cipher.modes.cfb);cc("AES-OFB",Ft.cipher.modes.ofb);cc("AES-CTR",Ft.cipher.modes.ctr);cc("AES-GCM",Ft.cipher.modes.gcm);function cc(o,f){var h=function(){return new Ft.aes.Algorithm(o,f)};Ft.cipher.registerAlgorithm(o,h)}var Ax=!1,ac=4,to,Ix,DM,Fs,yn;function LM(){Ax=!0,DM=[0,1,2,4,8,16,32,64,128,27,54];var o=Array(256);for(var f=0;f<128;++f)o[f]=f<<1,o[f+128]=f+128<<1^283;to=Array(256),Ix=Array(256),Fs=[,,,,],yn=[,,,,];for(var f=0;f<4;++f)Fs[f]=Array(256),yn[f]=Array(256);var h=0,y=0,x,_,z,C,w,S,E;for(var f=0;f<256;++f){C=y^y<<1^y<<2^y<<3^y<<4,C=C>>8^C&255^99,to[h]=C,Ix[C]=h,w=o[C],x=o[h],_=o[x],z=o[_],S=w<<24^C<<16^C<<8^(C^w),E=(x^_^z)<<24^(h^z)<<16^(h^_^z)<<8^(h^x^z);for(var k=0;k<4;++k)Fs[k][h]=S,yn[k][C]=E,S=S<<24|S>>>8,E=E<<24|E>>>8;if(h===0)h=y=1;else h=x^o[o[o[x^z]]],y^=o[o[y]]}}function NM(o,f){var h=o.slice(0),y,x=1,_=h.length,z=_+6+1,C=ac*z;for(var w=_;w<C;++w){if(y=h[w-1],w%_===0)y=to[y>>>16&255]<<24^to[y>>>8&255]<<16^to[y&255]<<8^to[y>>>24]^DM[x]<<24,x++;else if(_>6&&w%_===4)y=to[y>>>24]<<24^to[y>>>16&255]<<16^to[y>>>8&255]<<8^to[y&255];h[w]=h[w-_]^y}if(f){var S,E=yn[0],k=yn[1],O=yn[2],R=yn[3],I=h.slice(0);C=h.length;for(var w=0,A=C-ac;w<C;w+=ac,A-=ac)if(w===0||w===C-ac)I[w]=h[A],I[w+1]=h[A+3],I[w+2]=h[A+2],I[w+3]=h[A+1];else for(var M=0;M<ac;++M)S=h[A+M],I[w+(3&-M)]=E[to[S>>>24]]^k[to[S>>>16&255]]^O[to[S>>>8&255]]^R[to[S&255]];h=I}return h}function Rx(o,f,h,y){var x=o.length/4-1,_,z,C,w,S;if(y)_=yn[0],z=yn[1],C=yn[2],w=yn[3],S=Ix;else _=Fs[0],z=Fs[1],C=Fs[2],w=Fs[3],S=to;var E,k,O,R,I,A,M;E=f[0]^o[0],k=f[y?3:1]^o[1],O=f[2]^o[2],R=f[y?1:3]^o[3];var D=3;for(var U=1;U<x;++U)I=_[E>>>24]^z[k>>>16&255]^C[O>>>8&255]^w[R&255]^o[++D],A=_[k>>>24]^z[O>>>16&255]^C[R>>>8&255]^w[E&255]^o[++D],M=_[O>>>24]^z[R>>>16&255]^C[E>>>8&255]^w[k&255]^o[++D],R=_[R>>>24]^z[E>>>16&255]^C[k>>>8&255]^w[O&255]^o[++D],E=I,k=A,O=M;h[0]=S[E>>>24]<<24^S[k>>>16&255]<<16^S[O>>>8&255]<<8^S[R&255]^o[++D],h[y?3:1]=S[k>>>24]<<24^S[O>>>16&255]<<16^S[R>>>8&255]<<8^S[E&255]^o[++D],h[2]=S[O>>>24]<<24^S[R>>>16&255]<<16^S[E>>>8&255]<<8^S[k&255]^o[++D],h[y?1:3]=S[R>>>24]<<24^S[E>>>16&255]<<16^S[k>>>8&255]<<8^S[O&255]^o[++D]}function dh(o){o=o||{};var f=(o.mode||"CBC").toUpperCase(),h="AES-"+f,y;if(o.decrypt)y=Ft.cipher.createDecipher(h,o.key);else y=Ft.cipher.createCipher(h,o.key);var x=y.start;return y.start=function(_,z){var C=null;if(z instanceof Ft.util.ByteBuffer)C=z,z={};z=z||{},z.output=C,z.iv=_,x.call(y,z)},y}});var qi=i(function(HDe,MM){var Pu=Xe();Pu.pki=Pu.pki||{};var Px=MM.exports=Pu.pki.oids=Pu.oids=Pu.oids||{};function fe(o,f){Px[o]=f,Px[f]=o}function It(o,f){Px[o]=f}fe("1.2.840.113549.1.1.1","rsaEncryption");fe("1.2.840.113549.1.1.4","md5WithRSAEncryption");fe("1.2.840.113549.1.1.5","sha1WithRSAEncryption");fe("1.2.840.113549.1.1.7","RSAES-OAEP");fe("1.2.840.113549.1.1.8","mgf1");fe("1.2.840.113549.1.1.9","pSpecified");fe("1.2.840.113549.1.1.10","RSASSA-PSS");fe("1.2.840.113549.1.1.11","sha256WithRSAEncryption");fe("1.2.840.113549.1.1.12","sha384WithRSAEncryption");fe("1.2.840.113549.1.1.13","sha512WithRSAEncryption");fe("1.3.101.112","EdDSA25519");fe("1.2.840.10040.4.3","dsa-with-sha1");fe("1.3.14.3.2.7","desCBC");fe("1.3.14.3.2.26","sha1");fe("1.3.14.3.2.29","sha1WithRSASignature");fe("2.16.840.1.101.3.4.2.1","sha256");fe("2.16.840.1.101.3.4.2.2","sha384");fe("2.16.840.1.101.3.4.2.3","sha512");fe("2.16.840.1.101.3.4.2.4","sha224");fe("2.16.840.1.101.3.4.2.5","sha512-224");fe("2.16.840.1.101.3.4.2.6","sha512-256");fe("1.2.840.113549.2.2","md2");fe("1.2.840.113549.2.5","md5");fe("1.2.840.113549.1.7.1","data");fe("1.2.840.113549.1.7.2","signedData");fe("1.2.840.113549.1.7.3","envelopedData");fe("1.2.840.113549.1.7.4","signedAndEnvelopedData");fe("1.2.840.113549.1.7.5","digestedData");fe("1.2.840.113549.1.7.6","encryptedData");fe("1.2.840.113549.1.9.1","emailAddress");fe("1.2.840.113549.1.9.2","unstructuredName");fe("1.2.840.113549.1.9.3","contentType");fe("1.2.840.113549.1.9.4","messageDigest");fe("1.2.840.113549.1.9.5","signingTime");fe("1.2.840.113549.1.9.6","counterSignature");fe("1.2.840.113549.1.9.7","challengePassword");fe("1.2.840.113549.1.9.8","unstructuredAddress");fe("1.2.840.113549.1.9.14","extensionRequest");fe("1.2.840.113549.1.9.20","friendlyName");fe("1.2.840.113549.1.9.21","localKeyId");fe("1.2.840.113549.1.9.22.1","x509Certificate");fe("1.2.840.113549.1.12.10.1.1","keyBag");fe("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag");fe("1.2.840.113549.1.12.10.1.3","certBag");fe("1.2.840.113549.1.12.10.1.4","crlBag");fe("1.2.840.113549.1.12.10.1.5","secretBag");fe("1.2.840.113549.1.12.10.1.6","safeContentsBag");fe("1.2.840.113549.1.5.13","pkcs5PBES2");fe("1.2.840.113549.1.5.12","pkcs5PBKDF2");fe("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4");fe("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4");fe("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC");fe("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC");fe("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC");fe("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC");fe("1.2.840.113549.2.7","hmacWithSHA1");fe("1.2.840.113549.2.8","hmacWithSHA224");fe("1.2.840.113549.2.9","hmacWithSHA256");fe("1.2.840.113549.2.10","hmacWithSHA384");fe("1.2.840.113549.2.11","hmacWithSHA512");fe("1.2.840.113549.3.7","des-EDE3-CBC");fe("2.16.840.1.101.3.4.1.2","aes128-CBC");fe("2.16.840.1.101.3.4.1.22","aes192-CBC");fe("2.16.840.1.101.3.4.1.42","aes256-CBC");fe("2.5.4.3","commonName");fe("2.5.4.4","surname");fe("2.5.4.5","serialNumber");fe("2.5.4.6","countryName");fe("2.5.4.7","localityName");fe("2.5.4.8","stateOrProvinceName");fe("2.5.4.9","streetAddress");fe("2.5.4.10","organizationName");fe("2.5.4.11","organizationalUnitName");fe("2.5.4.12","title");fe("2.5.4.13","description");fe("2.5.4.15","businessCategory");fe("2.5.4.17","postalCode");fe("2.5.4.42","givenName");fe("2.5.4.65","pseudonym");fe("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName");fe("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName");fe("2.16.840.1.113730.1.1","nsCertType");fe("2.16.840.1.113730.1.13","nsComment");It("2.5.29.1","authorityKeyIdentifier");It("2.5.29.2","keyAttributes");It("2.5.29.3","certificatePolicies");It("2.5.29.4","keyUsageRestriction");It("2.5.29.5","policyMapping");It("2.5.29.6","subtreesConstraint");It("2.5.29.7","subjectAltName");It("2.5.29.8","issuerAltName");It("2.5.29.9","subjectDirectoryAttributes");It("2.5.29.10","basicConstraints");It("2.5.29.11","nameConstraints");It("2.5.29.12","policyConstraints");It("2.5.29.13","basicConstraints");fe("2.5.29.14","subjectKeyIdentifier");fe("2.5.29.15","keyUsage");It("2.5.29.16","privateKeyUsagePeriod");fe("2.5.29.17","subjectAltName");fe("2.5.29.18","issuerAltName");fe("2.5.29.19","basicConstraints");It("2.5.29.20","cRLNumber");It("2.5.29.21","cRLReason");It("2.5.29.22","expirationDate");It("2.5.29.23","instructionCode");It("2.5.29.24","invalidityDate");It("2.5.29.25","cRLDistributionPoints");It("2.5.29.26","issuingDistributionPoint");It("2.5.29.27","deltaCRLIndicator");It("2.5.29.28","issuingDistributionPoint");It("2.5.29.29","certificateIssuer");It("2.5.29.30","nameConstraints");fe("2.5.29.31","cRLDistributionPoints");fe("2.5.29.32","certificatePolicies");It("2.5.29.33","policyMappings");It("2.5.29.34","policyConstraints");fe("2.5.29.35","authorityKeyIdentifier");It("2.5.29.36","policyConstraints");fe("2.5.29.37","extKeyUsage");It("2.5.29.46","freshestCRL");It("2.5.29.54","inhibitAnyPolicy");fe("1.3.6.1.4.1.11129.2.4.2","timestampList");fe("1.3.6.1.5.5.7.1.1","authorityInfoAccess");fe("1.3.6.1.5.5.7.3.1","serverAuth");fe("1.3.6.1.5.5.7.3.2","clientAuth");fe("1.3.6.1.5.5.7.3.3","codeSigning");fe("1.3.6.1.5.5.7.3.4","emailProtection");fe("1.3.6.1.5.5.7.3.8","timeStamping")});var bn=i(function(GDe,FM){var Ht=Xe();zt();qi();var Ce=FM.exports=Ht.asn1=Ht.asn1||{};Ce.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};Ce.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};Ce.maxDepth=256;Ce.create=function(o,f,h,y,x){if(Ht.util.isArray(y)){var _=[];for(var z=0;z<y.length;++z)if(y[z]!==void 0)_.push(y[z]);y=_}var C={tagClass:o,type:f,constructed:h,composed:h||Ht.util.isArray(y),value:y};if(x&&"bitStringContents"in x)C.bitStringContents=x.bitStringContents,C.original=Ce.copy(C);return C};Ce.copy=function(o,f){var h;if(Ht.util.isArray(o)){h=[];for(var y=0;y<o.length;++y)h.push(Ce.copy(o[y],f));return h}if(typeof o==="string")return o;if(h={tagClass:o.tagClass,type:o.type,constructed:o.constructed,composed:o.composed,value:Ce.copy(o.value,f)},f&&!f.excludeBitStringContents)h.bitStringContents=o.bitStringContents;return h};Ce.equals=function(o,f,h){if(Ht.util.isArray(o)){if(!Ht.util.isArray(f))return!1;if(o.length!==f.length)return!1;for(var y=0;y<o.length;++y)if(!Ce.equals(o[y],f[y]))return!1;return!0}if(typeof o!==typeof f)return!1;if(typeof o==="string")return o===f;var x=o.tagClass===f.tagClass&&o.type===f.type&&o.constructed===f.constructed&&o.composed===f.composed&&Ce.equals(o.value,f.value);if(h&&h.includeBitStringContents)x=x&&o.bitStringContents===f.bitStringContents;return x};Ce.getBerValueLength=function(o){var f=o.getByte();if(f===128)return;var h,y=f&128;if(!y)h=f;else h=o.getInt((f&127)<<3);return h};function Bu(o,f,h){if(h>f){var y=Error("Too few bytes to parse DER.");throw y.available=o.length(),y.remaining=f,y.requested=h,y}}var Bve=function(o,f){var h=o.getByte();if(f--,h===128)return;var y,x=h&128;if(!x)y=h;else{var _=h&127;Bu(o,f,_),y=o.getInt(_<<3)}if(y<0)throw Error("Negative length: "+y);return y};Ce.fromDer=function(o,f){if(f===void 0)f={strict:!0,parseAllBytes:!0,decodeBitStrings:!0};if(typeof f==="boolean")f={strict:f,parseAllBytes:!0,decodeBitStrings:!0};if(!("strict"in f))f.strict=!0;if(!("parseAllBytes"in f))f.parseAllBytes=!0;if(!("decodeBitStrings"in f))f.decodeBitStrings=!0;if(!("maxDepth"in f))f.maxDepth=Ce.maxDepth;if(typeof o==="string")o=Ht.util.createBuffer(o);var h=o.length(),y=ph(o,o.length(),0,f);if(f.parseAllBytes&&o.length()!==0){var x=Error("Unparsed DER bytes remain after ASN.1 parsing.");throw x.byteCount=h,x.remaining=o.length(),x}return y};function ph(o,f,h,y){if(h>=y.maxDepth)throw Error("ASN.1 parsing error: Max depth exceeded.");var x;Bu(o,f,2);var _=o.getByte();f--;var z=_&192,C=_&31;x=o.length();var w=Bve(o,f);if(f-=x-o.length(),w!==void 0&&w>f){if(y.strict){var S=Error("Too few bytes to read ASN.1 value.");throw S.available=o.length(),S.remaining=f,S.requested=w,S}w=f}var E,k,O=(_&32)===32;if(O)if(E=[],w===void 0)for(;;){if(Bu(o,f,2),o.bytes(2)===String.fromCharCode(0,0)){o.getBytes(2),f-=2;break}x=o.length(),E.push(ph(o,f,h+1,y)),f-=x-o.length()}else while(w>0)x=o.length(),E.push(ph(o,w,h+1,y)),f-=x-o.length(),w-=x-o.length();if(E===void 0&&z===Ce.Class.UNIVERSAL&&C===Ce.Type.BITSTRING)k=o.bytes(w);if(E===void 0&&y.decodeBitStrings&&z===Ce.Class.UNIVERSAL&&C===Ce.Type.BITSTRING&&w>1){var R=o.read,I=f,A=0;if(C===Ce.Type.BITSTRING)Bu(o,f,1),A=o.getByte(),f--;if(A===0)try{x=o.length();var M={strict:!0,decodeBitStrings:!0},D=ph(o,f,h+1,M),U=x-o.length();if(f-=U,C==Ce.Type.BITSTRING)U++;var F=D.tagClass;if(U===w&&(F===Ce.Class.UNIVERSAL||F===Ce.Class.CONTEXT_SPECIFIC))E=[D]}catch(Q){}if(E===void 0)o.read=R,f=I}if(E===void 0){if(w===void 0){if(y.strict)throw Error("Non-constructed ASN.1 object of indefinite length.");w=f}if(C===Ce.Type.BMPSTRING){E="";for(;w>0;w-=2)Bu(o,f,2),E+=String.fromCharCode(o.getInt16()),f-=2}else E=o.getBytes(w),f-=w}var J=k===void 0?null:{bitStringContents:k};return Ce.create(z,C,O,E,J)}Ce.toDer=function(o){var f=Ht.util.createBuffer(),h=o.tagClass|o.type,y=Ht.util.createBuffer(),x=!1;if("bitStringContents"in o){if(x=!0,o.original)x=Ce.equals(o,o.original)}if(x)y.putBytes(o.bitStringContents);else if(o.composed){if(o.constructed)h|=32;else y.putByte(0);for(var _=0;_<o.value.length;++_)if(o.value[_]!==void 0)y.putBuffer(Ce.toDer(o.value[_]))}else if(o.type===Ce.Type.BMPSTRING)for(var _=0;_<o.value.length;++_)y.putInt16(o.value.charCodeAt(_));else if(o.type===Ce.Type.INTEGER&&o.value.length>1&&(o.value.charCodeAt(0)===0&&(o.value.charCodeAt(1)&128)===0||o.value.charCodeAt(0)===255&&(o.value.charCodeAt(1)&128)===128))y.putBytes(o.value.substr(1));else y.putBytes(o.value);if(f.putByte(h),y.length()<=127)f.putByte(y.length()&127);else{var z=y.length(),C="";do C+=String.fromCharCode(z&255),z=z>>>8;while(z>0);f.putByte(C.length|128);for(var _=C.length-1;_>=0;--_)f.putByte(C.charCodeAt(_))}return f.putBuffer(y),f};Ce.oidToDer=function(o){var f=o.split("."),h=Ht.util.createBuffer();h.putByte(40*parseInt(f[0],10)+parseInt(f[1],10));var y,x,_,z;for(var C=2;C<f.length;++C){if(y=!0,x=[],_=parseInt(f[C],10),_>4294967295)throw Error("OID value too large; max is 32-bits.");do{if(z=_&127,_=_>>>7,!y)z|=128;x.push(z),y=!1}while(_>0);for(var w=x.length-1;w>=0;--w)h.putByte(x[w])}return h};Ce.derToOid=function(o){var f;if(typeof o==="string")o=Ht.util.createBuffer(o);var h=o.getByte();f=Math.floor(h/40)+"."+h%40;var y=0;while(o.length()>0){if(y>70368744177663)throw Error("OID value too large; max is 53-bits.");if(h=o.getByte(),y=y*128,h&128)y+=h&127;else f+="."+(y+h),y=0}return f};Ce.utcTimeToDate=function(o){var f=new Date,h=parseInt(o.substr(0,2),10);h=h>=50?1900+h:2000+h;var y=parseInt(o.substr(2,2),10)-1,x=parseInt(o.substr(4,2),10),_=parseInt(o.substr(6,2),10),z=parseInt(o.substr(8,2),10),C=0;if(o.length>11){var w=o.charAt(10),S=10;if(w!=="+"&&w!=="-")C=parseInt(o.substr(10,2),10),S+=2}if(f.setUTCFullYear(h,y,x),f.setUTCHours(_,z,C,0),S){if(w=o.charAt(S),w==="+"||w==="-"){var E=parseInt(o.substr(S+1,2),10),k=parseInt(o.substr(S+4,2),10),O=E*60+k;if(O*=60000,w==="+")f.setTime(+f-O);else f.setTime(+f+O)}}return f};Ce.generalizedTimeToDate=function(o){var f=new Date,h=parseInt(o.substr(0,4),10),y=parseInt(o.substr(4,2),10)-1,x=parseInt(o.substr(6,2),10),_=parseInt(o.substr(8,2),10),z=parseInt(o.substr(10,2),10),C=parseInt(o.substr(12,2),10),w=0,S=0,E=!1;if(o.charAt(o.length-1)==="Z")E=!0;var k=o.length-5,O=o.charAt(k);if(O==="+"||O==="-"){var R=parseInt(o.substr(k+1,2),10),I=parseInt(o.substr(k+4,2),10);if(S=R*60+I,S*=60000,O==="+")S*=-1;E=!0}if(o.charAt(14)===".")w=parseFloat(o.substr(14),10)*1000;if(E)f.setUTCFullYear(h,y,x),f.setUTCHours(_,z,C,w),f.setTime(+f+S);else f.setFullYear(h,y,x),f.setHours(_,z,C,w);return f};Ce.dateToUtcTime=function(o){if(typeof o==="string")return o;var f="",h=[];h.push((""+o.getUTCFullYear()).substr(2)),h.push(""+(o.getUTCMonth()+1)),h.push(""+o.getUTCDate()),h.push(""+o.getUTCHours()),h.push(""+o.getUTCMinutes()),h.push(""+o.getUTCSeconds());for(var y=0;y<h.length;++y){if(h[y].length<2)f+="0";f+=h[y]}return f+="Z",f};Ce.dateToGeneralizedTime=function(o){if(typeof o==="string")return o;var f="",h=[];h.push(""+o.getUTCFullYear()),h.push(""+(o.getUTCMonth()+1)),h.push(""+o.getUTCDate()),h.push(""+o.getUTCHours()),h.push(""+o.getUTCMinutes()),h.push(""+o.getUTCSeconds());for(var y=0;y<h.length;++y){if(h[y].length<2)f+="0";f+=h[y]}return f+="Z",f};Ce.integerToDer=function(o){var f=Ht.util.createBuffer();if(o>=-128&&o<128)return f.putSignedInt(o,8);if(o>=-32768&&o<32768)return f.putSignedInt(o,16);if(o>=-8388608&&o<8388608)return f.putSignedInt(o,24);if(o>=-2147483648&&o<2147483648)return f.putSignedInt(o,32);var h=Error("Integer too large; max is 32-bits.");throw h.integer=o,h};Ce.derToInteger=function(o){if(typeof o==="string")o=Ht.util.createBuffer(o);var f=o.length()*8;if(f>32)throw Error("Integer too large; max is 32-bits.");return o.getSignedInt(f)};Ce.validate=function(o,f,h,y){var x=!1;if((o.tagClass===f.tagClass||typeof f.tagClass>"u")&&(o.type===f.type||typeof f.type>"u")){if(o.constructed===f.constructed||typeof f.constructed>"u"){if(x=!0,f.value&&Ht.util.isArray(f.value)){var _=0;for(var z=0;x&&z<f.value.length;++z){var C=f.value[z];x=!!C.optional;var w=o.value[_];if(!w){if(!C.optional){if(x=!1,y)y.push("["+f.name+'] Missing required element. Expected tag class "'+C.tagClass+'", type "'+C.type+'"')}continue}var S=typeof C.tagClass<"u"&&typeof C.type<"u";if(S&&(w.tagClass!==C.tagClass||w.type!==C.type))if(C.optional){x=!0;continue}else{if(x=!1,y)y.push("["+f.name+"] Tag mismatch. Expected ("+C.tagClass+","+C.type+"), got ("+w.tagClass+","+w.type+")");break}var E=Ce.validate(w,C,h,y);if(E)++_,x=!0;else if(C.optional)x=!0;else{x=!1;break}}}if(x&&h){if(f.capture)h[f.capture]=o.value;if(f.captureAsn1)h[f.captureAsn1]=o;if(f.captureBitStringContents&&"bitStringContents"in o)h[f.captureBitStringContents]=o.bitStringContents;if(f.captureBitStringValue&&"bitStringContents"in o){var k;if(o.bitStringContents.length<2)h[f.captureBitStringValue]="";else{var O=o.bitStringContents.charCodeAt(0);if(O!==0)throw Error("captureBitStringValue only supported for zero unused bits");h[f.captureBitStringValue]=o.bitStringContents.slice(1)}}}}else if(y)y.push("["+f.name+'] Expected constructed "'+f.constructed+'", got "'+o.constructed+'"')}else if(y){if(o.tagClass!==f.tagClass)y.push("["+f.name+'] Expected tag class "'+f.tagClass+'", got "'+o.tagClass+'"');if(o.type!==f.type)y.push("["+f.name+'] Expected type "'+f.type+'", got "'+o.type+'"')}return x};var qM=/[^\\u0000-\\u00ff]/;Ce.prettyPrint=function(o,f,h){var y="";if(f=f||0,h=h||2,f>0)y+=`
114
+ `;var x="";for(var _=0;_<f*h;++_)x+=" ";switch(y+=x+"Tag: ",o.tagClass){case Ce.Class.UNIVERSAL:y+="Universal:";break;case Ce.Class.APPLICATION:y+="Application:";break;case Ce.Class.CONTEXT_SPECIFIC:y+="Context-Specific:";break;case Ce.Class.PRIVATE:y+="Private:";break}if(o.tagClass===Ce.Class.UNIVERSAL)switch(y+=o.type,o.type){case Ce.Type.NONE:y+=" (None)";break;case Ce.Type.BOOLEAN:y+=" (Boolean)";break;case Ce.Type.INTEGER:y+=" (Integer)";break;case Ce.Type.BITSTRING:y+=" (Bit string)";break;case Ce.Type.OCTETSTRING:y+=" (Octet string)";break;case Ce.Type.NULL:y+=" (Null)";break;case Ce.Type.OID:y+=" (Object Identifier)";break;case Ce.Type.ODESC:y+=" (Object Descriptor)";break;case Ce.Type.EXTERNAL:y+=" (External or Instance of)";break;case Ce.Type.REAL:y+=" (Real)";break;case Ce.Type.ENUMERATED:y+=" (Enumerated)";break;case Ce.Type.EMBEDDED:y+=" (Embedded PDV)";break;case Ce.Type.UTF8:y+=" (UTF8)";break;case Ce.Type.ROID:y+=" (Relative Object Identifier)";break;case Ce.Type.SEQUENCE:y+=" (Sequence)";break;case Ce.Type.SET:y+=" (Set)";break;case Ce.Type.PRINTABLESTRING:y+=" (Printable String)";break;case Ce.Type.IA5String:y+=" (IA5String (ASCII))";break;case Ce.Type.UTCTIME:y+=" (UTC time)";break;case Ce.Type.GENERALIZEDTIME:y+=" (Generalized time)";break;case Ce.Type.BMPSTRING:y+=" (BMP String)";break}else y+=o.type;if(y+=`
115
+ `,y+=x+"Constructed: "+o.constructed+`
116
+ `,o.composed){var z=0,C="";for(var _=0;_<o.value.length;++_)if(o.value[_]!==void 0){if(z+=1,C+=Ce.prettyPrint(o.value[_],f+1,h),_+1<o.value.length)C+=","}y+=x+"Sub values: "+z+C}else{if(y+=x+"Value: ",o.type===Ce.Type.OID){var w=Ce.derToOid(o.value);if(y+=w,Ht.pki&&Ht.pki.oids){if(w in Ht.pki.oids)y+=" ("+Ht.pki.oids[w]+") "}}if(o.type===Ce.Type.INTEGER)try{y+=Ce.derToInteger(o.value)}catch(E){y+="0x"+Ht.util.bytesToHex(o.value)}else if(o.type===Ce.Type.BITSTRING){if(o.value.length>1)y+="0x"+Ht.util.bytesToHex(o.value.slice(1));else y+="(none)";if(o.value.length>0){var S=o.value.charCodeAt(0);if(S==1)y+=" (1 unused bit shown)";else if(S>1)y+=" ("+S+" unused bits shown)"}}else if(o.type===Ce.Type.OCTETSTRING){if(!qM.test(o.value))y+="("+o.value+") ";y+="0x"+Ht.util.bytesToHex(o.value)}else if(o.type===Ce.Type.UTF8)try{y+=Ht.util.decodeUtf8(o.value)}catch(E){if(E.message==="URI malformed")y+="0x"+Ht.util.bytesToHex(o.value)+" (malformed UTF8)";else throw E}else if(o.type===Ce.Type.PRINTABLESTRING||o.type===Ce.Type.IA5String)y+=o.value;else if(qM.test(o.value))y+="0x"+Ht.util.bytesToHex(o.value);else if(o.value.length===0)y+="[null]";else y+=o.value}return y}});var Dn=i(function(KDe,UM){var fh=Xe();UM.exports=fh.md=fh.md||{};fh.md.algorithms=fh.md.algorithms||{}});var lc=i(function(WDe,$M){var si=Xe();Dn();zt();var Dve=$M.exports=si.hmac=si.hmac||{};Dve.create=function(){var o=null,f=null,h=null,y=null,x={};return x.start=function(_,z){if(_!==null)if(typeof _==="string")if(_=_.toLowerCase(),_ in si.md.algorithms)f=si.md.algorithms[_].create();else throw Error('Unknown hash algorithm "'+_+'"');else f=_;if(z===null)z=o;else{if(typeof z==="string")z=si.util.createBuffer(z);else if(si.util.isArray(z)){var C=z;z=si.util.createBuffer();for(var w=0;w<C.length;++w)z.putByte(C[w])}var S=z.length();if(S>f.blockLength)f.start(),f.update(z.bytes()),z=f.digest();h=si.util.createBuffer(),y=si.util.createBuffer(),S=z.length();for(var w=0;w<S;++w){var C=z.at(w);h.putByte(54^C),y.putByte(92^C)}if(S<f.blockLength){var C=f.blockLength-S;for(var w=0;w<C;++w)h.putByte(54),y.putByte(92)}o=z,h=h.bytes(),y=y.bytes()}f.start(),f.update(h)},x.update=function(_){f.update(_)},x.getMac=function(){var _=f.digest().bytes();return f.start(),f.update(y),f.update(_),f.digest()},x.digest=x.getMac,x}});var mh=i(function(JDe,KM){var Ln=Xe();Dn();zt();var HM=KM.exports=Ln.md5=Ln.md5||{};Ln.md.md5=Ln.md.algorithms.md5=HM;HM.create=function(){if(!GM)Lve();var o=null,f=Ln.util.createBuffer(),h=Array(16),y={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return y.start=function(){y.messageLength=0,y.fullMessageLength=y.messageLength64=[];var x=y.messageLengthSize/4;for(var _=0;_<x;++_)y.fullMessageLength.push(0);return f=Ln.util.createBuffer(),o={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},y},y.start(),y.update=function(x,_){if(_==="utf8")x=Ln.util.encodeUtf8(x);var z=x.length;y.messageLength+=z,z=[z/4294967296>>>0,z>>>0];for(var C=y.fullMessageLength.length-1;C>=0;--C)y.fullMessageLength[C]+=z[1],z[1]=z[0]+(y.fullMessageLength[C]/4294967296>>>0),y.fullMessageLength[C]=y.fullMessageLength[C]>>>0,z[0]=z[1]/4294967296>>>0;if(f.putBytes(x),VM(o,h,f),f.read>2048||f.length()===0)f.compact();return y},y.digest=function(){var x=Ln.util.createBuffer();x.putBytes(f.bytes());var _=y.fullMessageLength[y.fullMessageLength.length-1]+y.messageLengthSize,z=_&y.blockLength-1;x.putBytes(Bx.substr(0,y.blockLength-z));var C,w=0;for(var S=y.fullMessageLength.length-1;S>=0;--S)C=y.fullMessageLength[S]*8+w,w=C/4294967296>>>0,x.putInt32Le(C>>>0);var E={h0:o.h0,h1:o.h1,h2:o.h2,h3:o.h3};VM(E,h,x);var k=Ln.util.createBuffer();return k.putInt32Le(E.h0),k.putInt32Le(E.h1),k.putInt32Le(E.h2),k.putInt32Le(E.h3),k},y};var Bx=null,hh=null,Du=null,uc=null,GM=!1;function Lve(){Bx=String.fromCharCode(128),Bx+=Ln.util.fillString(String.fromCharCode(0),64),hh=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],Du=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],uc=Array(64);for(var o=0;o<64;++o)uc[o]=Math.floor(Math.abs(Math.sin(o+1))*4294967296);GM=!0}function VM(o,f,h){var y,x,_,z,C,w,S,E,k=h.length();while(k>=64){x=o.h0,_=o.h1,z=o.h2,C=o.h3;for(E=0;E<16;++E)f[E]=h.getInt32Le(),w=C^_&(z^C),y=x+w+uc[E]+f[E],S=Du[E],x=C,C=z,z=_,_+=y<<S|y>>>32-S;for(;E<32;++E)w=z^C&(_^z),y=x+w+uc[E]+f[hh[E]],S=Du[E],x=C,C=z,z=_,_+=y<<S|y>>>32-S;for(;E<48;++E)w=_^z^C,y=x+w+uc[E]+f[hh[E]],S=Du[E],x=C,C=z,z=_,_+=y<<S|y>>>32-S;for(;E<64;++E)w=z^(_|~C),y=x+w+uc[E]+f[hh[E]],S=Du[E],x=C,C=z,z=_,_+=y<<S|y>>>32-S;o.h0=o.h0+x|0,o.h1=o.h1+_|0,o.h2=o.h2+z|0,o.h3=o.h3+C|0,k-=64}}});var Us=i(function(ZDe,JM){var yh=Xe();zt();var WM=JM.exports=yh.pem=yh.pem||{};WM.encode=function(o,f){f=f||{};var h="-----BEGIN "+o.type+`-----\r
117
+ `,y;if(o.procType)y={name:"Proc-Type",values:[String(o.procType.version),o.procType.type]},h+=gh(y);if(o.contentDomain)y={name:"Content-Domain",values:[o.contentDomain]},h+=gh(y);if(o.dekInfo){if(y={name:"DEK-Info",values:[o.dekInfo.algorithm]},o.dekInfo.parameters)y.values.push(o.dekInfo.parameters);h+=gh(y)}if(o.headers)for(var x=0;x<o.headers.length;++x)h+=gh(o.headers[x]);if(o.procType)h+=`\r
118
+ `;return h+=yh.util.encode64(o.body,f.maxline||64)+`\r
119
+ `,h+="-----END "+o.type+`-----\r
120
+ `,h};WM.decode=function(o){var f=[],h=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,y=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,x=/\r?\n/,_;while(!0){if(_=h.exec(o),!_)break;var z=_[1];if(z==="NEW CERTIFICATE REQUEST")z="CERTIFICATE REQUEST";var C={type:z,procType:null,contentDomain:null,dekInfo:null,headers:[],body:yh.util.decode64(_[3])};if(f.push(C),!_[2])continue;var w=_[2].split(x),S=0;while(_&&S<w.length){var E=w[S].replace(/\s+$/,"");for(var k=S+1;k<w.length;++k){var O=w[k];if(!/\s/.test(O[0]))break;E+=O,S=k}if(_=E.match(y),_){var R={name:_[1],values:[]},I=_[2].split(",");for(var A=0;A<I.length;++A)R.values.push(Nve(I[A]));if(!C.procType){if(R.name!=="Proc-Type")throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');else if(R.values.length!==2)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');C.procType={version:I[0],type:I[1]}}else if(!C.contentDomain&&R.name==="Content-Domain")C.contentDomain=I[0]||"";else if(!C.dekInfo&&R.name==="DEK-Info"){if(R.values.length===0)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');C.dekInfo={algorithm:I[0],parameters:I[1]||null}}else C.headers.push(R)}++S}if(C.procType==="ENCRYPTED"&&!C.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}if(f.length===0)throw Error("Invalid PEM formatted message.");return f};function gh(o){var f=o.name+": ",h=[],y=function(w,S){return" "+S};for(var x=0;x<o.values.length;++x)h.push(o.values[x].replace(/^(\S+\r\n)/,y));f+=h.join(",")+`\r
121
+ `;var _=0,z=-1;for(var x=0;x<f.length;++x,++_)if(_>65&&z!==-1){var C=f[z];if(C===",")++z,f=f.substr(0,z)+`\r
122
+ `+f.substr(z);else f=f.substr(0,z)+`\r
123
+ `+C+f.substr(z+1);_=x-z-1,z=-1,++x}else if(f[x]===" "||f[x]==="\t"||f[x]===",")z=x;return f}function Nve(o){return o.replace(/^\s+/,"")}});var Lu=i(function(YDe,YM){var Zt=Xe();ch();Ox();zt();YM.exports=Zt.des=Zt.des||{};Zt.des.startEncrypting=function(o,f,h,y){var x=bh({key:o,output:h,decrypt:!1,mode:y||(f===null?"ECB":"CBC")});return x.start(f),x};Zt.des.createEncryptionCipher=function(o,f){return bh({key:o,output:null,decrypt:!1,mode:f})};Zt.des.startDecrypting=function(o,f,h,y){var x=bh({key:o,output:h,decrypt:!0,mode:y||(f===null?"ECB":"CBC")});return x.start(f),x};Zt.des.createDecryptionCipher=function(o,f){return bh({key:o,output:null,decrypt:!0,mode:f})};Zt.des.Algorithm=function(o,f){var h=this;h.name=o,h.mode=new f({blockSize:8,cipher:{encrypt:function(y,x){return ZM(h._keys,y,x,!1)},decrypt:function(y,x){return ZM(h._keys,y,x,!0)}}}),h._init=!1};Zt.des.Algorithm.prototype.initialize=function(o){if(this._init)return;var f=Zt.util.createBuffer(o.key);if(this.name.indexOf("3DES")===0){if(f.length()!==24)throw Error("Invalid Triple-DES key size: "+f.length()*8)}this._keys=Gve(f),this._init=!0};Nn("DES-ECB",Zt.cipher.modes.ecb);Nn("DES-CBC",Zt.cipher.modes.cbc);Nn("DES-CFB",Zt.cipher.modes.cfb);Nn("DES-OFB",Zt.cipher.modes.ofb);Nn("DES-CTR",Zt.cipher.modes.ctr);Nn("3DES-ECB",Zt.cipher.modes.ecb);Nn("3DES-CBC",Zt.cipher.modes.cbc);Nn("3DES-CFB",Zt.cipher.modes.cfb);Nn("3DES-OFB",Zt.cipher.modes.ofb);Nn("3DES-CTR",Zt.cipher.modes.ctr);function Nn(o,f){var h=function(){return new Zt.des.Algorithm(o,f)};Zt.cipher.registerAlgorithm(o,h)}var jve=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],Mve=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],qve=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],Fve=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],Uve=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],$ve=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],Vve=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],Hve=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function Gve(o){var f=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],h=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],y=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],x=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],_=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],z=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],C=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],w=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],S=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],E=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],k=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],O=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],R=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],I=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],A=o.length()>8?3:1,M=[],D=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],U=0,F;for(var J=0;J<A;J++){var Q=o.getInt32(),te=o.getInt32();F=(Q>>>4^te)&252645135,te^=F,Q^=F<<4,F=(te>>>-16^Q)&65535,Q^=F,te^=F<<-16,F=(Q>>>2^te)&858993459,te^=F,Q^=F<<2,F=(te>>>-16^Q)&65535,Q^=F,te^=F<<-16,F=(Q>>>1^te)&1431655765,te^=F,Q^=F<<1,F=(te>>>8^Q)&16711935,Q^=F,te^=F<<8,F=(Q>>>1^te)&1431655765,te^=F,Q^=F<<1,F=Q<<8|te>>>20&240,Q=te<<24|te<<8&16711680|te>>>8&65280|te>>>24&240,te=F;for(var le=0;le<D.length;++le){if(D[le])Q=Q<<2|Q>>>26,te=te<<2|te>>>26;else Q=Q<<1|Q>>>27,te=te<<1|te>>>27;Q&=-15,te&=-15;var he=f[Q>>>28]|h[Q>>>24&15]|y[Q>>>20&15]|x[Q>>>16&15]|_[Q>>>12&15]|z[Q>>>8&15]|C[Q>>>4&15],xe=w[te>>>28]|S[te>>>24&15]|E[te>>>20&15]|k[te>>>16&15]|O[te>>>12&15]|R[te>>>8&15]|I[te>>>4&15];F=(xe>>>16^he)&65535,M[U++]=he^F,M[U++]=xe^F<<16}}return M}function ZM(o,f,h,y){var x=o.length===32?3:9,_;if(x===3)_=y?[30,-2,-2]:[0,32,2];else _=y?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var z,C=f[0],w=f[1];z=(C>>>4^w)&252645135,w^=z,C^=z<<4,z=(C>>>16^w)&65535,w^=z,C^=z<<16,z=(w>>>2^C)&858993459,C^=z,w^=z<<2,z=(w>>>8^C)&16711935,C^=z,w^=z<<8,z=(C>>>1^w)&1431655765,w^=z,C^=z<<1,C=C<<1|C>>>31,w=w<<1|w>>>31;for(var S=0;S<x;S+=3){var E=_[S+1],k=_[S+2];for(var O=_[S];O!=E;O+=k){var R=w^o[O],I=(w>>>4|w<<28)^o[O+1];z=C,C=w,w=z^(Mve[R>>>24&63]|Fve[R>>>16&63]|$ve[R>>>8&63]|Hve[R&63]|jve[I>>>24&63]|qve[I>>>16&63]|Uve[I>>>8&63]|Vve[I&63])}z=C,C=w,w=z}C=C>>>1|C<<31,w=w>>>1|w<<31,z=(C>>>1^w)&1431655765,w^=z,C^=z<<1,z=(w>>>8^C)&16711935,C^=z,w^=z<<8,z=(w>>>2^C)&858993459,C^=z,w^=z<<2,z=(C>>>16^w)&65535,w^=z,C^=z<<16,z=(C>>>4^w)&252645135,w^=z,C^=z<<4,h[0]=C,h[1]=w}function bh(o){o=o||{};var f=(o.mode||"CBC").toUpperCase(),h="DES-"+f,y;if(o.decrypt)y=Zt.cipher.createDecipher(h,o.key);else y=Zt.cipher.createCipher(h,o.key);var x=y.start;return y.start=function(_,z){var C=null;if(z instanceof Zt.util.ByteBuffer)C=z,z={};z=z||{},z.output=C,z.iv=_,x.call(y,z)},y}});var vh=i(function(XDe,XM){var ro=Xe();lc();Dn();zt();var Kve=ro.pkcs5=ro.pkcs5||{},ai;if(ro.util.isNodejs&&!ro.options.usePureJavaScript)ai=c("crypto");XM.exports=ro.pbkdf2=Kve.pbkdf2=function(o,f,h,y,x,_){if(typeof x==="function")_=x,x=null;if(ro.util.isNodejs&&!ro.options.usePureJavaScript&&ai.pbkdf2&&(x===null||typeof x!=="object")&&(ai.pbkdf2Sync.length>4||(!x||x==="sha1"))){if(typeof x!=="string")x="sha1";if(o=Buffer.from(o,"binary"),f=Buffer.from(f,"binary"),!_){if(ai.pbkdf2Sync.length===4)return ai.pbkdf2Sync(o,f,h,y).toString("binary");return ai.pbkdf2Sync(o,f,h,y,x).toString("binary")}if(ai.pbkdf2Sync.length===4)return ai.pbkdf2(o,f,h,y,function(F,J){if(F)return _(F);_(null,J.toString("binary"))});return ai.pbkdf2(o,f,h,y,x,function(F,J){if(F)return _(F);_(null,J.toString("binary"))})}if(typeof x>"u"||x===null)x="sha1";if(typeof x==="string"){if(!(x in ro.md.algorithms))throw Error("Unknown hash algorithm: "+x);x=ro.md[x].create()}var z=x.digestLength;if(y>4294967295*z){var C=Error("Derived key is too long.");if(_)return _(C);throw C}var w=Math.ceil(y/z),S=y-(w-1)*z,E=ro.hmac.create();E.start(x,o);var k="",O,R,I;if(!_){for(var A=1;A<=w;++A){E.start(null,null),E.update(f),E.update(ro.util.int32ToBytes(A)),O=I=E.digest().getBytes();for(var M=2;M<=h;++M)E.start(null,null),E.update(I),R=E.digest().getBytes(),O=ro.util.xorBytes(O,R,z),I=R;k+=A<w?O:O.substr(0,S)}return k}var A=1,M;function D(){if(A>w)return _(null,k);E.start(null,null),E.update(f),E.update(ro.util.int32ToBytes(A)),O=I=E.digest().getBytes(),M=2,U()}function U(){if(M<=h)return E.start(null,null),E.update(I),R=E.digest().getBytes(),O=ro.util.xorBytes(O,R,z),I=R,++M,ro.util.setImmediate(U);k+=A<w?O:O.substr(0,S),++A,D()}D()}});var Lx=i(function(QDe,o5){var jn=Xe();Dn();zt();var e5=o5.exports=jn.sha256=jn.sha256||{};jn.md.sha256=jn.md.algorithms.sha256=e5;e5.create=function(){if(!t5)Wve();var o=null,f=jn.util.createBuffer(),h=Array(64),y={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return y.start=function(){y.messageLength=0,y.fullMessageLength=y.messageLength64=[];var x=y.messageLengthSize/4;for(var _=0;_<x;++_)y.fullMessageLength.push(0);return f=jn.util.createBuffer(),o={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},y},y.start(),y.update=function(x,_){if(_==="utf8")x=jn.util.encodeUtf8(x);var z=x.length;y.messageLength+=z,z=[z/4294967296>>>0,z>>>0];for(var C=y.fullMessageLength.length-1;C>=0;--C)y.fullMessageLength[C]+=z[1],z[1]=z[0]+(y.fullMessageLength[C]/4294967296>>>0),y.fullMessageLength[C]=y.fullMessageLength[C]>>>0,z[0]=z[1]/4294967296>>>0;if(f.putBytes(x),QM(o,h,f),f.read>2048||f.length()===0)f.compact();return y},y.digest=function(){var x=jn.util.createBuffer();x.putBytes(f.bytes());var _=y.fullMessageLength[y.fullMessageLength.length-1]+y.messageLengthSize,z=_&y.blockLength-1;x.putBytes(Dx.substr(0,y.blockLength-z));var C,w,S=y.fullMessageLength[0]*8;for(var E=0;E<y.fullMessageLength.length-1;++E)C=y.fullMessageLength[E+1]*8,w=C/4294967296>>>0,S+=w,x.putInt32(S>>>0),S=C>>>0;x.putInt32(S);var k={h0:o.h0,h1:o.h1,h2:o.h2,h3:o.h3,h4:o.h4,h5:o.h5,h6:o.h6,h7:o.h7};QM(k,h,x);var O=jn.util.createBuffer();return O.putInt32(k.h0),O.putInt32(k.h1),O.putInt32(k.h2),O.putInt32(k.h3),O.putInt32(k.h4),O.putInt32(k.h5),O.putInt32(k.h6),O.putInt32(k.h7),O},y};var Dx=null,t5=!1,r5=null;function Wve(){Dx=String.fromCharCode(128),Dx+=jn.util.fillString(String.fromCharCode(0),64),r5=[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],t5=!0}function QM(o,f,h){var y,x,_,z,C,w,S,E,k,O,R,I,A,M,D,U=h.length();while(U>=64){for(S=0;S<16;++S)f[S]=h.getInt32();for(;S<64;++S)y=f[S-2],y=(y>>>17|y<<15)^(y>>>19|y<<13)^y>>>10,x=f[S-15],x=(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3,f[S]=y+f[S-7]+x+f[S-16]|0;E=o.h0,k=o.h1,O=o.h2,R=o.h3,I=o.h4,A=o.h5,M=o.h6,D=o.h7;for(S=0;S<64;++S)z=(I>>>6|I<<26)^(I>>>11|I<<21)^(I>>>25|I<<7),C=M^I&(A^M),_=(E>>>2|E<<30)^(E>>>13|E<<19)^(E>>>22|E<<10),w=E&k|O&(E^k),y=D+z+C+r5[S]+f[S],x=_+w,D=M,M=A,A=I,I=R+y>>>0,R=O,O=k,k=E,E=y+x>>>0;o.h0=o.h0+E|0,o.h1=o.h1+k|0,o.h2=o.h2+O|0,o.h3=o.h3+R|0,o.h4=o.h4+I|0,o.h5=o.h5+A|0,o.h6=o.h6+M|0,o.h7=o.h7+D|0,U-=64}}});var Nx=i(function(eLe,n5){var Mn=Xe();zt();var xh=null;if(Mn.util.isNodejs&&!Mn.options.usePureJavaScript&&!process.versions["node-webkit"])xh=c("crypto");var Jve=n5.exports=Mn.prng=Mn.prng||{};Jve.create=function(o){var f={plugin:o,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},h=o.md,y=Array(32);for(var x=0;x<32;++x)y[x]=h.create();f.pools=y,f.pool=0,f.generate=function(S,E){if(!E)return f.generateSync(S);var k=f.plugin.cipher,O=f.plugin.increment,R=f.plugin.formatKey,I=f.plugin.formatSeed,A=Mn.util.createBuffer();f.key=null,M();function M(D){if(D)return E(D);if(A.length()>=S)return E(null,A.getBytes(S));if(f.generated>1048575)f.key=null;if(f.key===null)return Mn.util.nextTick(function(){_(M)});var U=k(f.key,f.seed);f.generated+=U.length,A.putBytes(U),f.key=R(k(f.key,O(f.seed))),f.seed=I(k(f.key,f.seed)),Mn.util.setImmediate(M)}},f.generateSync=function(S){var E=f.plugin.cipher,k=f.plugin.increment,O=f.plugin.formatKey,R=f.plugin.formatSeed;f.key=null;var I=Mn.util.createBuffer();while(I.length()<S){if(f.generated>1048575)f.key=null;if(f.key===null)z();var A=E(f.key,f.seed);f.generated+=A.length,I.putBytes(A),f.key=O(E(f.key,k(f.seed))),f.seed=R(E(f.key,f.seed))}return I.getBytes(S)};function _(S){if(f.pools[0].messageLength>=32)return C(),S();var E=32-f.pools[0].messageLength<<5;f.seedFile(E,function(k,O){if(k)return S(k);f.collect(O),C(),S()})}function z(){if(f.pools[0].messageLength>=32)return C();var S=32-f.pools[0].messageLength<<5;f.collect(f.seedFileSync(S)),C()}function C(){f.reseeds=f.reseeds===4294967295?0:f.reseeds+1;var S=f.plugin.md.create();S.update(f.keyBytes);var E=1;for(var k=0;k<32;++k){if(f.reseeds%E===0)S.update(f.pools[k].digest().getBytes()),f.pools[k].start();E=E<<1}f.keyBytes=S.digest().getBytes(),S.start(),S.update(f.keyBytes);var O=S.digest().getBytes();f.key=f.plugin.formatKey(f.keyBytes),f.seed=f.plugin.formatSeed(O),f.generated=0}function w(S){var E=null,k=Mn.util.globalScope,O=k.crypto||k.msCrypto;if(O&&O.getRandomValues)E=function(Q){return O.getRandomValues(Q)};var R=Mn.util.createBuffer();if(E)while(R.length()<S){var I=Math.max(1,Math.min(S-R.length(),65536)/4),A=new Uint32Array(Math.floor(I));try{E(A);for(var M=0;M<A.length;++M)R.putInt32(A[M])}catch(Q){if(!(typeof QuotaExceededError<"u"&&Q instanceof QuotaExceededError))throw Q}}if(R.length()<S){var D,U,F,J=Math.floor(Math.random()*65536);while(R.length()<S){U=16807*(J&65535),D=16807*(J>>16),U+=(D&32767)<<16,U+=D>>15,U=(U&2147483647)+(U>>31),J=U&4294967295;for(var M=0;M<3;++M)F=J>>>(M<<3),F^=Math.floor(Math.random()*256),R.putByte(F&255)}}return R.getBytes(S)}if(xh)f.seedFile=function(S,E){xh.randomBytes(S,function(k,O){if(k)return E(k);E(null,O.toString())})},f.seedFileSync=function(S){return xh.randomBytes(S).toString()};else f.seedFile=function(S,E){try{E(null,w(S))}catch(k){E(k)}},f.seedFileSync=w;return f.collect=function(S){var E=S.length;for(var k=0;k<E;++k)f.pools[f.pool].update(S.substr(k,1)),f.pool=f.pool===31?0:f.pool+1},f.collectInt=function(S,E){var k="";for(var O=0;O<E;O+=8)k+=String.fromCharCode(S>>O&255);f.collect(k)},f.registerWorker=function(S){if(S===self)f.seedFile=function(k,O){function R(I){var A=I.data;if(A.forge&&A.forge.prng)self.removeEventListener("message",R),O(A.forge.prng.err,A.forge.prng.bytes)}self.addEventListener("message",R),self.postMessage({forge:{prng:{needed:k}}})};else{var E=function(k){var O=k.data;if(O.forge&&O.forge.prng)f.seedFile(O.forge.prng.needed,function(R,I){S.postMessage({forge:{prng:{err:R,bytes:I}}})})};S.addEventListener("message",E)}},f}});var Ho=i(function(tLe,jx){var Er=Xe();ji();Lx();Nx();zt();(function(){if(Er.random&&Er.random.getBytes){jx.exports=Er.random;return}(function(o){var f={},h=[,,,,],y=Er.util.createBuffer();f.formatKey=function(k){var O=Er.util.createBuffer(k);return k=[,,,,],k[0]=O.getInt32(),k[1]=O.getInt32(),k[2]=O.getInt32(),k[3]=O.getInt32(),Er.aes._expandKey(k,!1)},f.formatSeed=function(k){var O=Er.util.createBuffer(k);return k=[,,,,],k[0]=O.getInt32(),k[1]=O.getInt32(),k[2]=O.getInt32(),k[3]=O.getInt32(),k},f.cipher=function(k,O){return Er.aes._updateBlock(k,O,h,!1),y.putInt32(h[0]),y.putInt32(h[1]),y.putInt32(h[2]),y.putInt32(h[3]),y.getBytes()},f.increment=function(k){return++k[3],k},f.md=Er.md.sha256;function x(){var k=Er.prng.create(f);return k.getBytes=function(O,R){return k.generate(O,R)},k.getBytesSync=function(O){return k.generate(O)},k}var _=x(),z=null,C=Er.util.globalScope,w=C.crypto||C.msCrypto;if(w&&w.getRandomValues)z=function(k){return w.getRandomValues(k)};if(Er.options.usePureJavaScript||!Er.util.isNodejs&&!z){if(typeof window>"u"||window.document===void 0);if(_.collectInt(+new Date,32),typeof navigator<"u"){var S="";for(var E in navigator)try{if(typeof navigator[E]=="string")S+=navigator[E]}catch(k){}_.collect(S),S=null}if(o)o().mousemove(function(k){_.collectInt(k.clientX,16),_.collectInt(k.clientY,16)}),o().keypress(function(k){_.collectInt(k.charCode,8)})}if(!Er.random)Er.random=_;else for(var E in _)Er.random[E]=_[E];Er.random.createInstance=x,jx.exports=Er.random})(typeof jQuery<"u"?jQuery:null)})()});var qx=i(function(rLe,a5){var xo=Xe();zt();var Mx=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],i5=[1,2,3,5],Zve=function(o,f){return o<<f&65535|(o&65535)>>16-f},Yve=function(o,f){return(o&65535)>>f|o<<16-f&65535};a5.exports=xo.rc2=xo.rc2||{};xo.rc2.expandKey=function(o,f){if(typeof o==="string")o=xo.util.createBuffer(o);f=f||128;var h=o,y=o.length(),x=f,_=Math.ceil(x/8),z=255>>(x&7),C;for(C=y;C<128;C++)h.putByte(Mx[h.at(C-1)+h.at(C-y)&255]);h.setAt(128-_,Mx[h.at(128-_)&z]);for(C=127-_;C>=0;C--)h.setAt(C,Mx[h.at(C+1)^h.at(C+_)]);return h};var s5=function(o,f,h){var y=!1,x=null,_=null,z=null,C,w,S,E,k=[];o=xo.rc2.expandKey(o,f);for(S=0;S<64;S++)k.push(o.getInt16Le());if(h)C=function(I){for(S=0;S<4;S++)I[S]+=k[E]+(I[(S+3)%4]&I[(S+2)%4])+(~I[(S+3)%4]&I[(S+1)%4]),I[S]=Zve(I[S],i5[S]),E++},w=function(I){for(S=0;S<4;S++)I[S]+=k[I[(S+3)%4]&63]};else C=function(I){for(S=3;S>=0;S--)I[S]=Yve(I[S],i5[S]),I[S]-=k[E]+(I[(S+3)%4]&I[(S+2)%4])+(~I[(S+3)%4]&I[(S+1)%4]),E--},w=function(I){for(S=3;S>=0;S--)I[S]-=k[I[(S+3)%4]&63]};var O=function(I){var A=[];for(S=0;S<4;S++){var M=x.getInt16Le();if(z!==null)if(h)M^=z.getInt16Le();else z.putInt16Le(M);A.push(M&65535)}E=h?0:63;for(var D=0;D<I.length;D++)for(var U=0;U<I[D][0];U++)I[D][1](A);for(S=0;S<4;S++){if(z!==null)if(h)z.putInt16Le(A[S]);else A[S]^=z.getInt16Le();_.putInt16Le(A[S])}},R=null;return R={start:function(I,A){if(I){if(typeof I==="string")I=xo.util.createBuffer(I)}y=!1,x=xo.util.createBuffer(),_=A||new xo.util.createBuffer,z=I,R.output=_},update:function(I){if(!y)x.putBuffer(I);while(x.length()>=8)O([[5,C],[1,w],[6,C],[1,w],[5,C]])},finish:function(I){var A=!0;if(h)if(I)A=I(8,x,!h);else{var M=x.length()===8?8:8-x.length();x.fillWithByte(M,M)}if(A)y=!0,R.update();if(!h){if(A=x.length()===0,A)if(I)A=I(8,_,!h);else{var D=_.length(),U=_.at(D-1);if(U>D)A=!1;else _.truncate(U)}}return A}},R};xo.rc2.startEncrypting=function(o,f,h){var y=xo.rc2.createEncryptionCipher(o,128);return y.start(f,h),y};xo.rc2.createEncryptionCipher=function(o,f){return s5(o,f,!0)};xo.rc2.startDecrypting=function(o,f,h){var y=xo.rc2.createDecryptionCipher(o,128);return y.start(f,h),y};xo.rc2.createDecryptionCipher=function(o,f){return s5(o,f,!1)}});var ju=i(function(oLe,m5){var Fx=Xe();m5.exports=Fx.jsbn=Fx.jsbn||{};var ci,Xve=244837814094590,c5=(Xve&16777215)==15715070;function ue(o,f,h){if(this.data=[],o!=null)if(typeof o=="number")this.fromNumber(o,f,h);else if(f==null&&typeof o!="string")this.fromString(o,256);else this.fromString(o,f)}Fx.jsbn.BigInteger=ue;function yt(){return new ue(null)}function Qve(o,f,h,y,x,_){while(--_>=0){var z=f*this.data[o++]+h.data[y]+x;x=Math.floor(z/67108864),h.data[y++]=z&67108863}return x}function exe(o,f,h,y,x,_){var z=f&32767,C=f>>15;while(--_>=0){var w=this.data[o]&32767,S=this.data[o++]>>15,E=C*w+S*z;w=z*w+((E&32767)<<15)+h.data[y]+(x&1073741823),x=(w>>>30)+(E>>>15)+C*S+(x>>>30),h.data[y++]=w&1073741823}return x}function l5(o,f,h,y,x,_){var z=f&16383,C=f>>14;while(--_>=0){var w=this.data[o]&16383,S=this.data[o++]>>14,E=C*w+S*z;w=z*w+((E&16383)<<14)+h.data[y]+x,x=(w>>28)+(E>>14)+C*S,h.data[y++]=w&268435455}return x}if(typeof navigator>"u")ue.prototype.am=l5,ci=28;else if(c5&&navigator.appName=="Microsoft Internet Explorer")ue.prototype.am=exe,ci=30;else if(c5&&navigator.appName!="Netscape")ue.prototype.am=Qve,ci=26;else ue.prototype.am=l5,ci=28;ue.prototype.DB=ci;ue.prototype.DM=(1<<ci)-1;ue.prototype.DV=1<<ci;var Ux=52;ue.prototype.FV=Math.pow(2,Ux);ue.prototype.F1=Ux-ci;ue.prototype.F2=2*ci-Ux;var txe="0123456789abcdefghijklmnopqrstuvwxyz",_h=[],dc,Go;dc=48;for(Go=0;Go<=9;++Go)_h[dc++]=Go;dc=97;for(Go=10;Go<36;++Go)_h[dc++]=Go;dc=65;for(Go=10;Go<36;++Go)_h[dc++]=Go;function u5(o){return txe.charAt(o)}function d5(o,f){var h=_h[o.charCodeAt(f)];return h==null?-1:h}function rxe(o){for(var f=this.t-1;f>=0;--f)o.data[f]=this.data[f];o.t=this.t,o.s=this.s}function oxe(o){if(this.t=1,this.s=o<0?-1:0,o>0)this.data[0]=o;else if(o<-1)this.data[0]=o+this.DV;else this.t=0}function Fi(o){var f=yt();return f.fromInt(o),f}function nxe(o,f){var h;if(f==16)h=4;else if(f==8)h=3;else if(f==256)h=8;else if(f==2)h=1;else if(f==32)h=5;else if(f==4)h=2;else{this.fromRadix(o,f);return}this.t=0,this.s=0;var y=o.length,x=!1,_=0;while(--y>=0){var z=h==8?o[y]&255:d5(o,y);if(z<0){if(o.charAt(y)=="-")x=!0;continue}if(x=!1,_==0)this.data[this.t++]=z;else if(_+h>this.DB)this.data[this.t-1]|=(z&(1<<this.DB-_)-1)<<_,this.data[this.t++]=z>>this.DB-_;else this.data[this.t-1]|=z<<_;if(_+=h,_>=this.DB)_-=this.DB}if(h==8&&(o[0]&128)!=0){if(this.s=-1,_>0)this.data[this.t-1]|=(1<<this.DB-_)-1<<_}if(this.clamp(),x)ue.ZERO.subTo(this,this)}function ixe(){var o=this.s&this.DM;while(this.t>0&&this.data[this.t-1]==o)--this.t}function sxe(o){if(this.s<0)return"-"+this.negate().toString(o);var f;if(o==16)f=4;else if(o==8)f=3;else if(o==2)f=1;else if(o==32)f=5;else if(o==4)f=2;else return this.toRadix(o);var h=(1<<f)-1,y,x=!1,_="",z=this.t,C=this.DB-z*this.DB%f;if(z-- >0){if(C<this.DB&&(y=this.data[z]>>C)>0)x=!0,_=u5(y);while(z>=0){if(C<f)y=(this.data[z]&(1<<C)-1)<<f-C,y|=this.data[--z]>>(C+=this.DB-f);else if(y=this.data[z]>>(C-=f)&h,C<=0)C+=this.DB,--z;if(y>0)x=!0;if(x)_+=u5(y)}}return x?_:"0"}function axe(){var o=yt();return ue.ZERO.subTo(this,o),o}function cxe(){return this.s<0?this.negate():this}function lxe(o){var f=this.s-o.s;if(f!=0)return f;var h=this.t;if(f=h-o.t,f!=0)return this.s<0?-f:f;while(--h>=0)if((f=this.data[h]-o.data[h])!=0)return f;return 0}function zh(o){var f=1,h;if((h=o>>>16)!=0)o=h,f+=16;if((h=o>>8)!=0)o=h,f+=8;if((h=o>>4)!=0)o=h,f+=4;if((h=o>>2)!=0)o=h,f+=2;if((h=o>>1)!=0)o=h,f+=1;return f}function uxe(){if(this.t<=0)return 0;return this.DB*(this.t-1)+zh(this.data[this.t-1]^this.s&this.DM)}function dxe(o,f){var h;for(h=this.t-1;h>=0;--h)f.data[h+o]=this.data[h];for(h=o-1;h>=0;--h)f.data[h]=0;f.t=this.t+o,f.s=this.s}function pxe(o,f){for(var h=o;h<this.t;++h)f.data[h-o]=this.data[h];f.t=Math.max(this.t-o,0),f.s=this.s}function fxe(o,f){var h=o%this.DB,y=this.DB-h,x=(1<<y)-1,_=Math.floor(o/this.DB),z=this.s<<h&this.DM,C;for(C=this.t-1;C>=0;--C)f.data[C+_+1]=this.data[C]>>y|z,z=(this.data[C]&x)<<h;for(C=_-1;C>=0;--C)f.data[C]=0;f.data[_]=z,f.t=this.t+_+1,f.s=this.s,f.clamp()}function hxe(o,f){f.s=this.s;var h=Math.floor(o/this.DB);if(h>=this.t){f.t=0;return}var y=o%this.DB,x=this.DB-y,_=(1<<y)-1;f.data[0]=this.data[h]>>y;for(var z=h+1;z<this.t;++z)f.data[z-h-1]|=(this.data[z]&_)<<x,f.data[z-h]=this.data[z]>>y;if(y>0)f.data[this.t-h-1]|=(this.s&_)<<x;f.t=this.t-h,f.clamp()}function mxe(o,f){var h=0,y=0,x=Math.min(o.t,this.t);while(h<x)y+=this.data[h]-o.data[h],f.data[h++]=y&this.DM,y>>=this.DB;if(o.t<this.t){y-=o.s;while(h<this.t)y+=this.data[h],f.data[h++]=y&this.DM,y>>=this.DB;y+=this.s}else{y+=this.s;while(h<o.t)y-=o.data[h],f.data[h++]=y&this.DM,y>>=this.DB;y-=o.s}if(f.s=y<0?-1:0,y<-1)f.data[h++]=this.DV+y;else if(y>0)f.data[h++]=y;f.t=h,f.clamp()}function gxe(o,f){var h=this.abs(),y=o.abs(),x=h.t;f.t=x+y.t;while(--x>=0)f.data[x]=0;for(x=0;x<y.t;++x)f.data[x+h.t]=h.am(0,y.data[x],f,x,0,h.t);if(f.s=0,f.clamp(),this.s!=o.s)ue.ZERO.subTo(f,f)}function yxe(o){var f=this.abs(),h=o.t=2*f.t;while(--h>=0)o.data[h]=0;for(h=0;h<f.t-1;++h){var y=f.am(h,f.data[h],o,2*h,0,1);if((o.data[h+f.t]+=f.am(h+1,2*f.data[h],o,2*h+1,y,f.t-h-1))>=f.DV)o.data[h+f.t]-=f.DV,o.data[h+f.t+1]=1}if(o.t>0)o.data[o.t-1]+=f.am(h,f.data[h],o,2*h,0,1);o.s=0,o.clamp()}function bxe(o,f,h){var y=o.abs();if(y.t<=0)return;var x=this.abs();if(x.t<y.t){if(f!=null)f.fromInt(0);if(h!=null)this.copyTo(h);return}if(h==null)h=yt();var _=yt(),z=this.s,C=o.s,w=this.DB-zh(y.data[y.t-1]);if(w>0)y.lShiftTo(w,_),x.lShiftTo(w,h);else y.copyTo(_),x.copyTo(h);var S=_.t,E=_.data[S-1];if(E==0)return;var k=E*(1<<this.F1)+(S>1?_.data[S-2]>>this.F2:0),O=this.FV/k,R=(1<<this.F1)/k,I=1<<this.F2,A=h.t,M=A-S,D=f==null?yt():f;if(_.dlShiftTo(M,D),h.compareTo(D)>=0)h.data[h.t++]=1,h.subTo(D,h);ue.ONE.dlShiftTo(S,D),D.subTo(_,_);while(_.t<S)_.data[_.t++]=0;while(--M>=0){var U=h.data[--A]==E?this.DM:Math.floor(h.data[A]*O+(h.data[A-1]+I)*R);if((h.data[A]+=_.am(0,U,h,M,0,S))<U){_.dlShiftTo(M,D),h.subTo(D,h);while(h.data[A]<--U)h.subTo(D,h)}}if(f!=null){if(h.drShiftTo(S,f),z!=C)ue.ZERO.subTo(f,f)}if(h.t=S,h.clamp(),w>0)h.rShiftTo(w,h);if(z<0)ue.ZERO.subTo(h,h)}function vxe(o){var f=yt();if(this.abs().divRemTo(o,null,f),this.s<0&&f.compareTo(ue.ZERO)>0)o.subTo(f,f);return f}function $s(o){this.m=o}function xxe(o){if(o.s<0||o.compareTo(this.m)>=0)return o.mod(this.m);else return o}function _xe(o){return o}function zxe(o){o.divRemTo(this.m,null,o)}function Cxe(o,f,h){o.multiplyTo(f,h),this.reduce(h)}function wxe(o,f){o.squareTo(f),this.reduce(f)}$s.prototype.convert=xxe;$s.prototype.revert=_xe;$s.prototype.reduce=zxe;$s.prototype.mulTo=Cxe;$s.prototype.sqrTo=wxe;function Sxe(){if(this.t<1)return 0;var o=this.data[0];if((o&1)==0)return 0;var f=o&3;return f=f*(2-(o&15)*f)&15,f=f*(2-(o&255)*f)&255,f=f*(2-((o&65535)*f&65535))&65535,f=f*(2-o*f%this.DV)%this.DV,f>0?this.DV-f:-f}function Gs(o){this.m=o,this.mp=o.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<o.DB-15)-1,this.mt2=2*o.t}function Txe(o){var f=yt();if(o.abs().dlShiftTo(this.m.t,f),f.divRemTo(this.m,null,f),o.s<0&&f.compareTo(ue.ZERO)>0)this.m.subTo(f,f);return f}function Exe(o){var f=yt();return o.copyTo(f),this.reduce(f),f}function kxe(o){while(o.t<=this.mt2)o.data[o.t++]=0;for(var f=0;f<this.m.t;++f){var h=o.data[f]&32767,y=h*this.mpl+((h*this.mph+(o.data[f]>>15)*this.mpl&this.um)<<15)&o.DM;h=f+this.m.t,o.data[h]+=this.m.am(0,y,o,f,0,this.m.t);while(o.data[h]>=o.DV)o.data[h]-=o.DV,o.data[++h]++}if(o.clamp(),o.drShiftTo(this.m.t,o),o.compareTo(this.m)>=0)o.subTo(this.m,o)}function Oxe(o,f){o.squareTo(f),this.reduce(f)}function Ixe(o,f,h){o.multiplyTo(f,h),this.reduce(h)}Gs.prototype.convert=Txe;Gs.prototype.revert=Exe;Gs.prototype.reduce=kxe;Gs.prototype.mulTo=Ixe;Gs.prototype.sqrTo=Oxe;function Rxe(){return(this.t>0?this.data[0]&1:this.s)==0}function Axe(o,f){if(o>4294967295||o<1)return ue.ONE;var h=yt(),y=yt(),x=f.convert(this),_=zh(o)-1;x.copyTo(h);while(--_>=0)if(f.sqrTo(h,y),(o&1<<_)>0)f.mulTo(y,x,h);else{var z=h;h=y,y=z}return f.revert(h)}function Pxe(o,f){var h;if(o<256||f.isEven())h=new $s(f);else h=new Gs(f);return this.exp(o,h)}ue.prototype.copyTo=rxe;ue.prototype.fromInt=oxe;ue.prototype.fromString=nxe;ue.prototype.clamp=ixe;ue.prototype.dlShiftTo=dxe;ue.prototype.drShiftTo=pxe;ue.prototype.lShiftTo=fxe;ue.prototype.rShiftTo=hxe;ue.prototype.subTo=mxe;ue.prototype.multiplyTo=gxe;ue.prototype.squareTo=yxe;ue.prototype.divRemTo=bxe;ue.prototype.invDigit=Sxe;ue.prototype.isEven=Rxe;ue.prototype.exp=Axe;ue.prototype.toString=sxe;ue.prototype.negate=axe;ue.prototype.abs=cxe;ue.prototype.compareTo=lxe;ue.prototype.bitLength=uxe;ue.prototype.mod=vxe;ue.prototype.modPowInt=Pxe;ue.ZERO=Fi(0);ue.ONE=Fi(1);function Bxe(){var o=yt();return this.copyTo(o),o}function Dxe(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;else if(this.t==0)return-1}else if(this.t==1)return this.data[0];else if(this.t==0)return 0;return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]}function Lxe(){return this.t==0?this.s:this.data[0]<<24>>24}function Nxe(){return this.t==0?this.s:this.data[0]<<16>>16}function jxe(o){return Math.floor(Math.LN2*this.DB/Math.log(o))}function Mxe(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this.data[0]<=0)return 0;else return 1}function qxe(o){if(o==null)o=10;if(this.signum()==0||o<2||o>36)return"0";var f=this.chunkSize(o),h=Math.pow(o,f),y=Fi(h),x=yt(),_=yt(),z="";this.divRemTo(y,x,_);while(x.signum()>0)z=(h+_.intValue()).toString(o).substr(1)+z,x.divRemTo(y,x,_);return _.intValue().toString(o)+z}function Fxe(o,f){if(this.fromInt(0),f==null)f=10;var h=this.chunkSize(f),y=Math.pow(f,h),x=!1,_=0,z=0;for(var C=0;C<o.length;++C){var w=d5(o,C);if(w<0){if(o.charAt(C)=="-"&&this.signum()==0)x=!0;continue}if(z=f*z+w,++_>=h)this.dMultiply(y),this.dAddOffset(z,0),_=0,z=0}if(_>0)this.dMultiply(Math.pow(f,_)),this.dAddOffset(z,0);if(x)ue.ZERO.subTo(this,this)}function Uxe(o,f,h){if(typeof f=="number")if(o<2)this.fromInt(1);else{if(this.fromNumber(o,h),!this.testBit(o-1))this.bitwiseTo(ue.ONE.shiftLeft(o-1),$x,this);if(this.isEven())this.dAddOffset(1,0);while(!this.isProbablePrime(f))if(this.dAddOffset(2,0),this.bitLength()>o)this.subTo(ue.ONE.shiftLeft(o-1),this)}else{var y=[],x=o&7;if(y.length=(o>>3)+1,f.nextBytes(y),x>0)y[0]&=(1<<x)-1;else y[0]=0;this.fromString(y,256)}}function $xe(){var o=this.t,f=[];f[0]=this.s;var h=this.DB-o*this.DB%8,y,x=0;if(o-- >0){if(h<this.DB&&(y=this.data[o]>>h)!=(this.s&this.DM)>>h)f[x++]=y|this.s<<this.DB-h;while(o>=0){if(h<8)y=(this.data[o]&(1<<h)-1)<<8-h,y|=this.data[--o]>>(h+=this.DB-8);else if(y=this.data[o]>>(h-=8)&255,h<=0)h+=this.DB,--o;if((y&128)!=0)y|=-256;if(x==0&&(this.s&128)!=(y&128))++x;if(x>0||y!=this.s)f[x++]=y}}return f}function Vxe(o){return this.compareTo(o)==0}function Hxe(o){return this.compareTo(o)<0?this:o}function Gxe(o){return this.compareTo(o)>0?this:o}function Kxe(o,f,h){var y,x,_=Math.min(o.t,this.t);for(y=0;y<_;++y)h.data[y]=f(this.data[y],o.data[y]);if(o.t<this.t){x=o.s&this.DM;for(y=_;y<this.t;++y)h.data[y]=f(this.data[y],x);h.t=this.t}else{x=this.s&this.DM;for(y=_;y<o.t;++y)h.data[y]=f(x,o.data[y]);h.t=o.t}h.s=f(this.s,o.s),h.clamp()}function Wxe(o,f){return o&f}function Jxe(o){var f=yt();return this.bitwiseTo(o,Wxe,f),f}function $x(o,f){return o|f}function Zxe(o){var f=yt();return this.bitwiseTo(o,$x,f),f}function p5(o,f){return o^f}function Yxe(o){var f=yt();return this.bitwiseTo(o,p5,f),f}function f5(o,f){return o&~f}function Xxe(o){var f=yt();return this.bitwiseTo(o,f5,f),f}function Qxe(){var o=yt();for(var f=0;f<this.t;++f)o.data[f]=this.DM&~this.data[f];return o.t=this.t,o.s=~this.s,o}function e_e(o){var f=yt();if(o<0)this.rShiftTo(-o,f);else this.lShiftTo(o,f);return f}function t_e(o){var f=yt();if(o<0)this.lShiftTo(-o,f);else this.rShiftTo(o,f);return f}function r_e(o){if(o==0)return-1;var f=0;if((o&65535)==0)o>>=16,f+=16;if((o&255)==0)o>>=8,f+=8;if((o&15)==0)o>>=4,f+=4;if((o&3)==0)o>>=2,f+=2;if((o&1)==0)++f;return f}function o_e(){for(var o=0;o<this.t;++o)if(this.data[o]!=0)return o*this.DB+r_e(this.data[o]);if(this.s<0)return this.t*this.DB;return-1}function n_e(o){var f=0;while(o!=0)o&=o-1,++f;return f}function i_e(){var o=0,f=this.s&this.DM;for(var h=0;h<this.t;++h)o+=n_e(this.data[h]^f);return o}function s_e(o){var f=Math.floor(o/this.DB);if(f>=this.t)return this.s!=0;return(this.data[f]&1<<o%this.DB)!=0}function a_e(o,f){var h=ue.ONE.shiftLeft(o);return this.bitwiseTo(h,f,h),h}function c_e(o){return this.changeBit(o,$x)}function l_e(o){return this.changeBit(o,f5)}function u_e(o){return this.changeBit(o,p5)}function d_e(o,f){var h=0,y=0,x=Math.min(o.t,this.t);while(h<x)y+=this.data[h]+o.data[h],f.data[h++]=y&this.DM,y>>=this.DB;if(o.t<this.t){y+=o.s;while(h<this.t)y+=this.data[h],f.data[h++]=y&this.DM,y>>=this.DB;y+=this.s}else{y+=this.s;while(h<o.t)y+=o.data[h],f.data[h++]=y&this.DM,y>>=this.DB;y+=o.s}if(f.s=y<0?-1:0,y>0)f.data[h++]=y;else if(y<-1)f.data[h++]=this.DV+y;f.t=h,f.clamp()}function p_e(o){var f=yt();return this.addTo(o,f),f}function f_e(o){var f=yt();return this.subTo(o,f),f}function h_e(o){var f=yt();return this.multiplyTo(o,f),f}function m_e(){var o=yt();return this.squareTo(o),o}function g_e(o){var f=yt();return this.divRemTo(o,f,null),f}function y_e(o){var f=yt();return this.divRemTo(o,null,f),f}function b_e(o){var f=yt(),h=yt();return this.divRemTo(o,f,h),[f,h]}function v_e(o){this.data[this.t]=this.am(0,o-1,this,0,0,this.t),++this.t,this.clamp()}function x_e(o,f){if(o==0)return;while(this.t<=f)this.data[this.t++]=0;this.data[f]+=o;while(this.data[f]>=this.DV){if(this.data[f]-=this.DV,++f>=this.t)this.data[this.t++]=0;++this.data[f]}}function Nu(){}function h5(o){return o}function __e(o,f,h){o.multiplyTo(f,h)}function z_e(o,f){o.squareTo(f)}Nu.prototype.convert=h5;Nu.prototype.revert=h5;Nu.prototype.mulTo=__e;Nu.prototype.sqrTo=z_e;function C_e(o){return this.exp(o,new Nu)}function w_e(o,f,h){var y=Math.min(this.t+o.t,f);h.s=0,h.t=y;while(y>0)h.data[--y]=0;var x;for(x=h.t-this.t;y<x;++y)h.data[y+this.t]=this.am(0,o.data[y],h,y,0,this.t);for(x=Math.min(o.t,f);y<x;++y)this.am(0,o.data[y],h,y,0,f-y);h.clamp()}function S_e(o,f,h){--f;var y=h.t=this.t+o.t-f;h.s=0;while(--y>=0)h.data[y]=0;for(y=Math.max(f-this.t,0);y<o.t;++y)h.data[this.t+y-f]=this.am(f-y,o.data[y],h,0,0,this.t+y-f);h.clamp(),h.drShiftTo(1,h)}function pc(o){this.r2=yt(),this.q3=yt(),ue.ONE.dlShiftTo(2*o.t,this.r2),this.mu=this.r2.divide(o),this.m=o}function T_e(o){if(o.s<0||o.t>2*this.m.t)return o.mod(this.m);else if(o.compareTo(this.m)<0)return o;else{var f=yt();return o.copyTo(f),this.reduce(f),f}}function E_e(o){return o}function k_e(o){if(o.drShiftTo(this.m.t-1,this.r2),o.t>this.m.t+1)o.t=this.m.t+1,o.clamp();this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while(o.compareTo(this.r2)<0)o.dAddOffset(1,this.m.t+1);o.subTo(this.r2,o);while(o.compareTo(this.m)>=0)o.subTo(this.m,o)}function O_e(o,f){o.squareTo(f),this.reduce(f)}function I_e(o,f,h){o.multiplyTo(f,h),this.reduce(h)}pc.prototype.convert=T_e;pc.prototype.revert=E_e;pc.prototype.reduce=k_e;pc.prototype.mulTo=I_e;pc.prototype.sqrTo=O_e;function R_e(o,f){var h=o.bitLength(),y,x=Fi(1),_;if(h<=0)return x;else if(h<18)y=1;else if(h<48)y=3;else if(h<144)y=4;else if(h<768)y=5;else y=6;if(h<8)_=new $s(f);else if(f.isEven())_=new pc(f);else _=new Gs(f);var z=[],C=3,w=y-1,S=(1<<y)-1;if(z[1]=_.convert(this),y>1){var E=yt();_.sqrTo(z[1],E);while(C<=S)z[C]=yt(),_.mulTo(E,z[C-2],z[C]),C+=2}var k=o.t-1,O,R=!0,I=yt(),A;h=zh(o.data[k])-1;while(k>=0){if(h>=w)O=o.data[k]>>h-w&S;else if(O=(o.data[k]&(1<<h+1)-1)<<w-h,k>0)O|=o.data[k-1]>>this.DB+h-w;C=y;while((O&1)==0)O>>=1,--C;if((h-=C)<0)h+=this.DB,--k;if(R)z[O].copyTo(x),R=!1;else{while(C>1)_.sqrTo(x,I),_.sqrTo(I,x),C-=2;if(C>0)_.sqrTo(x,I);else A=x,x=I,I=A;_.mulTo(I,z[O],x)}while(k>=0&&(o.data[k]&1<<h)==0)if(_.sqrTo(x,I),A=x,x=I,I=A,--h<0)h=this.DB-1,--k}return _.revert(x)}function A_e(o){var f=this.s<0?this.negate():this.clone(),h=o.s<0?o.negate():o.clone();if(f.compareTo(h)<0){var y=f;f=h,h=y}var x=f.getLowestSetBit(),_=h.getLowestSetBit();if(_<0)return f;if(x<_)_=x;if(_>0)f.rShiftTo(_,f),h.rShiftTo(_,h);while(f.signum()>0){if((x=f.getLowestSetBit())>0)f.rShiftTo(x,f);if((x=h.getLowestSetBit())>0)h.rShiftTo(x,h);if(f.compareTo(h)>=0)f.subTo(h,f),f.rShiftTo(1,f);else h.subTo(f,h),h.rShiftTo(1,h)}if(_>0)h.lShiftTo(_,h);return h}function P_e(o){if(o<=0)return 0;var f=this.DV%o,h=this.s<0?o-1:0;if(this.t>0)if(f==0)h=this.data[0]%o;else for(var y=this.t-1;y>=0;--y)h=(f*h+this.data[y])%o;return h}function B_e(o){if(this.signum()==0)return ue.ZERO;var f=o.isEven();if(this.isEven()&&f||o.signum()==0)return ue.ZERO;var h=o.clone(),y=this.clone(),x=Fi(1),_=Fi(0),z=Fi(0),C=Fi(1);while(h.signum()!=0){while(h.isEven()){if(h.rShiftTo(1,h),f){if(!x.isEven()||!_.isEven())x.addTo(this,x),_.subTo(o,_);x.rShiftTo(1,x)}else if(!_.isEven())_.subTo(o,_);_.rShiftTo(1,_)}while(y.isEven()){if(y.rShiftTo(1,y),f){if(!z.isEven()||!C.isEven())z.addTo(this,z),C.subTo(o,C);z.rShiftTo(1,z)}else if(!C.isEven())C.subTo(o,C);C.rShiftTo(1,C)}if(h.compareTo(y)>=0){if(h.subTo(y,h),f)x.subTo(z,x);_.subTo(C,_)}else{if(y.subTo(h,y),f)z.subTo(x,z);C.subTo(_,C)}}if(y.compareTo(ue.ONE)!=0)return ue.ZERO;if(C.compareTo(o)>=0)return C.subtract(o);if(C.signum()<0)C.addTo(o,C);else return C;if(C.signum()<0)return C.add(o);else return C}var vn=[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],D_e=67108864/vn[vn.length-1];function L_e(o){var f,h=this.abs();if(h.t==1&&h.data[0]<=vn[vn.length-1]){for(f=0;f<vn.length;++f)if(h.data[0]==vn[f])return!0;return!1}if(h.isEven())return!1;f=1;while(f<vn.length){var y=vn[f],x=f+1;while(x<vn.length&&y<D_e)y*=vn[x++];y=h.modInt(y);while(f<x)if(y%vn[f++]==0)return!1}return h.millerRabin(o)}function N_e(o){var f=this.subtract(ue.ONE),h=f.getLowestSetBit();if(h<=0)return!1;var y=f.shiftRight(h),x=j_e(),_;for(var z=0;z<o;++z){do _=new ue(this.bitLength(),x);while(_.compareTo(ue.ONE)<=0||_.compareTo(f)>=0);var C=_.modPow(y,this);if(C.compareTo(ue.ONE)!=0&&C.compareTo(f)!=0){var w=1;while(w++<h&&C.compareTo(f)!=0)if(C=C.modPowInt(2,this),C.compareTo(ue.ONE)==0)return!1;if(C.compareTo(f)!=0)return!1}}return!0}function j_e(){return{nextBytes:function(o){for(var f=0;f<o.length;++f)o[f]=Math.floor(Math.random()*256)}}}ue.prototype.chunkSize=jxe;ue.prototype.toRadix=qxe;ue.prototype.fromRadix=Fxe;ue.prototype.fromNumber=Uxe;ue.prototype.bitwiseTo=Kxe;ue.prototype.changeBit=a_e;ue.prototype.addTo=d_e;ue.prototype.dMultiply=v_e;ue.prototype.dAddOffset=x_e;ue.prototype.multiplyLowerTo=w_e;ue.prototype.multiplyUpperTo=S_e;ue.prototype.modInt=P_e;ue.prototype.millerRabin=N_e;ue.prototype.clone=Bxe;ue.prototype.intValue=Dxe;ue.prototype.byteValue=Lxe;ue.prototype.shortValue=Nxe;ue.prototype.signum=Mxe;ue.prototype.toByteArray=$xe;ue.prototype.equals=Vxe;ue.prototype.min=Hxe;ue.prototype.max=Gxe;ue.prototype.and=Jxe;ue.prototype.or=Zxe;ue.prototype.xor=Yxe;ue.prototype.andNot=Xxe;ue.prototype.not=Qxe;ue.prototype.shiftLeft=e_e;ue.prototype.shiftRight=t_e;ue.prototype.getLowestSetBit=o_e;ue.prototype.bitCount=i_e;ue.prototype.testBit=s_e;ue.prototype.setBit=c_e;ue.prototype.clearBit=l_e;ue.prototype.flipBit=u_e;ue.prototype.add=p_e;ue.prototype.subtract=f_e;ue.prototype.multiply=h_e;ue.prototype.divide=g_e;ue.prototype.remainder=y_e;ue.prototype.divideAndRemainder=b_e;ue.prototype.modPow=R_e;ue.prototype.modInverse=B_e;ue.prototype.pow=C_e;ue.prototype.gcd=A_e;ue.prototype.isProbablePrime=L_e;ue.prototype.square=m_e});var fc=i(function(nLe,v5){var qn=Xe();Dn();zt();var y5=v5.exports=qn.sha1=qn.sha1||{};qn.md.sha1=qn.md.algorithms.sha1=y5;y5.create=function(){if(!b5)M_e();var o=null,f=qn.util.createBuffer(),h=Array(80),y={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return y.start=function(){y.messageLength=0,y.fullMessageLength=y.messageLength64=[];var x=y.messageLengthSize/4;for(var _=0;_<x;++_)y.fullMessageLength.push(0);return f=qn.util.createBuffer(),o={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},y},y.start(),y.update=function(x,_){if(_==="utf8")x=qn.util.encodeUtf8(x);var z=x.length;y.messageLength+=z,z=[z/4294967296>>>0,z>>>0];for(var C=y.fullMessageLength.length-1;C>=0;--C)y.fullMessageLength[C]+=z[1],z[1]=z[0]+(y.fullMessageLength[C]/4294967296>>>0),y.fullMessageLength[C]=y.fullMessageLength[C]>>>0,z[0]=z[1]/4294967296>>>0;if(f.putBytes(x),g5(o,h,f),f.read>2048||f.length()===0)f.compact();return y},y.digest=function(){var x=qn.util.createBuffer();x.putBytes(f.bytes());var _=y.fullMessageLength[y.fullMessageLength.length-1]+y.messageLengthSize,z=_&y.blockLength-1;x.putBytes(Vx.substr(0,y.blockLength-z));var C,w,S=y.fullMessageLength[0]*8;for(var E=0;E<y.fullMessageLength.length-1;++E)C=y.fullMessageLength[E+1]*8,w=C/4294967296>>>0,S+=w,x.putInt32(S>>>0),S=C>>>0;x.putInt32(S);var k={h0:o.h0,h1:o.h1,h2:o.h2,h3:o.h3,h4:o.h4};g5(k,h,x);var O=qn.util.createBuffer();return O.putInt32(k.h0),O.putInt32(k.h1),O.putInt32(k.h2),O.putInt32(k.h3),O.putInt32(k.h4),O},y};var Vx=null,b5=!1;function M_e(){Vx=String.fromCharCode(128),Vx+=qn.util.fillString(String.fromCharCode(0),64),b5=!0}function g5(o,f,h){var y,x,_,z,C,w,S,E,k=h.length();while(k>=64){x=o.h0,_=o.h1,z=o.h2,C=o.h3,w=o.h4;for(E=0;E<16;++E)y=h.getInt32(),f[E]=y,S=C^_&(z^C),y=(x<<5|x>>>27)+S+w+1518500249+y,w=C,C=z,z=(_<<30|_>>>2)>>>0,_=x,x=y;for(;E<20;++E)y=f[E-3]^f[E-8]^f[E-14]^f[E-16],y=y<<1|y>>>31,f[E]=y,S=C^_&(z^C),y=(x<<5|x>>>27)+S+w+1518500249+y,w=C,C=z,z=(_<<30|_>>>2)>>>0,_=x,x=y;for(;E<32;++E)y=f[E-3]^f[E-8]^f[E-14]^f[E-16],y=y<<1|y>>>31,f[E]=y,S=_^z^C,y=(x<<5|x>>>27)+S+w+1859775393+y,w=C,C=z,z=(_<<30|_>>>2)>>>0,_=x,x=y;for(;E<40;++E)y=f[E-6]^f[E-16]^f[E-28]^f[E-32],y=y<<2|y>>>30,f[E]=y,S=_^z^C,y=(x<<5|x>>>27)+S+w+1859775393+y,w=C,C=z,z=(_<<30|_>>>2)>>>0,_=x,x=y;for(;E<60;++E)y=f[E-6]^f[E-16]^f[E-28]^f[E-32],y=y<<2|y>>>30,f[E]=y,S=_&z|C&(_^z),y=(x<<5|x>>>27)+S+w+2400959708+y,w=C,C=z,z=(_<<30|_>>>2)>>>0,_=x,x=y;for(;E<80;++E)y=f[E-6]^f[E-16]^f[E-28]^f[E-32],y=y<<2|y>>>30,f[E]=y,S=_^z^C,y=(x<<5|x>>>27)+S+w+3395469782+y,w=C,C=z,z=(_<<30|_>>>2)>>>0,_=x,x=y;o.h0=o.h0+x|0,o.h1=o.h1+_|0,o.h2=o.h2+z|0,o.h3=o.h3+C|0,o.h4=o.h4+w|0,k-=64}}});var Hx=i(function(iLe,_5){var Fn=Xe();zt();Ho();fc();var x5=_5.exports=Fn.pkcs1=Fn.pkcs1||{};x5.encode_rsa_oaep=function(o,f,h){var y,x,_,z;if(typeof h==="string")y=h,x=arguments[3]||void 0,_=arguments[4]||void 0;else if(h){if(y=h.label||void 0,x=h.seed||void 0,_=h.md||void 0,h.mgf1&&h.mgf1.md)z=h.mgf1.md}if(!_)_=Fn.md.sha1.create();else _.start();if(!z)z=_;var C=Math.ceil(o.n.bitLength()/8),w=C-2*_.digestLength-2;if(f.length>w){var S=Error("RSAES-OAEP input message length is too long.");throw S.length=f.length,S.maxLength=w,S}if(!y)y="";_.update(y,"raw");var E=_.digest(),k="",O=w-f.length;for(var R=0;R<O;R++)k+="\x00";var I=E.getBytes()+k+"\x01"+f;if(!x)x=Fn.random.getBytes(_.digestLength);else if(x.length!==_.digestLength){var S=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw S.seedLength=x.length,S.digestLength=_.digestLength,S}var A=Ch(x,C-_.digestLength-1,z),M=Fn.util.xorBytes(I,A,I.length),D=Ch(M,_.digestLength,z),U=Fn.util.xorBytes(x,D,x.length);return"\x00"+U+M};x5.decode_rsa_oaep=function(o,f,h){var y,x,_;if(typeof h==="string")y=h,x=arguments[3]||void 0;else if(h){if(y=h.label||void 0,x=h.md||void 0,h.mgf1&&h.mgf1.md)_=h.mgf1.md}var z=Math.ceil(o.n.bitLength()/8);if(f.length!==z){var M=Error("RSAES-OAEP encoded message length is invalid.");throw M.length=f.length,M.expectedLength=z,M}if(x===void 0)x=Fn.md.sha1.create();else x.start();if(!_)_=x;if(z<2*x.digestLength+2)throw Error("RSAES-OAEP key is too short for the hash function.");if(!y)y="";x.update(y,"raw");var C=x.digest().getBytes(),w=f.charAt(0),S=f.substring(1,x.digestLength+1),E=f.substring(1+x.digestLength),k=Ch(E,x.digestLength,_),O=Fn.util.xorBytes(S,k,S.length),R=Ch(O,z-x.digestLength-1,_),I=Fn.util.xorBytes(E,R,E.length),A=I.substring(0,x.digestLength),M=w!=="\x00";for(var D=0;D<x.digestLength;++D)M|=C.charAt(D)!==A.charAt(D);var U=1,F=x.digestLength;for(var J=x.digestLength;J<I.length;J++){var Q=I.charCodeAt(J),te=Q&1^1,le=U?65534:0;M|=Q&le,U=U&te,F+=U}if(M||I.charCodeAt(F)!==1)throw Error("Invalid RSAES-OAEP padding.");return I.substring(F+1)};function Ch(o,f,h){if(!h)h=Fn.md.sha1.create();var y="",x=Math.ceil(f/h.digestLength);for(var _=0;_<x;++_){var z=String.fromCharCode(_>>24&255,_>>16&255,_>>8&255,_&255);h.start(),h.update(o+z),y+=h.digest().getBytes()}return y.substring(0,f)}});var Kx=i(function(sLe,Gx){var Ui=Xe();zt();ju();Ho();(function(){if(Ui.prime){Gx.exports=Ui.prime;return}var o=Gx.exports=Ui.prime=Ui.prime||{},f=Ui.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],y=new f(null);y.fromInt(30);var x=function(k,O){return k|O};o.generateProbablePrime=function(k,O,R){if(typeof O==="function")R=O,O={};O=O||{};var I=O.algorithm||"PRIMEINC";if(typeof I==="string")I={name:I};I.options=I.options||{};var A=O.prng||Ui.random,M={nextBytes:function(D){var U=A.getBytesSync(D.length);for(var F=0;F<D.length;++F)D[F]=U.charCodeAt(F)}};if(I.name==="PRIMEINC")return _(k,M,I.options,R);throw Error("Invalid prime generation algorithm: "+I.name)};function _(k,O,R,I){if("workers"in R)return w(k,O,R,I);return z(k,O,R,I)}function z(k,O,R,I){var A=S(k,O),M=0,D=E(A.bitLength());if("millerRabinTests"in R)D=R.millerRabinTests;var U=10;if("maxBlockTime"in R)U=R.maxBlockTime;C(A,k,O,M,D,U,I)}function C(k,O,R,I,A,M,D){var U=+new Date;do{if(k.bitLength()>O)k=S(O,R);if(k.isProbablePrime(A))return D(null,k);k.dAddOffset(h[I++%8],0)}while(M<0||+new Date-U<M);Ui.util.setImmediate(function(){C(k,O,R,I,A,M,D)})}function w(k,O,R,I){if(typeof Worker>"u")return z(k,O,R,I);var A=S(k,O),M=R.workers,D=R.workLoad||100,U=D*30/8,F=R.workerScript||"forge/prime.worker.js";if(M===-1)return Ui.util.estimateCores(function(Q,te){if(Q)te=2;M=te-1,J()});J();function J(){M=Math.max(1,M);var Q=[];for(var te=0;te<M;++te)Q[te]=new Worker(F);var le=M;for(var te=0;te<M;++te)Q[te].addEventListener("message",xe);var he=!1;function xe(Re){if(he)return;--le;var me=Re.data;if(me.found){for(var Ae=0;Ae<Q.length;++Ae)Q[Ae].terminate();return he=!0,I(null,new f(me.prime,16))}if(A.bitLength()>k)A=S(k,O);var We=A.toString(16);Re.target.postMessage({hex:We,workLoad:D}),A.dAddOffset(U,0)}}}function S(k,O){var R=new f(k,O),I=k-1;if(!R.testBit(I))R.bitwiseTo(f.ONE.shiftLeft(I),x,R);return R.dAddOffset(31-R.mod(y).byteValue(),0),R}function E(k){if(k<=100)return 27;if(k<=150)return 18;if(k<=200)return 15;if(k<=250)return 12;if(k<=300)return 9;if(k<=350)return 8;if(k<=400)return 7;if(k<=500)return 6;if(k<=600)return 5;if(k<=800)return 4;if(k<=1250)return 3;return 2}})()});var Mu=i(function(aLe,k5){var je=Xe();bn();ju();qi();Hx();Kx();Ho();zt();if(typeof ft>"u")ft=je.jsbn.BigInteger;var ft,Wx=je.util.isNodejs?c("crypto"):null,{asn1:ee,util:Ko}=je;je.pki=je.pki||{};k5.exports=je.pki.rsa=je.rsa=je.rsa||{};var Ze=je.pki,q_e=[6,4,2,4,2,4,6,2],F_e={name:"PrivateKeyInfo",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:ee.Class.UNIVERSAL,type:ee.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},U_e={name:"RSAPrivateKey",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:ee.Class.UNIVERSAL,type:ee.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:ee.Class.UNIVERSAL,type:ee.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:ee.Class.UNIVERSAL,type:ee.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:ee.Class.UNIVERSAL,type:ee.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:ee.Class.UNIVERSAL,type:ee.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:ee.Class.UNIVERSAL,type:ee.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:ee.Class.UNIVERSAL,type:ee.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:ee.Class.UNIVERSAL,type:ee.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:ee.Class.UNIVERSAL,type:ee.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},$_e={name:"RSAPublicKey",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:ee.Class.UNIVERSAL,type:ee.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:ee.Class.UNIVERSAL,type:ee.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},V_e=je.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:ee.Class.UNIVERSAL,type:ee.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},H_e={name:"DigestInfo",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:ee.Class.UNIVERSAL,type:ee.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},G_e=function(o){var f;if(o.algorithm in Ze.oids)f=Ze.oids[o.algorithm];else{var h=Error("Unknown message digest algorithm.");throw h.algorithm=o.algorithm,h}var y=ee.oidToDer(f).getBytes(),x=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[]),_=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[]);_.value.push(ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,y)),_.value.push(ee.create(ee.Class.UNIVERSAL,ee.Type.NULL,!1,""));var z=ee.create(ee.Class.UNIVERSAL,ee.Type.OCTETSTRING,!1,o.digest().getBytes());return x.value.push(_),x.value.push(z),ee.toDer(x).getBytes()},T5=function(o,f,h){if(h)return o.modPow(f.e,f.n);if(!f.p||!f.q)return o.modPow(f.d,f.n);if(!f.dP)f.dP=f.d.mod(f.p.subtract(ft.ONE));if(!f.dQ)f.dQ=f.d.mod(f.q.subtract(ft.ONE));if(!f.qInv)f.qInv=f.q.modInverse(f.p);var y;do y=new ft(je.util.bytesToHex(je.random.getBytes(f.n.bitLength()/8)),16);while(y.compareTo(f.n)>=0||!y.gcd(f.n).equals(ft.ONE));o=o.multiply(y.modPow(f.e,f.n)).mod(f.n);var x=o.mod(f.p).modPow(f.dP,f.p),_=o.mod(f.q).modPow(f.dQ,f.q);while(x.compareTo(_)<0)x=x.add(f.p);var z=x.subtract(_).multiply(f.qInv).mod(f.p).multiply(f.q).add(_);return z=z.multiply(y.modInverse(f.n)).mod(f.n),z};Ze.rsa.encrypt=function(o,f,h){var y=h,x,_=Math.ceil(f.n.bitLength()/8);if(h!==!1&&h!==!0)y=h===2,x=E5(o,f,h);else x=je.util.createBuffer(),x.putBytes(o);var z=new ft(x.toHex(),16),C=T5(z,f,y),w=C.toString(16),S=je.util.createBuffer(),E=_-Math.ceil(w.length/2);while(E>0)S.putByte(0),--E;return S.putBytes(je.util.hexToBytes(w)),S.getBytes()};Ze.rsa.decrypt=function(o,f,h,y){var x=Math.ceil(f.n.bitLength()/8);if(o.length!==x){var _=Error("Encrypted message length is invalid.");throw _.length=o.length,_.expected=x,_}var z=new ft(je.util.createBuffer(o).toHex(),16);if(z.compareTo(f.n)>=0)throw Error("Encrypted message is invalid.");var C=T5(z,f,h),w=C.toString(16),S=je.util.createBuffer(),E=x-Math.ceil(w.length/2);while(E>0)S.putByte(0),--E;if(S.putBytes(je.util.hexToBytes(w)),y!==!1)return wh(S.getBytes(),f,h);return S.getBytes()};Ze.rsa.createKeyPairGenerationState=function(o,f,h){if(typeof o==="string")o=parseInt(o,10);o=o||2048,h=h||{};var y=h.prng||je.random,x={nextBytes:function(C){var w=y.getBytesSync(C.length);for(var S=0;S<C.length;++S)C[S]=w.charCodeAt(S)}},_=h.algorithm||"PRIMEINC",z;if(_==="PRIMEINC")z={algorithm:_,state:0,bits:o,rng:x,eInt:f||65537,e:new ft(null),p:null,q:null,qBits:o>>1,pBits:o-(o>>1),pqState:0,num:null,keys:null},z.e.fromInt(z.eInt);else throw Error("Invalid key generation algorithm: "+_);return z};Ze.rsa.stepKeyPairGenerationState=function(o,f){if(!("algorithm"in o))o.algorithm="PRIMEINC";var h=new ft(null);h.fromInt(30);var y=0,x=function(k,O){return k|O},_=+new Date,z,C=0;while(o.keys===null&&(f<=0||C<f)){if(o.state===0){var w=o.p===null?o.pBits:o.qBits,S=w-1;if(o.pqState===0){if(o.num=new ft(w,o.rng),!o.num.testBit(S))o.num.bitwiseTo(ft.ONE.shiftLeft(S),x,o.num);o.num.dAddOffset(31-o.num.mod(h).byteValue(),0),y=0,++o.pqState}else if(o.pqState===1)if(o.num.bitLength()>w)o.pqState=0;else if(o.num.isProbablePrime(W_e(o.num.bitLength())))++o.pqState;else o.num.dAddOffset(q_e[y++%8],0);else if(o.pqState===2)o.pqState=o.num.subtract(ft.ONE).gcd(o.e).compareTo(ft.ONE)===0?3:0;else if(o.pqState===3){if(o.pqState=0,o.p===null)o.p=o.num;else o.q=o.num;if(o.p!==null&&o.q!==null)++o.state;o.num=null}}else if(o.state===1){if(o.p.compareTo(o.q)<0)o.num=o.p,o.p=o.q,o.q=o.num;++o.state}else if(o.state===2)o.p1=o.p.subtract(ft.ONE),o.q1=o.q.subtract(ft.ONE),o.phi=o.p1.multiply(o.q1),++o.state;else if(o.state===3)if(o.phi.gcd(o.e).compareTo(ft.ONE)===0)++o.state;else o.p=null,o.q=null,o.state=0;else if(o.state===4)if(o.n=o.p.multiply(o.q),o.n.bitLength()===o.bits)++o.state;else o.q=null,o.state=0;else if(o.state===5){var E=o.e.modInverse(o.phi);o.keys={privateKey:Ze.rsa.setPrivateKey(o.n,o.e,E,o.p,o.q,E.mod(o.p1),E.mod(o.q1),o.q.modInverse(o.p)),publicKey:Ze.rsa.setPublicKey(o.n,o.e)}}z=+new Date,C+=z-_,_=z}return o.keys!==null};Ze.rsa.generateKeyPair=function(o,f,h,y){if(arguments.length===1){if(typeof o==="object")h=o,o=void 0;else if(typeof o==="function")y=o,o=void 0}else if(arguments.length===2)if(typeof o==="number"){if(typeof f==="function")y=f,f=void 0;else if(typeof f!=="number")h=f,f=void 0}else h=o,y=f,o=void 0,f=void 0;else if(arguments.length===3)if(typeof f==="number"){if(typeof h==="function")y=h,h=void 0}else y=h,h=f,f=void 0;if(h=h||{},o===void 0)o=h.bits||2048;if(f===void 0)f=h.e||65537;if(!je.options.usePureJavaScript&&!h.prng&&o>=256&&o<=16384&&(f===65537||f===3)){if(y){if(z5("generateKeyPair"))return Wx.generateKeyPair("rsa",{modulusLength:o,publicExponent:f,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(C,w,S){if(C)return y(C);y(null,{privateKey:Ze.privateKeyFromPem(S),publicKey:Ze.publicKeyFromPem(w)})});if(C5("generateKey")&&C5("exportKey"))return Ko.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:o,publicExponent:S5(f),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(C){return Ko.globalScope.crypto.subtle.exportKey("pkcs8",C.privateKey)}).then(void 0,function(C){y(C)}).then(function(C){if(C){var w=Ze.privateKeyFromAsn1(ee.fromDer(je.util.createBuffer(C)));y(null,{privateKey:w,publicKey:Ze.setRsaPublicKey(w.n,w.e)})}});if(w5("generateKey")&&w5("exportKey")){var x=Ko.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:o,publicExponent:S5(f),hash:{name:"SHA-256"}},!0,["sign","verify"]);x.oncomplete=function(C){var w=C.target.result,S=Ko.globalScope.msCrypto.subtle.exportKey("pkcs8",w.privateKey);S.oncomplete=function(E){var k=E.target.result,O=Ze.privateKeyFromAsn1(ee.fromDer(je.util.createBuffer(k)));y(null,{privateKey:O,publicKey:Ze.setRsaPublicKey(O.n,O.e)})},S.onerror=function(E){y(E)}},x.onerror=function(C){y(C)};return}}else if(z5("generateKeyPairSync")){var _=Wx.generateKeyPairSync("rsa",{modulusLength:o,publicExponent:f,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:Ze.privateKeyFromPem(_.privateKey),publicKey:Ze.publicKeyFromPem(_.publicKey)}}}var z=Ze.rsa.createKeyPairGenerationState(o,f,h);if(!y)return Ze.rsa.stepKeyPairGenerationState(z,0),z.keys;K_e(z,h,y)};Ze.setRsaPublicKey=Ze.rsa.setPublicKey=function(o,f){var h={n:o,e:f};return h.encrypt=function(y,x,_){if(typeof x==="string")x=x.toUpperCase();else if(x===void 0)x="RSAES-PKCS1-V1_5";if(x==="RSAES-PKCS1-V1_5")x={encode:function(C,w,S){return E5(C,w,2).getBytes()}};else if(x==="RSA-OAEP"||x==="RSAES-OAEP")x={encode:function(C,w){return je.pkcs1.encode_rsa_oaep(w,C,_)}};else if(["RAW","NONE","NULL",null].indexOf(x)!==-1)x={encode:function(C){return C}};else if(typeof x==="string")throw Error('Unsupported encryption scheme: "'+x+'".');var z=x.encode(y,h,!0);return Ze.rsa.encrypt(z,h,!0)},h.verify=function(y,x,_,z){if(typeof _==="string")_=_.toUpperCase();else if(_===void 0)_="RSASSA-PKCS1-V1_5";if(z===void 0)z={_parseAllDigestBytes:!0,_skipPaddingChecks:!1};if(!("_parseAllDigestBytes"in z))z._parseAllDigestBytes=!0;if(!("_skipPaddingChecks"in z))z._skipPaddingChecks=!1;if(_==="RSASSA-PKCS1-V1_5")_={verify:function(w,S){S=wh(S,h,!0,void 0,z);var E=ee.fromDer(S,{parseAllBytes:z._parseAllDigestBytes}),k={},O=[];if(!ee.validate(E,H_e,k,O)||E.value.length!==2){var R=Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw R.errors=O,R}var I=ee.derToOid(k.algorithmIdentifier);if(!(I===je.oids.md2||I===je.oids.md5||I===je.oids.sha1||I===je.oids.sha224||I===je.oids.sha256||I===je.oids.sha384||I===je.oids.sha512||I===je.oids["sha512-224"]||I===je.oids["sha512-256"])){var R=Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw R.oid=I,R}if(I===je.oids.md2||I===je.oids.md5){if(!("parameters"in k))throw Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifier NULL parameters.")}return w===k.digest}};else if(_==="NONE"||_==="NULL"||_===null)_={verify:function(w,S){return S=wh(S,h,!0,void 0,z),w===S}};var C=Ze.rsa.decrypt(x,h,!0,!1);return _.verify(y,C,h.n.bitLength())},h};Ze.setRsaPrivateKey=Ze.rsa.setPrivateKey=function(o,f,h,y,x,_,z,C){var w={n:o,e:f,d:h,p:y,q:x,dP:_,dQ:z,qInv:C};return w.decrypt=function(S,E,k){if(typeof E==="string")E=E.toUpperCase();else if(E===void 0)E="RSAES-PKCS1-V1_5";var O=Ze.rsa.decrypt(S,w,!1,!1);if(E==="RSAES-PKCS1-V1_5")E={decode:wh};else if(E==="RSA-OAEP"||E==="RSAES-OAEP")E={decode:function(R,I){return je.pkcs1.decode_rsa_oaep(I,R,k)}};else if(["RAW","NONE","NULL",null].indexOf(E)!==-1)E={decode:function(R){return R}};else throw Error('Unsupported encryption scheme: "'+E+'".');return E.decode(O,w,!1)},w.sign=function(S,E){var k=!1;if(typeof E==="string")E=E.toUpperCase();if(E===void 0||E==="RSASSA-PKCS1-V1_5")E={encode:G_e},k=1;else if(E==="NONE"||E==="NULL"||E===null)E={encode:function(){return S}},k=1;var O=E.encode(S,w.n.bitLength());return Ze.rsa.encrypt(O,w,k)},w};Ze.wrapRsaPrivateKey=function(o){return ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,ee.integerToDer(0).getBytes()),ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(Ze.oids.rsaEncryption).getBytes()),ee.create(ee.Class.UNIVERSAL,ee.Type.NULL,!1,"")]),ee.create(ee.Class.UNIVERSAL,ee.Type.OCTETSTRING,!1,ee.toDer(o).getBytes())])};Ze.privateKeyFromAsn1=function(o){var f={},h=[];if(ee.validate(o,F_e,f,h))o=ee.fromDer(je.util.createBuffer(f.privateKey));if(f={},h=[],!ee.validate(o,U_e,f,h)){var y=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw y.errors=h,y}var x,_,z,C,w,S,E,k;return x=je.util.createBuffer(f.privateKeyModulus).toHex(),_=je.util.createBuffer(f.privateKeyPublicExponent).toHex(),z=je.util.createBuffer(f.privateKeyPrivateExponent).toHex(),C=je.util.createBuffer(f.privateKeyPrime1).toHex(),w=je.util.createBuffer(f.privateKeyPrime2).toHex(),S=je.util.createBuffer(f.privateKeyExponent1).toHex(),E=je.util.createBuffer(f.privateKeyExponent2).toHex(),k=je.util.createBuffer(f.privateKeyCoefficient).toHex(),Ze.setRsaPrivateKey(new ft(x,16),new ft(_,16),new ft(z,16),new ft(C,16),new ft(w,16),new ft(S,16),new ft(E,16),new ft(k,16))};Ze.privateKeyToAsn1=Ze.privateKeyToRSAPrivateKey=function(o){return ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,ee.integerToDer(0).getBytes()),ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,Un(o.n)),ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,Un(o.e)),ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,Un(o.d)),ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,Un(o.p)),ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,Un(o.q)),ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,Un(o.dP)),ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,Un(o.dQ)),ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,Un(o.qInv))])};Ze.publicKeyFromAsn1=function(o){var f={},h=[];if(ee.validate(o,V_e,f,h)){var y=ee.derToOid(f.publicKeyOid);if(y!==Ze.oids.rsaEncryption){var x=Error("Cannot read public key. Unknown OID.");throw x.oid=y,x}o=f.rsaPublicKey}if(h=[],!ee.validate(o,$_e,f,h)){var x=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw x.errors=h,x}var _=je.util.createBuffer(f.publicKeyModulus).toHex(),z=je.util.createBuffer(f.publicKeyExponent).toHex();return Ze.setRsaPublicKey(new ft(_,16),new ft(z,16))};Ze.publicKeyToAsn1=Ze.publicKeyToSubjectPublicKeyInfo=function(o){return ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(Ze.oids.rsaEncryption).getBytes()),ee.create(ee.Class.UNIVERSAL,ee.Type.NULL,!1,"")]),ee.create(ee.Class.UNIVERSAL,ee.Type.BITSTRING,!1,[Ze.publicKeyToRSAPublicKey(o)])])};Ze.publicKeyToRSAPublicKey=function(o){return ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,Un(o.n)),ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,Un(o.e))])};function E5(o,f,h){var y=je.util.createBuffer(),x=Math.ceil(f.n.bitLength()/8);if(o.length>x-11){var _=Error("Message is too long for PKCS#1 v1.5 padding.");throw _.length=o.length,_.max=x-11,_}y.putByte(0),y.putByte(h);var z=x-3-o.length,C;if(h===0||h===1){C=h===0?0:255;for(var w=0;w<z;++w)y.putByte(C)}else while(z>0){var S=0,E=je.random.getBytes(z);for(var w=0;w<z;++w)if(C=E.charCodeAt(w),C===0)++S;else y.putByte(C);z=S}return y.putByte(0),y.putBytes(o),y}function wh(o,f,h,y,x){var _=Math.ceil(f.n.bitLength()/8),z=je.util.createBuffer(o),C=z.getByte(),w=z.getByte();if(C!==0||h&&w!==0&&w!==1||!h&&w!==2||h&&w===0&&typeof y>"u")throw Error("Encryption block is invalid.");var S=0;if(w===0){S=_-3-y;for(var E=0;E<S;++E)if(z.getByte()!==0)throw Error("Encryption block is invalid.")}else if(w===1){S=0;while(z.length()>1){if(z.getByte()!==255){--z.read;break}++S}if(S<8&&!(x?x._skipPaddingChecks:!1))throw Error("Encryption block is invalid.")}else if(w===2){S=0;while(z.length()>1){if(z.getByte()===0){--z.read;break}++S}if(S<8&&!(x?x._skipPaddingChecks:!1))throw Error("Encryption block is invalid.")}var k=z.getByte();if(k!==0||S!==_-3-z.length())throw Error("Encryption block is invalid.");return z.getBytes()}function K_e(o,f,h){if(typeof f==="function")h=f,f={};f=f||{};var y={algorithm:{name:f.algorithm||"PRIMEINC",options:{workers:f.workers||2,workLoad:f.workLoad||100,workerScript:f.workerScript}}};if("prng"in f)y.prng=f.prng;x();function x(){_(o.pBits,function(C,w){if(C)return h(C);if(o.p=w,o.q!==null)return z(C,o.q);_(o.qBits,z)})}function _(C,w){je.prime.generateProbablePrime(C,y,w)}function z(C,w){if(C)return h(C);if(o.q=w,o.p.compareTo(o.q)<0){var S=o.p;o.p=o.q,o.q=S}if(o.p.subtract(ft.ONE).gcd(o.e).compareTo(ft.ONE)!==0){o.p=null,x();return}if(o.q.subtract(ft.ONE).gcd(o.e).compareTo(ft.ONE)!==0){o.q=null,_(o.qBits,z);return}if(o.p1=o.p.subtract(ft.ONE),o.q1=o.q.subtract(ft.ONE),o.phi=o.p1.multiply(o.q1),o.phi.gcd(o.e).compareTo(ft.ONE)!==0){o.p=o.q=null,x();return}if(o.n=o.p.multiply(o.q),o.n.bitLength()!==o.bits){o.q=null,_(o.qBits,z);return}var E=o.e.modInverse(o.phi);o.keys={privateKey:Ze.rsa.setPrivateKey(o.n,o.e,E,o.p,o.q,E.mod(o.p1),E.mod(o.q1),o.q.modInverse(o.p)),publicKey:Ze.rsa.setPublicKey(o.n,o.e)},h(null,o.keys)}}function Un(o){var f=o.toString(16);if(f[0]>="8")f="00"+f;var h=je.util.hexToBytes(f);if(h.length>1&&(h.charCodeAt(0)===0&&(h.charCodeAt(1)&128)===0||h.charCodeAt(0)===255&&(h.charCodeAt(1)&128)===128))return h.substr(1);return h}function W_e(o){if(o<=100)return 27;if(o<=150)return 18;if(o<=200)return 15;if(o<=250)return 12;if(o<=300)return 9;if(o<=350)return 8;if(o<=400)return 7;if(o<=500)return 6;if(o<=600)return 5;if(o<=800)return 4;if(o<=1250)return 3;return 2}function z5(o){return je.util.isNodejs&&typeof Wx[o]==="function"}function C5(o){return typeof Ko.globalScope<"u"&&typeof Ko.globalScope.crypto==="object"&&typeof Ko.globalScope.crypto.subtle==="object"&&typeof Ko.globalScope.crypto.subtle[o]==="function"}function w5(o){return typeof Ko.globalScope<"u"&&typeof Ko.globalScope.msCrypto==="object"&&typeof Ko.globalScope.msCrypto.subtle==="object"&&typeof Ko.globalScope.msCrypto.subtle[o]==="function"}function S5(o){var f=je.util.hexToBytes(o.toString(16)),h=new Uint8Array(f.length);for(var y=0;y<f.length;++y)h[y]=f.charCodeAt(y);return h}});var Zx=i(function(cLe,A5){var ke=Xe();ji();bn();Lu();Dn();qi();vh();Us();Ho();qx();Mu();zt();if(typeof Jx>"u")Jx=ke.jsbn.BigInteger;var Jx,ae=ke.asn1,Ye=ke.pki=ke.pki||{};A5.exports=Ye.pbe=ke.pbe=ke.pbe||{};var Ws=Ye.oids,J_e={name:"EncryptedPrivateKeyInfo",tagClass:ae.Class.UNIVERSAL,type:ae.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:ae.Class.UNIVERSAL,type:ae.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:ae.Class.UNIVERSAL,type:ae.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:ae.Class.UNIVERSAL,type:ae.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:ae.Class.UNIVERSAL,type:ae.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},Z_e={name:"PBES2Algorithms",tagClass:ae.Class.UNIVERSAL,type:ae.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:ae.Class.UNIVERSAL,type:ae.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:ae.Class.UNIVERSAL,type:ae.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:ae.Class.UNIVERSAL,type:ae.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:ae.Class.UNIVERSAL,type:ae.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:ae.Class.UNIVERSAL,type:ae.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:ae.Class.UNIVERSAL,type:ae.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:ae.Class.UNIVERSAL,type:ae.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:ae.Class.UNIVERSAL,type:ae.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:ae.Class.UNIVERSAL,type:ae.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:ae.Class.UNIVERSAL,type:ae.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:ae.Class.UNIVERSAL,type:ae.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},Y_e={name:"pkcs-12PbeParams",tagClass:ae.Class.UNIVERSAL,type:ae.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:ae.Class.UNIVERSAL,type:ae.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:ae.Class.UNIVERSAL,type:ae.Type.INTEGER,constructed:!1,capture:"iterations"}]};Ye.encryptPrivateKeyInfo=function(o,f,h){h=h||{},h.saltSize=h.saltSize||8,h.count=h.count||2048,h.algorithm=h.algorithm||"aes128",h.prfAlgorithm=h.prfAlgorithm||"sha1";var y=ke.random.getBytesSync(h.saltSize),x=h.count,_=ae.integerToDer(x),z,C,w;if(h.algorithm.indexOf("aes")===0||h.algorithm==="des"){var S,E,k;switch(h.algorithm){case"aes128":z=16,S=16,E=Ws["aes128-CBC"],k=ke.aes.createEncryptionCipher;break;case"aes192":z=24,S=16,E=Ws["aes192-CBC"],k=ke.aes.createEncryptionCipher;break;case"aes256":z=32,S=16,E=Ws["aes256-CBC"],k=ke.aes.createEncryptionCipher;break;case"des":z=8,S=8,E=Ws.desCBC,k=ke.des.createEncryptionCipher;break;default:var O=Error("Cannot encrypt private key. Unknown encryption algorithm.");throw O.algorithm=h.algorithm,O}var R="hmacWith"+h.prfAlgorithm.toUpperCase(),I=R5(R),A=ke.pkcs5.pbkdf2(f,y,x,z,I),M=ke.random.getBytesSync(S),D=k(A);D.start(M),D.update(ae.toDer(o)),D.finish(),w=D.output.getBytes();var U=X_e(y,_,z,R);C=ae.create(ae.Class.UNIVERSAL,ae.Type.SEQUENCE,!0,[ae.create(ae.Class.UNIVERSAL,ae.Type.OID,!1,ae.oidToDer(Ws.pkcs5PBES2).getBytes()),ae.create(ae.Class.UNIVERSAL,ae.Type.SEQUENCE,!0,[ae.create(ae.Class.UNIVERSAL,ae.Type.SEQUENCE,!0,[ae.create(ae.Class.UNIVERSAL,ae.Type.OID,!1,ae.oidToDer(Ws.pkcs5PBKDF2).getBytes()),U]),ae.create(ae.Class.UNIVERSAL,ae.Type.SEQUENCE,!0,[ae.create(ae.Class.UNIVERSAL,ae.Type.OID,!1,ae.oidToDer(E).getBytes()),ae.create(ae.Class.UNIVERSAL,ae.Type.OCTETSTRING,!1,M)])])])}else if(h.algorithm==="3des"){z=24;var F=new ke.util.ByteBuffer(y),A=Ye.pbe.generatePkcs12Key(f,F,1,x,z),M=Ye.pbe.generatePkcs12Key(f,F,2,x,z),D=ke.des.createEncryptionCipher(A);D.start(M),D.update(ae.toDer(o)),D.finish(),w=D.output.getBytes(),C=ae.create(ae.Class.UNIVERSAL,ae.Type.SEQUENCE,!0,[ae.create(ae.Class.UNIVERSAL,ae.Type.OID,!1,ae.oidToDer(Ws["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),ae.create(ae.Class.UNIVERSAL,ae.Type.SEQUENCE,!0,[ae.create(ae.Class.UNIVERSAL,ae.Type.OCTETSTRING,!1,y),ae.create(ae.Class.UNIVERSAL,ae.Type.INTEGER,!1,_.getBytes())])])}else{var O=Error("Cannot encrypt private key. Unknown encryption algorithm.");throw O.algorithm=h.algorithm,O}var J=ae.create(ae.Class.UNIVERSAL,ae.Type.SEQUENCE,!0,[C,ae.create(ae.Class.UNIVERSAL,ae.Type.OCTETSTRING,!1,w)]);return J};Ye.decryptPrivateKeyInfo=function(o,f){var h=null,y={},x=[];if(!ae.validate(o,J_e,y,x)){var _=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw _.errors=x,_}var z=ae.derToOid(y.encryptionOid),C=Ye.pbe.getCipher(z,y.encryptionParams,f),w=ke.util.createBuffer(y.encryptedData);if(C.update(w),C.finish())h=ae.fromDer(C.output);return h};Ye.encryptedPrivateKeyToPem=function(o,f){var h={type:"ENCRYPTED PRIVATE KEY",body:ae.toDer(o).getBytes()};return ke.pem.encode(h,{maxline:f})};Ye.encryptedPrivateKeyFromPem=function(o){var f=ke.pem.decode(o)[0];if(f.type!=="ENCRYPTED PRIVATE KEY"){var h=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw h.headerType=f.type,h}if(f.procType&&f.procType.type==="ENCRYPTED")throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return ae.fromDer(f.body)};Ye.encryptRsaPrivateKey=function(o,f,h){if(h=h||{},!h.legacy){var y=Ye.wrapRsaPrivateKey(Ye.privateKeyToAsn1(o));return y=Ye.encryptPrivateKeyInfo(y,f,h),Ye.encryptedPrivateKeyToPem(y)}var x,_,z,C;switch(h.algorithm){case"aes128":x="AES-128-CBC",z=16,_=ke.random.getBytesSync(16),C=ke.aes.createEncryptionCipher;break;case"aes192":x="AES-192-CBC",z=24,_=ke.random.getBytesSync(16),C=ke.aes.createEncryptionCipher;break;case"aes256":x="AES-256-CBC",z=32,_=ke.random.getBytesSync(16),C=ke.aes.createEncryptionCipher;break;case"3des":x="DES-EDE3-CBC",z=24,_=ke.random.getBytesSync(8),C=ke.des.createEncryptionCipher;break;case"des":x="DES-CBC",z=8,_=ke.random.getBytesSync(8),C=ke.des.createEncryptionCipher;break;default:var w=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+h.algorithm+'".');throw w.algorithm=h.algorithm,w}var S=ke.pbe.opensslDeriveBytes(f,_.substr(0,8),z),E=C(S);E.start(_),E.update(ae.toDer(Ye.privateKeyToAsn1(o))),E.finish();var k={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:x,parameters:ke.util.bytesToHex(_).toUpperCase()},body:E.output.getBytes()};return ke.pem.encode(k)};Ye.decryptRsaPrivateKey=function(o,f){var h=null,y=ke.pem.decode(o)[0];if(y.type!=="ENCRYPTED PRIVATE KEY"&&y.type!=="PRIVATE KEY"&&y.type!=="RSA PRIVATE KEY"){var x=Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw x.headerType=x,x}if(y.procType&&y.procType.type==="ENCRYPTED"){var _,z;switch(y.dekInfo.algorithm){case"DES-CBC":_=8,z=ke.des.createDecryptionCipher;break;case"DES-EDE3-CBC":_=24,z=ke.des.createDecryptionCipher;break;case"AES-128-CBC":_=16,z=ke.aes.createDecryptionCipher;break;case"AES-192-CBC":_=24,z=ke.aes.createDecryptionCipher;break;case"AES-256-CBC":_=32,z=ke.aes.createDecryptionCipher;break;case"RC2-40-CBC":_=5,z=function(k){return ke.rc2.createDecryptionCipher(k,40)};break;case"RC2-64-CBC":_=8,z=function(k){return ke.rc2.createDecryptionCipher(k,64)};break;case"RC2-128-CBC":_=16,z=function(k){return ke.rc2.createDecryptionCipher(k,128)};break;default:var x=Error('Could not decrypt private key; unsupported encryption algorithm "'+y.dekInfo.algorithm+'".');throw x.algorithm=y.dekInfo.algorithm,x}var C=ke.util.hexToBytes(y.dekInfo.parameters),w=ke.pbe.opensslDeriveBytes(f,C.substr(0,8),_),S=z(w);if(S.start(C),S.update(ke.util.createBuffer(y.body)),S.finish())h=S.output.getBytes();else return h}else h=y.body;if(y.type==="ENCRYPTED PRIVATE KEY")h=Ye.decryptPrivateKeyInfo(ae.fromDer(h),f);else h=ae.fromDer(h);if(h!==null)h=Ye.privateKeyFromAsn1(h);return h};Ye.pbe.generatePkcs12Key=function(o,f,h,y,x,_){var z,C;if(typeof _>"u"||_===null){if(!("sha1"in ke.md))throw Error('"sha1" hash algorithm unavailable.');_=ke.md.sha1.create()}var w=_.digestLength,S=_.blockLength,E=new ke.util.ByteBuffer,k=new ke.util.ByteBuffer;if(o!==null&&o!==void 0){for(C=0;C<o.length;C++)k.putInt16(o.charCodeAt(C));k.putInt16(0)}var O=k.length(),R=f.length(),I=new ke.util.ByteBuffer;I.fillWithByte(h,S);var A=S*Math.ceil(R/S),M=new ke.util.ByteBuffer;for(C=0;C<A;C++)M.putByte(f.at(C%R));var D=S*Math.ceil(O/S),U=new ke.util.ByteBuffer;for(C=0;C<D;C++)U.putByte(k.at(C%O));var F=M;F.putBuffer(U);var J=Math.ceil(x/w);for(var Q=1;Q<=J;Q++){var te=new ke.util.ByteBuffer;te.putBytes(I.bytes()),te.putBytes(F.bytes());for(var le=0;le<y;le++)_.start(),_.update(te.getBytes()),te=_.digest();var he=new ke.util.ByteBuffer;for(C=0;C<S;C++)he.putByte(te.at(C%w));var xe=Math.ceil(R/S)+Math.ceil(O/S),Re=new ke.util.ByteBuffer;for(z=0;z<xe;z++){var me=new ke.util.ByteBuffer(F.getBytes(S)),Ae=511;for(C=he.length()-1;C>=0;C--)Ae=Ae>>8,Ae+=he.at(C)+me.at(C),me.setAt(C,Ae&255);Re.putBuffer(me)}F=Re,E.putBuffer(te)}return E.truncate(E.length()-x),E};Ye.pbe.getCipher=function(o,f,h){switch(o){case Ye.oids.pkcs5PBES2:return Ye.pbe.getCipherForPBES2(o,f,h);case Ye.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case Ye.oids["pbewithSHAAnd40BitRC2-CBC"]:return Ye.pbe.getCipherForPKCS12PBE(o,f,h);default:var y=Error("Cannot read encrypted PBE data block. Unsupported OID.");throw y.oid=o,y.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],y}};Ye.pbe.getCipherForPBES2=function(o,f,h){var y={},x=[];if(!ae.validate(f,Z_e,y,x)){var _=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw _.errors=x,_}if(o=ae.derToOid(y.kdfOid),o!==Ye.oids.pkcs5PBKDF2){var _=Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw _.oid=o,_.supportedOids=["pkcs5PBKDF2"],_}if(o=ae.derToOid(y.encOid),o!==Ye.oids["aes128-CBC"]&&o!==Ye.oids["aes192-CBC"]&&o!==Ye.oids["aes256-CBC"]&&o!==Ye.oids["des-EDE3-CBC"]&&o!==Ye.oids.desCBC){var _=Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw _.oid=o,_.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],_}var z=y.kdfSalt,C=ke.util.createBuffer(y.kdfIterationCount);C=C.getInt(C.length()<<3);var w,S;switch(Ye.oids[o]){case"aes128-CBC":w=16,S=ke.aes.createDecryptionCipher;break;case"aes192-CBC":w=24,S=ke.aes.createDecryptionCipher;break;case"aes256-CBC":w=32,S=ke.aes.createDecryptionCipher;break;case"des-EDE3-CBC":w=24,S=ke.des.createDecryptionCipher;break;case"desCBC":w=8,S=ke.des.createDecryptionCipher;break}var E=I5(y.prfOid),k=ke.pkcs5.pbkdf2(h,z,C,w,E),O=y.encIv,R=S(k);return R.start(O),R};Ye.pbe.getCipherForPKCS12PBE=function(o,f,h){var y={},x=[];if(!ae.validate(f,Y_e,y,x)){var _=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw _.errors=x,_}var z=ke.util.createBuffer(y.salt),C=ke.util.createBuffer(y.iterations);C=C.getInt(C.length()<<3);var w,S,E;switch(o){case Ye.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:w=24,S=8,E=ke.des.startDecrypting;break;case Ye.oids["pbewithSHAAnd40BitRC2-CBC"]:w=5,S=8,E=function(A,M){var D=ke.rc2.createDecryptionCipher(A,40);return D.start(M,null),D};break;default:var _=Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw _.oid=o,_}var k=I5(y.prfOid),O=Ye.pbe.generatePkcs12Key(h,z,1,C,w,k);k.start();var R=Ye.pbe.generatePkcs12Key(h,z,2,C,S,k);return E(O,R)};Ye.pbe.opensslDeriveBytes=function(o,f,h,y){if(typeof y>"u"||y===null){if(!("md5"in ke.md))throw Error('"md5" hash algorithm unavailable.');y=ke.md.md5.create()}if(f===null)f="";var x=[O5(y,o+f)];for(var _=16,z=1;_<h;++z,_+=16)x.push(O5(y,x[z-1]+o+f));return x.join("").substr(0,h)};function O5(o,f){return o.start().update(f).digest().getBytes()}function I5(o){var f;if(!o)f="hmacWithSHA1";else if(f=Ye.oids[ae.derToOid(o)],!f){var h=Error("Unsupported PRF OID.");throw h.oid=o,h.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],h}return R5(f)}function R5(o){var f=ke.md;switch(o){case"hmacWithSHA224":f=ke.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":o=o.substr(8).toLowerCase();break;default:var h=Error("Unsupported PRF algorithm.");throw h.algorithm=o,h.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],h}if(!f||!(o in f))throw Error("Unknown hash algorithm: "+o);return f[o].create()}function X_e(o,f,h,y){var x=ae.create(ae.Class.UNIVERSAL,ae.Type.SEQUENCE,!0,[ae.create(ae.Class.UNIVERSAL,ae.Type.OCTETSTRING,!1,o),ae.create(ae.Class.UNIVERSAL,ae.Type.INTEGER,!1,f.getBytes())]);if(y!=="hmacWithSHA1")x.value.push(ae.create(ae.Class.UNIVERSAL,ae.Type.INTEGER,!1,ke.util.hexToBytes(h.toString(16))),ae.create(ae.Class.UNIVERSAL,ae.Type.SEQUENCE,!0,[ae.create(ae.Class.UNIVERSAL,ae.Type.OID,!1,ae.oidToDer(Ye.oids[y]).getBytes()),ae.create(ae.Class.UNIVERSAL,ae.Type.NULL,!1,"")]));return x}});var Yx=i(function(lLe,D5){var mc=Xe();bn();zt();var Ee=mc.asn1,yc=D5.exports=mc.pkcs7asn1=mc.pkcs7asn1||{};mc.pkcs7=mc.pkcs7||{};mc.pkcs7.asn1=yc;var P5={name:"ContentInfo",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:Ee.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};yc.contentInfoValidator=P5;var B5={name:"EncryptedContentInfo",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:Ee.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:Ee.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};yc.envelopedDataValidator={name:"EnvelopedData",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(B5)};yc.encryptedDataValidator={name:"EncryptedData",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.INTEGER,constructed:!1,capture:"version"}].concat(B5)};var Q_e={name:"SignerInfo",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:Ee.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:Ee.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:Ee.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};yc.signedDataValidator={name:"SignedData",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},P5,{name:"SignedData.Certificates",tagClass:Ee.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:Ee.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.SET,capture:"signerInfos",optional:!0,value:[Q_e]}]};yc.recipientInfoValidator={name:"RecipientInfo",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:Ee.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:Ee.Class.UNIVERSAL,type:Ee.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}});var Xx=i(function(uLe,L5){var Zs=Xe();zt();Zs.mgf=Zs.mgf||{};var eze=L5.exports=Zs.mgf.mgf1=Zs.mgf1=Zs.mgf1||{};eze.create=function(o){var f={generate:function(h,y){var x=new Zs.util.ByteBuffer,_=Math.ceil(y/o.digestLength);for(var z=0;z<_;z++){var C=new Zs.util.ByteBuffer;C.putInt32(z),o.start(),o.update(h+C.getBytes()),x.putBuffer(o.digest())}return x.truncate(x.length()-y),x.getBytes()}};return f}});var j5=i(function(dLe,N5){var Sh=Xe();Xx();N5.exports=Sh.mgf=Sh.mgf||{};Sh.mgf.mgf1=Sh.mgf1});var Th=i(function(pLe,M5){var ea=Xe();Ho();zt();var tze=M5.exports=ea.pss=ea.pss||{};tze.create=function(o){if(arguments.length===3)o={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]};var f=o.md,h=o.mgf,y=f.digestLength,x=o.salt||null;if(typeof x==="string")x=ea.util.createBuffer(x);var _;if("saltLength"in o)_=o.saltLength;else if(x!==null)_=x.length();else throw Error("Salt length not specified or specific salt not given.");if(x!==null&&x.length()!==_)throw Error("Given salt length does not match length of given salt.");var z=o.prng||ea.random,C={};return C.encode=function(w,S){var E,k=S-1,O=Math.ceil(k/8),R=w.digest().getBytes();if(O<y+_+2)throw Error("Message is too long to encrypt.");var I;if(x===null)I=z.getBytesSync(_);else I=x.bytes();var A=new ea.util.ByteBuffer;A.fillWithByte(0,8),A.putBytes(R),A.putBytes(I),f.start(),f.update(A.getBytes());var M=f.digest().getBytes(),D=new ea.util.ByteBuffer;D.fillWithByte(0,O-_-y-2),D.putByte(1),D.putBytes(I);var U=D.getBytes(),F=O-y-1,J=h.generate(M,F),Q="";for(E=0;E<F;E++)Q+=String.fromCharCode(U.charCodeAt(E)^J.charCodeAt(E));var te=65280>>8*O-k&255;return Q=String.fromCharCode(Q.charCodeAt(0)&~te)+Q.substr(1),Q+M+String.fromCharCode(188)},C.verify=function(w,S,E){var k,O=E-1,R=Math.ceil(O/8);if(S=S.substr(-R),R<y+_+2)throw Error("Inconsistent parameters to PSS signature verification.");if(S.charCodeAt(R-1)!==188)throw Error("Encoded message does not end in 0xBC.");var I=R-y-1,A=S.substr(0,I),M=S.substr(I,y),D=65280>>8*R-O&255;if((A.charCodeAt(0)&D)!==0)throw Error("Bits beyond keysize not zero as expected.");var U=h.generate(M,I),F="";for(k=0;k<I;k++)F+=String.fromCharCode(A.charCodeAt(k)^U.charCodeAt(k));F=String.fromCharCode(F.charCodeAt(0)&~D)+F.substr(1);var J=R-y-_-2;for(k=0;k<J;k++)if(F.charCodeAt(k)!==0)throw Error("Leftmost octets not zero as expected");if(F.charCodeAt(J)!==1)throw Error("Inconsistent PSS signature, 0x01 marker not found");var Q=F.substr(-_),te=new ea.util.ByteBuffer;te.fillWithByte(0,8),te.putBytes(w),te.putBytes(Q),f.start(),f.update(te.getBytes());var le=f.digest().getBytes();return M===le},C}});var Oh=i(function(fLe,V5){var Me=Xe();ji();bn();Lu();Dn();j5();qi();Us();Th();Mu();zt();var P=Me.asn1,ge=V5.exports=Me.pki=Me.pki||{},bt=ge.oids,rr={};rr.CN=bt.commonName;rr.commonName="CN";rr.C=bt.countryName;rr.countryName="C";rr.L=bt.localityName;rr.localityName="L";rr.ST=bt.stateOrProvinceName;rr.stateOrProvinceName="ST";rr.O=bt.organizationName;rr.organizationName="O";rr.OU=bt.organizationalUnitName;rr.organizationalUnitName="OU";rr.E=bt.emailAddress;rr.emailAddress="E";var F5=Me.pki.rsa.publicKeyValidator,rze={name:"Certificate",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:P.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:P.Class.UNIVERSAL,type:P.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:P.Class.UNIVERSAL,type:P.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:P.Class.UNIVERSAL,type:P.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:P.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:P.Class.UNIVERSAL,type:P.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:P.Class.UNIVERSAL,type:P.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:P.Class.UNIVERSAL,type:P.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:P.Class.UNIVERSAL,type:P.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},F5,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:P.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:P.Class.UNIVERSAL,type:P.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:P.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:P.Class.UNIVERSAL,type:P.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:P.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:P.Class.UNIVERSAL,type:P.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:P.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:P.Class.UNIVERSAL,type:P.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},oze={name:"rsapss",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:P.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:P.Class.UNIVERSAL,type:P.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:P.Class.UNIVERSAL,type:P.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:P.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:P.Class.UNIVERSAL,type:P.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:P.Class.UNIVERSAL,type:P.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:P.Class.UNIVERSAL,type:P.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:P.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:P.Class.UNIVERSAL,type:P.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:P.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:P.Class.UNIVERSAL,type:P.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},nze={name:"CertificationRequestInfo",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:P.Class.UNIVERSAL,type:P.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},F5,{name:"CertificationRequestInfo.attributes",tagClass:P.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:P.Class.UNIVERSAL,type:P.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:P.Class.UNIVERSAL,type:P.Type.SET,constructed:!0}]}]}]},ize={name:"CertificationRequest",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[nze,{name:"CertificationRequest.signatureAlgorithm",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:P.Class.UNIVERSAL,type:P.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:P.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:P.Class.UNIVERSAL,type:P.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};ge.RDNAttributesAsArray=function(o,f){var h=[],y,x,_;for(var z=0;z<o.value.length;++z){y=o.value[z];for(var C=0;C<y.value.length;++C){if(_={},x=y.value[C],_.type=P.derToOid(x.value[0].value),_.value=x.value[1].value,_.valueTagClass=x.value[1].type,_.type in bt){if(_.name=bt[_.type],_.name in rr)_.shortName=rr[_.name]}if(f)f.update(_.type),f.update(_.value);h.push(_)}}return h};ge.CRIAttributesAsArray=function(o){var f=[];for(var h=0;h<o.length;++h){var y=o[h],x=P.derToOid(y.value[0].value),_=y.value[1].value;for(var z=0;z<_.length;++z){var C={};if(C.type=x,C.value=_[z].value,C.valueTagClass=_[z].type,C.type in bt){if(C.name=bt[C.type],C.name in rr)C.shortName=rr[C.name]}if(C.type===bt.extensionRequest){C.extensions=[];for(var w=0;w<C.value.length;++w)C.extensions.push(ge.certificateExtensionFromAsn1(C.value[w]))}f.push(C)}}return f};function $i(o,f){if(typeof f==="string")f={shortName:f};var h=null,y;for(var x=0;h===null&&x<o.attributes.length;++x)if(y=o.attributes[x],f.type&&f.type===y.type)h=y;else if(f.name&&f.name===y.name)h=y;else if(f.shortName&&f.shortName===y.shortName)h=y;return h}var Eh=function(o,f,h){var y={};if(o!==bt["RSASSA-PSS"])return y;if(h)y={hash:{algorithmOid:bt.sha1},mgf:{algorithmOid:bt.mgf1,hash:{algorithmOid:bt.sha1}},saltLength:20};var x={},_=[];if(!P.validate(f,oze,x,_)){var z=Error("Cannot read RSASSA-PSS parameter block.");throw z.errors=_,z}if(x.hashOid!==void 0)y.hash=y.hash||{},y.hash.algorithmOid=P.derToOid(x.hashOid);if(x.maskGenOid!==void 0)y.mgf=y.mgf||{},y.mgf.algorithmOid=P.derToOid(x.maskGenOid),y.mgf.hash=y.mgf.hash||{},y.mgf.hash.algorithmOid=P.derToOid(x.maskGenHashOid);if(x.saltLength!==void 0)y.saltLength=x.saltLength.charCodeAt(0);return y},kh=function(o){switch(bt[o.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return Me.md.sha1.create();case"md5WithRSAEncryption":return Me.md.md5.create();case"sha256WithRSAEncryption":return Me.md.sha256.create();case"sha384WithRSAEncryption":return Me.md.sha384.create();case"sha512WithRSAEncryption":return Me.md.sha512.create();case"RSASSA-PSS":return Me.md.sha256.create();default:var f=Error("Could not compute "+o.type+" digest. Unknown signature OID.");throw f.signatureOid=o.signatureOid,f}},U5=function(o){var f=o.certificate,h;switch(f.signatureOid){case bt.sha1WithRSAEncryption:case bt.sha1WithRSASignature:break;case bt["RSASSA-PSS"]:var y,x;if(y=bt[f.signatureParameters.mgf.hash.algorithmOid],y===void 0||Me.md[y]===void 0){var _=Error("Unsupported MGF hash function.");throw _.oid=f.signatureParameters.mgf.hash.algorithmOid,_.name=y,_}if(x=bt[f.signatureParameters.mgf.algorithmOid],x===void 0||Me.mgf[x]===void 0){var _=Error("Unsupported MGF function.");throw _.oid=f.signatureParameters.mgf.algorithmOid,_.name=x,_}if(x=Me.mgf[x].create(Me.md[y].create()),y=bt[f.signatureParameters.hash.algorithmOid],y===void 0||Me.md[y]===void 0){var _=Error("Unsupported RSASSA-PSS hash function.");throw _.oid=f.signatureParameters.hash.algorithmOid,_.name=y,_}h=Me.pss.create(Me.md[y].create(),x,f.signatureParameters.saltLength);break}return f.publicKey.verify(o.md.digest().getBytes(),o.signature,h)};ge.certificateFromPem=function(o,f,h){var y=Me.pem.decode(o)[0];if(y.type!=="CERTIFICATE"&&y.type!=="X509 CERTIFICATE"&&y.type!=="TRUSTED CERTIFICATE"){var x=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw x.headerType=y.type,x}if(y.procType&&y.procType.type==="ENCRYPTED")throw Error("Could not convert certificate from PEM; PEM is encrypted.");var _=P.fromDer(y.body,h);return ge.certificateFromAsn1(_,f)};ge.certificateToPem=function(o,f){var h={type:"CERTIFICATE",body:P.toDer(ge.certificateToAsn1(o)).getBytes()};return Me.pem.encode(h,{maxline:f})};ge.publicKeyFromPem=function(o){var f=Me.pem.decode(o)[0];if(f.type!=="PUBLIC KEY"&&f.type!=="RSA PUBLIC KEY"){var h=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw h.headerType=f.type,h}if(f.procType&&f.procType.type==="ENCRYPTED")throw Error("Could not convert public key from PEM; PEM is encrypted.");var y=P.fromDer(f.body);return ge.publicKeyFromAsn1(y)};ge.publicKeyToPem=function(o,f){var h={type:"PUBLIC KEY",body:P.toDer(ge.publicKeyToAsn1(o)).getBytes()};return Me.pem.encode(h,{maxline:f})};ge.publicKeyToRSAPublicKeyPem=function(o,f){var h={type:"RSA PUBLIC KEY",body:P.toDer(ge.publicKeyToRSAPublicKey(o)).getBytes()};return Me.pem.encode(h,{maxline:f})};ge.getPublicKeyFingerprint=function(o,f){f=f||{};var h=f.md||Me.md.sha1.create(),y=f.type||"RSAPublicKey",x;switch(y){case"RSAPublicKey":x=P.toDer(ge.publicKeyToRSAPublicKey(o)).getBytes();break;case"SubjectPublicKeyInfo":x=P.toDer(ge.publicKeyToAsn1(o)).getBytes();break;default:throw Error('Unknown fingerprint type "'+f.type+'".')}h.start(),h.update(x);var _=h.digest();if(f.encoding==="hex"){var z=_.toHex();if(f.delimiter)return z.match(/.{2}/g).join(f.delimiter);return z}else if(f.encoding==="binary")return _.getBytes();else if(f.encoding)throw Error('Unknown encoding "'+f.encoding+'".');return _};ge.certificationRequestFromPem=function(o,f,h){var y=Me.pem.decode(o)[0];if(y.type!=="CERTIFICATE REQUEST"){var x=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw x.headerType=y.type,x}if(y.procType&&y.procType.type==="ENCRYPTED")throw Error("Could not convert certification request from PEM; PEM is encrypted.");var _=P.fromDer(y.body,h);return ge.certificationRequestFromAsn1(_,f)};ge.certificationRequestToPem=function(o,f){var h={type:"CERTIFICATE REQUEST",body:P.toDer(ge.certificationRequestToAsn1(o)).getBytes()};return Me.pem.encode(h,{maxline:f})};ge.createCertificate=function(){var o={};return o.version=2,o.serialNumber="00",o.signatureOid=null,o.signature=null,o.siginfo={},o.siginfo.algorithmOid=null,o.validity={},o.validity.notBefore=new Date,o.validity.notAfter=new Date,o.issuer={},o.issuer.getField=function(f){return $i(o.issuer,f)},o.issuer.addField=function(f){Wo([f]),o.issuer.attributes.push(f)},o.issuer.attributes=[],o.issuer.hash=null,o.subject={},o.subject.getField=function(f){return $i(o.subject,f)},o.subject.addField=function(f){Wo([f]),o.subject.attributes.push(f)},o.subject.attributes=[],o.subject.hash=null,o.extensions=[],o.publicKey=null,o.md=null,o.setSubject=function(f,h){if(Wo(f),o.subject.attributes=f,delete o.subject.uniqueId,h)o.subject.uniqueId=h;o.subject.hash=null},o.setIssuer=function(f,h){if(Wo(f),o.issuer.attributes=f,delete o.issuer.uniqueId,h)o.issuer.uniqueId=h;o.issuer.hash=null},o.setExtensions=function(f){for(var h=0;h<f.length;++h)$5(f[h],{cert:o});o.extensions=f},o.getExtension=function(f){if(typeof f==="string")f={name:f};var h=null,y;for(var x=0;h===null&&x<o.extensions.length;++x)if(y=o.extensions[x],f.id&&y.id===f.id)h=y;else if(f.name&&y.name===f.name)h=y;return h},o.sign=function(f,h){o.md=h||Me.md.sha1.create();var y=bt[o.md.algorithm+"WithRSAEncryption"];if(!y){var x=Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw x.algorithm=o.md.algorithm,x}o.signatureOid=o.siginfo.algorithmOid=y,o.tbsCertificate=ge.getTBSCertificate(o);var _=P.toDer(o.tbsCertificate);o.md.update(_.getBytes()),o.signature=f.sign(o.md)},o.verify=function(f){var h=!1;if(!o.issued(f)){var y=f.issuer,x=o.subject,_=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw _.expectedIssuer=x.attributes,_.actualIssuer=y.attributes,_}var z=f.md;if(z===null){z=kh({signatureOid:f.signatureOid,type:"certificate"});var C=f.tbsCertificate||ge.getTBSCertificate(f),w=P.toDer(C);z.update(w.getBytes())}if(z!==null)h=U5({certificate:o,md:z,signature:f.signature});return h},o.isIssuer=function(f){var h=!1,y=o.issuer,x=f.subject;if(y.hash&&x.hash)h=y.hash===x.hash;else if(y.attributes.length===x.attributes.length){h=!0;var _,z;for(var C=0;h&&C<y.attributes.length;++C)if(_=y.attributes[C],z=x.attributes[C],_.type!==z.type||_.value!==z.value)h=!1}return h},o.issued=function(f){return f.isIssuer(o)},o.generateSubjectKeyIdentifier=function(){return ge.getPublicKeyFingerprint(o.publicKey,{type:"RSAPublicKey"})},o.verifySubjectKeyIdentifier=function(){var f=bt.subjectKeyIdentifier;for(var h=0;h<o.extensions.length;++h){var y=o.extensions[h];if(y.id===f){var x=o.generateSubjectKeyIdentifier().getBytes();return Me.util.hexToBytes(y.subjectKeyIdentifier)===x}}return!1},o};ge.certificateFromAsn1=function(o,f){var h={},y=[];if(!P.validate(o,rze,h,y)){var x=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw x.errors=y,x}var _=P.derToOid(h.publicKeyOid);if(_!==ge.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var z=ge.createCertificate();z.version=h.certVersion?h.certVersion.charCodeAt(0):0;var C=Me.util.createBuffer(h.certSerialNumber);z.serialNumber=C.toHex(),z.signatureOid=Me.asn1.derToOid(h.certSignatureOid),z.signatureParameters=Eh(z.signatureOid,h.certSignatureParams,!0),z.siginfo.algorithmOid=Me.asn1.derToOid(h.certinfoSignatureOid),z.siginfo.parameters=Eh(z.siginfo.algorithmOid,h.certinfoSignatureParams,!1),z.signature=h.certSignature;var w=[];if(h.certValidity1UTCTime!==void 0)w.push(P.utcTimeToDate(h.certValidity1UTCTime));if(h.certValidity2GeneralizedTime!==void 0)w.push(P.generalizedTimeToDate(h.certValidity2GeneralizedTime));if(h.certValidity3UTCTime!==void 0)w.push(P.utcTimeToDate(h.certValidity3UTCTime));if(h.certValidity4GeneralizedTime!==void 0)w.push(P.generalizedTimeToDate(h.certValidity4GeneralizedTime));if(w.length>2)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(w.length<2)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(z.validity.notBefore=w[0],z.validity.notAfter=w[1],z.tbsCertificate=h.tbsCertificate,f){z.md=kh({signatureOid:z.signatureOid,type:"certificate"});var S=P.toDer(z.tbsCertificate);z.md.update(S.getBytes())}var E=Me.md.sha1.create(),k=P.toDer(h.certIssuer);if(E.update(k.getBytes()),z.issuer.getField=function(I){return $i(z.issuer,I)},z.issuer.addField=function(I){Wo([I]),z.issuer.attributes.push(I)},z.issuer.attributes=ge.RDNAttributesAsArray(h.certIssuer),h.certIssuerUniqueId)z.issuer.uniqueId=h.certIssuerUniqueId;z.issuer.hash=E.digest().toHex();var O=Me.md.sha1.create(),R=P.toDer(h.certSubject);if(O.update(R.getBytes()),z.subject.getField=function(I){return $i(z.subject,I)},z.subject.addField=function(I){Wo([I]),z.subject.attributes.push(I)},z.subject.attributes=ge.RDNAttributesAsArray(h.certSubject),h.certSubjectUniqueId)z.subject.uniqueId=h.certSubjectUniqueId;if(z.subject.hash=O.digest().toHex(),h.certExtensions)z.extensions=ge.certificateExtensionsFromAsn1(h.certExtensions);else z.extensions=[];return z.publicKey=ge.publicKeyFromAsn1(h.subjectPublicKeyInfo),z};ge.certificateExtensionsFromAsn1=function(o){var f=[];for(var h=0;h<o.value.length;++h){var y=o.value[h];for(var x=0;x<y.value.length;++x)f.push(ge.certificateExtensionFromAsn1(y.value[x]))}return f};ge.certificateExtensionFromAsn1=function(o){var f={};if(f.id=P.derToOid(o.value[0].value),f.critical=!1,o.value[1].type===P.Type.BOOLEAN)f.critical=o.value[1].value.charCodeAt(0)!==0,f.value=o.value[2].value;else f.value=o.value[1].value;if(f.id in bt){if(f.name=bt[f.id],f.name==="keyUsage"){var h=P.fromDer(f.value),y=0,x=0;if(h.value.length>1)y=h.value.charCodeAt(1),x=h.value.length>2?h.value.charCodeAt(2):0;f.digitalSignature=(y&128)===128,f.nonRepudiation=(y&64)===64,f.keyEncipherment=(y&32)===32,f.dataEncipherment=(y&16)===16,f.keyAgreement=(y&8)===8,f.keyCertSign=(y&4)===4,f.cRLSign=(y&2)===2,f.encipherOnly=(y&1)===1,f.decipherOnly=(x&128)===128}else if(f.name==="basicConstraints"){var h=P.fromDer(f.value);if(h.value.length>0&&h.value[0].type===P.Type.BOOLEAN)f.cA=h.value[0].value.charCodeAt(0)!==0;else f.cA=!1;var _=null;if(h.value.length>0&&h.value[0].type===P.Type.INTEGER)_=h.value[0].value;else if(h.value.length>1)_=h.value[1].value;if(_!==null)f.pathLenConstraint=P.derToInteger(_)}else if(f.name==="extKeyUsage"){var h=P.fromDer(f.value);for(var z=0;z<h.value.length;++z){var C=P.derToOid(h.value[z].value);if(C in bt)f[bt[C]]=!0;else f[C]=!0}}else if(f.name==="nsCertType"){var h=P.fromDer(f.value),y=0;if(h.value.length>1)y=h.value.charCodeAt(1);f.client=(y&128)===128,f.server=(y&64)===64,f.email=(y&32)===32,f.objsign=(y&16)===16,f.reserved=(y&8)===8,f.sslCA=(y&4)===4,f.emailCA=(y&2)===2,f.objCA=(y&1)===1}else if(f.name==="subjectAltName"||f.name==="issuerAltName"){f.altNames=[];var w,h=P.fromDer(f.value);for(var S=0;S<h.value.length;++S){w=h.value[S];var E={type:w.type,value:w.value};switch(f.altNames.push(E),w.type){case 1:case 2:case 6:break;case 7:E.ip=Me.util.bytesToIP(w.value);break;case 8:E.oid=P.derToOid(w.value);break;default:}}}else if(f.name==="subjectKeyIdentifier"){var h=P.fromDer(f.value);f.subjectKeyIdentifier=Me.util.bytesToHex(h.value)}}return f};ge.certificationRequestFromAsn1=function(o,f){var h={},y=[];if(!P.validate(o,ize,h,y)){var x=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw x.errors=y,x}var _=P.derToOid(h.publicKeyOid);if(_!==ge.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var z=ge.createCertificationRequest();if(z.version=h.csrVersion?h.csrVersion.charCodeAt(0):0,z.signatureOid=Me.asn1.derToOid(h.csrSignatureOid),z.signatureParameters=Eh(z.signatureOid,h.csrSignatureParams,!0),z.siginfo.algorithmOid=Me.asn1.derToOid(h.csrSignatureOid),z.siginfo.parameters=Eh(z.siginfo.algorithmOid,h.csrSignatureParams,!1),z.signature=h.csrSignature,z.certificationRequestInfo=h.certificationRequestInfo,f){z.md=kh({signatureOid:z.signatureOid,type:"certification request"});var C=P.toDer(z.certificationRequestInfo);z.md.update(C.getBytes())}var w=Me.md.sha1.create();return z.subject.getField=function(S){return $i(z.subject,S)},z.subject.addField=function(S){Wo([S]),z.subject.attributes.push(S)},z.subject.attributes=ge.RDNAttributesAsArray(h.certificationRequestInfoSubject,w),z.subject.hash=w.digest().toHex(),z.publicKey=ge.publicKeyFromAsn1(h.subjectPublicKeyInfo),z.getAttribute=function(S){return $i(z,S)},z.addAttribute=function(S){Wo([S]),z.attributes.push(S)},z.attributes=ge.CRIAttributesAsArray(h.certificationRequestInfoAttributes||[]),z};ge.createCertificationRequest=function(){var o={};return o.version=0,o.signatureOid=null,o.signature=null,o.siginfo={},o.siginfo.algorithmOid=null,o.subject={},o.subject.getField=function(f){return $i(o.subject,f)},o.subject.addField=function(f){Wo([f]),o.subject.attributes.push(f)},o.subject.attributes=[],o.subject.hash=null,o.publicKey=null,o.attributes=[],o.getAttribute=function(f){return $i(o,f)},o.addAttribute=function(f){Wo([f]),o.attributes.push(f)},o.md=null,o.setSubject=function(f){Wo(f),o.subject.attributes=f,o.subject.hash=null},o.setAttributes=function(f){Wo(f),o.attributes=f},o.sign=function(f,h){o.md=h||Me.md.sha1.create();var y=bt[o.md.algorithm+"WithRSAEncryption"];if(!y){var x=Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw x.algorithm=o.md.algorithm,x}o.signatureOid=o.siginfo.algorithmOid=y,o.certificationRequestInfo=ge.getCertificationRequestInfo(o);var _=P.toDer(o.certificationRequestInfo);o.md.update(_.getBytes()),o.signature=f.sign(o.md)},o.verify=function(){var f=!1,h=o.md;if(h===null){h=kh({signatureOid:o.signatureOid,type:"certification request"});var y=o.certificationRequestInfo||ge.getCertificationRequestInfo(o),x=P.toDer(y);h.update(x.getBytes())}if(h!==null)f=U5({certificate:o,md:h,signature:o.signature});return f},o};function bc(o){var f=P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[]),h,y,x=o.attributes;for(var _=0;_<x.length;++_){h=x[_];var z=h.value,C=P.Type.PRINTABLESTRING;if("valueTagClass"in h){if(C=h.valueTagClass,C===P.Type.UTF8)z=Me.util.encodeUtf8(z)}y=P.create(P.Class.UNIVERSAL,P.Type.SET,!0,[P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[P.create(P.Class.UNIVERSAL,P.Type.OID,!1,P.oidToDer(h.type).getBytes()),P.create(P.Class.UNIVERSAL,C,!1,z)])]),f.value.push(y)}return f}function Wo(o){var f;for(var h=0;h<o.length;++h){if(f=o[h],typeof f.name>"u"){if(f.type&&f.type in ge.oids)f.name=ge.oids[f.type];else if(f.shortName&&f.shortName in rr)f.name=ge.oids[rr[f.shortName]]}if(typeof f.type>"u")if(f.name&&f.name in ge.oids)f.type=ge.oids[f.name];else{var y=Error("Attribute type not specified.");throw y.attribute=f,y}if(typeof f.shortName>"u"){if(f.name&&f.name in rr)f.shortName=rr[f.name]}if(f.type===bt.extensionRequest){if(f.valueConstructed=!0,f.valueTagClass=P.Type.SEQUENCE,!f.value&&f.extensions){f.value=[];for(var x=0;x<f.extensions.length;++x)f.value.push(ge.certificateExtensionToAsn1($5(f.extensions[x])))}}if(typeof f.value>"u"){var y=Error("Attribute value not specified.");throw y.attribute=f,y}}}function $5(o,f){if(f=f||{},typeof o.name>"u"){if(o.id&&o.id in ge.oids)o.name=ge.oids[o.id]}if(typeof o.id>"u")if(o.name&&o.name in ge.oids)o.id=ge.oids[o.name];else{var h=Error("Extension ID not specified.");throw h.extension=o,h}if(typeof o.value<"u")return o;if(o.name==="keyUsage"){var y=0,x=0,_=0;if(o.digitalSignature)x|=128,y=7;if(o.nonRepudiation)x|=64,y=6;if(o.keyEncipherment)x|=32,y=5;if(o.dataEncipherment)x|=16,y=4;if(o.keyAgreement)x|=8,y=3;if(o.keyCertSign)x|=4,y=2;if(o.cRLSign)x|=2,y=1;if(o.encipherOnly)x|=1,y=0;if(o.decipherOnly)_|=128,y=7;var z=String.fromCharCode(y);if(_!==0)z+=String.fromCharCode(x)+String.fromCharCode(_);else if(x!==0)z+=String.fromCharCode(x);o.value=P.create(P.Class.UNIVERSAL,P.Type.BITSTRING,!1,z)}else if(o.name==="basicConstraints"){if(o.value=P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[]),o.cA)o.value.value.push(P.create(P.Class.UNIVERSAL,P.Type.BOOLEAN,!1,String.fromCharCode(255)));if("pathLenConstraint"in o)o.value.value.push(P.create(P.Class.UNIVERSAL,P.Type.INTEGER,!1,P.integerToDer(o.pathLenConstraint).getBytes()))}else if(o.name==="extKeyUsage"){o.value=P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[]);var C=o.value.value;for(var w in o){if(o[w]!==!0)continue;if(w in bt)C.push(P.create(P.Class.UNIVERSAL,P.Type.OID,!1,P.oidToDer(bt[w]).getBytes()));else if(w.indexOf(".")!==-1)C.push(P.create(P.Class.UNIVERSAL,P.Type.OID,!1,P.oidToDer(w).getBytes()))}}else if(o.name==="nsCertType"){var y=0,x=0;if(o.client)x|=128,y=7;if(o.server)x|=64,y=6;if(o.email)x|=32,y=5;if(o.objsign)x|=16,y=4;if(o.reserved)x|=8,y=3;if(o.sslCA)x|=4,y=2;if(o.emailCA)x|=2,y=1;if(o.objCA)x|=1,y=0;var z=String.fromCharCode(y);if(x!==0)z+=String.fromCharCode(x);o.value=P.create(P.Class.UNIVERSAL,P.Type.BITSTRING,!1,z)}else if(o.name==="subjectAltName"||o.name==="issuerAltName"){o.value=P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[]);var S;for(var E=0;E<o.altNames.length;++E){S=o.altNames[E];var z=S.value;if(S.type===7&&S.ip){if(z=Me.util.bytesFromIP(S.ip),z===null){var h=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw h.extension=o,h}}else if(S.type===8)if(S.oid)z=P.oidToDer(P.oidToDer(S.oid));else z=P.oidToDer(z);o.value.value.push(P.create(P.Class.CONTEXT_SPECIFIC,S.type,!1,z))}}else if(o.name==="nsComment"&&f.cert){if(!/^[\x00-\x7F]*$/.test(o.comment)||o.comment.length<1||o.comment.length>128)throw Error('Invalid "nsComment" content.');o.value=P.create(P.Class.UNIVERSAL,P.Type.IA5STRING,!1,o.comment)}else if(o.name==="subjectKeyIdentifier"&&f.cert){var k=f.cert.generateSubjectKeyIdentifier();o.subjectKeyIdentifier=k.toHex(),o.value=P.create(P.Class.UNIVERSAL,P.Type.OCTETSTRING,!1,k.getBytes())}else if(o.name==="authorityKeyIdentifier"&&f.cert){o.value=P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[]);var C=o.value.value;if(o.keyIdentifier){var O=o.keyIdentifier===!0?f.cert.generateSubjectKeyIdentifier().getBytes():o.keyIdentifier;C.push(P.create(P.Class.CONTEXT_SPECIFIC,0,!1,O))}if(o.authorityCertIssuer){var R=[P.create(P.Class.CONTEXT_SPECIFIC,4,!0,[bc(o.authorityCertIssuer===!0?f.cert.issuer:o.authorityCertIssuer)])];C.push(P.create(P.Class.CONTEXT_SPECIFIC,1,!0,R))}if(o.serialNumber){var I=Me.util.hexToBytes(o.serialNumber===!0?f.cert.serialNumber:o.serialNumber);C.push(P.create(P.Class.CONTEXT_SPECIFIC,2,!1,I))}}else if(o.name==="cRLDistributionPoints"){o.value=P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[]);var C=o.value.value,A=P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[]),M=P.create(P.Class.CONTEXT_SPECIFIC,0,!0,[]),S;for(var E=0;E<o.altNames.length;++E){S=o.altNames[E];var z=S.value;if(S.type===7&&S.ip){if(z=Me.util.bytesFromIP(S.ip),z===null){var h=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw h.extension=o,h}}else if(S.type===8)if(S.oid)z=P.oidToDer(P.oidToDer(S.oid));else z=P.oidToDer(z);M.value.push(P.create(P.Class.CONTEXT_SPECIFIC,S.type,!1,z))}A.value.push(P.create(P.Class.CONTEXT_SPECIFIC,0,!0,[M])),C.push(A)}if(typeof o.value>"u"){var h=Error("Extension value not specified.");throw h.extension=o,h}return o}function Qx(o,f){switch(o){case bt["RSASSA-PSS"]:var h=[];if(f.hash.algorithmOid!==void 0)h.push(P.create(P.Class.CONTEXT_SPECIFIC,0,!0,[P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[P.create(P.Class.UNIVERSAL,P.Type.OID,!1,P.oidToDer(f.hash.algorithmOid).getBytes()),P.create(P.Class.UNIVERSAL,P.Type.NULL,!1,"")])]));if(f.mgf.algorithmOid!==void 0)h.push(P.create(P.Class.CONTEXT_SPECIFIC,1,!0,[P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[P.create(P.Class.UNIVERSAL,P.Type.OID,!1,P.oidToDer(f.mgf.algorithmOid).getBytes()),P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[P.create(P.Class.UNIVERSAL,P.Type.OID,!1,P.oidToDer(f.mgf.hash.algorithmOid).getBytes()),P.create(P.Class.UNIVERSAL,P.Type.NULL,!1,"")])])]));if(f.saltLength!==void 0)h.push(P.create(P.Class.CONTEXT_SPECIFIC,2,!0,[P.create(P.Class.UNIVERSAL,P.Type.INTEGER,!1,P.integerToDer(f.saltLength).getBytes())]));return P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,h);default:return P.create(P.Class.UNIVERSAL,P.Type.NULL,!1,"")}}function sze(o){var f=P.create(P.Class.CONTEXT_SPECIFIC,0,!0,[]);if(o.attributes.length===0)return f;var h=o.attributes;for(var y=0;y<h.length;++y){var x=h[y],_=x.value,z=P.Type.UTF8;if("valueTagClass"in x)z=x.valueTagClass;if(z===P.Type.UTF8)_=Me.util.encodeUtf8(_);var C=!1;if("valueConstructed"in x)C=x.valueConstructed;var w=P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[P.create(P.Class.UNIVERSAL,P.Type.OID,!1,P.oidToDer(x.type).getBytes()),P.create(P.Class.UNIVERSAL,P.Type.SET,!0,[P.create(P.Class.UNIVERSAL,z,C,_)])]);f.value.push(w)}return f}var aze=new Date("1950-01-01T00:00:00Z"),cze=new Date("2050-01-01T00:00:00Z");function q5(o){if(o>=aze&&o<cze)return P.create(P.Class.UNIVERSAL,P.Type.UTCTIME,!1,P.dateToUtcTime(o));else return P.create(P.Class.UNIVERSAL,P.Type.GENERALIZEDTIME,!1,P.dateToGeneralizedTime(o))}ge.getTBSCertificate=function(o){var f=q5(o.validity.notBefore),h=q5(o.validity.notAfter),y=P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[P.create(P.Class.CONTEXT_SPECIFIC,0,!0,[P.create(P.Class.UNIVERSAL,P.Type.INTEGER,!1,P.integerToDer(o.version).getBytes())]),P.create(P.Class.UNIVERSAL,P.Type.INTEGER,!1,Me.util.hexToBytes(o.serialNumber)),P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[P.create(P.Class.UNIVERSAL,P.Type.OID,!1,P.oidToDer(o.siginfo.algorithmOid).getBytes()),Qx(o.siginfo.algorithmOid,o.siginfo.parameters)]),bc(o.issuer),P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[f,h]),bc(o.subject),ge.publicKeyToAsn1(o.publicKey)]);if(o.issuer.uniqueId)y.value.push(P.create(P.Class.CONTEXT_SPECIFIC,1,!0,[P.create(P.Class.UNIVERSAL,P.Type.BITSTRING,!1,String.fromCharCode(0)+o.issuer.uniqueId)]));if(o.subject.uniqueId)y.value.push(P.create(P.Class.CONTEXT_SPECIFIC,2,!0,[P.create(P.Class.UNIVERSAL,P.Type.BITSTRING,!1,String.fromCharCode(0)+o.subject.uniqueId)]));if(o.extensions.length>0)y.value.push(ge.certificateExtensionsToAsn1(o.extensions));return y};ge.getCertificationRequestInfo=function(o){var f=P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[P.create(P.Class.UNIVERSAL,P.Type.INTEGER,!1,P.integerToDer(o.version).getBytes()),bc(o.subject),ge.publicKeyToAsn1(o.publicKey),sze(o)]);return f};ge.distinguishedNameToAsn1=function(o){return bc(o)};ge.certificateToAsn1=function(o){var f=o.tbsCertificate||ge.getTBSCertificate(o);return P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[f,P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[P.create(P.Class.UNIVERSAL,P.Type.OID,!1,P.oidToDer(o.signatureOid).getBytes()),Qx(o.signatureOid,o.signatureParameters)]),P.create(P.Class.UNIVERSAL,P.Type.BITSTRING,!1,String.fromCharCode(0)+o.signature)])};ge.certificateExtensionsToAsn1=function(o){var f=P.create(P.Class.CONTEXT_SPECIFIC,3,!0,[]),h=P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[]);f.value.push(h);for(var y=0;y<o.length;++y)h.value.push(ge.certificateExtensionToAsn1(o[y]));return f};ge.certificateExtensionToAsn1=function(o){var f=P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[]);if(f.value.push(P.create(P.Class.UNIVERSAL,P.Type.OID,!1,P.oidToDer(o.id).getBytes())),o.critical)f.value.push(P.create(P.Class.UNIVERSAL,P.Type.BOOLEAN,!1,String.fromCharCode(255)));var h=o.value;if(typeof o.value!=="string")h=P.toDer(h).getBytes();return f.value.push(P.create(P.Class.UNIVERSAL,P.Type.OCTETSTRING,!1,h)),f};ge.certificationRequestToAsn1=function(o){var f=o.certificationRequestInfo||ge.getCertificationRequestInfo(o);return P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[f,P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[P.create(P.Class.UNIVERSAL,P.Type.OID,!1,P.oidToDer(o.signatureOid).getBytes()),Qx(o.signatureOid,o.signatureParameters)]),P.create(P.Class.UNIVERSAL,P.Type.BITSTRING,!1,String.fromCharCode(0)+o.signature)])};ge.createCaStore=function(o){var f={certs:{}};f.getIssuer=function(z){var C=h(z.issuer);return C},f.addCertificate=function(z){if(typeof z==="string")z=Me.pki.certificateFromPem(z);if(y(z.subject),!f.hasCertificate(z))if(z.subject.hash in f.certs){var C=f.certs[z.subject.hash];if(!Me.util.isArray(C))C=[C];C.push(z),f.certs[z.subject.hash]=C}else f.certs[z.subject.hash]=z},f.hasCertificate=function(z){if(typeof z==="string")z=Me.pki.certificateFromPem(z);var C=h(z.subject);if(!C)return!1;if(!Me.util.isArray(C))C=[C];var w=P.toDer(ge.certificateToAsn1(z)).getBytes();for(var S=0;S<C.length;++S){var E=P.toDer(ge.certificateToAsn1(C[S])).getBytes();if(w===E)return!0}return!1},f.listAllCertificates=function(){var z=[];for(var C in f.certs)if(f.certs.hasOwnProperty(C)){var w=f.certs[C];if(!Me.util.isArray(w))z.push(w);else for(var S=0;S<w.length;++S)z.push(w[S])}return z},f.removeCertificate=function(z){var C;if(typeof z==="string")z=Me.pki.certificateFromPem(z);if(y(z.subject),!f.hasCertificate(z))return null;var w=h(z.subject);if(!Me.util.isArray(w))return C=f.certs[z.subject.hash],delete f.certs[z.subject.hash],C;var S=P.toDer(ge.certificateToAsn1(z)).getBytes();for(var E=0;E<w.length;++E){var k=P.toDer(ge.certificateToAsn1(w[E])).getBytes();if(S===k)C=w[E],w.splice(E,1)}if(w.length===0)delete f.certs[z.subject.hash];return C};function h(z){return y(z),f.certs[z.hash]||null}function y(z){if(!z.hash){var C=Me.md.sha1.create();z.attributes=ge.RDNAttributesAsArray(bc(z),C),z.hash=C.digest().toHex()}}if(o)for(var x=0;x<o.length;++x){var _=o[x];f.addCertificate(_)}return f};ge.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};ge.verifyCertificateChain=function(o,f,h){if(typeof h==="function")h={verify:h};h=h||{},f=f.slice(0);var y=f.slice(0),x=h.validityCheckDate;if(typeof x>"u")x=new Date;var _=!0,z=null,C=0;do{var w=f.shift(),S=null,E=!1;if(x){if(x<w.validity.notBefore||x>w.validity.notAfter)z={message:"Certificate is not valid yet or has expired.",error:ge.certificateError.certificate_expired,notBefore:w.validity.notBefore,notAfter:w.validity.notAfter,now:x}}if(z===null){if(S=f[0]||o.getIssuer(w),S===null){if(w.isIssuer(w))E=!0,S=w}if(S){var k=S;if(!Me.util.isArray(k))k=[k];var O=!1;while(!O&&k.length>0){S=k.shift();try{O=S.verify(w)}catch(Q){}}if(!O)z={message:"Certificate signature is invalid.",error:ge.certificateError.bad_certificate}}if(z===null&&(!S||E)&&!o.hasCertificate(w))z={message:"Certificate is not trusted.",error:ge.certificateError.unknown_ca}}if(z===null&&S&&!w.isIssuer(S))z={message:"Certificate issuer is invalid.",error:ge.certificateError.bad_certificate};if(z===null){var R={keyUsage:!0,basicConstraints:!0};for(var I=0;z===null&&I<w.extensions.length;++I){var A=w.extensions[I];if(A.critical&&!(A.name in R))z={message:"Certificate has an unsupported critical extension.",error:ge.certificateError.unsupported_certificate}}}if(z===null&&(!_||f.length===0&&(!S||E))){var M=w.getExtension("basicConstraints"),D=w.getExtension("keyUsage");if(D!==null){if(!D.keyCertSign||M===null)z={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:ge.certificateError.bad_certificate}}if(z===null&&M===null)z={message:"Certificate is missing basicConstraints extension and cannot be used as a CA.",error:ge.certificateError.bad_certificate};if(z===null&&M!==null&&!M.cA)z={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:ge.certificateError.bad_certificate};if(z===null&&D!==null&&"pathLenConstraint"in M){var U=C-1;if(U>M.pathLenConstraint)z={message:"Certificate basicConstraints pathLenConstraint violated.",error:ge.certificateError.bad_certificate}}}var F=z===null?!0:z.error,J=h.verify?h.verify(F,C,y):F;if(J===!0)z=null;else{if(F===!0)z={message:"The application rejected the certificate.",error:ge.certificateError.bad_certificate};if(J||J===0){if(typeof J==="object"&&!Me.util.isArray(J)){if(J.message)z.message=J.message;if(J.error)z.error=J.error}else if(typeof J==="string")z.error=J}throw z}_=!1,++C}while(f.length>0);return!0}});var t_=i(function(hLe,G5){var Ut=Xe();bn();lc();qi();Yx();Zx();Ho();Mu();fc();zt();Oh();var{asn1:G,pki:nt}=Ut,Fu=G5.exports=Ut.pkcs12=Ut.pkcs12||{},H5={name:"ContentInfo",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:G.Class.UNIVERSAL,type:G.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:G.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},lze={name:"PFX",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:G.Class.UNIVERSAL,type:G.Type.INTEGER,constructed:!1,capture:"version"},H5,{name:"PFX.macData",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:G.Class.UNIVERSAL,type:G.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",optional:!0,tagClass:G.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:G.Class.UNIVERSAL,type:G.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:G.Class.UNIVERSAL,type:G.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:G.Class.UNIVERSAL,type:G.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},uze={name:"SafeBag",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:G.Class.UNIVERSAL,type:G.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:G.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:G.Class.UNIVERSAL,type:G.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},dze={name:"Attribute",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:G.Class.UNIVERSAL,type:G.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:G.Class.UNIVERSAL,type:G.Type.SET,constructed:!0,capture:"values"}]},pze={name:"CertBag",tagClass:G.Class.UNIVERSAL,type:G.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:G.Class.UNIVERSAL,type:G.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:G.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:G.Class.UNIVERSAL,type:G.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function qu(o,f,h,y){var x=[];for(var _=0;_<o.length;_++)for(var z=0;z<o[_].safeBags.length;z++){var C=o[_].safeBags[z];if(y!==void 0&&C.type!==y)continue;if(f===null){x.push(C);continue}if(C.attributes[f]!==void 0&&C.attributes[f].indexOf(h)>=0)x.push(C)}return x}Fu.pkcs12FromAsn1=function(o,f,h){if(typeof f==="string")h=f,f=!0;else if(f===void 0)f=!0;var y={},x=[];if(!G.validate(o,lze,y,x)){var _=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw _.errors=_,_}var z={version:y.version.charCodeAt(0),safeContents:[],getBags:function(M){var D={},U;if("localKeyId"in M)U=M.localKeyId;else if("localKeyIdHex"in M)U=Ut.util.hexToBytes(M.localKeyIdHex);if(U===void 0&&!("friendlyName"in M)&&"bagType"in M)D[M.bagType]=qu(z.safeContents,null,null,M.bagType);if(U!==void 0)D.localKeyId=qu(z.safeContents,"localKeyId",U,M.bagType);if("friendlyName"in M)D.friendlyName=qu(z.safeContents,"friendlyName",M.friendlyName,M.bagType);return D},getBagsByFriendlyName:function(M,D){return qu(z.safeContents,"friendlyName",M,D)},getBagsByLocalKeyId:function(M,D){return qu(z.safeContents,"localKeyId",M,D)}};if(y.version.charCodeAt(0)!==3){var _=Error("PKCS#12 PFX of version other than 3 not supported.");throw _.version=y.version.charCodeAt(0),_}if(G.derToOid(y.contentType)!==nt.oids.data){var _=Error("Only PKCS#12 PFX in password integrity mode supported.");throw _.oid=G.derToOid(y.contentType),_}var C=y.content.value[0];if(C.tagClass!==G.Class.UNIVERSAL||C.type!==G.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(C=e_(C),y.mac){var w=null,S=0,E=G.derToOid(y.macAlgorithm);switch(E){case nt.oids.sha1:w=Ut.md.sha1.create(),S=20;break;case nt.oids.sha256:w=Ut.md.sha256.create(),S=32;break;case nt.oids.sha384:w=Ut.md.sha384.create(),S=48;break;case nt.oids.sha512:w=Ut.md.sha512.create(),S=64;break;case nt.oids.md5:w=Ut.md.md5.create(),S=16;break}if(w===null)throw Error("PKCS#12 uses unsupported MAC algorithm: "+E);var k=new Ut.util.ByteBuffer(y.macSalt),O="macIterations"in y?parseInt(Ut.util.bytesToHex(y.macIterations),16):1,R=Fu.generateKey(h,k,3,O,S,w),I=Ut.hmac.create();I.start(w,R),I.update(C.value);var A=I.getMac();if(A.getBytes()!==y.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?")}else if(Array.isArray(o.value)&&o.value.length>2)throw Error("Invalid PKCS#12. macData field present but MAC was not validated.");return fze(z,C.value,f,h),z};function e_(o){if(o.composed||o.constructed){var f=Ut.util.createBuffer();for(var h=0;h<o.value.length;++h)f.putBytes(o.value[h].value);o.composed=o.constructed=!1,o.value=f.getBytes()}return o}function fze(o,f,h,y){if(f=G.fromDer(f,h),f.tagClass!==G.Class.UNIVERSAL||f.type!==G.Type.SEQUENCE||f.constructed!==!0)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var x=0;x<f.value.length;x++){var _=f.value[x],z={},C=[];if(!G.validate(_,H5,z,C)){var w=Error("Cannot read ContentInfo.");throw w.errors=C,w}var S={encrypted:!1},E=null,k=z.content.value[0];switch(G.derToOid(z.contentType)){case nt.oids.data:if(k.tagClass!==G.Class.UNIVERSAL||k.type!==G.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");E=e_(k).value;break;case nt.oids.encryptedData:E=hze(k,y),S.encrypted=!0;break;default:var w=Error("Unsupported PKCS#12 contentType.");throw w.contentType=G.derToOid(z.contentType),w}S.safeBags=mze(E,h,y),o.safeContents.push(S)}}function hze(o,f){var h={},y=[];if(!G.validate(o,Ut.pkcs7.asn1.encryptedDataValidator,h,y)){var x=Error("Cannot read EncryptedContentInfo.");throw x.errors=y,x}var _=G.derToOid(h.contentType);if(_!==nt.oids.data){var x=Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw x.oid=_,x}_=G.derToOid(h.encAlgorithm);var z=nt.pbe.getCipher(_,h.encParameter,f),C=e_(h.encryptedContentAsn1),w=Ut.util.createBuffer(C.value);if(z.update(w),!z.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");return z.output.getBytes()}function mze(o,f,h){if(!f&&o.length===0)return[];if(o=G.fromDer(o,f),o.tagClass!==G.Class.UNIVERSAL||o.type!==G.Type.SEQUENCE||o.constructed!==!0)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");var y=[];for(var x=0;x<o.value.length;x++){var _=o.value[x],z={},C=[];if(!G.validate(_,uze,z,C)){var w=Error("Cannot read SafeBag.");throw w.errors=C,w}var S={type:G.derToOid(z.bagId),attributes:gze(z.bagAttributes)};y.push(S);var E,k,O=z.bagValue.value[0];switch(S.type){case nt.oids.pkcs8ShroudedKeyBag:if(O=nt.decryptPrivateKeyInfo(O,h),O===null)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case nt.oids.keyBag:try{S.key=nt.privateKeyFromAsn1(O)}catch(I){S.key=null,S.asn1=O}continue;case nt.oids.certBag:E=pze,k=function(){if(G.derToOid(z.certId)!==nt.oids.x509Certificate){var I=Error("Unsupported certificate type, only X.509 supported.");throw I.oid=G.derToOid(z.certId),I}var A=G.fromDer(z.cert,f);try{S.cert=nt.certificateFromAsn1(A,!0)}catch(M){S.cert=null,S.asn1=A}};break;default:var w=Error("Unsupported PKCS#12 SafeBag type.");throw w.oid=S.type,w}if(E!==void 0&&!G.validate(O,E,z,C)){var w=Error("Cannot read PKCS#12 "+E.name);throw w.errors=C,w}k()}return y}function gze(o){var f={};if(o!==void 0)for(var h=0;h<o.length;++h){var y={},x=[];if(!G.validate(o[h],dze,y,x)){var _=Error("Cannot read PKCS#12 BagAttribute.");throw _.errors=x,_}var z=G.derToOid(y.oid);if(nt.oids[z]===void 0)continue;f[nt.oids[z]]=[];for(var C=0;C<y.values.length;++C)f[nt.oids[z]].push(y.values[C].value)}return f}Fu.toPkcs12Asn1=function(o,f,h,y){if(y=y||{},y.saltSize=y.saltSize||8,y.count=y.count||2048,y.algorithm=y.algorithm||y.encAlgorithm||"aes128",!("useMac"in y))y.useMac=!0;if(!("localKeyId"in y))y.localKeyId=null;if(!("generateLocalKeyId"in y))y.generateLocalKeyId=!0;var x=y.localKeyId,_;if(x!==null)x=Ut.util.hexToBytes(x);else if(y.generateLocalKeyId)if(f){var z=Ut.util.isArray(f)?f[0]:f;if(typeof z==="string")z=nt.certificateFromPem(z);var C=Ut.md.sha1.create();C.update(G.toDer(nt.certificateToAsn1(z)).getBytes()),x=C.digest().getBytes()}else x=Ut.random.getBytes(20);var w=[];if(x!==null)w.push(G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(nt.oids.localKeyId).getBytes()),G.create(G.Class.UNIVERSAL,G.Type.SET,!0,[G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,x)])]));if("friendlyName"in y)w.push(G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(nt.oids.friendlyName).getBytes()),G.create(G.Class.UNIVERSAL,G.Type.SET,!0,[G.create(G.Class.UNIVERSAL,G.Type.BMPSTRING,!1,y.friendlyName)])]));if(w.length>0)_=G.create(G.Class.UNIVERSAL,G.Type.SET,!0,w);var S=[],E=[];if(f!==null)if(Ut.util.isArray(f))E=f;else E=[f];var k=[];for(var O=0;O<E.length;++O){if(f=E[O],typeof f==="string")f=nt.certificateFromPem(f);var R=O===0?_:void 0,I=nt.certificateToAsn1(f),A=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(nt.oids.certBag).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(nt.oids.x509Certificate).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,G.toDer(I).getBytes())])])]),R]);k.push(A)}if(k.length>0){var M=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,k),D=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(nt.oids.data).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,G.toDer(M).getBytes())])]);S.push(D)}var U=null;if(o!==null){var F=nt.wrapRsaPrivateKey(nt.privateKeyToAsn1(o));if(h===null)U=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(nt.oids.keyBag).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[F]),_]);else U=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(nt.oids.pkcs8ShroudedKeyBag).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[nt.encryptPrivateKeyInfo(F,h,y)]),_]);var J=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[U]),Q=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(nt.oids.data).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,G.toDer(J).getBytes())])]);S.push(Q)}var te=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,S),le;if(y.useMac){var C=Ut.md.sha1.create(),he=new Ut.util.ByteBuffer(Ut.random.getBytes(y.saltSize)),xe=y.count,o=Fu.generateKey(h,he,3,xe,20),Re=Ut.hmac.create();Re.start(C,o),Re.update(G.toDer(te).getBytes());var me=Re.getMac();le=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(nt.oids.sha1).getBytes()),G.create(G.Class.UNIVERSAL,G.Type.NULL,!1,"")]),G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,me.getBytes())]),G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,he.getBytes()),G.create(G.Class.UNIVERSAL,G.Type.INTEGER,!1,G.integerToDer(xe).getBytes())])}return G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.INTEGER,!1,G.integerToDer(3).getBytes()),G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[G.create(G.Class.UNIVERSAL,G.Type.OID,!1,G.oidToDer(nt.oids.data).getBytes()),G.create(G.Class.CONTEXT_SPECIFIC,0,!0,[G.create(G.Class.UNIVERSAL,G.Type.OCTETSTRING,!1,G.toDer(te).getBytes())])]),le])};Fu.generateKey=Ut.pbe.generatePkcs12Key});var o_=i(function(mLe,K5){var Vi=Xe();bn();qi();Zx();Us();vh();t_();Th();Mu();zt();Oh();var r_=Vi.asn1,vc=K5.exports=Vi.pki=Vi.pki||{};vc.pemToDer=function(o){var f=Vi.pem.decode(o)[0];if(f.procType&&f.procType.type==="ENCRYPTED")throw Error("Could not convert PEM to DER; PEM is encrypted.");return Vi.util.createBuffer(f.body)};vc.privateKeyFromPem=function(o){var f=Vi.pem.decode(o)[0];if(f.type!=="PRIVATE KEY"&&f.type!=="RSA PRIVATE KEY"){var h=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw h.headerType=f.type,h}if(f.procType&&f.procType.type==="ENCRYPTED")throw Error("Could not convert private key from PEM; PEM is encrypted.");var y=r_.fromDer(f.body);return vc.privateKeyFromAsn1(y)};vc.privateKeyToPem=function(o,f){var h={type:"RSA PRIVATE KEY",body:r_.toDer(vc.privateKeyToAsn1(o)).getBytes()};return Vi.pem.encode(h,{maxline:f})};vc.privateKeyInfoToPem=function(o,f){var h={type:"PRIVATE KEY",body:r_.toDer(o).getBytes()};return Vi.pem.encode(h,{maxline:f})}});var l_=i(function(gLe,tq){var de=Xe();bn();lc();mh();Us();o_();Ho();fc();zt();var Ah=function(o,f,h,y){var x=de.util.createBuffer(),_=o.length>>1,z=_+(o.length&1),C=o.substr(0,z),w=o.substr(_,z),S=de.util.createBuffer(),E=de.hmac.create();h=f+h;var k=Math.ceil(y/16),O=Math.ceil(y/20);E.start("MD5",C);var R=de.util.createBuffer();S.putBytes(h);for(var I=0;I<k;++I)E.start(null,null),E.update(S.getBytes()),S.putBuffer(E.digest()),E.start(null,null),E.update(S.bytes()+h),R.putBuffer(E.digest());E.start("SHA1",w);var A=de.util.createBuffer();S.clear(),S.putBytes(h);for(var I=0;I<O;++I)E.start(null,null),E.update(S.getBytes()),S.putBuffer(E.digest()),E.start(null,null),E.update(S.bytes()+h),A.putBuffer(E.digest());return x.putBytes(de.util.xorBytes(R.getBytes(),A.getBytes(),y)),x},yze=function(o,f,h){var y=de.hmac.create();y.start("SHA1",o);var x=de.util.createBuffer();return x.putInt32(f[0]),x.putInt32(f[1]),x.putByte(h.type),x.putByte(h.version.major),x.putByte(h.version.minor),x.putInt16(h.length),x.putBytes(h.fragment.bytes()),y.update(x.getBytes()),y.digest().getBytes()},bze=function(o,f,h){var y=!1;try{var x=o.deflate(f.fragment.getBytes());f.fragment=de.util.createBuffer(x),f.length=x.length,y=!0}catch(_){}return y},vze=function(o,f,h){var y=!1;try{var x=o.inflate(f.fragment.getBytes());f.fragment=de.util.createBuffer(x),f.length=x.length,y=!0}catch(_){}return y},Io=function(o,f){var h=0;switch(f){case 1:h=o.getByte();break;case 2:h=o.getInt16();break;case 3:h=o.getInt24();break;case 4:h=o.getInt32();break}return de.util.createBuffer(o.getBytes(h))},Jo=function(o,f,h){o.putInt(h.length(),f<<3),o.putBuffer(h)},L={};L.Versions={TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}};L.SupportedVersions=[L.Versions.TLS_1_1,L.Versions.TLS_1_0];L.Version=L.SupportedVersions[0];L.MaxFragment=15360;L.ConnectionEnd={server:0,client:1};L.PRFAlgorithm={tls_prf_sha256:0};L.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};L.CipherType={stream:0,block:1,aead:2};L.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};L.CompressionMethod={none:0,deflate:1};L.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24};L.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};L.Alert={};L.Alert.Level={warning:1,fatal:2};L.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100};L.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};L.CipherSuites={};L.getCipherSuite=function(o){var f=null;for(var h in L.CipherSuites){var y=L.CipherSuites[h];if(y.id[0]===o.charCodeAt(0)&&y.id[1]===o.charCodeAt(1)){f=y;break}}return f};L.handleUnexpected=function(o,f){var h=!o.open&&o.entity===L.ConnectionEnd.client;if(!h)o.error(o,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.unexpected_message}})};L.handleHelloRequest=function(o,f,h){if(!o.handshaking&&o.handshakes>0)L.queue(o,L.createAlert(o,{level:L.Alert.Level.warning,description:L.Alert.Description.no_renegotiation})),L.flush(o);o.process()};L.parseHelloMessage=function(o,f,h){var y=null,x=o.entity===L.ConnectionEnd.client;if(h<38)o.error(o,{message:x?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.illegal_parameter}});else{var _=f.fragment,z=_.length();if(y={version:{major:_.getByte(),minor:_.getByte()},random:de.util.createBuffer(_.getBytes(32)),session_id:Io(_,1),extensions:[]},x)y.cipher_suite=_.getBytes(2),y.compression_method=_.getByte();else y.cipher_suites=Io(_,2),y.compression_methods=Io(_,1);if(z=h-(z-_.length()),z>0){var C=Io(_,2);while(C.length()>0)y.extensions.push({type:[C.getByte(),C.getByte()],data:Io(C,2)});if(!x)for(var w=0;w<y.extensions.length;++w){var S=y.extensions[w];if(S.type[0]===0&&S.type[1]===0){var E=Io(S.data,2);while(E.length()>0){var k=E.getByte();if(k!==0)break;o.session.extensions.server_name.serverNameList.push(Io(E,2).getBytes())}}}}if(o.session.version){if(y.version.major!==o.session.version.major||y.version.minor!==o.session.version.minor)return o.error(o,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.protocol_version}})}if(x)o.session.cipherSuite=L.getCipherSuite(y.cipher_suite);else{var O=de.util.createBuffer(y.cipher_suites.bytes());while(O.length()>0)if(o.session.cipherSuite=L.getCipherSuite(O.getBytes(2)),o.session.cipherSuite!==null)break}if(o.session.cipherSuite===null)return o.error(o,{message:"No cipher suites in common.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.handshake_failure},cipherSuite:de.util.bytesToHex(y.cipher_suite)});if(x)o.session.compressionMethod=y.compression_method;else o.session.compressionMethod=L.CompressionMethod.none}return y};L.createSecurityParameters=function(o,f){var h=o.entity===L.ConnectionEnd.client,y=f.random.bytes(),x=h?o.session.sp.client_random:y,_=h?y:L.createRandom().getBytes();o.session.sp={entity:o.entity,prf_algorithm:L.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:o.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:x,server_random:_}};L.handleServerHello=function(o,f,h){var y=L.parseHelloMessage(o,f,h);if(o.fail)return;if(y.version.minor<=o.version.minor)o.version.minor=y.version.minor;else return o.error(o,{message:"Incompatible TLS version.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.protocol_version}});o.session.version=o.version;var x=y.session_id.bytes();if(x.length>0&&x===o.session.id)o.expect=Z5,o.session.resuming=!0,o.session.sp.server_random=y.random.bytes();else o.expect=_ze,o.session.resuming=!1,L.createSecurityParameters(o,y);o.session.id=x,o.process()};L.handleClientHello=function(o,f,h){var y=L.parseHelloMessage(o,f,h);if(o.fail)return;var x=y.session_id.bytes(),_=null;if(o.sessionCache){if(_=o.sessionCache.getSession(x),_===null)x="";else if(_.version.major!==y.version.major||_.version.minor>y.version.minor)_=null,x=""}if(x.length===0)x=de.random.getBytes(32);if(o.session.id=x,o.session.clientHelloVersion=y.version,o.session.sp={},_)o.version=o.session.version=_.version,o.session.sp=_.sp;else{var z;for(var C=1;C<L.SupportedVersions.length;++C)if(z=L.SupportedVersions[C],z.minor<=y.version.minor)break;o.version={major:z.major,minor:z.minor},o.session.version=o.version}if(_!==null)o.expect=a_,o.session.resuming=!0,o.session.sp.client_random=y.random.bytes();else o.expect=o.verifyClient!==!1?kze:s_,o.session.resuming=!1,L.createSecurityParameters(o,y);if(o.open=!0,L.queue(o,L.createRecord(o,{type:L.ContentType.handshake,data:L.createServerHello(o)})),o.session.resuming)L.queue(o,L.createRecord(o,{type:L.ContentType.change_cipher_spec,data:L.createChangeCipherSpec()})),o.state.pending=L.createConnectionState(o),o.state.current.write=o.state.pending.write,L.queue(o,L.createRecord(o,{type:L.ContentType.handshake,data:L.createFinished(o)}));else if(L.queue(o,L.createRecord(o,{type:L.ContentType.handshake,data:L.createCertificate(o)})),!o.fail){if(L.queue(o,L.createRecord(o,{type:L.ContentType.handshake,data:L.createServerKeyExchange(o)})),o.verifyClient!==!1)L.queue(o,L.createRecord(o,{type:L.ContentType.handshake,data:L.createCertificateRequest(o)}));L.queue(o,L.createRecord(o,{type:L.ContentType.handshake,data:L.createServerHelloDone(o)}))}L.flush(o),o.process()};L.handleCertificate=function(o,f,h){if(h<3)return o.error(o,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.illegal_parameter}});var y=f.fragment,x={certificate_list:Io(y,3)},_,z,C=[];try{while(x.certificate_list.length()>0)_=Io(x.certificate_list,3),z=de.asn1.fromDer(_),_=de.pki.certificateFromAsn1(z,!0),C.push(_)}catch(S){return o.error(o,{message:"Could not parse certificate list.",cause:S,send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.bad_certificate}})}var w=o.entity===L.ConnectionEnd.client;if((w||o.verifyClient===!0)&&C.length===0)o.error(o,{message:w?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.illegal_parameter}});else if(C.length===0)o.expect=w?W5:s_;else{if(w)o.session.serverCertificate=C[0];else o.session.clientCertificate=C[0];if(L.verifyCertificateChain(o,C))o.expect=w?W5:s_}o.process()};L.handleServerKeyExchange=function(o,f,h){if(h>0)return o.error(o,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.unsupported_certificate}});o.expect=zze,o.process()};L.handleClientKeyExchange=function(o,f,h){if(h<48)return o.error(o,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.unsupported_certificate}});var y=f.fragment,x={enc_pre_master_secret:Io(y,2).getBytes()},_=null;if(o.getPrivateKey)try{_=o.getPrivateKey(o,o.session.serverCertificate),_=de.pki.privateKeyFromPem(_)}catch(w){o.error(o,{message:"Could not get private key.",cause:w,send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}})}if(_===null)return o.error(o,{message:"No private key set.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}});try{var z=o.session.sp;z.pre_master_secret=_.decrypt(x.enc_pre_master_secret);var C=o.session.clientHelloVersion;if(C.major!==z.pre_master_secret.charCodeAt(0)||C.minor!==z.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.")}catch(w){z.pre_master_secret=de.random.getBytes(48)}if(o.expect=a_,o.session.clientCertificate!==null)o.expect=Oze;o.process()};L.handleCertificateRequest=function(o,f,h){if(h<3)return o.error(o,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.illegal_parameter}});var y=f.fragment,x={certificate_types:Io(y,1),certificate_authorities:Io(y,2)};o.session.certificateRequest=x,o.expect=Cze,o.process()};L.handleCertificateVerify=function(o,f,h){if(h<2)return o.error(o,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.illegal_parameter}});var y=f.fragment;y.read-=4;var x=y.bytes();y.read+=4;var _={signature:Io(y,2).getBytes()},z=de.util.createBuffer();z.putBuffer(o.session.md5.digest()),z.putBuffer(o.session.sha1.digest()),z=z.getBytes();try{var C=o.session.clientCertificate;if(!C.publicKey.verify(z,_.signature,"NONE"))throw Error("CertificateVerify signature does not match.");o.session.md5.update(x),o.session.sha1.update(x)}catch(w){return o.error(o,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.handshake_failure}})}o.expect=a_,o.process()};L.handleServerHelloDone=function(o,f,h){if(h>0)return o.error(o,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.record_overflow}});if(o.serverCertificate===null){var y={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.insufficient_security}},x=0,_=o.verify(o,y.alert.description,x,[]);if(_!==!0){if(_||_===0){if(typeof _==="object"&&!de.util.isArray(_)){if(_.message)y.message=_.message;if(_.alert)y.alert.description=_.alert}else if(typeof _==="number")y.alert.description=_}return o.error(o,y)}}if(o.session.certificateRequest!==null)f=L.createRecord(o,{type:L.ContentType.handshake,data:L.createCertificate(o)}),L.queue(o,f);f=L.createRecord(o,{type:L.ContentType.handshake,data:L.createClientKeyExchange(o)}),L.queue(o,f),o.expect=Tze;var z=function(C,w){if(C.session.certificateRequest!==null&&C.session.clientCertificate!==null)L.queue(C,L.createRecord(C,{type:L.ContentType.handshake,data:L.createCertificateVerify(C,w)}));L.queue(C,L.createRecord(C,{type:L.ContentType.change_cipher_spec,data:L.createChangeCipherSpec()})),C.state.pending=L.createConnectionState(C),C.state.current.write=C.state.pending.write,L.queue(C,L.createRecord(C,{type:L.ContentType.handshake,data:L.createFinished(C)})),C.expect=Z5,L.flush(C),C.process()};if(o.session.certificateRequest===null||o.session.clientCertificate===null)return z(o,null);L.getClientSignature(o,z)};L.handleChangeCipherSpec=function(o,f){if(f.fragment.getByte()!==1)return o.error(o,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.illegal_parameter}});var h=o.entity===L.ConnectionEnd.client;if(o.session.resuming&&h||!o.session.resuming&&!h)o.state.pending=L.createConnectionState(o);if(o.state.current.read=o.state.pending.read,!o.session.resuming&&h||o.session.resuming&&!h)o.state.pending=null;o.expect=h?wze:Ize,o.process()};L.handleFinished=function(o,f,h){var y=f.fragment;y.read-=4;var x=y.bytes();y.read+=4;var _=f.fragment.getBytes();y=de.util.createBuffer(),y.putBuffer(o.session.md5.digest()),y.putBuffer(o.session.sha1.digest());var z=o.entity===L.ConnectionEnd.client,C=z?"server finished":"client finished",w=o.session.sp,S=12,E=Ah;if(y=E(w.master_secret,C,y.getBytes(),S),y.getBytes()!==_)return o.error(o,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.decrypt_error}});if(o.session.md5.update(x),o.session.sha1.update(x),o.session.resuming&&z||!o.session.resuming&&!z)L.queue(o,L.createRecord(o,{type:L.ContentType.change_cipher_spec,data:L.createChangeCipherSpec()})),o.state.current.write=o.state.pending.write,o.state.pending=null,L.queue(o,L.createRecord(o,{type:L.ContentType.handshake,data:L.createFinished(o)}));o.expect=z?Sze:Rze,o.handshaking=!1,++o.handshakes,o.peerCertificate=z?o.session.serverCertificate:o.session.clientCertificate,L.flush(o),o.isConnected=!0,o.connected(o),o.process()};L.handleAlert=function(o,f){var h=f.fragment,y={level:h.getByte(),description:h.getByte()},x;switch(y.description){case L.Alert.Description.close_notify:x="Connection closed.";break;case L.Alert.Description.unexpected_message:x="Unexpected message.";break;case L.Alert.Description.bad_record_mac:x="Bad record MAC.";break;case L.Alert.Description.decryption_failed:x="Decryption failed.";break;case L.Alert.Description.record_overflow:x="Record overflow.";break;case L.Alert.Description.decompression_failure:x="Decompression failed.";break;case L.Alert.Description.handshake_failure:x="Handshake failure.";break;case L.Alert.Description.bad_certificate:x="Bad certificate.";break;case L.Alert.Description.unsupported_certificate:x="Unsupported certificate.";break;case L.Alert.Description.certificate_revoked:x="Certificate revoked.";break;case L.Alert.Description.certificate_expired:x="Certificate expired.";break;case L.Alert.Description.certificate_unknown:x="Certificate unknown.";break;case L.Alert.Description.illegal_parameter:x="Illegal parameter.";break;case L.Alert.Description.unknown_ca:x="Unknown certificate authority.";break;case L.Alert.Description.access_denied:x="Access denied.";break;case L.Alert.Description.decode_error:x="Decode error.";break;case L.Alert.Description.decrypt_error:x="Decrypt error.";break;case L.Alert.Description.export_restriction:x="Export restriction.";break;case L.Alert.Description.protocol_version:x="Unsupported protocol version.";break;case L.Alert.Description.insufficient_security:x="Insufficient security.";break;case L.Alert.Description.internal_error:x="Internal error.";break;case L.Alert.Description.user_canceled:x="User canceled.";break;case L.Alert.Description.no_renegotiation:x="Renegotiation not supported.";break;default:x="Unknown error.";break}if(y.description===L.Alert.Description.close_notify)return o.close();o.error(o,{message:x,send:!1,origin:o.entity===L.ConnectionEnd.client?"server":"client",alert:y}),o.process()};L.handleHandshake=function(o,f){var h=f.fragment,y=h.getByte(),x=h.getInt24();if(x>h.length())return o.fragmented=f,f.fragment=de.util.createBuffer(),h.read-=4,o.process();o.fragmented=null,h.read-=4;var _=h.bytes(x+4);if(h.read+=4,y in Rh[o.entity][o.expect]){if(o.entity===L.ConnectionEnd.server&&!o.open&&!o.fail)o.handshaking=!0,o.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:de.md.md5.create(),sha1:de.md.sha1.create()};if(y!==L.HandshakeType.hello_request&&y!==L.HandshakeType.certificate_verify&&y!==L.HandshakeType.finished)o.session.md5.update(_),o.session.sha1.update(_);Rh[o.entity][o.expect][y](o,f,x)}else L.handleUnexpected(o,f)};L.handleApplicationData=function(o,f){o.data.putBuffer(f.fragment),o.dataReady(o),o.process()};L.handleHeartbeat=function(o,f){var h=f.fragment,y=h.getByte(),x=h.getInt16(),_=h.getBytes(x);if(y===L.HeartbeatMessageType.heartbeat_request){if(o.handshaking||x>_.length)return o.process();L.queue(o,L.createRecord(o,{type:L.ContentType.heartbeat,data:L.createHeartbeat(L.HeartbeatMessageType.heartbeat_response,_)})),L.flush(o)}else if(y===L.HeartbeatMessageType.heartbeat_response){if(_!==o.expectedHeartbeatPayload)return o.process();if(o.heartbeatReceived)o.heartbeatReceived(o,de.util.createBuffer(_))}o.process()};var xze=0,_ze=1,W5=2,zze=3,Cze=4,Z5=5,wze=6,Sze=7,Tze=8,Eze=0,kze=1,s_=2,Oze=3,a_=4,Ize=5,Rze=6,{handleUnexpected:B,handleChangeCipherSpec:Y5,handleAlert:Mr,handleHandshake:oo,handleApplicationData:X5,handleHeartbeat:qr}=L,c_=[];c_[L.ConnectionEnd.client]=[[B,Mr,oo,B,qr],[B,Mr,oo,B,qr],[B,Mr,oo,B,qr],[B,Mr,oo,B,qr],[B,Mr,oo,B,qr],[Y5,Mr,B,B,qr],[B,Mr,oo,B,qr],[B,Mr,oo,X5,qr],[B,Mr,oo,B,qr]];c_[L.ConnectionEnd.server]=[[B,Mr,oo,B,qr],[B,Mr,oo,B,qr],[B,Mr,oo,B,qr],[B,Mr,oo,B,qr],[Y5,Mr,B,B,qr],[B,Mr,oo,B,qr],[B,Mr,oo,X5,qr],[B,Mr,oo,B,qr]];var{handleHelloRequest:Hi,handleServerHello:Aze,handleCertificate:Q5,handleServerKeyExchange:J5,handleCertificateRequest:n_,handleServerHelloDone:Ih,handleFinished:eq}=L,Rh=[];Rh[L.ConnectionEnd.client]=[[B,B,Aze,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B],[Hi,B,B,B,B,B,B,B,B,B,B,Q5,J5,n_,Ih,B,B,B,B,B,B],[Hi,B,B,B,B,B,B,B,B,B,B,B,J5,n_,Ih,B,B,B,B,B,B],[Hi,B,B,B,B,B,B,B,B,B,B,B,B,n_,Ih,B,B,B,B,B,B],[Hi,B,B,B,B,B,B,B,B,B,B,B,B,B,Ih,B,B,B,B,B,B],[Hi,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B],[Hi,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,eq],[Hi,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B],[Hi,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B]];var{handleClientHello:Pze,handleClientKeyExchange:Bze,handleCertificateVerify:Dze}=L;Rh[L.ConnectionEnd.server]=[[B,Pze,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B],[B,B,B,B,B,B,B,B,B,B,B,Q5,B,B,B,B,B,B,B,B,B],[B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,Bze,B,B,B,B],[B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,Dze,B,B,B,B,B],[B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B],[B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,eq],[B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B],[B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B]];L.generateKeys=function(o,f){var h=Ah,y=f.client_random+f.server_random;if(!o.session.resuming)f.master_secret=h(f.pre_master_secret,"master secret",y,48).bytes(),f.pre_master_secret=null;y=f.server_random+f.client_random;var x=2*f.mac_key_length+2*f.enc_key_length,_=o.version.major===L.Versions.TLS_1_0.major&&o.version.minor===L.Versions.TLS_1_0.minor;if(_)x+=2*f.fixed_iv_length;var z=h(f.master_secret,"key expansion",y,x),C={client_write_MAC_key:z.getBytes(f.mac_key_length),server_write_MAC_key:z.getBytes(f.mac_key_length),client_write_key:z.getBytes(f.enc_key_length),server_write_key:z.getBytes(f.enc_key_length)};if(_)C.client_write_IV=z.getBytes(f.fixed_iv_length),C.server_write_IV=z.getBytes(f.fixed_iv_length);return C};L.createConnectionState=function(o){var f=o.entity===L.ConnectionEnd.client,h=function(){var _={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(z){return!0},compressionState:null,compressFunction:function(z){return!0},updateSequenceNumber:function(){if(_.sequenceNumber[1]===4294967295)_.sequenceNumber[1]=0,++_.sequenceNumber[0];else++_.sequenceNumber[1]}};return _},y={read:h(),write:h()};if(y.read.update=function(_,z){if(!y.read.cipherFunction(z,y.read))_.error(_,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.bad_record_mac}});else if(!y.read.compressFunction(_,z,y.read))_.error(_,{message:"Could not decompress record.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.decompression_failure}});return!_.fail},y.write.update=function(_,z){if(!y.write.compressFunction(_,z,y.write))_.error(_,{message:"Could not compress record.",send:!1,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}});else if(!y.write.cipherFunction(z,y.write))_.error(_,{message:"Could not encrypt record.",send:!1,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}});return!_.fail},o.session){var x=o.session.sp;switch(o.session.cipherSuite.initSecurityParameters(x),x.keys=L.generateKeys(o,x),y.read.macKey=f?x.keys.server_write_MAC_key:x.keys.client_write_MAC_key,y.write.macKey=f?x.keys.client_write_MAC_key:x.keys.server_write_MAC_key,o.session.cipherSuite.initConnectionState(y,o,x),x.compression_algorithm){case L.CompressionMethod.none:break;case L.CompressionMethod.deflate:y.read.compressFunction=vze,y.write.compressFunction=bze;break;default:throw Error("Unsupported compression algorithm.")}}return y};L.createRandom=function(){var o=new Date,f=+o+o.getTimezoneOffset()*60000,h=de.util.createBuffer();return h.putInt32(f),h.putBytes(de.random.getBytes(28)),h};L.createRecord=function(o,f){if(!f.data)return null;var h={type:f.type,version:{major:o.version.major,minor:o.version.minor},length:f.data.length(),fragment:f.data};return h};L.createAlert=function(o,f){var h=de.util.createBuffer();return h.putByte(f.level),h.putByte(f.description),L.createRecord(o,{type:L.ContentType.alert,data:h})};L.createClientHello=function(o){o.session.clientHelloVersion={major:o.version.major,minor:o.version.minor};var f=de.util.createBuffer();for(var h=0;h<o.cipherSuites.length;++h){var y=o.cipherSuites[h];f.putByte(y.id[0]),f.putByte(y.id[1])}var x=f.length(),_=de.util.createBuffer();_.putByte(L.CompressionMethod.none);var z=_.length(),C=de.util.createBuffer();if(o.virtualHost){var w=de.util.createBuffer();w.putByte(0),w.putByte(0);var S=de.util.createBuffer();S.putByte(0),Jo(S,2,de.util.createBuffer(o.virtualHost));var E=de.util.createBuffer();Jo(E,2,S),Jo(w,2,E),C.putBuffer(w)}var k=C.length();if(k>0)k+=2;var O=o.session.id,R=O.length+1+2+4+28+2+x+1+z+k,I=de.util.createBuffer();if(I.putByte(L.HandshakeType.client_hello),I.putInt24(R),I.putByte(o.version.major),I.putByte(o.version.minor),I.putBytes(o.session.sp.client_random),Jo(I,1,de.util.createBuffer(O)),Jo(I,2,f),Jo(I,1,_),k>0)Jo(I,2,C);return I};L.createServerHello=function(o){var f=o.session.id,h=f.length+1+2+4+28+2+1,y=de.util.createBuffer();return y.putByte(L.HandshakeType.server_hello),y.putInt24(h),y.putByte(o.version.major),y.putByte(o.version.minor),y.putBytes(o.session.sp.server_random),Jo(y,1,de.util.createBuffer(f)),y.putByte(o.session.cipherSuite.id[0]),y.putByte(o.session.cipherSuite.id[1]),y.putByte(o.session.compressionMethod),y};L.createCertificate=function(o){var f=o.entity===L.ConnectionEnd.client,h=null;if(o.getCertificate){var y;if(f)y=o.session.certificateRequest;else y=o.session.extensions.server_name.serverNameList;h=o.getCertificate(o,y)}var x=de.util.createBuffer();if(h!==null)try{if(!de.util.isArray(h))h=[h];var _=null;for(var z=0;z<h.length;++z){var C=de.pem.decode(h[z])[0];if(C.type!=="CERTIFICATE"&&C.type!=="X509 CERTIFICATE"&&C.type!=="TRUSTED CERTIFICATE"){var w=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw w.headerType=C.type,w}if(C.procType&&C.procType.type==="ENCRYPTED")throw Error("Could not convert certificate from PEM; PEM is encrypted.");var S=de.util.createBuffer(C.body);if(_===null)_=de.asn1.fromDer(S.bytes(),!1);var E=de.util.createBuffer();Jo(E,3,S),x.putBuffer(E)}if(h=de.pki.certificateFromAsn1(_),f)o.session.clientCertificate=h;else o.session.serverCertificate=h}catch(R){return o.error(o,{message:"Could not send certificate list.",cause:R,send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.bad_certificate}})}var k=3+x.length(),O=de.util.createBuffer();return O.putByte(L.HandshakeType.certificate),O.putInt24(k),Jo(O,3,x),O};L.createClientKeyExchange=function(o){var f=de.util.createBuffer();f.putByte(o.session.clientHelloVersion.major),f.putByte(o.session.clientHelloVersion.minor),f.putBytes(de.random.getBytes(46));var h=o.session.sp;h.pre_master_secret=f.getBytes();var y=o.session.serverCertificate.publicKey;f=y.encrypt(h.pre_master_secret);var x=f.length+2,_=de.util.createBuffer();return _.putByte(L.HandshakeType.client_key_exchange),_.putInt24(x),_.putInt16(f.length),_.putBytes(f),_};L.createServerKeyExchange=function(o){var f=0,h=de.util.createBuffer();if(f>0)h.putByte(L.HandshakeType.server_key_exchange),h.putInt24(f);return h};L.getClientSignature=function(o,f){var h=de.util.createBuffer();h.putBuffer(o.session.md5.digest()),h.putBuffer(o.session.sha1.digest()),h=h.getBytes(),o.getSignature=o.getSignature||function(y,x,_){var z=null;if(y.getPrivateKey)try{z=y.getPrivateKey(y,y.session.clientCertificate),z=de.pki.privateKeyFromPem(z)}catch(C){y.error(y,{message:"Could not get private key.",cause:C,send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}})}if(z===null)y.error(y,{message:"No private key set.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}});else x=z.sign(x,null);_(y,x)},o.getSignature(o,h,f)};L.createCertificateVerify=function(o,f){var h=f.length+2,y=de.util.createBuffer();return y.putByte(L.HandshakeType.certificate_verify),y.putInt24(h),y.putInt16(f.length),y.putBytes(f),y};L.createCertificateRequest=function(o){var f=de.util.createBuffer();f.putByte(1);var h=de.util.createBuffer();for(var y in o.caStore.certs){var x=o.caStore.certs[y],_=de.pki.distinguishedNameToAsn1(x.subject),z=de.asn1.toDer(_);h.putInt16(z.length()),h.putBuffer(z)}var C=1+f.length()+2+h.length(),w=de.util.createBuffer();return w.putByte(L.HandshakeType.certificate_request),w.putInt24(C),Jo(w,1,f),Jo(w,2,h),w};L.createServerHelloDone=function(o){var f=de.util.createBuffer();return f.putByte(L.HandshakeType.server_hello_done),f.putInt24(0),f};L.createChangeCipherSpec=function(){var o=de.util.createBuffer();return o.putByte(1),o};L.createFinished=function(o){var f=de.util.createBuffer();f.putBuffer(o.session.md5.digest()),f.putBuffer(o.session.sha1.digest());var h=o.entity===L.ConnectionEnd.client,y=o.session.sp,x=12,_=Ah,z=h?"client finished":"server finished";f=_(y.master_secret,z,f.getBytes(),x);var C=de.util.createBuffer();return C.putByte(L.HandshakeType.finished),C.putInt24(f.length()),C.putBuffer(f),C};L.createHeartbeat=function(o,f,h){if(typeof h>"u")h=f.length;var y=de.util.createBuffer();y.putByte(o),y.putInt16(h),y.putBytes(f);var x=y.length(),_=Math.max(16,x-h-3);return y.putBytes(de.random.getBytes(_)),y};L.queue=function(o,f){if(!f)return;if(f.fragment.length()===0){if(f.type===L.ContentType.handshake||f.type===L.ContentType.alert||f.type===L.ContentType.change_cipher_spec)return}if(f.type===L.ContentType.handshake){var h=f.fragment.bytes();o.session.md5.update(h),o.session.sha1.update(h),h=null}var y;if(f.fragment.length()<=L.MaxFragment)y=[f];else{y=[];var x=f.fragment.bytes();while(x.length>L.MaxFragment)y.push(L.createRecord(o,{type:f.type,data:de.util.createBuffer(x.slice(0,L.MaxFragment))})),x=x.slice(L.MaxFragment);if(x.length>0)y.push(L.createRecord(o,{type:f.type,data:de.util.createBuffer(x)}))}for(var _=0;_<y.length&&!o.fail;++_){var z=y[_],C=o.state.current.write;if(C.update(o,z))o.records.push(z)}};L.flush=function(o){for(var f=0;f<o.records.length;++f){var h=o.records[f];o.tlsData.putByte(h.type),o.tlsData.putByte(h.version.major),o.tlsData.putByte(h.version.minor),o.tlsData.putInt16(h.fragment.length()),o.tlsData.putBuffer(o.records[f].fragment)}return o.records=[],o.tlsDataReady(o)};var i_=function(o){switch(o){case!0:return!0;case de.pki.certificateError.bad_certificate:return L.Alert.Description.bad_certificate;case de.pki.certificateError.unsupported_certificate:return L.Alert.Description.unsupported_certificate;case de.pki.certificateError.certificate_revoked:return L.Alert.Description.certificate_revoked;case de.pki.certificateError.certificate_expired:return L.Alert.Description.certificate_expired;case de.pki.certificateError.certificate_unknown:return L.Alert.Description.certificate_unknown;case de.pki.certificateError.unknown_ca:return L.Alert.Description.unknown_ca;default:return L.Alert.Description.bad_certificate}},Lze=function(o){switch(o){case!0:return!0;case L.Alert.Description.bad_certificate:return de.pki.certificateError.bad_certificate;case L.Alert.Description.unsupported_certificate:return de.pki.certificateError.unsupported_certificate;case L.Alert.Description.certificate_revoked:return de.pki.certificateError.certificate_revoked;case L.Alert.Description.certificate_expired:return de.pki.certificateError.certificate_expired;case L.Alert.Description.certificate_unknown:return de.pki.certificateError.certificate_unknown;case L.Alert.Description.unknown_ca:return de.pki.certificateError.unknown_ca;default:return de.pki.certificateError.bad_certificate}};L.verifyCertificateChain=function(o,f){try{var h={};for(var y in o.verifyOptions)h[y]=o.verifyOptions[y];h.verify=function(_,z,C){var w=i_(_),S=o.verify(o,_,z,C);if(S!==!0){if(typeof S==="object"&&!de.util.isArray(S)){var E=Error("The application rejected the certificate.");if(E.send=!0,E.alert={level:L.Alert.Level.fatal,description:L.Alert.Description.bad_certificate},S.message)E.message=S.message;if(S.alert)E.alert.description=S.alert;throw E}if(S!==_)S=Lze(S)}return S},de.pki.verifyCertificateChain(o.caStore,f,h)}catch(_){var x=_;if(typeof x!=="object"||de.util.isArray(x))x={send:!0,alert:{level:L.Alert.Level.fatal,description:i_(_)}};if(!("send"in x))x.send=!0;if(!("alert"in x))x.alert={level:L.Alert.Level.fatal,description:i_(x.error)};o.error(o,x)}return!o.fail};L.createSessionCache=function(o,f){var h=null;if(o&&o.getSession&&o.setSession&&o.order)h=o;else{h={},h.cache=o||{},h.capacity=Math.max(f||100,1),h.order=[];for(var y in o)if(h.order.length<=f)h.order.push(y);else delete o[y];h.getSession=function(x){var _=null,z=null;if(x)z=de.util.bytesToHex(x);else if(h.order.length>0)z=h.order[0];if(z!==null&&z in h.cache){_=h.cache[z],delete h.cache[z];for(var C in h.order)if(h.order[C]===z){h.order.splice(C,1);break}}return _},h.setSession=function(x,_){if(h.order.length===h.capacity){var z=h.order.shift();delete h.cache[z]}var z=de.util.bytesToHex(x);h.order.push(z),h.cache[z]=_}}return h};L.createConnection=function(o){var f=null;if(o.caStore)if(de.util.isArray(o.caStore))f=de.pki.createCaStore(o.caStore);else f=o.caStore;else f=de.pki.createCaStore();var h=o.cipherSuites||null;if(h===null){h=[];for(var y in L.CipherSuites)h.push(L.CipherSuites[y])}var x=o.server?L.ConnectionEnd.server:L.ConnectionEnd.client,_=o.sessionCache?L.createSessionCache(o.sessionCache):null,z={version:{major:L.Version.major,minor:L.Version.minor},entity:x,sessionId:o.sessionId,caStore:f,sessionCache:_,cipherSuites:h,connected:o.connected,virtualHost:o.virtualHost||null,verifyClient:o.verifyClient||!1,verify:o.verify||function(E,k,O,R){return k},verifyOptions:o.verifyOptions||{},getCertificate:o.getCertificate||null,getPrivateKey:o.getPrivateKey||null,getSignature:o.getSignature||null,input:de.util.createBuffer(),tlsData:de.util.createBuffer(),data:de.util.createBuffer(),tlsDataReady:o.tlsDataReady,dataReady:o.dataReady,heartbeatReceived:o.heartbeatReceived,closed:o.closed,error:function(E,k){if(k.origin=k.origin||(E.entity===L.ConnectionEnd.client?"client":"server"),k.send)L.queue(E,L.createAlert(E,k.alert)),L.flush(E);var O=k.fatal!==!1;if(O)E.fail=!0;if(o.error(E,k),O)E.close(!1)},deflate:o.deflate||null,inflate:o.inflate||null};z.reset=function(E){z.version={major:L.Version.major,minor:L.Version.minor},z.record=null,z.session=null,z.peerCertificate=null,z.state={pending:null,current:null},z.expect=z.entity===L.ConnectionEnd.client?xze:Eze,z.fragmented=null,z.records=[],z.open=!1,z.handshakes=0,z.handshaking=!1,z.isConnected=!1,z.fail=!(E||typeof E>"u"),z.input.clear(),z.tlsData.clear(),z.data.clear(),z.state.current=L.createConnectionState(z)},z.reset();var C=function(E,k){var O=k.type-L.ContentType.change_cipher_spec,R=c_[E.entity][E.expect];if(O in R)R[O](E,k);else L.handleUnexpected(E,k)},w=function(E){var k=0,O=E.input,R=O.length();if(R<5)k=5-R;else{E.record={type:O.getByte(),version:{major:O.getByte(),minor:O.getByte()},length:O.getInt16(),fragment:de.util.createBuffer(),ready:!1};var I=E.record.version.major===E.version.major;if(I&&E.session&&E.session.version)I=E.record.version.minor===E.version.minor;if(!I)E.error(E,{message:"Incompatible TLS version.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.protocol_version}})}return k},S=function(E){var k=0,O=E.input,R=O.length();if(R<E.record.length)k=E.record.length-R;else{E.record.fragment.putBytes(O.getBytes(E.record.length)),O.compact();var I=E.state.current.read;if(I.update(E,E.record)){if(E.fragmented!==null)if(E.fragmented.type===E.record.type)E.fragmented.fragment.putBuffer(E.record.fragment),E.record=E.fragmented;else E.error(E,{message:"Invalid fragmented record.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.unexpected_message}});E.record.ready=!0}}return k};return z.handshake=function(E){if(z.entity!==L.ConnectionEnd.client)z.error(z,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(z.handshaking)z.error(z,{message:"Handshake already in progress.",fatal:!1});else{if(z.fail&&!z.open&&z.handshakes===0)z.fail=!1;z.handshaking=!0,E=E||"";var k=null;if(E.length>0){if(z.sessionCache)k=z.sessionCache.getSession(E);if(k===null)E=""}if(E.length===0&&z.sessionCache){if(k=z.sessionCache.getSession(),k!==null)E=k.id}if(z.session={id:E,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:de.md.md5.create(),sha1:de.md.sha1.create()},k)z.version=k.version,z.session.sp=k.sp;z.session.sp.client_random=L.createRandom().getBytes(),z.open=!0,L.queue(z,L.createRecord(z,{type:L.ContentType.handshake,data:L.createClientHello(z)})),L.flush(z)}},z.process=function(E){var k=0;if(E)z.input.putBytes(E);if(!z.fail){if(z.record!==null&&z.record.ready&&z.record.fragment.isEmpty())z.record=null;if(z.record===null)k=w(z);if(!z.fail&&z.record!==null&&!z.record.ready)k=S(z);if(!z.fail&&z.record!==null&&z.record.ready)C(z,z.record)}return k},z.prepare=function(E){return L.queue(z,L.createRecord(z,{type:L.ContentType.application_data,data:de.util.createBuffer(E)})),L.flush(z)},z.prepareHeartbeatRequest=function(E,k){if(E instanceof de.util.ByteBuffer)E=E.bytes();if(typeof k>"u")k=E.length;return z.expectedHeartbeatPayload=E,L.queue(z,L.createRecord(z,{type:L.ContentType.heartbeat,data:L.createHeartbeat(L.HeartbeatMessageType.heartbeat_request,E,k)})),L.flush(z)},z.close=function(E){if(!z.fail&&z.sessionCache&&z.session){var k={id:z.session.id,version:z.session.version,sp:z.session.sp};k.sp.keys=null,z.sessionCache.setSession(k.id,k)}if(z.open){if(z.open=!1,z.input.clear(),z.isConnected||z.handshaking)z.isConnected=z.handshaking=!1,L.queue(z,L.createAlert(z,{level:L.Alert.Level.warning,description:L.Alert.Description.close_notify})),L.flush(z);z.closed(z)}z.reset(E)},z};tq.exports=de.tls=de.tls||{};for(Uu in L)if(typeof L[Uu]!=="function")de.tls[Uu]=L[Uu];var Uu;de.tls.prf_tls1=Ah;de.tls.hmac_sha1=yze;de.tls.createSessionCache=L.createSessionCache;de.tls.createConnection=L.createConnection});var nq=i(function(yLe,oq){var Gi=Xe();ji();l_();var Zo=oq.exports=Gi.tls;Zo.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(o){o.bulk_cipher_algorithm=Zo.BulkCipherAlgorithm.aes,o.cipher_type=Zo.CipherType.block,o.enc_key_length=16,o.block_length=16,o.fixed_iv_length=16,o.record_iv_length=16,o.mac_algorithm=Zo.MACAlgorithm.hmac_sha1,o.mac_length=20,o.mac_key_length=20},initConnectionState:rq};Zo.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(o){o.bulk_cipher_algorithm=Zo.BulkCipherAlgorithm.aes,o.cipher_type=Zo.CipherType.block,o.enc_key_length=32,o.block_length=16,o.fixed_iv_length=16,o.record_iv_length=16,o.mac_algorithm=Zo.MACAlgorithm.hmac_sha1,o.mac_length=20,o.mac_key_length=20},initConnectionState:rq};function rq(o,f,h){var y=f.entity===Gi.tls.ConnectionEnd.client;o.read.cipherState={init:!1,cipher:Gi.cipher.createDecipher("AES-CBC",y?h.keys.server_write_key:h.keys.client_write_key),iv:y?h.keys.server_write_IV:h.keys.client_write_IV},o.write.cipherState={init:!1,cipher:Gi.cipher.createCipher("AES-CBC",y?h.keys.client_write_key:h.keys.server_write_key),iv:y?h.keys.client_write_IV:h.keys.server_write_IV},o.read.cipherFunction=qze,o.write.cipherFunction=Nze,o.read.macLength=o.write.macLength=h.mac_length,o.read.macFunction=o.write.macFunction=Zo.hmac_sha1}function Nze(o,f){var h=!1,y=f.macFunction(f.macKey,f.sequenceNumber,o);o.fragment.putBytes(y),f.updateSequenceNumber();var x;if(o.version.minor===Zo.Versions.TLS_1_0.minor)x=f.cipherState.init?null:f.cipherState.iv;else x=Gi.random.getBytesSync(16);f.cipherState.init=!0;var _=f.cipherState.cipher;if(_.start({iv:x}),o.version.minor>=Zo.Versions.TLS_1_1.minor)_.output.putBytes(x);if(_.update(o.fragment),_.finish(jze))o.fragment=_.output,o.length=o.fragment.length(),h=!0;return h}function jze(o,f,h){if(!h){var y=o-f.length()%o;f.fillWithByte(y-1,y)}return!0}function Mze(o,f,h){var y=!0;if(h){var x=f.length(),_=f.last();for(var z=x-1-_;z<x-1;++z)y=y&&f.at(z)==_;if(y)f.truncate(_+1)}return y}function qze(o,f){var h=!1,y;if(o.version.minor===Zo.Versions.TLS_1_0.minor)y=f.cipherState.init?null:f.cipherState.iv;else y=o.fragment.getBytes(16);f.cipherState.init=!0;var x=f.cipherState.cipher;x.start({iv:y}),x.update(o.fragment),h=x.finish(Mze);var _=f.macLength,z=Gi.random.getBytesSync(_),C=x.output.length();if(C>=_)o.fragment=x.output.getBytes(C-_),z=x.output.getBytes(_);else o.fragment=x.output.getBytes();o.fragment=Gi.util.createBuffer(o.fragment),o.length=o.fragment.length();var w=f.macFunction(f.macKey,f.sequenceNumber,o);return f.updateSequenceNumber(),h=Fze(f.macKey,z,w)&&h,h}function Fze(o,f,h){var y=Gi.hmac.create();return y.start("SHA1",o),y.update(f),f=y.digest().getBytes(),y.start(null,null),y.update(h),h=y.digest().getBytes(),f===h}});var p_=i(function(bLe,cq){var Gt=Xe();Dn();zt();var $u=cq.exports=Gt.sha512=Gt.sha512||{};Gt.md.sha512=Gt.md.algorithms.sha512=$u;var sq=Gt.sha384=Gt.sha512.sha384=Gt.sha512.sha384||{};sq.create=function(){return $u.create("SHA-384")};Gt.md.sha384=Gt.md.algorithms.sha384=sq;Gt.sha512.sha256=Gt.sha512.sha256||{create:function(){return $u.create("SHA-512/256")}};Gt.md["sha512/256"]=Gt.md.algorithms["sha512/256"]=Gt.sha512.sha256;Gt.sha512.sha224=Gt.sha512.sha224||{create:function(){return $u.create("SHA-512/224")}};Gt.md["sha512/224"]=Gt.md.algorithms["sha512/224"]=Gt.sha512.sha224;$u.create=function(o){if(!aq)Uze();if(typeof o>"u")o="SHA-512";if(!(o in ta))throw Error("Invalid SHA-512 algorithm: "+o);var f=ta[o],h=null,y=Gt.util.createBuffer(),x=Array(80);for(var _=0;_<80;++_)x[_]=[,,];var z=64;switch(o){case"SHA-384":z=48;break;case"SHA-512/256":z=32;break;case"SHA-512/224":z=28;break}var C={algorithm:o.replace("-","").toLowerCase(),blockLength:128,digestLength:z,messageLength:0,fullMessageLength:null,messageLengthSize:16};return C.start=function(){C.messageLength=0,C.fullMessageLength=C.messageLength128=[];var w=C.messageLengthSize/4;for(var S=0;S<w;++S)C.fullMessageLength.push(0);y=Gt.util.createBuffer(),h=Array(f.length);for(var S=0;S<f.length;++S)h[S]=f[S].slice(0);return C},C.start(),C.update=function(w,S){if(S==="utf8")w=Gt.util.encodeUtf8(w);var E=w.length;C.messageLength+=E,E=[E/4294967296>>>0,E>>>0];for(var k=C.fullMessageLength.length-1;k>=0;--k)C.fullMessageLength[k]+=E[1],E[1]=E[0]+(C.fullMessageLength[k]/4294967296>>>0),C.fullMessageLength[k]=C.fullMessageLength[k]>>>0,E[0]=E[1]/4294967296>>>0;if(y.putBytes(w),iq(h,x,y),y.read>2048||y.length()===0)y.compact();return C},C.digest=function(){var w=Gt.util.createBuffer();w.putBytes(y.bytes());var S=C.fullMessageLength[C.fullMessageLength.length-1]+C.messageLengthSize,E=S&C.blockLength-1;w.putBytes(u_.substr(0,C.blockLength-E));var k,O,R=C.fullMessageLength[0]*8;for(var I=0;I<C.fullMessageLength.length-1;++I)k=C.fullMessageLength[I+1]*8,O=k/4294967296>>>0,R+=O,w.putInt32(R>>>0),R=k>>>0;w.putInt32(R);var A=Array(h.length);for(var I=0;I<h.length;++I)A[I]=h[I].slice(0);iq(A,x,w);var M=Gt.util.createBuffer(),D;if(o==="SHA-512")D=A.length;else if(o==="SHA-384")D=A.length-2;else D=A.length-4;for(var I=0;I<D;++I)if(M.putInt32(A[I][0]),I!==D-1||o!=="SHA-512/224")M.putInt32(A[I][1]);return M},C};var u_=null,aq=!1,d_=null,ta=null;function Uze(){u_=String.fromCharCode(128),u_+=Gt.util.fillString(String.fromCharCode(0),128),d_=[[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]],ta={},ta["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],ta["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],ta["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],ta["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],aq=!0}function iq(o,f,h){var y,x,_,z,C,w,S,E,k,O,R,I,A,M,D,U,F,J,Q,te,le,he,xe,Re,me,Ae,We,$e,De,re,oe,Ge,Bt,Se,Pe,Le=h.length();while(Le>=128){for(De=0;De<16;++De)f[De][0]=h.getInt32()>>>0,f[De][1]=h.getInt32()>>>0;for(;De<80;++De)Ge=f[De-2],re=Ge[0],oe=Ge[1],y=((re>>>19|oe<<13)^(oe>>>29|re<<3)^re>>>6)>>>0,x=((re<<13|oe>>>19)^(oe<<3|re>>>29)^(re<<26|oe>>>6))>>>0,Se=f[De-15],re=Se[0],oe=Se[1],_=((re>>>1|oe<<31)^(re>>>8|oe<<24)^re>>>7)>>>0,z=((re<<31|oe>>>1)^(re<<24|oe>>>8)^(re<<25|oe>>>7))>>>0,Bt=f[De-7],Pe=f[De-16],oe=x+Bt[1]+z+Pe[1],f[De][0]=y+Bt[0]+_+Pe[0]+(oe/4294967296>>>0)>>>0,f[De][1]=oe>>>0;A=o[0][0],M=o[0][1],D=o[1][0],U=o[1][1],F=o[2][0],J=o[2][1],Q=o[3][0],te=o[3][1],le=o[4][0],he=o[4][1],xe=o[5][0],Re=o[5][1],me=o[6][0],Ae=o[6][1],We=o[7][0],$e=o[7][1];for(De=0;De<80;++De)S=((le>>>14|he<<18)^(le>>>18|he<<14)^(he>>>9|le<<23))>>>0,E=((le<<18|he>>>14)^(le<<14|he>>>18)^(he<<23|le>>>9))>>>0,k=(me^le&(xe^me))>>>0,O=(Ae^he&(Re^Ae))>>>0,C=((A>>>28|M<<4)^(M>>>2|A<<30)^(M>>>7|A<<25))>>>0,w=((A<<4|M>>>28)^(M<<30|A>>>2)^(M<<25|A>>>7))>>>0,R=(A&D|F&(A^D))>>>0,I=(M&U|J&(M^U))>>>0,oe=$e+E+O+d_[De][1]+f[De][1],y=We+S+k+d_[De][0]+f[De][0]+(oe/4294967296>>>0)>>>0,x=oe>>>0,oe=w+I,_=C+R+(oe/4294967296>>>0)>>>0,z=oe>>>0,We=me,$e=Ae,me=xe,Ae=Re,xe=le,Re=he,oe=te+x,le=Q+y+(oe/4294967296>>>0)>>>0,he=oe>>>0,Q=F,te=J,F=D,J=U,D=A,U=M,oe=x+z,A=y+_+(oe/4294967296>>>0)>>>0,M=oe>>>0;oe=o[0][1]+M,o[0][0]=o[0][0]+A+(oe/4294967296>>>0)>>>0,o[0][1]=oe>>>0,oe=o[1][1]+U,o[1][0]=o[1][0]+D+(oe/4294967296>>>0)>>>0,o[1][1]=oe>>>0,oe=o[2][1]+J,o[2][0]=o[2][0]+F+(oe/4294967296>>>0)>>>0,o[2][1]=oe>>>0,oe=o[3][1]+te,o[3][0]=o[3][0]+Q+(oe/4294967296>>>0)>>>0,o[3][1]=oe>>>0,oe=o[4][1]+he,o[4][0]=o[4][0]+le+(oe/4294967296>>>0)>>>0,o[4][1]=oe>>>0,oe=o[5][1]+Re,o[5][0]=o[5][0]+xe+(oe/4294967296>>>0)>>>0,o[5][1]=oe>>>0,oe=o[6][1]+Ae,o[6][0]=o[6][0]+me+(oe/4294967296>>>0)>>>0,o[6][1]=oe>>>0,oe=o[7][1]+$e,o[7][0]=o[7][0]+We+(oe/4294967296>>>0)>>>0,o[7][1]=oe>>>0,Le-=128}}});var lq=i(function(Vze){var $ze=Xe();bn();var kr=$ze.asn1;Vze.privateKeyValidator={name:"PrivateKeyInfo",tagClass:kr.Class.UNIVERSAL,type:kr.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:kr.Class.UNIVERSAL,type:kr.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:kr.Class.UNIVERSAL,type:kr.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:kr.Class.UNIVERSAL,type:kr.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:kr.Class.UNIVERSAL,type:kr.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]};Vze.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:kr.Class.UNIVERSAL,type:kr.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:kr.Class.UNIVERSAL,type:kr.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:kr.Class.UNIVERSAL,type:kr.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:kr.Class.UNIVERSAL,type:kr.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}});var _q=i(function(xLe,xq){var Ur=Xe();ju();Ho();p_();zt();var hq=lq(),{publicKeyValidator:Kze,privateKeyValidator:Wze}=hq;if(typeof h_>"u")h_=Ur.jsbn.BigInteger;var h_,m_=Ur.util.ByteBuffer,_o=typeof Buffer>"u"?Uint8Array:Buffer;Ur.pki=Ur.pki||{};xq.exports=Ur.pki.ed25519=Ur.ed25519=Ur.ed25519||{};var it=Ur.ed25519;it.constants={};it.constants.PUBLIC_KEY_BYTE_LENGTH=32;it.constants.PRIVATE_KEY_BYTE_LENGTH=64;it.constants.SEED_BYTE_LENGTH=32;it.constants.SIGN_BYTE_LENGTH=64;it.constants.HASH_BYTE_LENGTH=64;it.generateKeyPair=function(o){o=o||{};var f=o.seed;if(f===void 0)f=Ur.random.getBytesSync(it.constants.SEED_BYTE_LENGTH);else if(typeof f==="string"){if(f.length!==it.constants.SEED_BYTE_LENGTH)throw TypeError('"seed" must be '+it.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(f instanceof Uint8Array))throw TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');f=li({message:f,encoding:"binary"});var h=new _o(it.constants.PUBLIC_KEY_BYTE_LENGTH),y=new _o(it.constants.PRIVATE_KEY_BYTE_LENGTH);for(var x=0;x<32;++x)y[x]=f[x];return Xze(h,y),{publicKey:h,privateKey:y}};it.privateKeyFromAsn1=function(o){var f={},h=[],y=Ur.asn1.validate(o,Wze,f,h);if(!y){var x=Error("Invalid Key.");throw x.errors=h,x}var _=Ur.asn1.derToOid(f.privateKeyOid),z=Ur.oids.EdDSA25519;if(_!==z)throw Error('Invalid OID "'+_+'"; OID must be "'+z+'".');var C=f.privateKey,w=li({message:Ur.asn1.fromDer(C).value,encoding:"binary"});return{privateKeyBytes:w}};it.publicKeyFromAsn1=function(o){var f={},h=[],y=Ur.asn1.validate(o,Kze,f,h);if(!y){var x=Error("Invalid Key.");throw x.errors=h,x}var _=Ur.asn1.derToOid(f.publicKeyOid),z=Ur.oids.EdDSA25519;if(_!==z)throw Error('Invalid OID "'+_+'"; OID must be "'+z+'".');var C=f.ed25519PublicKey;if(C.length!==it.constants.PUBLIC_KEY_BYTE_LENGTH)throw Error("Key length is invalid.");return li({message:C,encoding:"binary"})};it.publicKeyFromPrivateKey=function(o){o=o||{};var f=li({message:o.privateKey,encoding:"binary"});if(f.length!==it.constants.PRIVATE_KEY_BYTE_LENGTH)throw TypeError('"options.privateKey" must have a byte length of '+it.constants.PRIVATE_KEY_BYTE_LENGTH);var h=new _o(it.constants.PUBLIC_KEY_BYTE_LENGTH);for(var y=0;y<h.length;++y)h[y]=f[32+y];return h};it.sign=function(o){o=o||{};var f=li(o),h=li({message:o.privateKey,encoding:"binary"});if(h.length===it.constants.SEED_BYTE_LENGTH){var y=it.generateKeyPair({seed:h});h=y.privateKey}else if(h.length!==it.constants.PRIVATE_KEY_BYTE_LENGTH)throw TypeError('"options.privateKey" must have a byte length of '+it.constants.SEED_BYTE_LENGTH+" or "+it.constants.PRIVATE_KEY_BYTE_LENGTH);var x=new _o(it.constants.SIGN_BYTE_LENGTH+f.length);Qze(x,f,f.length,h);var _=new _o(it.constants.SIGN_BYTE_LENGTH);for(var z=0;z<_.length;++z)_[z]=x[z];return _};it.verify=function(o){o=o||{};var f=li(o);if(o.signature===void 0)throw TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var h=li({message:o.signature,encoding:"binary"});if(h.length!==it.constants.SIGN_BYTE_LENGTH)throw TypeError('"options.signature" must have a byte length of '+it.constants.SIGN_BYTE_LENGTH);var y=li({message:o.publicKey,encoding:"binary"});if(y.length!==it.constants.PUBLIC_KEY_BYTE_LENGTH)throw TypeError('"options.publicKey" must have a byte length of '+it.constants.PUBLIC_KEY_BYTE_LENGTH);var x=new _o(it.constants.SIGN_BYTE_LENGTH+f.length),_=new _o(it.constants.SIGN_BYTE_LENGTH+f.length),z;for(z=0;z<it.constants.SIGN_BYTE_LENGTH;++z)x[z]=h[z];for(z=0;z<f.length;++z)x[z+it.constants.SIGN_BYTE_LENGTH]=f[z];return e1e(_,x,x.length,y)>=0};function li(o){var f=o.message;if(f instanceof Uint8Array||f instanceof _o)return f;var h=o.encoding;if(f===void 0)if(o.md)f=o.md.digest().getBytes(),h="binary";else throw TypeError('"options.message" or "options.md" not specified.');if(typeof f==="string"&&!h)throw TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof f==="string"){if(typeof Buffer<"u")return Buffer.from(f,h);f=new m_(f,h)}else if(!(f instanceof m_))throw TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');var y=new _o(f.length());for(var x=0;x<y.length;++x)y[x]=f.at(x);return y}var g_=Ve(),Ph=Ve([1]),Jze=Ve([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),Zze=Ve([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),uq=Ve([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),dq=Ve([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),Vu=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),Yze=Ve([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function Hu(o,f){var h=Ur.md.sha512.create(),y=new m_(o);h.update(y.getBytes(f),"binary");var x=h.digest().getBytes();if(typeof Buffer<"u")return Buffer.from(x,"binary");var _=new _o(it.constants.HASH_BYTE_LENGTH);for(var z=0;z<64;++z)_[z]=x.charCodeAt(z);return _}function Xze(o,f){var h=[Ve(),Ve(),Ve(),Ve()],y,x=Hu(f,32);x[0]&=248,x[31]&=127,x[31]|=64,x_(h,x),v_(o,h);for(y=0;y<32;++y)f[y+32]=o[y];return 0}function Qze(o,f,h,y){var x,_,z=new Float64Array(64),C=[Ve(),Ve(),Ve(),Ve()],w=Hu(y,32);w[0]&=248,w[31]&=127,w[31]|=64;var S=h+64;for(x=0;x<h;++x)o[64+x]=f[x];for(x=0;x<32;++x)o[32+x]=w[32+x];var E=Hu(o.subarray(32),h+32);y_(E),x_(C,E),v_(o,C);for(x=32;x<64;++x)o[x]=y[x];var k=Hu(o,h+64);y_(k);for(x=32;x<64;++x)z[x]=0;for(x=0;x<32;++x)z[x]=E[x];for(x=0;x<32;++x)for(_=0;_<32;_++)z[x+_]+=k[x]*w[_];return mq(o.subarray(32),z),S}function e1e(o,f,h,y){var x,_,z=new _o(32),C=[Ve(),Ve(),Ve(),Ve()],w=[Ve(),Ve(),Ve(),Ve()];if(_=-1,h<64)return-1;if(r1e(w,y))return-1;if(!t1e(f,32))return-1;for(x=0;x<h;++x)o[x]=f[x];for(x=0;x<32;++x)o[x+32]=y[x];var S=Hu(o,h);if(y_(S),bq(C,w,S),x_(w,f.subarray(32)),b_(C,w),v_(z,C),h-=64,gq(f,0,z,0)){for(x=0;x<h;++x)o[x]=0;return-1}for(x=0;x<h;++x)o[x]=f[x+64];return _=h,_}function t1e(o,f){var h;for(h=31;h>=0;--h){if(o[f+h]<Vu[h])return!0;if(o[f+h]>Vu[h])return!1}return!1}function mq(o,f){var h,y,x,_;for(y=63;y>=32;--y){h=0;for(x=y-32,_=y-12;x<_;++x)f[x]+=h-16*f[y]*Vu[x-(y-32)],h=f[x]+128>>8,f[x]-=h*256;f[x]+=h,f[y]=0}h=0;for(x=0;x<32;++x)f[x]+=h-(f[31]>>4)*Vu[x],h=f[x]>>8,f[x]&=255;for(x=0;x<32;++x)f[x]-=h*Vu[x];for(y=0;y<32;++y)f[y+1]+=f[y]>>8,o[y]=f[y]&255}function y_(o){var f=new Float64Array(64);for(var h=0;h<64;++h)f[h]=o[h],o[h]=0;mq(o,f)}function b_(o,f){var h=Ve(),y=Ve(),x=Ve(),_=Ve(),z=Ve(),C=Ve(),w=Ve(),S=Ve(),E=Ve();_c(h,o[1],o[0]),_c(E,f[1],f[0]),Nt(h,h,E),xc(y,o[0],o[1]),xc(E,f[0],f[1]),Nt(y,y,E),Nt(x,o[3],f[3]),Nt(x,x,Zze),Nt(_,o[2],f[2]),xc(_,_,_),_c(z,y,h),_c(C,_,x),xc(w,_,x),xc(S,y,h),Nt(o[0],z,C),Nt(o[1],S,w),Nt(o[2],w,C),Nt(o[3],z,S)}function pq(o,f,h){for(var y=0;y<4;++y)vq(o[y],f[y],h)}function v_(o,f){var h=Ve(),y=Ve(),x=Ve();s1e(x,f[2]),Nt(h,f[0],x),Nt(y,f[1],x),Dh(o,y),o[31]^=yq(h)<<7}function Dh(o,f){var h,y,x,_=Ve(),z=Ve();for(h=0;h<16;++h)z[h]=f[h];f_(z),f_(z),f_(z);for(y=0;y<2;++y){_[0]=z[0]-65517;for(h=1;h<15;++h)_[h]=z[h]-65535-(_[h-1]>>16&1),_[h-1]&=65535;_[15]=z[15]-32767-(_[14]>>16&1),x=_[15]>>16&1,_[14]&=65535,vq(z,_,1-x)}for(h=0;h<16;h++)o[2*h]=z[h]&255,o[2*h+1]=z[h]>>8}function r1e(o,f){var h=Ve(),y=Ve(),x=Ve(),_=Ve(),z=Ve(),C=Ve(),w=Ve();if(Ki(o[2],Ph),o1e(o[1],f),ra(x,o[1]),Nt(_,x,Jze),_c(x,x,o[2]),xc(_,o[2],_),ra(z,_),ra(C,z),Nt(w,C,z),Nt(h,w,x),Nt(h,h,_),n1e(h,h),Nt(h,h,x),Nt(h,h,_),Nt(h,h,_),Nt(o[0],h,_),ra(y,o[0]),Nt(y,y,_),fq(y,x))Nt(o[0],o[0],Yze);if(ra(y,o[0]),Nt(y,y,_),fq(y,x))return-1;if(yq(o[0])===f[31]>>7)_c(o[0],g_,o[0]);return Nt(o[3],o[0],o[1]),0}function o1e(o,f){var h;for(h=0;h<16;++h)o[h]=f[2*h]+(f[2*h+1]<<8);o[15]&=32767}function n1e(o,f){var h=Ve(),y;for(y=0;y<16;++y)h[y]=f[y];for(y=250;y>=0;--y)if(ra(h,h),y!==1)Nt(h,h,f);for(y=0;y<16;++y)o[y]=h[y]}function fq(o,f){var h=new _o(32),y=new _o(32);return Dh(h,o),Dh(y,f),gq(h,0,y,0)}function gq(o,f,h,y){return i1e(o,f,h,y,32)}function i1e(o,f,h,y,x){var _,z=0;for(_=0;_<x;++_)z|=o[f+_]^h[y+_];return(1&z-1>>>8)-1}function yq(o){var f=new _o(32);return Dh(f,o),f[0]&1}function bq(o,f,h){var y,x;Ki(o[0],g_),Ki(o[1],Ph),Ki(o[2],Ph),Ki(o[3],g_);for(x=255;x>=0;--x)y=h[x/8|0]>>(x&7)&1,pq(o,f,y),b_(f,o),b_(o,o),pq(o,f,y)}function x_(o,f){var h=[Ve(),Ve(),Ve(),Ve()];Ki(h[0],uq),Ki(h[1],dq),Ki(h[2],Ph),Nt(h[3],uq,dq),bq(o,h,f)}function Ki(o,f){var h;for(h=0;h<16;h++)o[h]=f[h]|0}function s1e(o,f){var h=Ve(),y;for(y=0;y<16;++y)h[y]=f[y];for(y=253;y>=0;--y)if(ra(h,h),y!==2&&y!==4)Nt(h,h,f);for(y=0;y<16;++y)o[y]=h[y]}function f_(o){var f,h,y=1;for(f=0;f<16;++f)h=o[f]+y+65535,y=Math.floor(h/65536),o[f]=h-y*65536;o[0]+=y-1+37*(y-1)}function vq(o,f,h){var y,x=~(h-1);for(var _=0;_<16;++_)y=x&(o[_]^f[_]),o[_]^=y,f[_]^=y}function Ve(o){var f,h=new Float64Array(16);if(o)for(f=0;f<o.length;++f)h[f]=o[f];return h}function xc(o,f,h){for(var y=0;y<16;++y)o[y]=f[y]+h[y]}function _c(o,f,h){for(var y=0;y<16;++y)o[y]=f[y]-h[y]}function ra(o,f){Nt(o,f,f)}function Nt(o,f,h){var y,x,_=0,z=0,C=0,w=0,S=0,E=0,k=0,O=0,R=0,I=0,A=0,M=0,D=0,U=0,F=0,J=0,Q=0,te=0,le=0,he=0,xe=0,Re=0,me=0,Ae=0,We=0,$e=0,De=0,re=0,oe=0,Ge=0,Bt=0,Se=h[0],Pe=h[1],Le=h[2],He=h[3],st=h[4],Et=h[5],kt=h[6],Ne=h[7],qe=h[8],at=h[9],ut=h[10],Lt=h[11],ct=h[12],Fe=h[13],et=h[14],Rt=h[15];y=f[0],_+=y*Se,z+=y*Pe,C+=y*Le,w+=y*He,S+=y*st,E+=y*Et,k+=y*kt,O+=y*Ne,R+=y*qe,I+=y*at,A+=y*ut,M+=y*Lt,D+=y*ct,U+=y*Fe,F+=y*et,J+=y*Rt,y=f[1],z+=y*Se,C+=y*Pe,w+=y*Le,S+=y*He,E+=y*st,k+=y*Et,O+=y*kt,R+=y*Ne,I+=y*qe,A+=y*at,M+=y*ut,D+=y*Lt,U+=y*ct,F+=y*Fe,J+=y*et,Q+=y*Rt,y=f[2],C+=y*Se,w+=y*Pe,S+=y*Le,E+=y*He,k+=y*st,O+=y*Et,R+=y*kt,I+=y*Ne,A+=y*qe,M+=y*at,D+=y*ut,U+=y*Lt,F+=y*ct,J+=y*Fe,Q+=y*et,te+=y*Rt,y=f[3],w+=y*Se,S+=y*Pe,E+=y*Le,k+=y*He,O+=y*st,R+=y*Et,I+=y*kt,A+=y*Ne,M+=y*qe,D+=y*at,U+=y*ut,F+=y*Lt,J+=y*ct,Q+=y*Fe,te+=y*et,le+=y*Rt,y=f[4],S+=y*Se,E+=y*Pe,k+=y*Le,O+=y*He,R+=y*st,I+=y*Et,A+=y*kt,M+=y*Ne,D+=y*qe,U+=y*at,F+=y*ut,J+=y*Lt,Q+=y*ct,te+=y*Fe,le+=y*et,he+=y*Rt,y=f[5],E+=y*Se,k+=y*Pe,O+=y*Le,R+=y*He,I+=y*st,A+=y*Et,M+=y*kt,D+=y*Ne,U+=y*qe,F+=y*at,J+=y*ut,Q+=y*Lt,te+=y*ct,le+=y*Fe,he+=y*et,xe+=y*Rt,y=f[6],k+=y*Se,O+=y*Pe,R+=y*Le,I+=y*He,A+=y*st,M+=y*Et,D+=y*kt,U+=y*Ne,F+=y*qe,J+=y*at,Q+=y*ut,te+=y*Lt,le+=y*ct,he+=y*Fe,xe+=y*et,Re+=y*Rt,y=f[7],O+=y*Se,R+=y*Pe,I+=y*Le,A+=y*He,M+=y*st,D+=y*Et,U+=y*kt,F+=y*Ne,J+=y*qe,Q+=y*at,te+=y*ut,le+=y*Lt,he+=y*ct,xe+=y*Fe,Re+=y*et,me+=y*Rt,y=f[8],R+=y*Se,I+=y*Pe,A+=y*Le,M+=y*He,D+=y*st,U+=y*Et,F+=y*kt,J+=y*Ne,Q+=y*qe,te+=y*at,le+=y*ut,he+=y*Lt,xe+=y*ct,Re+=y*Fe,me+=y*et,Ae+=y*Rt,y=f[9],I+=y*Se,A+=y*Pe,M+=y*Le,D+=y*He,U+=y*st,F+=y*Et,J+=y*kt,Q+=y*Ne,te+=y*qe,le+=y*at,he+=y*ut,xe+=y*Lt,Re+=y*ct,me+=y*Fe,Ae+=y*et,We+=y*Rt,y=f[10],A+=y*Se,M+=y*Pe,D+=y*Le,U+=y*He,F+=y*st,J+=y*Et,Q+=y*kt,te+=y*Ne,le+=y*qe,he+=y*at,xe+=y*ut,Re+=y*Lt,me+=y*ct,Ae+=y*Fe,We+=y*et,$e+=y*Rt,y=f[11],M+=y*Se,D+=y*Pe,U+=y*Le,F+=y*He,J+=y*st,Q+=y*Et,te+=y*kt,le+=y*Ne,he+=y*qe,xe+=y*at,Re+=y*ut,me+=y*Lt,Ae+=y*ct,We+=y*Fe,$e+=y*et,De+=y*Rt,y=f[12],D+=y*Se,U+=y*Pe,F+=y*Le,J+=y*He,Q+=y*st,te+=y*Et,le+=y*kt,he+=y*Ne,xe+=y*qe,Re+=y*at,me+=y*ut,Ae+=y*Lt,We+=y*ct,$e+=y*Fe,De+=y*et,re+=y*Rt,y=f[13],U+=y*Se,F+=y*Pe,J+=y*Le,Q+=y*He,te+=y*st,le+=y*Et,he+=y*kt,xe+=y*Ne,Re+=y*qe,me+=y*at,Ae+=y*ut,We+=y*Lt,$e+=y*ct,De+=y*Fe,re+=y*et,oe+=y*Rt,y=f[14],F+=y*Se,J+=y*Pe,Q+=y*Le,te+=y*He,le+=y*st,he+=y*Et,xe+=y*kt,Re+=y*Ne,me+=y*qe,Ae+=y*at,We+=y*ut,$e+=y*Lt,De+=y*ct,re+=y*Fe,oe+=y*et,Ge+=y*Rt,y=f[15],J+=y*Se,Q+=y*Pe,te+=y*Le,le+=y*He,he+=y*st,xe+=y*Et,Re+=y*kt,me+=y*Ne,Ae+=y*qe,We+=y*at,$e+=y*ut,De+=y*Lt,re+=y*ct,oe+=y*Fe,Ge+=y*et,Bt+=y*Rt,_+=38*Q,z+=38*te,C+=38*le,w+=38*he,S+=38*xe,E+=38*Re,k+=38*me,O+=38*Ae,R+=38*We,I+=38*$e,A+=38*De,M+=38*re,D+=38*oe,U+=38*Ge,F+=38*Bt,x=1,y=_+x+65535,x=Math.floor(y/65536),_=y-x*65536,y=z+x+65535,x=Math.floor(y/65536),z=y-x*65536,y=C+x+65535,x=Math.floor(y/65536),C=y-x*65536,y=w+x+65535,x=Math.floor(y/65536),w=y-x*65536,y=S+x+65535,x=Math.floor(y/65536),S=y-x*65536,y=E+x+65535,x=Math.floor(y/65536),E=y-x*65536,y=k+x+65535,x=Math.floor(y/65536),k=y-x*65536,y=O+x+65535,x=Math.floor(y/65536),O=y-x*65536,y=R+x+65535,x=Math.floor(y/65536),R=y-x*65536,y=I+x+65535,x=Math.floor(y/65536),I=y-x*65536,y=A+x+65535,x=Math.floor(y/65536),A=y-x*65536,y=M+x+65535,x=Math.floor(y/65536),M=y-x*65536,y=D+x+65535,x=Math.floor(y/65536),D=y-x*65536,y=U+x+65535,x=Math.floor(y/65536),U=y-x*65536,y=F+x+65535,x=Math.floor(y/65536),F=y-x*65536,y=J+x+65535,x=Math.floor(y/65536),J=y-x*65536,_+=x-1+37*(x-1),x=1,y=_+x+65535,x=Math.floor(y/65536),_=y-x*65536,y=z+x+65535,x=Math.floor(y/65536),z=y-x*65536,y=C+x+65535,x=Math.floor(y/65536),C=y-x*65536,y=w+x+65535,x=Math.floor(y/65536),w=y-x*65536,y=S+x+65535,x=Math.floor(y/65536),S=y-x*65536,y=E+x+65535,x=Math.floor(y/65536),E=y-x*65536,y=k+x+65535,x=Math.floor(y/65536),k=y-x*65536,y=O+x+65535,x=Math.floor(y/65536),O=y-x*65536,y=R+x+65535,x=Math.floor(y/65536),R=y-x*65536,y=I+x+65535,x=Math.floor(y/65536),I=y-x*65536,y=A+x+65535,x=Math.floor(y/65536),A=y-x*65536,y=M+x+65535,x=Math.floor(y/65536),M=y-x*65536,y=D+x+65535,x=Math.floor(y/65536),D=y-x*65536,y=U+x+65535,x=Math.floor(y/65536),U=y-x*65536,y=F+x+65535,x=Math.floor(y/65536),F=y-x*65536,y=J+x+65535,x=Math.floor(y/65536),J=y-x*65536,_+=x-1+37*(x-1),o[0]=_,o[1]=z,o[2]=C,o[3]=w,o[4]=S,o[5]=E,o[6]=k,o[7]=O,o[8]=R,o[9]=I,o[10]=A,o[11]=M,o[12]=D,o[13]=U,o[14]=F,o[15]=J}});var Sq=i(function(_Le,wq){var Ro=Xe();zt();Ho();ju();wq.exports=Ro.kem=Ro.kem||{};var zq=Ro.jsbn.BigInteger;Ro.kem.rsa={};Ro.kem.rsa.create=function(o,f){f=f||{};var h=f.prng||Ro.random,y={};return y.encrypt=function(x,_){var z=Math.ceil(x.n.bitLength()/8),C;do C=new zq(Ro.util.bytesToHex(h.getBytesSync(z)),16).mod(x.n);while(C.compareTo(zq.ONE)<=0);C=Ro.util.hexToBytes(C.toString(16));var w=z-C.length;if(w>0)C=Ro.util.fillString(String.fromCharCode(0),w)+C;var S=x.encrypt(C,"NONE"),E=o.generate(C,_);return{encapsulation:S,key:E}},y.decrypt=function(x,_,z){var C=x.decrypt(_,"NONE");return o.generate(C,z)},y};Ro.kem.kdf1=function(o,f){Cq(this,o,0,f||o.digestLength)};Ro.kem.kdf2=function(o,f){Cq(this,o,1,f||o.digestLength)};function Cq(o,f,h,y){o.generate=function(x,_){var z=new Ro.util.ByteBuffer,C=Math.ceil(_/y)+h,w=new Ro.util.ByteBuffer;for(var S=h;S<C;++S){w.putInt32(S),f.start(),f.update(x+w.getBytes());var E=f.digest();z.putBytes(E.getBytes(y))}return z.truncate(z.length()-_),z.getBytes()}}});var Eq=i(function(zLe,Tq){var lt=Xe();zt();Tq.exports=lt.log=lt.log||{};lt.log.levels=["none","error","warning","info","debug","verbose","max"];var $h={},__=[],Gu=null;lt.log.LEVEL_LOCKED=2;lt.log.NO_LEVEL_CHECK=4;lt.log.INTERPOLATE=8;for(Yo=0;Yo<lt.log.levels.length;++Yo)jh=lt.log.levels[Yo],$h[jh]={index:Yo,name:jh.toUpperCase()};var jh,Yo;lt.log.logMessage=function(o){var f=$h[o.level].index;for(var h=0;h<__.length;++h){var y=__[h];if(y.flags&lt.log.NO_LEVEL_CHECK)y.f(o);else{var x=$h[y.level].index;if(f<=x)y.f(y,o)}}};lt.log.prepareStandard=function(o){if(!("standard"in o))o.standard=$h[o.level].name+" ["+o.category+"] "+o.message};lt.log.prepareFull=function(o){if(!("full"in o)){var f=[o.message];f=f.concat([]),o.full=lt.util.format.apply(this,f)}};lt.log.prepareStandardFull=function(o){if(!("standardFull"in o))lt.log.prepareStandard(o),o.standardFull=o.standard};qh=["error","warning","info","debug","verbose"];for(Yo=0;Yo<qh.length;++Yo)(function(f){lt.log[f]=function(h,y){var x=Array.prototype.slice.call(arguments).slice(2),_={timestamp:new Date,level:f,category:h,message:y,arguments:x};lt.log.logMessage(_)}})(qh[Yo]);var qh,Yo;lt.log.makeLogger=function(o){var f={flags:0,f:o};return lt.log.setLevel(f,"none"),f};lt.log.setLevel=function(o,f){var h=!1;if(o&&!(o.flags&lt.log.LEVEL_LOCKED))for(var y=0;y<lt.log.levels.length;++y){var x=lt.log.levels[y];if(f==x){o.level=f,h=!0;break}}return h};lt.log.lock=function(o,f){if(typeof f>"u"||f)o.flags|=lt.log.LEVEL_LOCKED;else o.flags&=~lt.log.LEVEL_LOCKED};lt.log.addLogger=function(o){__.push(o)};if(typeof console<"u"&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)z_={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},Cc=function(o,f){lt.log.prepareStandard(f);var h=z_[f.level],y=[f.standard];y=y.concat(f.arguments.slice()),h.apply(console,y)},oa=lt.log.makeLogger(Cc);else Cc=function(f,h){lt.log.prepareStandardFull(h),console.log(h.standardFull)},oa=lt.log.makeLogger(Cc);lt.log.setLevel(oa,"debug"),lt.log.addLogger(oa),Gu=oa}else console={log:function(){}};var oa,z_,Cc;if(Gu!==null&&typeof window<"u"&&window.location){if(zc=new URL(window.location.href).searchParams,zc.has("console.level"))lt.log.setLevel(Gu,zc.get("console.level").slice(-1)[0]);if(zc.has("console.lock")){if(C_=zc.get("console.lock").slice(-1)[0],C_=="true")lt.log.lock(Gu)}}var zc,C_;lt.log.consoleLogger=Gu});var Oq=i(function(CLe,kq){kq.exports=Dn();mh();fc();Lx();p_()});var Aq=i(function(wLe,Rq){var ze=Xe();ji();bn();Lu();qi();Us();Yx();Ho();zt();Oh();var K=ze.asn1,no=Rq.exports=ze.pkcs7=ze.pkcs7||{};no.messageFromPem=function(o){var f=ze.pem.decode(o)[0];if(f.type!=="PKCS7"){var h=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw h.headerType=f.type,h}if(f.procType&&f.procType.type==="ENCRYPTED")throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var y=K.fromDer(f.body);return no.messageFromAsn1(y)};no.messageToPem=function(o,f){var h={type:"PKCS7",body:K.toDer(o.toAsn1()).getBytes()};return ze.pem.encode(h,{maxline:f})};no.messageFromAsn1=function(o){var f={},h=[];if(!K.validate(o,no.asn1.contentInfoValidator,f,h)){var y=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw y.errors=h,y}var x=K.derToOid(f.contentType),_;switch(x){case ze.pki.oids.envelopedData:_=no.createEnvelopedData();break;case ze.pki.oids.encryptedData:_=no.createEncryptedData();break;case ze.pki.oids.signedData:_=no.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+x+" is not (yet) supported.")}return _.fromAsn1(f.content.value[0]),_};no.createSignedData=function(){var o=null;return o={type:ze.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(y){if(S_(o,y,no.asn1.signedDataValidator),o.certificates=[],o.crls=[],o.digestAlgorithmIdentifiers=[],o.contentInfo=null,o.signerInfos=[],o.rawCapture.certificates){var x=o.rawCapture.certificates.value;for(var _=0;_<x.length;++_)o.certificates.push(ze.pki.certificateFromAsn1(x[_]))}},toAsn1:function(){if(!o.contentInfo)o.sign();var y=[];for(var x=0;x<o.certificates.length;++x)y.push(ze.pki.certificateToAsn1(o.certificates[x]));var _=[],z=K.create(K.Class.CONTEXT_SPECIFIC,0,!0,[K.create(K.Class.UNIVERSAL,K.Type.SEQUENCE,!0,[K.create(K.Class.UNIVERSAL,K.Type.INTEGER,!1,K.integerToDer(o.version).getBytes()),K.create(K.Class.UNIVERSAL,K.Type.SET,!0,o.digestAlgorithmIdentifiers),o.contentInfo])]);if(y.length>0)z.value[0].value.push(K.create(K.Class.CONTEXT_SPECIFIC,0,!0,y));if(_.length>0)z.value[0].value.push(K.create(K.Class.CONTEXT_SPECIFIC,1,!0,_));return z.value[0].value.push(K.create(K.Class.UNIVERSAL,K.Type.SET,!0,o.signerInfos)),K.create(K.Class.UNIVERSAL,K.Type.SEQUENCE,!0,[K.create(K.Class.UNIVERSAL,K.Type.OID,!1,K.oidToDer(o.type).getBytes()),z])},addSigner:function(y){var{issuer:x,serialNumber:_}=y;if(y.certificate){var z=y.certificate;if(typeof z==="string")z=ze.pki.certificateFromPem(z);x=z.issuer.attributes,_=z.serialNumber}var C=y.key;if(!C)throw Error("Could not add PKCS#7 signer; no private key specified.");if(typeof C==="string")C=ze.pki.privateKeyFromPem(C);var w=y.digestAlgorithm||ze.pki.oids.sha1;switch(w){case ze.pki.oids.sha1:case ze.pki.oids.sha256:case ze.pki.oids.sha384:case ze.pki.oids.sha512:case ze.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+w)}var S=y.authenticatedAttributes||[];if(S.length>0){var E=!1,k=!1;for(var O=0;O<S.length;++O){var R=S[O];if(!E&&R.type===ze.pki.oids.contentType){if(E=!0,k)break;continue}if(!k&&R.type===ze.pki.oids.messageDigest){if(k=!0,E)break;continue}}if(!E||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}o.signers.push({key:C,version:1,issuer:x,serialNumber:_,digestAlgorithm:w,signatureAlgorithm:ze.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:S,unauthenticatedAttributes:[]})},sign:function(y){if(y=y||{},typeof o.content!=="object"||o.contentInfo===null){if(o.contentInfo=K.create(K.Class.UNIVERSAL,K.Type.SEQUENCE,!0,[K.create(K.Class.UNIVERSAL,K.Type.OID,!1,K.oidToDer(ze.pki.oids.data).getBytes())]),"content"in o){var x;if(o.content instanceof ze.util.ByteBuffer)x=o.content.bytes();else if(typeof o.content==="string")x=ze.util.encodeUtf8(o.content);if(y.detached)o.detachedContent=K.create(K.Class.UNIVERSAL,K.Type.OCTETSTRING,!1,x);else o.contentInfo.value.push(K.create(K.Class.CONTEXT_SPECIFIC,0,!0,[K.create(K.Class.UNIVERSAL,K.Type.OCTETSTRING,!1,x)]))}}if(o.signers.length===0)return;var _=f();h(_)},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(y){if(typeof y==="string")y=ze.pki.certificateFromPem(y);o.certificates.push(y)},addCertificateRevokationList:function(y){throw Error("PKCS#7 CRL support not yet implemented.")}},o;function f(){var y={};for(var x=0;x<o.signers.length;++x){var _=o.signers[x],z=_.digestAlgorithm;if(!(z in y))y[z]=ze.md[ze.pki.oids[z]].create();if(_.authenticatedAttributes.length===0)_.md=y[z];else _.md=ze.md[ze.pki.oids[z]].create()}o.digestAlgorithmIdentifiers=[];for(var z in y)o.digestAlgorithmIdentifiers.push(K.create(K.Class.UNIVERSAL,K.Type.SEQUENCE,!0,[K.create(K.Class.UNIVERSAL,K.Type.OID,!1,K.oidToDer(z).getBytes()),K.create(K.Class.UNIVERSAL,K.Type.NULL,!1,"")]));return y}function h(y){var x;if(o.detachedContent)x=o.detachedContent;else x=o.contentInfo.value[1],x=x.value[0];if(!x)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var _=K.derToOid(o.contentInfo.value[0].value),z=K.toDer(x);z.getByte(),K.getBerValueLength(z),z=z.getBytes();for(var C in y)y[C].start().update(z);var w=new Date;for(var S=0;S<o.signers.length;++S){var E=o.signers[S];if(E.authenticatedAttributes.length===0){if(_!==ze.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{E.authenticatedAttributesAsn1=K.create(K.Class.CONTEXT_SPECIFIC,0,!0,[]);var k=K.create(K.Class.UNIVERSAL,K.Type.SET,!0,[]);for(var O=0;O<E.authenticatedAttributes.length;++O){var R=E.authenticatedAttributes[O];if(R.type===ze.pki.oids.messageDigest)R.value=y[E.digestAlgorithm].digest();else if(R.type===ze.pki.oids.signingTime){if(!R.value)R.value=w}k.value.push(w_(R)),E.authenticatedAttributesAsn1.value.push(w_(R))}z=K.toDer(k).getBytes(),E.md.start().update(z)}E.signature=E.key.sign(E.md,"RSASSA-PKCS1-V1_5")}o.signerInfos=p1e(o.signers)}};no.createEncryptedData=function(){var o=null;return o={type:ze.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:ze.pki.oids["aes256-CBC"]},fromAsn1:function(f){S_(o,f,no.asn1.encryptedDataValidator)},decrypt:function(f){if(f!==void 0)o.encryptedContent.key=f;Iq(o)}},o};no.createEnvelopedData=function(){var o=null;return o={type:ze.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:ze.pki.oids["aes256-CBC"]},fromAsn1:function(f){var h=S_(o,f,no.asn1.envelopedDataValidator);o.recipients=l1e(h.recipientInfos.value)},toAsn1:function(){return K.create(K.Class.UNIVERSAL,K.Type.SEQUENCE,!0,[K.create(K.Class.UNIVERSAL,K.Type.OID,!1,K.oidToDer(o.type).getBytes()),K.create(K.Class.CONTEXT_SPECIFIC,0,!0,[K.create(K.Class.UNIVERSAL,K.Type.SEQUENCE,!0,[K.create(K.Class.UNIVERSAL,K.Type.INTEGER,!1,K.integerToDer(o.version).getBytes()),K.create(K.Class.UNIVERSAL,K.Type.SET,!0,u1e(o.recipients)),K.create(K.Class.UNIVERSAL,K.Type.SEQUENCE,!0,f1e(o.encryptedContent))])])])},findRecipient:function(f){var h=f.issuer.attributes;for(var y=0;y<o.recipients.length;++y){var x=o.recipients[y],_=x.issuer;if(x.serialNumber!==f.serialNumber)continue;if(_.length!==h.length)continue;var z=!0;for(var C=0;C<h.length;++C)if(_[C].type!==h[C].type||_[C].value!==h[C].value){z=!1;break}if(z)return x}return null},decrypt:function(f,h){if(o.encryptedContent.key===void 0&&f!==void 0&&h!==void 0)switch(f.encryptedContent.algorithm){case ze.pki.oids.rsaEncryption:case ze.pki.oids.desCBC:var y=h.decrypt(f.encryptedContent.content);o.encryptedContent.key=ze.util.createBuffer(y);break;default:throw Error("Unsupported asymmetric cipher, OID "+f.encryptedContent.algorithm)}Iq(o)},addRecipient:function(f){o.recipients.push({version:0,issuer:f.issuer.attributes,serialNumber:f.serialNumber,encryptedContent:{algorithm:ze.pki.oids.rsaEncryption,key:f.publicKey}})},encrypt:function(f,h){if(o.encryptedContent.content===void 0){h=h||o.encryptedContent.algorithm,f=f||o.encryptedContent.key;var y,x,_;switch(h){case ze.pki.oids["aes128-CBC"]:y=16,x=16,_=ze.aes.createEncryptionCipher;break;case ze.pki.oids["aes192-CBC"]:y=24,x=16,_=ze.aes.createEncryptionCipher;break;case ze.pki.oids["aes256-CBC"]:y=32,x=16,_=ze.aes.createEncryptionCipher;break;case ze.pki.oids["des-EDE3-CBC"]:y=24,x=8,_=ze.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+h)}if(f===void 0)f=ze.util.createBuffer(ze.random.getBytes(y));else if(f.length()!=y)throw Error("Symmetric key has wrong length; got "+f.length()+" bytes, expected "+y+".");o.encryptedContent.algorithm=h,o.encryptedContent.key=f,o.encryptedContent.parameter=ze.util.createBuffer(ze.random.getBytes(x));var z=_(f);if(z.start(o.encryptedContent.parameter.copy()),z.update(o.content),!z.finish())throw Error("Symmetric encryption failed.");o.encryptedContent.content=z.output}for(var C=0;C<o.recipients.length;++C){var w=o.recipients[C];if(w.encryptedContent.content!==void 0)continue;switch(w.encryptedContent.algorithm){case ze.pki.oids.rsaEncryption:w.encryptedContent.content=w.encryptedContent.key.encrypt(o.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+w.encryptedContent.algorithm)}}}},o};function a1e(o){var f={},h=[];if(!K.validate(o,no.asn1.recipientInfoValidator,f,h)){var y=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw y.errors=h,y}return{version:f.version.charCodeAt(0),issuer:ze.pki.RDNAttributesAsArray(f.issuer),serialNumber:ze.util.createBuffer(f.serial).toHex(),encryptedContent:{algorithm:K.derToOid(f.encAlgorithm),parameter:f.encParameter?f.encParameter.value:void 0,content:f.encKey}}}function c1e(o){return K.create(K.Class.UNIVERSAL,K.Type.SEQUENCE,!0,[K.create(K.Class.UNIVERSAL,K.Type.INTEGER,!1,K.integerToDer(o.version).getBytes()),K.create(K.Class.UNIVERSAL,K.Type.SEQUENCE,!0,[ze.pki.distinguishedNameToAsn1({attributes:o.issuer}),K.create(K.Class.UNIVERSAL,K.Type.INTEGER,!1,ze.util.hexToBytes(o.serialNumber))]),K.create(K.Class.UNIVERSAL,K.Type.SEQUENCE,!0,[K.create(K.Class.UNIVERSAL,K.Type.OID,!1,K.oidToDer(o.encryptedContent.algorithm).getBytes()),K.create(K.Class.UNIVERSAL,K.Type.NULL,!1,"")]),K.create(K.Class.UNIVERSAL,K.Type.OCTETSTRING,!1,o.encryptedContent.content)])}function l1e(o){var f=[];for(var h=0;h<o.length;++h)f.push(a1e(o[h]));return f}function u1e(o){var f=[];for(var h=0;h<o.length;++h)f.push(c1e(o[h]));return f}function d1e(o){var f=K.create(K.Class.UNIVERSAL,K.Type.SEQUENCE,!0,[K.create(K.Class.UNIVERSAL,K.Type.INTEGER,!1,K.integerToDer(o.version).getBytes()),K.create(K.Class.UNIVERSAL,K.Type.SEQUENCE,!0,[ze.pki.distinguishedNameToAsn1({attributes:o.issuer}),K.create(K.Class.UNIVERSAL,K.Type.INTEGER,!1,ze.util.hexToBytes(o.serialNumber))]),K.create(K.Class.UNIVERSAL,K.Type.SEQUENCE,!0,[K.create(K.Class.UNIVERSAL,K.Type.OID,!1,K.oidToDer(o.digestAlgorithm).getBytes()),K.create(K.Class.UNIVERSAL,K.Type.NULL,!1,"")])]);if(o.authenticatedAttributesAsn1)f.value.push(o.authenticatedAttributesAsn1);if(f.value.push(K.create(K.Class.UNIVERSAL,K.Type.SEQUENCE,!0,[K.create(K.Class.UNIVERSAL,K.Type.OID,!1,K.oidToDer(o.signatureAlgorithm).getBytes()),K.create(K.Class.UNIVERSAL,K.Type.NULL,!1,"")])),f.value.push(K.create(K.Class.UNIVERSAL,K.Type.OCTETSTRING,!1,o.signature)),o.unauthenticatedAttributes.length>0){var h=K.create(K.Class.CONTEXT_SPECIFIC,1,!0,[]);for(var y=0;y<o.unauthenticatedAttributes.length;++y){var x=o.unauthenticatedAttributes[y];h.values.push(w_(x))}f.value.push(h)}return f}function p1e(o){var f=[];for(var h=0;h<o.length;++h)f.push(d1e(o[h]));return f}function w_(o){var f;if(o.type===ze.pki.oids.contentType)f=K.create(K.Class.UNIVERSAL,K.Type.OID,!1,K.oidToDer(o.value).getBytes());else if(o.type===ze.pki.oids.messageDigest)f=K.create(K.Class.UNIVERSAL,K.Type.OCTETSTRING,!1,o.value.bytes());else if(o.type===ze.pki.oids.signingTime){var h=new Date("1950-01-01T00:00:00Z"),y=new Date("2050-01-01T00:00:00Z"),x=o.value;if(typeof x==="string"){var _=Date.parse(x);if(!isNaN(_))x=new Date(_);else if(x.length===13)x=K.utcTimeToDate(x);else x=K.generalizedTimeToDate(x)}if(x>=h&&x<y)f=K.create(K.Class.UNIVERSAL,K.Type.UTCTIME,!1,K.dateToUtcTime(x));else f=K.create(K.Class.UNIVERSAL,K.Type.GENERALIZEDTIME,!1,K.dateToGeneralizedTime(x))}return K.create(K.Class.UNIVERSAL,K.Type.SEQUENCE,!0,[K.create(K.Class.UNIVERSAL,K.Type.OID,!1,K.oidToDer(o.type).getBytes()),K.create(K.Class.UNIVERSAL,K.Type.SET,!0,[f])])}function f1e(o){return[K.create(K.Class.UNIVERSAL,K.Type.OID,!1,K.oidToDer(ze.pki.oids.data).getBytes()),K.create(K.Class.UNIVERSAL,K.Type.SEQUENCE,!0,[K.create(K.Class.UNIVERSAL,K.Type.OID,!1,K.oidToDer(o.algorithm).getBytes()),!o.parameter?void 0:K.create(K.Class.UNIVERSAL,K.Type.OCTETSTRING,!1,o.parameter.getBytes())]),K.create(K.Class.CONTEXT_SPECIFIC,0,!0,[K.create(K.Class.UNIVERSAL,K.Type.OCTETSTRING,!1,o.content.getBytes())])]}function S_(o,f,h){var y={},x=[];if(!K.validate(f,h,y,x)){var _=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw _.errors=_,_}var z=K.derToOid(y.contentType);if(z!==ze.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(y.encryptedContent){var C="";if(ze.util.isArray(y.encryptedContent))for(var w=0;w<y.encryptedContent.length;++w){if(y.encryptedContent[w].type!==K.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");C+=y.encryptedContent[w].value}else C=y.encryptedContent;o.encryptedContent={algorithm:K.derToOid(y.encAlgorithm),parameter:ze.util.createBuffer(y.encParameter.value),content:ze.util.createBuffer(C)}}if(y.content){var C="";if(ze.util.isArray(y.content))for(var w=0;w<y.content.length;++w){if(y.content[w].type!==K.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");C+=y.content[w].value}else C=y.content;o.content=ze.util.createBuffer(C)}return o.version=y.version.charCodeAt(0),o.rawCapture=y,y}function Iq(o){if(o.encryptedContent.key===void 0)throw Error("Symmetric key not available.");if(o.content===void 0){var f;switch(o.encryptedContent.algorithm){case ze.pki.oids["aes128-CBC"]:case ze.pki.oids["aes192-CBC"]:case ze.pki.oids["aes256-CBC"]:f=ze.aes.createDecryptionCipher(o.encryptedContent.key);break;case ze.pki.oids.desCBC:case ze.pki.oids["des-EDE3-CBC"]:f=ze.des.createDecryptionCipher(o.encryptedContent.key);break;default:throw Error("Unsupported symmetric cipher, OID "+o.encryptedContent.algorithm)}if(f.start(o.encryptedContent.parameter),f.update(o.encryptedContent.content),!f.finish())throw Error("Symmetric decryption failed.");o.content=f.output}}});var Bq=i(function(SLe,Pq){var fr=Xe();ji();lc();mh();fc();zt();var Hh=Pq.exports=fr.ssh=fr.ssh||{};Hh.privateKeyToPutty=function(o,f,h){h=h||"",f=f||"";var y="ssh-rsa",x=f===""?"none":"aes256-cbc",_="PuTTY-User-Key-File-2: "+y+`\r
124
+ `;_+="Encryption: "+x+`\r
125
+ `,_+="Comment: "+h+`\r
126
+ `;var z=fr.util.createBuffer();Sc(z,y),$n(z,o.e),$n(z,o.n);var C=fr.util.encode64(z.bytes(),64),w=Math.floor(C.length/66)+1;_+="Public-Lines: "+w+`\r
127
+ `,_+=C;var S=fr.util.createBuffer();$n(S,o.d),$n(S,o.p),$n(S,o.q),$n(S,o.qInv);var E;if(!f)E=fr.util.encode64(S.bytes(),64);else{var k=S.length()+16-1;k-=k%16;var O=Vh(S.bytes());O.truncate(O.length()-k+S.length()),S.putBuffer(O);var R=fr.util.createBuffer();R.putBuffer(Vh("\x00\x00\x00\x00",f)),R.putBuffer(Vh("\x00\x00\x00\x01",f));var I=fr.aes.createEncryptionCipher(R.truncate(8),"CBC");I.start(fr.util.createBuffer().fillWithByte(0,16)),I.update(S.copy()),I.finish();var A=I.output;A.truncate(16),E=fr.util.encode64(A.bytes(),64)}w=Math.floor(E.length/66)+1,_+=`\r
128
+ Private-Lines: `+w+`\r
129
+ `,_+=E;var M=Vh("putty-private-key-file-mac-key",f),D=fr.util.createBuffer();Sc(D,y),Sc(D,x),Sc(D,h),D.putInt32(z.length()),D.putBuffer(z),D.putInt32(S.length()),D.putBuffer(S);var U=fr.hmac.create();return U.start("sha1",M),U.update(D.bytes()),_+=`\r
130
+ Private-MAC: `+U.digest().toHex()+`\r
131
+ `,_};Hh.publicKeyToOpenSSH=function(o,f){var h="ssh-rsa";f=f||"";var y=fr.util.createBuffer();return Sc(y,h),$n(y,o.e),$n(y,o.n),h+" "+fr.util.encode64(y.bytes())+" "+f};Hh.privateKeyToOpenSSH=function(o,f){if(!f)return fr.pki.privateKeyToPem(o);return fr.pki.encryptRsaPrivateKey(o,f,{legacy:!0,algorithm:"aes128"})};Hh.getPublicKeyFingerprint=function(o,f){f=f||{};var h=f.md||fr.md.md5.create(),y="ssh-rsa",x=fr.util.createBuffer();Sc(x,y),$n(x,o.e),$n(x,o.n),h.start(),h.update(x.getBytes());var _=h.digest();if(f.encoding==="hex"){var z=_.toHex();if(f.delimiter)return z.match(/.{2}/g).join(f.delimiter);return z}else if(f.encoding==="binary")return _.getBytes();else if(f.encoding)throw Error('Unknown encoding "'+f.encoding+'".');return _};function $n(o,f){var h=f.toString(16);if(h[0]>="8")h="00"+h;var y=fr.util.hexToBytes(h);o.putInt32(y.length),o.putBytes(y)}function Sc(o,f){o.putInt32(f.length),o.putString(f)}function Vh(){var o=fr.md.sha1.create(),f=arguments.length;for(var h=0;h<f;++h)o.update(arguments[h]);return o.digest()}});var Lq=i(function(TLe,Dq){Dq.exports=Xe();ji();nq();bn();ch();Lu();_q();lc();Sq();Eq();Oq();Xx();vh();Us();Hx();t_();Aq();o_();Kx();Nx();Th();Ho();qx();Bq();l_();zt()});var Uq=i(function(ELe,Fq){var Nq=qs(),Vn=Lq(),jq=[[813826048,33620784,2181038086,153781832,2264337665,117547136],[805306881,53477382,153781832,2264337665,117547008,67108864],[813760514,16986241,395562,2252900087,218171137,2692808708],[813826048,33620784,2164262409,713443462,4144824583,27296000],[813891584,131331,813826048,101264006,1216804621,17236384],[813891584,131331,813891584,395562,2252900087,218171137],[813957120,513,53510912,1545,713443462,4144824583],[813957120,513,53511168,6,153781832,2264337665]],h1e=[[4294901760,4294967295,4278190335,4294967295,4294967295,4294967280],[4278255615,4294902015,4294967295,4294967295,4294967040,4278190080],[4294902015,4294967295,16777215,4294967295,4294967295,4294902015],[4294901760,4294967295,4278255615,4294967295,4294967295,4294967040],[4294901760,16777215,4294901760,4294967295,4294967295,4294967295],[4294901760,16777215,4294901760,16777215,4294967295,4294967295],[4294901760,65535,4294967040,65535,4294967295,4294967295],[4294901760,65535,4294967040,255,4294967295,4294967295]];class qq{constructor(o,f){this.keystore=o,this.password=f}static probe(o){let h=new Nq(o).read(24);for(let y=0;y<jq.length;y++){let x=new Nq(h),_=jq[y];if(h1e[y].map((w)=>(x.readInt()&w)>>>0).every((w,S)=>w===_[S]))return!0}return!1}parse(){let o=this.keystore.toString("base64"),f=Vn.util.decode64(o),h=Vn.asn1.fromDer(f);return Vn.pkcs12.pkcs12FromAsn1(h,this.password||"").safeContents.reduce((x,_)=>{if(!Array.isArray(_.safeBags))return x;return x.concat(_.safeBags)},[])}toPem(o){return o.reduce((f,h)=>{let y=h.attributes.friendlyName[0],x=Boolean(h.attributes.localKeyId),_=f[y]||{};if(h.type===Vn.pki.oids.certBag){let z=x?"cert":"ca";if(h.cert)_={..._,[z]:Vn.pki.certificateToPem(h.cert).replace(/\r\n/g,`
132
+ `)};else if(h.asn1)_={..._,[z]:Mq(h.asn1,"CERTIFICATE").replace(/\r\n/g,`
133
+ `)}}if(h.key)_={..._,key:m1e(h.key).replace(/\r\n/g,`
134
+ `)};else if(h.asn1&&h.hasOwnProperty("key"))_={..._,key:Mq(h.asn1,"PRIVATE KEY").replace(/\r\n/g,`
135
+ `)};return{...f,[y]:_}},{})}}var m1e=(o,f)=>Vn.pki.privateKeyInfoToPem(Vn.pki.wrapRsaPrivateKey(Vn.pki.privateKeyToAsn1(o))),Mq=(o,f)=>{let h={type:f,body:Vn.asn1.toDer(o).getBytes()};return Vn.pem.encode(h)};Fq.exports=qq});var Ku=i(function(kLe,Vq){var $q=qs(),g1e=sc();class zo{constructor(o){this.tag=null,this.length=0,this.data=null,this.buffer=null,this.buffer=g1e(o.buffer,o.offset),this.init(o)}init(o){this.tag=o.readByte();let f=o.buffer.readUInt8(o.offset);if(this.length=zo.getLength(o),this.length===-1){let h=o.available(),y=2,x=new OutputStream(Buffer.alloc(h+y));throw x.write(this.tag),x.write(f),x.write(o.read(h)),Error("Length is not defined. The DerIndefLenConverter.convert() has not been implemented yet")}this.data=new $q(o.read(this.length))}isConstructed(o){if((this.tag&32)!=32)return!1;if(o)return(tag&31)==o;else return!0}static getLength(o){let f=o.readByte();if((f&128)===0)return f;let h=f&127;if(h===0)return-1;if(h<0)throw Error("Incorrect DER encodding");else if(h>4)throw Error("DER length too big");let y;for(y=0;h>0;h--)y<<=8,y+=255&o.readByte();if(y<0)throw Error("Invalid length byte");return y}getBigInteger(){let o=this.data;if(o.readByte()!=zo.tag_Integer)throw Error("DER input, Integer tag error");let f=zo.getLength(o);if(f<=1)return o.readByte();else if(f===2)return o.readShort();else if(f<=4)return o.readInt();else return o.readLong()}getOctetString(){if(this.tag!==zo.tag_OctetString&&!this.isConstructed(zo.tag_OctetString))throw Error("DerValue.getOctetString, not an Octet String: "+derValue.tag);let o=new $q(this.buffer),f=Buffer.from([]);while(o.available()){let h=o.readByte();if(h!==zo.tag_OctetString)throw Error("DER input not an octet string: "+h);let y=zo.getLength(o),x=o.read(y);f=Buffer.concat([f,x])}return f}getDerValue(){return new zo(this.data)}}zo.tag_ObjectId=6;zo.tag_Sequence=48;zo.tag_OctetString=4;zo.tag_Integer=2;Vq.exports=zo});var T_=i(function(OLe,Kq){var Hq=Ku();class Gq{constructor(o){let f=o.readByte();if(f!==Hq.tag_ObjectId)throw Error("data isn't an object ID ( tag = "+f+")");let h=Hq.getLength(o);this.encoding=o.read(h)}toString(){let o=this.encoding.length,f="",h=0;for(let y=0;y<o;y++)if((this.encoding[y]&128)===0){if(h!==0)f+=".";let x=0;for(let _=h;_<=y;_++){x<<=7;let z=this.encoding[_];x|=z&127}if(h===0)if(x<80)f+=Math.floor(x/40),f+=".",f+=x%40;else f+="2.",f+=x-80;else f+=x;h=y+1}return f}}Kq.exports=Gq});var Zq=i(function(ILe,Jq){var y1e=qs(),b1e=T_(),E_=Ku();class Wq{constructor(o){let f=new E_(new y1e(o)),h=new E_(f.data),y=new E_(f.data);this.alghorithmId=this.createAlghorithmId(h),this.octetString=y.getOctetString()}createAlghorithmId(o){return new b1e(o.data).toString()}getAlgorithm(){return this.alghorithmId}getEncryptedData(){return this.octetString}}Jq.exports=Wq});var io=i(function(v1e,Tc){var RLe=c("crypto");v1e.linebrk=function(o,f){var h="",y=0;while(y+f<o.length)h+=o.substring(y,y+f)+`
136
+ `,y+=f;return h+o.substring(y,o.length)};v1e.detectEnvironment=function(){if(typeof window<"u"&&window&&!(process&&process.title==="node"))return"browser";return"node"};v1e.get32IntFromBuffer=function(o,f){f=f||0;var h=0;if((h=o.length-f)>0)if(h>=4)return o.readUIntBE(f,h);else{var y=0;for(var x=f+h,_=0;x>f;x--,_+=2)y+=o[x-1]*Math.pow(16,_);return y}else return NaN};v1e._={isObject:function(o){var f=typeof o;return!!o&&(f=="object"||f=="function")},isString:function(o){return typeof o=="string"||o instanceof String},isNumber:function(o){return typeof o=="number"||!isNaN(parseFloat(o))&&isFinite(o)},omit:function(o,f){var h={};for(var y in o){if(!o.hasOwnProperty(y)||y===f)continue;h[y]=o[y]}return h}};v1e.trimSurroundingText=function(o,f,h){var y=0,x=o.length,_=o.indexOf(f);if(_>=0)y=_+f.length;var z=o.indexOf(h,_);if(z>=0)x=z;return o.substring(y,x)}});var ca=i(function(PLe,t3){var S1e=c("crypto"),T1e=io()._,Ec,E1e=244837814094590,ALe=(E1e&16777215)==15715070;function pe(o,f){if(o!=null)if(typeof o=="number")this.fromNumber(o,f);else if(Buffer.isBuffer(o))this.fromBuffer(o);else if(f==null&&typeof o!="string")this.fromByteArray(o);else this.fromString(o,f)}function ht(){return new pe(null)}function k1e(o,f,h,y,x,_){var z=f&16383,C=f>>14;while(--_>=0){var w=this[o]&16383,S=this[o++]>>14,E=C*w+S*z;w=z*w+((E&16383)<<14)+h[y]+x,x=(w>>28)+(E>>14)+C*S,h[y++]=w&268435455}return x}pe.prototype.am=k1e;Ec=28;pe.prototype.DB=Ec;pe.prototype.DM=(1<<Ec)-1;pe.prototype.DV=1<<Ec;var O_=52;pe.prototype.FV=Math.pow(2,O_);pe.prototype.F1=O_-Ec;pe.prototype.F2=2*Ec-O_;var O1e="0123456789abcdefghijklmnopqrstuvwxyz",Gh=[],Oc,Xo;Oc=48;for(Xo=0;Xo<=9;++Xo)Gh[Oc++]=Xo;Oc=97;for(Xo=10;Xo<36;++Xo)Gh[Oc++]=Xo;Oc=65;for(Xo=10;Xo<36;++Xo)Gh[Oc++]=Xo;function k_(o){return O1e.charAt(o)}function Yq(o,f){var h=Gh[o.charCodeAt(f)];return h==null?-1:h}function I1e(o){for(var f=this.t-1;f>=0;--f)o[f]=this[f];o.t=this.t,o.s=this.s}function R1e(o){if(this.t=1,this.s=o<0?-1:0,o>0)this[0]=o;else if(o<-1)this[0]=o+DV;else this.t=0}function Wi(o){var f=ht();return f.fromInt(o),f}function A1e(o,f,h){var y;switch(f){case 2:y=1;break;case 4:y=2;break;case 8:y=3;break;case 16:y=4;break;case 32:y=5;break;case 256:y=8;break;default:this.fromRadix(o,f);return}this.t=0,this.s=0;var x=o.length,_=!1,z=0;while(--x>=0){var C=y==8?o[x]&255:Yq(o,x);if(C<0){if(o.charAt(x)=="-")_=!0;continue}if(_=!1,z===0)this[this.t++]=C;else if(z+y>this.DB)this[this.t-1]|=(C&(1<<this.DB-z)-1)<<z,this[this.t++]=C>>this.DB-z;else this[this.t-1]|=C<<z;if(z+=y,z>=this.DB)z-=this.DB}if(!h&&y==8&&(o[0]&128)!=0){if(this.s=-1,z>0)this[this.t-1]|=(1<<this.DB-z)-1<<z}if(this.clamp(),_)pe.ZERO.subTo(this,this)}function P1e(o,f){this.fromString(o,256,f)}function B1e(o){this.fromString(o,256,!0)}function D1e(){var o=this.s&this.DM;while(this.t>0&&this[this.t-1]==o)--this.t}function L1e(o){if(this.s<0)return"-"+this.negate().toString(o);var f;if(o==16)f=4;else if(o==8)f=3;else if(o==2)f=1;else if(o==32)f=5;else if(o==4)f=2;else return this.toRadix(o);var h=(1<<f)-1,y,x=!1,_="",z=this.t,C=this.DB-z*this.DB%f;if(z-- >0){if(C<this.DB&&(y=this[z]>>C)>0)x=!0,_=k_(y);while(z>=0){if(C<f)y=(this[z]&(1<<C)-1)<<f-C,y|=this[--z]>>(C+=this.DB-f);else if(y=this[z]>>(C-=f)&h,C<=0)C+=this.DB,--z;if(y>0)x=!0;if(x)_+=k_(y)}}return x?_:"0"}function N1e(){var o=ht();return pe.ZERO.subTo(this,o),o}function j1e(){return this.s<0?this.negate():this}function M1e(o){var f=this.s-o.s;if(f!=0)return f;var h=this.t;if(f=h-o.t,f!=0)return this.s<0?-f:f;while(--h>=0)if((f=this[h]-o[h])!=0)return f;return 0}function Kh(o){var f=1,h;if((h=o>>>16)!=0)o=h,f+=16;if((h=o>>8)!=0)o=h,f+=8;if((h=o>>4)!=0)o=h,f+=4;if((h=o>>2)!=0)o=h,f+=2;if((h=o>>1)!=0)o=h,f+=1;return f}function q1e(){if(this.t<=0)return 0;return this.DB*(this.t-1)+Kh(this[this.t-1]^this.s&this.DM)}function F1e(o,f){var h;for(h=this.t-1;h>=0;--h)f[h+o]=this[h];for(h=o-1;h>=0;--h)f[h]=0;f.t=this.t+o,f.s=this.s}function U1e(o,f){for(var h=o;h<this.t;++h)f[h-o]=this[h];f.t=Math.max(this.t-o,0),f.s=this.s}function $1e(o,f){var h=o%this.DB,y=this.DB-h,x=(1<<y)-1,_=Math.floor(o/this.DB),z=this.s<<h&this.DM,C;for(C=this.t-1;C>=0;--C)f[C+_+1]=this[C]>>y|z,z=(this[C]&x)<<h;for(C=_-1;C>=0;--C)f[C]=0;f[_]=z,f.t=this.t+_+1,f.s=this.s,f.clamp()}function V1e(o,f){f.s=this.s;var h=Math.floor(o/this.DB);if(h>=this.t){f.t=0;return}var y=o%this.DB,x=this.DB-y,_=(1<<y)-1;f[0]=this[h]>>y;for(var z=h+1;z<this.t;++z)f[z-h-1]|=(this[z]&_)<<x,f[z-h]=this[z]>>y;if(y>0)f[this.t-h-1]|=(this.s&_)<<x;f.t=this.t-h,f.clamp()}function H1e(o,f){var h=0,y=0,x=Math.min(o.t,this.t);while(h<x)y+=this[h]-o[h],f[h++]=y&this.DM,y>>=this.DB;if(o.t<this.t){y-=o.s;while(h<this.t)y+=this[h],f[h++]=y&this.DM,y>>=this.DB;y+=this.s}else{y+=this.s;while(h<o.t)y-=o[h],f[h++]=y&this.DM,y>>=this.DB;y-=o.s}if(f.s=y<0?-1:0,y<-1)f[h++]=this.DV+y;else if(y>0)f[h++]=y;f.t=h,f.clamp()}function G1e(o,f){var h=this.abs(),y=o.abs(),x=h.t;f.t=x+y.t;while(--x>=0)f[x]=0;for(x=0;x<y.t;++x)f[x+h.t]=h.am(0,y[x],f,x,0,h.t);if(f.s=0,f.clamp(),this.s!=o.s)pe.ZERO.subTo(f,f)}function K1e(o){var f=this.abs(),h=o.t=2*f.t;while(--h>=0)o[h]=0;for(h=0;h<f.t-1;++h){var y=f.am(h,f[h],o,2*h,0,1);if((o[h+f.t]+=f.am(h+1,2*f[h],o,2*h+1,y,f.t-h-1))>=f.DV)o[h+f.t]-=f.DV,o[h+f.t+1]=1}if(o.t>0)o[o.t-1]+=f.am(h,f[h],o,2*h,0,1);o.s=0,o.clamp()}function W1e(o,f,h){var y=o.abs();if(y.t<=0)return;var x=this.abs();if(x.t<y.t){if(f!=null)f.fromInt(0);if(h!=null)this.copyTo(h);return}if(h==null)h=ht();var _=ht(),z=this.s,C=o.s,w=this.DB-Kh(y[y.t-1]);if(w>0)y.lShiftTo(w,_),x.lShiftTo(w,h);else y.copyTo(_),x.copyTo(h);var S=_.t,E=_[S-1];if(E===0)return;var k=E*(1<<this.F1)+(S>1?_[S-2]>>this.F2:0),O=this.FV/k,R=(1<<this.F1)/k,I=1<<this.F2,A=h.t,M=A-S,D=f==null?ht():f;if(_.dlShiftTo(M,D),h.compareTo(D)>=0)h[h.t++]=1,h.subTo(D,h);pe.ONE.dlShiftTo(S,D),D.subTo(_,_);while(_.t<S)_[_.t++]=0;while(--M>=0){var U=h[--A]==E?this.DM:Math.floor(h[A]*O+(h[A-1]+I)*R);if((h[A]+=_.am(0,U,h,M,0,S))<U){_.dlShiftTo(M,D),h.subTo(D,h);while(h[A]<--U)h.subTo(D,h)}}if(f!=null){if(h.drShiftTo(S,f),z!=C)pe.ZERO.subTo(f,f)}if(h.t=S,h.clamp(),w>0)h.rShiftTo(w,h);if(z<0)pe.ZERO.subTo(h,h)}function J1e(o){var f=ht();if(this.abs().divRemTo(o,null,f),this.s<0&&f.compareTo(pe.ZERO)>0)o.subTo(f,f);return f}function ia(o){this.m=o}function Z1e(o){if(o.s<0||o.compareTo(this.m)>=0)return o.mod(this.m);else return o}function Y1e(o){return o}function X1e(o){o.divRemTo(this.m,null,o)}function Q1e(o,f,h){o.multiplyTo(f,h),this.reduce(h)}function eCe(o,f){o.squareTo(f),this.reduce(f)}ia.prototype.convert=Z1e;ia.prototype.revert=Y1e;ia.prototype.reduce=X1e;ia.prototype.mulTo=Q1e;ia.prototype.sqrTo=eCe;function tCe(){if(this.t<1)return 0;var o=this[0];if((o&1)===0)return 0;var f=o&3;return f=f*(2-(o&15)*f)&15,f=f*(2-(o&255)*f)&255,f=f*(2-((o&65535)*f&65535))&65535,f=f*(2-o*f%this.DV)%this.DV,f>0?this.DV-f:-f}function aa(o){this.m=o,this.mp=o.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<o.DB-15)-1,this.mt2=2*o.t}function rCe(o){var f=ht();if(o.abs().dlShiftTo(this.m.t,f),f.divRemTo(this.m,null,f),o.s<0&&f.compareTo(pe.ZERO)>0)this.m.subTo(f,f);return f}function oCe(o){var f=ht();return o.copyTo(f),this.reduce(f),f}function nCe(o){while(o.t<=this.mt2)o[o.t++]=0;for(var f=0;f<this.m.t;++f){var h=o[f]&32767,y=h*this.mpl+((h*this.mph+(o[f]>>15)*this.mpl&this.um)<<15)&o.DM;h=f+this.m.t,o[h]+=this.m.am(0,y,o,f,0,this.m.t);while(o[h]>=o.DV)o[h]-=o.DV,o[++h]++}if(o.clamp(),o.drShiftTo(this.m.t,o),o.compareTo(this.m)>=0)o.subTo(this.m,o)}function iCe(o,f){o.squareTo(f),this.reduce(f)}function sCe(o,f,h){o.multiplyTo(f,h),this.reduce(h)}aa.prototype.convert=rCe;aa.prototype.revert=oCe;aa.prototype.reduce=nCe;aa.prototype.mulTo=sCe;aa.prototype.sqrTo=iCe;function aCe(){return(this.t>0?this[0]&1:this.s)===0}function cCe(o,f){if(o>4294967295||o<1)return pe.ONE;var h=ht(),y=ht(),x=f.convert(this),_=Kh(o)-1;x.copyTo(h);while(--_>=0)if(f.sqrTo(h,y),(o&1<<_)>0)f.mulTo(y,x,h);else{var z=h;h=y,y=z}return f.revert(h)}function lCe(o,f){var h;if(o<256||f.isEven())h=new ia(f);else h=new aa(f);return this.exp(o,h)}function uCe(){var o=ht();return this.copyTo(o),o}function dCe(){if(this.s<0){if(this.t==1)return this[0]-this.DV;else if(this.t===0)return-1}else if(this.t==1)return this[0];else if(this.t===0)return 0;return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function pCe(){return this.t==0?this.s:this[0]<<24>>24}function fCe(){return this.t==0?this.s:this[0]<<16>>16}function hCe(o){return Math.floor(Math.LN2*this.DB/Math.log(o))}function mCe(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this[0]<=0)return 0;else return 1}function gCe(o){if(o==null)o=10;if(this.signum()===0||o<2||o>36)return"0";var f=this.chunkSize(o),h=Math.pow(o,f),y=Wi(h),x=ht(),_=ht(),z="";this.divRemTo(y,x,_);while(x.signum()>0)z=(h+_.intValue()).toString(o).substr(1)+z,x.divRemTo(y,x,_);return _.intValue().toString(o)+z}function yCe(o,f){if(this.fromInt(0),f==null)f=10;var h=this.chunkSize(f),y=Math.pow(f,h),x=!1,_=0,z=0;for(var C=0;C<o.length;++C){var w=Yq(o,C);if(w<0){if(o.charAt(C)=="-"&&this.signum()===0)x=!0;continue}if(z=f*z+w,++_>=h)this.dMultiply(y),this.dAddOffset(z,0),_=0,z=0}if(_>0)this.dMultiply(Math.pow(f,_)),this.dAddOffset(z,0);if(x)pe.ZERO.subTo(this,this)}function bCe(o,f){if(typeof f=="number")if(o<2)this.fromInt(1);else{if(this.fromNumber(o),!this.testBit(o-1))this.bitwiseTo(pe.ONE.shiftLeft(o-1),I_,this);if(this.isEven())this.dAddOffset(1,0);while(!this.isProbablePrime(f))if(this.dAddOffset(2,0),this.bitLength()>o)this.subTo(pe.ONE.shiftLeft(o-1),this)}else{var h=S1e.randomBytes((o>>3)+1),y=o&7;if(y>0)h[0]&=(1<<y)-1;else h[0]=0;this.fromByteArray(h)}}function vCe(){var o=this.t,f=[];f[0]=this.s;var h=this.DB-o*this.DB%8,y,x=0;if(o-- >0){if(h<this.DB&&(y=this[o]>>h)!=(this.s&this.DM)>>h)f[x++]=y|this.s<<this.DB-h;while(o>=0){if(h<8)y=(this[o]&(1<<h)-1)<<8-h,y|=this[--o]>>(h+=this.DB-8);else if(y=this[o]>>(h-=8)&255,h<=0)h+=this.DB,--o;if((y&128)!=0)y|=-256;if(x===0&&(this.s&128)!=(y&128))++x;if(x>0||y!=this.s)f[x++]=y}}return f}function xCe(o){var f=Buffer.from(this.toByteArray());if(o===!0&&f[0]===0)f=f.slice(1);else if(T1e.isNumber(o)){if(f.length>o){for(var h=0;h<f.length-o;h++)if(f[h]!==0)return null;return f.slice(f.length-o)}else if(f.length<o){var y=Buffer.alloc(o);return y.fill(0,0,o-f.length),f.copy(y,o-f.length),y}}return f}function _Ce(o){return this.compareTo(o)==0}function zCe(o){return this.compareTo(o)<0?this:o}function CCe(o){return this.compareTo(o)>0?this:o}function wCe(o,f,h){var y,x,_=Math.min(o.t,this.t);for(y=0;y<_;++y)h[y]=f(this[y],o[y]);if(o.t<this.t){x=o.s&this.DM;for(y=_;y<this.t;++y)h[y]=f(this[y],x);h.t=this.t}else{x=this.s&this.DM;for(y=_;y<o.t;++y)h[y]=f(x,o[y]);h.t=o.t}h.s=f(this.s,o.s),h.clamp()}function SCe(o,f){return o&f}function TCe(o){var f=ht();return this.bitwiseTo(o,SCe,f),f}function I_(o,f){return o|f}function ECe(o){var f=ht();return this.bitwiseTo(o,I_,f),f}function Xq(o,f){return o^f}function kCe(o){var f=ht();return this.bitwiseTo(o,Xq,f),f}function Qq(o,f){return o&~f}function OCe(o){var f=ht();return this.bitwiseTo(o,Qq,f),f}function ICe(){var o=ht();for(var f=0;f<this.t;++f)o[f]=this.DM&~this[f];return o.t=this.t,o.s=~this.s,o}function RCe(o){var f=ht();if(o<0)this.rShiftTo(-o,f);else this.lShiftTo(o,f);return f}function ACe(o){var f=ht();if(o<0)this.lShiftTo(-o,f);else this.rShiftTo(o,f);return f}function PCe(o){if(o===0)return-1;var f=0;if((o&65535)===0)o>>=16,f+=16;if((o&255)===0)o>>=8,f+=8;if((o&15)===0)o>>=4,f+=4;if((o&3)===0)o>>=2,f+=2;if((o&1)===0)++f;return f}function BCe(){for(var o=0;o<this.t;++o)if(this[o]!=0)return o*this.DB+PCe(this[o]);if(this.s<0)return this.t*this.DB;return-1}function DCe(o){var f=0;while(o!=0)o&=o-1,++f;return f}function LCe(){var o=0,f=this.s&this.DM;for(var h=0;h<this.t;++h)o+=DCe(this[h]^f);return o}function NCe(o){var f=Math.floor(o/this.DB);if(f>=this.t)return this.s!=0;return(this[f]&1<<o%this.DB)!=0}function jCe(o,f){var h=pe.ONE.shiftLeft(o);return this.bitwiseTo(h,f,h),h}function MCe(o){return this.changeBit(o,I_)}function qCe(o){return this.changeBit(o,Qq)}function FCe(o){return this.changeBit(o,Xq)}function UCe(o,f){var h=0,y=0,x=Math.min(o.t,this.t);while(h<x)y+=this[h]+o[h],f[h++]=y&this.DM,y>>=this.DB;if(o.t<this.t){y+=o.s;while(h<this.t)y+=this[h],f[h++]=y&this.DM,y>>=this.DB;y+=this.s}else{y+=this.s;while(h<o.t)y+=o[h],f[h++]=y&this.DM,y>>=this.DB;y+=o.s}if(f.s=y<0?-1:0,y>0)f[h++]=y;else if(y<-1)f[h++]=this.DV+y;f.t=h,f.clamp()}function $Ce(o){var f=ht();return this.addTo(o,f),f}function VCe(o){var f=ht();return this.subTo(o,f),f}function HCe(o){var f=ht();return this.multiplyTo(o,f),f}function GCe(){var o=ht();return this.squareTo(o),o}function KCe(o){var f=ht();return this.divRemTo(o,f,null),f}function WCe(o){var f=ht();return this.divRemTo(o,null,f),f}function JCe(o){var f=ht(),h=ht();return this.divRemTo(o,f,h),[f,h]}function ZCe(o){this[this.t]=this.am(0,o-1,this,0,0,this.t),++this.t,this.clamp()}function YCe(o,f){if(o===0)return;while(this.t<=f)this[this.t++]=0;this[f]+=o;while(this[f]>=this.DV){if(this[f]-=this.DV,++f>=this.t)this[this.t++]=0;++this[f]}}function Wu(){}function e3(o){return o}function XCe(o,f,h){o.multiplyTo(f,h)}function QCe(o,f){o.squareTo(f)}Wu.prototype.convert=e3;Wu.prototype.revert=e3;Wu.prototype.mulTo=XCe;Wu.prototype.sqrTo=QCe;function ewe(o){return this.exp(o,new Wu)}function twe(o,f,h){var y=Math.min(this.t+o.t,f);h.s=0,h.t=y;while(y>0)h[--y]=0;var x;for(x=h.t-this.t;y<x;++y)h[y+this.t]=this.am(0,o[y],h,y,0,this.t);for(x=Math.min(o.t,f);y<x;++y)this.am(0,o[y],h,y,0,f-y);h.clamp()}function rwe(o,f,h){--f;var y=h.t=this.t+o.t-f;h.s=0;while(--y>=0)h[y]=0;for(y=Math.max(f-this.t,0);y<o.t;++y)h[this.t+y-f]=this.am(f-y,o[y],h,0,0,this.t+y-f);h.clamp(),h.drShiftTo(1,h)}function Ic(o){this.r2=ht(),this.q3=ht(),pe.ONE.dlShiftTo(2*o.t,this.r2),this.mu=this.r2.divide(o),this.m=o}function owe(o){if(o.s<0||o.t>2*this.m.t)return o.mod(this.m);else if(o.compareTo(this.m)<0)return o;else{var f=ht();return o.copyTo(f),this.reduce(f),f}}function nwe(o){return o}function iwe(o){if(o.drShiftTo(this.m.t-1,this.r2),o.t>this.m.t+1)o.t=this.m.t+1,o.clamp();this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while(o.compareTo(this.r2)<0)o.dAddOffset(1,this.m.t+1);o.subTo(this.r2,o);while(o.compareTo(this.m)>=0)o.subTo(this.m,o)}function swe(o,f){o.squareTo(f),this.reduce(f)}function awe(o,f,h){o.multiplyTo(f,h),this.reduce(h)}Ic.prototype.convert=owe;Ic.prototype.revert=nwe;Ic.prototype.reduce=iwe;Ic.prototype.mulTo=awe;Ic.prototype.sqrTo=swe;function cwe(o,f){var h=o.bitLength(),y,x=Wi(1),_;if(h<=0)return x;else if(h<18)y=1;else if(h<48)y=3;else if(h<144)y=4;else if(h<768)y=5;else y=6;if(h<8)_=new ia(f);else if(f.isEven())_=new Ic(f);else _=new aa(f);var z=[],C=3,w=y-1,S=(1<<y)-1;if(z[1]=_.convert(this),y>1){var E=ht();_.sqrTo(z[1],E);while(C<=S)z[C]=ht(),_.mulTo(E,z[C-2],z[C]),C+=2}var k=o.t-1,O,R=!0,I=ht(),A;h=Kh(o[k])-1;while(k>=0){if(h>=w)O=o[k]>>h-w&S;else if(O=(o[k]&(1<<h+1)-1)<<w-h,k>0)O|=o[k-1]>>this.DB+h-w;C=y;while((O&1)===0)O>>=1,--C;if((h-=C)<0)h+=this.DB,--k;if(R)z[O].copyTo(x),R=!1;else{while(C>1)_.sqrTo(x,I),_.sqrTo(I,x),C-=2;if(C>0)_.sqrTo(x,I);else A=x,x=I,I=A;_.mulTo(I,z[O],x)}while(k>=0&&(o[k]&1<<h)===0)if(_.sqrTo(x,I),A=x,x=I,I=A,--h<0)h=this.DB-1,--k}return _.revert(x)}function lwe(o){var f=this.s<0?this.negate():this.clone(),h=o.s<0?o.negate():o.clone();if(f.compareTo(h)<0){var y=f;f=h,h=y}var x=f.getLowestSetBit(),_=h.getLowestSetBit();if(_<0)return f;if(x<_)_=x;if(_>0)f.rShiftTo(_,f),h.rShiftTo(_,h);while(f.signum()>0){if((x=f.getLowestSetBit())>0)f.rShiftTo(x,f);if((x=h.getLowestSetBit())>0)h.rShiftTo(x,h);if(f.compareTo(h)>=0)f.subTo(h,f),f.rShiftTo(1,f);else h.subTo(f,h),h.rShiftTo(1,h)}if(_>0)h.lShiftTo(_,h);return h}function uwe(o){if(o<=0)return 0;var f=this.DV%o,h=this.s<0?o-1:0;if(this.t>0)if(f===0)h=this[0]%o;else for(var y=this.t-1;y>=0;--y)h=(f*h+this[y])%o;return h}function dwe(o){var f=o.isEven();if(this.isEven()&&f||o.signum()===0)return pe.ZERO;var h=o.clone(),y=this.clone(),x=Wi(1),_=Wi(0),z=Wi(0),C=Wi(1);while(h.signum()!=0){while(h.isEven()){if(h.rShiftTo(1,h),f){if(!x.isEven()||!_.isEven())x.addTo(this,x),_.subTo(o,_);x.rShiftTo(1,x)}else if(!_.isEven())_.subTo(o,_);_.rShiftTo(1,_)}while(y.isEven()){if(y.rShiftTo(1,y),f){if(!z.isEven()||!C.isEven())z.addTo(this,z),C.subTo(o,C);z.rShiftTo(1,z)}else if(!C.isEven())C.subTo(o,C);C.rShiftTo(1,C)}if(h.compareTo(y)>=0){if(h.subTo(y,h),f)x.subTo(z,x);_.subTo(C,_)}else{if(y.subTo(h,y),f)z.subTo(x,z);C.subTo(_,C)}}if(y.compareTo(pe.ONE)!=0)return pe.ZERO;if(C.compareTo(o)>=0)return C.subtract(o);if(C.signum()<0)C.addTo(o,C);else return C;if(C.signum()<0)return C.add(o);else return C}var ao=[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],pwe=67108864/ao[ao.length-1];function fwe(o){var f,h=this.abs();if(h.t==1&&h[0]<=ao[ao.length-1]){for(f=0;f<ao.length;++f)if(h[0]==ao[f])return!0;return!1}if(h.isEven())return!1;f=1;while(f<ao.length){var y=ao[f],x=f+1;while(x<ao.length&&y<pwe)y*=ao[x++];y=h.modInt(y);while(f<x)if(y%ao[f++]===0)return!1}return h.millerRabin(o)}function hwe(o){var f=this.subtract(pe.ONE),h=f.getLowestSetBit();if(h<=0)return!1;var y=f.shiftRight(h);if(o=o+1>>1,o>ao.length)o=ao.length;var x=ht();for(var _=0;_<o;++_){x.fromInt(ao[Math.floor(Math.random()*ao.length)]);var z=x.modPow(y,this);if(z.compareTo(pe.ONE)!=0&&z.compareTo(f)!=0){var C=1;while(C++<h&&z.compareTo(f)!=0)if(z=z.modPowInt(2,this),z.compareTo(pe.ONE)===0)return!1;if(z.compareTo(f)!=0)return!1}}return!0}pe.prototype.copyTo=I1e;pe.prototype.fromInt=R1e;pe.prototype.fromString=A1e;pe.prototype.fromByteArray=P1e;pe.prototype.fromBuffer=B1e;pe.prototype.clamp=D1e;pe.prototype.dlShiftTo=F1e;pe.prototype.drShiftTo=U1e;pe.prototype.lShiftTo=$1e;pe.prototype.rShiftTo=V1e;pe.prototype.subTo=H1e;pe.prototype.multiplyTo=G1e;pe.prototype.squareTo=K1e;pe.prototype.divRemTo=W1e;pe.prototype.invDigit=tCe;pe.prototype.isEven=aCe;pe.prototype.exp=cCe;pe.prototype.chunkSize=hCe;pe.prototype.toRadix=gCe;pe.prototype.fromRadix=yCe;pe.prototype.fromNumber=bCe;pe.prototype.bitwiseTo=wCe;pe.prototype.changeBit=jCe;pe.prototype.addTo=UCe;pe.prototype.dMultiply=ZCe;pe.prototype.dAddOffset=YCe;pe.prototype.multiplyLowerTo=twe;pe.prototype.multiplyUpperTo=rwe;pe.prototype.modInt=uwe;pe.prototype.millerRabin=hwe;pe.prototype.toString=L1e;pe.prototype.negate=N1e;pe.prototype.abs=j1e;pe.prototype.compareTo=M1e;pe.prototype.bitLength=q1e;pe.prototype.mod=J1e;pe.prototype.modPowInt=lCe;pe.prototype.clone=uCe;pe.prototype.intValue=dCe;pe.prototype.byteValue=pCe;pe.prototype.shortValue=fCe;pe.prototype.signum=mCe;pe.prototype.toByteArray=vCe;pe.prototype.toBuffer=xCe;pe.prototype.equals=_Ce;pe.prototype.min=zCe;pe.prototype.max=CCe;pe.prototype.and=TCe;pe.prototype.or=ECe;pe.prototype.xor=kCe;pe.prototype.andNot=OCe;pe.prototype.not=ICe;pe.prototype.shiftLeft=RCe;pe.prototype.shiftRight=ACe;pe.prototype.getLowestSetBit=BCe;pe.prototype.bitCount=LCe;pe.prototype.testBit=NCe;pe.prototype.setBit=MCe;pe.prototype.clearBit=qCe;pe.prototype.flipBit=FCe;pe.prototype.add=$Ce;pe.prototype.subtract=VCe;pe.prototype.multiply=HCe;pe.prototype.divide=KCe;pe.prototype.remainder=WCe;pe.prototype.divideAndRemainder=JCe;pe.prototype.modPow=cwe;pe.prototype.modInverse=dwe;pe.prototype.pow=ewe;pe.prototype.gcd=lwe;pe.prototype.isProbablePrime=fwe;pe.int2char=k_;pe.ZERO=Wi(0);pe.ONE=Wi(1);pe.prototype.square=GCe;t3.exports=pe});var i3=i(function(BLe,R_){var r3=ca(),Rc=c("crypto"),Wh=c("constants"),mwe={md2:Buffer.from("3020300c06082a864886f70d020205000410","hex"),md5:Buffer.from("3020300c06082a864886f70d020505000410","hex"),sha1:Buffer.from("3021300906052b0e03021a05000414","hex"),sha224:Buffer.from("302d300d06096086480165030402040500041c","hex"),sha256:Buffer.from("3031300d060960864801650304020105000420","hex"),sha384:Buffer.from("3041300d060960864801650304020205000430","hex"),sha512:Buffer.from("3051300d060960864801650304020305000440","hex"),ripemd160:Buffer.from("3021300906052b2403020105000414","hex"),rmd160:Buffer.from("3021300906052b2403020105000414","hex")},o3={ripemd160:"rmd160"},n3="sha256";R_.exports={isEncryption:!0,isSignature:!0};R_.exports.makeScheme=function(o,f){function h(y,x){this.key=y,this.options=x}return h.prototype.maxMessageLength=function(){if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==Wh.RSA_NO_PADDING)return this.key.encryptedDataLength;return this.key.encryptedDataLength-11},h.prototype.encPad=function(y,x){x=x||{};var _;if(y.length>this.key.maxMessageLength)throw Error("Message too long for RSA (n="+this.key.encryptedDataLength+", l="+y.length+")");if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==Wh.RSA_NO_PADDING)return _=Buffer.alloc(this.key.maxMessageLength-y.length),_.fill(0),Buffer.concat([_,y]);if(x.type===1)return _=Buffer.alloc(this.key.encryptedDataLength-y.length-1),_.fill(255,0,_.length-1),_[0]=1,_[_.length-1]=0,Buffer.concat([_,y]);else{_=Buffer.alloc(this.key.encryptedDataLength-y.length),_[0]=0,_[1]=2;var z=Rc.randomBytes(_.length-3);for(var C=0;C<z.length;C++){var w=z[C];while(w===0)w=Rc.randomBytes(1)[0];_[C+2]=w}return _[_.length-1]=0,Buffer.concat([_,y])}},h.prototype.encUnPad=function(y,x){x=x||{};var _=0;if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==Wh.RSA_NO_PADDING){var z;if(typeof y.lastIndexOf=="function")z=y.slice(y.lastIndexOf("\x00")+1,y.length);else z=y.slice(String.prototype.lastIndexOf.call(y,"\x00")+1,y.length);return z}if(y.length<4)return null;if(x.type===1){if(y[0]!==0||y[1]!==1)return null;_=3;while(y[_]!==0)if(y[_]!=255||++_>=y.length)return null}else{if(y[0]!==0||y[1]!==2)return null;_=3;while(y[_]!==0)if(++_>=y.length)return null}return y.slice(_+1,y.length)},h.prototype.sign=function(y){var x=this.options.signingSchemeOptions.hash||n3;if(this.options.environment==="browser"){x=o3[x]||x;var _=Rc.createHash(x);_.update(y);var z=this.pkcs1pad(_.digest(),x),C=this.key.$doPrivate(new r3(z)).toBuffer(this.key.encryptedDataLength);return C}else{var w=Rc.createSign("RSA-"+x.toUpperCase());return w.update(y),w.sign(this.options.rsaUtils.exportKey("private"))}},h.prototype.verify=function(y,x,_){if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==Wh.RSA_NO_PADDING)return!1;var z=this.options.signingSchemeOptions.hash||n3;if(this.options.environment==="browser"){if(z=o3[z]||z,_)x=Buffer.from(x,_);var C=Rc.createHash(z);C.update(y);var w=this.pkcs1pad(C.digest(),z),S=this.key.$doPublic(new r3(x));return S.toBuffer().toString("hex")==w.toString("hex")}else{var E=Rc.createVerify("RSA-"+z.toUpperCase());return E.update(y),E.verify(this.options.rsaUtils.exportKey("public"),x,_)}},h.prototype.pkcs0pad=function(y){var x=Buffer.alloc(this.key.maxMessageLength-y.length);return x.fill(0),Buffer.concat([x,y])},h.prototype.pkcs0unpad=function(y){var x;if(typeof y.lastIndexOf=="function")x=y.slice(y.lastIndexOf("\x00")+1,y.length);else x=y.slice(String.prototype.lastIndexOf.call(y,"\x00")+1,y.length);return x},h.prototype.pkcs1pad=function(y,x){var _=mwe[x];if(!_)throw Error("Unsupported hash algorithm");var z=Buffer.concat([_,y]);if(z.length+10>this.key.encryptedDataLength)throw Error("Key is too short for signing algorithm ("+x+")");var C=Buffer.alloc(this.key.encryptedDataLength-z.length-1);C.fill(255,0,C.length-1),C[0]=1,C[C.length-1]=0;var w=Buffer.concat([C,z]);return w},new h(o,f)}});var s3=i(function(LLe,xn){var DLe=ca(),Jh=c("crypto");xn.exports={isEncryption:!0,isSignature:!1};xn.exports.digestLength={md4:16,md5:16,ripemd160:20,rmd160:20,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64};var Zh="sha1";xn.exports.eme_oaep_mgf1=function(o,f,h){h=h||Zh;var y=xn.exports.digestLength[h],x=Math.ceil(f/y),_=Buffer.alloc(y*x),z=Buffer.alloc(4);for(var C=0;C<x;++C){var w=Jh.createHash(h);w.update(o),z.writeUInt32BE(C,0),w.update(z),w.digest().copy(_,C*y)}return _.slice(0,f)};xn.exports.makeScheme=function(o,f){function h(y,x){this.key=y,this.options=x}return h.prototype.maxMessageLength=function(){return this.key.encryptedDataLength-2*xn.exports.digestLength[this.options.encryptionSchemeOptions.hash||Zh]-2},h.prototype.encPad=function(y){var x=this.options.encryptionSchemeOptions.hash||Zh,_=this.options.encryptionSchemeOptions.mgf||xn.exports.eme_oaep_mgf1,z=this.options.encryptionSchemeOptions.label||Buffer.alloc(0),C=this.key.encryptedDataLength,w=xn.exports.digestLength[x];if(y.length>C-2*w-2)throw Error("Message is too long to encode into an encoded message with a length of "+C+" bytes, increaseemLen to fix this error (minimum value for given parameters and options: "+(C-2*w-2)+")");var S=Jh.createHash(x);S.update(z),S=S.digest();var E=Buffer.alloc(C-y.length-2*w-1);E.fill(0),E[E.length-1]=1;var k=Buffer.concat([S,E,y]),O=Jh.randomBytes(w),R=_(O,k.length,x);for(var I=0;I<k.length;I++)k[I]^=R[I];R=_(k,w,x);for(I=0;I<O.length;I++)O[I]^=R[I];var A=Buffer.alloc(1+O.length+k.length);return A[0]=0,O.copy(A,1),k.copy(A,1+O.length),A},h.prototype.encUnPad=function(y){var x=this.options.encryptionSchemeOptions.hash||Zh,_=this.options.encryptionSchemeOptions.mgf||xn.exports.eme_oaep_mgf1,z=this.options.encryptionSchemeOptions.label||Buffer.alloc(0),C=xn.exports.digestLength[x];if(y.length<2*C+2)throw Error("Error decoding message, the supplied message is not long enough to be a valid OAEP encoded message");var w=y.slice(1,C+1),S=y.slice(1+C),E=_(S,C,x);for(var k=0;k<w.length;k++)w[k]^=E[k];E=_(w,S.length,x);for(k=0;k<S.length;k++)S[k]^=E[k];var O=Jh.createHash(x);O.update(z),O=O.digest();var R=S.slice(0,C);if(R.toString("hex")!=O.toString("hex"))throw Error("Error decoding message, the lHash calculated from the label provided and the lHash in the encrypted data do not match.");k=C;while(S[k++]===0&&k<S.length);if(S[k-1]!=1)throw Error("Error decoding message, there is no padding message separator byte");return S.slice(k)},new h(o,f)}});var l3=i(function(NLe,A_){var a3=ca(),Ju=c("crypto");A_.exports={isEncryption:!1,isSignature:!0};var Yh="sha1",c3=20;A_.exports.makeScheme=function(o,f){var h=la().pkcs1_oaep;function y(x,_){this.key=x,this.options=_}return y.prototype.sign=function(x){var _=Ju.createHash(this.options.signingSchemeOptions.hash||Yh);_.update(x);var z=this.emsa_pss_encode(_.digest(),this.key.keySize-1);return this.key.$doPrivate(new a3(z)).toBuffer(this.key.encryptedDataLength)},y.prototype.verify=function(x,_,z){if(z)_=Buffer.from(_,z);_=new a3(_);var C=Math.ceil((this.key.keySize-1)/8),w=this.key.$doPublic(_).toBuffer(C),S=Ju.createHash(this.options.signingSchemeOptions.hash||Yh);return S.update(x),this.emsa_pss_verify(S.digest(),w,this.key.keySize-1)},y.prototype.emsa_pss_encode=function(x,_){var z=this.options.signingSchemeOptions.hash||Yh,C=this.options.signingSchemeOptions.mgf||h.eme_oaep_mgf1,w=this.options.signingSchemeOptions.saltLength||c3,S=h.digestLength[z],E=Math.ceil(_/8);if(E<S+w+2)throw Error("Output length passed to emBits("+_+") is too small for the options specified("+z+", "+w+"). To fix this issue increase the value of emBits. (minimum size: "+(8*S+8*w+9)+")");var k=Ju.randomBytes(w),O=Buffer.alloc(8+S+w);O.fill(0,0,8),x.copy(O,8),k.copy(O,8+x.length);var R=Ju.createHash(z);R.update(O),R=R.digest();var I=Buffer.alloc(E-k.length-S-2);I.fill(0);var A=Buffer.alloc(I.length+1+k.length);I.copy(A),A[I.length]=1,k.copy(A,I.length+1);var M=C(R,A.length,z),D=Buffer.alloc(A.length);for(var U=0;U<M.length;U++)D[U]=A[U]^M[U];var F=8*E-_,J=255^255>>8-F<<8-F;D[0]=D[0]&J;var Q=Buffer.alloc(D.length+R.length+1);return D.copy(Q,0),R.copy(Q,D.length),Q[Q.length-1]=188,Q},y.prototype.emsa_pss_verify=function(x,_,z){var C=this.options.signingSchemeOptions.hash||Yh,w=this.options.signingSchemeOptions.mgf||h.eme_oaep_mgf1,S=this.options.signingSchemeOptions.saltLength||c3,E=h.digestLength[C],k=Math.ceil(z/8);if(k<E+S+2||_[_.length-1]!=188)return!1;var O=Buffer.alloc(k-E-1);_.copy(O,0,0,k-E-1);var R=0;for(var I=0,A=8*k-z;I<A;I++)R|=1<<7-I;if((O[0]&R)!==0)return!1;var M=_.slice(k-E-1,k-1),D=w(M,O.length,C);for(I=0;I<O.length;I++)O[I]^=D[I];A=8*k-z,R=255^255>>8-A<<8-A,O[0]=O[0]&R;for(I=0;O[I]===0&&I<O.length;I++);if(O[I]!=1)return!1;var U=O.slice(O.length-S),F=Buffer.alloc(8+E+S);F.fill(0,0,8),x.copy(F,8),U.copy(F,8+x.length);var J=Ju.createHash(C);return J.update(F),J=J.digest(),M.toString("hex")===J.toString("hex")},new y(o,f)}});var la=i(function(jLe,Ac){Ac.exports={pkcs1:i3(),pkcs1_oaep:s3(),pss:l3(),isEncryption:function(o){return Ac.exports[o]&&Ac.exports[o].isEncryption},isSignature:function(o){return Ac.exports[o]&&Ac.exports[o].isSignature}}});var B_=i(function(MLe,u3){var P_=ca(),gwe=la();u3.exports=function(o,f){var h=gwe.pkcs1.makeScheme(o,f);return{encrypt:function(y,x){var _,z;if(x)_=new P_(h.encPad(y,{type:1})),z=o.$doPrivate(_);else _=new P_(o.encryptionScheme.encPad(y)),z=o.$doPublic(_);return z.toBuffer(o.encryptedDataLength)},decrypt:function(y,x){var _,z=new P_(y);if(x)return _=o.$doPublic(z),h.encUnPad(_.toBuffer(o.encryptedDataLength),{type:1});else return _=o.$doPrivate(z),o.encryptionScheme.encUnPad(_.toBuffer(o.encryptedDataLength))}}}});var p3=i(function(qLe,d3){var Xh=c("crypto"),Ji=c("constants"),ywe=la();d3.exports=function(o,f){var h=ywe.pkcs1.makeScheme(o,f);return{encrypt:function(y,x){var _;if(x){if(_=Ji.RSA_PKCS1_PADDING,f.encryptionSchemeOptions&&f.encryptionSchemeOptions.padding)_=f.encryptionSchemeOptions.padding;return Xh.privateEncrypt({key:f.rsaUtils.exportKey("private"),padding:_},y)}else{if(_=Ji.RSA_PKCS1_OAEP_PADDING,f.encryptionScheme==="pkcs1")_=Ji.RSA_PKCS1_PADDING;if(f.encryptionSchemeOptions&&f.encryptionSchemeOptions.padding)_=f.encryptionSchemeOptions.padding;var z=y;if(_===Ji.RSA_NO_PADDING)z=h.pkcs0pad(y);return Xh.publicEncrypt({key:f.rsaUtils.exportKey("public"),padding:_},z)}},decrypt:function(y,x){var _;if(x){if(_=Ji.RSA_PKCS1_PADDING,f.encryptionSchemeOptions&&f.encryptionSchemeOptions.padding)_=f.encryptionSchemeOptions.padding;return Xh.publicDecrypt({key:f.rsaUtils.exportKey("public"),padding:_},y)}else{if(_=Ji.RSA_PKCS1_OAEP_PADDING,f.encryptionScheme==="pkcs1")_=Ji.RSA_PKCS1_PADDING;if(f.encryptionSchemeOptions&&f.encryptionSchemeOptions.padding)_=f.encryptionSchemeOptions.padding;var z=Xh.privateDecrypt({key:f.rsaUtils.exportKey("private"),padding:_},y);if(_===Ji.RSA_NO_PADDING)return h.pkcs0unpad(z);return z}}}}});var m3=i(function(FLe,h3){var f3=c("crypto"),Pc=c("constants"),bwe=la();h3.exports=function(o,f){var h=B_()(o,f),y=bwe.pkcs1.makeScheme(o,f);return{encrypt:function(x,_){if(_)return h.encrypt(x,_);var z=Pc.RSA_PKCS1_OAEP_PADDING;if(f.encryptionScheme==="pkcs1")z=Pc.RSA_PKCS1_PADDING;if(f.encryptionSchemeOptions&&f.encryptionSchemeOptions.padding)z=f.encryptionSchemeOptions.padding;var C=x;if(z===Pc.RSA_NO_PADDING)C=y.pkcs0pad(x);return f3.publicEncrypt({key:f.rsaUtils.exportKey("public"),padding:z},C)},decrypt:function(x,_){if(_)return h.decrypt(x,_);var z=Pc.RSA_PKCS1_OAEP_PADDING;if(f.encryptionScheme==="pkcs1")z=Pc.RSA_PKCS1_PADDING;if(f.encryptionSchemeOptions&&f.encryptionSchemeOptions.padding)z=f.encryptionSchemeOptions.padding;var C=f3.privateDecrypt({key:f.rsaUtils.exportKey("private"),padding:z},x);if(z===Pc.RSA_NO_PADDING)return y.pkcs0unpad(C);return C}}}});var y3=i(function(ULe,g3){var Qh=c("crypto");g3.exports={getEngine:function(o,f){var h=B_();if(f.environment==="node"){if(typeof Qh.publicEncrypt==="function"&&typeof Qh.privateDecrypt==="function")if(typeof Qh.privateEncrypt==="function"&&typeof Qh.publicDecrypt==="function")h=p3();else h=m3()}return h(o,f)}}});var _3=i(function(xwe,x3){var em=io()._,$Le=c("crypto"),vr=ca(),b3=io(),v3=la(),vwe=y3();xwe.BigInteger=vr;xwe.Key=function(){function o(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return o.prototype.setOptions=function(f){var h=v3[f.signingScheme],y=v3[f.encryptionScheme];if(h===y)this.signingScheme=this.encryptionScheme=y.makeScheme(this,f);else this.encryptionScheme=y.makeScheme(this,f),this.signingScheme=h.makeScheme(this,f);this.encryptEngine=vwe.getEngine(this,f)},o.prototype.generate=function(f,h){var y=f>>1;this.e=parseInt(h,16);var x=new vr(h,16);while(!0){while(!0)if(this.p=new vr(f-y,1),this.p.subtract(vr.ONE).gcd(x).compareTo(vr.ONE)===0&&this.p.isProbablePrime(10))break;while(!0)if(this.q=new vr(y,1),this.q.subtract(vr.ONE).gcd(x).compareTo(vr.ONE)===0&&this.q.isProbablePrime(10))break;if(this.p.compareTo(this.q)<=0){var _=this.p;this.p=this.q,this.q=_}var z=this.p.subtract(vr.ONE),C=this.q.subtract(vr.ONE),w=z.multiply(C);if(w.gcd(x).compareTo(vr.ONE)===0){if(this.n=this.p.multiply(this.q),this.n.bitLength()<f)continue;this.d=x.modInverse(w),this.dmp1=this.d.mod(z),this.dmq1=this.d.mod(C),this.coeff=this.q.modInverse(this.p);break}}this.$$recalculateCache()},o.prototype.setPrivate=function(f,h,y,x,_,z,C,w){if(f&&h&&y&&f.length>0&&(em.isNumber(h)||h.length>0)&&y.length>0){if(this.n=new vr(f),this.e=em.isNumber(h)?h:b3.get32IntFromBuffer(h,0),this.d=new vr(y),x&&_&&z&&C&&w)this.p=new vr(x),this.q=new vr(_),this.dmp1=new vr(z),this.dmq1=new vr(C),this.coeff=new vr(w);this.$$recalculateCache()}else throw Error("Invalid RSA private key")},o.prototype.setPublic=function(f,h){if(f&&h&&f.length>0&&(em.isNumber(h)||h.length>0))this.n=new vr(f),this.e=em.isNumber(h)?h:b3.get32IntFromBuffer(h,0),this.$$recalculateCache();else throw Error("Invalid RSA public key")},o.prototype.$doPrivate=function(f){if(this.p||this.q)return f.modPow(this.d,this.n);var h=f.mod(this.p).modPow(this.dmp1,this.p),y=f.mod(this.q).modPow(this.dmq1,this.q);while(h.compareTo(y)<0)h=h.add(this.p);return h.subtract(y).multiply(this.coeff).mod(this.p).multiply(this.q).add(y)},o.prototype.$doPublic=function(f){return f.modPowInt(this.e,this.n)},o.prototype.encrypt=function(f,h){var y=[],x=[],_=f.length,z=Math.ceil(_/this.maxMessageLength)||1,C=Math.ceil(_/z||1);if(z==1)y.push(f);else for(var w=0;w<z;w++)y.push(f.slice(w*C,(w+1)*C));for(var S=0;S<y.length;S++)x.push(this.encryptEngine.encrypt(y[S],h));return Buffer.concat(x)},o.prototype.decrypt=function(f,h){if(f.length%this.encryptedDataLength>0)throw Error("Incorrect data or key");var y=[],x=0,_=0,z=f.length/this.encryptedDataLength;for(var C=0;C<z;C++)x=C*this.encryptedDataLength,_=x+this.encryptedDataLength,y.push(this.encryptEngine.decrypt(f.slice(x,Math.min(_,f.length)),h));return Buffer.concat(y)},o.prototype.sign=function(f){return this.signingScheme.sign.apply(this.signingScheme,arguments)},o.prototype.verify=function(f,h,y){return this.signingScheme.verify.apply(this.signingScheme,arguments)},o.prototype.isPrivate=function(){return this.n&&this.e&&this.d&&!0||!1},o.prototype.isPublic=function(f){return this.n&&this.e&&!(f&&this.d)||!1},Object.defineProperty(o.prototype,"keySize",{get:function(){return this.cache.keyBitLength}}),Object.defineProperty(o.prototype,"encryptedDataLength",{get:function(){return this.cache.keyByteLength}}),Object.defineProperty(o.prototype,"maxMessageLength",{get:function(){return this.encryptionScheme.maxMessageLength()}}),o.prototype.$$recalculateCache=function(){this.cache=this.cache||{},this.cache.keyBitLength=this.n.bitLength(),this.cache.keyByteLength=this.cache.keyBitLength+6>>3},o}()});var tm=i(function(VLe,z3){z3.exports={newInvalidAsn1Error:function(o){var f=Error();return f.name="InvalidAsn1Error",f.message=o||"",f}}});var rm=i(function(HLe,C3){C3.exports={EOC:0,Boolean:1,Integer:2,BitString:3,OctetString:4,Null:5,OID:6,ObjectDescriptor:7,External:8,Real:9,Enumeration:10,PDV:11,Utf8String:12,RelativeOID:13,Sequence:16,Set:17,NumericString:18,PrintableString:19,T61String:20,VideotexString:21,IA5String:22,UTCTime:23,GeneralizedTime:24,GraphicString:25,VisibleString:26,GeneralString:28,UniversalString:29,CharacterString:30,BMPString:31,Constructor:32,Context:128}});var D_=i(function(GLe,w3){var om=c("buffer"),Bc=om.Buffer,Qo={},en;for(en in om){if(!om.hasOwnProperty(en))continue;if(en==="SlowBuffer"||en==="Buffer")continue;Qo[en]=om[en]}var Dc=Qo.Buffer={};for(en in Bc){if(!Bc.hasOwnProperty(en))continue;if(en==="allocUnsafe"||en==="allocUnsafeSlow")continue;Dc[en]=Bc[en]}Qo.Buffer.prototype=Bc.prototype;if(!Dc.from||Dc.from===Uint8Array.from)Dc.from=function(o,f,h){if(typeof o==="number")throw TypeError('The "value" argument must not be of type number. Received type '+typeof o);if(o&&typeof o.length>"u")throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof o);return Bc(o,f,h)};if(!Dc.alloc)Dc.alloc=function(o,f,h){if(typeof o!=="number")throw TypeError('The "size" argument must be of type number. Received type '+typeof o);if(o<0||o>=2147483648)throw RangeError('The value "'+o+'" is invalid for option "size"');var y=Bc(o);if(!f||f.length===0)y.fill(0);else if(typeof h==="string")y.fill(f,h);else y.fill(f);return y};if(!Qo.kStringMaxLength)try{Qo.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch(o){}if(!Qo.constants){if(Qo.constants={MAX_LENGTH:Qo.kMaxLength},Qo.kStringMaxLength)Qo.constants.MAX_STRING_LENGTH=Qo.kStringMaxLength}w3.exports=Qo});var E3=i(function(KLe,T3){var Cwe=c("assert"),S3=D_().Buffer,Zu=rm(),wwe=tm(),Lc=wwe.newInvalidAsn1Error;function lo(o){if(!o||!S3.isBuffer(o))throw TypeError("data must be a node Buffer");this._buf=o,this._size=o.length,this._len=0,this._offset=0}Object.defineProperty(lo.prototype,"length",{enumerable:!0,get:function(){return this._len}});Object.defineProperty(lo.prototype,"offset",{enumerable:!0,get:function(){return this._offset}});Object.defineProperty(lo.prototype,"remain",{get:function(){return this._size-this._offset}});Object.defineProperty(lo.prototype,"buffer",{get:function(){return this._buf.slice(this._offset)}});lo.prototype.readByte=function(o){if(this._size-this._offset<1)return null;var f=this._buf[this._offset]&255;if(!o)this._offset+=1;return f};lo.prototype.peek=function(){return this.readByte(!0)};lo.prototype.readLength=function(o){if(o===void 0)o=this._offset;if(o>=this._size)return null;var f=this._buf[o++]&255;if(f===null)return null;if((f&128)===128){if(f&=127,f===0)throw Lc("Indefinite length not supported");if(f>4)throw Lc("encoding too long");if(this._size-o<f)return null;this._len=0;for(var h=0;h<f;h++)this._len=(this._len<<8)+(this._buf[o++]&255)}else this._len=f;return o};lo.prototype.readSequence=function(o){var f=this.peek();if(f===null)return null;if(o!==void 0&&o!==f)throw Lc("Expected 0x"+o.toString(16)+": got 0x"+f.toString(16));var h=this.readLength(this._offset+1);if(h===null)return null;return this._offset=h,f};lo.prototype.readInt=function(){return this._readTag(Zu.Integer)};lo.prototype.readBoolean=function(){return this._readTag(Zu.Boolean)===0?!1:!0};lo.prototype.readEnumeration=function(){return this._readTag(Zu.Enumeration)};lo.prototype.readString=function(o,f){if(!o)o=Zu.OctetString;var h=this.peek();if(h===null)return null;if(h!==o)throw Lc("Expected 0x"+o.toString(16)+": got 0x"+h.toString(16));var y=this.readLength(this._offset+1);if(y===null)return null;if(this.length>this._size-y)return null;if(this._offset=y,this.length===0)return f?S3.alloc(0):"";var x=this._buf.slice(this._offset,this._offset+this.length);return this._offset+=this.length,f?x:x.toString("utf8")};lo.prototype.readOID=function(o){if(!o)o=Zu.OID;var f=this.readString(o,!0);if(f===null)return null;var h=[],y=0;for(var x=0;x<f.length;x++){var _=f[x]&255;if(y<<=7,y+=_&127,(_&128)===0)h.push(y),y=0}return y=h.shift(),h.unshift(y%40),h.unshift(y/40>>0),h.join(".")};lo.prototype._readTag=function(o){Cwe.ok(o!==void 0);var f=this.peek();if(f===null)return null;if(f!==o)throw Lc("Expected 0x"+o.toString(16)+": got 0x"+f.toString(16));var h=this.readLength(this._offset+1);if(h===null)return null;if(this.length>4)throw Lc("Integer too long: "+this.length);if(this.length>this._size-h)return null;this._offset=h;var y=this._buf[this._offset],x=0;for(var _=0;_<this.length;_++)x<<=8,x|=this._buf[this._offset++]&255;if((y&128)===128&&_!==4)x-=1<<_*8;return x>>0};T3.exports=lo});var O3=i(function(WLe,k3){var Zi=c("assert"),nm=D_().Buffer,Yi=rm(),Swe=tm(),im=Swe.newInvalidAsn1Error,Twe={size:1024,growthFactor:8};function Ewe(o,f){Zi.ok(o),Zi.equal(typeof o,"object"),Zi.ok(f),Zi.equal(typeof f,"object");var h=Object.getOwnPropertyNames(o);return h.forEach(function(y){if(f[y])return;var x=Object.getOwnPropertyDescriptor(o,y);Object.defineProperty(f,y,x)}),f}function Zr(o){o=Ewe(Twe,o||{}),this._buf=nm.alloc(o.size||1024),this._size=this._buf.length,this._offset=0,this._options=o,this._seq=[]}Object.defineProperty(Zr.prototype,"buffer",{get:function(){if(this._seq.length)throw im(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)}});Zr.prototype.writeByte=function(o){if(typeof o!=="number")throw TypeError("argument must be a Number");this._ensure(1),this._buf[this._offset++]=o};Zr.prototype.writeInt=function(o,f){if(typeof o!=="number")throw TypeError("argument must be a Number");if(typeof f!=="number")f=Yi.Integer;var h=4;while(((o&4286578688)===0||(o&4286578688)===-8388608)&&h>1)h--,o<<=8;if(h>4)throw im("BER ints cannot be > 0xffffffff");this._ensure(2+h),this._buf[this._offset++]=f,this._buf[this._offset++]=h;while(h-- >0)this._buf[this._offset++]=(o&4278190080)>>>24,o<<=8};Zr.prototype.writeNull=function(){this.writeByte(Yi.Null),this.writeByte(0)};Zr.prototype.writeEnumeration=function(o,f){if(typeof o!=="number")throw TypeError("argument must be a Number");if(typeof f!=="number")f=Yi.Enumeration;return this.writeInt(o,f)};Zr.prototype.writeBoolean=function(o,f){if(typeof o!=="boolean")throw TypeError("argument must be a Boolean");if(typeof f!=="number")f=Yi.Boolean;this._ensure(3),this._buf[this._offset++]=f,this._buf[this._offset++]=1,this._buf[this._offset++]=o?255:0};Zr.prototype.writeString=function(o,f){if(typeof o!=="string")throw TypeError("argument must be a string (was: "+typeof o+")");if(typeof f!=="number")f=Yi.OctetString;var h=nm.byteLength(o);if(this.writeByte(f),this.writeLength(h),h)this._ensure(h),this._buf.write(o,this._offset),this._offset+=h};Zr.prototype.writeBuffer=function(o,f){if(typeof f!=="number")throw TypeError("tag must be a number");if(!nm.isBuffer(o))throw TypeError("argument must be a buffer");this.writeByte(f),this.writeLength(o.length),this._ensure(o.length),o.copy(this._buf,this._offset,0,o.length),this._offset+=o.length};Zr.prototype.writeStringArray=function(o){if(!o instanceof Array)throw TypeError("argument must be an Array[String]");var f=this;o.forEach(function(h){f.writeString(h)})};Zr.prototype.writeOID=function(o,f){if(typeof o!=="string")throw TypeError("argument must be a string");if(typeof f!=="number")f=Yi.OID;if(!/^([0-9]+\.){3,}[0-9]+$/.test(o))throw Error("argument is not a valid OID string");function h(z,C){if(C<128)z.push(C);else if(C<16384)z.push(C>>>7|128),z.push(C&127);else if(C<2097152)z.push(C>>>14|128),z.push((C>>>7|128)&255),z.push(C&127);else if(C<268435456)z.push(C>>>21|128),z.push((C>>>14|128)&255),z.push((C>>>7|128)&255),z.push(C&127);else z.push((C>>>28|128)&255),z.push((C>>>21|128)&255),z.push((C>>>14|128)&255),z.push((C>>>7|128)&255),z.push(C&127)}var y=o.split("."),x=[];x.push(parseInt(y[0],10)*40+parseInt(y[1],10)),y.slice(2).forEach(function(z){h(x,parseInt(z,10))});var _=this;this._ensure(2+x.length),this.writeByte(f),this.writeLength(x.length),x.forEach(function(z){_.writeByte(z)})};Zr.prototype.writeLength=function(o){if(typeof o!=="number")throw TypeError("argument must be a Number");if(this._ensure(4),o<=127)this._buf[this._offset++]=o;else if(o<=255)this._buf[this._offset++]=129,this._buf[this._offset++]=o;else if(o<=65535)this._buf[this._offset++]=130,this._buf[this._offset++]=o>>8,this._buf[this._offset++]=o;else if(o<=16777215)this._buf[this._offset++]=131,this._buf[this._offset++]=o>>16,this._buf[this._offset++]=o>>8,this._buf[this._offset++]=o;else throw im("Length too long (> 4 bytes)")};Zr.prototype.startSequence=function(o){if(typeof o!=="number")o=Yi.Sequence|Yi.Constructor;this.writeByte(o),this._seq.push(this._offset),this._ensure(3),this._offset+=3};Zr.prototype.endSequence=function(){var o=this._seq.pop(),f=o+3,h=this._offset-f;if(h<=127)this._shift(f,h,-2),this._buf[o]=h;else if(h<=255)this._shift(f,h,-1),this._buf[o]=129,this._buf[o+1]=h;else if(h<=65535)this._buf[o]=130,this._buf[o+1]=h>>8,this._buf[o+2]=h;else if(h<=16777215)this._shift(f,h,1),this._buf[o]=131,this._buf[o+1]=h>>16,this._buf[o+2]=h>>8,this._buf[o+3]=h;else throw im("Sequence too long")};Zr.prototype._shift=function(o,f,h){Zi.ok(o!==void 0),Zi.ok(f!==void 0),Zi.ok(h),this._buf.copy(this._buf,o+h,o,o+f),this._offset+=h};Zr.prototype._ensure=function(o){if(Zi.ok(o),this._size-this._offset<o){var f=this._size*this._options.growthFactor;if(f-this._offset<o)f+=o;var h=nm.alloc(f);this._buf.copy(h,0,0,this._offset),this._buf=h,this._size=f}};k3.exports=Zr});var I3=i(function(JLe,sm){var L_=tm(),N_=rm(),kwe=E3(),Owe=O3();sm.exports={Reader:kwe,Writer:Owe};for(Yu in N_)if(N_.hasOwnProperty(Yu))sm.exports[Yu]=N_[Yu];var Yu;for(Xu in L_)if(L_.hasOwnProperty(Xu))sm.exports[Xu]=L_[Xu];var Xu});var am=i(function(ZLe,R3){var j_=I3();R3.exports={Ber:j_,BerReader:j_.Reader,BerWriter:j_.Writer}});var N3=i(function(YLe,um){var cm=am().Ber,A3=io()._,lm=io(),P3="-----BEGIN RSA PRIVATE KEY-----",B3="-----END RSA PRIVATE KEY-----",D3="-----BEGIN RSA PUBLIC KEY-----",L3="-----END RSA PUBLIC KEY-----";um.exports={privateExport:function(o,f){f=f||{};var h=o.n.toBuffer(),y=o.d.toBuffer(),x=o.p.toBuffer(),_=o.q.toBuffer(),z=o.dmp1.toBuffer(),C=o.dmq1.toBuffer(),w=o.coeff.toBuffer(),S=h.length+y.length+x.length+_.length+z.length+C.length+w.length+512,E=new cm.Writer({size:S});if(E.startSequence(),E.writeInt(0),E.writeBuffer(h,2),E.writeInt(o.e),E.writeBuffer(y,2),E.writeBuffer(x,2),E.writeBuffer(_,2),E.writeBuffer(z,2),E.writeBuffer(C,2),E.writeBuffer(w,2),E.endSequence(),f.type==="der")return E.buffer;else return P3+`
137
+ `+lm.linebrk(E.buffer.toString("base64"),64)+`
138
+ `+B3},privateImport:function(o,f,h){h=h||{};var y;if(h.type!=="der"){if(Buffer.isBuffer(f))f=f.toString("utf8");if(A3.isString(f)){var x=lm.trimSurroundingText(f,P3,B3).replace(/\s+|\n\r|\n|\r$/gm,"");y=Buffer.from(x,"base64")}else throw Error("Unsupported key format")}else if(Buffer.isBuffer(f))y=f;else throw Error("Unsupported key format");var _=new cm.Reader(y);_.readSequence(),_.readString(2,!0),o.setPrivate(_.readString(2,!0),_.readString(2,!0),_.readString(2,!0),_.readString(2,!0),_.readString(2,!0),_.readString(2,!0),_.readString(2,!0),_.readString(2,!0))},publicExport:function(o,f){f=f||{};var h=o.n.toBuffer(),y=h.length+512,x=new cm.Writer({size:y});if(x.startSequence(),x.writeBuffer(h,2),x.writeInt(o.e),x.endSequence(),f.type==="der")return x.buffer;else return D3+`
139
+ `+lm.linebrk(x.buffer.toString("base64"),64)+`
140
+ `+L3},publicImport:function(o,f,h){h=h||{};var y;if(h.type!=="der"){if(Buffer.isBuffer(f))f=f.toString("utf8");if(A3.isString(f)){var x=lm.trimSurroundingText(f,D3,L3).replace(/\s+|\n\r|\n|\r$/gm,"");y=Buffer.from(x,"base64")}}else if(Buffer.isBuffer(f))y=f;else throw Error("Unsupported key format");var _=new cm.Reader(y);_.readSequence(),o.setPublic(_.readString(2,!0),_.readString(2,!0))},autoImport:function(o,f){if(/^[\S\s]*-----BEGIN RSA PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END RSA PRIVATE KEY-----[\S\s]*$/g.test(f))return um.exports.privateImport(o,f),!0;if(/^[\S\s]*-----BEGIN RSA PUBLIC KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END RSA PUBLIC KEY-----[\S\s]*$/g.test(f))return um.exports.publicImport(o,f),!0;return!1}}});var $3=i(function(XLe,fm){var Hn=am().Ber,j3=io()._,dm="1.2.840.113549.1.1.1",pm=io(),M3="-----BEGIN PRIVATE KEY-----",q3="-----END PRIVATE KEY-----",F3="-----BEGIN PUBLIC KEY-----",U3="-----END PUBLIC KEY-----";fm.exports={privateExport:function(o,f){f=f||{};var h=o.n.toBuffer(),y=o.d.toBuffer(),x=o.p.toBuffer(),_=o.q.toBuffer(),z=o.dmp1.toBuffer(),C=o.dmq1.toBuffer(),w=o.coeff.toBuffer(),S=h.length+y.length+x.length+_.length+z.length+C.length+w.length+512,E=new Hn.Writer({size:S});E.startSequence(),E.writeInt(0),E.writeBuffer(h,2),E.writeInt(o.e),E.writeBuffer(y,2),E.writeBuffer(x,2),E.writeBuffer(_,2),E.writeBuffer(z,2),E.writeBuffer(C,2),E.writeBuffer(w,2),E.endSequence();var k=new Hn.Writer({size:S});if(k.startSequence(),k.writeInt(0),k.startSequence(),k.writeOID(dm),k.writeNull(),k.endSequence(),k.writeBuffer(E.buffer,4),k.endSequence(),f.type==="der")return k.buffer;else return M3+`
141
+ `+pm.linebrk(k.buffer.toString("base64"),64)+`
142
+ `+q3},privateImport:function(o,f,h){h=h||{};var y;if(h.type!=="der"){if(Buffer.isBuffer(f))f=f.toString("utf8");if(j3.isString(f)){var x=pm.trimSurroundingText(f,M3,q3).replace("-----END PRIVATE KEY-----","").replace(/\s+|\n\r|\n|\r$/gm,"");y=Buffer.from(x,"base64")}else throw Error("Unsupported key format")}else if(Buffer.isBuffer(f))y=f;else throw Error("Unsupported key format");var _=new Hn.Reader(y);_.readSequence(),_.readInt(0);var z=new Hn.Reader(_.readString(48,!0));if(z.readOID(6,!0)!==dm)throw Error("Invalid Public key format");var C=new Hn.Reader(_.readString(4,!0));C.readSequence(),C.readString(2,!0),o.setPrivate(C.readString(2,!0),C.readString(2,!0),C.readString(2,!0),C.readString(2,!0),C.readString(2,!0),C.readString(2,!0),C.readString(2,!0),C.readString(2,!0))},publicExport:function(o,f){f=f||{};var h=o.n.toBuffer(),y=h.length+512,x=new Hn.Writer({size:y});x.writeByte(0),x.startSequence(),x.writeBuffer(h,2),x.writeInt(o.e),x.endSequence();var _=new Hn.Writer({size:y});if(_.startSequence(),_.startSequence(),_.writeOID(dm),_.writeNull(),_.endSequence(),_.writeBuffer(x.buffer,3),_.endSequence(),f.type==="der")return _.buffer;else return F3+`
143
+ `+pm.linebrk(_.buffer.toString("base64"),64)+`
144
+ `+U3},publicImport:function(o,f,h){h=h||{};var y;if(h.type!=="der"){if(Buffer.isBuffer(f))f=f.toString("utf8");if(j3.isString(f)){var x=pm.trimSurroundingText(f,F3,U3).replace(/\s+|\n\r|\n|\r$/gm,"");y=Buffer.from(x,"base64")}}else if(Buffer.isBuffer(f))y=f;else throw Error("Unsupported key format");var _=new Hn.Reader(y);_.readSequence();var z=new Hn.Reader(_.readString(48,!0));if(z.readOID(6,!0)!==dm)throw Error("Invalid Public key format");var C=new Hn.Reader(_.readString(3,!0));C.readByte(),C.readSequence(),o.setPublic(C.readString(2,!0),C.readString(2,!0))},autoImport:function(o,f){if(/^[\S\s]*-----BEGIN PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END PRIVATE KEY-----[\S\s]*$/g.test(f))return fm.exports.privateImport(o,f),!0;if(/^[\S\s]*-----BEGIN PUBLIC KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END PUBLIC KEY-----[\S\s]*$/g.test(f))return fm.exports.publicImport(o,f),!0;return!1}}});var V3=i(function(tNe,hm){var QLe=io()._,eNe=io();hm.exports={privateExport:function(o,f){return{n:o.n.toBuffer(),e:o.e,d:o.d.toBuffer(),p:o.p.toBuffer(),q:o.q.toBuffer(),dmp1:o.dmp1.toBuffer(),dmq1:o.dmq1.toBuffer(),coeff:o.coeff.toBuffer()}},privateImport:function(o,f,h){if(f.n&&f.e&&f.d&&f.p&&f.q&&f.dmp1&&f.dmq1&&f.coeff)o.setPrivate(f.n,f.e,f.d,f.p,f.q,f.dmp1,f.dmq1,f.coeff);else throw Error("Invalid key data")},publicExport:function(o,f){return{n:o.n.toBuffer(),e:o.e}},publicImport:function(o,f,h){if(f.n&&f.e)o.setPublic(f.n,f.e);else throw Error("Invalid key data")},autoImport:function(o,f){if(f.n&&f.e)if(f.d&&f.p&&f.q&&f.dmp1&&f.dmq1&&f.coeff)return hm.exports.privateImport(o,f),!0;else return hm.exports.publicImport(o,f),!0;return!1}}});var J3=i(function(rNe,mm){var H3=io()._,G3=io(),Qu=ca(),K3="-----BEGIN OPENSSH PRIVATE KEY-----",W3="-----END OPENSSH PRIVATE KEY-----";mm.exports={privateExport:function(o,f){let h=o.n.toBuffer(),y=Buffer.alloc(4);y.writeUInt32BE(o.e,0);while(y[0]===0)y=y.slice(1);let x=o.d.toBuffer(),_=o.coeff.toBuffer(),z=o.p.toBuffer(),C=o.q.toBuffer(),w;if(typeof o.sshcomment<"u")w=Buffer.from(o.sshcomment);else w=Buffer.from([]);let S=15+y.byteLength+4+h.byteLength,E=23+h.byteLength+4+y.byteLength+4+x.byteLength+4+_.byteLength+4+z.byteLength+4+C.byteLength+4+w.byteLength,k=43+S+4+E,O=Math.ceil(E/8)*8-E;k+=O;let R=Buffer.alloc(k),I={buf:R,off:0};R.write("openssh-key-v1","utf8"),R.writeUInt8(0,14),I.off+=15,Vr(I,Buffer.from("none")),Vr(I,Buffer.from("none")),Vr(I,Buffer.from("")),I.off=I.buf.writeUInt32BE(1,I.off),I.off=I.buf.writeUInt32BE(S,I.off),Vr(I,Buffer.from("ssh-rsa")),Vr(I,y),Vr(I,h),I.off=I.buf.writeUInt32BE(k-47-S,I.off),I.off+=8,Vr(I,Buffer.from("ssh-rsa")),Vr(I,h),Vr(I,y),Vr(I,x),Vr(I,_),Vr(I,z),Vr(I,C),Vr(I,w);let A=1;while(I.off<k)I.off=I.buf.writeUInt8(A++,I.off);if(f.type==="der")return I.buf;else return K3+`
145
+ `+G3.linebrk(R.toString("base64"),70)+`
146
+ `+W3+`
147
+ `},privateImport:function(o,f,h){h=h||{};var y;if(h.type!=="der"){if(Buffer.isBuffer(f))f=f.toString("utf8");if(H3.isString(f)){var x=G3.trimSurroundingText(f,K3,W3).replace(/\s+|\n\r|\n|\r$/gm,"");y=Buffer.from(x,"base64")}else throw Error("Unsupported key format")}else if(Buffer.isBuffer(f))y=f;else throw Error("Unsupported key format");let _={buf:y,off:0};if(y.slice(0,14).toString("ascii")!=="openssh-key-v1")throw"Invalid file format.";if(_.off+=15,$r(_).toString("ascii")!=="none")throw Error("Unsupported key type");if($r(_).toString("ascii")!=="none")throw Error("Unsupported key type");if($r(_).toString("ascii")!=="")throw Error("Unsupported key type");if(_.off+=4,_.off+=4,$r(_).toString("ascii")!=="ssh-rsa")throw Error("Unsupported key type");if($r(_),$r(_),_.off+=12,$r(_).toString("ascii")!=="ssh-rsa")throw Error("Unsupported key type");let z=$r(_),C=$r(_),w=$r(_),S=$r(_),E=$r(_),k=$r(_),O=new Qu(w),R=new Qu(k),I=new Qu(E),A=O.mod(I.subtract(Qu.ONE)),M=O.mod(R.subtract(Qu.ONE));o.setPrivate(z,C,w,E,k,A.toBuffer(),M.toBuffer(),S),o.sshcomment=$r(_).toString("ascii")},publicExport:function(o,f){let h=Buffer.alloc(4);h.writeUInt32BE(o.e,0);while(h[0]===0)h=h.slice(1);let y=o.n.toBuffer(),x=Buffer.alloc(h.byteLength+4+y.byteLength+4+7+4),_={buf:x,off:0};Vr(_,Buffer.from("ssh-rsa")),Vr(_,h),Vr(_,y);let z=o.sshcomment||"";if(f.type==="der")return _.buf;else return"ssh-rsa "+x.toString("base64")+" "+z+`
148
+ `},publicImport:function(o,f,h){h=h||{};var y;if(h.type!=="der"){if(Buffer.isBuffer(f))f=f.toString("utf8");if(H3.isString(f)){if(f.substring(0,8)!=="ssh-rsa ")throw Error("Unsupported key format");let w=f.indexOf(" ",8);if(w===-1)w=f.length;else o.sshcomment=f.substring(w+1).replace(/\s+|\n\r|\n|\r$/gm,"");let S=f.substring(8,w).replace(/\s+|\n\r|\n|\r$/gm,"");y=Buffer.from(S,"base64")}else throw Error("Unsupported key format")}else if(Buffer.isBuffer(f))y=f;else throw Error("Unsupported key format");let x={buf:y,off:0},_=$r(x).toString("ascii");if(_!=="ssh-rsa")throw Error("Invalid key type: "+_);let z=$r(x),C=$r(x);o.setPublic(C,z)},autoImport:function(o,f){if(/^[\S\s]*-----BEGIN OPENSSH PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END OPENSSH PRIVATE KEY-----[\S\s]*$/g.test(f))return mm.exports.privateImport(o,f),!0;if(/^[\S\s]*ssh-rsa \s*(?=(([A-Za-z0-9+/=]+\s*)+))\1[\S\s]*$/g.test(f))return mm.exports.publicImport(o,f),!0;return!1}};function $r(o){let f=o.buf.readInt32BE(o.off);o.off+=4;let h=o.buf.slice(o.off,o.off+f);return o.off+=f,h}function Vr(o,f){o.buf.writeInt32BE(f.byteLength,o.off),o.off+=4,o.off+=f.copy(o.buf,o.off)}});var Y3=i(function(nNe,xr){var oNe=io()._;function Z3(o){o=o.split("-");var f="private",h={type:"default"};for(var y=1;y<o.length;y++)if(o[y])switch(o[y]){case"public":f=o[y];break;case"private":f=o[y];break;case"pem":h.type=o[y];break;case"der":h.type=o[y];break}return{scheme:o[0],keyType:f,keyOpt:h}}xr.exports={pkcs1:N3(),pkcs8:$3(),components:V3(),openssh:J3(),isPrivateExport:function(o){return xr.exports[o]&&typeof xr.exports[o].privateExport==="function"},isPrivateImport:function(o){return xr.exports[o]&&typeof xr.exports[o].privateImport==="function"},isPublicExport:function(o){return xr.exports[o]&&typeof xr.exports[o].publicExport==="function"},isPublicImport:function(o){return xr.exports[o]&&typeof xr.exports[o].publicImport==="function"},detectAndImport:function(o,f,h){if(h===void 0){for(var y in xr.exports)if(typeof xr.exports[y].autoImport==="function"&&xr.exports[y].autoImport(o,f))return!0}else if(h){var x=Z3(h);if(xr.exports[x.scheme])if(x.keyType==="private")xr.exports[x.scheme].privateImport(o,f,x.keyOpt);else xr.exports[x.scheme].publicImport(o,f,x.keyOpt);else throw Error("Unsupported key format")}return!1},detectAndExport:function(o,f){if(f){var h=Z3(f);if(xr.exports[h.scheme])if(h.keyType==="private"){if(!o.isPrivate())throw Error("This is not private key");return xr.exports[h.scheme].privateExport(o,h.keyOpt)}else{if(!o.isPublic())throw Error("This is not public key");return xr.exports[h.scheme].publicExport(o,h.keyOpt)}else throw Error("Unsupported key format")}}}});var rF=i(function(aNe,tF){/*!
149
+ * RSA library for Node.js
150
+ *
151
+ * Author: rzcoder
152
+ * License MIT
153
+ */var X3=c("constants"),Iwe=_3(),iNe=c("crypto"),sNe=am().Ber,Ao=io()._,Rwe=io(),Q3=la(),eF=Y3();if(typeof X3.RSA_NO_PADDING>"u")X3.RSA_NO_PADDING=3;tF.exports=function(){var o={node10:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],node:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],iojs:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],browser:["md5","ripemd160","sha1","sha256","sha512"]},f="pkcs1_oaep",h="pkcs1",y="private",x={private:"pkcs1-private-pem","private-der":"pkcs1-private-der",public:"pkcs8-public-pem","public-der":"pkcs8-public-der"};function _(z,C,w){if(!(this instanceof _))return new _(z,C,w);if(Ao.isObject(C))w=C,C=void 0;if(this.$options={signingScheme:h,signingSchemeOptions:{hash:"sha256",saltLength:null},encryptionScheme:f,encryptionSchemeOptions:{hash:"sha1",label:null},environment:Rwe.detectEnvironment(),rsaUtils:this},this.keyPair=new Iwe.Key,this.$cache={},Buffer.isBuffer(z)||Ao.isString(z))this.importKey(z,C);else if(Ao.isObject(z))this.generateKeyPair(z.b,z.e);this.setOptions(w)}return _.prototype.setOptions=function(z){if(z=z||{},z.environment)this.$options.environment=z.environment;if(z.signingScheme){if(Ao.isString(z.signingScheme)){var C=z.signingScheme.toLowerCase().split("-");if(C.length==1)if(o.node.indexOf(C[0])>-1)this.$options.signingSchemeOptions={hash:C[0]},this.$options.signingScheme=h;else this.$options.signingScheme=C[0],this.$options.signingSchemeOptions={hash:null};else this.$options.signingSchemeOptions={hash:C[1]},this.$options.signingScheme=C[0]}else if(Ao.isObject(z.signingScheme))this.$options.signingScheme=z.signingScheme.scheme||h,this.$options.signingSchemeOptions=Ao.omit(z.signingScheme,"scheme");if(!Q3.isSignature(this.$options.signingScheme))throw Error("Unsupported signing scheme");if(this.$options.signingSchemeOptions.hash&&o[this.$options.environment].indexOf(this.$options.signingSchemeOptions.hash)===-1)throw Error("Unsupported hashing algorithm for "+this.$options.environment+" environment")}if(z.encryptionScheme){if(Ao.isString(z.encryptionScheme))this.$options.encryptionScheme=z.encryptionScheme.toLowerCase(),this.$options.encryptionSchemeOptions={};else if(Ao.isObject(z.encryptionScheme))this.$options.encryptionScheme=z.encryptionScheme.scheme||f,this.$options.encryptionSchemeOptions=Ao.omit(z.encryptionScheme,"scheme");if(!Q3.isEncryption(this.$options.encryptionScheme))throw Error("Unsupported encryption scheme");if(this.$options.encryptionSchemeOptions.hash&&o[this.$options.environment].indexOf(this.$options.encryptionSchemeOptions.hash)===-1)throw Error("Unsupported hashing algorithm for "+this.$options.environment+" environment")}this.keyPair.setOptions(this.$options)},_.prototype.generateKeyPair=function(z,C){if(z=z||2048,C=C||65537,z%8!==0)throw Error("Key size must be a multiple of 8.");return this.keyPair.generate(z,C.toString(16)),this.$cache={},this},_.prototype.importKey=function(z,C){if(!z)throw Error("Empty key given");if(C)C=x[C]||C;if(!eF.detectAndImport(this.keyPair,z,C)&&C===void 0)throw Error("Key format must be specified");return this.$cache={},this},_.prototype.exportKey=function(z){if(z=z||y,z=x[z]||z,!this.$cache[z])this.$cache[z]=eF.detectAndExport(this.keyPair,z);return this.$cache[z]},_.prototype.isPrivate=function(){return this.keyPair.isPrivate()},_.prototype.isPublic=function(z){return this.keyPair.isPublic(z)},_.prototype.isEmpty=function(z){return!(this.keyPair.n||this.keyPair.e||this.keyPair.d)},_.prototype.encrypt=function(z,C,w){return this.$$encryptKey(!1,z,C,w)},_.prototype.decrypt=function(z,C){return this.$$decryptKey(!1,z,C)},_.prototype.encryptPrivate=function(z,C,w){return this.$$encryptKey(!0,z,C,w)},_.prototype.decryptPublic=function(z,C){return this.$$decryptKey(!0,z,C)},_.prototype.$$encryptKey=function(z,C,w,S){try{var E=this.keyPair.encrypt(this.$getDataForEncrypt(C,S),z);if(w=="buffer"||!w)return E;else return E.toString(w)}catch(k){throw Error("Error during encryption. Original error: "+k)}},_.prototype.$$decryptKey=function(z,C,w){try{C=Ao.isString(C)?Buffer.from(C,"base64"):C;var S=this.keyPair.decrypt(C,z);if(S===null)throw Error("Key decrypt method returns null.");return this.$getDecryptedData(S,w)}catch(E){throw Error("Error during decryption (probably incorrect key). Original error: "+E)}},_.prototype.sign=function(z,C,w){if(!this.isPrivate())throw Error("This is not private key");var S=this.keyPair.sign(this.$getDataForEncrypt(z,w));if(C&&C!="buffer")S=S.toString(C);return S},_.prototype.verify=function(z,C,w,S){if(!this.isPublic())throw Error("This is not public key");return S=!S||S=="buffer"?null:S,this.keyPair.verify(this.$getDataForEncrypt(z,w),C,S)},_.prototype.getKeySize=function(){return this.keyPair.keySize},_.prototype.getMaxMessageSize=function(){return this.keyPair.maxMessageLength},_.prototype.$getDataForEncrypt=function(z,C){if(Ao.isString(z)||Ao.isNumber(z))return Buffer.from(""+z,C||"utf8");else if(Buffer.isBuffer(z))return z;else if(Ao.isObject(z))return Buffer.from(JSON.stringify(z));else throw Error("Unexpected data type")},_.prototype.$getDecryptedData=function(z,C){if(C=C||"buffer",C=="buffer")return z;else if(C=="json")return JSON.parse(z.toString());else return z.toString(C)},_}()});var iF=i(function(cNe,nF){var oF=c("crypto"),Awe=T_(),Pwe=Ku();class ui{static parseKey(o){if(o.tag!==Pwe.tag_Sequence)throw Error("corrupt private key");let f=o.getBigInteger();if(f!==ui.version)throw Error("version mismatch: (supported "+this.version+", parsed: "+f);let h=o.getDerValue(),y=o.getDerValue(),x=new Awe(h.data);if(ui.supportedTypes.dsa===x.toString()||ui.supportedTypes.ec===x.toString())return ui.format(o.buffer);try{let _=y.getOctetString();return ui.export(_)}catch(_){let z=Error("Something went wrong with algorithm "+x.toString()+". For more details see 'error.context'");throw z.context=_,z}}static export(o){if(typeof oF.createPrivateKey==="function")return oF.createPrivateKey({key:o,format:"der",type:"pkcs1"}).export({format:"pem",type:"pkcs8"});else return new(rF())(o,"pkcs1-der").exportKey("pkcs8-pem")+`
154
+ `}static format(o){return`-----BEGIN PRIVATE KEY-----
155
+ `+o.toString("base64").match(/.{1,64}/g).join(`
156
+ `)+`
157
+ -----END PRIVATE KEY-----
158
+ `}}ui.supportedTypes={rsa:"1.2.840.113549.1.1.1","rsa-pss":"1.2.840.113549.1.1.10",dsa:"1.2.840.10040.4.1",ec:"1.2.840.10045.2.1",x25519:"1.3.101.110",x448:"1.3.101.111",ed25519:"1.3.101.112",ed448:"1.3.101.113",dh:"1.2.840.113549.1.3.1"};ui.version=0;nF.exports=ui});var cF=i(function(lNe,aF){var sF=c("crypto"),Bwe=iF(),Dwe=Ku(),Lwe=qs(),dd=sc();class Or{constructor(o){this.messageDigest=sF.createHash(Or.DIGEST_ALG),this.passwdBytes=Buffer.alloc(o.length*2);for(let f=0,h=0;f<o.length;f++)this.passwdBytes[h++]=o[f].charCodeAt()>>8,this.passwdBytes[h++]=o[f].charCodeAt()}resetDigest(){this.messageDigest=sF.createHash(Or.DIGEST_ALG)}recover(o){let f,h,y;if(o.getAlgorithm()!==Or.KEY_PROTECTOR_OID)throw Error("Unsupported key protection alghorithm");let _=o.getEncryptedData(),z=dd(_,0,Or.SALT_LEN);if(y=_.length-Or.SALT_LEN-Or.DIGEST_LEN,h=Math.floor(y/Or.DIGEST_LEN),y%Or.DIGEST_LEN!==0)h++;let C=dd(_,Or.SALT_LEN,y+Or.SALT_LEN),w=Buffer.alloc(C.length);for(let E=0,k=0,O=z;E<h;E++,k+=Or.DIGEST_LEN)if(this.messageDigest.update(this.passwdBytes),this.messageDigest.update(O),O=this.messageDigest.digest(),this.resetDigest(),E<h-1)w=Buffer.concat([dd(w,0,k),O]);else w=Buffer.concat([dd(w,0,k),dd(O,0,C.length-k)]);let S=Buffer.alloc(C.length);for(let E=0;E<S.length;E++)S[E]=C[E]^w[E];this.messageDigest.update(this.passwdBytes),this.messageDigest.update(S),f=this.messageDigest.digest(),this.resetDigest();for(let E=0;E<f.length;E++)if(f[E]!=_[Or.SALT_LEN+y+E])throw Error("Cannot recover key");return Bwe.parseKey(new Dwe(new Lwe(S)))}}Or.SALT_LEN=20;Or.DIGEST_ALG="sha1";Or.DIGEST_LEN=20;Or.KEY_PROTECTOR_OID="1.3.6.1.4.1.42.2.17.1.1";aF.exports=Or});var dF=i(function(uNe,uF){class lF{generate(o){return`-----BEGIN CERTIFICATE-----
159
+ `+o.toString("base64").match(/.{1,64}/g).join(`
160
+ `)+`
161
+ -----END CERTIFICATE-----
162
+ `}}uF.exports=lF});var mF=i(function(dNe,hF){var pF=dF();class fF{constructor(){this.algorithms={X509:pF,"X.509":pF}}get(o){if(!this.algorithms[o])throw Error("The certificate type "+o+" is not supported");return new this.algorithms[o]}}hF.exports=fF});var xF=i(function(pNe,vF){var Nwe=wM(),M_=Uq(),jwe=_x(),Mwe=zx(),qwe=Zq(),Fwe=cF(),Uwe=mF(),gF=(o)=>new Uwe().get(o.certType).generate(o.value),yF=(o,f="")=>{let h=new qwe(o);return new Fwe(f).recover(h)},bF=(o,f)=>new Nwe(o,f).parse(),$we=(o,f)=>new M_(o,f).parse(),Vwe=(o,f)=>{let h=new M_(o,f),y=h.parse();return h.toPem(y)},Hwe=(o,f,h)=>{if(h===void 0)h=f;return bF(o,f).reduce((x,_)=>{if(_ instanceof Mwe)return Object.assign({},x,{[_.alias]:{ca:gF(_.cert)}});else if(_ instanceof jwe)return Object.assign({},x,{[_.alias]:{cert:_.chain.map(gF).join(`
163
+ `),key:yF(_.protectedPrivateKey,h)}})},{})},Gwe=function(o,f,h){if(M_.probe(o))return Vwe(o,f,h);else return Hwe(o,f,h)};vF.exports={toPem:Gwe,parseJks:bF,decrypt:yF,parsePkcs12:$we}});var gm=i(function(wF){Object.defineProperty(wF,"__esModule",{value:!0});wF.registerDestinationCache=wF.RegisterDestinationCache=void 0;var _F=c("fs/promises"),Kwe=c("crypto"),Wwe=se(),Jwe=nh(),zF=ic(),Zwe=Wwe.createLogger("register-destination-cache");class CF extends Jwe.AsyncCache{constructor(o=300000){super(o)}}var Ywe=(o=new CF)=>{let f={useMtlsCache:!1,retrieveMtlsOptionsFromCache:async()=>o.get("mtlsOptions"),cacheMtlsOptions:async()=>{let h=_F.readFile(process.env.CF_INSTANCE_CERT,"utf8"),y=_F.readFile(process.env.CF_INSTANCE_KEY,"utf8"),[x,_]=await Promise.all([h,y]);o.set("mtlsOptions",{entry:{cert:x,key:_},expires:Xwe(x)})},getMtlsOptions:async()=>{let h=await f.retrieveMtlsOptionsFromCache();if(!h){if(await f.cacheMtlsOptions(),h=await f.retrieveMtlsOptionsFromCache(),!h)Zwe.warn("Neither the previous nor the current mtls certificate is valid anymore.")}return h||{}},clear:async()=>o.clear(),getCacheInstance:()=>o};return f};function Xwe(o){return Number(new Kwe.X509Certificate(o).validTo)}var Qwe=()=>({destination:zF.DestinationCache(new zF.DefaultDestinationCache(0)),mtls:Ywe()});wF.RegisterDestinationCache=Qwe;wF.registerDestinationCache=wF.RegisterDestinationCache()});var DF=i(function(Ir){var eSe=Ir&&Ir.__createBinding||(Object.create?function(o,f,h,y){if(y===void 0)y=h;var x=Object.getOwnPropertyDescriptor(f,h);if(!x||("get"in x?!f.__esModule:x.writable||x.configurable))x={enumerable:!0,get:function(){return f[h]}};Object.defineProperty(o,y,x)}:function(o,f,h,y){if(y===void 0)y=h;o[y]=f[h]}),tSe=Ir&&Ir.__setModuleDefault||(Object.create?function(o,f){Object.defineProperty(o,"default",{enumerable:!0,value:f})}:function(o,f){o.default=f}),rSe=Ir&&Ir.__importStar||function(){var o=function(f){return o=Object.getOwnPropertyNames||function(h){var y=[];for(var x in h)if(Object.prototype.hasOwnProperty.call(h,x))y[y.length]=x;return y},o(f)};return function(f){if(f&&f.__esModule)return f;var h={};if(f!=null){for(var y=o(f),x=0;x<y.length;x++)if(y[x]!=="default")eSe(h,f,y[x])}return tSe(h,f),h}}(),IF=Ir&&Ir.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Ir,"__esModule",{value:!0});Ir.defaultAgentOptions=Ir.agentCache=void 0;Ir.getAgentConfig=PF;Ir.urlAndAgent=ySe;var EF=c("node:fs/promises"),oSe=IF(c("node:http")),nSe=IF(c("node:https")),iSe=rSe(xF()),RF=se(),F_=rh(),fd=xu(),AF=Ps(),U_=Ns(),kF=gm(),_n=RF.createLogger({package:"connectivity",messageContext:"http-agent"});async function PF(o){let f={...sSe(o),...aSe(o),...await cSe(o)};return gSe(o,f)}function sSe(o){if(F_.getProtocolOrDefault(o)==="http"){if(o.isTrustingAllCertificates)_n.warn('"isTrustingAllCertificates" is not available for HTTP.');if(o.trustStoreCertificate)_n.warn('"trustStore" is not available for HTTP.');return{}}if(o.isTrustingAllCertificates&&o.trustStoreCertificate)_n.warn(`Destination ${o.name} contains the 'trustAll' and 'trustStoreLocation' property which is a redundant setup.`);if(o.isTrustingAllCertificates)return _n.warn('"isTrustingAllCertificates" property in the provided destination is set to "true". This is highly discouraged in production.'),{rejectUnauthorized:!o.isTrustingAllCertificates};if(o.trustStoreCertificate)return{rejectUnauthorized:!0,ca:[Buffer.from(o.trustStoreCertificate.content,"base64").toString("utf8")]};return{rejectUnauthorized:!0}}function aSe(o){if(o.authentication==="ClientCertificateAuthentication"&&!(q_(o)||o.mtlsKeyPair)&&o.keyStoreName){let f=uSe(o);if(dSe(f),_n.debug(`Certificate with name "${f.name}" selected.`),!o.keyStorePassword)_n.debug(`Destination '${o.name}' does not have a keystore password.`);let h=Buffer.from(f.content,"base64");if(ym(f)==="jks"||ym(f)==="keystore"){let y=iSe.toPem(h,o.keyStorePassword||""),x=Object.keys(y);if(x.length===0)throw Error("No entries found in JKS keystore");let _=x[0];if(x.length>1)_n.debug(`JKS keystore contains ${x.length} aliases. Using the first one. If this is not the correct certificate, please use a JKS file with only one entry.`);let z=y[_];if(!z.cert||!z.key)throw Error("Invalid JKS entry: missing cert or key");return{cert:Buffer.from(z.cert,"utf8"),key:Buffer.from(z.key,"utf8")}}if(ym(f)==="pem")return{cert:h,key:h,passphrase:o.keyStorePassword};return{pfx:h,passphrase:o.keyStorePassword}}return{}}async function cSe(o){if(o.mtls&&!(process.env.CF_INSTANCE_CERT&&process.env.CF_INSTANCE_KEY))_n.warn(`Destination ${o.name?o.name:""} has mTLS enabled, but the required Cloud Foundry environment variables (CF_INSTANCE_CERT and CF_INSTANCE_KEY) are not defined. Note that 'inferMtls' only works on Cloud Foundry.`);if(o.mtlsKeyPair){if(q_(o))_n.warn(`Destination ${o.name?o.name:""} has both 'mtlsKeyPair' (used by IAS) and 'mtls' (to use certs from cf) enabled. The 'mtlsKeyPair' will be used.`);return o.mtlsKeyPair}if(q_(o)){if(kF.registerDestinationCache.mtls.useMtlsCache)return kF.registerDestinationCache.mtls.getMtlsOptions();let f=EF.readFile(process.env.CF_INSTANCE_CERT,"utf8"),h=EF.readFile(process.env.CF_INSTANCE_KEY,"utf8"),[y,x]=await Promise.all([f,h]);return{cert:y,key:x}}return{}}function q_(o){return o.mtls&&process.env.CF_INSTANCE_CERT&&process.env.CF_INSTANCE_KEY}var BF=["p12","pfx","pem","jks","keystore"];function lSe(o){return!!o&&BF.includes(o)}function uSe(o){let f=o.certificates?.find((h)=>h.name===o.keyStoreName);if(!f)throw Error(`No certificate with name ${o.keyStoreName} could be found on the destination!`);return f}function ym(o){return RF.last(o.name.split("."))}function dSe(o){let f=ym(o);if(!lSe(f))throw Error(`The format of the provided certificate '${o.name}' is not supported. Supported formats are: ${BF.join(", ")}.`)}Ir.agentCache=new AF.Cache(3600000,100);Ir.defaultAgentOptions={keepAlive:!0,timeout:5000};function pSe(o,f){let y={protocol:F_.getProtocolOrDefault(o),options:f,agentOptions:o.agentOptions};if(o.proxyType!=="OnPremise")return y;let x=fSe(o),_=hSe(o);if(x.status!=="derived"||_.status==="invalid"||o.authentication==="PrincipalPropagation"&&(_.status!=="derived"||!_.scope.userId))return;if(y.cloudConnectorLocationId=o.cloudConnectorLocationId,y.proxyHost=o.proxyConfiguration?.host,y.proxyPort=o.proxyConfiguration?.port,y.target=o.url,y.proxyAuth=x.scope,_.status==="derived")y.principal=_.scope;return y}function fSe(o){let f=o.proxyConfiguration?.headers?.["Proxy-Authorization"];if(!f)return{status:"absent"};let h=f.match(/^Bearer (.+)$/i);if(!h)return{status:"invalid"};try{let y=fd.decodeJwt(h[1]),x=fd.getTenantId(y),_=y.clientid;if(!x&&!_)return{status:"invalid"};return{status:"derived",scope:{tenantId:x,clientId:_}}}catch{return{status:"invalid"}}}function hSe(o){let f=o.proxyConfiguration?.headers?.["SAP-Connectivity-Authentication"];if(!f)return{status:"absent"};let h=f.replace(/^Bearer /i,"");try{let y=fd.decodeJwt(h),x=fd.getTenantId(y),_=fd.userId(y);if(!x&&!_)return{status:"invalid"};return{status:"derived",scope:{userId:_,tenantId:x}}}catch{return{status:"invalid"}}}async function mSe(o,f){let h=pSe(o,f);if(!h)return;return AF.hashCacheKey(h)}function OF(o,f,h){let y=F_.getProtocolOrDefault(o);_n.debug(`Creating new ${y.toUpperCase()} agent for destination ${o.name||"<unknown>"}`);let x={...Ir.defaultAgentOptions,...!h?{keepAlive:!1}:{},...o.agentOptions,...f};return y==="https"?{httpsAgent:new nSe.default.Agent(x)}:{httpAgent:new oSe.default.Agent(x)}}async function gSe(o,f){let h=await mSe(o,f);if(!h)return _n.info(`Could not derive a cache key for destination ${o.name||"<unknown>"}. Creating a new agent without caching.`),OF(o,f,!1);return Ir.agentCache.getOrInsertComputed(h,()=>({entry:OF(o,f,!0)}))}async function ySe(o){let f={url:o,proxyType:"Internet"};if(U_.proxyStrategy(f)==="internet")f=U_.addProxyConfigurationInternet(f);return{baseURL:f.url,...await PF(f),proxy:U_.getProxyConfig(f)}}});var bm=i(function(Xi){var bSe=Xi&&Xi.__createBinding||(Object.create?function(o,f,h,y){if(y===void 0)y=h;var x=Object.getOwnPropertyDescriptor(f,h);if(!x||("get"in x?!f.__esModule:x.writable||x.configurable))x={enumerable:!0,get:function(){return f[h]}};Object.defineProperty(o,y,x)}:function(o,f,h,y){if(y===void 0)y=h;o[y]=f[h]}),LF=Xi&&Xi.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))bSe(f,o,h)};Object.defineProperty(Xi,"__esModule",{value:!0});LF(oM(),Xi);LF(DF(),Xi)});var $_=i(function(jF){Object.defineProperty(jF,"__esModule",{value:!0});jF.destinationServiceCache=void 0;var vSe=Ps(),NF=ic(),xSe=(o)=>({retrieveDestinationsFromCache:(f,h)=>o.get(NF.getDestinationCacheKey(h,f,"tenant")),cacheRetrievedDestinations:(f,h,y)=>{let x=NF.getDestinationCacheKey(h,f,"tenant");o.set(x,{entry:y})},clear:()=>{o.clear()},getCacheInstance:()=>o});jF.destinationServiceCache=xSe(new vSe.Cache(300000))});var xm=i(function(Co){var _Se=Co&&Co.__createBinding||(Object.create?function(o,f,h,y){if(y===void 0)y=h;var x=Object.getOwnPropertyDescriptor(f,h);if(!x||("get"in x?!f.__esModule:x.writable||x.configurable))x={enumerable:!0,get:function(){return f[h]}};Object.defineProperty(o,y,x)}:function(o,f,h,y){if(y===void 0)y=h;o[y]=f[h]}),zSe=Co&&Co.__setModuleDefault||(Object.create?function(o,f){Object.defineProperty(o,"default",{enumerable:!0,value:f})}:function(o,f){o.default=f}),CSe=Co&&Co.__importStar||function(){var o=function(f){return o=Object.getOwnPropertyNames||function(h){var y=[];for(var x in h)if(Object.prototype.hasOwnProperty.call(h,x))y[y.length]=x;return y},o(f)};return function(f){if(f&&f.__esModule)return f;var h={};if(f!=null){for(var y=o(f),x=0;x<y.length;x++)if(y[x]!=="default")_Se(h,f,y[x])}return zSe(h,f),h}}(),wSe=Co&&Co.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Co,"__esModule",{value:!0});Co.fetchDestinations=ISe;Co.fetchDestinationWithoutTokenRetrieval=RSe;Co.fetchCertificate=ASe;Co.fetchDestinationWithTokenRetrieval=PSe;var zn=se(),V_=CSe(Ss()),SSe=Va(),TSe=sf(),ESe=wSe(mb()),Qi=Jr(),kSe=bm(),OSe=Iu(),md=rc(),qF=$_(),vm=zn.createLogger({package:"connectivity",messageContext:"destination-service"});async function ISe(o,f,h,y){let x=`${zn.removeTrailingSlashes(o)}/destination-configuration/v1/${h}Destinations`;if(y?.useCache){let z=qF.destinationServiceCache.retrieveDestinationsFromCache(x,Qi.decodeJwt(f));if(z)return vm.debug(`Destinations retrieved from cache. There were ${z.length} destinations returned from the cache.`),z}let _=Qi.wrapJwtInHeader(f).headers;return G_({uri:x,tenantId:hd(f)},_).then((z)=>{let C=z.data.map((w)=>md.parseDestination(w));if(y?.useCache)qF.destinationServiceCache.cacheRetrievedDestinations(x,Qi.decodeJwt(f),C);return C}).catch((z)=>{throw new zn.ErrorWithCause(`Failed to fetch ${h} destinations.${H_(z)}`,z)})}async function RSe(o,f,h){let y=`${zn.removeTrailingSlashes(f)}/destination-configuration/v1/destinations/${o}?$skipTokenRetrieval=true`;try{let x=await G_({uri:y,tenantId:hd(h)},{Authorization:`Bearer ${h}`}),_=md.parseDestination(x.data.destinationConfiguration);return{instance:x.data.owner?.InstanceId?[_]:[],subaccount:!x.data.owner?.InstanceId&&x.data.owner?.SubaccountId?[_]:[]}}catch(x){if((0,V_.isAxiosError)(x)&&x.response?.status===404&&x.response?.data?.ErrorMessage==="Configuration with the specified name was not found")return{instance:[],subaccount:[]};throw new zn.ErrorWithCause(`Failed to fetch destination.${H_(x)}`,x)}}async function ASe(o,f,h){if(h.split(".")[1].toLowerCase()!=="pem"){vm.warn(`The provided truststore ${h} is not in 'pem' format which is currently the only supported format. Truststore is ignored.`);return}let x=`${zn.removeTrailingSlashes(o)}/destination-configuration/v1/subaccountCertificates/${h}`,_=`${zn.removeTrailingSlashes(o)}/destination-configuration/v1/instanceCertificates/${h}`,z=Qi.wrapJwtInHeader(f).headers;try{let C=await FF({uri:x,tenantId:hd(f)},z).catch(()=>FF({uri:_,tenantId:hd(f)},z));return md.parseCertificate(C.data)}catch(C){vm.warn(`Failed to fetch truststore certificate ${h} - Continuing without certificate. This may cause failing requests`,C)}}function hd(o){let f;if(typeof o==="string")f=Qi.getTenantId(o);else f=o.exchangeTenant||Qi.getTenantId(o.exchangeHeaderJwt)||Qi.getTenantId(o.authHeaderJwt);if(!f)throw Error("Could not obtain tenant identifier from JWT.");return f}async function PSe(o,f,h){let y=`${zn.removeTrailingSlashes(o)}/destination-configuration/v1/destinations/${h.destinationName}`;f=typeof f==="string"?{authHeaderJwt:f}:f;let x=Qi.wrapJwtInHeader(f.authHeaderJwt).headers;return x=f.exchangeHeaderJwt?{...x,"X-user-token":f.exchangeHeaderJwt}:x,x=f.exchangeTenant?{...x,"X-tenant":f.exchangeTenant}:x,x=f.refreshToken?{...x,"X-refresh-token":f.refreshToken}:x,G_({uri:y,tenantId:hd(f)},x,h).then((_)=>md.parseDestination(_.data)).catch((_)=>{throw new zn.ErrorWithCause(`Failed to fetch destination ${h.destinationName}.${H_(_)}`,_)})}function H_(o){return zn.propertyExists(o,"response","data","ErrorMessage")?` ${o.response.data.ErrorMessage}`:""}function BSe(o){return(f)=>(h)=>{let y=1;return(0,ESe.default)(async(x)=>{try{let _=await f.fn(h);if(y<3)y++,await OSe.buildAuthorizationHeaders(md.parseDestination(_.data));return _}catch(_){let z=(0,V_.isAxiosError)(_)?_.response?.status:void 0;if(z?.toString().startsWith("4")){x(new zn.ErrorWithCause(`Request failed with status code ${z}`,_));return}throw _}},{retries:3,onRetry:(x)=>vm.warn(`Failed to retrieve destination ${o} - doing a retry. Original Error ${x.message}`)})}}async function FF(o,f){if(!o.uri.includes("Certificates"))throw Error(`callCertificateEndpoint was called with illegal argument: ${o.uri}. URL must be certificate endpoint of destination service.`);return UF(o,f)}async function G_(o,f,h){if(!o.uri.match(/[instance|subaccount]Destinations|v1\/destinations/))throw Error(`callDestinationEndpoint was called with illegal argument: ${o.uri}. URL must be destination(s) endpoint of destination service.`);return UF(o,f,h)}async function UF(o,f,h){let{destinationName:y,retry:x}=h||{},_={...await kSe.urlAndAgent(o.uri),method:"get",headers:f},z=TSe.resilience();if(y&&x)z.unshift(BSe(y));return SSe.executeWithMiddleware(z,{context:o,fnArgument:_,fn:(C)=>V_.default.request(C)})}});var _m=i(function($F){Object.defineProperty($F,"__esModule",{value:!0});$F.getProviderServiceToken=NSe;var DSe=Jr(),LSe=Di();async function NSe(o){let{jwt:f,...h}=o,y=await LSe.serviceToken("destination",h);return{encoded:y,decoded:DSe.decodeJwt(y)}}});var zm=i(function(GF){Object.defineProperty(GF,"__esModule",{value:!0});GF.isSubscriberToken=USe;GF.getSubscriberToken=$Se;GF.getRequiredSubscriberToken=GSe;GF.hasTokens=WSe;GF.getJwtForTenant=JSe;GF.getJwtForUser=ZSe;var MSe=se(),VF=Jr(),qSe=Di(),FSe=vu(),HF=MSe.createLogger({package:"connectivity",messageContext:"destination-accessor-service"});function USe(o){return o.userJwt||o.serviceJwt}async function $Se(o){let f=o.jwt?VF.getJwtPair(o.jwt):void 0,h=await VSe(o,f?.decoded);return{userJwt:f,serviceJwt:h}}async function VSe(o,f){let h=HSe(o.iss,f);if(h)try{return VF.getJwtPair(await qSe.serviceToken("destination",{...o,jwt:h}))}catch(y){HF.warn(`Failed to fetch subscriber service token for destination. This is only relevant if you are using subscriber destinations. Failure caused by: ${y.message}`)}}function HSe(o,f){if(o)return HF.warn("Using `iss` option instead of a full JWT to fetch a destination. No validation is performed.Passing a user-supplied value without verifying it may lead to unintended cross-tenant destination access."),{ext_attr:{zdn:FSe.getIssuerSubdomain({iss:o})}};if(f?.zid||f?.app_tid)return f}function GSe(o){if(o){let{userJwt:f,serviceJwt:h}=o,y={userJwt:f||h,serviceJwt:h||f};if(KSe(y))return y}throw Error("Could not get subscriber token: Token value is undefined.")}function KSe(o){return!!(o?.userJwt&&o.serviceJwt)}function WSe(o){return!!o?.userJwt||!!o?.serviceJwt}function JSe(o){return o.serviceJwt}function ZSe(o){return o.userJwt}});var K_=i(function(ZF){Object.defineProperty(ZF,"__esModule",{value:!0});ZF.DestinationFromServiceRetriever=void 0;ZF.getDestinationFromDestinationService=uTe;var oTe=se(),nTe=dx(),ua=gn(),iTe=Ou(),Cm=Jr(),sTe=px(),KF=Di(),wm=ic(),Tm=vx(),Nc=xm(),aTe=Ls(),cTe=_m(),gd=zm(),JF=Ns(),lTe=nc(),es=oTe.createLogger({package:"connectivity",messageContext:"destination-accessor-service"}),WF={instance:[],subaccount:[]};async function uTe(o){return es.debug("Attempting to retrieve destination from destination service."),di.getDestinationFromDestinationService(o)}class di{static async getDestinationFromDestinationService(o){if(iTe.shouldExchangeToken(o))o.jwt=await KF.jwtBearerToken(o.jwt,"destination");let f=new di(o,await gd.getSubscriberToken(o),await cTe.getProviderServiceToken(o)),h=await f.searchDestinationWithSelectionStrategyAndCache();if(!h)return null;let{origin:y,fromCache:x}=h,{destination:_}=h;if(!x)_=await f.fetchAndAddAuthTokenIfNeeded(_,y),_=await f.addTrustStoreConfigurationIfNeeded(_,y),await f.cacheDestination(_,y);return _=lTe.addForwardedAuthTokenIfNeeded(_,o.jwt),_=await f.addProxyConfiguration(_),_}static throwUserTokenMissing(o){throw Error(`No user token (JWT) has been provided. This is strictly necessary for '${o.authentication}'.`)}static checkDestinationForCustomJwt(o){if(!o.jwks&&!o.jwksUri)throw Error("Failed to verify the JWT with no JKU! Destination must have `x_user_token.jwks` or `x_user_token.jwks_uri` property.")}static isUserJwt(o){return!!o?.userJwt}constructor(o,f,h){this.subscriberToken=f,this.providerServiceToken=h;let y={isolationStrategy:wm.getDefaultIsolationStrategy(f?.userJwt?.decoded),selectionStrategy:Tm.subscriberFirst,useCache:!0};this.options={...y,...o}}async searchDestinationWithSelectionStrategyAndCache(){let o;if(this.isSubscriberNeeded())o=await this.searchSubscriberAccountForDestination();if(this.isProviderNeeded(o))o=await this.searchProviderAccountForDestination();if(o)if(o.fromCache)es.debug(`Successfully retrieved destination from destination service cache for ${o.origin} destinations.`);else es.debug("Successfully retrieved destination from destination service.");else es.debug("Could not retrieve destination from destination service.");return o}getExchangeTenant(o){if(o.authentication!=="OAuth2ClientCredentials")return;if(o.originalProperties?.tokenServiceURLType!=="Common")return;let f=Cm.getSubdomain(this.subscriberToken?.serviceJwt?.decoded)||Cm.getSubdomain(this.subscriberToken?.userJwt?.decoded),h=Cm.getSubdomain(this.providerServiceToken?.decoded);return f||h||void 0}async getAuthTokenForOAuth2ClientCredentials(o,f){let h=this.getExchangeTenant(o),y=f==="provider"?this.providerServiceToken.encoded:this.subscriberToken?.serviceJwt?.encoded;if(!y)throw Error("Could not retrieve service token for the destination service.");return{authHeaderJwt:y,exchangeTenant:h}}usesSystemUser(o){if(o.systemUser&&o.authentication==="OAuth2SAMLBearerAssertion")return es.debug(`System user found on destination: "${o.name}".
164
+ The property SystemUser has been deprecated.
165
+ It is highly recommended that you stop using it.
166
+ Possible alternatives for such technical user authentication are BasicAuthentication, OAuth2ClientCredentials, or ClientCertificateAuthentication`),!0;return!1}async getAuthTokenForOAuth2UserBasedTokenExchanges(o,f){let{destinationName:h}=this.options;if(!di.isUserJwt(this.subscriberToken))throw di.throwUserTokenMissing(o);let y=Cm.isXsuaaToken(this.subscriberToken.userJwt.decoded);if(!y)di.checkDestinationForCustomJwt(o);if(y&&sTe.isIdenticalTenant(this.subscriberToken.userJwt.decoded,this.providerServiceToken.decoded))return es.debug(`UserExchange flow started without user exchange token for destination ${h} of the provider account.`),{authHeaderJwt:await KF.jwtBearerToken(this.subscriberToken.userJwt.encoded,dTe())};let x=f==="provider"?this.providerServiceToken:this.subscriberToken.serviceJwt;return es.debug(`UserExchange flow started for destination ${h} of the ${f} account.`),{authHeaderJwt:x.encoded,exchangeHeaderJwt:this.subscriberToken.userJwt.encoded}}async getAuthTokenForOAuth2RefreshToken(o,f){let{refreshToken:h}=this.options;if(!h)throw Error(`No refresh token has been provided. This is strictly necessary for '${o.authentication}'.`);return{authHeaderJwt:f==="provider"?this.providerServiceToken.encoded:this.subscriberToken.serviceJwt.encoded,refreshToken:h}}async fetchDestinationWithNonUserExchangeFlows(o,f){let h=await this.getAuthTokenForOAuth2ClientCredentials(o,f);return Nc.fetchDestinationWithTokenRetrieval(ua.getDestinationServiceCredentials().uri,h,this.options)}async fetchDestinationWithUserExchangeFlows(o,f){let h=await this.getAuthTokenForOAuth2UserBasedTokenExchanges(o,f);return Nc.fetchDestinationWithTokenRetrieval(ua.getDestinationServiceCredentials().uri,h,this.options)}async fetchDestinationWithRefreshTokenFlow(o,f){let h=await this.getAuthTokenForOAuth2RefreshToken(o,f);return Nc.fetchDestinationWithTokenRetrieval(ua.getDestinationServiceCredentials().uri,h,this.options)}async fetchAndAddAuthTokenIfNeeded(o,f){let{forwardAuthToken:h,authentication:y}=o;if(h)return o;if(y==="OAuth2UserTokenExchange"||y==="OAuth2JWTBearer"||y==="SAMLAssertion"||y==="OAuth2SAMLBearerAssertion"&&!this.usesSystemUser(o))return this.fetchDestinationWithUserExchangeFlows(o,f);if(y==="OAuth2Password"||y==="ClientCertificateAuthentication"||y==="OAuth2ClientCredentials"||this.usesSystemUser(o))return this.fetchDestinationWithNonUserExchangeFlows(o,f);if(y==="OAuth2RefreshToken")return this.fetchDestinationWithRefreshTokenFlow(o,f);if(y==="PrincipalPropagation"){if(!di.isUserJwt(this.subscriberToken))di.throwUserTokenMissing(o)}return o}async addProxyConfiguration(o){switch(JF.proxyStrategy(o)){case"on-premise":return nTe.addProxyConfigurationOnPrem(o,gd.hasTokens(this.subscriberToken)?gd.getRequiredSubscriberToken(this.subscriberToken):void 0);case"internet":case"private-link":return aTe.assertHttpDestination(o),JF.addProxyConfigurationInternet(o);case"no-proxy":return o;default:throw Error("Illegal argument: No valid proxy configuration found in the destination input to be added.")}}async cacheDestination(o,f){if(!this.options.useCache)return;if(o.authentication==="SAMLAssertion"){es.debug("Destination with authentication type SAMLAssertion will not be cached.");return}await wm.destinationCache.cacheRetrievedDestination(f==="subscriber"?gd.getRequiredSubscriberToken(this.subscriberToken):this.providerServiceToken.decoded,o,this.options.isolationStrategy)}async getProviderDestinationService(){let o=await Nc.fetchDestinationWithoutTokenRetrieval(this.options.destinationName,ua.getDestinationServiceCredentials().uri,this.providerServiceToken.encoded),f=this.options.selectionStrategy({subscriber:WF,provider:o},this.options.destinationName);if(f)return{destination:f,fromCache:!1,origin:"provider"}}async getProviderDestinationCache(){let o=await wm.destinationCache.retrieveDestinationFromCache(this.providerServiceToken.decoded,this.options.destinationName,this.options.isolationStrategy);if(o)return{destination:o,fromCache:!0,origin:"provider"}}async getSubscriberDestinationService(){if(!this.subscriberToken?.serviceJwt)throw Error("Try to get destinations from subscriber account but service JWT was not set.");let o=await Nc.fetchDestinationWithoutTokenRetrieval(this.options.destinationName,ua.getDestinationServiceCredentials().uri,this.subscriberToken.serviceJwt.encoded),f=this.options.selectionStrategy({subscriber:o,provider:WF},this.options.destinationName);if(f)return{destination:f,fromCache:!1,origin:"subscriber"}}async getSubscriberDestinationCache(){let o=await wm.destinationCache.retrieveDestinationFromCache(gd.getRequiredSubscriberToken(this.subscriberToken),this.options.destinationName,this.options.isolationStrategy);if(o)return{destination:o,fromCache:!0,origin:"subscriber"}}isProviderNeeded(o){if(this.options.selectionStrategy.toString()===Tm.alwaysSubscriber.toString())return!1;if(this.options.selectionStrategy.toString()===Tm.subscriberFirst.toString()&&o)return!1;return!0}isSubscriberNeeded(){if(!this.subscriberToken?.serviceJwt)return!1;return this.options.selectionStrategy.toString()!==Tm.alwaysProvider.toString()}async searchProviderAccountForDestination(){return this.options.useCache&&await this.getProviderDestinationCache()||this.getProviderDestinationService()}async searchSubscriberAccountForDestination(){return this.options.useCache&&await this.getSubscriberDestinationCache()||this.getSubscriberDestinationService()}async addTrustStoreConfigurationIfNeeded(o,f){let{originalProperties:h}=o,y=h?.TrustStoreLocation||h?.destinationConfiguration?.TrustStoreLocation;if(y){let x=await Nc.fetchCertificate(ua.getDestinationServiceCredentials().uri,f==="provider"?this.providerServiceToken.encoded:this.subscriberToken.serviceJwt.encoded,y);return{...o,trustStoreCertificate:x}}return o}}ZF.DestinationFromServiceRetriever=di;function dTe(){let o=ua.getServiceBinding("destination");if(!o)throw Error("No binding to a destination service found.");return o}});var J_=i(function(tU){Object.defineProperty(tU,"__esModule",{value:!0});tU.registerDestination=yTe;tU.searchRegisteredDestination=bTe;var fTe=se(),km=Jr(),hTe=ic(),mTe=Ls(),XF=Ns(),Em=gm(),gTe=nc(),W_=fTe.createLogger({package:"connectivity",messageContext:"register-destination"});async function yTe(o,f){if(!o.name)throw Error("Registering destinations requires a destination name.");if(o.mtls=!!f?.inferMtls,f?.useMtlsCache)Em.registerDestinationCache.mtls.useMtlsCache=!0,await Em.registerDestinationCache.mtls.cacheMtlsOptions();await Em.registerDestinationCache.destination.cacheRetrievedDestination(QF(f),o,eU(f))}function QF(o){let f=km.decodeOrMakeJwt(o?.jwt);if(!km.getTenantId(f)){if(o?.jwt)throw Error("Could not determine tenant from JWT nor XSUAA, identity or destination service binding. Destination is registered without tenant information.");else W_.debug("Could not determine tenant from XSUAA, identity or destination service binding. Destination is registered without tenant information.");return{zid:km.defaultTenantId}}return f}async function bTe(o){let f=await Em.registerDestinationCache.destination.retrieveDestinationFromCache(QF(o),o.destinationName,eU(o));if(!f)return W_.debug(`Could not retrieve '${o.destinationName}' from registered destinations.`),null;if(W_.info(`Successfully retrieved destination '${o.destinationName}' from registered destinations.`),f=gTe.addForwardedAuthTokenIfNeeded(f,o.jwt),mTe.isHttpDestination(f)&&["internet","private-link"].includes(XF.proxyStrategy(f)))f=XF.addProxyConfigurationInternet(f);return f}function eU(o){if(o?.isolationStrategy)return o.isolationStrategy;let f=o?.jwt?km.decodeJwt(o.jwt):void 0;return hTe.getDefaultIsolationStrategy(f)}});var lU=i(function(cU){Object.defineProperty(cU,"__esModule",{value:!0});cU.useOrFetchDestination=sU;cU.resolveDestination=ATe;cU.getDestination=aU;cU.getAllDestinationsFromDestinationService=PTe;var nU=se(),_Te=Ou(),zTe=gn(),CTe=Jr(),wTe=Di(),iU=rc(),STe=sx(),TTe=lx(),ETe=K_(),kTe=Qf(),OTe=J_(),ITe=zm(),RTe=_m(),rU=xm(),yd=nU.createLogger({package:"connectivity",messageContext:"destination-accessor"});async function sU(o){return kTe.isDestinationFetchOptions(o)?aU(o):iU.sanitizeDestination(o)}async function ATe(o){let f=await sU(o).catch((h)=>{throw new nU.ErrorWithCause("Failed to load destination.",h)});if(!f)throw Error(`Failed to resolve the destination '${iU.toDestinationNameUrl(o)}'.`);return f}async function aU(o){return STe.searchEnvVariablesForDestination(o)||await OTe.searchRegisteredDestination(o)||await TTe.searchServiceBindingForDestination(o)||await ETe.getDestinationFromDestinationService(o)}function oU(o,f){return f.reduce((h,y)=>h+`Retrieving ${o} destination: ${y.name}.
167
+ `,"")}async function PTe(o={}){if(o={...o,useCache:o.useCache??!0},yd.debug("Attempting to retrieve all destinations from destination service."),_Te.shouldExchangeToken(o)&&o.jwt)o.jwt=await wTe.jwtBearerToken(o.jwt,"destination");let f=(await ITe.getSubscriberToken(o))?.serviceJwt||await RTe.getProviderServiceToken(o),h=zTe.getDestinationServiceCredentials().uri,y=CTe.getSubdomain(f.decoded);yd.debug(`Retrieving all destinations for account: "${y}" from destination service.`);let[x,_]=await Promise.all([rU.fetchDestinations(h,f.encoded,"instance",o),rU.fetchDestinations(h,f.encoded,"subaccount",o)]),z=oU("instance",x)+oU("subaccount",_);yd.debug(z);let C=[...x,..._];if(C?.length)yd.debug(`Successfully retrieved all destinations for account: "${y}" from destination service.`);else return yd.debug("Didn't receive any destinations from destination service."),[];return C.map((S)=>(delete S.authTokens,S))}});var dU=i(function(uU){Object.defineProperty(uU,"__esModule",{value:!0})});var pU=i(function($t){var jTe=$t&&$t.__createBinding||(Object.create?function(o,f,h,y){if(y===void 0)y=h;var x=Object.getOwnPropertyDescriptor(f,h);if(!x||("get"in x?!f.__esModule:x.writable||x.configurable))x={enumerable:!0,get:function(){return f[h]}};Object.defineProperty(o,y,x)}:function(o,f,h,y){if(y===void 0)y=h;o[y]=f[h]}),hr=$t&&$t.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))jTe(f,o,h)};Object.defineProperty($t,"__esModule",{value:!0});hr(lU(),$t);hr(Qf(),$t);hr(ic(),$t);hr(sx(),$t);hr(K_(),$t);hr(J_(),$t);hr(lx(),$t);hr(vx(),$t);hr($_(),$t);hr(Ls(),$t);hr(xm(),$t);hr(rc(),$t);hr(nc(),$t);hr(zm(),$t);hr(_m(),$t);hr(Ns(),$t);hr(dU(),$t);hr(Yf(),$t);hr(ax(),$t);hr(gm(),$t)});var hU=i(function(fU){Object.defineProperty(fU,"__esModule",{value:!0})});var gU=i(function(mU){Object.defineProperty(mU,"__esModule",{value:!0});mU.buildHeadersForDestination=qTe;var Z_=se(),MTe=Iu();async function qTe(o){let f=await MTe.buildAuthorizationHeaders(o),h=FTe(o);return Z_.mergeIgnoreCase(o.headers,{...f,...h})}function FTe(o){let f=Z_.pickNonNullish({"sap-client":o.sapClient,"SAP-Connectivity-SCC-Location_ID":o.cloudConnectorLocationId});return Z_.mergeLeftIgnoreCase(f,o.headers)}});var bU=i(function(yU){Object.defineProperty(yU,"__esModule",{value:!0})});var xU=i(function(vU){Object.defineProperty(vU,"__esModule",{value:!0})});var Y_=i(function(Kt){var $Te=Kt&&Kt.__createBinding||(Object.create?function(o,f,h,y){if(y===void 0)y=h;var x=Object.getOwnPropertyDescriptor(f,h);if(!x||("get"in x?!f.__esModule:x.writable||x.configurable))x={enumerable:!0,get:function(){return f[h]}};Object.defineProperty(o,y,x)}:function(o,f,h,y){if(y===void 0)y=h;o[y]=f[h]}),_r=Kt&&Kt.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))$Te(f,o,h)};Object.defineProperty(Kt,"__esModule",{value:!0});_r(pU(),Kt);_r(Iu(),Kt);_r(Ps(),Kt);_r(ex(),Kt);_r(dx(),Kt);_r(hU(),Kt);_r(gn(),Kt);_r(rh(),Kt);_r(gU(),Kt);_r(Ou(),Kt);_r(bU(),Kt);_r(Jr(),Kt);_r(eh(),Kt);_r(vu(),Kt);_r(px(),Kt);_r(Di(),Kt);_r(xU(),Kt);_r(tx(),Kt);_r(nh(),Kt)});var Om=i(function(wt){Object.defineProperty(wt,"__esModule",{value:!0});wt.getAgentConfig=wt.transformServiceBindingToClientCredentialsDestination=wt.getTenantId=wt.getAllDestinationsFromDestinationService=wt.transformServiceBindingToDestination=wt.getDestinationFromServiceBinding=wt.getServiceBinding=wt.setDestinationCache=wt.registerDestination=wt.getUserToken=wt.getClientCredentialsToken=wt.buildHeadersForDestination=wt.DestinationSelectionStrategies=wt.assertHttpDestination=wt.isHttpDestination=wt.createDestinationFromIasService=wt.getIasToken=wt.serviceToken=wt.jwtBearerToken=wt.retrieveJwt=wt.decodeJwt=wt.parseProxyEnv=wt.subscriberFirst=wt.alwaysSubscriber=wt.alwaysProvider=wt.getDestinationFromDestinationService=wt.useOrFetchDestination=wt.getDestination=wt.sanitizeDestination=wt.toDestinationNameUrl=void 0;var At=Y_();Object.defineProperty(wt,"toDestinationNameUrl",{enumerable:!0,get:function(){return At.toDestinationNameUrl}});Object.defineProperty(wt,"sanitizeDestination",{enumerable:!0,get:function(){return At.sanitizeDestination}});Object.defineProperty(wt,"getDestination",{enumerable:!0,get:function(){return At.getDestination}});Object.defineProperty(wt,"useOrFetchDestination",{enumerable:!0,get:function(){return At.useOrFetchDestination}});Object.defineProperty(wt,"getDestinationFromDestinationService",{enumerable:!0,get:function(){return At.getDestinationFromDestinationService}});Object.defineProperty(wt,"alwaysProvider",{enumerable:!0,get:function(){return At.alwaysProvider}});Object.defineProperty(wt,"alwaysSubscriber",{enumerable:!0,get:function(){return At.alwaysSubscriber}});Object.defineProperty(wt,"subscriberFirst",{enumerable:!0,get:function(){return At.subscriberFirst}});Object.defineProperty(wt,"parseProxyEnv",{enumerable:!0,get:function(){return At.parseProxyEnv}});Object.defineProperty(wt,"decodeJwt",{enumerable:!0,get:function(){return At.decodeJwt}});Object.defineProperty(wt,"retrieveJwt",{enumerable:!0,get:function(){return At.retrieveJwt}});Object.defineProperty(wt,"jwtBearerToken",{enumerable:!0,get:function(){return At.jwtBearerToken}});Object.defineProperty(wt,"serviceToken",{enumerable:!0,get:function(){return At.serviceToken}});Object.defineProperty(wt,"getIasToken",{enumerable:!0,get:function(){return At.getIasToken}});Object.defineProperty(wt,"createDestinationFromIasService",{enumerable:!0,get:function(){return At.createDestinationFromIasService}});Object.defineProperty(wt,"isHttpDestination",{enumerable:!0,get:function(){return At.isHttpDestination}});Object.defineProperty(wt,"assertHttpDestination",{enumerable:!0,get:function(){return At.assertHttpDestination}});Object.defineProperty(wt,"DestinationSelectionStrategies",{enumerable:!0,get:function(){return At.DestinationSelectionStrategies}});Object.defineProperty(wt,"buildHeadersForDestination",{enumerable:!0,get:function(){return At.buildHeadersForDestination}});Object.defineProperty(wt,"getClientCredentialsToken",{enumerable:!0,get:function(){return At.getClientCredentialsToken}});Object.defineProperty(wt,"getUserToken",{enumerable:!0,get:function(){return At.getUserToken}});Object.defineProperty(wt,"registerDestination",{enumerable:!0,get:function(){return At.registerDestination}});Object.defineProperty(wt,"setDestinationCache",{enumerable:!0,get:function(){return At.setDestinationCache}});Object.defineProperty(wt,"getServiceBinding",{enumerable:!0,get:function(){return At.getServiceBinding}});Object.defineProperty(wt,"getDestinationFromServiceBinding",{enumerable:!0,get:function(){return At.getDestinationFromServiceBinding}});Object.defineProperty(wt,"transformServiceBindingToDestination",{enumerable:!0,get:function(){return At.transformServiceBindingToDestination}});Object.defineProperty(wt,"getAllDestinationsFromDestinationService",{enumerable:!0,get:function(){return At.getAllDestinationsFromDestinationService}});Object.defineProperty(wt,"getTenantId",{enumerable:!0,get:function(){return At.getTenantId}});Object.defineProperty(wt,"transformServiceBindingToClientCredentialsDestination",{enumerable:!0,get:function(){return At.transformServiceBindingToClientCredentialsDestination}});var VTe=bm();Object.defineProperty(wt,"getAgentConfig",{enumerable:!0,get:function(){return VTe.getAgentConfig}})});var Im=i(function(ts){var GTe=ts&&ts.__createBinding||(Object.create?function(o,f,h,y){if(y===void 0)y=h;var x=Object.getOwnPropertyDescriptor(f,h);if(!x||("get"in x?!f.__esModule:x.writable||x.configurable))x={enumerable:!0,get:function(){return f[h]}};Object.defineProperty(o,y,x)}:function(o,f,h,y){if(y===void 0)y=h;o[y]=f[h]}),_U=ts&&ts.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))GTe(f,o,h)};Object.defineProperty(ts,"__esModule",{value:!0});_U(bm(),ts);_U(Y_(),ts)});var Q_=i(function(zU){Object.defineProperty(zU,"__esModule",{value:!0});zU.isOriginOptions=X_;zU.isHttpRequestConfigWithOrigin=KTe;function X_(o){return!!o&&(typeof o.requestConfig==="object"||typeof o.custom==="object")}function KTe(o){return X_(o.headers)||X_(o.params)}});var Rm=i(function(CU){Object.defineProperty(CU,"__esModule",{value:!0});CU.origins=CU.defaultDisallowedKeys=void 0;CU.filterCustomRequestConfig=YTe;CU.mergeOptionsWithPriority=XTe;var ez=se(),ZTe=ez.createLogger({package:"http-client",messageContext:"http-request-config"});function YTe(o,f=CU.defaultDisallowedKeys){let h=Object.keys(o).filter((y)=>f.includes(y));if(h.length)ZTe.warn(`The following keys are found in the custom request config that will be removed: ${h.join(", ")}`);return ez.exclude(f,o)}CU.defaultDisallowedKeys=["url","baseURL","data","headers","params"];function XTe(o){if(o)return CU.origins.reduce((f,h)=>ez.mergeIgnoreCase(f,o[h]),{})}CU.origins=["requestConfig","destination","destinationProperty","custom"]});var az=i(function(jt){var tEe=jt&&jt.__createBinding||(Object.create?function(o,f,h,y){if(y===void 0)y=h;var x=Object.getOwnPropertyDescriptor(f,h);if(!x||("get"in x?!f.__esModule:x.writable||x.configurable))x={enumerable:!0,get:function(){return f[h]}};Object.defineProperty(o,y,x)}:function(o,f,h,y){if(y===void 0)y=h;o[y]=f[h]}),rEe=jt&&jt.__setModuleDefault||(Object.create?function(o,f){Object.defineProperty(o,"default",{enumerable:!0,value:f})}:function(o,f){o.default=f}),SU=jt&&jt.__importStar||function(){var o=function(f){return o=Object.getOwnPropertyNames||function(h){var y=[];for(var x in h)if(Object.prototype.hasOwnProperty.call(h,x))y[y.length]=x;return y},o(f)};return function(f){if(f&&f.__esModule)return f;var h={};if(f!=null){for(var y=o(f),x=0;x<y.length;x++)if(y[x]!=="default")tEe(h,f,y[x])}return rEe(h,f),h}}(),oEe=jt&&jt.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(jt,"__esModule",{value:!0});jt.encodeAllParameters=jt.oDataTypedClientParameterEncoder=void 0;jt.buildHttpRequest=EU;jt.execute=nz;jt.buildHttpRequestConfigWithOrigin=kU;jt.buildRequestWithMergedHeadersAndQueryParameters=OU;jt.executeHttpRequest=vEe;jt.executeHttpRequestWithOrigin=xEe;jt.getAxiosConfigWithDefaults=RU;jt.getAxiosConfigWithDefaultsWithoutMethod=AU;jt.getDefaultHttpRequestConfigOptions=iz;jt.getDefaultHttpRequestOptions=sz;var nEe=SU(c("http")),iEe=SU(c("https")),oz=Om(),da=Im(),sEe=Va(),Pm=se(),aEe=oEe(Ss()),cEe=Q_(),TU=Rm(),lEe=of(),Am=Pm.createLogger({package:"http-client",messageContext:"http-client"});async function EU(o){let f=await da.resolveDestination(o);da.assertHttpDestination(f);let h=await wEe(f);return _Ee(f,h)}function nz(o){return async function(f,h,y){let x=await da.resolveDestination(f);da.assertHttpDestination(x);let _=await EU(x);yEe(h.headers);let z=await OU(h,x,_,f.jwt);if(y?.fetchCsrfToken)h.middleware=[...h.middleware||[],lEe.csrf()];return sEe.executeWithMiddleware(h.middleware,{fnArgument:z,fn:(C)=>(bEe(z),o(C)),context:{jwt:f.jwt,uri:x.url,destinationName:x.name??void 0,tenantId:oz.getTenantId(f.jwt)}})}}function kU(o){if(!o)return iz();if(cEe.isHttpRequestConfigWithOrigin(o))return o;return{...o,headers:{requestConfig:{},...o.headers&&{custom:o.headers}},params:{requestConfig:{},...o.params&&{custom:o.params}}}}var uEe=(o)=>o;jt.oDataTypedClientParameterEncoder=uEe;function rz(o){let{parameterEncoder:f,parameters:h,exclude:y}=o;return Object.fromEntries(Object.entries(h).map(([x,_])=>y.includes(x)?[x,_]:[x,_?f(_):_]))}function dEe(o){return o.name===jt.oDataTypedClientParameterEncoder.name}function pEe(o,f){let{parameterEncoder:h}=f;if(Pm.isNullish(h))return rz({parameters:o,parameterEncoder:jt.encodeAllParameters,exclude:["custom"]});if(dEe(h))return rz({parameters:o,parameterEncoder:jt.encodeAllParameters,exclude:["custom","requestConfig"]});return rz({parameters:o,parameterEncoder:h,exclude:[]})}async function OU(o,f,h,y){let{paramsOriginOptions:x,headersOriginOptions:_,requestConfigBase:z}=gEe(o),C=mEe(f,x),w=pEe(C,o),S=TU.mergeOptionsWithPriority(w),E=await fEe(f,h.headers,_,y),k=SEe(h,z);return k.headers=E||{},k.params=S||{},k}async function fEe(o,f,h,y){let x=da.getAdditionalHeaders(o.originalProperties||{}).headers;return f=o.forwardAuthToken?hEe(f,y):f,TU.mergeOptionsWithPriority({requestConfig:h?.requestConfig,custom:{...h?.custom},destinationProperty:x,destination:f})}function hEe(o,f){if(f)return{...o,authorization:`Bearer ${f}`};return Am.debug("The `forwardAuthToken` is set, but the JWT is missing. Please provide a valid JWT to enable token forwarding."),o}function mEe(o,f){let h=da.getAdditionalQueryParameters(o.originalProperties||{}).queryParameters;return{...f,destinationProperty:h,destination:o.queryParameters}}function gEe(o){let{params:f,headers:h}=o;return{paramsOriginOptions:f,headersOriginOptions:h,requestConfigBase:o}}function yEe(o){if(!o)return;let{custom:f,requestConfig:h}=o;if(f&&h){let y=Object.keys(f).filter((x)=>Object.keys(h).includes(x));if(y.length)Am.debug(`The following custom headers will overwrite headers created by the SDK, if they use the same key:
168
+ ${y.map((x)=>` - "${x}"`).join(`
169
+ `)}
170
+ If the parameters from multiple origins use the same key, the priority is 1. Custom, 2. Destination, 3. Internal.`)}}function bEe(o){let f=`Execute '${o.method}' request with target: ${o.url}.`;if(o.headers){let h=Object.entries(Pm.sanitizeRecord(o.headers)).map(([y,x])=>`${y}:${x}`).join(`
171
+ `);Am.debug(`${f}
172
+ The headers of the request are:
173
+ ${h}`)}else Am.debug(f)}function vEe(o,f,h){let y=kU(f);return nz(IU)(o,y,{...sz(),...h})}function xEe(o,f,h){let y=f??iz();return nz(IU)(o,y,{...sz(),...h})}async function _Ee(o,f){let h=zEe(o);return{baseURL:o.url,headers:f,params:o.queryParameters,proxy:da.getProxyConfig(o),...h&&{beforeRedirect:h},...await oz.getAgentConfig(o)}}function zEe(o){let f=o.proxyConfiguration?.headers;if(!Object.keys(f||{}).length)return;return(h)=>{if(!CEe(h.href,o.url))return;Object.assign(h.headers??(h.headers={}),f)}}function CEe(o,f){if(!o||!f)return!1;try{return new URL(o).origin===new URL(f).origin}catch{return!1}}async function wEe(o){try{return await oz.buildHeadersForDestination(o)}catch(f){throw new Pm.ErrorWithCause("Failed to build headers.",f)}}function SEe(o,f){return{...o,...f,headers:{...o.headers,...f.headers}}}function TEe(o){return{...RU(),...o}}function IU(o){return aEe.default.request(TEe(o))}function RU(){return{...AU(),method:"get"}}function AU(){return{httpAgent:nEe.globalAgent,httpsAgent:iEe.globalAgent,timeout:0,paramsSerializer:{serialize:(o={})=>Object.entries(o).map(([f,h])=>`${f}=${h}`).join("&")}}}function iz(){return{method:"get"}}function sz(){return{fetchCsrfToken:!0}}var EEe=function(o){return Object.fromEntries(Object.entries(o).map(([f,h])=>[encodeURIComponent(f),encodeURIComponent(h)]))};jt.encodeAllParameters=EEe});var cz=i(function(pi){Object.defineProperty(pi,"__esModule",{value:!0});pi.defaultDisallowedKeys=pi.executeHttpRequestWithOrigin=pi.executeHttpRequest=pi.encodeAllParameters=pi.buildHttpRequest=pi.compress=pi.csrf=void 0;var kEe=of();Object.defineProperty(pi,"csrf",{enumerable:!0,get:function(){return kEe.csrf}});var OEe=EA();Object.defineProperty(pi,"compress",{enumerable:!0,get:function(){return OEe.compress}});var Bm=az();Object.defineProperty(pi,"buildHttpRequest",{enumerable:!0,get:function(){return Bm.buildHttpRequest}});Object.defineProperty(pi,"encodeAllParameters",{enumerable:!0,get:function(){return Bm.encodeAllParameters}});Object.defineProperty(pi,"executeHttpRequest",{enumerable:!0,get:function(){return Bm.executeHttpRequest}});Object.defineProperty(pi,"executeHttpRequestWithOrigin",{enumerable:!0,get:function(){return Bm.executeHttpRequestWithOrigin}});var IEe=Rm();Object.defineProperty(pi,"defaultDisallowedKeys",{enumerable:!0,get:function(){return IEe.defaultDisallowedKeys}})});var DU=i(function(Gn){var $Ee=Gn&&Gn.__createBinding||(Object.create?function(o,f,h,y){if(y===void 0)y=h;var x=Object.getOwnPropertyDescriptor(f,h);if(!x||("get"in x?!f.__esModule:x.writable||x.configurable))x={enumerable:!0,get:function(){return f[h]}};Object.defineProperty(o,y,x)}:function(o,f,h,y){if(y===void 0)y=h;o[y]=f[h]}),Lm=Gn&&Gn.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))$Ee(f,o,h)};Object.defineProperty(Gn,"__esModule",{value:!0});Lm(of(),Gn);Lm(az(),Gn);Lm(Q_(),Gn);Lm(Rm(),Gn)});var UU=i(function(qU){Object.defineProperty(qU,"__esModule",{value:!0});qU.OpenApiRequestBuilder=void 0;var os=se(),VEe=Om(),NU=Im(),HEe=cz(),GEe=DU(),LU=os.createLogger({package:"openapi",messageContext:"openapi-request-builder"});class jU{constructor(o,f){this.body=o,this.encoding=f}build(){let o=new FormData;for(let[f,h]of Object.entries(this.body??{})){if(!this?.encoding[f])throw Error(`Missing encoding metadata for property '${f}'. This indicates a code generation issue. Please regenerate your API client.`);let y=this.encoding[f],x=new Set(y.parsedContentTypes.map((z)=>z.type.toLowerCase())),_=h instanceof Blob?this.encodeBlob({key:f,value:h},y):this.encodeString({key:f,value:h},y,x);o.append(f,_)}return o}checkIsFlexibleContentType(o,f){let{contentType:h,parsedContentTypes:y}=o;return Boolean(h)&&(h.includes("*")||y.length>1||f.has("any"))}encodeBlob({key:o,value:f},h){let{contentType:y,isImplicit:x,parsedContentTypes:_}=h,z=new Set(_.map((S)=>S.type.toLowerCase())),C=this.checkIsFlexibleContentType(h,z);if(!f.type&&!C&&!Object.keys(_[0].parameters).length)return LU.debug(`Adding missing content type '${y}' to Blob for key '${o}' as per encoding specification.`),new Blob([f],{type:y});let w=f.type.split(";")[0].trim();if(!x&&!C&&w.toLowerCase()!==y.toLowerCase())LU.warn(`Content type mismatch for key '${o}': value has type '${f.type}' but encoding specifies '${y}'.`);return f}encodeString({key:o,value:f},h,y){let x=y.values().some((k)=>k==="application/json"||k.endsWith("+json"))?JSON.stringify(f):String(f),_=os.unique(h.parsedContentTypes.map((k)=>k.parameters.charset));if(_.length!==1||!_[0])return x;let z=_[0],C;try{C=Buffer.from(x,z)}catch(k){throw new os.ErrorWithCause(`Failed to encode form data field '${o}' with charset '${z}'.`,k)}let S=!this.checkIsFlexibleContentType(h,y)?{type:h.contentType}:void 0;return new Blob([C],S)}}class MU{constructor(o,f,h,y){this.method=o,this.pathPattern=f,this.parameters=h,this.basePath=y,this._fetchCsrfToken=!0,this.customHeaders={},this.customRequestConfiguration={},this._middlewares=[]}addCustomHeaders(o){return Object.entries(o).forEach(([f,h])=>{this.customHeaders[f.toLowerCase()]=h}),this}addCustomRequestConfiguration(o){return Object.entries(o).forEach(([f,h])=>{this.customRequestConfiguration[f]=h}),this}skipCsrfTokenFetching(){return this._fetchCsrfToken=!1,this}middleware(o,...f){return this._middlewares=os.transformVariadicArgumentToArray(o,f),this}async executeRaw(o){let f=this._fetchCsrfToken&&["post","put","patch","delete"].includes(this.method.toLowerCase()),h=await VEe.useOrFetchDestination(o);if(os.isNullish(o))throw Error(NU.noDestinationErrorMessage(o));return NU.assertHttpDestination(h),HEe.executeHttpRequest(h,await this.requestConfig(),{fetchCsrfToken:f})}async execute(o){let f=await this.executeRaw(o);if(KEe(f)){if(Buffer.isBuffer(f.data)){let h=os.pickValueIgnoreCase(f.headers,"content-type");return new Blob([f.data],h?{type:h}:void 0)}return f.data}throw Error("Could not access response data. Response was not an axios response.")}setBasePath(o){return this.basePath=o,this}async requestConfig(){return{...{method:this.method,url:this.getPath(),headers:this.getHeaders(),params:this.getParameters(),middleware:this._middlewares,data:this.getBody()},...GEe.filterCustomRequestConfig(this.customRequestConfiguration)}}getHeaders(){let o={requestConfig:this.parameters?.headerParameters||{}};if(Object.keys(this.customHeaders).length)return{custom:this.customHeaders,...o};return o}getParameters(){return{requestConfig:this.parameters?.queryParameters||{}}}getBody(){let o=this.parameters?.body;if(os.pickValueIgnoreCase(this.parameters?.headerParameters,"content-type")==="multipart/form-data"&&!(o instanceof FormData)){let h=this.parameters._encoding;return new jU(o,h).build()}return o}getPath(){let o=this.parameters?.pathParameters||{},f=this.pathPattern.match(/{[^/?#{}]+}/g)||[];return(this.basePath?os.removeSlashes(this.basePath):"")+f.reduce((h,y)=>{let x=y.slice(1,-1),_=o[x];return h.replace(y,encodeURIComponent(_))},this.pathPattern)}}qU.OpenApiRequestBuilder=MU;function KEe(o){return"data"in o}});var $U=i(function(uz){Object.defineProperty(uz,"__esModule",{value:!0});uz.OpenApiRequestBuilder=void 0;var WEe=UU();Object.defineProperty(uz,"OpenApiRequestBuilder",{enumerable:!0,get:function(){return WEe.OpenApiRequestBuilder}})});function ma(o){return typeof o==="object"&&!Array.isArray(o)&&(("id"in o)||("scenario"in o)&&("name"in o)&&("version"in o))}function wd(o){if(!Array.isArray(o))throw TypeError("Configuration must be an array for module fallback.");if(o.length===0)throw RangeError("Configuration array must not be empty.");if(!o.every((h)=>h&&typeof h==="object"&&("promptTemplating"in h)&&h.promptTemplating&&typeof h.promptTemplating==="object"))throw TypeError("Configuration array must contain valid OrchestrationModuleConfig objects with promptTemplating property.")}function tg(o){try{return wd(o),!0}catch{return!1}}var rg={ALLOW_SAFE:0,ALLOW_SAFE_LOW:2,ALLOW_SAFE_LOW_MEDIUM:4,ALLOW_ALL:6};var LR=v(se(),1),Mre=LR.createLogger({package:"orchestration",messageContext:"orchestration-stream-response"});class Qs{_openStream=!0;_data={};_stream;_rawResponse;constructor(o){if(!o){Mre.warn("Constructing OrchestrationStreamResponse without raw HTTP response is deprecated and can lead to runtime errors when accessing `rawResponse`.");return}this._rawResponse=o}get rawResponse(){if(!this._rawResponse)throw Error("The raw response is not available. Please provide the raw response when constructing `OrchestrationStreamResponse`");return this._rawResponse}getTokenUsage(){if(this.isStreamOpen())return;return this._data.final_result?.usage}getRequestId(){return this._data.request_id}getFinishReason(o=0){if(this.isStreamOpen())return;return this.findChoiceByIndex(o)?.finish_reason}getContent(o=0){if(this.isStreamOpen())return;return this.findChoiceByIndex(o)?.message?.content}getToolCalls(o=0){if(this.isStreamOpen())return;return this.findChoiceByIndex(o)?.message?.tool_calls}getRefusal(o=0){if(this.isStreamOpen())return;return this.findChoiceByIndex(o)?.message?.refusal}getReasoningContent(o=0){if(this.isStreamOpen())return;return this.findChoiceByIndex(o)?.message?.reasoning_content?.map((h)=>h.content??"")}getAllMessages(o=0){if(this.isStreamOpen())return;let f=this._data.intermediate_results?.templating??[],h=this.findChoiceByIndex(o)?.message;return h?[...f,h]:f}getAssistantMessage(o=0){if(this.isStreamOpen())return;return this.findChoiceByIndex(o)?.message}getIntermediateResults(){if(this.isStreamOpen())return;return this._data.intermediate_results}getIntermediateFailures(){if(this.isStreamOpen())return;return this._data.intermediate_failures}findChoiceByIndex(o){if(this.isStreamOpen())return;return this.getChoices().find((f)=>f.index===o)}getCitations(){if(this.isStreamOpen())return;return this._data.final_result?.citations}get stream(){if(!this._stream)throw Error("Response stream is undefined.");return this._stream}set stream(o){this._stream=o}getChoices(){return this._data.final_result?.choices??[]}isStreamOpen(){if(this._openStream)throw Error("The stream is still open, the requested data is not available yet. Please wait until the stream is closed.");return this._openStream}}class Js{_data;constructor(o){this._data=o}getTokenUsage(){return this._data.final_result?.usage}getFinishReason(o=0){return this.findChoiceByIndex(o)?.finish_reason}getDeltaToolCalls(o=0){return this.findChoiceByIndex(o)?.delta.tool_calls}getDeltaContent(o=0){return this.findChoiceByIndex(o)?.delta.content}getDeltaReasoningContent(o=0){return this.findChoiceByIndex(o)?.delta.reasoning_content?.map((h)=>h.content??"")}getIntermediateResults(){return this._data.intermediate_results}getCitations(){return this._data.final_result?.citations}findChoiceByIndex(o){return this.getChoices()?.find((f)=>f.index===o)}getChoices(){return this._data.final_result?.choices}}var BU=v(cz(),1),Po=v(se(),1);import{Readable as NEe}from"node:stream";import{json as jEe}from"node:stream/consumers";var rs=v(Om(),1),PU=v(se(),1),AEe=PU.createLogger({package:"core",messageContext:"context"}),PEe=1201000,BEe=!1,Dm;async function lz(o){if(o){if(o.destinationName!==void 0&&o.useCache===void 0)o.useCache=!0;let h=await rs.useOrFetchDestination(o);if(!h)throw Error("Could not resolve destination.");return rs.assertHttpDestination(h),h}if(!Dm){if(Dm=DEe()||rs.getServiceBinding("aicore"),!Dm)throw Error("Could not find service credentials for AI Core. Please check the service binding.")}let f=await rs.transformServiceBindingToDestination(Dm,{useCache:!0});return{...f,agentOptions:{keepAlive:BEe,timeout:PEe,...f.agentOptions}}}function DEe(){let o=LEe(process.env.AICORE_SERVICE_KEY);if(o)return AEe.debug('Found a service key in environment variable "AICORE_SERVICE_KEY".'),{credentials:o,label:"aicore",name:"aicore",tags:["aicore"]}}function LEe(o){if(o)try{return JSON.parse(o)}catch(f){throw Error('Error in parsing service key from the "AICORE_SERVICE_KEY" environment variable.',{cause:f})}}function MEe(o,f){if(f instanceof Set)return[...f];if(f instanceof Map)return Object.fromEntries(f);return f}async function sa(o,f,h,y){let x=await lz(y),{url:_,apiVersion:z,resourceGroup:C="default"}=o,w={...FEe(z,C,h),data:f instanceof FormData||f instanceof Blob?f:JSON.stringify(f,MEe)};try{return await BU.executeHttpRequest({...x,url:UEe(x.url,_)},w,{fetchCsrfToken:!1})}catch(S){if(h?.signal?.aborted)throw new Po.ErrorWithCause("Request aborted.",S);throw await qEe(S),new Po.ErrorWithCause(`Request failed with status code ${S.status}.`,S)}}async function qEe(o){if(o.response?.data&&o.config.responseType==="stream"){let f=NEe.from(o.response.data);o.response.data=await jEe(f)}}function FEe(o,f,h){let y={method:"post",headers:{"content-type":"application/json","ai-resource-group":f},params:o?{"api-version":o}:{},maxContentLength:Number.POSITIVE_INFINITY,maxBodyLength:Number.POSITIVE_INFINITY},x=Po.mergeIgnoreCase(y.headers,h?.headers),_=["AI SDK JavaScript",Po.pickValueIgnoreCase(h?.headers,"ai-client-type")].filter(Boolean).join(", ");return{...y,...h,headers:{...Po.mergeIgnoreCase(x,{"ai-client-type":_})},params:Po.mergeIgnoreCase(y.params,h?.params)}}function UEe(o,f){if(o=Po.removeTrailingSlashes(o),f=Po.removeLeadingSlashes(f),new URL(o).pathname==="/")return o+"/v2/"+f;return o+"/"+f}var VU=v($U(),1);class Ct extends VU.OpenApiRequestBuilder{constructor(o,f,h,y){super(o,f,h,y)}async executeRaw(o,f){let{url:h,data:y,...x}=await this.requestConfig();return sa({url:h},y,{...x,...f,headers:{...x.headers?.requestConfig,...x.headers?.custom,...f?.headers},params:{...x.params?.requestConfig,...x.params?.custom,...f?.params}},o)}async execute(o,f){let h=await this.executeRaw(o,f);if("data"in h)return h.data;throw Error("Could not access response data. Response was not an axios response.")}}var dz=v(se(),1);class jc{static NEWLINE_CHARS=new Set([`
174
+ `,"\r"]);static NEWLINE_REGEXP=/\r\n|[\n\r]/g;buffer;trailingCR;textDecoder;constructor(){this.buffer=[],this.trailingCR=!1}decode(o){let f=this.decodeText(o);if(this.trailingCR)f="\r"+f,this.trailingCR=!1;if(f.endsWith("\r"))this.trailingCR=!0,f=f.slice(0,-1);if(!f)return[];let h=jc.NEWLINE_CHARS.has(f.at(-1)||""),y=f.split(jc.NEWLINE_REGEXP);if(h)y.pop();if(y.length===1&&!h)return this.buffer.push(y[0]),[];if(this.buffer.length)y=[this.buffer.join("")+y[0],...y.slice(1)],this.buffer=[];if(!h)this.buffer=[y.pop()||""];return y}decodeText(o){if(o==null)return"";if(typeof o==="string")return o;if(typeof Buffer<"u"){if(o instanceof Buffer)return o.toString();if(o instanceof Uint8Array)return Buffer.from(o).toString();throw Error(`Unexpected: received non-Uint8Array (${o.constructor.name}) stream chunk in an environment with a global "Buffer" defined, which this library assumes to be Node. Please report this error.`)}throw Error("Unexpected: Buffer is not available as globals. Please report this error.")}flush(){if(!this.buffer.length&&!this.trailingCR)return[];let o=[this.buffer.join("")];return this.buffer=[],this.trailingCR=!1,o}}class Nm{data;event;chunks;constructor(){this.event=null,this.data=[],this.chunks=[]}decode(o){if(o.endsWith("\r"))o=o.substring(0,o.length-1);if(!o){if(!this.event&&!this.data.length)return null;let _={event:this.event,data:this.data.join(`
175
+ `),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],_}if(this.chunks.push(o),o.startsWith(":"))return null;let[f,h,y]=ZEe(o,":"),x=y.startsWith(" ")?y.substring(1):y;if(f==="event")this.event=x;else if(f==="data")this.data.push(x);else throw Error(`Invalid SSE payload: ${o}`);return null}}function ZEe(o,f){let h=o.indexOf(f);if(h!==-1)return[o.substring(0,h),f,o.substring(h+f.length)];return[o,"",""]}class Fo{static transformToSseStream(o,f){let h=!1;async function*y(){if(h)throw Error("Cannot iterate over a consumed stream.");h=!0;let x=!1;try{for await(let _ of YEe(o,f)){if(x)continue;if(_.data.startsWith("[DONE]")){x=!0;continue}let z;try{z=JSON.parse(_.data)}catch(C){throw new dz.ErrorWithCause(`Server sent an unexpected non-JSON response: ${_.data.length>256?_.data.slice(0,256)+"...":_.data}`,C)}if(z?.error)throw Error(`Error received from the server.
176
+ ${JSON.stringify(z.error)}`);yield _.event===null?z:{event:_.event,data:z}}x=!0}catch(_){if(_ instanceof Error&&_.name==="CanceledError")return;throw new dz.ErrorWithCause("Error while iterating over SSE stream.",_)}finally{if(!x)f.abort()}}return new Fo(y,f)}iterator;controller;constructor(o,f){this.iterator=o,this.controller=f}[Symbol.asyncIterator](){return this.iterator()}toReadableStream(){let o,f=new TextEncoder,{controller:h}=this,y=()=>this[Symbol.asyncIterator]();async function x(){try{await o.return?.()}catch{}finally{h.abort()}}return new ReadableStream({async start(){o=y()},async pull(_){try{let{value:z,done:C}=await o.next();if(C){_.close();return}_.enqueue(f.encode(JSON.stringify(z)+`
177
+ `))}catch(z){await x(),_.error(z)}},async cancel(){await x()}})}}async function*YEe(o,f){if(!o.data)throw f.abort(),Error("Attempted to iterate over a response with no body");let h=new Nm,y=new jc,x=o.data;for await(let _ of XEe(x))for(let z of y.decode(_)){let C=h.decode(z);if(C)yield C}for(let _ of y.flush()){let z=h.decode(_);if(z)yield z}}async function*XEe(o){let f=new Uint8Array;for await(let h of o){if(h==null)continue;let y=h instanceof ArrayBuffer?new Uint8Array(h):typeof h==="string"?new TextEncoder().encode(h):h,x=new Uint8Array(f.length+y.length);x.set(f),x.set(y,f.length),f=x;let _;while((_=QEe(f))!==-1)yield f.slice(0,_),f=f.slice(_)}if(f.length)yield f}function QEe(o){for(let y=0;y<o.length-2;y++){if(o[y]===10&&o[y+1]===10)return y+2;if(o[y]===13&&o[y+1]===13)return y+2;if(o[y]===13&&o[y+1]===10&&y+3<o.length&&o[y+2]===13&&o[y+3]===10)return y+4}return-1}var s6=v(se(),1);function id(o,f){if(!f)return{type:"azure_content_safety"};if(!Object.keys(f).length)throw Error("Filtering parameters cannot be empty");if(o==="input"){let{prompt_shield:x,..._}=f;return{type:"azure_content_safety",config:{...Object.fromEntries(Object.entries(_).map(([z,C])=>[z,rg[C]])),...x!==void 0&&{prompt_shield:x}}}}let{protected_material_code:h,...y}=f;return{type:"azure_content_safety",config:{...Object.fromEntries(Object.entries(y).map(([x,_])=>[x,rg[_]])),...h!==void 0&&{protected_material_code:h}}}}function nd(o,f){return{type:"llama_guard_3_8b",config:Object.fromEntries([...f].map((h)=>[h,!0]))}}function ad(o){return{type:"document_grounding_service",config:{placeholders:{input:o.placeholders.input,output:o.placeholders.output},...o.filters&&{filters:o.filters?.map((f)=>({data_repository_type:"vector",...f}))},...o.metadata_params&&{metadata_params:o.metadata_params}}}}var KU=v(se(),1);var jm=KU.createLogger({package:"orchestration",messageContext:"orchestration-utils"});function WU(o,f,h){if(h)o={...o,stream:{...o.stream,enabled:!0}};else delete o.stream;return{messages_history:f?.messagesHistory||[],placeholder_values:f?.placeholderValues||{},config:o}}function JU(o,f,h){let y=[...f?.messagesHistory||[],...f?.messages||[]],{overrideConfig:x,..._}=o,z={...x,stream:{...x?.stream,enabled:h===!0}};return{config_ref:_,config:z,...f?.placeholderValues&&{placeholder_values:f.placeholderValues},...y.length&&{messages_history:y}}}function eke(o,f){if(f?.promptTemplating===null)return o;return{...o,model:{...o.model,params:{...o.model.params,...f?.promptTemplating!==null&&{stream_options:{include_usage:!0,...o.model.params?.stream_options,...f?.promptTemplating}}}}}}function tke(o,f){return{...o,stream_options:{...o.stream_options,...f}}}function rke(o,f){let h=Object.keys(o?.overrides||[]);if(!h.length)return;let y=h.filter((x)=>{let _=parseFloat(x);return!Number.isInteger(_)||_<0||_>=f});if(y.length)jm.debug(`The following override keys do not correspond to any module configuration and will be ignored: ${y.join(", ")}.`)}function oke(o,f){if(!Array.isArray(o?.overrides)||!o.overrides.length)return;let h=o.overrides.length;jm.debug(`Override array has ${h} element(s) but there are ${f} module configuration(s). Configs at indices ${h}-${f-1} will use shared options. If this is intentional, use object input to silence this warning: \`{...streamOptionsArray}\``)}function ZU(o,f){if(!o)return;let{global:h,overrides:y,...x}=o;return y&&y[f]||x}function nke(o,f){let h=Array.isArray(o)?o:[o],y=h.map((x,_)=>{if(ZU(f,_)?.outputFiltering&&!x.filtering?.output)return _;return}).filter((x)=>x!==void 0);if(y.length===0)return;if(y.length===h.length)jm.warn("Output filter stream options are not applied because no module configuration has output filtering enabled.");else if(y.length>0){let x=y.length>1?"configurations":"configuration",_=y.map((z)=>`#${z+1}`).join(", ");jm.warn(`Output filter stream options will not be applied to ${x} ${_} because output filtering is not configured for those modules.`)}}function ike(o,f){return o.map((h,y)=>{let x=ZU(f,y);return ske(h,x)})}function HU(o,f){let h=Array.isArray(o)?o:[o];if(!Array.isArray(o)&&f?.overrides)throw Error("Overrides in stream options are not supported when a single module configuration is provided.");rke(f,h.length),oke(f,h.length),nke(o,f);let y=ike(h,f);return{stream:{enabled:!0,...f?.global},modules:Array.isArray(o)?y:y[0]}}function ske(o,f){let{prompt_templating:h,filtering:y}=o,x=f?.outputFiltering;return{...o,prompt_templating:eke(h,f),...x&&y?.output&&{filtering:{...y,output:tke(y.output,x)}}}}function pz(o,f,h,y){let _=(Array.isArray(o)?o:[o]).some((E)=>lke(E?.promptTemplating?.prompt||{})),z=_&&f?{...f,messages:void 0}:f,C=Array.isArray(o)?o.map((E)=>GU(E,z)):GU(o,z),w=h?Array.isArray(C)?HU(C,y):HU(C,y):{modules:C},S=_&&f?.messages?.length?[...f.messagesHistory||[],...f.messages]:f?.messagesHistory;return{config:w,...f?.placeholderValues&&{placeholder_values:f.placeholderValues},...S&&{messages_history:S}}}function ake(o,f){if(typeof o.prompt==="string")throw TypeError("Prompt must be parsed before merging with messages.");let h=o.prompt??{template:[]};if(cke(h)){if(!h.template?.length&&!f?.length)throw Error("Either a prompt template or messages must be defined.");return{...h,template:[...h.template||[],...f||[]]}}return h}function GU(o,f){let{promptTemplating:h,filtering:y,masking:x,grounding:_,translation:z}=o,C=ake(h,f?.messages);return{prompt_templating:{...h,prompt:C},...y&&Object.keys(y).length&&{filtering:y},...x&&Object.keys(x).length&&{masking:x},..._&&Object.keys(_).length&&{grounding:_},...z&&Object.keys(z).length&&{translation:z}}}function cke(o){return!!o&&typeof o==="object"&&!("template_ref"in o)}function lke(o){return!!o&&typeof o==="object"&&"template_ref"in o}function YU(o,f){return{config:{modules:uke(o)},input:{text:f.input,...f.type&&{type:f.type}}}}function uke(o){let{embeddings:f,masking:h}=o,{model:y}=f,{name:x,version:_,params:z}=y;return{embeddings:{model:{name:x,..._&&{version:_},...z&&{params:z}}},...h&&Object.keys(h).length&&{masking:h}}}function od(o){let{method:f,mask_grounding_input:h,entities:y,allowlist:x}=o;return{type:"sap_data_privacy_integration",method:f,entities:y.map((_)=>{if(typeof _==="string")return{type:_};return _.type==="custom"?(({type:z,...C})=>C)(_):_}),...h!==void 0&&{mask_grounding_input:{enabled:h}},...x&&{allowlist:x}}}function XU(o){return{category:o.category,items:o.items,...o.sourceLanguage&&{source_language:o.sourceLanguage}}}function rd(o,f){if(o==="input"){let h=f;return{type:"sap_document_translation",...h.translateMessagesHistory!==void 0&&{translate_messages_history:h.translateMessagesHistory},config:{...h.sourceLanguage&&{source_language:h.sourceLanguage},target_language:h.targetLanguage,...h.applyTo&&{apply_to:h.applyTo.map(XU)}}}}return{type:"sap_document_translation",config:{...f.sourceLanguage&&{source_language:f.sourceLanguage},target_language:typeof f.targetLanguage==="string"?f.targetLanguage:XU(f.targetLanguage)}}}var QU=v(se(),1),bd=QU.createLogger({package:"orchestration",messageContext:"stream-util"});function e6(o,f){let h=o._data;h.request_id=f.request_id,h.intermediate_results=t6(h.intermediate_results,f.intermediate_results),h.intermediate_failures=dke(h.intermediate_failures,f.intermediate_failures),h.final_result=r6(h.final_result,f.final_result)}function dke(o,f){if(!f||f.length===0)return o;let h=f.map((_)=>({..._,intermediate_results:_.intermediate_results?t6(void 0,_.intermediate_results):void 0}));if(!o||o.length===0)return h;let y=new Set(o.map((_)=>JSON.stringify([_.request_id,_.code,_.message]))),x=h.filter((_)=>!y.has(JSON.stringify([_.request_id,_.code,_.message])));return[...o,...x]}function t6(o,f){let h={...o};for(let[y,x]of Object.entries(f||{}))switch(y){case"llm":h[y]=r6(h[y],x);break;case"output_unmasking":h[y]=o6(h[y],x);break;default:h[y]=x}return h}function r6(o,f){if(!f)return o;return{...f,usage:pke(o?.usage,f.usage),choices:o6(o?.choices,f?.choices)}}function pke(o,f){if(f)bd.debug(`Token usage: ${JSON.stringify(f)}`);return{...o,...f,prompt_tokens:f?.prompt_tokens??o?.prompt_tokens??0,completion_tokens:f?.completion_tokens??o?.completion_tokens??0,total_tokens:f?.total_tokens??o?.total_tokens??0}}function o6(o,f){let h=[...o??[]];for(let y of f??[]){let x=h.find((_)=>_.index===y.index);if(x)x.finish_reason=yke(x.finish_reason,y.finish_reason,y.index),x.logprobs=gke(x.logprobs,y.logprobs),x.message=fke(x.message,y.delta);else h.push(bke(y))}return h}function fke(o,f){if(!f)return o;return{role:o.role,content:o.content+(f.content??""),tool_calls:hke(o.tool_calls,f.tool_calls),refusal:f.refusal??o.refusal,reasoning_content:mke(o.reasoning_content,f.reasoning_content)}}function hke(o,f){if(!f||f.length===0)return o;if(!o||o.length===0)return n6(f);let h=[...o];for(let y of f){let x=h.find((_)=>_.index===y.index);if(x)x.function.name=y.function?.name??x.function.name,x.function.arguments=x.function.arguments+(y.function?.arguments??"");else h.push(i6(y))}return h}function mke(o,f){if(!f?.length)return o;if(!o?.length)return f;let h=Math.min(o.length,f.length),y=f.slice(0,h).map((x,_)=>({content:(o[_].content??"")+(x.content??""),signature:x.signature||o[_].signature}));if(f.length>o.length)return[...y,...f.slice(h)];if(o.length>f.length)return[...y,...o.slice(h)];return y}function gke(o,f){if(!f)return o;if(!o)return f;return{content:[...o.content??[],...f.content??[]],refusal:[...o.refusal??[],...f.refusal??[]]}}function yke(o,f,h){if(!f)return o??"";switch(f){case"content_filter":bd.error(`Choice ${h}: Stream finished with content filter hit.`);break;case"length":bd.error(`Choice ${h}: Stream finished with token length exceeded.`);break;case"stop":case"tool_calls":case"function_call":bd.debug(`Choice ${h}: Stream finished.`);break;default:bd.error(`Choice ${h}: Stream finished with unknown reason '${f}'.`)}return f}function bke(o){return{index:o.index,message:{role:"assistant",content:o.delta.content,tool_calls:n6(o.delta.tool_calls),refusal:o.delta.refusal,reasoning_content:o.delta.reasoning_content},finish_reason:o.finish_reason??"",logprobs:o.logprobs}}function n6(o){if(!o||o.length===0)return;return o?.map((f)=>i6(f))}function i6(o){return{index:o.index,id:o.id??"",type:o.type??"function",function:{name:o.function?.name??"",arguments:o.function?.arguments??""}}}var vke=s6.createLogger({package:"orchestration",messageContext:"orchestration-stream"});class fi extends Fo{static _create(o,f){let h=Fo.transformToSseStream(o,f);return new fi(h.iterator,f)}static async*_processChunk(o){for await(let f of o)yield new Js(f)}static async*_processOrchestrationStreamChunkResponse(o,f){if(!f)throw Error("Response is required to process completion post response streaming.");for await(let h of o)e6(f,h._data),yield h}static async*_processStreamEnd(o,f){if(!f)throw Error("Response is required to process stream end.");for await(let y of o)yield y;f._openStream=!1;let h=f._data.intermediate_failures;if(h&&h.length>0)vke.info(`Orchestration used ${h.length} fallback(s) before success`)}static async*_processContentStream(o){for await(let f of o){let h=f.getDeltaContent();if(!h)continue;yield h}}constructor(o,f){super(o,f)}_pipe(o,f){if(f)return new fi(()=>o(this,f),this.controller);return new fi(()=>o(this),this.controller)}toContentStream(){return new fi(()=>fi._processContentStream(this),this.controller)}}var u6=v(se(),1);var Kn={_defaultBasePath:void 0,deploymentQuery:(o,f)=>new Ct("get","/lm/deployments",{headerParameters:f,queryParameters:o},Kn._defaultBasePath),deploymentCreate:(o,f)=>new Ct("post","/lm/deployments",{body:o,headerParameters:{"content-type":"application/json",...f}},Kn._defaultBasePath),deploymentBatchModify:(o,f)=>new Ct("patch","/lm/deployments",{body:o,headerParameters:{"content-type":"application/merge-patch+json",...f}},Kn._defaultBasePath),deploymentGet:(o,f,h)=>new Ct("get","/lm/deployments/{deploymentId}",{pathParameters:{deploymentId:o},headerParameters:h,queryParameters:f},Kn._defaultBasePath),deploymentModify:(o,f,h)=>new Ct("patch","/lm/deployments/{deploymentId}",{pathParameters:{deploymentId:o},body:f,headerParameters:{"content-type":"application/json",...h}},Kn._defaultBasePath),deploymentDelete:(o,f)=>new Ct("delete","/lm/deployments/{deploymentId}",{pathParameters:{deploymentId:o},headerParameters:f},Kn._defaultBasePath),deploymentCount:(o,f)=>new Ct("get","/lm/deployments/$count",{headerParameters:f,queryParameters:o},Kn._defaultBasePath),kubesubmitV4DeploymentsGetLogs:(o,f,h)=>new Ct("get","/lm/deployments/{deploymentId}/logs",{pathParameters:{deploymentId:o},headerParameters:h,queryParameters:f},Kn._defaultBasePath)};var l6=v(Im(),1);function xke(o){return typeof o==="object"&&"name"in o}function vd(o){let f=o.details?.resources?.backendDetails?.model;if(xke(f))return f}function a6(o){if(typeof o==="string")return{name:o};return{name:o.modelName,...o.modelVersion&&{version:o.modelVersion}}}function fz({scenarioId:o,executableId:f="",model:h,resourceGroup:y="default"}){return`${o}:${f}:${h?.name??""}:${h?.version??""}:${y}`}function _ke(o){return{get:(f)=>o.get(fz(f)),set:(f,h)=>{o.set(fz(f),{entry:c6(h)})},setAll:(f,h)=>{[...h].reverse().map((y)=>c6(y)).flatMap((y)=>[y,{id:y.id,url:y.url},...y.model?[{id:y.id,url:y.url,model:{name:y.model.name}}]:[]]).forEach((y)=>{o.set(fz({...f,model:y.model}),{entry:y})})},clear:()=>o.clear()}}function c6(o){return{id:o.id,url:o.url,model:vd(o)}}var hz=_ke(new l6.Cache(300000));function Zl(o){return typeof o==="object"?o.resourceGroup:void 0}async function zke(o){let{model:f}=o,h=await Cke(o);if(f){if(h=h.filter((y)=>vd(y)?.name===f.name),f.version)h=h.filter((y)=>vd(y)?.version===f.version)}if(!h.length)throw Error(`No deployment matched the given criteria: ${JSON.stringify(o)}. Make sure the deployment is successful, as it is a prerequisite before consuming orchestration or foundation models.`);return h[0]}function d6(o){return typeof o==="object"&&"deploymentId"in o}async function p6(o){let f=hz.get(o);if(f?.id)return f.id;return(await zke(o)).id}async function Cke(o){let{destination:f,scenarioId:h,executableId:y,resourceGroup:x="default"}=o;try{let{resources:_}=await Kn.deploymentQuery({scenarioId:h,status:"RUNNING",...y&&{executableIds:[y]}},{"AI-Resource-Group":x}).execute(f);return hz.setAll(o,_),_}catch(_){throw new u6.ErrorWithCause("Failed to fetch the list of deployments.",_)}}async function sd(o,f,h){if(d6(o))return o.deploymentId;return p6({scenarioId:"foundation-models",executableId:f,model:a6(o),resourceGroup:Zl(o),destination:h})}async function Mm(o,f){if(d6(o))return o.deploymentId;return p6({scenarioId:"orchestration",...o,destination:f})}var Cn=g("ZodMiniType",(o,f)=>{if(!o._zod)throw Error("Uninitialized schema in ZodMiniType.");ce.init(o,f),o.def=f,o.type=f.type},{get with(){return this.check},set with(o){na(this,"with",o)},parse(o,f){return Tl(this,o,f,{callee:this.parse})},parseAsync(o,f){return _l(this,o,f,{callee:this.parseAsync})},safeParse(o,f){return Il(this,o,f)},safeParseAsync(o,f){return Ay(this,o,f)},check(...o){let f=this.def;return this.clone({...f,checks:[...f.checks??[],...o.map((h)=>typeof h==="function"?{_zod:{check:h,def:{check:"custom"},onattach:[]}}:h)]},{parent:!0})},clone(o,f){return _e(this,o,f)},brand(){return this},register(o,f){return o.add(this,f),this},apply(o,...f){return f.length===0?o(this):o(this,...f)}}),Ske=g("ZodMiniString",(o,f)=>{jr.init(o,f),Cn.init(o,f)});function Hr(o){return Pp(Ske,o)}var Tke=g("ZodMiniBoolean",(o,f)=>{wc.init(o,f),Cn.init(o,f)});function mz(o){return Lp(Tke,o)}var Eke=g("ZodMiniUnknown",(o,f)=>{Tp.init(o,f),Cn.init(o,f)});function qm(){return Bp(Eke)}var kke=g("ZodMiniArray",(o,f)=>{_p.init(o,f),Cn.init(o,f)});function Fm(o,f){return new kke({type:"array",element:o,...T(f)})}var h6=g("ZodMiniObject",(o,f)=>{Zm.init(o,f),Cn.init(o,f),Xm(o,"shape",(h)=>h._zod.def.shape,!1)});function wo(o,f){let h={type:"object",shape:o??{},...T(f)};return new h6(h)}function Um(o,f){return new h6({type:"object",shape:o,catchall:qm(),...T(f)})}function m6(o,f){return o.clone(Pt(o._zod.def,{catchall:f}))}var Oke=g("ZodMiniUnion",(o,f)=>{kc.init(o,f),Cn.init(o,f)});function $m(o,f){return new Oke({type:"union",options:o,...T(f)})}var f6=g("ZodMiniRecord",(o,f)=>{Ip.init(o,f),Cn.init(o,f)});function gz(o,f,h){if(!f||!f._zod)return new f6({type:"record",keyType:Hr(),valueType:o,...T(f)});return new f6({type:"record",keyType:o,valueType:f,...T(h)})}var Ike=g("ZodMiniEnum",(o,f)=>{Sp.init(o,f),Cn.init(o,f),o.options=[...o._zod.values]});function pa(o,f){let h=Array.isArray(o)?Object.fromEntries(o.map((y)=>[y,y])):o;return new Ike({type:"enum",entries:h,...T(f)})}var Rke=g("ZodMiniOptional",(o,f)=>{Sl.init(o,f),Cn.init(o,f)});function Wn(o){return new Rke({type:"optional",innerType:o})}var Ake=g("ZodMiniNullable",(o,f)=>{Ep.init(o,f),Cn.init(o,f)});function Pke(o){return new Ake({type:"nullable",innerType:o})}function yz(o){return Wn(Pke(o))}var Bke=g("ZodMiniDefault",(o,f)=>{Rp.init(o,f),Cn.init(o,f)});function Vm(o,f){return new Bke({type:"default",innerType:o,get defaultValue(){return typeof f==="function"?f():Fr(f)}})}var Yr=Up;var Nke=120,jke=new RegExp("^[a-zA-Z0-9_-]+$"),Mke=10,qke=new RegExp("^[a-zA-Z0-9._-]+$"),Fke=120,Uke=new RegExp("^[a-zA-Z0-9_-]+$"),$ke="auto",Vke=64,Hke=new RegExp("^[a-zA-Z0-9-_]+$"),Gke=!1,Kke=64,Wke=new RegExp("^[a-zA-Z0-9-_]+$"),Jke=!1,b6=wo({name:Hr().check(Mi(Nke)).check(tn(jke)),version:Hr().check(Mi(Mke)).check(tn(qke)),scenario:Hr().check(Mi(Fke)).check(tn(Uke)),spec:m6(wo({template:Fm($m([wo({role:Hr(),content:Hr()}),wo({role:Hr(),content:Fm($m([wo({type:pa(["image_url"]),image_url:wo({url:Hr(),detail:Vm(Hr(),$ke)})}),wo({type:pa(["text"]),text:Hr()})]))})])),defaults:Wn(Um({})),additionalFields:Wn(Um({})).check(Yr(`DEPRECATED. Please use additional_fields instead.
178
+ `)),response_format:Wn($m([wo({type:pa(["text"]).check(Yr("The type of response format being defined: `text`"))}),wo({type:pa(["json_object"]).check(Yr("The type of response format being defined: `json_object`"))}),wo({type:pa(["json_schema"]).check(Yr("The type of response format being defined: `json_schema`")),json_schema:wo({description:Wn(Hr()).check(Yr("A description of what the response format is for, used by the model to determine how to respond in the format.")),name:Hr().check(Mi(Vke)).check(tn(Hke)).check(Yr("The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.")),schema:Wn(gz(Hr(),qm())).check(Yr("The schema for the response format, described as a JSON Schema object.")),strict:Vm(yz(mz()),Gke).check(Yr("Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs)."))})})])).check(Yr(`Response format that the model output should adhere to. This is the same as the OpenAI definition.
179
+ Compatible with GPT-4o, GPT-4o mini, GPT-4 (Turbo) and all GPT-3.5 Turbo models newer than gpt-3.5-turbo-1106.
180
+ `)),tools:Wn(Fm(wo({type:pa(["function"]).check(Yr("The type of the tool. Currently, only `function` is supported.")),function:wo({description:Wn(Hr()).check(Yr("A description of what the function does, used by the model to choose when and how to call the function.")),name:Hr().check(Mi(Kke)).check(tn(Wke)).check(Yr("The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.")),parameters:Wn(gz(Hr(),qm())).check(Yr("The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting `parameters` defines a function with an empty parameter list.")),strict:Vm(yz(mz()),Jke).check(Yr("Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling)."))})}))).check(Yr(`A list of tools the model may call. Used to provide a list of functions the model may generate JSON inputs for. This is the same as the OpenAI definition.
181
+ `))}),Um({}))});var aHe=new RegExp("^[a-zA-Z0-9-_]+$");var cHe=new RegExp("^[a-zA-Z0-9-_]+$");var lHe=new RegExp("^[a-zA-Z0-9-_]+$");var uHe=new RegExp("^[a-zA-Z0-9-_]+$");var dHe=new RegExp("^[a-zA-Z0-9-_]+$");var pHe=new RegExp("^[a-zA-Z0-9-_]+$");var fHe=new RegExp("^[a-zA-Z0-9-_]+$");var hHe=new RegExp("^[a-zA-Z0-9-_]+$");var mHe=new RegExp("^[a-zA-Z0-9-_]+$");var gHe=new RegExp("^[a-zA-Z0-9-_]+$");var yHe=new RegExp("^[a-zA-Z0-9_-]+$");var bHe=new RegExp("^[a-zA-Z0-9._-]+$");var vHe=new RegExp("^[a-zA-Z0-9_-]+$");var xHe=new RegExp("^[a-zA-Z0-9-_]+$");var _He=new RegExp("^[a-zA-Z0-9-_]+$");var zHe=new RegExp("^[a-zA-Z0-9-_]+$");var CHe=new RegExp("^[a-zA-Z0-9-_]+$");var wHe=new RegExp("^[a-zA-Z0-9-_]+$");var SHe=new RegExp("^[a-zA-Z0-9-_]+$");var THe=new RegExp("^[a-zA-Z0-9-_]+$");var EHe=new RegExp("^[a-zA-Z0-9-_]+$");var kHe=new RegExp("^[a-zA-Z0-9-_]+$");var OHe=new RegExp("^[a-zA-Z0-9-_]+$");var IHe=new RegExp("^[a-zA-Z0-9-_]+$");var RHe=new RegExp("^[a-zA-Z0-9-_]+$");var AHe=new RegExp("^[a-zA-Z0-9-_]+$");var PHe=new RegExp("^[a-zA-Z0-9-_]+$");var BHe=new RegExp("^[a-zA-Z0-9-_]+$");var DHe=new RegExp("^[a-zA-Z0-9-_]+$");var v6=v(se(),1);class Ys{rawResponse;_data;constructor(o){this.rawResponse=o,this._data=o.data}getTokenUsage(){return this._data.final_result.usage}getFinishReason(o=0){return this.findChoiceByIndex(o)?.finish_reason}getContent(o=0){let f=this.findChoiceByIndex(o);if(f?.message?.content===""&&f?.finish_reason==="content_filter")throw Error("Content generated by the LLM was filtered by the output filter. Please try again with a different prompt or filter configuration.");return f?.message?.content}getToolCalls(o=0){return this.findChoiceByIndex(o)?.message?.tool_calls}getRefusal(o=0){return this.findChoiceByIndex(o)?.message?.refusal}getReasoningContent(o=0){return this.findChoiceByIndex(o)?.message?.reasoning_content?.map((h)=>h.content??"")}getAllMessages(o=0){let f=this._data.intermediate_results.templating??[],h=this.findChoiceByIndex(o)?.message;return h?[...f,h]:f}getAssistantMessage(o=0){return this.findChoiceByIndex(o)?.message}getIntermediateResults(){return this._data.intermediate_results}getIntermediateFailures(){return this._data.intermediate_failures}findChoiceByIndex(o){return this.getChoices().find((f)=>f.index===o)}getRequestId(){return this._data.request_id}getCitations(){return this._data.final_result.citations}getChoices(){return this._data.final_result.choices}}var Mc=v6.createLogger({package:"orchestration",messageContext:"orchestration-client"});class cd{config;deploymentConfig;destination;constructor(o,f,h){if(this.config=o,this.deploymentConfig=f,this.destination=h,typeof o==="string")this.validateJsonConfig(o);else if(Array.isArray(o))wd(o),this.config=this.parseModuleConfigList(o);else if(!ma(o))this.config=this.parseTemplatingModule(o)}async chatCompletion(o,f){if(f?.signal?.throwIfAborted(),ma(this.config)&&o?.messages?.length)Mc.debug("Messages provided with an orchestration config reference will be sent as messages_history.");let h=await this.executeRequest({request:o,requestConfig:f,stream:!1});return new Ys(h)}async stream(o,f,h,y){let x=new AbortController;if(f)f.throwIfAborted(),f.addEventListener("abort",()=>{x.abort()});try{if(typeof this.config==="string"&&h)Mc.warn("Stream options are not supported when using a JSON module config.");if(ma(this.config)){if(h)Mc.warn("Request-level stream options (promptTemplating, outputFiltering, global, and overrides) are ignored when using an orchestration config reference. Configure supported streaming settings via OrchestrationConfigRef.config or in the stored orchestration configuration. Per-fallback stream overrides are not supported for config references.");if(o?.messages?.length)Mc.debug("Messages provided with an orchestration config reference will be sent as messages_history.")}return await this.createStreamResponse({request:o,requestConfig:y,stream:!0,streamOptions:h},x)}catch(_){throw x.abort(),_}}async executeRequest(o){let{request:f,requestConfig:h,stream:y,streamOptions:x}=o,_=typeof this.config==="string"?WU(JSON.parse(this.config),f,y):ma(this.config)?JU(this.config,f,y):tg(this.config)?pz(this.config,f,y,x):pz(this.config,f,y,x),z=await Mm(this.deploymentConfig||{},this.destination);if(!z)throw Error("Failed to resolve deployment ID");let C=await sa({url:`/inference/deployments/${z}/v2/completion`,...this.deploymentConfig},_,h,this.destination);if(C.data?.intermediate_failures){let w=C.data.intermediate_failures.length,S=C.data.final_result?.model;Mc.info(`Orchestration used ${w} fallback(s) before success${S?`. Succeeded with model: ${S}`:""}.`)}return C}async createStreamResponse(o,f){let h=await this.executeRequest({...o,requestConfig:{...o.requestConfig,responseType:"stream",signal:f.signal}}),y=new Qs(h),x=fi._create(h,f);return y.stream=x._pipe(fi._processChunk)._pipe(fi._processOrchestrationStreamChunkResponse,y)._pipe(fi._processStreamEnd,y),y}validateJsonConfig(o){try{JSON.parse(o)}catch(f){throw Error(`Could not parse JSON: ${String(f)}`,{cause:f})}}parseAndMergeTemplating(o){let f;if(typeof o.promptTemplating.prompt==="string"&&!o.promptTemplating.prompt.trim())throw Error("Templating YAML string must be non-empty.");try{f=X.parse(o.promptTemplating.prompt)}catch(C){throw Error(`Error parsing YAML: ${String(C)}`,{cause:C})}let h=b6.safeParse(f);if(!h.success)throw Error(`Prompt Template YAML does not conform to the defined type. Validation errors: ${h.error}`);let{template:y,defaults:x,response_format:_,tools:z}=h.data.spec;return{...o,promptTemplating:{...o.promptTemplating,prompt:{template:y,...x&&{defaults:x},..._&&{response_format:_},...z&&{tools:z}}}}}parseTemplatingModule(o){return typeof o.promptTemplating.prompt==="string"?this.parseAndMergeTemplating(o):o}parseModuleConfigList(o){wd(o);let f=o.map((x)=>this.parseTemplatingModule(x)),h=f.map((x)=>x.promptTemplating.model.name);if(new Set(h).size<h.length)Mc.warn(`Fallback configurations contain duplicate models: [${h.join(", ")}]. Consider using different models for meaningful fallback behavior.`);return f}}class Xs{response;_data;constructor(o){this.response=o,this._data=o.data}getEmbeddings(){return this._data.final_result.data.map((o)=>({embedding:o.embedding,index:o.index,object:"embedding"}))}getTokenUsage(){return this._data.final_result.usage}getIntermediateResults(){return this._data.intermediate_results}getRequestId(){return this._data.request_id}}class ld{config;deploymentConfig;destination;constructor(o,f,h){this.config=o,this.deploymentConfig=f,this.destination=h}async embed(o,f){let h=await this.executeRequest(o,f);return new Xs(h)}async executeRequest(o,f){let h=YU(this.config,o),y=await Mm(this.deploymentConfig||{},this.destination);if(!y)throw Error("Failed to resolve deployment ID");return sa({url:`/inference/deployments/${y}/v2/embeddings`,...this.deploymentConfig},h,f,this.destination)}}import{createRequire as Zke}from"module";var T6=v(se(),1),y7e=Zke(import.meta.url),Mh="sap-ai";function so(o){let f=o.indexOf(".");return f===-1?o:o.slice(0,f)}var xz=t({frequencyPenalty:n().min(-2).max(2).optional(),maxTokens:n().int().positive().optional(),n:n().int().positive().optional(),parallel_tool_calls:r().optional(),presencePenalty:n().min(-2).max(2).optional(),temperature:n().min(0).max(2).optional(),topP:n().min(0).max(1).optional()}).catchall(m()),_6=t({dimensions:n().int().positive().optional(),encoding_format:s(["base64","binary","float"]).optional(),normalize:r().optional()}).catchall(m());function z2(o){return _6.parse(o)}function Zp(o){return xz.parse(o)}function G2(o,f){let h=xz.safeParse(o);if(!h.success)for(let y of h.error.issues){let x=y.path.join("."),_=x?o[x]:void 0;f.push({message:`${x}=${String(_)} is invalid: ${y.message}. The API may reject this value.`,type:"other"})}}var z6=s(["orchestration","foundation-models"]),Yke=t({ttl:s(["5m","1h"]).optional(),type:a("ephemeral")}),Xke=t({cacheControl:Yke.optional()});function Nh(o,f){if(!o||typeof o!=="object")return;let h=o[Mh];if(h===void 0)return;let y=Xke.safeParse(h);if(y.success)return y.data;if(f)for(let x of y.error.issues){let _=x.path.join("."),z=`providerOptions['sap-ai']${_?`.${_}`:""} is invalid: ${x.message}. The directive was dropped.`;if(!f.some((C)=>C.message===z))f.push({message:z,type:"other"})}return}var C6=s(["tenant","resource_group"]),Qke=t({id:e().min(1,"Template ID cannot be empty"),scope:C6.optional()}),eOe=t({name:e().min(1,"Template name cannot be empty"),scenario:e().min(1,"Scenario cannot be empty"),scope:C6.optional(),version:e().min(1,"Version cannot be empty")}),tOe=p([Qke,eOe]),w6=Y((o)=>typeof o==="object"&&o!==null&&!Array.isArray(o),{message:"overrideConfig must be an object"}).refine((o)=>{let f;try{f=o.stream}catch{return!1}return f===void 0||Boolean(f)&&typeof f==="object"&&!Array.isArray(f)},{message:"overrideConfig.stream must be an object"}).refine((o)=>{let f;try{f=o.stream}catch{return!0}if(f===void 0||f===null||typeof f!=="object")return!0;try{return!("enabled"in f)}catch{return!1}},{message:"stream.enabled is not allowed in overrideConfig: it is controlled by the call site (stream() or chatCompletion())"}),rOe=t({id:e().min(1,"Config ID cannot be empty"),overrideConfig:w6.optional()}),oOe=t({name:e().min(1,"Config name cannot be empty"),overrideConfig:w6.optional(),scenario:e().min(1,"Scenario cannot be empty"),version:e().min(1,"Version cannot be empty")}),Lh=p([rOe,oOe]),Bh=u(()=>l(t({api:z6.optional(),escapeTemplatePlaceholders:r().optional(),includeReasoning:r().optional(),modelParams:xz.optional(),orchestrationConfigRef:Lh.optional(),placeholderValues:d(e(),e()).optional(),promptTemplateRef:tOe.optional()}))),Uh=u(()=>l(t({api:z6.optional(),modelParams:_6.optional(),type:s(["document","query","text"]).optional()}))),nOe=100;function co(...o){let f={};for(let h of o)if(h!=null)S6(f,h,new Set,0);return f}function x6(o){if(o===null||typeof o!=="object")return!1;let f=Object.getPrototypeOf(o);return f===Object.prototype||f===null}function S6(o,f,h,y){if(y>nOe)throw Error("Maximum merge depth exceeded");if(h.has(f))throw Error("Circular reference detected during deep merge");h.add(f);for(let x of Object.keys(f)){let _=f[x],z=Object.hasOwn(o,x)?o[x]:void 0,C=x6(_)?S6(x6(z)?z:{},_,h,y+1):_;Object.defineProperty(o,x,{configurable:!0,enumerable:!0,value:C,writable:!0})}return h.delete(f),o}var Yt={BAD_REQUEST:400,CLIENT_CLOSED_REQUEST:499,CONFLICT:409,FORBIDDEN:403,INTERNAL_ERROR:500,NOT_FOUND:404,RATE_LIMIT:429,REQUEST_TIMEOUT:408,SERVICE_UNAVAILABLE:503,UNAUTHORIZED:401},iOe=[{category:"network",isRetryable:!0,keywords:["econnrefused","enotfound","network","timeout"],statusCode:Yt.SERVICE_UNAVAILABLE},{category:"destination",isRetryable:!1,keywords:["could not resolve destination"],message:(o)=>`SAP AI Core destination error: ${o}
182
+
183
+ Check your destination configuration or provide a valid destinationName.`,statusCode:Yt.BAD_REQUEST},{category:"content filtered",isRetryable:!1,keywords:["filtered by the output filter"],message:(o)=>`Content was filtered: ${o}
184
+
185
+ The model's response was blocked by content safety filters. Try a different prompt.`,statusCode:Yt.BAD_REQUEST},{category:"stream consumption",isRetryable:!1,keywords:["consumed stream"],statusCode:Yt.INTERNAL_ERROR},{category:"streaming",isRetryable:!0,keywords:["iterating over","parse message into json","received from","no body","invalid sse payload"],statusCode:Yt.INTERNAL_ERROR},{category:"configuration",isRetryable:!1,keywords:["prompt template or messages must be defined","filtering parameters cannot be empty","templating yaml string must be non-empty","could not access response data","could not parse json","error parsing yaml","yaml does not conform","validation errors"],statusCode:Yt.BAD_REQUEST},{category:"environment",isRetryable:!1,keywords:["buffer is not available as globals"],statusCode:Yt.INTERNAL_ERROR},{category:"response stream",isRetryable:!1,keywords:["response stream is undefined"],statusCode:Yt.INTERNAL_ERROR},{category:"response processing",isRetryable:!0,keywords:["response is required to process","stream is still open","data is not available yet"],statusCode:Yt.INTERNAL_ERROR},{category:"deployment retrieval",isRetryable:!0,keywords:["failed to fetch the list of deployments"],statusCode:Yt.SERVICE_UNAVAILABLE},{category:"stream buffer",isRetryable:!1,keywords:["received non-uint8array"],statusCode:Yt.INTERNAL_ERROR}],sOe=["authentication","unauthorized","aicore_service_key","invalid credentials","service credentials","service binding"],aOe=["failed to resolve deployment","no deployment matched"],Yl=class extends Error{constructor(o,f,h){super(`Cannot switch from ${o} to ${f} API at invocation time because ${h} would be ignored. Create a new model instance without ${o}-specific features, or keep using the ${o} API.`);this.fromApi=o,this.toApi=f,this.conflictingFeature=h,this.name="ApiSwitchError"}fromApi;toApi;conflictingFeature},Vs=class extends Error{constructor(o,f,h){let y=f==="foundation-models"?"Foundation Models":"Orchestration",x=h==="foundation-models"?"Foundation Models":"Orchestration";super(`${o} is not supported by ${y} API. Use ${x} API instead.`);this.feature=o,this.api=f,this.suggestedApi=h,this.name="UnsupportedFeatureError"}feature;api;suggestedApi};function cOe(o,f){let{code:h,location:y,message:x,requestId:_}=lOe(o),z=dOe(h,f?.httpStatusCode),C=JSON.stringify({error:{code:h,location:y,message:x,request_id:_}}),w=x;if(z===Yt.UNAUTHORIZED||z===Yt.FORBIDDEN){if(w+=`
186
+
187
+ Authentication failed. Verify your AICORE_SERVICE_KEY environment variable is set correctly.
188
+ See: https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/create-service-key`,_)w+=`
189
+ Request ID: ${_}`;return new St({message:w})}if(z===Yt.NOT_FOUND){if(w+=`
190
+
191
+ Resource not found. The model or deployment may not exist in your SAP AI Core instance.
192
+ See: https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/create-deployment-for-orchestration`,_)w+=`
193
+ Request ID: ${_}`;let S=f?.modelId??E6(x,y);return new ve({message:w,modelId:S??"unknown",modelType:f?.modelType??"languageModel"})}if(z===Yt.RATE_LIMIT)w+=`
194
+
195
+ Rate limit exceeded. Please try again later or contact your SAP administrator.
196
+ See: https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/rate-limits`;else if(z>=Yt.INTERNAL_ERROR)w+=`
197
+
198
+ SAP AI Core service error. This is typically a temporary issue. Retries depend on the caller's retry configuration.
199
+ See: https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/troubleshooting`;else if(y)w+=`
200
+
201
+ Error location: ${y}`;if(_)w+=`
202
+ Request ID: ${_}`;return new N({isRetryable:vz(z),message:w,requestBodyValues:f?.requestBody,responseBody:C,responseHeaders:f?.responseHeaders,statusCode:z,url:f?.url??""})}function Ks(o,f){if(N.isInstance(o)||St.isInstance(o)||ve.isInstance(o)||gt.isInstance(o)||b.isInstance(o))return o;let{aborted:h,response:y,rootError:x}=pOe(o),_=f?.responseHeaders??Hs(y?.headers);if(!h){let S=uOe(x instanceof SyntaxError?void 0:x,y?.data);if(S)return cOe(S,{...f,httpStatusCode:y?.status??f?.httpStatusCode,responseHeaders:_})}let z={...f,responseBody:hOe(y?.data),responseHeaders:_};if(h)return qc(o,{isRetryable:!1,message:"Request was aborted by the client",statusCode:Yt.CLIENT_CLOSED_REQUEST},z);if(Hm(y?.status))return qc(o,{isRetryable:vz(y.status),message:x instanceof SyntaxError&&o instanceof Error?o.message:x instanceof Error?x.message:"SAP AI Core request failed",statusCode:y.status},z);if(x instanceof SyntaxError)return qc(o,{isRetryable:!1,message:o instanceof Error&&o!==x?o.message:"Failed to parse SAP AI Core data.",statusCode:Yt.INTERNAL_ERROR},z);if(x instanceof Error){let S=x.message.toLowerCase(),E=x.message;if(sOe.some((R)=>S.includes(R)))return new St({message:`SAP AI Core authentication failed: ${E}
203
+
204
+ Make sure your AICORE_SERVICE_KEY environment variable is set correctly.
205
+ See: https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/create-service-key`});if(aOe.some((R)=>S.includes(R))){let R=f?.modelId??E6(E);return new ve({message:`SAP AI Core deployment error: ${E}
206
+
207
+ Make sure you have a running orchestration deployment in your SAP AI Core instance.
208
+ See: https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/create-deployment-for-orchestration`,modelId:R??"unknown",modelType:f?.modelType??"languageModel"})}let k=/status code (\d+)/i.exec(E),O=k?.[1]?Number.parseInt(k[1],10):void 0;if(Hm(O))return qc(o,{isRetryable:vz(O),message:`SAP AI Core request failed: ${E}`,statusCode:O},z);for(let R of iOe)if(R.keywords.some((I)=>S.includes(I))){let I="message"in R?R.message(E):`SAP AI Core ${R.category} error: ${E}`;return qc(o,{isRetryable:R.isRetryable,message:I,statusCode:R.statusCode},z)}}let C=x instanceof Error?x.message:typeof x==="string"?x:"Unknown error occurred",w=f?.operation?`SAP AI Core ${f.operation} failed: ${C}`:`SAP AI Core error: ${C}`;return qc(o,{isRetryable:!1,message:w,statusCode:Yt.INTERNAL_ERROR},z)}function Hs(o){if(!o||typeof o!=="object")return;if(typeof Headers<"u"&&o instanceof Headers){let y=Object.fromEntries(o.entries());return Object.keys(y).length===0?void 0:y}let h=Object.entries(o).flatMap(([y,x])=>{let _=y.toLowerCase();if(typeof x==="string")return[[_,x]];if(Array.isArray(x)){let z=x.filter((C)=>typeof C==="string").join("; ");return z.length>0?[[_,z]]:[]}if(typeof x==="number"||typeof x==="boolean")return[[_,String(x)]];return[]});if(h.length===0)return;return Object.fromEntries(h)}function qc(o,f,h){return new N({cause:o,isRetryable:f.isRetryable,message:f.message,requestBodyValues:h?.requestBody,responseBody:h?.responseBody,responseHeaders:h?.responseHeaders,statusCode:f.statusCode,url:h?.url??""})}function lOe(o){let f=o.error;if(Array.isArray(f)){let y=f[0];return{code:y?.code,location:y?.location,message:y?.message??"Unknown SAP AI error",requestId:y?.request_id}}let h=f;return{code:h.code,location:h.location,message:h.message,requestId:h.request_id}}function E6(o,f){let h=[/deployment[:\s]+([a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9_-]+)*)/i,/model[:\s]+([a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9_-]+)*)/i,/resource[:\s]+([a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9_-]+)*)/i];for(let y of h){let x=y.exec(o);if(x?.[1])return x[1]}if(f){let y=/([a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9_-]+)*)/.exec(f);if(y?.[1])return y[1]}return}function uOe(o,f){if(bz(o))return o;if(bz(f))return f;if(o instanceof Error){let h=mOe(o.message);if(bz(h))return h}return}function dOe(o,f){if(Hm(o))return o;if(Hm(f))return f;return Yt.INTERNAL_ERROR}function pOe(o){let f=new Set,h=o,y=o,x,_=!1;while(typeof y==="object"&&y!==null&&!f.has(y)){f.add(y),h=y,_||=fOe(y);let z=y;if(x===void 0&&z.isAxiosError===!0)x=z.response;let C="cause"in z?z.cause:y instanceof Error&&T6.isErrorWithCause(y)?y.rootCause:void 0;if(C===void 0||typeof C==="object"&&C!==null&&f.has(C))break;h=C,y=C}return{aborted:_,response:x,rootError:h}}function fOe(o){if(o instanceof DOMException&&o.name==="AbortError")return!0;if(o instanceof Error&&o.name==="AbortError")return!0;let f=o;return f.isAxiosError===!0&&f.code==="ERR_CANCELED"}function Hm(o){return typeof o==="number"&&Number.isInteger(o)&&o>=100&&o<600}function vz(o){return o===Yt.REQUEST_TIMEOUT||o===Yt.CONFLICT||o===Yt.RATE_LIMIT||o>=Yt.INTERNAL_ERROR&&o<600}function bz(o){if(o===null||typeof o!=="object"||!("error"in o))return!1;let h=o.error;if(h===void 0)return!1;if(Array.isArray(h))return h.every((x)=>{if(x===null||typeof x!=="object"||!("message"in x))return!1;let _=x;if(typeof _.message!=="string")return!1;if("code"in x&&_.code!=null&&typeof _.code!=="number")return!1;return!0});if(typeof h!=="object"||h===null||!("message"in h))return!1;let y=h;if(typeof y.message!=="string")return!1;if("code"in h&&y.code!=null&&typeof y.code!=="number")return!1;return!0}function hOe(o,f=2000){if(o===void 0)return;let h;try{if(typeof o==="string")h=o;else{let y=JSON.stringify(o,null,2);h=typeof y==="string"?y:`[Unable to serialize: ${typeof o}]`}}catch{h=`[Unable to serialize: ${typeof o}]`}if(h.length>f)return h.slice(0,f)+"...[truncated]";return h}function mOe(o){let f=o.indexOf("{");if(f===-1)return null;let h=0,y=-1,x=!1,_=!1;for(let z=f;z<o.length;z++){let C=o.charCodeAt(z);if(x){if(_)_=!1;else if(C===92)_=!0;else if(C===34)x=!1;continue}if(C===34)x=!0;else if(C===123)h++;else if(C===125){if(h--,h===0){y=z;break}}}if(y===-1)return null;try{let z=JSON.parse(o.slice(f,y+1));if(z&&typeof z==="object"&&"error"in z)return z;if(z&&typeof z==="object"&&"message"in z)return{error:z};return null}catch{return null}}var Gr="5.0.3";import{createRequire as gOe}from"module";var S7e=gOe(import.meta.url);function yOe(o,f){if(o==="foundation-models"&&f===!0)throw new Vs(wOe,"foundation-models","orchestration")}function bOe(o){if(!o)return;let f=o;for(let h of R6)if(f[h]!==void 0)throw new Vs(_Oe[h],"orchestration","foundation-models")}function vOe(o){if(!o)return;for(let f of A6)if(o[f]!==void 0)throw new Vs(COe[f],"foundation-models","orchestration")}function xOe(o){if(!o)return;let f=o;for(let h of I6)if(f[h]!==void 0)throw new Vs(_z[h],"foundation-models","orchestration")}var I6=["fallbackModuleConfigs","filtering","grounding","masking","orchestrationConfigRef","placeholderValues","promptTemplateRef","streamOptions","tools","translation"],_z={fallbackModuleConfigs:"Fallback module configurations (fallbackModuleConfigs)",filtering:"Content filtering",grounding:"Document grounding",masking:"Data masking",orchestrationConfigRef:"Orchestration config reference (orchestrationConfigRef)",placeholderValues:"Placeholder values (placeholderValues)",promptTemplateRef:"Prompt template reference (promptTemplateRef)",streamOptions:"Stream options for post-LLM modules",tools:"SAP-format tool definitions (use AI SDK tools instead)",translation:"Translation"},R6=["dataSources"],_Oe={dataSources:"Azure On Your Data (dataSources)"},zOe=["orchestrationConfigRef","placeholderValues","promptTemplateRef"],A6=["masking"],COe={masking:_z.masking},wOe="escapeTemplatePlaceholders (Jinja2 template escaping)";function SOe(o,f,h,y){if(o===f)return;if(!h&&!y)return;if(o==="orchestration"&&f==="foundation-models"){let x=h;for(let _ of I6)if(x?.[_]!==void 0)throw new Yl(o,f,_);for(let _ of A6)if(y?.[_]!==void 0)throw new Yl(o,f,_)}if(o==="foundation-models"&&f==="orchestration"){let x=h;for(let _ of R6)if(x?.[_]!==void 0)throw new Yl(o,f,_)}}var k6=["orchestration","foundation-models"];function Fh(o,f,h){return{...co(o,f),api:f.api??o?.api??h}}function ed(o,f,h){return h??f??o??"orchestration"}function O6(o){if(o===void 0)return;if(typeof o!=="string"||!k6.includes(o))throw Error(`Invalid API type: ${JSON.stringify(o)}. Valid values are: ${k6.map((f)=>`"${f}"`).join(", ")}`)}function Xl(o,f){let h=o?.masking;if(!h||typeof h!=="object")return;let y=h,x=y.masking_providers!==void 0,_=y.providers!==void 0;if(x&&!_)f.push({message:"settings.masking.masking_providers is deprecated and will be removed by SAP on 2027-03-20. Migrate to settings.masking.providers.",type:"other"})}function td(o){let{api:f,embeddingSettings:h,invocationSettings:y,modelApi:x,modelSettings:_}=o;if(O6(f),y?.api!==void 0)O6(y.api);if(y?.api!==void 0){let S=x??"orchestration";if(S!==y.api)SOe(S,y.api,_,h)}if(f==="foundation-models")xOe(_),TOe(y),vOe(h);else bOe(_);let z=_?.escapeTemplatePlaceholders,w=y?.escapeTemplatePlaceholders??z;yOe(f,w)}function TOe(o){if(!o)return;for(let f of zOe)if(o[f]!==void 0)throw new Vs(_z[f],"foundation-models","orchestration")}import{createRequire as EOe}from"module";var O7e=EOe(import.meta.url),N6="​",P6=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength"),kOe=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype),"length"),OOe=["image/png","image/jpeg","image/jpg","image/gif","image/webp"],B6=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype),Symbol.toStringTag),D6=Object.getOwnPropertyDescriptor(URL.prototype,"href");function ud(o){if(typeof o!=="object"||o===null||D6?.get===void 0)return;try{let f=D6.get.call(o);return typeof f==="string"?f:void 0}catch{return}}function L6(o){if(o>=65&&o<=90)return o-65;if(o>=97&&o<=122)return o-97+26;if(o>=48&&o<=57)return o-48+52;if(o===43)return 62;if(o===47)return 63;return-1}function IOe(o){if(typeof o!=="object"||o===null||P6?.get===void 0)return!1;try{return P6.get.call(o),!0}catch{return!1}}function ROe(o){let f=o.length;if(f%4!==0)return!1;let h=0;if(f>0&&o.charCodeAt(f-1)===61)h++;if(f>1&&o.charCodeAt(f-2)===61)h++;let y=f-h;for(let _=0;_<y;_++)if(L6(o.charCodeAt(_))<0)return!1;if(h===0)return!0;let x=L6(o.charCodeAt(y-1));return h===1?(x&3)===0:(x&15)===0}function AOe(o){if(typeof o!=="object"||o===null||B6?.get===void 0)return!1;try{return B6.get.call(o)==="Uint8Array"}catch{return!1}}function POe(o){try{let f=JSON.stringify(o,(h,y)=>typeof y==="bigint"?y.toString():y);if(typeof f==="string")return f}catch{}try{return String(o)}catch{throw new gt({message:"Tool output cannot be serialized.",prompt:o})}}function BOe(o){try{if(typeof o==="string")return JSON.parse(o),o;let f=JSON.stringify(o);if(typeof f==="string")return f}catch{}throw new gt({message:"Tool call input must be JSON-serializable.",prompt:o})}function zz(o,f){return f?{cache_control:f,text:o,type:"text"}:{text:o,type:"text"}}var DOe=/\{(?=[{%#])/g,LOe=new RegExp(`\\{${N6}(?=[{%#])`,"g");function pd(o){let h;try{Uint8Array.prototype.at.call(o,0),h=kOe?.get?.call(o)}catch{throw new b({functionality:"Invalid Uint8Array file data."})}if(typeof h!=="number")throw new b({functionality:"Invalid Uint8Array file data."});let y=Array(Math.min(32768,h)),x="";for(let _=0;_<h;_+=32768){let z=Math.min(32768,h-_);y.length=z;for(let C=0;C<z;C++){let w=o[_+C];if(w===void 0)throw new b({functionality:"Invalid Uint8Array file data."});y[C]=w}x+=String.fromCharCode(...y)}return btoa(x)}function V2(o,f={}){let h=[],y=f.includeReasoning??!1,x=f.escapeTemplatePlaceholders??!0,_=(S)=>x?K2(S):S,z=f.parsePartProviderOptions,C=z?(S)=>z(S,f.warnings):()=>{return},w=(S,E)=>{if(!f.warnings)return;if(!f.warnings.some((k)=>k.feature===S))f.warnings.push({details:E,feature:S,type:"unsupported"})};for(let S of o)switch(S.role){case"assistant":{let E="",k=z?[]:void 0,O=!1,R=[];for(let I of S.content)switch(I.type){case"file":{w("file content in assistant message","SAP orchestration assistant messages carry text and tool calls only; file parts are ignored.");break}case"reasoning":{if(y&&I.text){let A=`<think>${I.text}</think>`;E+=A,k?.push({text:A})}break}case"text":{if(!I.text)break;let M=C(I.providerOptions)?.cacheControl;if(E+=I.text,k?.push(M?{cacheControl:M,text:I.text}:{text:I.text}),M)O=!0;break}case"tool-call":{if(C(I.providerOptions)?.cacheControl)w("cacheControl on assistant tool-call","SAP orchestration does not expose cache_control on the assistant tool-call envelope.");let M=BOe(I.input);R.push({function:{arguments:_(M),name:I.toolName},id:I.toolCallId,type:"function"});break}default:{w("unsupported assistant content","Unsupported assistant content type; part ignored.");break}}if(E||R.length>0){let I={content:O&&k?k.map((A)=>zz(_(A.text),A.cacheControl)):_(E),role:"assistant",tool_calls:R.length>0?R:void 0};h.push(I)}break}case"system":{let k=C(S.providerOptions)?.cacheControl,O=_(S.content),R={content:k?[zz(O,k)]:O,role:"system"};h.push(R);break}case"tool":{for(let E of S.content)if(E.type==="tool-result"){let O=C(E.providerOptions)?.cacheControl,R=E.output.type==="text"?E.output.value:POe(E.output),I=_(R),A={content:O?[zz(I,O)]:I,role:"tool",tool_call_id:E.toolCallId};h.push(A)}else w("non-tool-result content in tool message","Only tool-result parts are forwarded to SAP; other tool content is ignored.");break}case"user":{let E=[];for(let R of S.content){let A=C(R.providerOptions)?.cacheControl;switch(R.type){case"file":{let M=NOe(R),D=R.mediaType.toLowerCase();if(D.startsWith("image/")){if(!(ud(R.data)!==void 0&&D==="image/*")&&!OOe.includes(D))console.warn(`Image format ${R.mediaType} may not be supported by all models. Recommended formats: PNG, JPEG, GIF, WebP`);E.push({...A?{cache_control:A}:{},image_url:{url:M},type:"image_url"})}else E.push({...A?{cache_control:A}:{},file:{file_data:M,...R.filename?{filename:R.filename}:{}},type:"file"});break}case"text":{E.push({...A?{cache_control:A}:{},text:_(R.text),type:"text"});break}default:throw new b({functionality:`Content type ${R.type}`})}}let k=E[0],O=E.length===1&&k?.type==="text"&&k.cache_control===void 0?{content:k.text??"",role:"user"}:{content:E,role:"user"};h.push(O);break}default:throw new gt({message:`Unsupported role: ${S.role}`,prompt:JSON.stringify(S)})}return h}function K2(o){if(!o)return o;return o.replaceAll(DOe,`{${N6}`)}function Hk(o){if(!o)return o;return o.replaceAll(LOe,"{")}function NOe(o){let{data:f,mediaType:h}=o,y=ud(f);if(y!==void 0)return y;if(typeof f==="string")return`data:${h};base64,${f}`;if(AOe(f))return`data:${h};base64,${pd(f)}`;if(IOe(f)){let x;try{x=new Uint8Array(f)}catch{throw new b({functionality:"Detached ArrayBuffer file data is unsupported."})}return`data:${h};base64,${pd(x)}`}if(typeof f==="object"&&f!==null){let x=f.toString;if(typeof x==="function"&&x!==Object.prototype.toString){let _=x.call(f,"base64");if(typeof _==="string"&&ROe(_))return`data:${h};base64,${_}`}}throw new b({functionality:"Unsupported file data type. Expected base64 string, Uint8Array, ArrayBuffer, URL, or a buffer-like object returning canonical base64."})}
209
+ export{se,Mh,so,z2,Zp,G2,Nh,Lh,Bh,Uh,co,Yl,Vs,Ks,Hs,Gr,Fh,ed,Xl,td,Qs,Js,sa,Fo,id,nd,ad,od,rd,fi,Zl,sd,Ys,cd,Xs,ld,ud,pd,V2,K2,Hk};